This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-02-11
Channels
- # announcements (1)
- # beginners (84)
- # boot (325)
- # cbus (1)
- # cider (13)
- # cljs-dev (1)
- # cljsjs (1)
- # cljsrn (15)
- # clojars (8)
- # clojure (221)
- # clojure-czech (2)
- # clojure-ireland (8)
- # clojure-madison (28)
- # clojure-poland (176)
- # clojure-russia (111)
- # clojurebridge (7)
- # clojurescript (75)
- # community-development (70)
- # conf-proposals (19)
- # core-async (29)
- # css (12)
- # cursive (66)
- # datavis (15)
- # datomic (61)
- # devcards (15)
- # dirac (2)
- # editors (13)
- # emacs (9)
- # funcool (7)
- # hoplon (13)
- # jobs-discuss (5)
- # ldnclj (39)
- # ldnproclodo (1)
- # lein-figwheel (3)
- # leiningen (21)
- # liberator (26)
- # off-topic (12)
- # om (153)
- # onyx (168)
- # parinfer (165)
- # proton (21)
- # quil (5)
- # re-frame (58)
- # reagent (4)
- # ring-swagger (12)
- # spacemacs (3)
- # yada (120)
Does :target :nodejs
just add #!/usr/bin/env node
to the top of output files? Is that all it does?
@zentrope it does a bunch of other things to init, you can check also in Lambda-x/replumb
Ok let me fetch the link for you
@zentrope https://github.com/Lambda-X/replumb/blob/master/src/cljs/replumb/nodejs.cljs#L3
@richiardiandrea: Adding that directive broke things for running in Electron, mainly the shebang line.
@zentrope Are you targeting nodejs or electron? I am not familiar with the latter..
Well, it’s all new to me. I’m targeting Electron, in which you can access nodejs libraries.
Electron also has two contexts, main (for running native code, like, say, opening a TCP socket), and renderer (for basic web page stuff).
The issue I’m having is that ‘<!’ in core.async eats 100% of the CPU in the renderer (but is no prob in the main process).
Mmm...that a whole new story to debug, no idea...really
I would try to exclude causes one buy one, maybe leaving just core.async to start off
No nodejs requires
Right now, that part of the code (loaded by the Electron chrome browser) has a single require.
Btw i am interested, is there a lein template or some tutorial for electron apps and ClojureScript?
Not really. I’m using lein npm. There’s some examples: https://github.com/martinklepsch/electron-and-clojurescript (boot), and https://github.com/Gonzih/cljs-electron (lein).
I couldn’t use core.async in the main process without (set! js/goog.global js/global)
though.
And are you using this as well? https://github.com/nwjs/nw.js
I’m also using lein npm, which works suprisingly well, though I suspect using a node toolchain with a cljs plugin (gulp?) might fit better.
BTW i might say something untrue here...are electron apps multi-threaded, core.async might have been thought for single-threaded browsers only...
Wow. It sure seems to me that core.async, or setTimeout, or something, is broken on whatever version of Chrome electron is using in Windows.
As long as I have data moving through the channel, the cpu starts to go down. When it’s just waiting, 100% CPU.
Any idea where to look when I get: Uncaught Error: Undefined nameToPath for project.config
in my browser console?
Is there a Clojurescript equivalent for Clojure's name
(convert keywords into strings)?
@iwankaramazow: yes name
ah ok 😄
probably a bug in my code name
won't run
@iwankaramazow: make sure you don’t have a local called name
which is shadowing cljs.core/name
refreshing the page did it 😬
Or, if you want the colon and the namespace, etc. (str :foo/abc)
is an alternative to consider
thanks for the input, but it's fixed now 😄
has anyone gotten figwheel to work with optimus-less? I want figwheel to reload my .less files when they change
ah, User Error. I needed to 1) tell optimus to export files 2) use :css-dirs in figwheel to watch the export dir
@zentrope @richiardiandrea - Cuttle was written using CLJS + electron (back when it was called "Atom Shell"), it's a little dated now, but might be a helpful reference: https://github.com/oakmac/cuttle
@chrisoakman: pretty good example thanks!
Oh wow. I love the electron/atom shell name correspondence
what is a good lib for generating svg line graphs, just something simple for doing a static chart of price over time?
@josh.freckleton: check on #C0F0V8DT5 where this has been discussed
@meow: ah, didn't know about #C0F0V8DT5, still getting acquainted here, thanks! I appreciate it
Does anyone know if EDN can be a Transferable object with Web Workers? Or is core.async could support <!!/>!! in JS? https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers#Passing_data_by_transferring_ownership_(transferable_objects)
I hope there's something out there called either datavism or datavistic\
@puppybits: Interesting thought. So, JS only has one thread so you can’t get parallel
Maybe check out servant to see what it does for workers in CLJS to see how it passes data in/out
it’s good for processing and network requests. The boot up time of a thread/web worker isn’t great but longer lived threads have been good at some tasks.
Thanks I’ll check out servant. That seems to be in the vane of what I’m looking for.
I started to have my :advanced
js files including goog.addDependencies
very standard profile, aaargh
just :optimizations :advanced
and :output-to
isn't it supposed to work?
@richiardiandrea: it’s not clear what you are asking?
basically today I launched lein cljsbuild once min
and my final artifact started including goog.addDependencies
without having specified a output-dir
at all...but I am I know it is difficult do debug so I will need to investigate what is wrong...