Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Ok 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 which is pretty unique on my computer I can't find any file or folder anywhere with that name on my machine. So then the getting started guide for unison tells me to create a scratch.u file and put the hello world instructions in there. But where am I supposed to put that scratch.u file? Ok so in desperation I put it right next to the ucm.cmd and just do "run helloWorld" on the cli even though I don't see why this would work but it does. Apparently I'm supposed to just dump my code directly into the downloaded compiler/folder? So then what is the C:\Users\myuser project folder for if I have to put all my .u files directly next to ucm.cmd anyway? And another weird thing is that everytime I make a change to the scratch.u file the cli tells me "Run `update` to apply these changes to your codebase." but even if I don't do that then rerunning "run helloWorld" still runs the new code.

I tried the unison vscode extension btw and despite ucm being on the path now it says: "Unison: Language server failed to connect, is there a UCM running? (version M4a or later)". I also seem to be required to close my ucm cli in order to run vscode because it says that the database is locked otherwise. And I guess there is no debugger yet? It just seems weird that I don't really know where my "project" even is or what this project model conceptually is. It seems like I just put all my unison code somewhere next to the compiler, it loads everything by default into the compiler and I merely do db updates into some kind of more permanent sqlite storage perhaps but then why do I even do that, wouldn't I still just put the .u files into a git repository? There is also no mention of how this language runtime works or performs, I'm assuming fully memory managed but perhaps slow because I'm seeing an interpreter mentioned?

I think you also really need a web based playground where you show off some of these benefits of unison in small self contained snippets because just reading through some examples is pretty hard, it's a very different language and I can't tell what I'm looking at as a lifelong C/Java/etc. tier programmer. Sure you explain the concepts but I'm looking for a far more hands on: "run this ability code, look: here is why this is cool because you are prevented from making mistakes thanks to ..." or "this cannot possibly error because thanks to abilities ..." instead of so much conceptual explanation: https://www.unison-lang.org/docs/fundamentals/abilities/usin...



Thanks for this report.

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 -

https://share.unison-lang.org/@unison/website


If it helps, here's a side-by-side comparison guide between Java and Unison. It covers the syntax primarily: https://www.unison-lang.org/compare-lang/unison-for-java-dev...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: