This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # announcements (5)
- # architecture (1)
- # bangalore-clj (4)
- # beginners (45)
- # boot (4)
- # cider (19)
- # clojure (56)
- # clojure-austin (1)
- # clojure-canada (1)
- # clojure-finland (1)
- # clojure-russia (67)
- # clojure-uk (2)
- # clojurescript (57)
- # clojutre (1)
- # cursive (15)
- # datomic (3)
- # emacs (2)
- # figwheel-main (71)
- # fulcro (117)
- # hoplon (33)
- # java (5)
- # off-topic (52)
- # pedestal (7)
- # remote-jobs (1)
- # shadow-cljs (134)
- # slack-help (9)
- # specter (1)
- # tools-deps (17)
- # vim (2)
Anyone remember how to get a macro to emit a syntax quote? E.g. I need:
(macroexpand '(m f))
(I’ve got a macro that needs to emit a call to a macro that wants a FQ symbol)
Figured it out: 1. resolve to a var 2. Get the metadata on the var which has ns and name 3. Recombine those into a symbol If there’s a better way, love to hear it
&env for cljs, and the other way for clj…that seemed to work
(defmacro main-macro [& forms] (let [sym (first forms) nspc (or (some-> &env :ns :meta :source) (some-> (resolve sym) meta :ns str)) fqsym (symbol nspc (name sym))] `(other-macro (quote ~fqsym))))
doc macro ends up forming the qualified name of the symbol passed to it. It may be similar to your solution. It calls
(ana-api/resolve &env name)
I stumbled upon the derivatives cljs library (https://github.com/martinklepsch/derivatives), the readme of which says "Let's assume you're hooked about the idea of storing all your application state in a single atom (db). (Why this is a great idea is covered elsewhere.)" Does anyone know some particular places this is discussed? Why is one big atom better than many small atoms?
You end up with intractable situations trying to reconcile state between different, uncoordinated locations
and for being able to do cool things like time travel for a whole app, it helps to have every piece of state in the app under one coordination mechanism
and any given state of an app at any given time can be reproduced by a dump of it's one state graph
If your not talking about fast, ephemeral supply chain assets or something. But software/hardware catalogs whose items change no more often then every day or so, where you know you'll never run out of memory, you might as well use Datomic. Datomic Ions might be a good fit for a lightweight web service around it https://docs.datomic.com/cloud/ions/ions.html
And there's lots of tutorials and videos on how to get connected to a Datomic DB from Clojure
And you'll get to continue dealing with more clojurey data structures, rather than having to deal with SQL tables and whatnot
I work on a government project, so we would need to push to the government AWS or government Git. But also, right now it's just a single server and a database server with postgres. So I guess I'm asking if we can keep the solution local, rather than cloud-based?
mmm, ions is mostly a cloud thing. But it probably works on govt cloud. There's on prem Datomic too. But if you've gotta use postgres, it is what it is 😕
That for every page, that's a table in a Postgres database. And for every input, that's a column.
Some inputs are multiselect, but that just means saving a list in a cell in the db. No big deal.
And that it would call a clojurescript routine to add the column to the db if it doesnt exist
hi everyone. I’m looking for a good time library for clojurescript. I’m reading
cljs-time documentation at the moment and I can’t find anything that would output something like
3 days ago or
in 6 hours and etc.
Haha, actually I just lied to you. 😉 In that particular case I needed localization and wrote my own function. It wasn’t that bad. https://github.com/lipas-liikuntapaikat/lipas/blob/master/webapp/src/cljs/lipas/ui/utils.cljs#L82-L101
and I was returning a timestamp. so I was basically juggling PHP, js and clojure dates together
I’m storing and transmitting timestamps in ISO format (“2018-08-26T14:06:25.443Z”), always in UTC.
Hi, for a small
reagent SPA i need a component to display an alert/popover.
Currently i am considering
re-com but i am not sure which one to prefer.
Does anyone have experience with them and can provide me some guidance?