clojurescript 2025-02-11

What base image are you fellas using to package your cljs node-script target app in a docker container?

I used the base node image once, but didn't actually end up using docker at all 😛

the image was fine though

Coolers, the crux seems to be that clojure is also required 🤔

well I guess depends on how you set it up. I just compiled on my main machine and put the resulting .js file into the container

mmm yea I wanted to build it inside the container 💀

well, yeah then things get a lot more complicated 😛

maybe I cheat and do it that way 😄

I suppose one of the clojure images would work. some of them already also have node installed

ye tested with the builder + node but ended up installing tons of stuff, felt kind of overkill - but cool, thanks @thheller! 🙏

Hello. How do I remove a property from a JavaScript object by its (String) name? Or what is the removing counterpart of aset? I am using Automerge from ClojureScript. Automerge provides me a "magic" JavaScript object doc which I have to modify. Automerge somehow tracks my modifications and transforms them into CRDT operations. So if I want to set a property, I evaluate (aset doc "my-answer" 42) . But how can I delete the property "my-answer" from the doc object? In JavaScript I would have to call delete doc["my-answer"];.

js-delete.

👍 1

And please don't use aset. It's for arrays only. You can use unchecked-set. It's marked as internal but it's widely used so isn't going away. Alternatively, goog.object/set but it requires an extra item in :require.

Thank you! goog.object/set does not work. I suspect it cirmumvents the automerge magic.

I will try unchecked-set

Are you sure it wasn't just an issue with testing? This is its code, there's nothing in it that shouldn't work:

function set(obj, key, value) {
  obj[key] = value;
}

ok, thank you for the info, I will try again

goog.obj/set and js-delete both work fine 😄

👍 2

claude likes reframe.

😄 1