Fork me on GitHub

how do you properly read a bigdecimal from transit in javascript? #object[Object [TaggedValue: f, 50]] isn’t so easy to work with.


@dpsutton interesting, could you give an example


@leontalbot: i was thinking something like this:


and then just map turn-on-if-necessary across your data structure


cool! When You have a lot, might be useful simple_smile


the syntax is way off. i'm new to destructuring so i'm looking into it


i'm being dumb with the get-in


I’ve got an early OSS project, a component system a la Elm built atop Quiescent. I’m not yet ready to think of it as post alpha in a number of ways, but I’d love feedback:


It seems clojurescript doesn’t populate proper arglists. In clojure: (defn a {:arglists '([x])} [& xs]) -> (meta #’a) arglists is ([x])


but in clojurescript, is ([& xs])


Is it possible to create a namespace in a macro in clojurescript?


@alpheus: I think deviating from using plain ns forms at the top of namespace-dedicated source files is likely to result in various challenges owing to expectations of other parts of the system (as well as tooling).


I'm pretty sure you're correct. I wonder if there's something in cljs.analyzer.api that might make it possible though.


At compile time, my program gets information about functions we need to create via an rpc call to another system.


I know how to create those functions in a macro, but unfortunately they'd be in the namespace of the file that uses the macro.


So I have to create a file for each namespace I expect to create, and put a single macro invocation in that file. Kind of tedious.


I mean, the only reason for those files is to create a namespace. I don't know any other way to create a namespace, and realize it may not even be possible or desirable in Clojurescript.


@alpheus: Interestingly, if you try an experiment where you introduce a new ns form in the middle of a file, things appear to work. (You get analysis warnings in JVM ClojureScript if you attempt to use symbols from that namespace, but the behavior is correct. OTOH, things work cleanly in bootstrap ClojureScript for some reason—no warnings are issued.)


I've noticed that. I can also use the ns form to create namespaces in the cljs REPL


Any pointer to using local storage for offline file uploads in reagent


Introducing new ns forms in a file was my fallback approach.


@alpheus: I think you are right in that the issue appears to be related to the analyzer. Beyond simple experiments here and there, I don’t know what the issues and pitfalls are.


It's probably more trouble than it's worth, but now I hate to give up without understanding it.


@alpheus: A couple of clarifications on your SO: 1. (special-symbol? ’ns) yields true in ClojureScript, but false in Clojure. In other words, since the ns form is special in ClojureScript and a macro in Clojure, with respect to syntax-quote your macro would need to be written

`(do (~’ns …
in order to expand properly in Clojure. You are right about ns being treated specially at compile time. It is not because it being in a top level form at the top of a file, but because it is a special form in ClojureScript. 2. Even with that, single-pass analysis of a do form hosting an ns form and a def form will result in the def form being applied to the namespace you evaluate the do form in, rather than the namespace you want things to be in. (This is a difference between ClojureScript and Clojure).


Sorry to repeat a question here from #C0E1SN0NM, but there are a ton more people here. Is a ~30 minute init time for cljsrn normal? The log says Relax, this takes a while... and the ...s are making me wonder what order of magnitude a while is supposed to indicate.


@bwstearns: approximately 5 minutes is normal


@mfikes: I have a case where it's now running up against an hour. Anyone have any suggestions for something useful to do with this state before I kill it and retry?


@mfikes thanks for the clarification. I'll confess that I was using the term special rather casually, and I didn't even know special-symbol? existed.


@bwstearns: Perhaps to a ps to see what’s up.


@alpheus: As you can see, one real challenge is the fact that a macro returns a single value, and the need to use a do, ns, defn pattern. 😞


I didn't get that at the first reading, but I do now. Thanks again.


Hm. ok npm's been running for an hour.


@bwstearns: I’d smite it and start over. simple_smile


@mfikes: thanks lol. I was equally cautious of killing it right before it was done and sitting around like a dope for another hour lol.


@bwstearns: Right. Yeah. 5 minutes is normal. If you try again and reach the 10-minute point, I’d look into making sure you have the needed version of Node, etc.


I have 4.1.1, not sure what the current version is but 4.1.1 is within the stated requirements


Ah, but I think I found the culprit. My network in this building is atrocious. It probably killed the connection at a place that didn't have a way to fail or retry so it just ended up waiting.


And after 5 more tries I don't think I actually have a stable enough connection to init a CLJSRN project. It's comcastic!


@mfikes: it was a compound issue of a path issue with npm and the network issue just made it easy to overlook since it failed randomly.


hey anyone see this before. I am trying to start a new clojurescript project based on chestnut. I run lein new chestnut sinewave and I get the following error: Could not find artifact com.github.plexus:clj-jgit:jar:v0.8.9-preview in central (


@john.carnell: would you mind opening an issue on the chestnut github? I can't look into it right now...


How did I not know about Planck?


@alpheus: Hah! There’s a lot of stuff out there. I’ve added it here:


Bye bye #!/bin/bash, it was nice knowing you.