first prototype on home page, still thinking about what to show http://lumo-cljs.org/
is this logo the final one? I need to update the logo in the page, looks a bit strange
it's not exactly squared.
probably we need to adjust the font size of "LUMO" to make look more consistent.
not even aligned to each other
the website looks neat 😄 are you hosting it? 😄
yeah, on my server, on Aliyun
I still haven't received a LUMO sticker, Antiono had them, but haven't bumped into him for more than a year
Hello, is people around here?
How can I use source-map support with lumo =
(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!"))})
exampleThat should be a build script right ?
build.clj ?
yes, it could be a build script that you call with lumo
you can change build
with watch
and use the same parameters
Have you tried lumo-project?
I want to avoid build scripts, I'll prefer a build tool
I never make it work though
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.
not counting inf-clojure that I use for editing
inf-clojure?
How do you use lumo? I want to use it for compiling down no node scripts
@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
There are a bunch of scripts for compiling in there
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
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
@rdanielo If you are learning the language, I would go for lein or boot, they are the most seasoned
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
Having said that once you are over the initial impact you will see only benefits to Cljs
I use lumo + node every single day at work so there are some quirks but it is pretty smooth overall
Thanks for your kind words @richiardiandrea
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
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
That's why I'm interested on lumo
By the way, using your build script I get the following error when running it:
ReferenceError: goog is not defined
May be because I set source-maps to true ?
Forget about it, it was my fault
My previous build script was wrong
@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.
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
Lumo had many quirks at the beginning the the two people here plus most importantly Antonio helped fixing
At the cost of being less productive at work 😃
Hello @hlolli there should be something bad about my configuration because the repl is itself slow
Evaluating any snippet of code on the REPL is slow as hell
what editor are you useing, or are ypu directly in the terminal?
I'm on mac, using iterm2 and zsh
I was using this template: https://github.com/malyn/figwheel-node-template
wich uses figwheel
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
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
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.
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
I really want REPL driven development, which is all people talk about on the clj conferences
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.
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 🙂
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
Thanks to this guide I get repl + hot-reload with shadow-cljs
It was pretty easy and fast, compared to the other approaches
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
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 😄
Thanks @hlolli
Any fast way to load all the functions on a namespace and reload them ? I don't want to type require everytime
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.
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.
Coming from the JS world I prefer to see explicit/namespaced imports
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
ah! ok!
you can do (in-ns 'my.ns) and then they are all locally scoped
That sounds fine, I'll check
but you may need to require the file just to load the contents of the file into the repl
by doing (require 'my.ns) before (in-ns 'my-ns), you're not really requireing it to use it, just to load it
tough you theoratically could use fully qualified namespace to call the functions from there, but it's bad practice 🙂
It worked fine
I'm missing the tab-completion, but works very good
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
I've never used this, but you could ask on #shadow-cljs
Hahahah, i've been jumping between slack channels for a while now
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
It starts reasonably fast, repl is fast, config is minimal...
very amazing
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.
The only downside is their webpage, seems to be focused on browser environments or browser targeted apps, while this is not true
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.
Well, I am using a different target :node-script
Which works fine too