This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-10-17
Channels
- # admin-announcements (16)
- # beginners (1)
- # boot (7)
- # business (1)
- # cljs-dev (1)
- # clojure (119)
- # clojure-dev (2)
- # clojure-germany (1)
- # clojure-za (4)
- # clojurescript (73)
- # cursive (3)
- # datomic (2)
- # devcards (8)
- # editors (1)
- # events (1)
- # funcool (1)
- # ldnclj (3)
- # liberator (1)
- # off-topic (1)
- # om (52)
- # onyx (1)
- # re-frame (5)
- # reagent (28)
feel free to ping me if you have any questions, or even better create a issue there if you think your use-case could be covered in doo but is not
awesome thanks
Is the following working in your cljs repl guys?
(do (in-ns 'my.namespace) (def a 3) (in-ns 'cljs.user) my.namespace/a)
if I split, not in the do
, it returns correctly 3
works in the normal clojure repl
In ClojureScript, in-ns
is a REPL special, not a function, so you can’t call it like that. It has to be the first symbol.
And, in ClojureScript, analysis of an entire do form is done in the namespace you start off in.
ok, good, very good to know
thank you
that is why splitting the form works
To see a consequence of that 2nd point, try (do (ns foo.bar) (def a 3))
in both a Clojure and ClojureScript REPL and you will see a big difference in the result.
yes I saw already there were warnings of not found vars
In ClojureScript, (do (ns foo.bar) (def a 3))
the def
form is not done in foo.bar
but in the starting namespace.
(Thats because ClojureScript has this model where a form is analyzed (in a namespace), and then compiled.
yes I see`a` is interned in the origin namespace
(ns foo.bar)
has no direct effect, in other words, until after the do finishes completely.
Anyway, no need to dwell on it… but ClojureScript is definitely different than Clojure for this, and for how you can mix macros and fns, etc.
so actually the creation of the namespace is not visible until the do has finished
k understood
tnx again, very useful
@cfleming Cursive does not seem to like the clojurescript project sources. Always get Too many IDE fatal errors. Monitoring stopped.
after a while.
did "Report to Cursive" a couple of times .. StackOverflowError: null
not sure how many other details you get
Any Clojurescript tutorial for beginners, preferably with reagent ?
I don’t know of any beginner material for Clojurescript. Perhaps start with learning Clojure and then try to move over to Cljs when the basics are covered?
One of the most complete around is https://funcool.github.io/clojurescript-unraveled/
@bensu: thanks, its a great reference. we are trying om-next quick start as we wanted something that steps us through building something specific https://github.com/omcljs/om/wiki/Quick-Start-(om.next)
we did the clojurescript quickstart this morning, that worked great
well, we had a few issues with windows machines.... but everyone else's worked fine
I have Reagent form component - https://gist.github.com/anonymous/1f0ee193577c8ec7d09d - but Chrome Dev Tools shows no network activity when I submit the form. Teseting with http --form POST localhost:3000/register first_name='John' ..... etc.
works and adds an entry to the database. Any ideas?
Heh, cljs devtools is trending today: https://github.com/trending
Hue, I was being slightly facetious - I know what HN is, I was taking a jab at it, since it kinda baffles me that such a website can have this noticeable effect. P ;
I would love if there was an option to expand the datastructures by default, now it is often better to pprint for me.
Has anyone ever looked into running cljs on Postgres plv8? I’ve been doing some preliminary research and I don’t see any showstoppers so far… Now I just need someone to talk me out of it 😛
is there a function that takes a string like “(println ‘hello’)” and return a list of the tokens
@tavistock: is that string going to be clojure source code?
@tavistock: One idea to consider is cljs.tools.reader
, depending on what you want to do.
@tavistock: use the built in reader or follow @mfikes advice. In any case remember that Clojure is a lisp and that it's both trivial to parse and manipulate after parsing: (first (read-string (pr-str '(println "hello"))))
returns println
Yeah, avoid cljs.tools.reader
if you don’t need stuff like support for reader conditional, etc.
I knew that there was a function like that and i just couldnt get the right words to google it
Reposting from #C03S1KBA2 >> Hi, guys, I wrote a demo project which might help newcomers understand, what’s going on in clojure web applications. >> It’s simple multiplayer starcraft clone using reagent, http-kit, core.async, chord, compojure and secretary. >> Check it out http://github.com/edvorg/yet-another-craft
@thheller: Thanks, I’ll take a look. I’m pretty sure it should work there since dnolen uses it. One thing you could try is File->Invalidate caches and restart, sometimes indexes get funky and have to be rebuilt.
it might be related to me having 2 intellij windows open. one for clojurescript, one for my project
Help->Show log in Finder/Explorer, send to <mailto:[email protected]|[email protected]>