This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-04-23
Channels
- # beginners (8)
- # boot (87)
- # cider (16)
- # cljs-dev (1)
- # cljsrn (2)
- # clojure (27)
- # clojure-austin (2)
- # clojure-beijing (1)
- # clojure-belgium (1)
- # clojure-russia (66)
- # clojure-uk (17)
- # clojurescript (48)
- # core-typed (1)
- # cursive (3)
- # datomic (8)
- # emacs (7)
- # funcool (3)
- # hoplon (22)
- # instaparse (1)
- # jobs-discuss (4)
- # leiningen (2)
- # om (17)
- # onyx (16)
- # reactive (2)
- # reagent (7)
- # rum (2)
- # specter (1)
- # untangled (3)
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:
cool! When You have a lot, might be useful
thanks
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: https://github.com/tel/oak
It seems clojurescript doesn’t populate proper arglists. In clojure: (defn a {:arglists '([x])} [& xs]) -> (meta #’a) arglists is ([x])
@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.)
Any pointer to using local storage for offline file uploads in reagent
@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.
I wrote this up as a detailed question: http://stackoverflow.com/questions/36814302/create-a-clojurescript-namespace-dynamically-in-a-macro
@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. 😞
@bwstearns: I’d smite it and start over.
@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 (https://repo1.maven.org/maven2/)
@john.carnell: would you mind opening an issue on the chestnut github? I can't look into it right now...
@alpheus: Hah! There’s a lot of stuff out there. I’ve added it here: https://github.com/clojure/clojurescript/wiki#learning-tools