Fork me on GitHub
#cljs-dev
<
2022-01-26
>
quoll02:01:29

I have changes that I think are appropriate for submitting the cljs.math changes. Is there a particular Jira format I should follow to create a ticket for this, please? (e.g. description of problem, alternate approaches, etc?)

quoll02:01:13

Also, should I be concerned that “master” is failing 1 test?

dnolen05:01:58

the failure was spurious - for things which are about Clojure parity, don't need much expository justification

dnolen05:01:57

(unless it's in the domain of things which are hard/strange to implement due to fundamental design choices)

dnolen05:01:11

but I don't think that's an issue in this case

quoll12:01:54

Thank you. I was hoping that was the case 🙂

quoll12:01:00

Also, should I put cljs.core/abs in this as well?

borkdude12:01:08

Is there a reason not to call it clojure.math instead of cljs.math in CLJS as well? I know that namespace resolution is going to take care of it, but still? Probably a minor thing.

quoll12:01:32

well, I was putting it next to cljs.core

quoll12:01:09

In the same directory

borkdude12:01:21

cljs.string isn't a thing in CLJS, but clojure.string is

quoll12:01:00

oh, well that’s a good precedent to move it then

dnolen14:01:09

I agree w/ clojure.math as one less bit of friction when writing portable stuff

dnolen14:01:13

re: REPL testing, @quoll is testing CLJS clojure.math via Socket REPL which is a neat trick - we should do some basic REPL regression tests following that pattern

borkdude15:01:48

I set that up initially, nice to see it's still begin used :)

borkdude15:01:49

you could probably do without the socket stuff and use a non-network stream instead, but I basically copied this from tests I already had for babashka's pREPL and then hooked up the CLJS node REPL instead

quoll15:01:13

I was thinking about changing away from a socket, but I’ve been focused on the tests themselves 🙂

borkdude15:01:45

well, it works, 🤷 :)

quoll15:01:49

What’s the engineering expression? “If it’s working, take it apart and fix it”

😂 5
fogus (Clojure Team)17:01:27

I think most of the time yes, but this allows non-map-but-conjable things to be in that trailing position also. That's not documented except in code. 🙂

dnolen18:01:35

ah, ok - will preserve that then

👍 1
fogus (Clojure Team)18:01:01

happy to help however i can

Alex Miller (Clojure team)17:01:25

I'm not sure that I'm fully understanding your question - are you asking why it's not just passed as is rather than being conj'ed into an empty map?

dnolen18:01:05

@alexmiller yes it appears it is copied again into a new map?

dnolen18:01:38

since it already is a map why not just iterate over it and skip the map copy step?

Alex Miller (Clojure team)18:01:41

yeah, so that's the answer fogus put in the thread

quoll19:01:45

I’ve created https://clojure.atlassian.net/browse/CLJS-3347 and attached a patch. This includes: • the new namespace • an abs function in cljs.core (moved out of math) • tests executed by a socket prepl

👍 2
🎉 2
quoll21:01:49

To be clear, the socket prepl was written by @U04V15CAJ (thanks Michiel!)

❤️ 1
borkdude22:01:23

Stellar job Paula!

thanks2 1
quoll19:01:10

Please let me know what changes are needed, and I’ll try to address them as soon as I can