Live data from Hacker News

Unison Cloud

unison.cloud

141–150 of 158 posts

Re: Unison Cloud

#141
post #63

This is about the Unison language but I think it's relevant. I was checking out the FAQ for Unison and noticed this: https://www.unison-lang.org/docs/usage-topics/general-faqs/#... > Unison does not currently support a Foreign Function Interface, for invoking code written in other languages. > Your programs can interact with the outside world via the `IO` ability, and this includes interaction via network sockets - s…

Hi, one of the Unison creators here. We've held off working on FFI until the JIT compiler[1] is completed since FFI is closely connected to the runtime.

There's some interesting subtleties with FFI in a distributed programming language, so I'll ramble about that here in case it's interesting to you. :)

So, in Unison, all values are serializable, including functions and their dependencies. This is a key superpower that enables a lot of the neat stuff we do. As long as those functions are written in pure Unison, we can easily serialize them, deploy them on the fly, etc. But when we add an FFI, the story changes - the sender may have some C library in their environment, and that library may not exist at the recipient node. The two nodes could be different platforms, one Mac, one Linux, and the library may have been written specifically for Linux, say!

So when we add FFI, we will likely be doing it in a different way than most languages. Functions that use FFI will have this tracked in the their type, using our effect system. You'll be able to use whatever C libraries you want in your local computations, but if you want to sent those values around, you need to be sending them to a place that supports that same set of FFI effects, since the C library and its dependencies can't literally be deployed on the fly in the same way as pure Unison code. In our cloud platform, nodes are typed based on what effects they support and we'll probably add a way to create new node pools that have access to whatever C libraries you want.

