There is no pot of gold at the end of the no-namespacing rainbow. Only
sadness. :'(
On Sat, Aug 30, 2014 at 9:29 AM, Andy Fingerhut
wrote:
> How would another Lisp avoid giving you an error when referring to a
> symbol that has no value?
>
> If you just want your entire program in a single name
Hi Francis,
On Sat, Aug 30, 2014 at 1:34 PM, Francis Avila wrote:
> It would probably help if you said more about the source of this
> atom-holding object. Is it a plain Java class? A deftype/defrecord? Is it
> final?
>
It's not an atom-holding object. The only guarantee is that this object
ex
I tried to write a macro that wraps the code a function with a try/catch
statement. It works fine for regular functions but it doesn't work for
multimethods. I understand the reason, but I don't know how to fix it.
Here is my code:
(defmacro deftry [name args & body] "
https://groups.google.com/
This isn't a multimethod, it's a multiple-arity function. Anyway, you just
need to detect that someone has tried to define a multiple arity method and
change your definition accordingly. Something like below. I haven't
actually tried this code so it's almost definitely wrong but you get the
gis
Great idea Alex! I'll be waiting for the book
воскресенье, 31 августа 2014 г., 1:58:18 UTC+7 пользователь Alex Miller
написал:
>
> Hi Sam,
>
> I am working on a book for Pragmatic Programmers with Ben Vandgrift called
> "Clojure Applied" that is target specifically at people like yourself. Our
Thanks a lot Beau.
Your code almost worked.
This is the working code -- you just forgot the '&' between args and body
:)
I am impressed that you were able to write a macro without any repl...
(defmacro deftry [& definition]
(if (vector? (second definition))
(let [[name args & body] de
> I am impressed that you were able to write a macro without any repl...
Pretty amazed myself. Never seems to happen when it's code that I'm trying
to write for myself :-)
On Monday, September 1, 2014 12:06:45 AM UTC+10, Yehonathan Sharvit wrote:
>
> Thanks a lot Beau.
>
> Your code almost worke
;;; there is a simple, but not a good way
;;; (deftry foo [x] x)
;;; (:arglists (meta #'foo)) => ([& args__5399__auto__])
(defmacro deftry [name & fdecl]
`(defn ~name [& args#]
(try
(apply (fn ~@fdecl) args#)
(catch Error e#
(println "err caught" e#)
;;; this is
If you don't want to wrap the object in an atom, you can also reify an
object that supports IDeref which returns your object. All reified objects
support IObj out of the box.
On Sunday, August 31, 2014 4:55:58 AM UTC-4, Atamert Ölçgen wrote:
>
> Hi Francis,
>
>
> On Sat, Aug 30, 2014 at 1:34 PM
I have a note in a list of things to do that I have been maintaining that
says " Remove now-obsolete http://clojure.org/streams
and any links to it (RH said in 2009 that streams lost to chunked
sequences)". I don't have a link handy to that email that suggested this
change, nor to a quote by Rich
Found it:
"Don't worry about streams - they lost to chunked seqs. Any vestiges just
need to be removed. -- Rich"
https://groups.google.com/forum/#!msg/clojure-dev/VcHaPv0s_90/EkGmLyzV7ZoJ
It seems like at least marking the page http://clojure.org/streams near the
top with a message that it is
Great to see that it's on the cards. Really looking forward to be able to
use this when stable. Also, wouldn't transducers also open up the way to
define the chunking size of transduced lazy operations ? Something like
(with-chunk-size 1 (xform data)) ? Or would this make chunking a non-issue
a
Ok,
So I'm trying to write a leiningen plugin that takes some namespace
arguments. Let's call it **. This is a brand new plugin, so
everything else is empty, and this value is present: *{:eval-in-leiningen
true}*. My problem happens when, in the context of the project **
is acting on, the plugin c
On Mon, Sep 1, 2014 at 1:52 AM, wrote:
> If you don't want to wrap the object in an atom, you can also reify an
> object that supports IDeref which returns your object. All reified objects
> support IObj out of the box.
>
As I said earlier:
... can't deref it since I can't change the functions
14 matches
Mail list logo