Try as I might, I can't purge these anachronisms; so here are `car' to
`cr' in all their glory:
http://clojars.org/cadr
This implementation uses a Kleene-closure around the alphabet {a, d}
to generate the names; and a macro to define them:
https://github.com/klutometis/cadr/blob/master/s
(macroexpand-1 '(with-cxrs (inc (caadaaddadr x
> (let [caadaaddadr (comp first first rest first first rest rest first
> rest)]
> (inc (caadaaddadr x)))
>
> On Nov 30, 11:27 pm, Tassilo Horn wrote:
> > Peter Danenberg writes:
> >
> > Hi Peter,
Quoth john.holland on Sweetmorn, the 44th of The Aftermath:
> It seems to me that as general solutions to stack overflow,
> trampoline and recur are very valuable. I had gotten the mistaken
> idea that Scheme was somehow immune to the problem.
Trampoline and recur are a poor man's tail-call-optimi
This talk of "Scheme macros" is a little weird: are we talking syntax-case,
explicit-renaming, or unhygienic defmacro? Scheme has them all.
There are also implementation-specific mechanisms for writing reader macros:
what's left?
On Dec 3, 2011, at 14:57, Stuart Sierra wrote:
> I think that
Thanks, Evan; I had a use-case where the truthiness of nil would have
forced me out of `let-else.' This new predicate-abstraction is
beautiful.
Quoth Evan Gamble on Sweetmorn, the 49th of The Aftermath:
> Thanks for your comment, Sam.
>
> Before you posted the comment, Peter Danen
Despite Brian Carpenter's warning about torches and pitchforks [1],
I've decided to release a reader-macros package; may Zeus forgive me
for opening this pithos:
https://github.com/klutometis/reader-macros
Here's a trivial example where we implement a reverse-string reader:
(use '[clojure.st
Whoops: that's Brian Carper, not Carpenter.
Quoth Peter Danenberg on Setting Orange, the 63rd of The Aftermath:
> Despite Brian Carpenter's warning about torches and pitchforks [1],
> I've decided to release a reader-macros package; may Zeus forgive me
> for opening t
Quoth Aaron Cohen on Setting Orange, the 63rd of The Aftermath:
> Ha, I just looked at the source, it's really weird to see λ in
> "clojure" code.
That's a little idiosyncrasy of mine: I've been chastised for it in
the past; maybe `lambda' would be more readable?
--
You received this message bec
Quoth Aaron Cohen on Setting Orange, the 63rd of The Aftermath:
> One thing I'd really want before I even considered using this would
> be some way of restricting the scope of a reader macro to the
> current file. As is, they just have way too much room to interfere
> with your whole world. I'm not
Quoth Aaron Cohen on Setting Orange, the 63rd of The Aftermath:
> Oh excuse me, I was misreading what is going on here with the
> lambda. I thought it was a reader macro, but you're just pulling
> that alias in from some dependency.
Exactly: `λ' and `defλ' are just vanilla macros that shadow `fn'
Scheme, for instance, obeys the Law of Macro-Parsimony: "don't use
defmacro," namely, "where defn will suffice;" Clojure, on the other
hand, is macro-liberal.
In other words, everyone seems to prefer e.g. `(defmacro foo [vars &
body] `(do ... ~@body))' where `(defn foo [vars thunk] ... (thunk))' w
all things.
Quoth Cedric Greevey on Sweetmorn, the 64th of The Aftermath:
> On Thu, Dec 22, 2011 at 4:54 PM, Peter Danenberg wrote:
> > Scheme, for instance, obeys the Law of Macro-Parsimony: "don't use
> > defmacro," namely, "where defn will suffice;"
Quoth Kevin Downey on Sweetmorn, the 64th of The Aftermath:
> Why do you care?
SICP-forged neural pathways, basically; I'll end up writing e.g.:
(defn with-input-from-file [file thunk] ...)
only to censor myself: "shit, we don't do thunks."
At that point, I'll bust out `defmacro' with relucta
Quoth Louis Yu Lu on Boomtime, the 70th of The Aftermath:
> The proposed syntax sugar apparently pleases my eyes and fingers
> from conventional languages. With some experiments, I found the code
> is more readable for me to use f(x) notation for function call, and
> (op x) for operator.
It sounds
Since square brackets have been usurped by vectors, angle brackets
could be used to approximate M-expressions.
Quoth Ambrose Bonnaire-Sergeant on Boomtime, the 70th of The Aftermath:
> Why not use f ?
>
> On Thu, Dec 29, 2011 at 12:49 PM, Louis Yu Lu wrote:
>
> > Instead of using overloaded (),
15 matches
Mail list logo