Fork me on GitHub
#clojure-europe
<
2022-10-28
>
pez07:10:33

Good morning! :the_horns:

borkdude 9
metal 9
🪨 3
emilaasa07:10:39

Good morning pez! Hope you have a great day 🙂

❤️ 1
lread12:10:24

qwerty, dvorak or metlgd?

😅 1
thomas07:10:31

Morning TGIF!!!

reefersleep08:10:08

Good morning!

simongray11:10:38

I love regex so much. I remember when I was first starting to make websites in PHP and some guy on the gamefaqs web design forum was throwing shade on my first attempt at a blog because I used basic string substitution code, which set me on the path to learning regex way back in the day.

simongray11:10:52

Now I use regex almost daily in my professional work.

💯 2
mccraigmccraig11:10:44

just don't be trying to parse html with regex ! (i was reminded of: https://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags )

🤯 1
😂 1
simongray12:10:09

I actually wrote a parser last year since I needed one that was .cljc compatible, although it was for XML not HTML: https://github.com/kuhumcst/cuphic/blob/master/src/dk/cst/cuphic/xml.cljc not using regex obviously 😉

😅 1
gklijs06:10:25

Related to that I recently changed the lexer I use for a project. It's great when just a regex won't suffice. https://github.com/maciejhirsz/logos

❤️ 1
Ben Sless13:10:06

I spent the first 3-4 years of my work years wrangling text reports. Had my fill of regex, sed, awk,

👀 1
pez13:10:33

Someone said awk! 😃

pez13:10:09

I have on my TODO to make a library bringing awk semantics to Clojure. It is the missing piece!

Ben Sless14:10:40

We already have tech ml dataset. What's missing?

pez14:10:46

tech ml what? 😃

teodorlu14:10:49

Tablecloth might also be worth a look - it's a thin interface on top of tech.ml.dataset. I'm not too conformable with AWK, but I prefer tablecloth/tech.ml to numpy :) https://github.com/scicloj/tablecloth#usage-example

pez14:10:29

Didn't know about that. Looks nice! Must play with it a bit to see if I miss enough from awk to keep that TODO item. 😃

teodorlu14:10:48

Or just make the AWK library anyway just 'cause 🤓

😍 1
Ben Sless15:10:18

Call it awk-ward 😄

😁 1
2
lemontea14:10:20

had my share of those sed/awk too… for extracting and analysing log files in production

lemontea14:10:38

(cue the “now you have two problems” joke)

lemontea14:10:58

(but then, I guess those are the “good old days” - nowadays it’s ELK/EFK…)

pez14:10:08

Never understood that joke, tbh.

pez14:10:55

Why solve regex shaped problems w/o regexes?

lemontea14:10:30

I think the joke’s referring to when one’s abusing the power of awk to do things so sophisticated that a “proper” program may be more appropriate

lemontea14:10:05

or just abusing the ability to inline the whole program as a command line argument

lemontea14:10:15

aka one-liner

pez14:10:08

I only recall that joke being used in regards to regular expressions.

👀 1
lemontea14:10:35

memetic variants? lol any sufficiently successful meme’s gonna have many spin-offs

lemontea14:10:53

maybe “Turing’s tarpit” sum up the whole argument

pez14:10:07

Some things sound so cool/fun that people attribute truth to them without reflecting.

lemontea14:10:06

(but then, we have things like code-golf, packing a whole game into a QR code, or 3D demo inside some really small code, and I can appreciate those)

pez14:10:24

As I see it: awk is great for awk shaped problems, wether the solution is sophisticated or not

pez14:10:11

So are shell scripts. Though, I've written my share of unreadable scripts.

pez14:10:44

Lately, I've found myself rewriting some stuff using Babashka, even though most awk scripts grow significantly from that. But one of these has interactive programming, the other hasn't. And we're at where I think Clojure should be blessed with more awk-like semantics. 😃

👍 1
lemontea14:10:11

clojure and awk, each on their own, is already fairly powerful… and when you combine them…

lemontea14:10:03

there’s goin’ to be fireworks