clojure-europe

For people in Europe... or elsewhere... UGT https://indieweb.org/Universal_Greeting_Time
slipset 2020-12-09T06:26:37.109900Z

Morning!

RAMart 2020-12-09T06:35:20.110100Z

orestis 2020-12-09T07:16:08.110300Z

Morning!

dharrigan 2020-12-09T07:18:56.113100Z

Good Morning!

orestis 2020-12-09T07:19:27.114Z

I haven’t learned a new language for some time now (after Clojure, who cares, right?) - but now I got the itch again. I don’t have time to go into elaborate type systems so I was thinking some small, fast and dynamic language like Lua, probably with Fennel on top. Are there any other worthy contenders in that space?

orestis 2020-12-09T07:20:08.114800Z

(If I had time for type systems I’d probably look into Ocaml once more)

thomas 2020-12-09T07:32:07.115Z

morning

plexus 2020-12-09T07:38:48.115200Z

Good morning!

plexus 2020-12-09T07:40:46.116500Z

If I would pick up another language again it would probably be OCaml or Rust, but it seems that OCaml doesn't have nearly the kind of ecosystem we're used to, and I don't have enough of a use case for systems programming at the moment to learn Rust

plexus 2020-12-09T07:41:13.116800Z

Maybe I will end up learning Rust just to target wasm

simongray 2020-12-09T08:09:11.118900Z

good morning

2020-12-09T08:09:14.119Z

Good morning! I would have tried Unison or Elixir. I think some of the ideas there would be worth exploring in Clojure

orestis 2020-12-09T08:15:38.125300Z

I don’t think I have the energy to go into Rust at this point, perhaps when I have a compelling use case and some more proper sleep 😅

simongray 2020-12-09T08:16:25.126400Z

I currently have no interest in making the kind of low-level Code that Rust is used for. I do see the appeal of Rust as a C-replacement, though. Elixir (or Erlang) are probably at the top of my list too. I saw one talk about Unison and it sounded interesting, but I’ll wait until it’s more mature. Also, I think I would experience Heroin-like withdrawal symptoms having to move away from Lisp syntax for a longer period of time, so that’s one reason why I’m sticking with Clojure.

orestis 2020-12-09T08:16:28.126600Z

I know Elixir already, and Unison seems experimental still...

orestis 2020-12-09T08:17:06.127800Z

What’s the point of wasm? I see a lot of noise about it but not enough examples of successful applications.

plexus 2020-12-09T08:26:23.129600Z

I think it makes sense, the web is already being used as an application delivery platform, but the compile target is a (glorified) scripting language. If you're really just using the browser as a VM that people can load applications into, then you might as well expose a low level compile target.

plexus 2020-12-09T08:27:22.129900Z

