Earlier quoted context omitted.
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.
Unison 1.0
71–80 of 98 posts
Re: Unison 1.0
#72Ok I tried it out. So I run ucm.cmd and it tells me: "I created a new codebase for you at C:\Users\myuser" but there is nothing there except a .unison folder. I didn't look too closely at first but maybe this all works by storing the code in the sqlite file inside that folder? Dot folders aren't usually relevant for project files. Because then even after the cli had me create a new project called happy-porcupine whic…
The tooling takes a little getting used to but it’s extremely powerful. Here are a few benefits you’ll see -
UCM keeps a perfect incremental compilation cache as part of its codebase format, so you’re generally never waiting for code to build. When you pull from remote, there’s nothing to build either.
Pure tests are automatically cached rather than being run over and over.
Switching branches is instantaneous and doesn’t require recompiling.
Renaming is instantaneous, doesn’t break downstream usages, and doesn’t generate a huge text diff.
All code (and code diffs) are hyperlinked when rendered, supporting click through to definition.
I don’t know if you saw these getting started guides, they might be helpful -
https://www.unison-lang.org/docs/quickstart/
And then this tour -
https://www.unison-lang.org/docs/tour/
You can come by the Discord (https://unison-lang.org/discord) if you have any questions as you’re getting going! I hope you will give it a shot and sorry for the trouble getting started. There are a lot of new ideas in Unison and it’s been tricky to find the best way to get folks up to speed.
The Unison website and docs are all open source btw -
Re: Unison 1.0
#73Ok I tried it out. So I run ucm.cmd and it tells me: "I created a new codebase for you at C:\Users\myuser" but there is nothing there except a .unison folder. I didn't look too closely at first but maybe this all works by storing the code in the sqlite file inside that folder? Dot folders aren't usually relevant for project files. Because then even after the cli had me create a new project called happy-porcupine whic…
Re: Unison 1.0
#74[1] A look at Unison: a revolutionary programming language:
Re: Unison 1.0
#75Also, hi, I'm one of the language creators, feel free to ask any questions here!
How do you deal with "branded" types, if you know what I mean. Edit: I mean structurally identical types that are meant to be distinct. As I recall Modula 3 used a BRANDED keyword for this.
structural type Optional a = Some a | None structural type Maybe a = Just a | Nothing
and these two types would get the same hash, and the types and constructors could be used interchangeably. If you used the "unique" type instead:
unique type Optional a = Some a | None uniqte type Maybe a = Just a | Nothing
Then these would be totally separate types with separate constructors, which I believe corresponds to the `BRANDED` keyword in Modula 3.
Originally, if you omitted both and just said:
type Optional a = Some a | None
The default was "structural". We switched that a couple of years ago so that now the default is "unique". We are interestingly uniquely able to do something like this, since we don't store source code, we store the syntax tree, so it doesn't matter which way you specified it before we made the change, we can just change the language and pretty print your source in the new format the next time you need it.
Re: Unison 1.0
#76Also, hi, I'm one of the language creators, feel free to ask any questions here!
Re: Unison 1.0
#77Also, hi, I'm one of the language creators, feel free to ask any questions here!
Re: Unison 1.0
#78Oh, so this is not the bidirectional file synchronization tool huh? Name collisions are inevitable, but unison (the sync tool) has been around and in use since 1998, so this one feels especially egregious.
Re: Unison 1.0
#79Earlier quoted context omitted.
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.
If you could link to where this is implemented I'd be very grateful!
Re: Unison 1.0
#80Even just a really rough "here our requests per second compared to Django, express.js and asp.net" Would be great to get a rough read on where it sits among other choices for web stuff.
More generally, I do hope this goes well for unison, the ideas being explored are certainly fascinating.
I just hope it one day gets a runtime/target that's more applicable to non web stuff. I find it much easier to justify using a weird language for a little CLI tool then for a large web project.