lumo

:lumo: Standalone ClojureScript environment. Currently at version 1.9.0
futuro 2017-07-01T04:03:28.615534Z

https://github.com/anmonteiro/lumo/pull/43

futuro 2017-07-01T04:03:41.616208Z

https://github.com/anmonteiro/lumo/pull/43

futuro 2017-07-01T04:04:28.619057Z

⬆️ context for any who'd like it

futuro 2017-07-01T04:05:31.622638Z

I like the lightbulbg idea, though I'd probably pick a brighter color to present a lit lightbulb

futuro 2017-07-01T04:06:48.626693Z

@anmonteiro are you looking for suggestions/feedback?

anmonteiro 2017-07-01T04:07:36.629346Z

I think it's pretty much settled

anmonteiro 2017-07-01T04:08:00.630496Z

I have a brighter yellow and a green option that I'm happy to share

futuro 2017-07-01T04:08:14.631280Z

They'd be cool to see, for sure.

futuro 2017-07-01T04:08:52.633302Z

If I mocked up some spins on the current version would that interest you?

futuro 2017-07-01T04:10:00.637385Z

f.e., the CLJS green for the lightbulb, and the CLJS blue as the LUMO text color, with a white background

anmonteiro 2017-07-01T04:10:36.639434Z

I don't think Lumo should necessarily have the ClojureScript colors

futuro 2017-07-01T04:12:56.646438Z

Would you prefer an original color theme?

anmonteiro 2017-07-01T04:13:30.648182Z

Yeah. I kinda like the current yellow but I'm open to see more options

futuro 2017-07-01T04:16:29.658117Z

Is there anything you're hoping to impart with the logo, or mostly trying to find a design you find aesthetically appealing?

anmonteiro 2017-07-01T04:26:11.688807Z

@futuro what do you think could be made better?

anmonteiro 2017-07-01T04:26:43.690390Z

I really like the current logo & font, not really interested in much bikeshedding

futuro 2017-07-01T04:30:59.704134Z

I think the solid black is kind of harsh, and making that white would be easier on the eyes and possibly make the yellow seem slightly brighter

futuro 2017-07-01T04:31:35.706134Z

then a dark gray for the text so its readable, but matching the luminosity of the yellow

futuro 2017-07-01T04:32:33.709248Z

I hear you on the bikeshedding, for sure

futuro 2017-07-01T04:35:48.006472Z

that's a super rough mock, but gets close to what I'm talking about

futuro 2017-07-01T04:38:17.016062Z

that has a background, whereas the first one has no bg (the file is misnamed)

richiardiandrea 2017-07-01T05:39:42.240425Z

I like the bright version better, it is light after all

priornix 2017-07-01T16:57:58.129111Z

Hi, just getting started on lumo. Any code examples that shows how to get node.js modules imported and working? I have tried looking at: https://anmonteiro.com/2017/03/requiring-node-js-modules-from-clojurescript-namespaces/ but lumo hangs upon running

lumo -c src build.cljs

anmonteiro 2017-07-01T16:59:29.137214Z

@priornix that blogpost describes a functionality that is only available in regular ClojureScript, (not self-hosted or Lumo)

anmonteiro 2017-07-01T17:00:49.145944Z

You can require Node.js modules in Lumo like this:

$ npm install my-module
$ lumo
cljs.user=> (js/require "my-module")

priornix 2017-07-01T17:00:58.146788Z

I see, the best example I've seen is this: https://gist.github.com/yogthos/d9d2324016f62d151c9843bdac3c0f23#file-gallery-cljs but the example from @yogthos doesn't use any external nodejs libraries

anmonteiro 2017-07-01T17:01:45.151151Z

Because Lumo is basically Node with a thin CLJS layer, NPM modules work out of the box 🙃

priornix 2017-07-01T17:06:17.175512Z

Hmm, so how do I require the module from inside a lumo script?

priornix 2017-07-01T17:06:32.176846Z

I'm trying this now

(ns foobar.bar
  (:require [cljs.nodejs :as node]))

(defonce lp (js/require "left-pad"))
(defonce lp2 (node/require "left-pad"))

priornix 2017-07-01T17:07:50.183513Z

I've installed the left-pad library using npm install left-pad

anmonteiro 2017-07-01T17:08:17.185929Z

Yeah so that should work

priornix 2017-07-01T17:13:01.210855Z

Ah right, got it now, thanks. Guess it was a bug in my reference

moxaj 2017-07-01T17:13:47.214844Z

@anmonteiro re my data readers patch, some tests fail with TypeError: $$LUMO_GLOBALS.loadUpstreamDataReaders is not a function. But as far as I can tell, I've exposed it the same way as $$LUMO_GLOBALS.loadUpstreamForeignLibs

moxaj 2017-07-01T17:14:41.219610Z

so i'm kind of lost 😕

anmonteiro 2017-07-01T17:14:53.220512Z

@moxaj I'll have a look later

moxaj 2017-07-01T17:15:03.221391Z

thanks!

priornix 2017-07-01T17:21:26.254657Z

Just a quick question, so as of now, we can't require the node.js modules using (:require) but instead it has to be either (js/require) or (node/require), right?

anmonteiro 2017-07-01T17:21:46.256298Z

@moxaj you may have to tweak test fixtures here https://github.com/anmonteiro/lumo/blob/master/test/lumo/test_util.cljs#L9

anmonteiro 2017-07-01T17:25:52.277662Z

Some failures are a bit intriguing though

moxaj 2017-07-01T17:28:57.293304Z

with the fixed text fixtures, i'm passing tests now, so those were connected

moxaj 2017-07-01T17:29:58.298315Z

also, may I use (constantly {}) in the fixture as my loadUpstreamDataReaders? Or should I use the real one?

priornix 2017-07-01T17:32:56.314177Z

@anmonteiro Am I right? ie: the (:require) syntax isn't supported in lumo now for node.js modules

anmonteiro 2017-07-01T17:40:23.353265Z

@moxaj you can’t use the JS version because that won’t be present when we run CLJS tests. (constantly {}) looks OK to me

anmonteiro 2017-07-01T17:40:30.353900Z

@priornix that’s right