This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-10-25
Channels
- # aws (2)
- # aws-lambda (2)
- # beginners (95)
- # boot (47)
- # cider (13)
- # clara (5)
- # cljs-dev (36)
- # cljsjs (9)
- # clojure (51)
- # clojure-austin (1)
- # clojure-greece (25)
- # clojure-italy (4)
- # clojure-japan (10)
- # clojure-russia (13)
- # clojure-spec (61)
- # clojure-uk (25)
- # clojurescript (26)
- # core-matrix (5)
- # cursive (8)
- # data-science (7)
- # datomic (43)
- # dirac (2)
- # emacs (8)
- # events (3)
- # fulcro (17)
- # graphql (29)
- # jobs-rus (4)
- # lambdaisland (4)
- # lein-figwheel (3)
- # leiningen (60)
- # luminus (15)
- # lumo (8)
- # mount (3)
- # off-topic (28)
- # om (22)
- # onyx (115)
- # other-languages (6)
- # pedestal (5)
- # re-frame (41)
- # reagent (12)
- # ring-swagger (12)
- # shadow-cljs (127)
- # unrepl (27)
- # yada (5)
(ns respo.test.html
(:require-macros [respo.macros :refer [html
head
title
script
style
meta'
div
link
body]])
(:require [cljs.test :refer-macros [deftest is testing run-tests]]
[respo.test.comp.todolist :refer [comp-todolist]]
[respo.render.html :refer [make-string]]))
I gave you this example before https://github.com/thheller/shadow-cljs-examples/tree/master/macros
Iâve been looking at setting up an auto-generated changelog (from commit messages) for maria, to be performed on release. something like that might be nice for shadow-cljs too
yeah mine can be much improved too. but makes it feel more worthwhile when the format can produce a changelog without any extra work
did you end up learning anything about thi.ng.math.macros
namespace? i wonder if his libs may actually not be that useful unless they are modified to be supported by the self-host compiler directly. (but unsure if that is related to why that namespace canât be found, seems like a different thing)
the only problem i can see with thi.ng.geom.core.macros.vector
is the :refer :all, that would be an easy PR if not for the org format
maybe the :exclude option is actively excluding the transitive macro deps of the entry instead of just ignoring them? subtle difference..
uploaded with a test case. if you uncomment this: https://github.com/mhuebert/shadow-bootstrap-example/blob/master/src/shadow_eval/user.cljs#L21
[:bootstrap] Build failure:
The required namespace "shadow-eval.b" is not available, it was required by "shadow_eval/a$macros.cljc".
I think that might be incorrect behaviour though, it should find the b.clj
when compiling as a macro
but really I couldnât find any documentation on how this is supposed to be resolved
it would make intuitive sense if the same resolution algo that was used to find a
was used to find b
For bootstrapped ClojureScript you could have any of these arrangements:
Runtime Code Macro Code
foo.cljs foo.clj
foo.cljs foo.cljc
foo.cljc foo.clj
you might actually mean thing.b
as in a normal namespaces that just contains functions and not macros
for the same reason we canât intermix defmacro into cljs files without breaking compatibility, we also couldnât use any other .cljs files in macro compilation stage
if you can confirm that (:require [thing.b])
in a macro should cause thing/b.clj
to be compiled as thing.b$macro
I can add that
IMO the moment it was decided to read macros written in ClojureScript (not Clojure) from .clj
files, programming became a kind of spiritually elevated art form
by splitting it the compiled code does not itself depend on the compiler or the macros
I think I get that part. but now in addition to using java-based clojure to write clojurescript macros, we also use JS-based clojure to write clojurescript macros with the same file extension⊠it would make more sense to me if tools like Planck did not support loading macros from .clj
files at all, because planck does not support JVM clojure
I canât really say anything about self-hosted. I never use it and donât know the particular details.
i think compilation passes got intertwined with language choice, and now we have a system where â.cljâ and â.cljcâ file extensions can no longer be taken at face value
from that thread > Why canât bootstrapped load this file with âmacros: falseâ and ignore all defmacro to load only functions and then load it with âmacros: trueâ and take only defmacro into account?
would that make sense? we would still have the problem that functions could not use macros defined in the same namespace. but that seems like a reasonable limitation
oh, the rabbit hole đ.
so for this
library it looks like he needs to rename that file to .cljc
, no real way around it
but from looking at the clj* source files (easy to follow with cursive) it doesnât look complicated
do you have a preference for whether i mention issues here vs. creating github issues?
when I was reading guide on clojurescript Wiki, I thought I should use :require-macros
, didn't even noticed there was a :refer-macros
.