This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-07-04
Channels
- # admin-announcements (14)
- # aleph (3)
- # beginners (75)
- # boot (95)
- # carry (4)
- # cider (23)
- # clojure (39)
- # clojure-android (3)
- # clojure-brasil (2)
- # clojure-dev (17)
- # clojure-gamedev (1)
- # clojure-mexico (12)
- # clojure-poland (12)
- # clojure-romania (1)
- # clojure-russia (10)
- # clojure-spec (8)
- # clojure-uk (36)
- # clojurescript (34)
- # core-async (4)
- # datomic (40)
- # emacs (1)
- # events (7)
- # hoplon (119)
- # instaparse (52)
- # keechma (71)
- # mount (4)
- # off-topic (9)
- # om (4)
- # onyx (3)
- # other-languages (23)
- # protorepl (3)
- # re-frame (9)
- # reagent (26)
- # rethinkdb (5)
- # spacemacs (2)
- # testing (1)
- # yada (1)
I'm biased but I recommend instaparse especially for basic use cases.
@aengelberg: I'd like it to have an ML-like syntax eventually, would instaparse still be easy to work with for something like that?
@scriptor: I'm not familiar with ML but I will still claim yes :)
@aengelberg: sounds good, thanks!
Let me know on #instaparse or the instaparse Google group if you have any questions!
I happen to be playing with writing a parser for standard ml at the moment. ML has some some features that make parsing it difficult. instaparse will help a lot with dealing with ambiguities in the grammars you find online, but there are some features like being able to declare certain operators as infix inside specific lexical scopes which are going to be challenging, if you choose to support those features
@maxp anything wrong with (format "%.1f" 1.0)
?
let's say (deftype X [])
(isa? X Object)
returns true
. Now given (deftype Y [])
, how do I make (isa? X Y)
return true
, too?
I need to parse foo^2 x^{x+1}
to ["foo" [:super "2"] " x" [:super "x+1"]]
with instaparse. Tips?
The key is that the ^
needs to immediately follow a word character (or maybe a symbol), but not be included in that parse. It needs to be part of the previous parse entry.
can you help me with reading up on boot, any documentation besides the official website would be helpful (mainly book recommendations please?)
@avabinary: the wiki is full of good docs, have you seen it?
I'll take a peak, thanks @martinklepsch
@avabinary: if you have any questions there are usually people in #C053K90BR happy to help
Hey, could someone explain to me why this code blows up the heap?
(with-open [rdr ...]
(let [lines (line-seq rdr)
[labels & data] (map parse lines)]
(run! (partial f labels) data)))
I'm reading a large csv file, f is a passed-in function. It works fine if I use something clever like (eduction (map parse) lines)
. Why does the lazy sequence cause me to run out of memory?@martinklepsch: oh ! i found your talk on youtube :))
@lopalghost: which version of clojure?
@bronsa 1.8, with Java 8
With schema, is there an easy way to take a schema and wrap all keys in (s/optional ...)
? :flag-us: :flag-us:
@tom: since schemas are maps, you could try (into {} (map (fn [[k v]] [(s/optional k) v]) schema))
and call that defn all-optional-keys [schema]
Can transducers currently parallelize computations like reducers/fold can?
Although the reduce phase of fold can use transducers
ok, ty