This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-03-12
Channels
- # announcements (65)
- # aws (1)
- # babashka (12)
- # beginners (111)
- # bristol-clojurians (1)
- # cider (32)
- # clj-kondo (55)
- # clojars (3)
- # clojure (71)
- # clojure-europe (17)
- # clojure-france (4)
- # clojure-italy (36)
- # clojure-losangeles (8)
- # clojure-nl (6)
- # clojure-uk (115)
- # clojurescript (2)
- # datomic (99)
- # fulcro (32)
- # graalvm (12)
- # graphql (20)
- # hoplon (203)
- # meander (56)
- # mount (3)
- # off-topic (17)
- # pathom (17)
- # reitit (22)
- # shadow-cljs (32)
- # spacemacs (9)
- # tools-deps (19)
- # vim (25)
- # vscode (3)
vim-iced supports socket-repl completion for babashka: https://twitter.com/uochan/status/1237852655025704960
Is there an easy way to get a minimal macroexpansion example in sci? I'm trying stuff like this:
...
(:require [sci.impl.interpreter :as scii]
[sci.impl.opts :as opts]
[sci.impl.analyzer :as ana])
...
(scii/macroexpand (opts/init {}) `(when true "f"))
=>
Error: No protocol method HasName.getName defined for type null:
Actually I just got it,
(vars/with-bindings
(when-not @vars/current-ns
{vars/current-ns opts/user-ns})
(scii/macroexpand (opts/init nil) `(when true "f")))
Can't you do:
user=> (require '[sci.core :as sci])
nil
user=> (sci/eval-string "(macroexpand '(when true \"f\"))")
(if true (do "f"))
?(I basically need this: https://github.com/hoplon/javelin/blob/master/src/javelin/core.clj#L211)