Live data from Hacker News

Unison 1.0

unison-lang.org

11–20 of 98 posts

Re: Unison 1.0

#12

Also, hi, I'm one of the language creators, feel free to ask any questions here!

Hello! Yes I am curious, how does one deal with cycles in the code hash graph? Mutually recursive functions for example?

Re: Unison 1.0

#14

Also, hi, I'm one of the language creators, feel free to ask any questions here!

Really cool project. To be honest, I think I don't fully understand the concept of a content addressed language. Initially I thought this was another BEAM language, but it seems to run on its own VM. How does Unison compare to BEAM languages when it comes to fault tolerance? What do you think is a use case that Unison shines that Erlang maybe falls short?

Re: Unison 1.0

#16

How does the database of code work with git? Should you share it or version it too?

The tool you use to interact with the code database keeps track of the changes in an append-only log - if you're familiar with git, the commands for tracking changes echo those of git (push, pull, merge, etc) and many of them integrate with git tooling.

The projects in a codebase can absolutely be shared and versioned as well. Here's a log of release artifacts from a library as an example: https://share.unison-lang.org/@unison/base/releases.

Re: Unison 1.0

#17

Also, hi, I'm one of the language creators, feel free to ask any questions here!

Hello! Yes I am curious, how does one deal with cycles in the code hash graph? Mutually recursive functions for example?

There's an algorithm for it. The thing that actually gets assigned a hash IS a mutually recursive cycle of functions. Most cycles are size 1 in practice, but some are 2+ like in your question, and that's also fine.

Re: Unison 1.0

#19

Also, hi, I'm one of the language creators, feel free to ask any questions here!

First, congratulations for the 1.0 milestone.

Then, a pretty basic question: I see that Unison has a quite radical design, but what problem does this design solves actually?

Re: Unison 1.0

#20

Also, hi, I'm one of the language creators, feel free to ask any questions here!

What is the data you actually store when caching a successful test run? Do you store the hash of the expression which is the test, and a value with a semantics of "passed". Or do you have a way to hash all values (not expressions/AST!) that Unison can produce?

I am asking because if you also have a way to cache all values, this might allow to carry some of Unison's nice properties a little further. Say I implement a compiler in Unison, I end up with an expression that has a free variable, which carries the source code of the program I am compiling.

Now, I could take the hash of the expression, the hash of the term that represents the source code, i.e., what the variable in my compiler binds to, and the hash of the output. Would be very neat for reproducibility, similar to content-addressed derivations in Nix, and extensible to distributed reproducibility like Trustix.

I guess you'll be inclined to say that this is out of scope for your caching, because your caching would only cache results of expressions where all variables are bound (at the top level, evaluating down). And you would be right. But the point is to bridge to the outside of Unison, at runtime, and make this just easy to do with Unison.

Feel free to just point me at material to read, I am completely new to this language and it might be obvious to you...

Post reply on HN