lumo

:lumo: Standalone ClojureScript environment. Currently at version 1.9.0
2018-03-22T12:53:20.000548Z

Does lumo support defmacro??

2018-03-22T12:53:54.000384Z

I understand clojurescript doesn’t (except through clojure & :require-macros)

2018-03-22T12:58:07.000562Z

Oh just seen this issue opened the other day… which seems to be related to what I’m doing: https://github.com/anmonteiro/lumo/issues/377

2018-03-22T13:03:16.000129Z

Interesting… Evaluating following in lumo:

13:02 $ lumo
Lumo 1.8.0
ClojureScript 1.9.946
Node.js v9.2.0
 Docs: (doc function-name-here)
       (find-doc "part-of-name-here")
 Source: (source function-name-here)
 Exit: Control+D or :cljs/quit or exit

cljs.user=> (defmacro foo [form] (println "macro executing with form: " form))
#'cljs.user/foo
cljs.user=> (foo {:some :form})
macro executing with form:  nil
nil

2018-03-22T13:03:42.000470Z

looks like macro args are passed as nil

moxaj 2018-03-22T13:28:20.000281Z

@rickmoynihan I think if you'd like to define macros in the repl. you have to do so in the pseudo macros namespace

moxaj 2018-03-22T13:29:03.000539Z

see the comment of mfikes here: https://github.com/anmonteiro/lumo/issues/301

2018-03-22T13:29:48.000061Z

@dnolen: sorry this has got split across channels but related to my question in #clojurescript and to round off my understanding… what is up with defmacro in lumo? I understand in classic cljs macros are only supported in clj (and refered in via :require-macros but curious why defmacro doesn’t error sooner.

2018-03-22T14:22:42.000756Z

@rickmoynihan the macro won't work like this. You have to put it in .clj/c file and require it, so that lumo can compile it into cache. Runtime macros like in clojure don't work in clojurescript. It's hard to know with figwheel etc, then it gets compiled on save. But it's same when I start node repl with piggyback, shadow-cljs or planck

2018-03-22T14:24:13.000588Z

also I don't think dnolen is on this channel

mfikes 2018-03-22T14:24:57.000434Z

So, you fundamentally need defmacro to not blow up when compiled as ClojureScript so that self-hosted can work.

2018-03-22T14:26:04.000028Z

So I recently got new computer, installed nixOs on it, and was planing to start lumo now. @mfikes you were useing nixos some time ago right?

mfikes 2018-03-22T14:26:11.000687Z

Perhaps of interest are https://dev.clojure.org/jira/browse/CLJS-2015 and https://dev.clojure.org/jira/browse/CLJS-2636

mfikes 2018-03-22T14:27:07.000945Z

@hlolli Well, I have a build environment that I try to test Planck in. https://github.com/mfikes/planck/tree/master/build-envs

2018-03-22T14:27:32.000759Z

makes little sense to install it via npm on nixos, just need to make a derivation for lumo and push it to nixpackages 🙂 but I'm learning this slowly

2018-03-22T14:28:12.000926Z

ah you make nix-shell

mfikes 2018-03-22T14:28:41.000047Z

Yeah, it seems that it is not possible to get away with the "single Linux binary" when it comes to nixOS

mfikes 2018-03-22T14:29:12.000983Z

For the Planck build environments, they are bona-fide distros, just run via Vagrant

2018-03-22T14:29:29.000135Z

good thing about nixos is that we could make derivation that builds lumo in sandbox, with all dependencies in environment, and it should work easy for all users

mfikes 2018-03-22T14:30:10.000544Z

If you are into nixOS, fix clj for it while you are at it 🙂

2018-03-22T14:30:57.000663Z

cool, my friend is deeply in it, I can mention this to him and we can take a session adding these derivaitons.

2018-03-22T14:31:06.000242Z

going to meet him this weekend

2018-03-22T14:31:59.001019Z

