This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-02-27
Channels
- # bangalore-clj (1)
- # beginners (11)
- # boot (23)
- # business (2)
- # cider (43)
- # cljs-dev (65)
- # cljsjs (17)
- # cljsrn (4)
- # clojure (144)
- # clojure-austin (4)
- # clojure-berlin (3)
- # clojure-finland (4)
- # clojure-nl (2)
- # clojure-russia (13)
- # clojure-spec (73)
- # clojure-uk (42)
- # clojured (2)
- # clojurescript (166)
- # core-matrix (4)
- # cursive (24)
- # datomic (39)
- # dirac (8)
- # hoplon (97)
- # jobs (2)
- # jobs-rus (11)
- # juxt (16)
- # lein-figwheel (8)
- # leiningen (1)
- # luminus (5)
- # lumo (46)
- # off-topic (1)
- # om (39)
- # onyx (43)
- # overtone (1)
- # pedestal (3)
- # perun (6)
- # play-clj (3)
- # protorepl (14)
- # re-frame (21)
- # reagent (25)
- # remote-jobs (1)
- # ring (1)
- # robots (4)
- # rum (13)
- # specter (5)
- # untangled (72)
- # yada (62)
interested in implementing server side of Castra in Ruby. Am I nuts? Is it possible? What do you guys think?
i was looking a bit deeper into javelin over the weekend, because i was trying to make the cell graph reloadable.
@micha i remember you mentioned something about the lack of weak references and garbage collecting cells.
do i understand well, there is no way to reset the formula cell graph by just using boot-reload
, while still preserving the stem cell state?
Is there a way to require a .hl file from the boot repl so I can play with functions in the repl?
Sorry if that’s an obvious question, I’m pretty new to boot and hoplon and have been looking through the docs. I’ve tried a few things in the boot repl and haven’t found it via some obvious attempts.
you can start a cljs repl which, when connected to some javascript runtime, will allow interacting with the state
so, once I’ve got the browser repl hooked up (and it seems to be working already), can I change ns into my .hl ns?
hmm, I just did a clojure.tools.namespace/find-namespaces-on-classpath
and didn’t find my namespaces from the cljs-repl
due to the way cljs works all your namespaces accessible from the main script will already have been loaded
for example, what would the ns be for a file with (page “chapter1-1.html”)
at the top
I don’t really know 🙂 you’d have to look at the boot fileset or with the devtools in the browser
well @dm3 thanks for your help, I feel like I’m closer. I better get some sleep now though.
you can see it in the js console if you put something like (print "hi there")
in your .hl file
I’ve found this informative: https://github.com/clojure/clojurescript/wiki/The-REPL-and-Evaluation-Environments 🙂
@micha are you sure the require
will do anything? The wiki above indicates you need to use load-namespace
/`load-file`
do people not do this often? i’m new to this so, maybe it’s not a normal thing to do?
@mudphone I think there are real advantages to keeping as much of your app as is reasonable in .cljc files. One is the JVM REPL. As cool and handy nas the CLJS REPL is, it still lacks a number of things that the JVM REPL has. E.g. vars, but also tooling.
If I’m doing a bunch of stuff that’s clearly in JVM-land, then I go with .clj rather than a .cljc with a bunch of reader conditionals.
But often there’s a bunch of purely algorithmic stuff, and I find that putting that in a CLJC doesn’t cost me anything and lets me use it in my CLJS app but still play with it in my JVM REPL.
@candera thank you, for some reason, now that you've said that, I'm wondering if I heard you say that on a podcast :)
Ha, well, I really enjoyed your show (still do). I think was my favorite, you certainly have a knack.
Is this the best way to check out cljc? https://github.com/clojure/clojurescript/wiki/Using-cljc
@micha Thanks, I just needed a reality check of whether I was being insane thinking of it. I would love to be able to start converting to hoplon from within a Ruby app, but I would rather use the RPC style than other.
@mudphone Thanks for the kind words. Glad you enjoy the show. That wiki page seems like a decent place to start.
The process is pretty straightforward, though. If you’re in the JVM, and try to load namespace foo.bar, the compiler will first look for foo/bar.clj, then foo/bar.cljc. If you’re in CLJS land, it will first look for foo/bar.cljs, then for foo/bar.cljc.
Yes! I remember seeing that load order in the errors I was generating while blindly searching for my namespace in the repl.
It can make sense to have both a foo/bar.clj and a foo/bar.cljs. I do this, for example, to provide alternate versions of a set of functions for reading files depending on whether I’m running in Node or the JVM. But I can’t think of a reason to have a .cljc and either of the other two. And of course you can use reader conditionals in your .cljc to get different code depending on which context you’re in. That’s handy from time to time, but I find myself staying away from writing too much code like that.