Fork me on GitHub
#beginners
<
2023-04-25
>
James Amberger18:04:52

what's status of spec2?

2
Alex Miller (Clojure team)18:04:15

we've done a lot of work on it but stalled out on integration with function definitions so it is not actively in work at this moment (but we do intend to get back to it)

Richie18:04:24

There's no channel for zprint. Can I configure it to print a string as a multi-line string instead of inlining newlines? e.g. not "foo\nbar" but

foo
bar

Richie18:04:39

Or any library actually.

dpsutton18:04:58

what about just printing it?

(println "foo\nbar")
foo
bar
nil

dpsutton18:04:10

but note,

foo
bar
and foo\nbar are identical:
card=> "foo
bar"
"foo\nbar"
card=> (= "foo\nbar" "foo
bar")
true

Richie18:04:43

I made a big map with config files as strings. It looks fine there because I wrote it but I want to print it readably.

Richie18:04:26

When I say "print" I actually mean "spit to a file".

Richie18:04:27

I'll check out rewrite-clj. I haven't used it but maybe it can work. I don't know what it was you said but you gave me that idea.

dpsutton18:04:34

> {:output {:real-le? true :real-le-length 20}} are the things that control it. Where :real-le stands for “real line ending”, as it works for more than just newlines

Richie18:04:04

Woa! I didn't see that!