Re: Parse an EBNF grammar with instaparse?

2021-07-18 Thread D. Ben Knoble
You may also be able to write an instaparse grammar for EBNF (a grammar of grammars)—Loner contains a parser-combinator-style EBNF parser, so it's certainly do-able. Then you could use that parser to parse your grammar—presumably the parsers yield trees on input-strings. D. Ben Knoble O

Re: Parse an EBNF grammar with instaparse?

2021-07-17 Thread D. Ben Knoble
I should clarify: it parses a variant of EBNF. The specific syntax is explained at https://benknoble.github.io/loner/ and https://benknoble.github.io/loner/demo.html#syntax On Saturday, July 17, 2021 at 8:50:48 PM UTC-4 D. Ben Knoble wrote: > I haven't touched Clojure in a year or two,

Re: Parse an EBNF grammar with instaparse?

2021-07-17 Thread D. Ben Knoble
I haven't touched Clojure in a year or two, and I'm not familiar with instaparse. I can say, from a terminology stand-point, that a grammar (such as one in EBNF) can produce a parser, which then produces parse-trees of input strings. So, perhaps you mean that you want parse-trees of strings in

Re: DEPRECATED: Libs must be qualified, change cljfmt => cljfmt/cljfmt (~/.clojure/deps.edn)

2020-08-06 Thread D. Ben Knoble
Thanks, super helpful. I'll follow-up if I have any questions. D. Ben Knoble -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are modera

DEPRECATED: Libs must be qualified, change cljfmt => cljfmt/cljfmt (~/.clojure/deps.edn)

2020-08-06 Thread D. Ben Knoble
I've started seeing a lot of messages like this, I think after I updated clojure, but I can't find any documentation or points in the changelog about the change, why I'm getting this message, or what the correct fix is. I know it provides a change I can make, but is it the right one? Some examp

Re: More info on Rich Hickeys ideas on Map types from "Maybe Not"

2019-04-24 Thread Ben Sima
Henning Sato von Rosen writes: > Sorry if I'm wrong here, but I'm not sure we are talking about the same > data-type; I'm not referring to the Rich's examples with Maybe, but his > examples with records/maps, where some fields may or may not be present. Right, and in most other type systems, th

Re: More info on Rich Hickeys ideas on Map types from "Maybe Not"

2019-04-24 Thread Ben Sima
I guess I'll take a crack at this... I think generally, core.spec is an implementation of contracts, so you could look at the literature around contracts for some sources. Racket is (afaik) most integrated contract language, there are some references here to start with: https://docs.racket-lang.or

Re: [ANN] Clojure 1.10.1-beta1

2019-03-31 Thread Ben Brinckerhoff
rue :theme :figwheel-theme}))) Thanks, Ben On Thursday, March 21, 2019 at 10:35:32 PM UTC-6, Alex Miller wrote: > > 1.10.1-beta1 is now available. You can try it with clj using: > clj -Sdeps '{:deps {org.clojure/clojure {:mvn/version > "1.10.1-beta1"}}}' &

