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)
@shaun-mahood did you try the patch? If you did please say so on the ticket - this is how we know we should proceed - thanks
@rmuslimov ah got it thanks for the clarification
@dnolen: Exactly what I was wondering, thanks! I'll give it a try today.
@shaun-mahood is your CA submitted?
I was overly ambitious when I started learning Clojure :)
FWIW I think the async
issue has been acknowledged as a Closure Compiler bug https://github.com/google/closure-compiler/issues/2336
Following the “building the compiler” guide on the wiki and trying to build a version of CLJS that can be used in the same manner as the CLJS quickstart, there’s nowhere that tells you that you need to build an uberjar to use it that way. I couldn’t find anything on http://clojurescript.org for like this, would it be better for me to update the wiki with a bit more info or is there another location that is more current? I would also be happy to try moving the developer of the wiki to http://clojurescript.org if that’s a goal.
Sounds good, I’ll add a bit there then.
@dnolen is there a reason why ”arguments”
is not listed as reserved in cljs.core
but is in cljs.analyzer
?
https://github.com/clojure/clojurescript/blob/master/src/main/cljs/cljs/core.cljs#L10561
or just an overlook?
OK to include it in this patch where I add await
? http://dev.clojure.org/jira/browse/CLJS-1956
updated CLJS-1956 with a new patch adding arguments
and constructor
to cljs.core/js-reserved
in addition to await
to be in parity with what the analyzer has
@dnolen I played around with the js/dirname issue in nodejs today. discovered by accident that it is defined when the main-cli-fn is executed:
(ns dirname.core
(:require [cljs.nodejs :as node]))
(node/enable-util-print!)
(println "This will be nil:" js/__dirname)
(defn init []
(println "This is the accurate dirname:" js/__dirname))
(set! *main-cli-fn* init)
@dnolen @mhuebert FWIW, there might be a slightly better way to set __dirname
and __filename
though I don’t know if it’s applicable in this case: https://github.com/anmonteiro/lumo/blob/master/src/js/cljs.js#L20-L31
uhm no one reacted last time I posted this but I recently rewrote the node.js support in shadow-build
https://github.com/thheller/shadow-build/blob/master/doc/node.md#nodejs-platform-internals
I had some headaches with Lumo and the approach I pasted solved it
left a little note to myself to see how those __filename
and __dirname
actually come into existence in node
@thheller stole it from https://github.com/nodejs/node/blob/master/lib/internal/bootstrap_node.js#L374
that’s actually how Node.js sets up __dirname
and __filename
🙂
NativeModule.wrapper = [
'(function (exports, require, module, __filename, __dirname) { ',
'\n});'
];
this isdepends on what you’re evaluating
right, what I posted is for evaluating a script
@anmonteiro thanks for that as well
I didn’t see the require
constraint above
feel free to ping me, I have gone through the way Node.js bootstraps itself a few times by now
__dirname
is actually derived from __filename
, that’s what I gathered
with path.dirname
oh right
yeah, it’s local to the module
(or script)
as mhuebert pointed out .. if you put __filename
on global and remove it afterwards, it is gone if you reach the point where you call a function
@dnolen: that ticket looks good to me, should make for predictable use of relative nodejs/require expressions which is all I am using this for.
^ looks like they’re not very amenable to fixing the regression, hrm
the alternative would be just changing the name of this variable https://github.com/clojure/core.async/blob/master/src/main/clojure/cljs/core/async.cljs#L270