Fork me on GitHub
#clojure-europe
<
2021-11-05
>
borkdude07:11:08

Swedes: congrats on the new ABBA album ;)

🕺 4
🎶 3
1
dharrigan08:11:54

Good Morning!

Rachel Westmacott10:11:46

Does anyone else find themselves missing some kind of Closeable protocol in Clojure?

Jakub Holý (HolyJak)10:11:27

I recently did, I think. Would be nice to have one, and with-open working with that. I can impl the java interface but that is not as convenient.

Rachel Westmacott10:11:31

We've ended up creating our own protocol, so we can extend it to things we want, and our own with-resources macro that's very reminiscent of with-open in it's implementation.

Rachel Westmacott10:11:42

It handles java AutoCloseable things too

Rachel Westmacott10:11:23

thanks @U051H0N54 - that's pertinent.

1
mpenet12:11:39

(late) morning

mpenet13:11:07

a neat trick you can do with emacs : use htmlize on the cli on clj files direclty, then you get basically what emacs would show you, and it's fully static, no js involved

mpenet13:11:30

I used to do this for presentations when I didn't want to bother using more heavy solutions

borkdude13:11:54

@U050SC7SV hmm, that sounds familiar, I'll take a look.

mpenet13:11:34

package htmlize, you can test it with htmlize-region, it opens a buffer with html with css inlined

mpenet13:11:54

it's primitive but it works

mpenet13:11:58

I suspect you can do the same with org

borkdude13:11:22

I think I used that way back when I wrote a course in clojure and published the course material using org mode

mpenet13:11:59

my goto for presentations was htmlize + google presentations

mpenet13:11:10

"low tech" solution

borkdude13:11:51

my lower tech solution is to take screenshots haha

😝 1
genRaiy14:11:28

very nice work

genRaiy14:11:33

it would be even easier to include the code-mirror itself but I suppose that you don't want users to pay a download cost?

borkdude14:11:23

@U04V5V0V4 you mean load these libs from a CDN + a small JS script? yeah that's also possible perhaps

borkdude14:11:53

but this is going to double the size of the downloads since I'm using only about half of codemirror and in the future probably even less

genRaiy14:11:14

sure, makes sense

genRaiy14:11:00

just saying, download size is probably not going to be the thing that pisses off your users :)

borkdude14:11:46

I just don't want to include 2MB of JS for highlighting. Everything has a price

borkdude14:11:55

or did you see anything obvious in my blog that will piss people off, that I missed myself? :-D

genRaiy14:11:42

lol no, you're smooth

genRaiy14:11:48

I know everything has a price ... that's also my point: there is a cost to break something apart and take care of it yourself. In this case you were happy to pay that price and that's cool.

borkdude14:11:48

I don't expect this JS file to have many changes in the future and I wanted to get a better grasp of this library anyway, so it was fun to do :)

genRaiy14:11:14

that's always the best sort of price 🙂

borkdude10:11:11

I got it down to 200kb (79kb gzipped) now. Updated blog post. https://blog.michielborkent.nl/better-clojure-highlighting.html

slipset15:11:58

No borkwatch in this weeks deter?!??!???

borkdude16:11:11

Don't worry, borkdude is watching you.

metal 4
👀 4
🥷 1
😂 1
lread14:11:00

We are the bork, resistance is futile, you will be assimilated.