Re: Text replacement capability in clojure macros (just like C #define)

2019-02-01 Thread Ben Sima
f...@helpshift.com writes: > I want to write a macro > > (defmacro params [] 'a 'b 'c) > > that will be used in places like this > > ;; without macro > (fnc a b c) > > ;; with macro > (fnc pararms) => (fnc a b c) If you have a list of params, you can apply a function to it like so:

Re: Port graphs: What would Rich Hickey do?

2018-01-10 Thread Ben Kovitz
elementary that I haven't understood yet. I just posted a question on the github site: https://github.com/nathanmarz/specter/issues/241 -- Ben Kovitz http://pages.iu.edu/~bkovitz/ -- You received this message because you are subscribed to the Google Groups "Clojure" group. To pos

Re: Port graphs: What would Rich Hickey do?

2018-01-04 Thread Ben Kovitz
even allow me to map these peculiar port graphs to simplicial graphs without adding any performance overhead. It looks like I'd need to write a custom navigator or two. I haven't yet found a good tutorial for getting beyond the most elementary concepts of Specter, though. Can y

Re: Port graphs: What would Rich Hickey do?

2018-01-04 Thread Ben Kovitz
ember any of those other contexts? Maybe I could check one out and learn something from it. If you’re shopping around for ideas as to how to define data manipulation > API, it may be worth taking some time looking at Specter too. > Thanks for this suggestion, too. I'm now checking it out

Re: Port graphs: What would Rich Hickey do?

2018-01-04 Thread Ben Kovitz
hich addresses the "type headache" I was trying to avoid. -- Ben Kovitz http://pages.iu.edu/~bkovitz/ -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts

Re: Port graphs: What would Rich Hickey do?

2018-01-02 Thread Ben Kovitz
rks. Graphs of social networks, though, can be conveniently described by their own custom sexprs. I figure that implementing it will force me to think this idea through the rest of the way. Here goes… -- Ben Kovitz http://pages.iu.edu/~bkovitz/ -- You received this message because you are sub

Re: Port graphs: What would Rich Hickey do?

2018-01-01 Thread Ben Kovitz
o look at this in a new way. I like your observation that (in effect) edge classes of the form (port-label1, port-label2) are isomorphic to edges between ports. That and Datomic might be exactly the whack(s) on the side of the head that I needed! -- Ben Kovitz http://pages.iu.edu/~bkovitz/

Port graphs: What would Rich Hickey do?

2018-01-01 Thread Ben Kovitz
to describe, maybe even sacrificing full generality. OK, that's enough. I'm probably missing something obvious here—obvious, at least, to Rich Hickey or someone with more Clojure experience. Would you care to smack

Re: [ANN] Pinpointer: yet another spec error reporter

2017-12-11 Thread Ben Brinckerhoff
Very cool! Excellent work. On Monday, December 11, 2017 at 7:23:38 AM UTC-7, OHTA Shogo wrote: > > Hi, all > > I’m happy to announce the first release of Pinpointer, yet another > implementation of spec error reporter based on a precise error analysis. > > - https://github.com/athos/Pinpointer

Re: [core.spec] Stricter map validations?

2017-12-08 Thread Ben Brinckerhoff
Thanks Juan! This works in Clojure, but it doesn't work for me in Clojurescript due to the use of "resolve" " Assert failed: Argument to resolve must be a quoted symbol" This is where I got stuck too. It looks like spec does have access to the predicate at runtime (after all, it can figure ou

Re: [core.spec] Stricter map validations?

2017-12-07 Thread Ben Brinckerhoff
e a linter that walks the Clojure code and understands the semantics of the above macros, but I was hoping I could write one using the data contained in the spec registry instead) Ben On Thursday, November 23, 2017 at 7:09:15 AM UTC-7, Nico Schneider wrote: > > Hello everyone, > > On Thur

Re: [ANN] expound 0.1.2

2017-07-25 Thread Ben Brinckerhoff
gotten anything wrong and add his perspective. Juan? Ben On Tuesday, July 25, 2017 at 6:12:21 PM UTC-6, Andy Fingerhut wrote: > > inspectable was recently announced in this group as well. Do you know > what the similarities and differences are between these projects? > > Andy >

[ANN] expound 0.1.2

2017-07-25 Thread Ben Brinckerhoff
Expound formats clojure.spec errors in a way that is optimized for humans to read. Expound works in Clojure and Clojurescript. This release provides human-optimized error messages when using a number of spec features, including instrumentation and `assert`. More information is available in the

Re: Trouble understanding clojure.spec.alpha/problems :path :via :in

2017-07-13 Thread Ben Brinckerhoff
> I'm currently trying something very similar to expound but with a GUI approach to explore errors. I look forward to seeing what you come up with! Ben On Thursday, July 13, 2017 at 8:48:45 AM UTC-6, Juan Monetta wrote: > > Yeah, I read your expound code, really nice btw. >

Re: Trouble understanding clojure.spec.alpha/problems :path :via :in

2017-07-13 Thread Ben Brinckerhoff
will soon be providing a cleaner set of functions that allows clients to do more with the :clojure.spec.alpha/problems, including one that will provide a `in` path that works around these issues (in most common cases). Ben On Wednesday, July 12, 2017 at 8:50:19 AM UTC-6, Juan Monetta wrote: > >

[JOB] Clojurescript/React Native jobs at Figly (remote)

2017-02-17 Thread Ben Brinckerhoff
Figly is building the next-generation platform as a service (PAAS) to transform enterprise software. We are led by a world-class team with a track record of successful cloud startups, as well as leadership experience at the largest software companies. The platform includes a native mobile clien

Re: Clojure.spec, maps, restrict valid keywords, easier way?

2017-02-03 Thread Ben Brinckerhoff
The eastwood linter can also be configured to look for possibly misspelled keyword typos https://github.com/jonase/eastwood#keyword-typos On Friday, February 3, 2017 at 3:47:21 AM UTC-7, John Schmidt wrote: > > I suggest something like (defn fetch-encrypted [] (fetch-important-data > {:encrypt

[ANN] edn-java 0.5.0 released

2016-12-11 Thread Ben Smith-Mannschott
edn-java [1] is a parser and printer for edn [2]. This release: * Can read namespaced maps as per CLJ-1910 [47] * Throws an exception when asked to read a map or set with duplicates [49] It should be appearing on Maven Central shortly. // Ben [1] http://edn-java.bpsm.us [2] https

Re: Thoughts on clojure.spec

2016-12-10 Thread Ben Brinckerhoff
e who have worked so hard on all aspects of spec! Ben On Tuesday, December 6, 2016 at 4:42:44 PM UTC-7, Brandon Bloom wrote: > > I was just very surprised to discover my :ret specs were not being checked > via instrument. I've read the rationale above, but I'm not

[ANN] Modified Gorilla REPL (0.4.0)

2016-10-27 Thread Ben Bailey
Hey all, The first version of a modified Gorilla REPL has been released here: https://github.com/benfb/gorilla-repl This version makes several modifications to the original Gorilla REPL that allow it to be used as a complete programming environment: - Open any `.clj`, `.cljs`, `.cljc`, or `

Re: strange (for me) problem with "No matching ctor found for class ..."

2016-05-04 Thread Ben Kovitz
what I needed with a macro. However, we did not find a way around temporarily binding the method-map to a dynamically rebindable symbol. -- Ben Kovitz http://mypage.iu.edu/~bkovitz/ -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to t

Re: strange (for me) problem with "No matching ctor found for class ..."

2016-05-04 Thread Ben Kovitz
; (eval '{:d f-}) {:d #function[user/fn--10243/f--10244]} -- Ben Kovitz http://mypage.iu.edu/~bkovitz/ -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from n

Re: strange (for me) problem with "No matching ctor found for class ..."

2016-05-04 Thread Ben Kovitz
at least not reliably. If you want to (reliably) make eval return something containing a function object, you need to give eval an expression containing a symbol or expression that evaluates to that function object—not the function object itself. -- Ben Kovitz http://mypage.iu.edu/~bkovitz/ -- You

Re: [ANN] Clojure 1.8.0-RC3

2015-12-14 Thread Noam Ben-Ari
Brian: it's not an issue with Midje. On Tuesday, December 15, 2015, Brian Marick wrote: > Noam: does this mean it's not an issue with Midje? If it is, I'll look > into it. > > Noam Ben-Ari wrote: > >> After upgrading to [reduce-fsm "0.1.4"] a

Re: [ANN] Clojure 1.8.0-RC3

2015-12-08 Thread Noam Ben-Ari
After upgrading to [reduce-fsm "0.1.4"] all my tests pass with RC3 :-) On Tuesday, December 8, 2015 at 3:14:21 PM UTC+2, Noam Ben-Ari wrote: > > Thanks for the prompt response, I have filed a ticket to the library > author: > > https://github.com/cdorrat/reduce-fs

Re: [ANN] Clojure 1.8.0-RC3

2015-12-08 Thread Noam Ben-Ari
t; > This is now an exception http://dev.clojure.org/jira/browse/CLJ-1456. > > > > On 8 Dec 2015, at 13:05, Noam Ben-Ari > > wrote: > > > > Hi, > > I have just tried 1.8.0-RC3 and saw a problem. > > > > I have a project in which I run tests with

Re: [ANN] Clojure 1.8.0-RC3

2015-12-08 Thread Noam Ben-Ari
Hi, I have just tried 1.8.0-RC3 and saw a problem. I have a project in which I run tests with `lein midje`, and this runs fine with 1.7.0. When I change the clojure dependency to 1.8.0-RC3 and run it I get this exception: --- Exception in thread "main" java.lang.RuntimeException: Too many arg

Re: arity-3 `iterate`

2015-11-16 Thread Ben Wolfson
ncomp would be faster if it's implemented a la exponentiation by squaring. On Mon, Nov 16, 2015 at 12:55 PM, Ben Wolfson wrote: > If you rearrange the arguments of your proposed three-argument iterate: > > (defn iterate > ... > ([f n x] >(if (zero? n) > x

Re: arity-3 `iterate`

2015-11-16 Thread Ben Wolfson
+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en > --- > You received this message because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving ema

Re: A call for an idiomatic rendering of Clojure EDN in info/error messages

2015-11-13 Thread Ben Wolfson
mails from it, send an > email to clojure+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > > > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, sen

[ANN] edn-java 0.4.6 released

2015-10-25 Thread Ben Smith-Mannschott
edn-java [1] is a parser and printer for edn [2]. This release: * Teaches the default parser to produce values that can participate in Java serialization. [3] It should be appearing on Maven Central shortly. // Ben [1] http://edn-java.bpsm.us [2] https://github.com/edn-format/edn [3] https

Re: Clojure performance on Android

2015-09-22 Thread Ben Brinckerhoff
a=v&pid=forums&srcid=MTUyOTIzOTE0MjU1MDA0MDI3NjQBMTExMTI3MjYwMjc1OTc4MDg3MzQBXzVfV0tNdUZDQUFKATAuMQEBdjI Hope that helps, Ben On Tuesday, September 22, 2015 at 3:51:04 PM UTC-7, Roger Keays wrote: > > Hi all, > > Thanks for giving the world Clojure. It's already made my life better just > by applying the idioms to my

Re: Tools comparable to Luigi for Clojure or the JVM?

2015-09-16 Thread Ben Mabey
Drake is similar to what you want and it is written in Clojure: https://github.com/Factual/drake -Ben On 9/16/15 12:12 PM, Max Countryman wrote: Hi, I’m working on a project at work for which we’re currently considering a Python tool built by Spotify called Luigi[1]. Luigi is a tool for

Re: Weird GenSyms behaviour across different quoted blocks in a macro

2015-08-26 Thread Ben Wolfson
ou are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojure+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- Ben Wolfson "Human k

Re: [ANN] Clojure 1.8.0-alpha3

2015-07-31 Thread Ben Wolfson
liced into a list, so if you have just one single expression, it turns into a function call: user=> (defmacro p [k] (println k)) #'user/p user=> (p #({:k %})) (fn* [p1__7143#] ({:k p1__7143#}));; < attempting to invoke a map with zero args nil user=> (p #(do {:k %})) (fn* [p1

Re: #{:rant} Questions about contribution policy and clojure compiler source.

2015-07-18 Thread Ben Wolfson
claiming that Rich did something he had no *right* to do. One can still suggest that the way the project's run (or the way these specific issues were handled) is unwise or shabby or otherwise capable of improvement. No one has to take the suggestion, but it might be better if they did. -- Be

Re: transducer (+ closures) efficiency question

2015-06-24 Thread Ben Wolfson
On Wed, Jun 24, 2015 at 8:29 AM, Herwig Hochleitner wrote: > > > 2015-06-24 1:25 GMT+02:00 Ben Wolfson : > >> On Tue, Jun 23, 2015 at 4:17 PM, Ghadi Shayban >> wrote: >> >>> >>> Tangentially: >>> (remove even?) >>> Will be fa

Re: transducer (+ closures) efficiency question

2015-06-23 Thread Ben Wolfson
sed to `remove` at the > outset. In the second example the var dereference happens for every single > item (though it's very cheap). The second example is equivalent to writing > (remove > #'even?) > I can't seem to observe a difference between the two cases. --

Re: Is there a cheet sheet for some of the pure symbolic functions like #'

2015-06-05 Thread Ben Smith-Mannschott
try googling for "clojure reader macros". Dru Sellers June 5, 2015 at 22:05via Postbox Trying to google what #' means is tricky to say the least. Is there a good name for these t

Re: A one line macro that looks right, but just won't work.

2015-06-05 Thread Ben Wolfson
s > (get->> sample-data [:tracks :items count]) ; => 5 > Here you're passing in a sequence, not a symbol, so the macro expansion can splice correctly. In this case, fwiw, you can just do this: user=> (def pattern [:tracks :items count]) #'user/pattern user=> (def s

Re: Embedded systems and transpiling Clojure to Nim

2015-05-01 Thread Ben Wolfson
r first post. > To unsubscribe from this group, send email to > clojure+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en > --- > You received this message because you are subscribed to the Google Groups > "Cloju

Re: flip in clojure

2015-04-30 Thread Ben Wolfson
> http://groups.google.com/group/clojure?hl=en > --- > You received this message because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojure+unsubscr...@googlegroups.com. > Fo

Re: Clojure ecommerce

2015-03-30 Thread Ben McFerren
I also am interesting in finding a clojure ecommerce library I'm posting here so that I can keep up on this topic and receive an email with any news On Monday, January 5, 2015 at 9:03:52 AM UTC-8, g vim wrote: > > Are there currently any Clojure ecommerce packages or libraries, > preferably

Re: Deterministic macro expansion for Clojure?

2015-03-27 Thread Ben Wolfson
ge because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to clojure@googlegroups.com > Note that posts from new members are moderated - please be patient with > your first post. > To unsubscribe from this group, send emai

Re: Given a list of maps, produce a sublist having distinct values for one key

2015-03-24 Thread Ben Wolfson
lojure?hl=en > --- > You received this message because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojure+unsubscr...@googlegroups.com. > For more options, visit https://groups.

Re: `(apply map vector ...)`, and passing `apply` a list vs. a vector

2015-03-18 Thread Ben Wolfson
gt; For more options, visit this group at > http://groups.google.com/group/clojure?hl=en > --- > You received this message because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email

Re: [ANN] Dunaj project, an alternative core API for Clojure

2015-03-05 Thread Ben Wolfson
this message because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojure+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > --

Re: core.async: "Deprecated - this function will be removed. Use transducer instead"

2015-02-19 Thread Ben Smith-Mannschott
g source here directly?: (-> source payload-decoder payload-json-decoder) What have I missed? // Ben On Thu, Feb 19, 2015 at 3:06 AM, Malcolm Sparks wrote: > I have recently written a blog article which explains how to use > transducers with core.async. > > You can find it here: ht

Re: core.async: "Deprecated - this function will be removed. Use transducer instead"

2015-02-18 Thread Ben Smith-Mannschott
inc))] >> (async/onto-chan ch [1 2 3]) >> ch) >> ;; returns a channel yielding items 2, 3, 4 >> >> But, I'm not clear at all how I can apply the operation (inc) to the all >> values yielded by a channel I already have in my hand. >> >> Any help wo

