This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-07-21
Channels
- # beginners (55)
- # cider (13)
- # cljdoc (4)
- # cljsjs (1)
- # clojure (11)
- # clojure-spec (7)
- # clojure-uk (9)
- # clojurescript (42)
- # docs (5)
- # figwheel-main (9)
- # fulcro (4)
- # graphql (4)
- # hoplon (27)
- # keechma (32)
- # leiningen (11)
- # luminus (2)
- # nyc (2)
- # off-topic (73)
- # parinfer (1)
- # re-frame (36)
- # reagent (2)
- # reitit (6)
- # ring-swagger (3)
- # shadow-cljs (51)
- # spacemacs (4)
- # tools-deps (17)
- # uncomplicate (1)
A couple weeks ago I found a really good web page describing exactly how javelin macros expand but I neglected to book mark it, its out of my history and I can't seem to find it anymore. Does anyone know which page I might have been looking at?
Also, I'm in a cljs repl and I try and (javelin) mx a simple defc= and it simply returns the original form, but when I do a defn it expands it. Any idea why?
@vigilancetech the macroexpansion seems to work for me:
user> (macroexpand '(defc= x "hi"))
(def x (javelin.core/cell= "hi"))
user> (macroexpand '(cell= x "hi"))
(let* [c__26127__auto__ (javelin.core/cell= x)] (set! (.-update c__26127__auto__) "hi") c__26127__auto__)
I’m building a website for a non-profit I am a part of, and I was hoping of writing it in Clojure/ClojureScript. The only requirement is that it have a CMS or some other way for someone who is not very technical to update the website. Would this be a good use case for Hoplon?
@joshua.d.horwitz i'm biased towards the use of hoplon as much as possible, but realistically it is still a library aimed at developers. You could maybe do a light weight wrapper in hoplon for something like prismic (https://prismic.io/) that i think gives users a nice content editing platform and provides you an api to access the content.
realistically i think if you're looking for a hands off thing you can install and point users to (like wordpress) i don't think there's a great clojure/clojurescript option for that yet, reluctant as i am to admit it.
No problem! Thank you, I might just write it in Hoplon
if you're doing complex custom development stuff that's where you really gain a ton of leverage from cljs
@jjttjj here's what I get
(macroexpand '(defc= x "hi"))
(defc= x "hi")
cljs.user> (macroexpand '(cell= x "hi"))
(cell= x "hi")
cljs.user> (macroexpand '(defn foo [x] (+ x 2)))
(def foo (cljs.core/fn ([x] (+ x 2))))
cljs.user>
Is it best just to work through the docs on the website?
I’m newer to Clojure/ClojureScript
@jjttjj ahh, I had javelin renamed as "j"
this is making me think the macro not existing should probably throw an error in macroexpand
@joshua.d.horwitz https://github.com/hoplon/hoplon/wiki/Get-Started is probably a good place to start and there's a lot of good stuff in that wiki, though it definitely is sort of in need of some re-organization
https://github.com/hoplon/demos has some good demos to look at too. some are old but they mostly should still work
hoplon is really just a couple really simple rules and then a couple edge cases you have to eventually learn
I'd still like to find that web page that went into detail about exactly how/why the javelin macros expand tho
Thanks, I’ll start working through it