This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-08-30
Channels
- # aws (2)
- # beginners (139)
- # boot (9)
- # cider (1)
- # clara (2)
- # cljs-dev (35)
- # cljsrn (3)
- # clojure (112)
- # clojure-dusseldorf (9)
- # clojure-greece (6)
- # clojure-italy (13)
- # clojure-russia (160)
- # clojure-seattle-old (1)
- # clojure-uk (79)
- # clojurescript (85)
- # clojutre (1)
- # community-development (11)
- # core-async (32)
- # cryogen (2)
- # cursive (5)
- # data-science (16)
- # datomic (2)
- # events (1)
- # fulcro (29)
- # funcool (1)
- # graphql (4)
- # immutant (5)
- # instaparse (20)
- # jobs (2)
- # juxt (6)
- # leiningen (11)
- # luminus (21)
- # lumo (1)
- # off-topic (7)
- # onyx (20)
- # parinfer (33)
- # pedestal (4)
- # re-frame (41)
- # reagent (34)
- # ring-swagger (14)
- # rum (5)
- # spacemacs (9)
- # specter (11)
- # sql (14)
- # test-check (3)
- # yada (20)
In clojurescript with defparser, Im guessing the regexes are read wrongly, with insta/parser I get in my willingly generated token error
{:tag :regexp,
:expecting #"^[0-9]+\.?[0-9]*"}
in same error via defparse
{:tag :regexp,
:expecting #"^\/^[0-9]+\.?[0-9]*\/"}
both originating from
<digit> = #'[0-9]+\\.?[0-9]*'
my first question should be, does some other clojurescript user experience this, as Im running my forked version of Instaparse 1.4.7 running on lumo.
Instaparse is known to have some bugs on Lumo
because Lumo behaves weirdly with cljc files
yes, I know, I've fixed those on my fork and it's effectively working fine, just this one error with regexes, so Im only guessing this is unrelated.
since defparse
is evaluated at macro-time, not runtime, my guess is that Lumo trying to execute code on ClojureScript that was meant to be run on Clojure
The regexp
combinator in particular has special logic when run on ClojureScript https://github.com/Engelberg/instaparse/blob/master/src/instaparse/combinators_source.cljc#L93
which might be why you're only running into this now
also maybe try not using defparser
and see if that fixes it
yes, that fixes it, I want to use defparser for the performance it brings, Im using the parser to evaluate musical expressions in realtime music application
makes sense.
also that sounds cool, is your application similar to https://github.com/alda-lang/alda ?
The Adlaphone: a musical instrument for programmers
only very partially similar to Alda, the use of parser is very limited, and only an extra feature Im implementing atm.
more about native datatypes Im sending to Csound, audio processing language, and make simple repetitive patterns.