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

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: 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: 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: 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: 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: 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

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: 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

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: 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

Re: generators...?

2014-03-26 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 em

Re: generators...?

2014-03-26 Thread Ben Wolfson
roup 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 to clojure+unsubscr...@googlegroups.c

Re: 'Reduced' and logic functions

2014-02-19 Thread Ben Wolfson
mean that sometimes you would evaluate too > much tests, but since this would happen in parallel, in general the result > would return faster. *Am I right in presuming that, or am I overlooking > some very basic argument against them (I'm pretty good at that) ?* > The result wouldn

Re: weird bug with cljs.core.async + macros

2014-02-18 Thread Ben Wolfson
ke. `silly` expands into a case, which expects bare symbols. -- Ben Wolfson "Human kind has used its intelligence to vary the flavour of drinks, which may be sweet, aromatic, fermented or spirit-based. ... Family and social life also offer numerous other occasions to consume drinks for ple

Re: clojure.core/reduce calls (f) if given a reducible coll and no init value

2014-01-24 Thread Ben Wolfson
ction). > Is this a real property of Clojure's sets or an artifact of their present implementation? Is it something that anything impleneting IPersistentSet has to promise to uphold? -- Ben Wolfson "Human kind has used its intelligence to vary the flavour of drinks, which may be sweet,

Re: Eastwood lint tools - some Qs

2014-01-13 Thread Ben Wolfson
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 > --- > You received this message because you are subscribed t

Re: How to go about 'proving' why dynamically typed languages are better.

2013-12-23 Thread Ben Wolfson
e of statically typed languages, if I understand it.) -- Ben Wolfson "Human kind has used its intelligence to vary the flavour of drinks, which may be sweet, aromatic, fermented or spirit-based. ... Family and social life also offer numerous other occasions to consume drinks for pleasur

Re: How to go about 'proving' why dynamically typed languages are better.

2013-12-23 Thread Ben Wolfson
be from this topic, visit > https://groups.google.com/d/topic/clojure/0I7u5yn01qU/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > clojure+unsubscr...@googlegroups.com. > > For more options, visit https://groups.google.com/groups/opt_out. > &g

Re: Who is "doing something worthwhile" in Clojure?

2013-12-19 Thread Ben Wolfson
ions, 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 to clojure+unsu

Re: Advice on choosing the right data structure

2013-12-04 Thread Ben Wolfson
p. >>> To post to this group, send email to clo...@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+u...@g

Re: Advice on choosing the right data structure

2013-12-04 Thread Ben Wolfson
roup, 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. > To unsubscribe fr

Re: contains? and transient set

2013-12-04 Thread Ben Wolfson
legroups.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 emails from it, send an

Re: Any elegant solutions for this problem?

2013-12-01 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 >

Re: Do web apps need Clojure?

2013-11-18 Thread Ben Wolfson
\\\ Partner, Problem Solver, Linear Thinker >> \\\ 541.805.2736 \ @justzeros \ skype:marcuscreo >> >> >> -- >> -- >> You received this message because you are subscribed to the Google >> Groups "Clojure" group. >> To post to this group, send em

Re: How to convert this simple (and inefficient) fibonacci function to # format

2013-11-13 Thread Ben Wolfson
. > 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/groups/opt_out. > -- Ben Wolfson "Human kind has used its intelligence to vary the flavour of drin

Re: [ANN] Narrator: expressive, composable stream analysis

2013-11-02 Thread Ben Wolfson
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. > For m

Re: assoc / dissoc consistency, maps and vectors

2013-11-02 Thread Ben Wolfson
On Sat, Nov 2, 2013 at 11:51 AM, wrote: > > > > (dissoc ['a 'b 'c] 1) > > ;=> ['a 'c] > So then (get (dissoc some-vector i) i) would be equivalent to (get some-vector (inc i))? -- Ben Wolfson "Human kind has used its intelligence to va

Re: problems with state-t monad transformer

2013-10-22 Thread Ben Wolfson
gt; 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 > "Clojure" group. > To unsub

Re: is PG's "imperative outside-in" advice any good?

2013-10-15 Thread Ben Wolfson
((comlpement p) x) g))) > > That's uglier than the if :) > Also less efficient, since it may require evaluating (p x) twice. If it were me, I'd use something like this: (defn either "Return a function that takes one argument, x, and returns (f x) if (p x) is truthy and (g x

Re: Why is this Project Euler solution slow?

2013-10-01 Thread Ben Wolfson
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/groups/opt_out. > -- Ben Wolfson "Human kind has

Re: Safely flush old value out of an atom

2013-09-19 Thread Ben Wolfson
ooglegroups.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 emails from it, sen

Re: Building Trees

2013-09-09 Thread Ben Wolfson
ts 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 > --- > You received this mess

Re: [ANN] riddley: code-walking without caveats

2013-09-04 Thread Ben Wolfson
roup. > 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

Re: [ANN] riddley: code-walking without caveats

2013-09-03 Thread Ben Wolfson
it :y) [it it-1] it) nil)) (let* [it (get {:x {:y 3}} :x)] (if it (let* [it (get it :y)] (if it [it it-1] it)) nil)) The inner let* should be binding it-1. -- Ben Wolfson "Human kind has used its intelligence to vary the flavour of drinks, which may be sweet, aromatic, fermented or spirit-

