This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-03-07
Channels
- # announcements (19)
- # babashka (19)
- # beginners (76)
- # bitcoin (2)
- # calva (1)
- # chlorine-clover (1)
- # cider (7)
- # clara (1)
- # clj-kondo (1)
- # cljsrn (1)
- # clojars (4)
- # clojure (139)
- # clojure-dev (65)
- # clojure-europe (2)
- # clojure-uk (2)
- # clojurescript (7)
- # community-development (3)
- # conjure (15)
- # core-async (5)
- # cursive (11)
- # data-science (9)
- # duct (6)
- # fulcro (4)
- # honeysql (12)
- # jobs (3)
- # jobs-discuss (3)
- # keechma (1)
- # malli (31)
- # meander (14)
- # midje (1)
- # off-topic (21)
- # pathom (6)
- # practicalli (3)
- # quil (7)
- # re-frame (10)
- # reitit (6)
- # slack-help (4)
- # tree-sitter (6)
- # xtdb (1)
I'm trying epsilon interpreter for the first time. I'm trying to create a searcher function that mimics the behavior of the m/search
expression. What am I doing wrong?
After doing a bit of source spelunking... Is scan
not supported in interpreter?
you should use the functions available in ns meander.epsilon.interpreter
not meander.epsilon
here is the declaration https://github.com/noprompt/meander/blob/epsilon/src/meander/interpreter/epsilon.cljc#L10
https://github.com/noprompt/meander/blob/epsilon/test/meander/interpreter/epsilon_test.cljc
So I’m not sure I’d go as far as to say that the tests cover 100%. We try our best, but testing and documentation are definitely lacking. There are a few things going on here. First the second argument to searcher is actually function that receives an environment. So you probably want rewriter.
((mi/rewriter '[_ ... ?a . _ ...] '?a) [1])
Second, it looks like scan
is having an issue. Seems that pred
is the root cause. I think I have a fix for it, but the area I know the least in meander, so will have to check with joel before I commit anything.
Hopefully can get the fix up on github today.Didn't get a chance to meet up with Joel on this. Will make what I think is the fix today and put a PR out.
Thanks!
Pushed up the fix. Should work in the next release.
Thanks!
Thanks!