core.async: "Deprecated - this function will be removed. Use transducer instead"

2015-02-18 Thread Ben Smith-Mannschott
n apply the operation (inc) to the all values yielded by a channel I already have in my hand. Any help would be appreciated. I feel like I'm missing some critical bit of insight and that async and transducers might just fall into place for me if I could only find out what that bit is. // Ben --

Re: Removing the 5th, 10th, 15th ... element of a list

2015-02-17 Thread Ben Wolfson
-- > You received this message because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojure+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optou

Re: Let bindings and immutability

2015-02-11 Thread Ben Wolfson
Google > Groups "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojure+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- Ben Wolfson "Human kind has used its intellig

Re: Extending the LispReader with "embeded language lorms"

2015-02-10 Thread Ben Wolfson
On Tue, Feb 10, 2015 at 11:29 AM, Alex Miller wrote: > Hi Henrik, > > There is a long-standing philosophical position in Clojure that it should > not be possible to write programs that cannot be read by other users. > What does that mean? -- Ben Wolfson "Human kind has u

Re: which are the pros and cons between stuartsierra/component and prismatic/graph?

2015-02-04 Thread Ben Mabey
On 2/4/15 5:46 AM, Juan A. Ruz wrote: Hi guys! Can anyone give some insight on the features or downsides of choosing component vs graph libs? Or maybe explain the advantages of using defrecords instead of plain fns? The two are not mutually exclusive. We use both to manage our system's lif

