nbb

borkdude 2023-01-28T13:59:09.592129Z

300 people in this channel, 🎉

💯 4
3️⃣ 3
ray 2023-01-28T18:01:31.276149Z

don't tell @jmglov

borkdude 2023-01-28T18:55:26.787719Z

@jmglov ^

lispyclouds 2023-01-29T11:48:20.577329Z

nothing to see here @jmglov

Marcelo Fernandes 2023-01-28T00:01:02.930219Z

[SOLVED] I'm trying nbb for the first time and getting this error when trying to use markdown-clj. I created https://github.com/marceloschreiber/nbb-markdown that reproduces the issue. Am I missing something?

borkdude 2023-01-28T08:44:24.964639Z

I’ll have a look at the repro but for nbb it might be better to use commonmark from npm implemented in JS

borkdude 2023-01-28T08:44:41.170789Z

Or any other popular JS markdown lib

borkdude 2023-01-28T10:54:15.089669Z

It seems that in CLJS only the md-to-html-string*` var exists: (prn (md/md-to-html-string* "#Hello")) works. See https://github.com/yogthos/markdown-clj/blob/288a19b983b06fa1b12a99f0773956e420f998e4/src/cljs/markdown/core.cljs#L42

👀 1
borkdude 2023-01-28T10:54:54.150939Z

still I think using an npm markdown library is better for nbb since it's more performant to use

Marcelo Fernandes 2023-01-28T13:49:25.402729Z

thanks @borkdude! Good to know about the performance difference. Not something that I care for now. Is it common for libraries to have different var names between clj and cljs? I expected them to be the same and I'm curious if there is a reason for them not to be.

borkdude 2023-01-28T13:49:50.489099Z

It's not that common, it may just be an oversight in that lib

borkdude 2023-01-28T13:50:33.695759Z

performance but also startup time: processing cljs code at startup vs reading a JS lib (which may or not be faster)

Marcelo Fernandes 2023-01-28T13:52:55.923129Z

I saw that the README has two sections: Usage Clojure and Usage ClojureScript. But I totally skipped reading the heading name 🙂

👍 1
Chris McCormick 2023-01-28T03:32:29.100919Z

Are you using npm install markdown-clj to install it? If so you may need to add it to your classpath manually.

Chris McCormick 2023-01-28T03:33:37.156849Z

Oh never mind, I just looked at your repro, sorry.