10 ms·
Unison – A statically-typed purely functional language
- gnode 7y ago> Unison is a new programming language, [...] similar to Haskell, but with a unique ability to describe entire distributed systems with a single program. Is this not something that could be done in Haskell by defining a new monad type? Perhaps also a tool to deploy such programs to the cluster would be useful. It seems to me that this paradigm doesn't require a whole new programming language, or that it wouldn't be as ergonomic in Haskell.
- westoncb 7y agoIt seems like that is part of the plan, e.g.: The nodes being provisioned are all local nodes, running in the same node container. Obviously we’d like to provision nodes running on other computers, or provision from a managed cloud service (like unison.cloud, coming soon) and/or a P2P mesh of nodes. (From: http://unisonweb.org/2016-10-12/search.html http://unisonweb.org/2016-10-12/search.html) And further down on the original linked page there's some more info on something it's using for the distributed system description that I don't believe would be possible in Haskell: This dynamic transfer / deployment of arbitrary computations is possible because definitions in Unison are identified by a cryptographic hash of their content, including the hashes of all dependencies (the hash is also "nameless" as it isn't affected by naming of variables). ... I've been watching the project a bit here and there and it has a number if interesting aspects to it For another example, check out the 'semantic editor': http://unisonweb.org/2016-03-16/semantic-vs-text.html http://unisonweb.org/2016-03-16/semantic-vs-text.html
- hota_mazi 7y agoWhen I read this: > If you look at what programmers spend their time doing when programming (other than thinking of course), it’s actually stuff like: > > - Adding imports to the code to be able to resolve names > It makes me wonder whether the authors have used a modern IDE in the past ten years. The video in this page is also showing nothing that hasn't existed for years in pretty much all IDE's under the sun.
- westoncb 7y agoIf you skim it, it will look that way. What the editor is tackling has some overlap with common IDE features, but it’s taking a deeper approach to addressing them. You listed one item from a big list of tasks, but the more interesting thing is what’s written after the list about how unison addresses the items. And before demeaning the creators it may be worth it to look into their background a bit and see if it’s more likely to you that they are unaware of modern IDEs or if it’s possible you haven’t fully grasped some of their ideas yet.
- hota_mazi 7y agoI am well aware of their background (I own their book) and this is precisely why I think they haven't used a lot of IDE's. Actually, these past years, I've heard a few times from one of them claiming that with a good language, one doesn't need an IDE.
- nestorD 7y agoIt sounds like the cloud monad defined by MBrace for F# : https://lenadroid.github.io/posts/fsharp-cloud-monads-part-1.html https://lenadroid.github.io/posts/fsharp-cloud-monads-part-1...
- Avi-D-coder 7y agoDistributing arbitrary lambdas and lazy computation of any sort is extremely difficult in GHC Haskell, hence the complexity and limitations of cloud Haskell. Unison makes a number of design choices to support distributed lazy computations. This is not to say unison style computations on GHC Haskell are impossible. For the start of serializing lazy computations see https://github.com/jberthold/packman https://github.com/jberthold/packman or http://hackage.haskell.org/package/ghc-heap-view-0.6.0 http://hackage.haskell.org/package/ghc-heap-view-0.6.0. I would love if Unison's hashing model was added to GHC, but Haskell compiled to WASM is a more likely candidate for obtaining hashes.
- zelon88 7y agoThis looks very promising. I'm curious though, is there any authentication mechanism here? If I have Unison installed does it start a listener and execute whatever code is sent to it?
- refried_ 7y agoThere will be an authorization mechanism for distributed computation; we don’t like arbitrary remote code execution!
- passthejoe 7y agoThe name is already taken: https://www.cis.upenn.edu/~bcpierce/unison/ https://www.cis.upenn.edu/~bcpierce/unison/
- ModernMech 7y agoThat's not a programming language. Different namespace.
- toomim 7y agoNo, but it's also in the space of functional programming language research.
- adultSwim 7y agoI'm reminded of Ur/Web, http://www.impredicative.com/ur/ http://www.impredicative.com/ur/
- bartq 7y agoQuestion: where is it used today?
- s4n1ty 7y agoReminds me of Swarm: http://swarmframework.org/ http://swarmframework.org/
- bitwalker 7y agoIndeed! (Hi Ian!)
- hhas01 7y agoRelated: http://lambda-the-ultimate.org/node/5569 http://lambda-the-ultimate.org/node/5569
- lioeters 7y agoLove this idea: > This dynamic transfer / deployment of arbitrary computations is possible because definitions in Unison are identified by a cryptographic hash of their content, including the hashes of all dependencies (the hash is also "nameless" as it isn't affected by naming of variables). > To transfer a computation, we send it to the recipient, and the recipient checks to see if the computation references any unknown hashes. Any unknown hashes are synced to the recipient before the transfer completes and the computation proceeds. Previous discussion (2015): https://news.ycombinator.com/item?id=9512955 https://news.ycombinator.com/item?id=9512955
- crabl 7y agoI think the coolest aspect about Unison, is that they're trying to reify the concept of a codebase (http://unisonweb.org/2016-09-17/editing.html http://unisonweb.org/2016-09-17/editing.html) into something more than just a collection of lines of source code. You can think of it more like a well-defined object that can be transformed in coherent, strongly-typed ways. Unison identifies everything by a hash, so if you "change" a function definition, you're not actually mutating any state in the codebase, you're introducing a new function with a new hash.
- refried_ 7y agoHi folks, I’m one of the authors of Unison (Programming Language). Didn’t expect to see this on HN, but happy to try to answer questions about our pre-alpha-release language :)
- ofrzeta 7y agoAlso a file syncing tool by the same name, written in the ... functional language Ocaml.