Re: A macro for writing defn-like macros?

2013-09-03 Thread Ben Wolfson
used, for example, here: https://github.com/bwo/monads/blob/master/src/monads/util.clj#L28-L43 and here: https://github.com/ReadyForZero/babbage/blob/1.1/src/babbage/graph.clj#L28-L79 On Tue, Sep 3, 2013 at 9:23 AM, Ben Wolfson wrote: > I've got something that helps with this stuff:

Re: A macro for writing defn-like macros?

2013-09-03 Thread Ben Wolfson
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/groups/opt_out. > -- Ben Wolfson "Human kind has u

Re: eval/macros with functions with metadata

2013-08-28 Thread Ben Wolfson
f (fn [] x) >f-sym (gensym)] > (intern *ns* gensym (weak-ref f)) > (with-meta (eval `(fn [] (do-stuff-with @~f))) {::strong-ref f})) > > So that way f will be freed up when the resulting fn is gced. > > On 28 August 2013 17:59, Ben Wolfson wrote: > > On Wed, A

Re: eval/macros with functions with metadata

2013-08-28 Thread Ben Wolfson
a is the right move, though it's kidn of dissatisfying. -- Ben Wolfson "Human kind has used its intelligence to vary the flavour of drinks, which may be sweet, aromatic, fermented or spirit-based. ... Family and social life also offer numerous other occasions to consume drinks for pleasure.&quo

Re: eval/macros with functions with metadata

2013-08-28 Thread Ben Wolfson
at runtime. -- Ben Wolfson "Human kind has used its intelligence to vary the flavour of drinks, which may be sweet, aromatic, fermented or spirit-based. ... Family and social life also offer numerous other occasions to consume drinks for pleasure." [Larousse, "Drink" entry] --

eval/macros with functions with metadata

2013-08-27 Thread Ben Wolfson
iculty, but this appears not to be the case. -- Ben Wolfson "Human kind has used its intelligence to vary the flavour of drinks, which may be sweet, aromatic, fermented or spirit-based. ... Family and social life also offer numerous other occasions to consume drinks for pleasure."

Re: core.async - handling nils

2013-08-27 Thread Ben Wolfson
-first macro correctly handles this! It's not just `(when-let [~x (first ~xs)] ~@body). when-first nicely hides away what would otherwise be "much more ugly". -- Ben Wolfson "Human kind has used its intelligence to vary the flavour of drinks, which may be sweet, aromatic, ferment

Re: ANN: clj-tuple, efficient small collections

2013-08-24 Thread Ben Wolfson
emails from it, send an > email to clojure+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. > -- Ben Wolfson "Human kind has used its intelligence to vary the flavour of drinks, which may be sweet, aromatic, fermented or spirit-based.

Re: What's your preference, partial or closures?

2013-08-18 Thread Ben Wolfson
ot; 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 > For more options, visit t

Re: core.async - handling nils

2013-08-17 Thread Ben Wolfson
A sentinel value also prevents channels from being able to send/receive arbitrary values, without further wrapping. Sent from my iPhone On Aug 17, 2013, at 5:48 PM, Mikera wrote: > My overall sense is that the convenience of using if-let directly in a few > use cases doesn't justify making ch

Re: vec to map with consolidated vals

2013-08-16 Thread Ben Wolfson
oups.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. > For mor

Re: core.async - handling nils

2013-08-16 Thread Ben Wolfson
On Fri, Aug 16, 2013 at 5:07 PM, Brandon Bloom wrote: > > have every other value come wrapped in a Just or Some-like constructor > > That's what I meant by "a pair of quote/unquote operators" > ah, gotcha -- Ben Wolfson "Human kind has used its intelli

Re: core.async - handling nils

2013-08-16 Thread Ben Wolfson
On Fri, Aug 16, 2013 at 4:50 PM, Brandon Bloom wrote: > I ran into the other half of this problem: If you expect nils to signify > closed channels, then you can't leverage the logically false nature of nil > without excluding explicit boolean false values. Given the pleasant syntax > of if-let /

with-redefs vs. constant folding

2013-08-14 Thread Ben Wolfson
Is this a bug? user> (with-redefs [list +] (list 1 2)) ;; expected: 3 3 ;; huzzah user> (with-redefs [+ list] (+ 1 2)) ;; expected: (1 2) 3 ;; blast! -- Ben Wolfson "Human kind has used its intelligence to vary the flavour of drinks, which may be sweet, aromatic, fermented or s

Re: clojure keyword spec

2013-07-31 Thread Ben Wolfson
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 to clojure+unsubscr...@googlegroups.com

Re: [GSoC] CinC mid-term evaluation status

2013-07-31 Thread Ben Wolfson
://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. > For mor

Re: is intellij idea a good ide for clojure development?

2013-07-28 Thread Ben Wolfson
ough the wrongful holder would call it theft, isn't clearly problematic. You may think that Stallman is wrong that code can be wrongly held, but that's independent of the analogies he draws. -- Ben Wolfson "Human kind has used its intelligence to vary the flavour of drinks, which may

Re: ANN: substantiation, An opinionated nested maps validations library

2013-07-27 Thread Ben Wolfson
cause 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 email to >

Re: Does this abstraction have any existing name?

2013-07-26 Thread Ben Wolfson
On Fri, Jul 26, 2013 at 9:31 PM, Ben Wolfson wrote: > On Fri, Jul 26, 2013 at 9:27 PM, Yoshinori Kohyama wrote: > >> Thank you, Ben. >> >> If I think the map as a tree, then as a functor, what I do is 'fmap' (in >> Haskell or some languages), >> ,as

Re: Does this abstraction have any existing name?

2013-07-26 Thread Ben Wolfson
(fmap (partial fmap inc) {:a {:x 1} :b {:y 2}}) ---> {:a {:x 2} :b {:y 3}} if you want to use that fmap (or, I'd think, the fmaps provided by either morph or fluokitten) with uneven depths, you'd have to wrap them in a defrecord or deftype, I'd expect. -- Ben Wolfson "

Re: Does this abstraction have any existing name?

2013-07-26 Thread Ben Wolfson
Google >>>> Groups "Clojure" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to clojure+u...@**googlegroups.com. >>>> >>>> For more options, visit >>>> https://groups.g

Re: querying a clojure data structure

2013-07-24 Thread Ben Wolfson
abel "pizza" "it")}})) {:annotation #{(label "pizza" "it")}} macroparser.parsers> i.e., match a map with one value whose key is :annotation and whose value is a set containing a seq of 'label, anything, and "it". -- Ben Wolfson "Hu

Re: Can we please deprecate the :use directive ?

2013-07-23 Thread Ben Wolfson
On Tue, Jul 23, 2013 at 1:55 PM, Sean Corfield wrote: > On Tue, Jul 23, 2013 at 1:53 PM, Ben Wolfson wrote: > > On Tue, Jul 23, 2013 at 1:50 PM, Stefan Kamphausen > > wrote: > >> It complects require and refer ;-) > > How so? > > Because use = require + r

