This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-10-28
Channels
- # beginners (45)
- # boot (4)
- # cider (5)
- # cljs-dev (8)
- # cljsrn (4)
- # clojure (38)
- # clojure-conj (7)
- # clojure-dev (4)
- # clojure-russia (3)
- # clojure-spec (20)
- # clojure-uk (3)
- # clojurescript (28)
- # core-logic (29)
- # figwheel-main (10)
- # fulcro (2)
- # onyx (1)
- # other-languages (5)
- # parinfer (3)
- # pathom (98)
- # portkey (1)
- # reagent (15)
- # reitit (9)
- # shadow-cljs (22)
- # spacemacs (10)
- # sql (22)
- # tools-deps (1)
Hi, maybe I’m reinventing the wheel here, but I wanted to bounce an idea in this channel. I wrote a simple sugary macro for code trying to do state monads. It looks good so far on some toy examples. Just wanted to ask if you think it is a bad idea and what potential drawbacks I could introduce by using this heavily. Or maybe you know some library or code which does a similar thing and is already battle tested. https://gist.github.com/darwin/883b9fd2b9012d79d4bbb14a641d36ab, for context: inspired by @tbaldridge’s post here https://www.reddit.com/r/Clojure/comments/8pyxk8/motivation_for_monads/e0gb6on, please respond in a threaded conversation, thanks.
hey, does anyone remember this talk in which, the speaker was coding live, showing off how easy it is to consume an http api and do something cool with the data using Clojure?
Should this be allowed? (let [new 45] new)
Because new
is a special form.
(let [new (fn [] 10)] (new Exception))
For this thing, Clojure becomes a Lisp-2. 😄
Any tools out there to help navigate large clojure projects? I mean like a rough outline of defined vars in a tree format, preferably using static analysis
Is such a weird difference in behaviour of nested macros vs. macro + eval normal? https://gist.github.com/zilti/f008287e05cefda634710361eea8860d
it is kind of a special quote that is useful for writing macros, but it isn't a macro
your let likely is something that should be done at macro expand time (shouldn't be part of the macro expansion)
hrrm, I am not sure, it looks kind of like you are trying to mix things that happen at macroexpand time with information that isn't known until runtime, which will never work
I need the argument instance
to get resolved, and the only way this seems to be possible is when it's part of the expansion
The problem this macro has (the one at the bottom) is that it screws up creating the proxy
macro. I get an error about cons
not being able to get cast into what it wants
sometimes you are doing something really complicated, but it is really rare, the most common case is macros that expand in to macro definitions
usually if something looks like a nested quote, it is really a quotation with another quotation spliced in at the same level of quoting
the nested quoting in your connect function means you get something like (.setSomeMethodName instance '(proxy ...))
I would suggest instead of using eval taking and step back and looking at what you are trying to do and finding a different strategy