This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # arachne (4)
- # beginners (70)
- # bigdata (1)
- # boot (373)
- # braid-chat (3)
- # cider (4)
- # cljs-dev (10)
- # cljsjs (6)
- # cljsrn (27)
- # clojars (11)
- # clojure (114)
- # clojure-austria (1)
- # clojure-czech (2)
- # clojure-dusseldorf (2)
- # clojure-greece (7)
- # clojure-italy (2)
- # clojure-nl (6)
- # clojure-russia (15)
- # clojure-serbia (11)
- # clojure-spec (92)
- # clojure-uk (5)
- # clojurescript (183)
- # component (9)
- # cursive (28)
- # datomic (36)
- # editors (4)
- # emacs (1)
- # garden (11)
- # hoplon (155)
- # lein-figwheel (7)
- # mount (47)
- # om (97)
- # onyx (25)
- # proton (3)
- # rdf (3)
- # re-frame (80)
- # reagent (9)
- # ring-swagger (9)
- # spacemacs (1)
- # untangled (145)
- # vim (2)
Hello everyone. I was wondering if there's a catch when one tries to define a macro in a hoplon project.
I created a macros.core file, the content of which seems to be compiled, e.g. I get different errors when changing the file 🙂
now, when you do
(:require [javelin.core]) in your own project you can use both the cljs definitions and the macros
They're basically merged into that same namespace, although of different compiler-origin?
So I should have no problem creating a macro for complex (defc=..) incantations.. It's just that my (ns..) stuff is probably wrong?
so most of the time macro expansion in clojure emits code that can be massaged to work automatically in clojurescript
Brilliant... I'll start with a web page on clojurescript macros then, to make sure I get the difference
I'll do that, thanks... Awesome to be working with something and being able to talk to developers...
oh btw, if you're going to be writing macros around javelin cells, do you already know about the
the idea being that the
formula function takes a function as its argument, and returns a formula cell constructor
so when you make macros you usually want to deal with the underlying real functions, rather than more macros
the benefit of working with functions instead of macros is that you're able to use all the lisp things, you can use
Which would be great, because I would want to use the macro with map, which I know to be impossible.
Thank you very much... Coming year I intend to make a living out of developing web applications, so I'm studying a lot now
Curious if anybody has done much SVG work with Hoplon? I’ve had a lot of success getting SVG working but <use> elements aren’t working. They work great if I serialize the HTML document I get from Hoplon into a static HTML file and open it from the file system, so I’m wondering if something about how the page dynamically renders is causing the issue.
How can I tell if (prerender) is doing anything different? I just added that to my boot dev task, reran boot dev, and I’m not seeing anything different...
Okay I’m getting a flash of what I expect to see with (prerender) although the client scripts seem to still replace all the content a fraction of a second later.
So the problem shows up again. But yea, it behaves differently with (prerender).
@keithsparkjoy I think it’s a problem with the
xlink:href attribute, editing your original code in browser (removing the use and then manually adding it) works!
yeah I think the issue is how it’s rendered, i dont know too much about svg but I imagine we need to implement namespaced keyword differently for XML style attributes
I think so. I think there’s actually an XML namespace definition for it in the extra dev-related goop that Hoplon puts in the output
You know how Hoplon pops up that little icon at the bottom when it detects a change and pulls the HTML resource again?
Hmm. Is there a way in Hoplon to emit an attribute without using the keyword syntax?
I think :foo:bar is a valid keyword in Clojure… I dunno - just built a little app with lein new app and ran (prn :xlink:href) and it didn’t choke at least 🙂
(keyword "Hello World") is valid but produces something you cant really use since there is a space
actually that fails for me still, probably because we still arnt using setAttributeNS
What you probably want is a custom attribute
(defmethod hoplon.core/do! :xlink:href [elem kw val] …)
yeah I think we can add something like that to the hoplon.svg namespace once we know it works