Fork me on GitHub
#clojure-europe
<
2021-10-17
>
genRaiy10:10:13

hmm I quite like that mipsell

Jakub Holý (HolyJak)18:10:56

We do not have mornings on Sundays here in Norway troll

pez19:10:34

Morning!

genRaiy19:10:13

today parsing clojure using spec/conform with clojure.core.specs.alpha specs seems quite nice and very simple … @borkdude or @dominicm … why am I wrong?

borkdude19:10:32

not wrong, just alpha

genRaiy19:10:01

I’m an absolute nutter

borkdude19:10:02

also, depends what you want. whitespace preservation doesn't work with pure s-expressions for example

seancorfield19:10:18

Bear in mind that Spec isn't optimized for parsing so it may not be a very efficient way of "parsing".

borkdude19:10:24

performance can also be a condideration (it might be faster to manually process the s-expr, depends on what you're doing)

borkdude19:10:49

@seancorfield wasn't that more specifically about text (string) parsing though?

genRaiy19:10:08

er, clojure namespaces aren’t usually that big

genRaiy19:10:33

main point for me is that it’s very little code / learning curve to get a lot of data about the current ns

borkdude19:10:54

nothing wrong with it.

borkdude19:10:25

clojure itself runs these specs during macro-expansion (but afaik only for validation, the data itself isn't used for anything in the compiler, since that all pre-dates spec).

genRaiy19:10:43

yes that’s what gave me the idea

genRaiy19:10:54

not that it’s a new idea

seancorfield19:10:45

Right, yeah, it's just a matter of scale -- how much code are you parsing and how much do you care about performance.

genRaiy19:10:08

:thumbsup::skin-tone-3: