Fork me on GitHub
#practicalli
<
2021-08-16
>
zackteo13:08:24

Hello, was re-purposing your REPL example here - https://youtu.be/rQ802kSaip4 for a presentation I am planning to do on Clojure. I realised there seems to be some issues here - https://practical.li/clojure/simple-projects/data-transformation/most-common-word.html . The regex doesn't seem to work right compared to (re-seq #"[a-zA-Z0-9|']+") (perhaps because my example text has apostrophes. But I also there's something wrong with (slurp "") not sure if it is just me :thinking_face:

Alex Miller (Clojure team)14:08:29

on the last, looks like it's https now, also it's gzipping by default so slurp isn't going to work

practicalli-johnny17:08:07

@zackteo I can fix the gzip with a bit of java interop... give me 10 mins 🙂

practicalli-johnny18:08:37

The tutorial now decompresses the book from Project Guttenburg so that it can be processed. Interestingly enough the code does still produce a result in the right shape even though the book is compressed. However the actual values in the data structure are not what we are looking for :rolling_on_the_floor_laughing: The simple version of the regex works now I've typed it properly, I had a space after w which obviously breaks things a bit. Just pushing a new version of the book now, so should be ready in about 5 minutes https://practical.li/clojure/simple-projects/data-transformation/most-common-word.html