This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-04-02
Channels
- # announcements (2)
- # beginners (32)
- # boot (10)
- # calva (81)
- # cider (39)
- # clojure (56)
- # clojure-europe (8)
- # clojure-italy (7)
- # clojure-new-zealand (1)
- # clojure-nl (8)
- # clojure-poland (1)
- # clojure-spec (12)
- # clojure-uk (38)
- # clojurescript (5)
- # community-development (1)
- # core-async (55)
- # cursive (3)
- # datomic (44)
- # dirac (15)
- # emacs (20)
- # events (1)
- # fulcro (57)
- # hyperfiddle (2)
- # jobs (9)
- # juxt (9)
- # kaocha (1)
- # lein-figwheel (1)
- # off-topic (93)
- # pathom (2)
- # pedestal (3)
- # planck (3)
- # reitit (15)
- # ring (10)
- # shadow-cljs (25)
- # spacemacs (7)
- # sql (19)
- # tools-deps (8)
@mfikes: Sorry to ping you but I've been trying to figure this out on my own to no avail. I have two questions relating to the form_prompt()
function in planck-c/repl.c
.
(1) Why is the number two subtracted from the namespace length?
(2) What significance does the #_
have in the sprintf()
call? It doesn't seem to be a formatting character as best as I can tell but it presumably does something. I looked at linenoise.c
and it doesn't seem to be part of the API there either.
@mike858 That's all related to the secondary prompt
cljs.user=> [1
#_=> 2
012345678901234
In this case, cljs.user
has a length of 9, and the space before the #_
has a length of 9 - 2 = 7. (This is where the 2
comes from in the code.)
The length of "#_=> "
is 5, and adding an extra for the trailing \0
, you get 6, the other constant 6
you see in that bit of code.