Fork me on GitHub
sova-soars-the-sora13:07:24 Amazing sound/song by Burna Boy ... feels like summer in my heart

respatialized16:07:21 I didn't realize Java was about to add this feature. Are there plans to add recognition of these new string/text block literals to the Clojure compiler/interpreter?


clojure doesn't use the java compiler anywhere, so I don't see how it would be relevant


I guess the java compiler is used to compile clojure itself, but clojure doesn't really need string literals like that?


there's no clojure interpreter, the compiler turns all input into jvm bytecode before running it


I guess it would be clearer to say that eval turns input into bytecode before running it


(`compile` also exists, for when you want to write bytecode to disk instead of running it)


For me this is a text block 👀 (valid since 1.0/2008)

(def html "
    <p>Hello, world</p>


the difference is you need to escape \ I guess

Alex Miller (Clojure team)16:07:26

supporting multi-line text blocks has been requested, considered, and rejected multiple times in Clojure's history and we are not going to add it


I think the decision and possibly the rationale merits a faq entry :)

Alex Miller (Clojure team)17:07:14

the rationale is mostly a) we've done fine without it and b) would break all Clojure parsers in existence

💯 3

String as a datatype is also bad, you are better off using clojure collection literals containing strings and writing your io functions to take collections of strings instead of using big string literals

👍 3

(string is immutable without structural sharing, copy on write)


my two least favorite API decisions are concretizing File for input / output and String for the result of accessing input / source data to output

Alex Miller (Clojure team)17:07:04

clojure.string fns all depend only on CharSequence by design

Alex Miller (Clojure team)17:07:24

but I'm sure there are many less careful places

Alex Miller (Clojure team)17:07:24

but I'm sure there are many less careful places


cargo cult unixism?


I like Erlangs IOLists


It was so nice that they can be nested but also “invalid” in the general list sense for the sake of efficient IO and avoiding expensive copy operations.


I keep intending to play with erlang


It’s fun. Elixir gives it a Clojurey spin too.


my current "new language" project is assembler (learning ARM assembler and reading TAOCP), but erlang is definitely on the list


What, no VM? Crazy 😜


what I'm seeing is that a lot of what I'm learning (especially via TAOCP) applies to the jvm (via the lib that clojure uses to compile classes), luajit, wasm - there are a lot of things that provide APIs that try to look like a CPU architecture, and its useful for debugging, security, or getting highest performance possible from tight spots in code


I'm thinking about making some lisp helpers to generate assembly code, and I'm realizing that path leads to making a bootstrapping compiler after a few steps


Heh, I’ve done assembly etc back in uni days. The most recent thing was an Advent of Code puzzle that had you implement a CPU of sorts to run a small program, and the next step was to actually write a debugger to optimize a program that would otherwise take years to finish :)


Great fun, but too far removed from information systems for humans which is what interests me work wise :)