lumo

:lumo: Standalone ClojureScript environment. Currently at version 1.9.0
Jon 2018-03-29T02:14:52.000138Z

first prototype on home page, still thinking about what to show http://lumo-cljs.org/

Jon 2018-03-29T02:16:02.000059Z

is this logo the final one? I need to update the logo in the page, looks a bit strange

Jon 2018-03-29T02:16:21.000153Z

it's not exactly squared.

Jon 2018-03-29T02:25:28.000016Z

probably we need to adjust the font size of "LUMO" to make look more consistent.

Jon 2018-03-29T02:28:10.000264Z

not even aligned to each other

richiardiandrea 2018-03-29T03:21:08.000079Z

the website looks neat 😄 are you hosting it? 😄

Jon 2018-03-29T05:17:24.000185Z

yeah, on my server, on Aliyun

2018-03-29T09:21:14.000245Z

I still haven't received a LUMO sticker, Antiono had them, but haven't bumped into him for more than a year

danielo515 2018-03-29T10:27:01.000236Z

Hello, is people around here?

danielo515 2018-03-29T10:48:04.000349Z

How can I use source-map support with lumo =

2018-03-29T11:19:35.000060Z

@rdanielo

(require 'lumo.build.api)

(lumo.build.api/build
         "samples/hello"
         {:optimizations :none
         :output-to "samples/out/hello.js"
         :output-dir "samples/out"
         :cache-analysis true
         :source-map true
         :verbose true
         :watch-fn
         (fn []
             (println "Success!"))})
example

danielo515 2018-03-29T11:25:58.000324Z

That should be a build script right ?

danielo515 2018-03-29T11:26:02.000208Z

build.clj ?

2018-03-29T11:27:00.000112Z

yes, it could be a build script that you call with lumo

2018-03-29T11:27:25.000354Z

you can change build with watch and use the same parameters

danielo515 2018-03-29T11:41:09.000347Z

Have you tried lumo-project?

danielo515 2018-03-29T11:41:26.000162Z

I want to avoid build scripts, I'll prefer a build tool

danielo515 2018-03-29T11:41:37.000298Z

I never make it work though

2018-03-29T13:09:03.000065Z

no, never tried lumo-project, since year I use lumo directly without tools, there are some tools that come and go, still open terretory for improvement and innovation.

2018-03-29T13:09:42.000269Z

not counting inf-clojure that I use for editing

danielo515 2018-03-29T13:35:00.000408Z

inf-clojure?

danielo515 2018-03-29T13:35:23.000059Z

How do you use lumo? I want to use it for compiling down no node scripts

richiardiandrea 2018-03-29T15:40:39.000336Z

@rdanielo I have a repo that I use for sending lumo repro but you can explore it for some inspiration: https://github.com/arichiardi/lumo-repros/tree/master/scripts/lumo

richiardiandrea 2018-03-29T15:41:01.000668Z

There are a bunch of scripts for compiling in there

danielo515 2018-03-29T15:42:16.000078Z

People usually talk about JS fatigue, but I am finding so many cljs options to compile that I am very overwhelmed. So far I tried: lein, boot, lumo, shadow-cljs, clj + cljs.main .... And I can't understand the differences apart from startup time and the inability to use core.async on some of them

richiardiandrea 2018-03-29T15:42:28.000731Z

If I remember correctly there was a problem with Google Closure Compiler (I patched it, will be in the next release) so for source maps we need to wait

richiardiandrea 2018-03-29T15:43:18.000474Z

@rdanielo If you are learning the language, I would go for lein or boot, they are the most seasoned

richiardiandrea 2018-03-29T15:44:37.000083Z

Also keeping in mind that we don't have the same number of contributors the Js has so docs / tooling is a bit less oiled

richiardiandrea 2018-03-29T15:45:20.000685Z

Having said that once you are over the initial impact you will see only benefits to Cljs

richiardiandrea 2018-03-29T15:46:36.000362Z

I use lumo + node every single day at work so there are some quirks but it is pretty smooth overall

danielo515 2018-03-29T15:48:58.000683Z

Thanks for your kind words @richiardiandrea

danielo515 2018-03-29T15:49:24.000676Z

I am a person that wants to test everything and see what it is better,t he problem is that I am never sure about what it's better

danielo515 2018-03-29T15:50:07.000186Z

I was using lein, but the REPL is soooooo slow, and re-building is slow, and testing functions is slow. So slow that makes hard thinking about what I am trying to test

danielo515 2018-03-29T15:50:13.000903Z

That's why I'm interested on lumo

danielo515 2018-03-29T15:51:05.000918Z

By the way, using your build script I get the following error when running it:

danielo515 2018-03-29T15:51:10.000082Z

ReferenceError: goog is not defined

danielo515 2018-03-29T15:51:18.000083Z

May be because I set source-maps to true ?

danielo515 2018-03-29T15:52:07.000297Z

Forget about it, it was my fault

danielo515 2018-03-29T15:52:15.000042Z

My previous build script was wrong

2018-03-29T15:53:08.000349Z

@rdanielo in lein's defence, it's only slow to start, after that it's faster than lumo, because of the java engine. But you're right, the startup time keeps annoying me still to this day.

richiardiandrea 2018-03-29T15:53:46.000346Z

It is good to test everything, I am like you, but when I need to get things done ...and to avoid frustration with tooling, something you have to compromise

richiardiandrea 2018-03-29T15:54:21.000417Z

Lumo had many quirks at the beginning the the two people here plus most importantly Antonio helped fixing

richiardiandrea 2018-03-29T15:54:41.000193Z

At the cost of being less productive at work 😃

danielo515 2018-03-29T15:54:56.000036Z

Hello @hlolli there should be something bad about my configuration because the repl is itself slow

danielo515 2018-03-29T15:55:07.000250Z

Evaluating any snippet of code on the REPL is slow as hell

2018-03-29T15:55:25.000890Z

what editor are you useing, or are ypu directly in the terminal?

danielo515 2018-03-29T15:55:50.000586Z

I'm on mac, using iterm2 and zsh

danielo515 2018-03-29T15:56:15.000287Z

I was using this template: https://github.com/malyn/figwheel-node-template

danielo515 2018-03-29T15:56:21.000273Z

wich uses figwheel

danielo515 2018-03-29T15:58:06.000003Z

Using shadow cljs I am getting one single file which is about 850k while using lumo I am getting an entire folder full of JS which weights 3Mb

2018-03-29T16:00:46.000668Z

I think useing figwheel for node doesn't make sense, the only thing you get is probably the compilation reload which you'd get from cljs.build/watch in clojure or lumo. figwheel makes sense when developing react apps for the browser, didn't know this was even possible, maybe I'm being too negative about this combination, tough I love figwheel in the right combination. You can always use cljsbuild in leiningen and get watch function from there, then you have the dev enironment better configured, https://github.com/emezeske/lein-cljsbuild

2018-03-29T16:02:39.000848Z

and shadow-cljs is my favorite these days. The headache it saves boils usually down to the last step, advanced compilation, shadow automates and debugs that step amazingly well. And since recently, very well documented.

danielo515 2018-03-29T16:02:44.000123Z

I do really want the hot-reload experience. On one of the first templates I was using watch, because it had no figwheel , but I had no REPL

danielo515 2018-03-29T16:03:02.000037Z

I really want REPL driven development, which is all people talk about on the clj conferences

2018-03-29T16:05:36.000006Z

hmm you can get that with lumo if you start socket server with a watch build script, then send code over the socket to eval and the build watcher that builds on save. I'd say the hot reload and repl driven development should be more clearly seperated buzzwords, if clojure speakers are guilty of throwing out buzzwords in conference talks.

2018-03-29T16:06:45.000850Z

I'd rather recommend shadow-cljs or lein-cljsbuild, to use the nrepl. I don't want to see any newcommer burn out too early 🙂

2018-03-29T16:09:59.000316Z

good point, it lacks examples, tutorials and tips/tricks blog posts. But much is coming out in last few weeks, very vibrant developments, and #shadow-cljs channel is good for any questions

danielo515 2018-03-29T16:10:36.000312Z

Thanks to this guide I get repl + hot-reload with shadow-cljs

danielo515 2018-03-29T16:10:37.000117Z

https://shadow-cljs.github.io/docs/UsersGuide.html

danielo515 2018-03-29T16:10:54.000122Z

It was pretty easy and fast, compared to the other approaches

danielo515 2018-03-29T16:11:54.000431Z

However is a bit weird to have to run a watch build in one term and a repl on a different one. Ideally I want it just on one single operation

2018-03-29T16:11:57.000534Z

nice, good luck on your journey, no js fatigue here, we all have our original black(red/white/brown..etc...) colored hair on our heads 😄

danielo515 2018-03-29T16:12:55.000325Z

Thanks @hlolli

danielo515 2018-03-29T16:13:43.000095Z

Any fast way to load all the functions on a namespace and reload them ? I don't want to type require everytime

2018-03-29T16:17:59.000059Z

good question, clojurescript has nothing like clojure's :use. It sucks in many cases. It's kinda enforced good practice. But if you :require [ns :as n] then you can access all of it with n/function, also makes the code very readable. But yeh, still think this option to require all functions should be there, is sadly not.

2018-03-29T16:18:57.000574Z

and reading other peoples code, you just see symbol, and ask where did it come from, and almost no way to tell just by reading the file.

danielo515 2018-03-29T16:20:40.000125Z

Coming from the JS world I prefer to see explicit/namespaced imports

danielo515 2018-03-29T16:21:09.000580Z

However, when I am on a repl, I just want to test the functions on certain file... well, I don't want to write the require and namespace functions everytime

2018-03-29T16:21:18.000433Z

ah! ok!

2018-03-29T16:21:33.000793Z

you can do (in-ns 'my.ns) and then they are all locally scoped

danielo515 2018-03-29T16:21:52.000204Z

That sounds fine, I'll check

2018-03-29T16:22:19.000264Z

but you may need to require the file just to load the contents of the file into the repl

2018-03-29T16:22:52.000647Z

by doing (require 'my.ns) before (in-ns 'my-ns), you're not really requireing it to use it, just to load it

2018-03-29T16:23:31.000115Z

tough you theoratically could use fully qualified namespace to call the functions from there, but it's bad practice 🙂

danielo515 2018-03-29T16:23:49.000074Z

It worked fine

danielo515 2018-03-29T16:24:04.000105Z

I'm missing the tab-completion, but works very good

danielo515 2018-03-29T16:24:37.000606Z

Another related question, Is this line (set! *main-cli-fn* -main) required with shadow-cljs ? Seems that it is specified on the edn file therefore not required on the file

2018-03-29T16:26:07.000499Z

I've never used this, but you could ask on #shadow-cljs

danielo515 2018-03-29T16:28:24.000642Z

Hahahah, i've been jumping between slack channels for a while now

danielo515 2018-03-29T16:29:41.000652Z

shadow-cljs is the tool with batteries included that I have been looking for. Seems to have the best of bootstrapped cljs tools and jvm based ones

danielo515 2018-03-29T16:30:08.000249Z

It starts reasonably fast, repl is fast, config is minimal...

danielo515 2018-03-29T16:30:17.000166Z

very amazing

2018-03-29T16:30:48.000253Z

well, ok, that's bit typical, I'd say socially on clojurians slack, talking about topic which is off the channel's topic triggers some people. Sometimes for good reason, sometimes just to be captain obvious.

danielo515 2018-03-29T16:31:11.000216Z

The only downside is their webpage, seems to be focused on browser environments or browser targeted apps, while this is not true

2018-03-29T16:32:47.000144Z

yes, the main developers of shadow-cljs are mostly developing for the browser, I already made one app for node, and their two node build options :node-library and :npm-module work fine. For myself, I use it when I want to use cider (emacs plugin for clojure development) with node development.

danielo515 2018-03-29T16:35:38.000390Z

Well, I am using a different target :node-script

danielo515 2018-03-29T16:35:45.000013Z

Which works fine too