Fork me on GitHub
#clojure-europe
<
2021-12-07
>
RAMart06:12:08

👋 🥐

dharrigan07:12:05

Good Morning!

otfrom09:12:21

anyone here have suggestions on what libs to use to create and distribute desktop apps for Windows/Mac/Linux?

ordnungswidrig09:12:33

Anything but electron.

Ben Hammond10:12:27

why go desktop app rather than full fat js/react/material-ui?

otfrom10:12:44

it has to run on local machines and not over the network

borkdude11:12:31

ClojureDart? ;)

🙌 1
cursork11:12:24

https://github.com/phronmophobic/membrane was mentioned at some point somewhere - not tried it, so can’t actually vouch for it though.

😄 1
lread13:12:27

For some good fun, I am dabbling with PRs to https://github.com/phronmophobic/membrane.termwhich is written with membrane. @U7RJTCH6J is a very cool guy, drop by #membrane and I'm sure he'll answer any questions you might have.

❤️ 1
orestis15:12:01

Cljfx would be the native Clojure/Java way I guess

👍 1
ordnungswidrig09:12:26

Good morningÜ!

orestis10:12:45

That's way too broad @otfrom - depending on the software budget, deadlines, target machine specs etc.

otfrom10:12:32

I'm writing it. I don't have much budget. I'd like it to be clojure and on the jvm or other clojure compatible target

reefersleep10:12:42

(->> "good morning"
     seq
     shuffle
     (apply str))
=> "noro ongdmgi"
The first bit seems like “no” pronounced with extreme Aussie slang. The second part seems more like a Japanese person exclaiming “Oni!“, whilst being strangled by said oni.

simple_smile 2
genRaiy12:12:47

godmon ringo

simple_smile 2
genRaiy12:12:57

a better drummer

genRaiy12:12:11

:drum_with_drumsticks:

mccraigmccraig13:12:02

ooirggonn md - possibly a doctor ? 🩺

simple_smile 2
🤒 1
borkdude13:12:28

nnig oormdog doge

simple_smile 1
lread13:12:17

moon dog ring 🌔 🐶 :telephone:

genRaiy14:12:43

you're changing the rules now ... two spaces is heretical :)

lread17:12:48

Who knows, I might add punctuation soon, crazy madcap that I am!

💀 1
lread17:12:42

But “moondog ring” works nicely too. If you want a valid entry.

😝 1
reefersleep14:12:19

Anyone know of a good way to reload environment variables into a running Clojure process? It’s the main thing I’m missing in order to avoid having to restart the REPL atm.

borkdude14:12:17

the env in the JVM is immutable

djm14:12:33

I think you could hack it, depending on what you mean. In Java, you have to use reflection to change environment variables for the current JVM process, so presumably you could do that in Clojure. But what does “reload” mean? (I.e. what’s being loaded? Did you update your shell config, and want the new variables from that, or..?)

reefersleep14:12:59

updated the shell’s env vars, want to put those into the JVM

reefersleep14:12:26

@borkdude I did see a Java hack for it, guess it can be ported to Clojure, thought I’d ask first, though 🙂

borkdude14:12:26

It is a hack and this won’t work for some cases

reefersleep09:12:09

good to know 🙂 Felt like pursuing it, but I’m not an interop savant, and the java code looked annoying in that regard

djm14:12:32

You could write something to launch a new shell process, read the environment variables, and set them in the JVM

reefersleep09:12:18

This is what I wanted to do with the hack.

reefersleep09:12:28

I see it as doable, but fraught with error

reefersleep09:12:36

which is probably why people don’t do it 🙂

djm14:12:27

But things that have already used those values won’t change, so I guess you could end up with some confusing behaviour

simongray14:12:13

finally getting around to trying out libpython-clj

simongray14:12:24

so far pretty smooth

borkdude14:12:37

@raymcdermott TIL, clojure.core.specs.alpha also works with #babashka  (via spartan.spec).

user=> (require 'spartan.spec)
nil
user=> (require '[clojure.spec.alpha :as s])
nil
user=> (require '[clojure.core.specs.alpha :as cs])
nil
user=> (s/conform ::cs/defn-args '[foo [x y z]])
{:fn-name foo, :fn-tail [:arity-1 {:params {:params [[:local-symbol x] [:local-symbol y] [:local-symbol z]]}, :body [:body []]}]}

genRaiy14:12:29

nice ... what is spartan.spec?

borkdude15:12:41

it's a drop-in alternative for clojure.spec.alpha which isn't in babashka, since it's alpha

borkdude15:12:53

it defines the clojure.spec.alpha namespaces when you require it

genRaiy15:12:31

does it also work for CLJS? I could look all this up but just since you're here

borkdude15:12:44

if spartan.spec works for CLJS?

genRaiy15:12:18

you might remember that the core specs are missing at runtime for CLJS

borkdude15:12:39

yes, but those are the specs, not spec

borkdude15:12:49

so spartan.spec wouldn't solve that problem

borkdude15:12:04

the clojure.core.specs work with spartan.spec out of the box

borkdude15:12:41

spartan spec only rewrites clojure.spec.alpha , not clojure.core.specs.alpha

genRaiy15:12:17

ah, so the unform bug is still there for example

borkdude15:12:53

is that bug in clojure.spec itself or in a spec in the core specs?

genRaiy15:12:30

the latter

genRaiy15:12:02

changing the question ... why you would include spartan.spec rather than clojure.spec.alpha - it seems like a distinction without a difference

genRaiy15:12:39

ie you still end up with alpha software

borkdude15:12:33

because the regular clojure.spec.alpha isn't compatible with babashka. It contains things like clojure.lang.Compiler/demunge which is a too low level thing to expose in babashka

genRaiy15:12:20

so the spartan.spec is well. more spartan 🙂

borkdude15:12:52

indeed, you get it :)

borkdude15:12:15

Also I wrote it when bb was only a few months old. It didn't yet have protocols. So I rewrote everything using regular maps ;)

borkdude15:12:41

I think if I would do it again, then I would have to only make a few changes

borkdude15:12:14

Wow:

/tmp/spec.alpha (master*) $ bb -cp src/main/clojure -e "(require '[clojure.spec.alpha :as s]) (prn (s/valid? int? 1)) (require '[clojure.spec.gen.alpha :as gen]) (gen/sample (s/gen int?))"
true
(0 -1 0 -2 -7 -1 -1 0 -7 -1)

borkdude15:12:56

I'll make a proper fork tomorrow, it seems I can almost drop spartan.spec

genRaiy17:12:39

:male-cook::skin-tone-3: 😘

p-himik22:12:47

I just got my visa to the Netherlands, first time. In case anyone there wants to meet some time between December the 13th and January the 12th, please let me know. Oh, and also if you have some definite suggestions about places one must visit and activities one must try while there.

🎉 4
borkdude08:12:10

Also check out #clojure-nl

👍 1