This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-05-21
Channels
- # announcements (4)
- # beginners (47)
- # cider (7)
- # clj-kondo (9)
- # cljs-dev (16)
- # clojure (8)
- # clojure-dev (33)
- # clojure-europe (39)
- # clojure-germany (2)
- # clojure-my (1)
- # clojure-nl (1)
- # clojure-norway (18)
- # clojure-uk (6)
- # clojuredesign-podcast (8)
- # clojurescript (12)
- # cursive (9)
- # datomic (24)
- # docker (3)
- # fulcro (23)
- # hoplon (7)
- # hyperfiddle (2)
- # java (5)
- # jvm (3)
- # leiningen (9)
- # lsp (6)
- # off-topic (75)
- # pathom (17)
- # polylith (21)
- # reitit (1)
- # rewrite-clj (11)
- # scittle (2)
- # shadow-cljs (57)
- # uncomplicate (6)
- # yamlscript (27)
Been thinking lately..I've been called in by a client to update an oldish spring boot project from V2 to V3. The associated "migration guide" is a dozen plus pages of breaking changes. It's pure insanity. This sort of big thrashing about in the pig sty doesn't happen on the clojure ecosystem. On the other hand I don't often get paid by clients just to do version upgrades on old clojure projects. Where as I've a steady income of maintenance work on these Java framework upgrades :thinking_face:
The good old "don't make too good of a job, lest you be out of job." :D But uncertain if it's truly the case here. There's plenty of unfortunate circumstances and/or poor decisions to go around.
I feel you. I'm currently working with Rails, and it's amazing how there are breaking changes just for the sake of it. Like, "renamed update_attributes
to update
" and other similar things.
I mean, is it worth breaking everything just to type a fewer characters? Also, in a language where people use aliases for methods (I don't really like it, but well, they do) whats the cost of keeping both versions?
Who would use software from people who have a lengthy track record of being wrong about everything? And yet that's what happens. The whole Spring / Hibernate / Lucene complex repudiates itself every 2 years and no one seems to get tired of it.
what I most dislike about it is that you are not dealing with 'real' problems, ie not domain problems, just artificially created problems
I basically use everywhere. Just don't install the "Java" and the "GraalVM" plug-ins at the same time, things go wild if you do 😄
I've recently started using https://devenv.sh/ - a convenience layer on top of nix so you get the benefits with a bit easier ramp up learning curve it works great and I guess you get all asdf could give you and more
https://mise.jdx.dev/ is an asdf alternative I’ve started using for no particular reason. or there was one, but I’ve forgotten about it 😅
I recently migrated from ASDF to Mise. I’ve been super happy with ASDF. But I’m overall more happy with Mise. • I feel that Mise’s subcommand structure is easier to understand than Mise • Mise feels faster than ASDF • Mise’s documentation is quite good. (“Learn nix” has been on my todo list for years, and I’ve not yet bit the bullet)
asdf is so slow to load compared to mise. I recently switched and it's been so worth it
I'm a big fan of asdf (or mise, which is an alternate implementation that uses the same plugins) In teams, it allows you to pin tool versions to well-known versions without using docker, which brings its own problems. No more "works on my machine". It's also an easy way to use the same tool versions in CI. Asdf is powerful but at the same time it's very simple to use, and plugins are easy to add if necessary.
Compared to nix, the advantage is that you don't require everyone on the team to get a PhD in Build Science
(I agree that it's annoying that asdf adds a 100ms pause to tool invocations – and this can add up if you're running node
or java
multiple times – so it's a good idea to investigate mise, which purports to solve this.)
Compared to nix, the advantage is that you don't require everyone on the team to get a PhD in Build Scienceyou would think that but I've onboarded on https://devenv.sh/ within a single day - and if the project is set up it's a matter of calling 1-3 commands to get entire env up and running.
I doubt it's much more to learn than reading adsf documentation, you don't need to know any of nix to use devenv.sh (I didn't), but nix is there, you can get deeper down the layer of abstraction if you need it, so this offers much bigger flexibility compared to adsf-like solutions.
With a single tool you get a replacement for:
• package managers, version managers,
• scripts (no more akward package.json scripts but you can just ensure install of bb and go from there),
• https://devenv.sh/containers/
• it allows you to run https://devenv.sh/services/
• you can generate devcontainer.json to run containerized env in vscode and/or codespace where you can auto-install vscode extensions (eg. calva )
All declaratively defined in single
devenv.nix
file - have a look at my little starter repo https://github.com/roterski/devenv-launchpad-starter/blob/main/devenv.nix where it installs clojure tools.edn so neil can access deps-new templates (can adsf do this?).
Seriously, I recommend giving it a try.
What form did the pain take? There have been a lot of improvements over the years which have made the experience rather smooth for me.
I'm on mac btw 😉 didn't run into issues but I haven't tried building docker images from devenv yet
@U050CT4HR Tools not working, builds failing, packages not being there for aarch64, the insanity you unlock the moment you want to build something yourself, the fact that there are tons of programs you just can't get there, tools being out of date, etc.
i spent a long time in the nix discord just trying to figure out how to build anything
> it's a matter of calling 1-3 commands to get entire env up and running. Once its working, cool
I would say that if you're trying to use Nix for your project build that's the case, but I haven't found it to be the case if you're merely using Nix to provide the system dependencies for your project (e.g. Java, Clojure, etc).
Sure. Packaging something that's unavailable is going to require spelunking into the Nix internals.
I imagine packaging something for use with the other tools mentioned in this thread would also be challenging (though perhaps less).
@U06F82LES one thing thats wigging me out looking at mise is that it also has a task runner in there
I mean I agree with a lot of that slide and those things always bugged me about asdf. I don't use the task runner or env var stuff in mise so can't comment on it. it feels like feature sprawl but I get how those could feel inter-related, like they're all necessary for the environment to run your project, but that criteria could spread to so many disparate things
The task runner actually looks quite useful. I've needed a language-agnostic replacement for "npm run" (or bb), which creates a unified interface to any monorepo project
Plus npm run
is quite slow (>100ms overhead)
re: env vars, that's kind of including direnv features. direnv is very useful. I guess you don't have to use it if you don't want to?
I've used just in personal projects for a task runner
but yeah you don't need to use those
and you can tell mise to use the legacy version files (.tool-versions, .nvmrc, etc) so you don't need to introduce yet another version file
My main question is does mise's version of providing the right tools have any downsides compared to asdf's stubs?
> The task runner actually looks quite useful I waxed poetic about it in another thread, but i quite like Just for that purpose
I haven't found any, but I think it does use stubs? if I had to guess I'd say they replaced the slower part of asdf's stubs, which is the recursive directory search for version files
mise uses asdf's plugin system, so in a way it's like a hosted language 👀
Looks like mise has two modes of operation: PATH and shims https://jdx.dev/posts/2024-04-13-shims-how-they-work-in-mise-en-place/
This is something I've always been unsure about. How should graphical tools like Emacs use asdf or mise?
E.g. if Emacs runs npx prettier
, which prettier is it going to pick? After all, there's no clear notion of a current directory
And, in fact, my prettier in Emacs keeps breaking because of some asdf error, and I haven't figured out what's the correct way to prevent it
yeah, I don't know how to solve that, you really need some sort of project context to set the root of the project and then have all those commands run from the root of the project. I just use visual studio code for front end work and it mostly just works
that's sort of a wider problem with emacs in general, it's multi-project and so what context to run things in at any given time is hard to make automatic. same for vim
looks like it's all documented https://mise.jdx.dev/ide-integration.html
mise's docs are pretty impressive I have to say
You know, I never even noticed that asdf
added this overhead to run the invocations. I guess for me startup time isn't that much of an issue for most things
it's pretty obvious once you're calling a few tools, especially if you compare it with not using asdf
Over time I'm seeing that I am, indeed, a "slow" programmer 😄.
I basically worked for years using node outside asdf
; then I decided to also put node on it, and honestly, never say the difference. In fact, not even after you mentioned, that I disabled the Node plug-in, kept using for a few days, I still don't see the difference (I know it exists, time node ...
does show that it's about 110ms slower).
So... yep, not that "obvious" to me, but that's probably on me...
if anyone's interested here's my follow-up report from my plunge into nix 😅 https://clojurians.slack.com/archives/C02S1GEKU4C/p1717771605910769?thread_ts=1717260722.339429&cid=C02S1GEKU4C
if anyone's interested here's my follow-up report from my plunge into nix 😅 https://clojurians.slack.com/archives/C02S1GEKU4C/p1717771605910769?thread_ts=1717260722.339429&cid=C02S1GEKU4C