Fork me on GitHub
#hoplon
<
2017-10-13
>
alandipert03:10:43

i have enjoyed combining instaparse and javelin

cjsauer14:10:16

>instaparse I hadn't seen that before. Looks pretty interesting.

cjsauer14:10:44

Have you tried clojure.spec at all? Are they in the same space?

flyboarder15:10:27

@cjsauer I have used spec and current am the one adopting it for hoplon, it works well, however keep in mind the runtime overhead

alandipert15:10:00

cjsauer i haven't used it, different spaces tho. instaparse is about parsing strings, not clj data

dm316:10:46

instaparse creates a text parser from a grammar specification

dm316:10:21

clojure.spec is a type specification toolkit which allows for later data validation/generation

alandipert17:10:02

oh yeah, that's an important difference, the generative part

alandipert17:10:26

instaparse can parse strings given a grammar, not generate conformant strings

alandipert17:10:38

...altho i think an experimental fork of it can iirc

dm317:10:56

they’re both like regex on steroids

dm317:10:02

only instaparse is geared towards text

dm317:10:12

and spec towards data

alandipert17:10:37

i had a pretty awesome time last year making a simple compiler with instaparse + core.match, https://github.com/alandipert/lbbasic/blob/master/src/lbbasic/compiler.cljs

alandipert17:10:04

https://www.youtube.com/watch?v=cpixR_pwltQ shows it in action. i need to pick up on that again, so much fun