The Ur Programming Language
impredicative.com
impredicative.com
* HTML fragment type and literals. It's analogous to React's JSX and helps you write statically-checked and type-safe HTML.
* SQL literals. Sort of like LINQ in C#. This ensures that your SQL is statically checked, so you can't end up with invalid queries at runtime, and type-safe.
* Allows you to write client side code in Ur. This means that you can, for example, write a button's `onclick` that issues a (strong-typed) RPC call to the backend all in Ur. Sort of like tRPC for TypeScript.
You can find all of these features in other web stacks, as mentioned. But in Ur/Web everything is tightly integrated. And you can also be sure of your app's correctness due to all the static and type checks.
Those are the good parts. The bad part is that Ur/Web went down the ML rabbit-hole. You pretty much have to be familiar with an ML language to be able to use it. It also suffers from the usual low adoption of ML languages.
This, however, was not it!
That said, people are already using this language for their projects -- even commercial ones: http://impredicative.com/ur/users.html
Is BazQux Reader really written in Haskell and Ur/Web?
Yes. I love to use the best tools available.I had to get a stopwatch and start clocking how long it takes me to do things using a computer recently, because I swear like half the software I was using was slow for no reason despite buying super fast ssd/ddr18 ram/cpu etc. I got rid of all my games I could not launch from the desktop and be playing the game within 30 seconds, and my entire outlook on gaming felt better. I really hate when software wastes your time.
I saw that last release was in 2020, and took myself in an acquired reaction on the "staleness" of this project.
The thing is just, that projects like these become stable at a point and need no more upgrades – from there it is horisontal features that can happen in libraries.
This is a stark contrast to the Typescript/React ecosystem I am spending my time mostly on these days. Every time something does not work as expected, it is probably beucase some package was updated underneath your feet.
But that usually doesn't go over very well
The Ur Programming Language Family - https://news.ycombinator.com/item?id=10169244 - Sept 2015 (18 comments)
Ur/Web, a Simple and Powerful Language for Secure Web Applications - https://news.ycombinator.com/item?id=8793272 - Dec 2014 (1 comment)
Ur/web: pure functional, statically typed web programming - https://news.ycombinator.com/item?id=7829100 - June 2014 (45 comments)
Ur/Web in production - https://news.ycombinator.com/item?id=7072437 - Jan 2014 (1 comment)
A Google Reader Replacement written in Haskell and Ur - https://news.ycombinator.com/item?id=5961570 - June 2013 (46 comments)
The UR Programming Language - https://news.ycombinator.com/item?id=1757199 - Oct 2010 (1 comment)
The Ur Programming Language Family - https://news.ycombinator.com/item?id=1412503 - June 2010 (11 comments)
Ur/Web: The Ur Programming Language Family - https://news.ycombinator.com/item?id=810726 - Sept 2009 (1 comment)
In particular, FRAP is really great: http://adam.chlipala.net/frap
We hope to be able to hire more engineers to do Ur/Web development at Nectry in the foreseeable future, so do let me know if you think you might be a good match.
On a similar vein, I imagine the folks at Hasura might be doing some pretty advanced stuff to convert arbitrary GraphQL queries into efficient SQL statements.
It's been quite a few years since this was a daily feature so I assume something happened. Maybe layoffs.
I miss coming to HN and seeing cool things that I wasn’t aware of!
The best feature is, of course, discussing these things with the very people who made them.
Such a cool place!
The compiler, and its error messages, are somewhat inscrutable if you don't fully understand some of the more advanced features of the language, and some stuff I felt I was honestly not smart enough to figure out after a while. There was a point for me where most of it clicked together, but it took a long while to get there.
Ultimately what made me stop using it after that project was the features of the server itself. You can compile it to a self-contained HTTP server, but some issues that I don't remember right now made it unfit to use outside of development, so you're left with CGI and FastCGI. Like another comment mentioned, there's some stuff you can only do using the C/JS FFI, and Ur/Web's transactional nature sometimes makes it hard to tie these additions into the rest of the language. There's also some things (such as submitting a form with multiple files, IIRC) that are not supported by the compiler, and even after submitting a patch to fix some issues with the SQLite backend I didn't feel comfortable enough with the big pile of terse SML to patch those in.
I'm not sure embedding xml in code is the way, templating does have nice things, but most certainly some kind of declarative syntax for markup mixed in with data.
We've learnt over the last few years that the functional style of hydrating down views, e.g. SwiftUI is definitely a nice to have to compose large structures (without exaggerating though, I'm looking at you React/GraphQL), but passing data around is still a big PIA.
Reasoning about data in a high level language such as Eloquent/LINQ is nice (minus the abstraction leaks), but it bears reminding that most pages are views on a SQL request. Maybe we should start there. Maybe the webpage is a query.
I honestly think we need to ditch javascript and have a native language of the new web, with a sensible compiler and accessibility built in.
At the rate of the internet going the way it is going at the moment, maybe we will get to a grassroot soft-reset of the net in the coming years. Sadly, Gemini is not it, although it has its merits.
Not a fan of the haskell approach to the world though. It works in a vacuum, not in the real, dirty, world.
If my memory serves, the way they enforce this is by generating the client alongside the server.
What programming language isn't built on an antecedent language? Why, the ur-language, of course! Arguably, this is FORTRAN.