This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-06-02
Channels
- # aleph (5)
- # beginners (112)
- # boot (137)
- # cider (10)
- # cljs-dev (36)
- # cljsrn (2)
- # clojure (118)
- # clojure-argentina (1)
- # clojure-berlin (1)
- # clojure-brasil (3)
- # clojure-dev (4)
- # clojure-italy (2)
- # clojure-nl (13)
- # clojure-russia (23)
- # clojure-spec (5)
- # clojure-uk (53)
- # clojurescript (344)
- # clojutre (1)
- # core-async (65)
- # cursive (9)
- # datascript (7)
- # datomic (28)
- # devops (1)
- # emacs (16)
- # events (1)
- # jobs (5)
- # keechma (18)
- # lumo (56)
- # off-topic (7)
- # om (3)
- # onyx (14)
- # protorepl (21)
- # re-frame (3)
- # reagent (20)
- # ring (12)
- # ring-swagger (9)
- # specter (17)
- # unrepl (14)
- # vim (14)
- # yada (22)
hi guys, is there any good example using lumo with Google Cloud Functions ? or can we compile cljs within lumo to js then run it with Google Cloud Functions ?
hey @nxq I created a home action using clojurescript hosted in aws lambda, unfortunately that code is private đ
I used this library to do most of the wrapping https://github.com/nervous-systems/cljs-lambda, not sure if itâll be helpful
I just setup a simple lumo build with (.log js/console âHiâ) source file. It takes 70s to build on my 3-year-old i7 MBPro and if I change :optimizations to anything other than advanced it barfs a meaningless error. Any pointers?
this works (fast) compil1.cljs
(ns compil1)
(println "hello world")
build.cljs
(require '[lumo.build.api :as b])
(b/build "./"
{:main 'compil1
:output-dir "out"
:optimizations :simple})
% lumo build.cljs
(require â[lumo.build.api :as b]) (b/build âsrcâ {:main âlumo1.core :output-to âmain.jsâ :optimizations :none :target :nodejs})
I had to move from src to same working directory too. Feels like the source file lookup is broken. But anmonteiro would know better.
70s is the time needed for advanced I guess, since it isn't using any cacheing. Lumo is usually slow to start the first time because of that.
I took the code sample from his blog as well: https://anmonteiro.com/2017/02/compiling-clojurescript-projects-without-the-jvm/
Sorry, what do you mean by âfirst timeâ? I donât see anything resembling incremental compilation in a simple tool like Lumo.
ok so it's the last release, I also see that this only happens with :optimizations :none, :whitespace and :simple work.
If you ask me, I don't see any fanfare because very few people are using lumo, especially not the build.api whereas jvm cljsbuild is much more battle tested and with figwheel development. The fact that it's so little used is one big factor why this has been overseen.
Well, thatâs my point really. The Lumo REPL canât use Clojure libs and I donât see any advantage over lein-cljsbuild + nodemon as far as compilation speed goes.
@clojer I never said Lumo was ready for general usage, especially the build API
If you read my blog post about compiling projects, you probably noticed: 1. It's an alpha feature 2. The slow compile times are coming from the Closure Compiler JS upstream
It's not related to first time or not
@clojer I really appreciate you trying out Lumo! But I don't think it's helpful to complain about goals that the project never had (being faster than the JVM to compile - simply because JVM CLJS will probably always be faster)
We're well aware there are issues, and every bit of help is necessary to fix them, be it reporting bugs, trying new features or even lending a helping hand and fixing them
Hey, any reason why the ZMQ npm module isn't loading? Here's my script: https://github.com/paullucas/lumo-misc/blob/master/zmq/zmq-test.cljs I'm getting the following error:
libstdc++.so.6: cannot open shared object file: No such file or directory
Object.Module._extensions..node (module.cljs:598:18)
Module.load (module.cljs:488:32)
tryModuleLoad (module.cljs:447:12)
Function.Module._load (module.cljs:439:3)
Module.require (module.cljs:498:17)
require (internal/module.cljs:20:19)
Object.<anonymous> (/home/plll/Code/lumo-misc/zmq/node_modules/zeromq/lib/index.cljs:6:11)
Module._compile (module.cljs:571:32)
Object.Module._extensions..js (module.cljs:580:10)
Module.load (module.cljs:488:32)
@paulll need more info about your setup
Linux?
Lumo version?
so hereâs what I think is happening: ZeroMQ has some native module and it canât link against NixOSâs weird paths
@paulll my theory will be wrong if youâre able to load the module in Node.js
Hmm, I am able to run it with Node. Ran the publisher example and it seems to work:
var zmq = require('zeromq')
, sock = zmq.socket('pub');
sock.bindSync('');
console.log('Publisher bound to port 3000');
setInterval(function(){
console.log('sending a multipart message envelope');
sock.send(['kitty cats', 'meow!']);
}, 500);
thatâs weird
it might be related to https://github.com/anmonteiro/lumo/issues/163
but it could also be some Nix issue đ