lumo

:lumo: Standalone ClojureScript environment. Currently at version 1.9.0
anmonteiro 2017-11-15T00:05:31.000315Z

@hlolli add it here https://github.com/anmonteiro/lumo/blob/master/src/js/cljs.js#L124

👍 1
pesterhazy 2017-11-15T13:27:10.000030Z

@hlolli does goog/global.setTimeout work?

2017-11-15T13:28:52.000470Z

@pesterhazy I remember seeing that it didn't work either. I'm compiling a release binary now at the moment and will quickly find out if this is only a problem with the dev build or not.

baptiste-from-paris 2017-11-15T13:45:13.000101Z

Hello friends, I struggle to make puppeteer working with lumo To make puppeteer work, you need to inject javascript into browser context where offcourse browser knows nothing about cljs Maybe one way would be to inject cljs into every page but I am wondering if there is a way to compile in my code cljs to make it work

baptiste-from-paris 2017-11-15T13:45:27.000483Z

here is the function that needs it https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#pageselector

2017-11-15T13:55:11.000090Z

Have you tried building your code with lumo.build.api?

baptiste-from-paris 2017-11-15T13:58:53.000377Z

nope I should do that, not cool for REPL experience though but I think I don’t have a choice

2017-11-15T14:00:09.000493Z

no I guess you'd only do it when you'd be makeing releases, you can do autobuild as well tough.

baptiste-from-paris 2017-11-15T14:05:13.000079Z

hummm

baptiste-from-paris 2017-11-15T14:05:22.000066Z

but from the repl ?!

baptiste-from-paris 2017-11-15T14:05:32.000271Z

I am using tubular with cursive

2017-11-15T14:06:27.000272Z

No not from the repl, you want to do something like cljs string to js string in the repl in runtime?

baptiste-from-paris 2017-11-15T14:06:42.000235Z

would be good for dev ^^

2017-11-15T14:09:05.000472Z

There are some tricks where you give the compiler empty environment, I forgot how that command was. But I don't see a good way to get good dev experience in your case useing cljs. Maybe figwheel or something could work with this headless browser.

2017-11-15T14:10:48.000668Z

It's still on my todo list to compile with lumo build to stream instead of file implicitly. But I still can't see how that would work in non-advenced compilation as we always end with many files that need to be placed in according folders.

baptiste-from-paris 2017-11-15T14:11:37.000326Z

ok, no worries, I’ll try building the js instead

metametadata 2017-11-15T15:26:19.000039Z

Doh. I simply have to add -K flag when running REPL and :reload-alls become almost immediate. Somehow I thought that -K only helps when loading code from files.

hlship 2017-11-15T17:23:21.000018Z

I'd love to see more intro documentation about Lumo: - Syntax for requiring NodeJS modules - Syntax for invoking function imported from NodeJS - Tutorial on adding NPM modules to Lumo app I eventually worked out most of these, and technically it's in the ClojureScript documentation, but it would be nice if it was all laid out in one place.

baptiste-from-paris 2017-11-15T17:55:05.000115Z

@hlolli for information, it’s working really well by using the .addScriptTag of pupeteer and adding cljs with klipse

baptiste-from-paris 2017-11-15T17:55:16.000559Z

*klipse cdn

baptiste-from-paris 2017-11-15T17:55:30.000345Z

even if I could compile it myself, I was just lazy ^^

richiardiandrea 2017-11-15T18:25:20.000626Z

@hlship I think the best place would be the wiki or a proper readthedocs page...unfortunately I don't have the time for bootstrapping that at the moment, but can contribute once it is going

anmonteiro 2017-11-15T18:43:24.000017Z

@hlship agreed. A documentation website is on the roadmap but I have been busy

hlship 2017-11-15T19:02:08.000055Z

I'm good with readthedocs, I've used it successfully for several projects. Easy. I may have time to put together a PR on Friday.

❤️ 2
2017-11-15T20:33:11.000245Z

nice, hope it works for you. Can imagine dev and production to differ somewhat, but doesnt have to be.