This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-04-18
Channels
- # admin-announcements (3)
- # arachne (8)
- # beginners (55)
- # boot (51)
- # cbus (1)
- # cider (15)
- # cljs-dev (5)
- # cljsrn (8)
- # clojure (203)
- # clojure-austin (2)
- # clojure-belgium (12)
- # clojure-boston (6)
- # clojure-czech (47)
- # clojure-dusseldorf (14)
- # clojure-estonia (1)
- # clojure-greece (42)
- # clojure-japan (2)
- # clojure-poland (4)
- # clojure-russia (97)
- # clojure-sg (5)
- # clojure-uk (41)
- # clojurescript (122)
- # code-reviews (4)
- # component (3)
- # core-matrix (19)
- # cursive (25)
- # datomic (16)
- # devcards (24)
- # editors (6)
- # euroclojure (1)
- # hoplon (88)
- # immutant (3)
- # incanter (4)
- # jobs (5)
- # keechma (1)
- # luminus (1)
- # om (44)
- # onyx (22)
- # parinfer (3)
- # planck (1)
- # proton (3)
- # re-frame (5)
- # reagent (30)
- # ring (2)
- # spacemacs (1)
- # untangled (92)
- # yada (1)
does ClojureScript 1.8.x support direct linking from Clojure 1.8 when compiling to JavaScript ? Is it enabled by default or is it a compiler option ?
Direct linking is a compiler option in general, so I imagine it would be the same for running the CLJS compiler
https://github.com/technomancy/leiningen/blob/master/doc/TUTORIAL.md#setting-jvm-options
@danielcompton: thanks.
Does anyone have any thoughts on this core.logic
problem: http://stackoverflow.com/questions/36659440/using-core-logic-to-make-a-simple-matching-function/36667866#36667866 ?
@urbanslug: are you trying to figure out how to setup your project?
@martinklepsch: No, there’s an existing project that I want to work with certain cljs features such as a repl and reload in the browser
Which I lack I want to see how I would go about in adding this to an existing project that lacks them.
@urbanslug: For boot you could check out these articles: https://github.com/bhauman/lein-figwheel/issues/174 https://adambard.com/blog/i-finally-get-boot/ . I haven’t tried boot yet, but it will depend on whether you want to use figwheel, or the more boot-ish boot-reload. Here’s a sample https://github.com/adzerk-oss/boot-cljs-example (warning: i did not pull and try it, it just looked like a repo for almost exactly what you want).
@urbanslug: I made this template which sets up repl + reloading for you https://github.com/martinklepsch/tenzing — maybe it helps to look at the output of the template as if it's an existing project.
is the figwheel lein template outdated? i noticed it generates project.clj with really old clojurescript version
and it includes core.async like this:
[org.clojure/core.async "0.2.374"
:exclusions [org.clojure/tools.reader]]
why the exclusion of tools.reader?
looks like there was a dependency problem: https://github.com/bhauman/figwheel-template/commit/fa8326ad7cc317c216b194b70833f6d1daf5304f . Unfortunately there isn’t any information along with the commit =/.
if i remove the exclusions it still works
though i am only mucking around with a hello world type app
yeah, i though its only for om too
i’m using reagent
actually when i ran the template it created it with an 0.x version of cljs
i bumped clojure and clojurescript to 1.8 and it seems to work fine
let me dig through bash history
hope i can find it
@bojan.matic: yeah thats wrong, you may have a locally installed figwheel template that is really old
@bojan.matic: Chestnut is a figwheel-based template with a reagent option that’s pretty up-to-date https://github.com/plexus/chestnut
this is the command i ran lein new figwheel maxi-clj -- —reagent
@bhauman: Is that "{{#om?}}” at the end a leiningen reader conditional? I’m having a little difficulty googling for it
@banashark: that is a lein template conditional tag
i’m sorry, how do i look into maven repository? i’m new to the whole jvm thing
not sure what i should find in there
bojanmatic at Bojans-MacBook-Pro in ~/.m2/repository/lein-figwheel/lein-figwheel
> ls
0.2.3-SNAPSHOT/ 0.5.0-6/ 0.5.2/
i don’t have that folder
> ls | grep figw
figwheel/
figwheel-sidecar/
lein-figwheel/
oh wait, i’m so sorry
it was generating it with 1.7.228
i guess at first i misread it before changing to 1.8
@bhauman: thanks for the help, and thank you for making figwheel
its working awesome
@erichmond: Using boot for everything, it rules!
@erichmond: if you just want to get a feel try tenzing https://github.com/martinklepsch/tenzing :)
@erichmond my experience: boot is totally rad. making new things that work with boot is definitely easier than making new things that work with lein, but the fact that a lot of libraries/plugins/whatever assume you’re using lein introduces some challenge
is there a reason there is no readline functionality in figwheel repl or is my terminal or something broken? I’m using iterm2 on os x
for example, with cljs in lein, there’s a lot of consensus around figwheel and it’s easy to discover and set up
@bojan.matic are you using rlwrap?
i’m stupid, i thought having rlwrap installed made it magically work, starting the repl with rlwrap lein fighwheel
solves it
thanks!
no problem! @bojan.matic @erichmond
I just wrote a library, how do people usually generate an api from the source code (public functions w/comments)?
@iwankaramazow: https://github.com/weavejester/codox << work for you?
@bvulpes: should work for me, thanks!
@martinklepsch: Hmmm that uses lein
Heh I’m in a weird situation in which I suspect boot is unable to compile/find my cljs files but can’t find my clj files.
@urbanslug tenzing is a lein template for a boot based project
you can’t use eval in clojurescript?
@amonks: @urbanslug you can even use boot-new to generate the project yet but I've been to lazy to update the readme
@bojan.matic you can in bootstrapped clojurescript
is not the figwheel repl bootstrapped?
cljs.user=> (eval '(+ 1 2))
WARNING: Use of undeclared Var cljs.user/eval at line 1 <cljs repl>
#object[TypeError TypeError: Cannot read property 'call' of undefined]
while on the topic, is being self-hosted required for a language to have eval capabilities? how does CPython have eval and exec without being self-hosted?
@bojan.matic: not necessary to be self-hosted to have eval
@dnolen: so why does only bootstrapped clojurescript have eval?
> ClojureScript can now compile both its analyzer & compiler w/o errors. Can eval non-trivial ClojureScript exprs from within the JS host.
i know i’m lacking in cs background, where can i read more about this stuff?
@bojan.matic: because it meant writing less code - just re-using the compiler that we already have
oh, ok - thanks!
Structure & Interpretation of Computer Programs, Essentials of Programming Languages, Lisp in Small Pieces, Little Schemer all have toy and less toy interpreters
@dnolen: thanks!
Q. for all of you fine CLJS folks: when compiling a ClojureScript app, is it possible to target specific JS compilers to potentially avoid the need to include Google’s Closure lib?
Ex. case would be writing a CLJS app on top of Electron or some other compiler-specific app framework.
@rain_omen: gclosure and electron are not mutually exclusive, you can make it work together
@darwin: for sure. And I have. I’m mostly just wondering if the overhead is necessary.
CLJS runtime is built on top of google closure library, and the compiler generates code for it, IMO there is no chance to easily remove that dependency
Ultimately not a huge deal. Asking mostly as a curiosity at this point. “overhead” was perhaps too strong of a word choice in my last message there.
I think “script size” was more what was floating in my head. Then again, for something that’s a distributed as a “native” app, that wouldn’t be much of an issue either.
sure, people usually don’t bother to use advanced optimization when targeting nodejs and similar
if you made the effort, dead code elimination and namespace flattening done by google closure compiler should give you good results
i'm having an issue with including google analytics tracking script if it is loaded after my clojurescript code. basically it tries to call a.handleEvent(b) where 'a' is an anonymous function in closure's google events.js after completing an ajax request using cljs-ajax's ajax.core/GET. i'm not really able to tell much more from the minified code, and this is only in safari and firefox with advanced compilation. i can fix this by not calling my tracking script async but i'm wondering why this is happening?