Fork me on GitHub
#calva
<
2023-04-23
>
cmdrdats22:04:25

aww, I just found the 'evaluate and replace' command in calva and was loving it (until the # elision when too deeply nested) - and now I updated calva (in hopes of fixing the elision) and the command is gone?

cmdrdats22:04:19

aha, nvm - it's because on restart, it wasn't connected to repl anymore (obvs)

pez05:04:26

What elision would be fixed by updating Calva? I don’t recall having fixed anything like that (nor that something is broken there). 😀

cmdrdats06:04:33

Oh, when you evaluate form in repl and replace, if the data structure is to deep it replaces the paths with just # - which makes sense in the repl, but less so in evaluate and replace (the structure is broken)

cmdrdats06:04:54

I was just being hopeful with the update 🙈

pez06:04:06

Haha, well, it’s a good point. However, evaluating something and replace could still run into an infinite sequence. It’s not obvious what a fix would be like. A clumsy workaround might be to 1. toggle off pretty printing off 2. evaluate the form 3. copy the latest evaluation results 4. paste 5. replace the current form with pretty printed 6. toggle pretty printing on With Joyride you could string it together to one command.

pez06:04:38

Also, reminds me, you are not a never-nester? 😃 https://youtu.be/CFRhGnuXG-4

pez06:04:32

(Doesn’t apply to data structures, I know, I just got reminded about it.)

cmdrdats07:04:45

true - guess then it's just 'git gud, scrub' - would be cool if there was a version where you can accept the risk and expand fully.. not a trainsmash

cmdrdats07:04:26

hah, I do prefer less nesting, yes, though definitely don't have a hard limit.. mostly I build a little function that rewires pasted hiccup (massively nested html components) and automatically calls some tailwind helper functions (to build the css classes for colours dynamically instead of the maddening mess) - and so single pass that until I pull it into various functions and what