Morning!
☕
Morning!
Good Morning!
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?
(If I had time for type systems I’d probably look into Ocaml once more)
morning
Good morning!
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
Maybe I will end up learning Rust just to target wasm
good morning
Good morning! I would have tried Unison or Elixir. I think some of the ideas there would be worth exploring in Clojure
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 😅
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.
I know Elixir already, and Unison seems experimental still...
What’s the point of wasm? I see a lot of noise about it but not enough examples of successful applications.
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.
(but I'll stick with clojurescript for the time being thank you very much)
I am tempted to have a looksee at Elixir these holidays
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) 🙂
Morning
Good morning!
Fennel is fun
If you are language curious and want something usable for scripting
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.
With my limited Rust knowledge, I already made this: https://github.com/babashka/pod-babashka-filewatcher
The free Rust book is actually good.
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.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. 😛
A little bit like lein trampoline?
or actually the non-trampoline bootstrapping by lein?
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
Them Swift Playgrounds ❤️
g’day, g’day
is it actually common to provide a repl in a running production app for administrative tasks?
I’m wondering what’s the best approach to fire some ad-hoc commands from cli to change the application state; embed a nrepl?
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.
it worked very well
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:
@javahippie Maybe your team just didn't know you that well and that's the reason you left? ;))
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 😄
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?
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 ;)
It's interesting from an intellectual perspective, but from a software production perspective, I'm staying with Clojure.
@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.
Elise Huard: https://leanpub.com/gameinhaskell
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
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.
And the typical software I write doesn't require or justify that investment.
Thanks a lot for the perspective!
@javahippie "Effective programs - 10 years of Clojure" is a nice talk to watch in this context.
Obviously it's biased from the perspective of Clojure
The one by Rich? That’s one of him I have not seen, yet, bookmarked! Thanks
It's always good to find out your own perspective on it, by also watching the other arguments and communities.
@javahippie So what is your next endeavour if you're able to share it?
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 🙂
@javahippie That's great!!
Congrats
Congrats!
Thank you! But nothing really happened, yet, currently it’s only plans 😉
Thanks!
Taking a decision like that is worth congrats anyway
And that’s another reason why learning Haskell is not that high on the priority list 😄
The book isn't going anywhere and so isn't Haskell (I didn't mean that insulting to Haskell, haha)
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.)
@borkdude I was actually curious about your work on babashka/sci — do you actively use it in your day job?
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
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
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.
@borkdude this commit hook? https://github.com/borkdude/clj-kondo/blob/master/doc/ci-integration.md#pre-commit-hook
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.
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.
A reason that would be the killer argument now, which I was not aware of at the time is the emacs integration. It rocks!
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.
{: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}}
This is our config.
@slipset Awesome. I would be happy to have you on board as contributor to clj-kondo.
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.
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 😕
sudo apt-get install wbritish
why does aleph need that?
I guess it wants some words to play with.
all of ztellmans aleph libs are now up and running in circle ci 🙂
awesome!
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)
@raymcdermott .cljc?
correction ... it's correct 🙂
Elise is really good at using the right tool for the right job and good at learning new ones
Good evening
Am I evil for doing this?
(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)
Does #= work in cljs?
#= is not supported in cljs :(
cljs.user=> #=(clojure.core/inc 1)
2
I lied, you just gotta be fully qualified.Basically yes, with maybe a project-specific variation here and there
cljs.user=> #=(quote (clojure.core/filter clojure.core/even? (clojure.core/range 10)))
(0 2 4 6 8)
Ah didn't know that, thanks
I mean, both are evil. :)
I'm willing to dirty for efficiency 😉 the spirits will forgive me