lumo

:lumo: Standalone ClojureScript environment. Currently at version 1.9.0
2017-09-19T10:05:18.000095Z

Hey, I prepared a docker images with lumo + boot, npm (yarn). So one does not need to mess up his computer with boot or npm to be able to try lumo with eg. “node-fetch” or “promesa” dependencies. 🙂 https://github.com/honzabrecka/lumo-docker

🤘 1
borkdude 2017-09-19T14:34:52.000439Z

is there any documentation for using npm modules from lumo? I saw the demo in the talk I believe, but can’t find anything on it in the repo?

richiardiandrea 2017-09-19T14:47:15.000494Z

@borkdude not that I know of, but it is basically transparent to you, you install the JavaScript npm dep using yarn or npm and require it using standard cljs syntax. Lumo being in Node knows what to find and where to find it.

borkdude 2017-09-19T14:47:39.000455Z

ah

dominicm 2017-09-19T14:58:02.000440Z

(js/require "dep")

2017-09-19T15:36:44.000279Z

@borkdude Or create deps.cljs with :npm-deps map and require them as cljs ones.

borkdude 2017-09-19T15:38:42.000654Z

yarn add sharp
lumo
(require '[sharp :as s])
(-> "test.jpg" s (.resize 100 100) (.toFile "output.jpg"))
works

borkdude 2017-09-19T15:39:04.000093Z

just via the ‘normal’ cljs require 🙂

richiardiandrea 2017-09-19T15:39:08.000427Z

The new lumo supports ns require @dominicm Antonio fixed it :)

richiardiandrea 2017-09-19T15:39:18.000372Z

Yep

borkdude 2017-09-19T15:39:49.000072Z

awesome

richiardiandrea 2017-09-19T15:41:38.000396Z

Lumo at the moment is the closest to the JS workflow

richiardiandrea 2017-09-19T15:41:57.000479Z

That's quite awesome indeed

anmonteiro 2017-09-19T15:59:14.000243Z

Btw Lumo 1.8.0-beta is just out

anmonteiro 2017-09-19T15:59:52.000389Z

I've prepared a blog post that I'm publishing in a litttle while because this is a significant release

anmonteiro 2017-09-19T16:01:57.000254Z

@borkdude to blow your mind a little bit more, this works too:

(require 'foo)
(foo/bar)
For things where you'd usually do (.bar foo)

anmonteiro 2017-09-19T16:02:22.000053Z

(Where foo is a Node module!)

dominicm 2017-09-19T16:02:38.000350Z

woaaaah

anmonteiro 2017-09-19T16:02:52.000157Z

This is 1.7+

borkdude 2017-09-19T16:03:08.000189Z

ah, amazing, that would make working with d3 a lot better for example… if only this was supported in clojurescript itself… or is it?

anmonteiro 2017-09-19T16:03:17.000338Z

It is :-)

anmonteiro 2017-09-19T16:03:31.000812Z

Module processing / npm module support

borkdude 2017-09-19T16:03:38.000112Z

😲

borkdude 2017-09-19T16:04:06.000125Z

so cljsjs will kind of become obsolete this way maybe?

2017-09-19T16:04:30.000157Z

no, you still need externs in advanced compilation

anmonteiro 2017-09-19T16:04:30.000564Z

Aka CLJS is not an island and the post I wrote for the CLJS blog in July: https://clojurescript.org/news/2017-07-12-clojurescript-is-not-an-island-integrating-node-modules

anmonteiro 2017-09-19T16:04:45.000033Z

CLJSJS would be mostly for externs

anmonteiro 2017-09-19T16:04:58.000442Z

Will*

borkdude 2017-09-19T16:05:04.000464Z

ah yes

anmonteiro 2017-09-19T16:05:43.000260Z

This is getting serious attention from the CLJS team

anmonteiro 2017-09-19T16:06:05.000381Z

We have even gone further and put together patches in Google Closure

anmonteiro 2017-09-19T16:06:58.000704Z

It's also what I'm going to be speaking about at the Conj

borkdude 2017-09-19T16:07:18.000065Z

Looking forward to the talk!

dominicm 2017-09-19T16:15:04.000337Z

Wish I could make it to the conj

jonpither 2017-09-19T19:33:58.000349Z

Nice work on the new Lumo version @anmonteiro. Does this mean that the JS compile cache Lumo produces can be optimised further (google Closure style)?

anmonteiro 2017-09-19T19:40:53.000115Z

@jonpither not yet

anmonteiro 2017-09-19T19:41:09.000333Z

this is actually CLJS project compilation

👍 1
bspaulding 2017-09-19T20:21:50.000427Z

Invalid :refer, var lumo.build.api/watch does not exist looks like watching is implemented, is there a different, preferred way to do this? or just not exposed yet?

anmonteiro 2017-09-19T20:23:41.000152Z

@bspaulding not yet there

bspaulding 2017-09-19T20:23:49.000028Z

ah, dig. :thumbsup:

anmonteiro 2017-09-19T20:23:59.000027Z

use build for now

anmonteiro 2017-09-19T20:24:03.000196Z

it’s planned and I’m working on it

anmonteiro 2017-09-19T20:24:23.000309Z

well it’s commented out

bspaulding 2017-09-19T20:24:32.000060Z

cool, thanks! this proj is awesome, btw. love it

bspaulding 2017-09-19T20:24:49.000622Z

ahh, ok. sorry for newb qs. haven’t seen #_( yet

anmonteiro 2017-09-19T20:31:21.000185Z

np!