Good on you for exercising, but this is really sad. We don’t live on Mars. I hope your city / district can find a way to create pleasant outdoor spaces.
HN user
ildjarn
If the podiatrist in the article is to be believed, humanity never would have made it out of the Stone Age.
Born To Run is an adventure/travel book. I don’t know why people read it as pop sci.
A Boy and His Dog is another one.
You can de-color an async function by blocking.
Did you set out to find a vulnerability or just stumble on it?
If setting out to find a vulnerability, how do you get started?
What is the “open ide, write print(“hello world”)” for this kind of work?
Colored functions is only a problem in JS
What’s the deal with templates? I make new projects infrequently. Templates save me little time. I spend far more time struggling to fix broken code, fitting existing code to new requirements, etc
I’d call those books competent. They didn’t advance the art form but the prose supported a fun story and was never distracting.
Immutability by default is not a requirement for functional programming (I mean... if it were, Haskell would be obviously not FP since the 'default' entrypoint is very mutable).
I mean the bindings and collections. For example, when you make an array in JS, the default syntax is a mutable list with a mutable binding:
let xs = [ 1, 2, 3 ]
> Neither are monads. There are entire FP languages without monads for effects (obviously, you can write a monadic interface in them, but it's not part of the idiomatic core).I should be more precise - there needs to be some way to mange effects. Monads with syntax extensions is simply the most common (Haskell, Scala, F#, Closure macros)
and even if they are, modern c++ fully supports them, as does rust, javascript, etc. It's very common in javascript to use Array.map() and Array.flat().
JavaScript does not have good monad support. This is why async/await was added as a new language feature. Yeah, I know you can hack together something with generator functions, but it’s hardly idiomatic.
But we’re getting into the weeds here. My point is: I don’t consider a language to support FP when writing functional code in that language leads to lots of friction compared to what is idiomatic.
Have you ever tried FP in Java? It works for some toy thing but then you hit the lack of TCO, or the ridiculously long type names (not inferred) or the pyramid of doom…
Part of the appeal of an iGizmo is not sending so much data to Google. I really doubt this is happening, and if it is, Apple will be hosting the models.
This loads faster than native apps serving local content on my device.
Very few classes model a real world entity in my experience. Maybe that was the plan but it’s just not the reality of OOP in the industry.
I’m arguing it’s not FP when you take an OOP language and bolt on lambdas. Lambdas are necessary but not sufficient.
You need expression orientation, immutability by default, persistent collections in the standard library, some way to handle monadic code, etc…
If something works in a distro, it automatically works in a Dockerfile based on that distro. There is no extra packaging effort required.
What the post misses is that lots of packages are not available on Nix, but everything is available on Docker automatically.
If what you need is available, however, then it can be so much better.
OOP is about bundling state and behaviour into units that hide their internal mechanisms by some kind of interface.
Records can have no state - compared to regular classes - so they are an anti-OOP feature.
Functional programming means functions are first class citizens and can be constructed on the fly.
FP is much more than this one language feature.
C# LINQ, being a round-about implementation of do-notation, is a pretty advanced FP feature, and beyond most mainstream languages. C# is certainly a step up over Java etc.
However, most developers wouldn’t understand, say, a result monad implemented via LINQ, so you’re still fighting the ecosystem somewhat.
Typescript has far more powerful type constructs than Java.
TS has a powerful type system that behaves in strange and counter intuitive ways, particular for people coming from JS. It doesn’t even have a spec, really. I would prefer something less powerful but more predictable, personally.
What mainstream languages have a good suite of FP features though?
If you try to write mostly pure code in Java I’m afraid you’re in for a bad time, despite the (big!) improvements of records and lambdas.
Minimum viable FP starts at OCaml, F#, Scala and Closure, yet none of these are mainstream.
Loops and conditionals are a totally alien concept to non programmers. I really don’t think the syntax is the issue.
Never understood why Python is considered easier to learn than JavaScript to be honest.
Good post overall.
It seems like this system can only work if the build and deployment is all done by one tool in a monorepo. What does migration from existing setups look like?
And what about services that communicate via shared infrastructure:
- A writes to Kafka topic T
- B reads from Kafka topic T
Ok so we could make the hash of A part of the topic name T, but then on every release we make a new topic and lose history?
Looking forward to future posts.
Last I tried to use Nix there was lots of confusion over flakes - some tutorials suggested using them and others saying they are still in development.
Has the situation improved?
Looks interesting.
Why not Discord?
Why did you post this?
“Chicanery” nice reference!