4 ms·
Brutal ending. Let me kick the tires on Elm types stored in Postgres!
by 1-more 3y ago
Brutal ending. Let me kick the tires on Elm types stored in Postgres!
- refset 3y agoI'm extremely keen to see what the SQL<->Elm experience might be (assuming something like that is part of the deal too). Simplifying how we interact with databases is arguably even more important/$valuable than simplifying UIs.
- carapace 3y agoFWIW, I'm about to try integrating Elm and Tau Prolog (Prolog-in-JavaScript). I have a toy language that uses Elm for the interpreter and Prolog for the type inference and I want to make one of those nifty "try this language right in the browser" things. The "relations" in Prolog and SQL ("relational model") are the same thing, and Prolog is arguably "nicer" than SQL? https://en.wikipedia.org/wiki/Relational_model https://en.wikipedia.org/wiki/Relational_model
- 1-more 3y agoI strongly endorse having some fun with Lamdera then. Your frontend and your backend are written in Elm. Your backend state is the state of the world, and it is stored in a DB. You write migrations that force you to have a safe translation between versions. They answer the question of "given a state of frontend and backend models and in flight messages, how do we construct new versions of these things?" And they can include "throw out that message" if you really want.
- iamwil 3y agoThat part of the talk surprised me. It implies that you can compile Elm into C? I wasn't aware that was in its capabilities. It seemed like a good idea worth exploring. I can see how he'd get Jeff'd there.
- marcosdumay 3y agoYou can compile almost anything into C. And if you can't, you can always compile it to machine code with a C compatible interface.
- 1-more 3y agoit's certainly not in the 0.19.1 compiler, but yeah you can compile anything into anything when you're the compiler writer (and he's a not bad compiler writer). Lamdera, fwiw, is storing Elm states in a database right now. It's a closed source fork of the Elm compiler. It's honestly amazing, and it may be what Jeffs the official Elm on the DB. IDK.
- iamwil 3y agoI wasn't aware this was a current capability of Elm. I didn't see it advertised anywhere on its web pages or docs. I thought maybe I missed something, or if it's something only known to those on the Elm mailing list. But it sounds like Elm is relatively easy to rewrite/reconfigure a backend to target a different language. Thanks for the lead on Lamdera, which is helpful.
- 1-more 3y ago> I wasn't aware this was a current capability of Elm. If it is it's a capability of a branch of the compiler that only exists on Evan's laptop > something only known to those on the Elm mailing list. As far as I know there is no Elm mailing list. > But it sounds like Elm is relatively easy to rewrite/reconfigure a backend to target a different language. I don't think it targets LLVM or anything, so you're gonna be on your own for that.