Re: Can we please deprecate the :use directive ?

2013-07-23 Thread Ben Wolfson
On Tue, Jul 23, 2013 at 1:50 PM, Stefan Kamphausen wrote: > > It complects require and refer ;-) > How so? -- Ben Wolfson "Human kind has used its intelligence to vary the flavour of drinks, which may be sweet, aromatic, fermented or spirit-based. ... Family and social life also

Re: [ANN] Proteus: local mutable variables for the masses

2013-07-11 Thread Ben Wolfson
sefully (I think) grouped together. On Thu, Jul 11, 2013 at 7:02 PM, Zach Tellman wrote: > It looks like the macroexpansion code in conditions.free is fairly > generic. What would you say to putting it into its own library? > > > On Thu, Jul 11, 2013 at 6:54 PM, Ben Wolfson wrote:

Re: [ANN] Proteus: local mutable variables for the masses

2013-07-11 Thread Ben Wolfson
For more options, visit this group at >>> http://groups.google.com/**group/clojure?hl=en<http://groups.google.com/group/clojure?hl=en> >>> --- >>> You received this message because you are subscribed to the Google >>> Groups "Clojure" group. >>

Re: [ANN] Proteus: local mutable variables for the masses

2013-07-11 Thread Ben Wolfson
cribe 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/groups/opt_out. > > > -- Ben Wolfson "Human kind has used its intelligence to vary the flavour of drinks, which

Re: State monad issue

2013-07-11 Thread Ben Wolfson
l=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://g

Re: Clojure: Elegance vs. Performance?

2013-07-09 Thread Ben Wolfson
c x)) #'user/od? user=> (c/run-cont (evn? 500)) true But the result is about 2x slower than what the clojure-tco macro produces (around 600ms vs around 300ms, for me). -- Ben Wolfson "Human kind has used its intelligence to vary the flavour of drinks, which may be sweet, ar

Re: Clojure: Elegance vs. Performance?

2013-07-09 Thread Ben Wolfson
some-condition (recur ...) (foo ... where you can't use recur for the call to foo, even though it's in tail position, because the recur target is the loop expression. -- Ben Wolfson "Human kind has used its intelligence to vary the flavour of drinks, which

Re: Clojure: Elegance vs. Performance?

2013-07-09 Thread Ben Wolfson
gt; 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 patient with > your first post. > To unsubscribe from this group, s

  1   2   3   >