Fork me on GitHub
#off-topic
<
2024-05-21
>
Casey19:05:42

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:

😝 3
p-himik19:05:55

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.

mauricio.szabo22:05:53

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?

phill22:05:44

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.

thomas07:05:31

same in the type/javascript land... update hell is real

thomas07:05:29

what I most dislike about it is that you are not dealing with 'real' problems, ie not domain problems, just artificially created problems

emccue21:05:13

Anyone have thoughts on ASDF?

Jacob O'Bryant21:05:46

definitely prefer AOEU

2
mauricio.szabo22:05:18

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 😄

zane22:05:09

I bit the bullet and just committed to using the Nix package manager.

☝️ 1
zane22:05:51

Steep learning curve, but the payoff has been worth it for me.

Piotr Roterski07:05:37

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 nix it works great and I guess you get all asdf could give you and more

☝️ 1
Stephan Renatus10:05:37

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 😅

teodorlu11:05:21

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)

Cora (she/her)11:05:14

asdf is so slow to load compared to mise. I recently switched and it's been so worth it

pesterhazy14:05:22

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.

pesterhazy14:05:06

Compared to nix, the advantage is that you don't require everyone on the team to get a PhD in Build Science

pesterhazy14:05:07

(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.)

Piotr Roterski15:05:51

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 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.

🧡 1
🎉 1
1
pesterhazy15:05:59

Thanks Piotr, I haven't tried devenv yet; I will look into it

🙏 1
emccue15:05:00

I absolutely abhor using nix on a mac

emccue15:05:16

i really gave it a try but it was super painful

zane15:05:05

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.

Piotr Roterski15:05:30

I'm on mac btw 😉 didn't run into issues but I haven't tried building docker images from devenv yet

emccue16:05:45

@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.

emccue16:05:59

the only thing that got me back to a sane state was a hard wipe of the machine

zane16:05:29

I'm sorry you had that experience.

emccue16:05:32

i spent a long time in the nix discord just trying to figure out how to build anything

emccue16:05:53

i think this sentence is the key

emccue16:05:58

> it's a matter of calling 1-3 commands to get entire env up and running. Once its working, cool

emccue16:05:07

but getting it working does require that PhD

emccue16:05:10

from someone

zane16:05:48

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).

zane16:05:53

Personally.

emccue16:05:28

back then i tried to get babashka working

emccue16:05:41

obv it has an aarch64 build but that wasn't on nixpkgs

emccue16:05:00

and thats maybe the simplest dependency out there

zane16:05:11

Sure. Packaging something that's unavailable is going to require spelunking into the Nix internals.

zane16:05:03

I imagine packaging something for use with the other tools mentioned in this thread would also be challenging (though perhaps less).

zane16:05:27

But using something that has already been packaged has been straightforward (for me!).

zane16:05:53

❯ nix shell nixpkgs#babashka
~
❯ bb --help
Babashka v1.3.190
…

💯 1
emccue16:05:20

oh yeah nix shell

emccue16:05:25

f* that entire thing

😐 1
emccue16:05:00

@U06F82LES one thing thats wigging me out looking at mise is that it also has a task runner in there

emccue16:05:04

thats...interesting

emccue16:05:08

i definitely don't want it

emccue16:05:02

also this slide on their website doesn't inspire confidence

Cora (she/her)19:05:22

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

pesterhazy19:05:30

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)

pesterhazy19:05:31

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?

Cora (she/her)19:05:59

I've used just in personal projects for a task runner

Cora (she/her)19:05:54

but yeah you don't need to use those

Cora (she/her)19:05:49

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

pesterhazy19:05:59

My main question is does mise's version of providing the right tools have any downsides compared to asdf's stubs?

emccue19:05:53

> The task runner actually looks quite useful I waxed poetic about it in another thread, but i quite like Just for that purpose

emccue19:05:04

which is what wigs me out

Cora (she/her)19:05:17

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

emccue19:05:17

"it does ASDF but better" is an easy sell

emccue19:05:34

"It does ASDF and also runs tasks and..." reeks of a lack of focus

Cora (she/her)19:05:50

mise uses asdf's plugin system, so in a way it's like a hosted language 👀

pesterhazy20:05:18

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/

pesterhazy20:05:20

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

pesterhazy20:05:05

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

Cora (she/her)20:05:40

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

Cora (she/her)20:05:11

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

pesterhazy20:05:46

mise's docs are pretty impressive I have to say

mauricio.szabo13:05:32

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 lol

Cora (she/her)14:05:13

it's pretty obvious once you're calling a few tools, especially if you compare it with not using asdf

1
mauricio.szabo17:05:34

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...