you say fix, is there already something started for clj on nixos?

mfikes 2018-03-22T14:33:43.000821Z

Well, you can't even install it via https://clojure.org/guides/getting_started#_installation_on_linux

mfikes 2018-03-22T14:34:27.000774Z

I suppose this is off-topic for #lumo sorry. But someone should probably file a JIRA for this, fix it etc

2018-03-22T14:36:50.000137Z

hm yes, this shell script will never work properly on nixos, the bin path is immuteable and declareative, it would just get deleted I guess after restart or rebuild 🙂 but should be easy, I say as nix noob, to make a nix derivation out of this.

richiardiandrea 2018-03-22T15:22:48.000967Z

@hlolli are you planning to use nixos for dev? I am interested in listening to your experience report as I was thinking about that as well. At the moment I use only the package manager. About lumo, there was for sure an issue open for that

2018-03-22T15:25:56.000204Z

@richiardiandrea yes I remember ticket being about that and static linking for lumo, but I think that's very un-nix-ish approach to solveing this. I'm useing nixos for dev, first week I regretted it, then, I accepted it, now I'm realizing that it's probably going to save me headaches in the long run. One doesn't have to configure absolutely everything in nix like some users to, enough to rely on system packages, and for example emacas, I still use use-package to be declareative. But the pro would be to get 100% replica of ones environment just with configuration file, and it will work.

richiardiandrea 2018-03-22T15:28:28.000226Z

Yeah that is the aspect I am most interested in. I keep my conf files in a repo so that I can apply them to any (for now Ubuntu-based) distro. The next approach is better because I could have a custom package derived from system or something, dunno

richiardiandrea 2018-03-22T15:29:12.000378Z

Still looks like a lot of work though 😃

2018-03-22T15:30:16.000613Z

good example last weekend I had to uninstall pulseaudio and nvidia dirvers, I could uninstall and install, and everything worked still. In fedora for example I would have to uninstall xserver if I uninstall pulseuadio. So every dependency is "sandboxed", it's really mind blowing.

👍 1
richiardiandrea 2018-03-22T15:32:26.000712Z

Yeah that is cool

2018-03-22T16:02:25.000282Z

Thanks will try later

michaelwfogleman 2018-03-22T22:21:46.000192Z

Can you use cljs libraries from lumo?

richiardiandrea 2018-03-22T22:31:03.000011Z

@michaelwfogleman yes you can, you need to resolve them first, then you can call lumo -D lib-name:version

🙏 1
richiardiandrea 2018-03-22T22:31:12.000457Z

aka, they need to be in .m2

richiardiandrea 2018-03-22T22:31:29.000265Z

if you get exceptions though, it probably means that they are not self-host compatible (yet)

michaelwfogleman 2018-03-22T22:43:42.000271Z

@anmonteiro I just mentioned in DM’s with @richiardiandrea that I would be willing to contribute to making a “Lumo Shell Scripting 101” type document, with some assistance here. Is that something you’d be open to?

anmonteiro 2018-03-22T22:43:54.000214Z

totally

anmonteiro 2018-03-22T22:43:56.000156Z

I’d love that

anmonteiro 2018-03-22T22:44:16.000280Z

submit a PR adding a .md file to a docs/ folder

anmonteiro 2018-03-22T22:44:24.000360Z

we’ll take care of formatting it later

👍 1
richiardiandrea 2018-03-22T22:44:47.000236Z

so is this PR on hold right now? https://github.com/anmonteiro/lumo/pull/313

michaelwfogleman 2018-03-23T10:57:25.000303Z

@richiardiandrea Is this a blocker for the work I mentioned?

richiardiandrea 2018-03-23T15:45:15.000403Z

No I don't think so, we can also write on the lumo wiki

✅ 1
dominicm 2018-03-25T10:28:37.000026Z

I seem to recall that anmonteiro wants to self host - but that may not be true.