[ANN] edn-java 0.4.5 released

2015-01-28 Thread Ben Smith-Mannschott
n-format/edn [3] https://github.com/bpsm/edn-java/issues/40 // Ben -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be pat

Re: Testing macros that throw errors at compile time?

2015-01-22 Thread Ben Wolfson
received this message because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojure+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. &

Re: camelize-dasherize - reinventing the wheel?

2015-01-07 Thread Noam Ben-Ari
Cool! I'm glad you found it useful :-) On Wednesday, January 7, 2015 2:12:35 AM UTC+2, Andrey Antukh wrote: > > Hi! > > 2015-01-06 20:25 GMT+01:00 Noam Ben-Ari >: > >> Hi, >> >> I've written a small library (1 ns, 100 lines) to transform nested maps

Re: camelize-dasherize - reinventing the wheel?

2015-01-07 Thread Noam Ben-Ari
You are right. If it is only applied to keys, like in Thomas's example, it can be very helpful. On Wednesday, January 7, 2015 11:21:39 AM UTC+2, Andrey Antukh wrote: > > Hello > > 2015-01-07 10:11 GMT+01:00 Noam Ben-Ari >: > >> @Thomas >> >> Unfortunatel

Re: camelize-dasherize - reinventing the wheel?

2015-01-07 Thread Noam Ben-Ari
1561deaf13e11 > "Elapsed time: 35.488 msecs" > > clojure.walk has keywordize-keys and stringify-keys, maybe a suitable > starting point for your implementation. > > HTH, > /thomas > > > On Tuesday, January 6, 2015 8:25:57 PM UTC+1, Noam Ben-Ari wrote: >&g

