This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-10-28
Channels
- # announcements (5)
- # babashka (7)
- # beginners (101)
- # biff (9)
- # calva (46)
- # cider (6)
- # clj-yaml (2)
- # cljsrn (13)
- # clojure (11)
- # clojure-europe (43)
- # clojure-nl (13)
- # clojure-norway (22)
- # clojurescript (20)
- # conjure (1)
- # cursive (7)
- # data-science (2)
- # datomic (26)
- # emacs (38)
- # graphql (27)
- # gratitude (5)
- # hoplon (8)
- # hugsql (22)
- # humbleui (2)
- # hyperfiddle (6)
- # introduce-yourself (8)
- # joyride (3)
- # lsp (79)
- # malli (6)
- # nbb (67)
- # portal (16)
- # rdf (27)
- # reagent (42)
- # releases (2)
- # remote-jobs (1)
- # shadow-cljs (36)
- # test-check (17)
- # tools-deps (1)
- # xtdb (15)
Good morning!
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.
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 )
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 😉
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
I spent the first 3-4 years of my work years wrangling text reports. Had my fill of regex, sed, awk,
I have on my TODO to make a library bringing awk semantics to Clojure. It is the missing piece!
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
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. 😃
had my share of those sed/awk too… for extracting and analysing log files in production
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
(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)
As I see it: awk is great for awk shaped problems, wether the solution is sophisticated or not
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. 😃