Fork me on GitHub
#clojure-nl
<
2020-03-31
>
robert-stuttaford06:03:31

really hope you get funded @borkdude 🙂

❤️ 4
Mno07:03:38

G'day Gentlepeople

thomas07:03:04

Koot en Bie are fantastic

niels09:03:47

are you guys seeing the Clojure on the Desktop thread on hackernews

tvaughan13:03:34

Could you also use https://github.com/gluonhq/substrate to compile to a native executable?

tvaughan13:03:23

> It uses the https://www.graalvm.org/ GraalVM native-image tool to compile the required Java bytecode into code that can be executed on the target system

borkdude13:03:24

think so yeah, maybe suggest it in #cljfx

👍 4
niels09:03:29

hey i made a twitter, let me follow you

niels09:03:52

the people in the thread are really digging into it, and the author is responding to everything

niels09:03:59

I'd love for there to be an alternative to memory hungry electron apps

borkdude09:03:05

join #cljfx if you want to know more 🙂

niels09:03:21

of course you're already there :')

niels09:03:28

I'm currently threequarters way through re-writing a clojurescript project into elm

borkdude09:03:11

how do you like that so far

borkdude09:03:44

btw I see you're dabbling with Rust, I've also started doing that, quite fun (https://github.com/borkdude/analyze-reify)

🆒 4
kwrooijen09:03:45

Re-writing into Elm? I'm curious about the reason for doing that

niels09:03:43

It's a sideproject that I don't have a lot of time for, and everytime I took a break (from the cljs code) it took me very long to get back into it. Thought I'd try elm, can't say much yet because I've been going at it for only two weeks

niels09:03:14

I've built up a significant amount of technical debt in two weeks, so soon we will see the 'power' of refactoring in elm

borkdude09:03:36

Elm is cool, imo, but it feels a bit boilerplatey compared to CLJS. Also the JS interop is a bit tedious. But you get more safety in return. Trade offs 🙂

niels09:03:39

wasn't able to debug the cljs code effectively enough (lack of browser knowledge)

borkdude09:03:44

I recently listened to a podcast where someone discussed ReasonML vs Elm. ReasonML is general purpose, whereas Elm is really written for one thing: web apps. But the JS interop in ReasonML is a bit more pragmatic (less safe, arguably).

niels09:03:15

yeah there is a ton of boilerplate, and the elm guy hates cookies which is making some authentication stuff kind of hairy

kwrooijen09:03:16

I worked with Elm at my previous job. It's nice how it catches pretty much every exception. But the biggest hurdles are re-usability and interop (like @borkdude said). One thing I really dislike about Elm is that it's just a "bad" Haskell for the frontend. After Elm I tried Clojure and was very happy 🙂

niels09:03:31

was that at driebit?

niels09:03:54

ok, I thought they were the only elm factory in the netherlands

kwrooijen09:03:55

I worked at Truqu

niels09:03:59

oh yeah there you go

niels09:03:27

I worked with michel rijnders for a year

kwrooijen09:03:44

I worked with him for one month haha

niels09:03:47

ask me if I like elm again in a couple months

👍 4
borkdude09:03:10

@nmdrenard are you still doing Haskell with michel rijnders?

niels09:03:24

during the day I'm writing Java again, but I'm still writing a lot of haskell in my free-time

kwrooijen09:03:35

You're working with Michel right now?

niels09:03:41

not since november

niels09:03:48

but it was a great pleasure to work with him

kwrooijen09:03:09

Couple of friends of mine are working with him, which is why I asked haha

🙂 4
borkdude09:03:13

@nmdrenard another rust experiment (+ clojure all combined into one native binary): https://github.com/borkdude/clojure-rust-graalvm-native

niels09:03:53

I have no idea what to expect from that github title

borkdude09:03:02

Imagine you have a Clojure JVM program, but you want to call a Rust library. Do you get that part?

borkdude09:03:16

You can do native calls using Java JNI

niels09:03:29

oh that's really interesting actually

niels09:03:34

I'm trying to find the part where you call rust

borkdude09:03:44

This goes one step further: it compiles that entire JVM program into an executable, including the Rust part

niels09:03:38

that's the same link

niels09:03:22

ah, I should have RTFM, it's very clearly explained you use JNI

borkdude09:03:17

@nmdrenard To close off, another Rust experiment. Calling a Clojure interpreter (not compiler) as native library, from Rust: https://github.com/borkdude/sci/blob/master/doc/libsci.md#using-libsci-from-rust

borkdude09:03:13

tl;dr, this is how the invocation of the Rust program looks like:

$ libsci/target/from-rust "(require '[cheshire.core :as json]) (json/generate-string (range 10))"
[0,1,2,3,4,5,6,7,8,9]

niels09:03:51

that looks so weird haha

kwrooijen09:03:10

Would be interesting to write scripts in clojure for Rust apps. Probably would be cool for games

borkdude09:03:11

that looks weird indeed aye 😉