Re: camelize-dasherize - reinventing the wheel?

2015-01-06 Thread Noam Ben-Ari
l-snake-kebab > > It mentions in its docs that it avoids using regex's. > > Andy > > On Tue, Jan 6, 2015 at 11:25 AM, Noam Ben-Ari > wrote: > >> Hi, >> >> I've written a small library (1 ns, 100 lines) to transform nested maps >> from

camelize-dasherize - reinventing the wheel?

2015-01-06 Thread Noam Ben-Ari
Hi, I've written a small library (1 ns, 100 lines) to transform nested maps from "dash-case" keys to "camelCase" keys and back. The original use case was taking MySQL records that use camelCase field names and convert them to dash-case so they don't stick out like a sore thumb in my code. Simi

Re: [ANN] cuerdas 0.1.0: A string manipulation library for clojure and clojurescript.

2014-12-23 Thread Noam Ben-Ari
Nice job. I would add to docs how each function handles nil. Also, I'm used to another meaning for "blank?", from Ruby/Rails and other places, which returns true iff the string is empty or nil. On Tuesday, December 23, 2014 7:48:35 PM UTC+2, Andrey Antukh wrote: > > Hello everybody. > > I want

Re: How can I remove the nils in the result?

2014-12-22 Thread Ben Wolfson
(it's also zero-indexed, unlike yours, but that isn't a big change) On Mon, Dec 22, 2014 at 9:17 PM, Ben Wolfson wrote: > This is a little more concise: > > (->> "00101110101110" >(map-indexed vector) >(partition-by second) >

Re: How can I remove the nils in the result?

2014-12-22 Thread Ben Wolfson
first post. > To unsubscribe from this group, send email to > clojure+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en > --- > You received this message because you are subscribed to the Google Groups > &quo

Re: a nicer way to write 1 - 2 + 3 - 4 ... +/- n

2014-11-15 Thread Ben Wolfson
ojure@googlegroups.com > Note that posts from new members are moderated - please be patient with > your first post. > To unsubscribe from this group, send email to > clojure+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en > ---

Re: better way to group consecutive numbers in a vector?

2014-11-06 Thread Ben Wolfson
; To post to this group, send email to clojure@googlegroups.com > Note that posts from new members are moderated - please be patient with > your first post. > To unsubscribe from this group, send email to > clojure+unsubscr...@googlegroups.com > For more options, visit this group at

Re: CCW bug [SEVERE]

2014-10-31 Thread Ben Wolfson
occasion of > saving, then there's simply not much I can do about it. > You could, theoretically, send it along anyway, per the developer's request, and let him make the determination of whether or not there's anything useful there. -- Ben Wolfson "Human kind has used its

Re: Why is my function faster with eval?

2014-10-10 Thread Ben Wolfson
interesting... I hadn't considered it was running the zipmap at > compile-time so it only runs it once as opposed to running it for each row! > > Sean > > On Oct 10, 2014, at 1:06 PM, Ben Wolfson wrote: > > I believe it's because the `mapper` function is just creati

Re: Why is my function faster with eval?

2014-10-10 Thread Ben Wolfson
still implicitly contains a list of keys, > it's still implicitly treating each row as a seq and walking it, so I'm > wondering what the seq-destructuring and the map literal are doing under > the hood that's faster. > > -- Ben Wolfson "Human kind has used its i

Re: [ANN] rmap - define lazy, recursive maps

2014-10-08 Thread Ben Wolfson
e.com/group/clojure?hl=en > --- > You received this message because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojure+unsubscr...@googlegroups.com. > For more options, vi

Re: ANN: ClojureScript 0.0-2341, Improved Analysis & Transducers

2014-09-18 Thread Ben Wolfson
> Groups "Clojure" group. > To post to this group, send email to clojure@googlegroups.com > Note that posts from new members are moderated - please be patient with > your first post. > To unsubscribe from this group, send email to > clojure+unsubscr...@googlegroups.com > Fo

Re: [ANN] data.int-map 0.1.0

2014-09-15 Thread Ben Wolfson
/clojure?hl=en > --- > You received this message because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojure+unsubscr...@googlegroups.com. > For more options, visit https://

Re: destructuring help: `(let [{:keys [...]} ...]` in a `defn` vs in a `let`

2014-08-27 Thread Ben Wolfson
se be patient with > your first post. > To unsubscribe from this group, send email to > clojure+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en > --- > You received this message because you are subscribed to the

Re: destructuring help: `(let [{:keys [...]} ...]` in a `defn` vs in a `let`

2014-08-27 Thread Ben Wolfson
... the other half of the answer being that when you have rest args with (defn foo [& args] ...), "args" is bound to a seq. On Wed, Aug 27, 2014 at 11:27 AM, Ben Wolfson wrote: > The reason is that in the macroexpansion of "let", map-based destructuring > has a s

Re: Transducers are Coming

2014-08-06 Thread Ben Wolfson
p, send email to clojure@googlegroups.com > Note that posts from new members are moderated - please be patient with > your first post. > To unsubscribe from this group, send email to > clojure+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups

Re: Could I get some feedback on this function?

2014-07-25 Thread Ben Wolfson
eceived this message because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojure+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. &

Re: Could I get some feedback on this function?

2014-07-25 Thread Ben Wolfson
gt; (defn only-keep-unique-ids [ids] > (set (map #(get-form-id-without-timestamp %) ids))) > > That won't necessarily get the *first* one; also, it will return a set of the prefixes, not a set of the ids that have the relevant prefixes. -- Ben Wolfson "Human kind has used i

[ANN] monads 0.2.2

2014-07-16 Thread Ben Wolfson
plementations. Also, the `mdo` syntax macro was abstracted out and can now accept an arbitrary user-provided function for doing monadic binds, which should mean that it can be used with other libraries, though I haven't actually tested this. -- Ben Wolfson "Human kind has used its in

Sketching & Streaming Library ("Skream")

2014-05-30 Thread Ben Gimpert
filters, the P2 algorithm for arbitrary quantiles, among other things. And everything done without side-effects and online / sequentially. Here's to hoping there are other Clojure time-series hackers out there! Ben @someben -- You received this message because you are subscribed to the

Re: Strange update-in Behavior

2014-05-29 Thread Ben Wolfson
use you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojure+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- Ben Wolfson "Hu

Re: Community Interest in a Clojure Application Config Library, using Zookeeper?

2014-05-21 Thread Ben Mabey
written the logic that handles the updating of your entire system based on this change? e.g. a new DB config requires that your DB component be restarted and each component that relies on the DB component be restarted as well to get the new connection. Thanks, Ben -- You received this message becau

Re: Count vowels in a string

2014-05-20 Thread Ben Wolfson
There are three vowels in "naïve", not two. On Tue, May 20, 2014 at 4:19 PM, Mark Engelberg wrote: > Why do you say that? > > > > On Tue, May 20, 2014 at 4:16 PM, Ben Wolfson wrote: > >> The naïve implementation does sometimes underestimate the total, though.

Re: Count vowels in a string

2014-05-20 Thread Ben Wolfson
For more options, visit this group at > http://groups.google.com/group/clojure?hl=en > --- > You received this message because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > emai

Re: "in Clojure I rarely find myself reaching for something like the state monad, as I would in Haskell"

2014-05-19 Thread Ben Wolfson
On Mon, May 19, 2014 at 11:28 AM, Bob Hutchison wrote: > > On May 19, 2014, at 1:44 PM, Ben Wolfson wrote: > > I wouldn't say that I *often* find myself reaching for monads, or the > state monad in particular, but I certainly have found them useful on > occasion (a

Re: "in Clojure I rarely find myself reaching for something like the state monad, as I would in Haskell"

2014-05-19 Thread Ben Wolfson
ageous that you have to explicitly say that you want to do IO inside a transaction, given that (in general) you probably shouldn't be doing it. -- Ben Wolfson "Human kind has used its intelligence to vary the flavour of drinks, which may be sweet, aromatic, fermented or spirit-based. ... F

Re: "in Clojure I rarely find myself reaching for something like the state monad, as I would in Haskell"

2014-05-19 Thread Ben Wolfson
because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojure+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- Ben Wolfson

Clojure & Java 8 Compact Profiles

2014-05-07 Thread Ben Evans
people who have cycles to contribute? Or has someone tried this already? Thanks, Ben -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are m

Re: puzzled by RuntimeException

2014-04-25 Thread Ben Wolfson
s is that they "begin with a non-numeric character", it seems pretty forgivable to assume that the colon is part of the keyword (the fact that it isn't stored is immaterial; if you know it's a keyword you also know it starts with a colon) and that it can therefore contain numeric c

Re: citing Clojure and EDN?

2014-04-23 Thread Ben Wolfson
archive.org. > > Ah, that was good, I feel better now! > The woes of academic publishing have nothing to do with the idea that you can't cite websites; MLA and Chicago style both have provisions for citing websites and I'm sure less widespread style guides do as well. -

Re: Questions regarding Map vs Record and usage

2014-04-09 Thread Ben Mabey
On 4/9/14, 12:51 PM, Anthony Ortiz wrote: I see that there are several ways of instantiating a record : (->Book "Lord of the Rings", "Tolkien") (Book. "Lord of the Rings", "Tolkien") #user.Book{:title "Lord of the Rings", :author "Tolkien"} You missed one: (map->Book {:title "Lord of the R

Re: Quotient *and* Remainder

2014-04-09 Thread Ben Wolfson
nsubscribe from this group, send email to > clojure+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en > --- > You received this message because you are subscribed to the Google Groups > "Clojure" group. >

Re: remove first?

2014-04-02 Thread Ben Wolfson
On Wed, Apr 2, 2014 at 1:36 PM, Chris Lappe wrote: > Wouldn't just calling rest on your collection do what you want? > (remove-first #(= % 3) [1 2 3 4 3 5]) should return [1 2 4 3 5]. -- Ben Wolfson "Human kind has used its intelligence to vary the flavour of drinks, wh

  1   2   3   4   5   6   >