mmap is a posix system call. It's not supposed to be user friendly. It's supposed to be an interface all posix compliant OSes provide as standard. Old and low level code can't be judged by SOLID principles or design patterns. Those are luxuries that system engineers don't have or need.
Pretty much nothing using morecore (a.k.a the sbrk syscall) on linux. I think plan9 still uses that approach. It's all mmap as far as I know these days.
Legendary video. Worth noting that this approach can also be followed in imperative languages (Javascript, anyone?) and leads to an incredibly succinct way of implementing parsers.
54:00 Re: Haskell fanatics: You're absolutely right. Trying to 'debug' performance problems in a lazy language is mind-bendingly difficult -- anything that you do to investigate, while it won't change input -> output mapping, *may* change what gets evaluated and when. If you want to checkmate a Haskell fanatic's 'silver-bullet' arguments, ask them why `seq` exists.
42:30 It's almost unreasonable how many good ideas there have been in functional languages that have been 'soaked up' by normie languages ... Wonder if dysfunctional (?) / nonfunctional (?) people will ever 'do the induction' and realise that we ought to replace all of the derpy OO / procedural languages with functional ones ...
The largest benefit of functional languages is equational reasoning / referential transparency. You can't 'soak [that] up' incrementally; it's a fundamental property of purity that cannot be added to a language with effects.
So, this is really call-by-name, rather than lazy evaluation -- things are evaluated only when needed ... but may be evaluated repeatedly. Also, your intuition that thunks are not used to implement this is generally right; traditionally, graph reduction has been used ... afaik, modern GHC uses some more-sophisticated abstract machine (It was STG at some point, but I'm not sure what's being used now.).
Why do people who come from Java / OO use `T` as the first type parameter? In functional languages (Haskell, SML, etc.) we start with `A` ... which seems like the obvious place to start.
As I was going to college for CS, Ada was replaced by Java in the curriculum. The general thought was that Ada was a great language, but it was out-of-fashion and too difficult to teach. After a few decades of thinking about it, I think Ada got most everything right in the first place, and most modern languages that followed were just superficial re-writes. I think it's time for Ada to make a comeback. I suppose a lot of people don't like the English-oriented syntax of BASIC/Pascal/Ada, but there's really no reason a more internationally neutral syntax layer couldn't be developed.
We have too many people in government talking about things they don't know about. I cringed every time they used the word "algorithm" when questioning that tiktok guy. Like that was their big word for the month.
I'm not a programmer by trade, just a hobbyist. I looked into Ada and found it really interesting, but really did get lost in build system goop. I think I may look into it again with this more minimalist, simple mentality and hopefully get more out of it. Good video, thanks.
24:23 with “Hello from AdaglBlendFunc”. I like the casual example of an out of bounds read achieved in an approved “safe” language. PS Thanks for an interesting overview of Ada. It’s turned out to be quite a curious creature.
There is a meaning to having templates, in isolating what your task is. The task wasn't to parse input streams into numbers, but to fill in the body of one function. Unfortunately, the scaffolding was indeed ridiculous. E.g. compare: arTemp <- getLine let ar = Data.List.map (read :: String -> Int) . words $ arTemp ar :: [Int] <- map read . words <$> getLine readMultipleLinesAsStringArray = sequence . flip replicate getLine