This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-05-27
Channels
- # aleph (1)
- # beginners (48)
- # cider (34)
- # clojure (27)
- # clojure-dev (15)
- # clojure-uk (21)
- # clojurescript (27)
- # data-science (3)
- # datomic (10)
- # instaparse (30)
- # lumo (85)
- # off-topic (3)
- # perun (2)
- # portkey (24)
- # re-frame (13)
- # reagent (17)
- # ring (1)
- # shadow-cljs (77)
- # spacemacs (1)
- # test-check (3)
- # yada (4)
👋 Hi everyone!
btw, http://instaparse-live.matt.is/ is awesome
@loganpowell Why not just read the clojure code as data? I mean lisp code IS data, there's no need to deal with string parsing
how would I pull out the pieces of the function definitions as strings?
I'm converting it to markdown
haha, I'm very stupid. That's a great idea
ok, so I get the string that way, then how do I pull out the specific parts of that string that I need?
hmm... let me give that a shot!
@loganpowell if you need more advanced code analysis, check out tools.analyzer
I'm using cljs, works the same?
is reader
a part of core or do I need to add it as a :dependency?
it's working 🙂 I was getting all excited about instaparse... now I have to calm down my curiosity and get to work 😄
do I use core.match
with this?
Haha, I suppose building a parser yourself would be a great learning exercise too.... but code grammar is a bit complex.
it looks as so, you're right
ok, let me give it a go
yeah, Instaparse only aims to help turn strings into data, so if you already have a way to do that (`read-string`) then instaparse won't be much help
the "analysis" of your resulting data is always left as an exercise to the reader anyway 🙂