(but I'll stick with clojurescript for the time being thank you very much)

dharrigan 2020-12-09T08:29:25.130300Z

I am tempted to have a looksee at Elixir these holidays

dharrigan 2020-12-09T08:30:07.130900Z

If you want to stick within the JVM ecosystem, I also can recommend Kotlin. I use it daily too (although minimally now, as I'm mostly focused on Clojure) 🙂

2020-12-09T08:34:15.131100Z

Morning

ordnungswidrig 2020-12-09T10:17:53.131300Z

Good morning!

mpenet 2020-12-09T10:24:06.131500Z

Fennel is fun

mpenet 2020-12-09T10:24:37.132400Z

If you are language curious and want something usable for scripting

borkdude 2020-12-09T10:28:24.133200Z

If I would invest in a new language, it would probably be Rust or Go, so I am more proficient in writing pods for babashka. Which has an immediate reward and connection to my Clojure work.

borkdude 2020-12-09T10:28:54.133600Z

With my limited Rust knowledge, I already made this: https://github.com/babashka/pod-babashka-filewatcher

borkdude 2020-12-09T10:29:22.134400Z

The free Rust book is actually good.

borkdude 2020-12-09T10:31:16.135200Z

Btw, I'm now experimenting with something:

$ bb "(babashka.deps/clojure '{:deps {medley/medley {:mvn/version \"1.3.0\"}}})"
Clojure 1.10.2-alpha2
user=> (require '[medley.core])
nil
user=>
Maybe this will make it easier to run Clojure in some contexts. E.g. merge deps.edn maps yourself and then start the JVM from bb.

1
ordnungswidrig 2020-12-09T10:38:23.137200Z

It’s interesting how you can pick up a new language when you need it to solve your problem. I had used this new MacOS language (Swift?!) to create camera device watcher which would run a script whenever my webcam would turn on. This required even hacking into some undocumented OS calls and stuff like that. But I was able to pull that of with the help of google, copy and paste, and some critical thinking. I still have no clue about that language besides that XCode was super helpful in using it. 😛

borkdude 2020-12-09T10:38:55.137300Z

ordnungswidrig 2020-12-09T10:40:03.137900Z

A little bit like lein trampoline?

ordnungswidrig 2020-12-09T10:40:16.138200Z

or actually the non-trampoline bootstrapping by lein?

borkdude 2020-12-09T10:50:28.139Z

just make your own deps.edn data using scripting and then invoke tools.deps. a workaround for some of the limitations. also works cross platform, without additional installs but java

pez 2020-12-09T11:33:46.139600Z

Them Swift Playgrounds ❤️

synthomat 2020-12-09T11:35:17.139800Z

g’day, g’day

synthomat 2020-12-09T11:35:58.140500Z

is it actually common to provide a repl in a running production app for administrative tasks?

synthomat 2020-12-09T11:37:06.141300Z

I’m wondering what’s the best approach to fire some ad-hoc commands from cli to change the application state; embed a nrepl?

dharrigan 2020-12-09T11:52:27.142300Z

I have, in the past, launched a repl on application startup, but only bound to the loopback address, on a specific port. Then, if I need to connect, I'll do a ssh port forward to connect the streams.

👌 3
dharrigan 2020-12-09T11:53:08.142600Z

it worked very well

javahippie 2020-12-09T12:35:08.143800Z

I’m feeling a little guilty, because my team bought me a Haskell book as farewell present, and I don’t really know when to get into it, not a good time right now to learn Haskell :thinking_face:

borkdude 2020-12-09T12:37:59.144300Z

@javahippie Maybe your team just didn't know you that well and that's the reason you left? ;))

javahippie 2020-12-09T12:38:44.145100Z

That would’ve been super-subconscious, the team was great 🙂 And they also gave me a bottle of good scotch, so they know me, in general 😄

javahippie 2020-12-09T12:39:23.145800Z

Maybe both gifts have to be used together, I don’t know. Is anybody here with experience in Haskell, what’s your opinion on it?

borkdude 2020-12-09T12:42:06.146800Z

I have dabbled with Haskell for a few years and even made a small app that's running on a server: https://github.com/borkdude/balcony-hs But right now I think I could have done this with babashka as well and save a couple of months time of learning about category theory ;)

borkdude 2020-12-09T12:42:32.147500Z

It's interesting from an intellectual perspective, but from a software production perspective, I'm staying with Clojure.

borkdude 2020-12-09T12:44:29.148900Z

@otfrom You have or had an author of a Haskell book at MastodonC right? When she was interviewed on a podcast, I wondered about her perspective on Haskell / Clojure and production software.

borkdude 2020-12-09T12:45:06.149600Z

Elise Huard: https://leanpub.com/gameinhaskell

javahippie 2020-12-09T12:45:15.150Z

That’s what’s keeping me back. The whole community has this intellectual mathematical aura built around them, and I am just not really interested in that. But maybe I need to drop prejudice and just get to the book over the holidays

borkdude 2020-12-09T12:46:34.151200Z

It has a mathematical elegance to it, and your software will be rock solid from a refactoring perspective, but that's also the drawback: making your code rock solid comes with more investment up front.

borkdude 2020-12-09T12:47:06.151700Z

And the typical software I write doesn't require or justify that investment.

javahippie 2020-12-09T12:47:30.151900Z

Thanks a lot for the perspective!

borkdude 2020-12-09T12:47:55.152400Z

@javahippie "Effective programs - 10 years of Clojure" is a nice talk to watch in this context.

borkdude 2020-12-09T12:48:27.153Z

Obviously it's biased from the perspective of Clojure

javahippie 2020-12-09T12:48:39.153600Z

The one by Rich? That’s one of him I have not seen, yet, bookmarked! Thanks

borkdude 2020-12-09T12:48:46.153800Z

It's always good to find out your own perspective on it, by also watching the other arguments and communities.

borkdude 2020-12-09T12:51:42.154200Z

@javahippie So what is your next endeavour if you're able to share it?

javahippie 2020-12-09T12:55:15.157200Z

I’m founding my own company right now. In the beginning I will continue doing consulting gigs to get a little money into the company, but the goal is to create and sell / rent software in the next two years and quit the java-consulting-madness. I hope that I can hire the first Clojure developer in late spring / early summer 🙂

🍾 2
👏 1
3
borkdude 2020-12-09T12:55:38.157400Z

@javahippie That's great!!

borkdude 2020-12-09T12:55:44.157600Z

Congrats

2020-12-09T12:56:23.158200Z

Congrats!

javahippie 2020-12-09T12:56:37.158600Z

Thank you! But nothing really happened, yet, currently it’s only plans 😉

javahippie 2020-12-09T12:56:51.158800Z

Thanks!

borkdude 2020-12-09T12:56:53.159100Z

Taking a decision like that is worth congrats anyway

javahippie 2020-12-09T12:57:45.159500Z

And that’s another reason why learning Haskell is not that high on the priority list 😄

borkdude 2020-12-09T12:58:10.160Z

The book isn't going anywhere and so isn't Haskell (I didn't mean that insulting to Haskell, haha)

😁 1
RAMart 2020-12-09T14:53:00.161100Z

All the best! If I can be of any help, just let me know. (Founded my company 20 years ago and went through ups and downs. Happy to share the lessons learned.)

❤️ 1
orestis 2020-12-09T15:19:24.162100Z

@borkdude I was actually curious about your work on babashka/sci — do you actively use it in your day job?

borkdude 2020-12-09T15:20:52.162900Z

We are using babashka in our dev setup as a Clojure launcher and I'm planning on using it to work around this problem: https://ask.clojure.org/index.php/9849/teams-common-dependencies-tooling-across-multiple-projects I don't want to force any of my tools upon anyone, so I'm mostly using it for my own purposes, clj-kondo as well

borkdude 2020-12-09T15:22:05.163800Z

Any significant bash script that I will have to touch will probably be re-written to babashka on a case by case basis, now that it is a part of our workflow

borkdude 2020-12-09T15:22:44.164200Z

I think one or two of my colleagues are using clj-kondo without maybe realizing it, via Calva. Other colleagues are using it consciously, but we're not yet enforcing anything on CI. It has been discussed, just haven't gotten around to it. I personally do use a git commit hook to enforce lint-free code on anything that I touch.

slipset 2020-12-09T17:39:29.167200Z

With all the fuzz around github sponsorships happening, I’m really reluctant to say this, but we’ve switched from Eastwood to clj-kondo at work.

slipset 2020-12-09T17:40:23.168300Z

Reason number one was that Eastwood was the limiting factor when it came to build-times, couldn’t get it under six minutes. clj-kondo does the job in under a minute.

slipset 2020-12-09T17:41:09.169200Z

A reason that would be the killer argument now, which I was not aware of at the time is the emacs integration. It rocks!

slipset 2020-12-09T17:41:48.170100Z

Also, the configurability which makes it possible to gradually make the linting more strict is super helpful when retrofitting clj-kondo onto an existing codebase.

slipset 2020-12-09T17:43:33.170400Z

{:linters {:unused-binding {:exclude-destructured-as true}
           :unused-private-var {:level :warning
                                :exclude
                                #{
                                  ;; used by `ardoq.utils` through var
                                  ;; dereferencing to avoid circular
                                  ;; deps
                                  ardoq.schemas/camelize-keys
                                  }}
           :consistent-alias {:aliases {ardoq.utils util
                                        ardoq.utils.request-utils request-util}}
           :unresolved-symbol {:level :error}
           :refer-all {:level :warning
                       :exclude #{clojure.test ardoq.schemas}}}
 :lint-as {liberator.core/defresource clojure.core/defn
           ardoq.test.api/deftest clojure.test/deftest}}

slipset 2020-12-09T17:43:46.170600Z

This is our config.

borkdude 2020-12-09T18:24:51.171100Z

@slipset Awesome. I would be happy to have you on board as contributor to clj-kondo.

slipset 2020-12-09T18:25:50.171900Z

I will contribute when I get an itch I need to scratch. As for now, it’s working just as I want it to. I think.

slipset 2020-12-09T18:26:56.172800Z

Problem du jour is that stock circle-ci docker images don’t have /usr/share/dict/words and so aleph doesn’t build on circle-ci 😕

slipset 2020-12-09T18:28:47.173200Z

sudo apt-get install wbritish

borkdude 2020-12-09T18:39:02.173500Z

why does aleph need that?

slipset 2020-12-09T18:48:12.173800Z

I guess it wants some words to play with.

slipset 2020-12-09T18:51:55.174400Z

all of ztellmans aleph libs are now up and running in circle ci 🙂

2
borkdude 2020-12-09T18:58:42.174600Z

awesome!

raymcdermott 2020-12-09T19:27:10.175900Z

talking of kondo ... deftest/testing ... linter is saying I'm referring it and not using it but I am ... so what am I holding wrong? (All tests pass so the test framework thinks its OK)

1
borkdude 2020-12-09T19:28:59.176100Z

@raymcdermott .cljc?

raymcdermott 2020-12-09T19:29:13.176400Z

correction ... it's correct 🙂

2020-12-09T20:23:59.176500Z

Elise is really good at using the right tool for the right job and good at learning new ones

val_waeselynck 2020-12-09T21:48:57.177Z

Good evening

val_waeselynck 2020-12-09T21:49:13.177400Z

Am I evil for doing this?

val_waeselynck 2020-12-09T21:49:52.177900Z

(defmacro evaled
  "Compiles an expression into its evaluation (which is hopefully a data structure, effectively hard-coding it).
  Can be useful for CLJS performance,
  as the computation is done statically at macro-expansion time,
  and the dependencies of the computation (e.g the Vars it uses)
  won't be used by the emitted CLJS code, giving opportunities for minification."
  [expr]
  #?(:clj `'~(eval expr)))


(comment

  (macroexpand-1
    `(evaled (filter even? (range 10))))
  => (quote (0 2 4 6 8))


  *e)

dominicm 2020-12-09T22:03:12.178300Z

Does #= work in cljs?

dominicm 2020-12-09T22:05:08.178700Z

#= is not supported in cljs :(

dominicm 2020-12-09T22:08:18.178900Z

cljs.user=> #=(clojure.core/inc 1)
2
I lied, you just gotta be fully qualified.

borkdude 2020-12-09T22:09:15.179Z

Basically yes, with maybe a project-specific variation here and there

dominicm 2020-12-09T22:09:32.179200Z

cljs.user=> #=(quote (clojure.core/filter clojure.core/even? (clojure.core/range 10)))
(0 2 4 6 8)

val_waeselynck 2020-12-09T22:24:09.179700Z

Ah didn't know that, thanks

dominicm 2020-12-09T22:46:06.181700Z

I mean, both are evil. :)

val_waeselynck 2020-12-09T23:32:13.182200Z

I'm willing to dirty for efficiency 😉 the spirits will forgive me

1