This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-10-30
Channels
- # announcements (15)
- # beginners (143)
- # boot (2)
- # calva (48)
- # cider (93)
- # cljsrn (2)
- # clojure (127)
- # clojure-europe (3)
- # clojure-italy (8)
- # clojure-losangeles (8)
- # clojure-nl (10)
- # clojure-spec (67)
- # clojure-uk (51)
- # clojurescript (20)
- # cursive (9)
- # data-science (2)
- # datomic (10)
- # duct (13)
- # figwheel-main (1)
- # fulcro (74)
- # instaparse (10)
- # jobs (3)
- # joker (8)
- # juxt (4)
- # lumo (1)
- # malli (11)
- # nrepl (3)
- # off-topic (4)
- # pathom (5)
- # pedestal (6)
- # planck (5)
- # re-frame (18)
- # reagent (5)
- # reitit (17)
- # shadow-cljs (165)
- # sql (30)
- # vim (12)
- # xtdb (6)
@d4hines the idea has been tossed around a couple times, but the only implementation I'm aware of is my experiment https://github.com/aengelberg/instagenerate which isn't super useable in practice.
My usage of core.logic was primarily motivated by a challenge to reverse-engineer output parse trees or fill in partial outputs. But if the main goal is to simply generate random inputs to a grammar (which most people really want), I think the implementation could be a lot cleaner, and leverage test.check.
The hardest part I think would be coming up with a good solution to lookahead and negative lookahead, while guaranteeing terminable generation...
I'm a noob when it comes to this stuff. Do you need lookahead for an EBNF grammar?
I don’t think so, it’s just a nice feature that sometimes people take advantage of
That's really cool!
Maybe this project is relevant https://github.com/cs-au-dk/dk.brics.automaton ? We used it to generate data, also from regexps
When I wrote a generator for regexes I intentionally didn't try to support lookaheadbehinds
But it seems like something you could support with the same caveats as such-that
(And have it fail the same way, rather than infinite loop)