In "regular" programming, we're not used to thinking about "the execution environment" as a thing that's represented explicitly within the program. Instead, there's an assumed execution environment (which includes the set of native libraries, etc) and you get runtime errors if you run a program and some of the assumed execution environment is missing (like a shared library, say). For the most part, people have been okay with this, but it's already somewhat of a problem for languages that target the browser and the backend. The language may be statically typed, but now the type system is not tracking some key information - namely, is this a function I can call here (if I'm expecting this code to compile to JS) or is it a function that only can be called for backend code? In a distributed setting with heterogeneous nodes with different capabilities, this problem is even more pronounced, which is why we track this information in the types and plan to do so once we add FFI.

Hope that was interesting!

[1]: https://www.unison-lang.org/blog/jit-announce/ is an early progress report, and I think we're finally shipping something in the next month!

Re: Unison Cloud

#142

Earlier quoted context omitted.

Well, the key difference is that using all those things together is very quickly going to ensnare you in a big pile of goo. That you can forgo all of that and just write functions without having to build them into Wasm or any other format with any kind of build tool is the difference. That you get typed data storage without running a DB. That there is no “deployment” whatsoever.

Until you screw yourself with vendor lock in on a proprietary language. It's at least a pile of goo that you can take to other providers or host yourself.

The language is open source. See this reply re: self-hosting https://news.ycombinator.com/item?id=39293568

Re: Unison Cloud

#143
post #140
post #92

Earlier quoted context omitted.

Hi there! There's definitely an overhead to learning a new language but by describing your cloud infrastructure with an actual programming languages you reap the benefits of type-safety, testability, and code reuse, etc. You're spot on with shifting the complexity to the cloud layer; our thought was that it would free up time for dev teams to focus on other layers of their application. Maybe I'm misinterpreting your…

I guess what I'm wondering about is whether that really reduces overall complexity, or just externalises it. Despite all the pitfalls, the current "Cloud" ecosystem is comprised mainly of interoperable Open Source software. If we replace that stack with a proprietary blackbox… does that actually help the ecosystem as a whole? Or will we see similar offerings in other programming languages, until we're back to square…

Unison user here - you might be right about having to learn the provider's ins and outs, the same way that if you're on AWS, you need to learn AWS lingo.

But with Unison Cloud, most of the complicated API is written as a library in Unison itself[0]. This `cloud` library is technically optional (and editable), and you can build and share your own abstractions as you like, so you don't have that hard rough edge between AWS APIs and your own code.

[0]: https://share.unison-lang.org/@unison/cloud/code/releases/9....

Re: Unison Cloud

#144
post #96
post #92

Earlier quoted context omitted.

Hi there! There's definitely an overhead to learning a new language but by describing your cloud infrastructure with an actual programming languages you reap the benefits of type-safety, testability, and code reuse, etc. You're spot on with shifting the complexity to the cloud layer; our thought was that it would free up time for dev teams to focus on other layers of their application. Maybe I'm misinterpreting your…

> you reap the benefits of type-safety, testability, and code reuse, etc. If you treat infrastructure as a problem that has to be solved by code, obviously you'll run into code specific issues like type safety. In the real world I've never root caused a production issue back to that.

Type safety isn't a code-specific issue, it's a feature.

A YAML configuration file missing a required key, or a misspelling, or a disallowed mixing of parameters, are all things that can be solved by type-safety, rather than getting a deploy-time or run-time error.

Re: Unison Cloud

#145

Earlier quoted context omitted.

Until you screw yourself with vendor lock in on a proprietary language. It's at least a pile of goo that you can take to other providers or host yourself.

The language is open source. See this reply re: self-hosting https://news.ycombinator.com/item?id=39293568

Proprietary as in you write your code for Unison Cloud, and have to rewrite the infra parts if you decide to self host.

This is why infra is decoupled from code and you need things like "deployments".

Re: Unison Cloud

#146

Distributed function call isn't that simple. You will soon have various issues like authentication, authorization, compatibility between versions, throttling, retry (e.g. transient error), and so on :-/ The list is so long we could probably write a book about these

Or like a whole language to handle them

Re: Unison Cloud

#147
Is this 21st century COBOL? Some language with some open-spec, made actually to be running in some very closed environment via interactive environment, with no source control?

Re: Unison Cloud

#148

This looks to me like some real innovation. I am looking forward to digging into this. Combining a custom language with a custom cloud, seems to be something they have leveraged to make some great strides.

Yup great for business, horrible for users - just get lock in and keep paying. But great business idea.

Re: Unison Cloud

#149
post #31

It looks like to use this product, I have to learn an entirely new programming language (which appears to be a weird mashup of Python and Haskell), a whole set of entirely new API's, I can only host my stuff on their for-pay cloud infrastructure, and I can't use source control? That's a lot of very high hurdles to clear. Even if this magically solved all my scaling and distributed system problems forever, I'm not sur…

++ The odd thing is unison started purely as a language. Now there's a platform. I'd love to hear some opinions from outside Unison about how they like using this language, tooling and hosting.

I've been using Unison over Christmas.

I'm not affiliated with the company at all.

I built the start of a very basic site with Unison and HTMX.

https://cross-stitch-alphabet.netlify.app

In my day job I'm a Rails developer. I've been consistently frustrated at how few languages are truly composable and been getting increasingly disillusioned with mainstream languages.

So that's my context.

The not so great:

The language and principles are hard to learn. I've had to throw away what I already know about a lot of programming.

Coding inside ucm requires a very different mentality to how we build software.

The tooling is still early days and has many rough edges.

Performance is currently poor but will get much better shortly.

Abilities are incredible but demand the user to be very familiar with recursion.

Like many on here, I have lots of questions. It's not clear how migrations will work. I don't understand BTrees. If unison corp goes under what happens to my code?

Now for the good.

Unison is, hands down, the most radically joyful language I've ever used.

It's caused me to realise that most tools we use in software are faulty primitive compared with what they could be.

The fact is that even the benefits in the marketing of Unison are a scratching the surface of what's possible in this language.

For example, by spending a few hours I made the basics of an end to end testing library that emulates HTMX with local function calls.

This, if fleshed out, would mean the holy grail for me - fast cacheable end to end tests that do not require a browser to be spun up.

The possibilities are mind boggling.

I was utterly delighted with the deploy in a single function feature, something I'm now never going to be able to go back from having.

And deploying a database with schema in two lines is just jaw dropping.

Every time I use Rails now it's clear how much better our coding experience could be.

By building in Unison you get ports and adapters for free. Never have to wait for a test suite again. No infrastructure as code. No JSON. No yaml. Bliss.

In summary, it's radical. Would I run a production system on it yet? Nope.

Would I watch it keenly until it amasses a bit more momentum? You bet.

I believe whether unison succeeds or fails, this is the future of programming.

Oh and they're a delightful group of people to be around. The discord community has been beyond supportive to me whilst learning the language.

Re: Unison Cloud

#150
post #46
post #15

Earlier quoted context omitted.

I would even pay a few bucks (one time, not a subscription) to license this software for use. I would love to use Unison for my personal projects, but I'm not about to get locked-in to something, I'd rather build something myself that was worse than this than get locked in for personal projects. I know it has a free tier now , but in the future that may not exist.

The language is free to use.

Yes but what’s a language without a deployment strategy?
Post reply on HN