This page is not created by, affiliated with, or supported by Slack Technologies, Inc.


Does lumo support defmacro??


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


Oh just seen this issue opened the other day… which seems to be related to what I’m doing:


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 {:some :form})
macro executing with form:  nil


looks like macro args are passed as nil


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


@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.


@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


Thanks will try later


also I don't think dnolen is on this channel


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


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?


@hlolli Well, I have a build environment that I try to test Planck in.


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


ah you make nix-shell


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


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


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


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


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


going to meet him this weekend


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


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


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 :slightly_smiling_face: but should be easy, I say as nix noob, to make a nix derivation out of this.


@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


@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.


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


Still looks like a lot of work though :smiley:


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.


Yeah that is cool


Can you use cljs libraries from lumo?


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


aka, they need to be in .m2


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


@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?


I’d love that


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


we’ll take care of formatting it later


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


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


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