This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-09-22
Channels
- # 100-days-of-code (1)
- # beginners (51)
- # carry (1)
- # cider (10)
- # clojure (71)
- # clojure-conj (4)
- # clojure-dev (9)
- # clojure-italy (3)
- # clojure-nl (2)
- # clojure-russia (8)
- # clojure-uk (16)
- # clojurescript (42)
- # cursive (4)
- # datomic (2)
- # emacs (8)
- # figwheel-main (7)
- # fulcro (20)
- # hyperfiddle (5)
- # jobs (2)
- # off-topic (16)
- # om-next (4)
- # onyx (9)
- # powderkeg (1)
- # re-frame (8)
- # reagent (17)
- # reitit (41)
- # robots (6)
- # rum (1)
- # shadow-cljs (54)
- # testing (3)
- # tools-deps (19)
random thought, if there was a wrapper around a C STM system, eg http://www.tmware.org/tinystm.html , could one implement clojure like concurrency primitives and load them as dynamic modules https://github.com/emacs-pe/emacs-modules ?
I don't see why not
asked on irc, general consensus is that STM isn’t that beneficial without accompanying immutable data structures
asked on irc, general consensus is that STM isn’t that beneficial without accompanying immutable data structures
hey, question. I'm doing this so that a plugin that expects a single symbol actually picks one from a random list, it seems to work but was wondering if this is the proper way. I basically want a function to be evaluated where a variable is expected.
(defun pick-random (list)
(nth (random (length list)) list))
(use-package circadian
:ensure t
:config
(let ((dark-themes '(spacemacs-dark material-dark sanityinc-tomorrow-eighties))
(light-themes '(spacemacs-light material-light gandalf sanityinc-tomorrow-day otmos-softer soft-morning)))
(setq circadian-themes `(("8:00" . ,(pick-random light-themes))
("19:00" . ,(pick-random dark-themes))))
(circadian-setup)))
this seems to work, though i'm pretty sure it doesn't evaluate each time since it evaluates only once at startup
Ah, I got you now. I don't think want a function to be evaluated where a variable is expected
is feasible. You'd have to open a PR against circadian to make things more dynamic
I figured, I thought elisp had some magic hybrid function/variable