This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # 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)
: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
@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).
I would try to exclude causes one buy one, maybe leaving just core.async to start off
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.
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: make sure you don’t have a local called
name which is shadowing
Or, if you want the colon and the namespace, etc.
(str :foo/abc) is an alternative to consider
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
what is a good lib for generating svg line graphs, just something simple for doing a static chart of price over time?
@meow: ah, didn't know about #C0F0V8DT5, still getting acquainted here, thanks! I appreciate it :simple_smile:
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)
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.
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...
What's the canonical way to pass a "devmode" flag into a ClojureScript build to turn development-only features on?