7 ms·
I have to admit this broke my brain. This is the first time I'm hearing about content addressable languages, and once you get over that barrier, a distributed
by Karupan 3y ago
I have to admit this broke my brain. This is the first time I'm hearing about content addressable languages, and once you get over that barrier, a distributed language doesn't seem far fetched.
As a big fan of functional programming, is this something that is going to just end up being an esoteric language? Don't get me wrong, I absolutely love the vision of the authors, but after being bitten by the Elm bug and that crashing and burning, I'm just cautious of getting invested in new languages and tools.
- adius 3y agoNothing crashed and burned. Elm is in a state where it’s fully usable and has all the futures you need. I use it every day! Since it’s a DSL to create HTML + JS + CSS websites, you still get all the new features of browsers!
- Karupan 3y agoExcept for the compiler bugs, lack of self hosted package management, improvements to tooling, etc. I use it regularly too, but it is frustrating to see it in a state of decay. They can definitely claim the above points and more are not goals, and Evan absolutely has every right to do so. But don’t be surprised when devs see it as dead.
- mst 3y agoI think, even though I can absolutely see the arguments for doing so, locking down the compiler to no longer accept external native extensions was a huge mistake community wise, since a lot of the people advocating for Elm were the sort of early adopter who really really wants an escape hatch because they're in the habit of getting into situations where they need one no matter what tools they're using. Certainly that describes me, and when all the people who seemed to be like me got told to go sit on a cactus by the Elm core developers and bailed out to work with something else, my experiments got pretty much immediately shelved and Elm moved into the "interesting place to steal ideas from, actively hostile to my actually using it" category. This may be unfair, but I'm pretty sure it's a reasonable description of what -did- happen, fair or not.
- MarceColl 3y agoIn case you don't know about this, this is kind of what they are trying to achieve: https://www.unison-lang.org/ https://www.unison-lang.org/
- Karupan 3y agoThank you, this looks awesome. I already have a use case in mind, so will explore unison since it seems more mature.
- slowmotiony 3y agoI still don't get it, could someone smarter than me explain? helloWorld : '{IO, Exception} () helloWorld _ = printLine "Hello World" The example above is followed by explanation "{IO, Exception} indicates which abilities the program needs to do I/O and throw exceptions." Well, which abilities does it need then? No idea.
- trenchgun 3y ago>Well, which abilities does it need then? No idea. Abilities called IO and Exception. I am sure you are familiar with effect systems and algebraic effects, right? Abilities are what algebraic effects are called in Unison: https://www.unison-lang.org/docs/fundamentals/abilities/ https://www.unison-lang.org/docs/fundamentals/abilities/ So, in Haskell you would have IO monad and Exception monad, but in Unison you have an IO ability and an Exception ability. If you want to know more: https://www.unison-lang.org/docs/language-reference/abilities-and-ability-handlers/ https://www.unison-lang.org/docs/language-reference/abilitie... and: Convent, L., Lindley, S., McBride, C. and McLaughlin, C., 2020. Doo bee doo bee doo. Journal of Functional Programming, 30, p.e9. https://arxiv.org/pdf/1611.09259.pdf https://arxiv.org/pdf/1611.09259.pdf
- sanderjd 3y ago> I am sure you are familiar with effect systems and algebraic effects, right? Probably not, based on their question! These are pretty esoteric concepts. I think it was one of a few bullet points on "other interesting ideas" in the functional programming portion of my programming languages course, and I doubt that most working programmers have taken an academic PL course like that at all. But effects are indeed an awesome concept, and thanks for the excellent links! The parent is one of today's lucky 10,000: https://xkcd.com/1053/ https://xkcd.com/1053/
- csantini 3y agoInteresting idea, but isn't code addressable already in most languages? We call them modules/libraries and we pip/npm install them from Github and you can keep track of changes/versions/PRs.
- kitd 3y agoContent-addressable, not code addressable. It's kind of like global, distributed memoization (IIUC). edit: not memoization, just hashing the AST of a function.
- throwaway290 3y agoContent is by definition content addressable. x = 42 is a hardlink to every other instance of x = 42 if you will. What this does is more compact and practical content addressing, like Nix or Git. But realizing that there are always more than one way of expressing the same logic (with different hashes no matter how you canonicalize) makes me doubt it is a killer feature.
- trenchgun 3y agoContent addressable has a very specific meaning: https://en.wikipedia.org/wiki/Content-addressable_storage https://en.wikipedia.org/wiki/Content-addressable_storage Modules and libraries are addressable based on their names or URI:s. "Unison eliminates name conflicts. Many dependency conflicts are caused by different versions of a library "competing" for the same names. Unison references defintions by hash, not by name, and multiple versions of the same library can be used within a project." https://www.unison-lang.org/docs/what-problems-does-unison-solve/ https://www.unison-lang.org/docs/what-problems-does-unison-s... "Here's the big idea behind Unison, which we'll explain along with some of its benefits: Each Unison definition is identified by a hash of its syntax tree. Put another way, Unison code iscontent-addressed. Here's an example, the increment function on Nat: increment : Nat -> Nat increment n = n + 1 While we've given this function a human-readable name (and the function Nat.+ also has a human-readable name), names are just separately stored metadata that don't affect the function's hash. The syntax tree of increment that Unison hashes looks something like: increment = (#arg1 -> #a8s6df921a8 #arg1 1) Unison uses 512-bit SHA3 hashes, which have unimaginably small chances of collision. If we generated one million unique Unison definitions every second, we should expect our first hash collision after roughly 100 quadrillion years! " https://www.unison-lang.org/docs/the-big-idea/ https://www.unison-lang.org/docs/the-big-idea/