So far this is fantastic! And I haven't even got around to playing with the
restart mechanism :) I'm using it in Spinoza to provide contextual errors
(malformed slot list, missing base class etc.). I notice the contrib
libraries in general are very good at throwing exceptions so that consumers
project might meet up soon?
Or am I totally wrong?
On Thu, Feb 12, 2009 at 12:02 PM, mikel mev...@mac.com wrote:
David Nolen and I were recently discussing CLOS and method dispatch. I
implemented such a scheme for my own use. This post is an FYI for
David and anyone else who might
You can pretty much call anything outside of the quote, in fact all runtime
information is available (you have access to anything that was previously
read). The main thing to understand is that all parameters passed to your
macro are unevaluated.
On Sat, Feb 14, 2009 at 10:45 AM, samppi
(map (fn [ rest] (apply vector rest)) [1 2 3] ['a 'b 'c] [cat dog
bird])
On Sun, Feb 15, 2009 at 7:16 PM, samppi rbysam...@gmail.com wrote:
What would I do if I wanted this:
[[a0 a1 a2] [b0 b1 b2] ...] - [[a0 b0 ...] [a1 b1 ...] [a2 b2 ...]]
I could write a loop, I guess, but is there a
Actually something closer to your exact expression is this:
(apply (partial map (fn [ rest] (apply vector rest))) [[1 2 3] ['a 'b 'c]
[cat dog bird]])
On Sun, Feb 15, 2009 at 7:42 PM, David Nolen dnolen.li...@gmail.com wrote:
(map (fn [ rest] (apply vector rest)) [1 2 3] ['a 'b 'c] [cat dog
Would it be possible to make the arguments to handle be optional? Is this a
good or bad idea?
It seems to me, in the case of setting up test fixtures that check for
raised errors, often you don't care what arguments the error takes.
David
On Fri, Feb 6, 2009 at 9:10 PM, Chouser
I'm sure it can be done, but it's not clear to me if you have a vector of
vectors
how Stuart's solution would work:
1:15 user= (map vector vecs)
([[:a0 :a1 :a2]] [[:b0 :b1 :b2]])
(apply (partial map vector) [[1 2 3] ['a 'b 'c] [cat dog bird]])
works on a vector of vectors. The OP wanted a
:height])))
Much nicer than those ugly Java Exceptions, no? ;)
On a last note, I've found your qualify-sym fn quite handy and have been
using it elsewhere ;)
On Sun, Feb 15, 2009 at 11:52 PM, Chouser chou...@gmail.com wrote:
On Sun, Feb 15, 2009 at 10:06 PM, David Nolen dnolen.li...@gmail.com
Heh not macro, I meant multimethod.
Here is the macro that seems to work, any improvements much appreciated ;)
This fails when no error is raised, when the wrong error type is raised, and
I believe it's captures errors which are derived but not the exact error (is
this a weird behavior?).
I don't quite understand why you got through all that work to get
error-str -- isn't it just (str (qualify-sym error-type))?
...and since you then use it only as an arg to 'symbol' or 'str', you
could just use the symbol itself instead of converting it to a string
and back.
If I bring the
butlast, doall, dorun, doseq, dosync, dotimes, doto, fnseq, gensym,
macroexpand, macroexpand-1, mapcat, nthrest
-1
Because they are similar to other Lisps I assume. The same reason for
println vs print-line. Changing these are a bad idea in IMHO.
Breaking the meaning of rest with Common
On Mon, Feb 16, 2009 at 10:27 AM, rob levy r.p.l...@gmail.com wrote:
So if I am right about these two facts, it seems like Clojure should
include a native way of making applets/applications that both enables the
truly functional style that Clojure is built on, and doesn't require writing
Java
(defmethod assert-expr 'raised? [msg [_ error-type body :as form]]
(let [error-name (qualify-sym error-type)]
`(with-handler
(do
~...@body
(report :fail ~msg '~form ~(str error-name not raised.)))
(handle ~error-type {:as err#}
(report :pass ~msg '~form
Is using subvec for something like this a bad idea?
On Wed, Feb 18, 2009 at 12:38 AM, CuppoJava patrickli_2...@hotmail.comwrote:
Hi,
I'm wondering if there's a terser more idiomatic way to write the
following. I want to get a new vector with the specified indexes
removed. I found myself
new MBP 2.53ghz
(defn create-fn []
(fn [] (println hi)))
(time (dotimes [x 4000]
(create-fn)))
Elapsed time: 1034.409 msecs
Hopefully you don't need 40,000,000 functions in less than a second ;)
On Wed, Feb 18, 2009 at 1:16 AM, CuppoJava patrickli_2...@hotmail.comwrote:
(defn
My point was that you could use subvec to do vector splicing and build your
remove function off of that. I'm sure the more experienced Clojurians can
chime in on what is the most idiomatic form.
On Wed, Feb 18, 2009 at 1:10 AM, CuppoJava patrickli_2...@hotmail.comwrote:
Mmm, subvec doesn't
Practical Common Lisp is also online and free. Though there are significant
differences between the two languages many of the strange and beautiful
concepts that Clojure embraces are covered there. Especially dynamic
variables, macros, destructuring bind, and multiple dispatch.
On Wed, Feb 18,
If I've been following things correct:
rest _used_ to force the seq, it does no longer.
next forces the seq
In my own mind i'm thinking next to mean (return the seq with the next value
computed), rest now means just give me the uncomputed remaining values of
the seq.
On Wed, Feb 18, 2009 at
Of course I beg to differ. The Stuart Halloway's book is fantastic of
course, I have it myself. It's absolutely required reading. Stuart does
his best to describe the ins and outs of the language while giving a crash
course on the Lisp philosophy. And yes Clojure is syntactically different
No offense here to Lispers but when I learn a new language, I try to learn
it as it is and I make parallels
and connections with what I know at the moment. Otherwise you end up
learning more than one thing
at the same time and it can get quite confusing.
If your experience is made mostly
Great list.
On Thu, Feb 19, 2009 at 11:39 AM, Stuart Halloway stuart.hallo...@gmail.com
wrote:
Thanks for the kind words, David. I hope many people will like
Programming Clojure and find it useful.
Clojure has a *ton* of goodness in it. I think many of the chapters in
Programming Clojure
Check out Chouser's error-kit in clojure-contrib. It borrows from the
condition/restart system of Common Lisp.
On Thu, Feb 19, 2009 at 5:25 PM, levand luke.vanderh...@gmail.com wrote:
So, my project is reaching a sufficient level of complexity where I
really need good error tracking - when
This not hard to implement. This exactly what Spinoza does. Feel free to
lift any of my code.
On Sat, Feb 21, 2009 at 9:08 AM, Mark Volkmann r.mark.volkm...@gmail.comwrote:
Is there a way to test whether a given object is an instance of a
given structmap?
For example,
(defstruct dog-struct
For example, with Spinoza:
(def my-circle (make-instance circle))
(instance-of? my-circle circle) ; true
circle is just a struct.
On Sat, Feb 21, 2009 at 2:09 PM, David Nolen dnolen.li...@gmail.com wrote:
This not hard to implement. This exactly what Spinoza does. Feel free to
lift any
I'm interested as well.
On Sat, Feb 21, 2009 at 3:03 PM, Dan Larkin d...@danlarkin.org wrote:
On Feb 21, 2009, at 2:23 PM, mikel wrote:
If there's interest in having models and generic functions in contrib,
I'll get a contributor agreement to Rich.
Aye there is, from me at least.
+name+ is also in line with Common Lisp patterns
http://www.cliki.net/Naming%20conventions
On Sat, Feb 21, 2009 at 4:07 PM, Luc Prefontaine
lprefonta...@softaddicts.ca wrote:
In our software, we use uppercase or +name+ as constant names.
Both Java and RUBY use uppercase, I think it's more a
The fact that the Clojure data structures are immutable and that some of
those data structures might be used logically constants are two separate
concerns. When reading Clojure code, we've already internalized the fact
that the data structures are immutable. Using a naming convention for a
(defmacro again [n body]
`(dotimes [~'_ ~n] ~...@body))
(again 3 (println Ho))
On Sat, Feb 21, 2009 at 5:51 PM, samppi rbysam...@gmail.com wrote:
For now, I do:
(dotimes [_ 3] (print Ho))
But I also think it would be a nice, natural addition.
On Feb 21, 3:07 pm, Timothy Pratley
dissoc is like assoc.
If you want to use collections with dissoc you can always use apply. It's
not too much to type:
(def my-map {:first Bob, :middle Joe, :last Smith})
(apply dissoc my-map [:first :middle])
On Sat, Feb 21, 2009 at 5:58 PM, samppi rbysam...@gmail.com wrote:
Allowing dissoc
want?
On Sat, Feb 21, 2009 at 6:24 PM, Mark Volkmann r.mark.volkm...@gmail.comwrote:
On Sat, Feb 21, 2009 at 5:07 PM, David Nolen dnolen.li...@gmail.com
wrote:
dissoc is like assoc.
If you want to use collections with dissoc you can always use apply. It's
not too much to type:
(def my
On Feb 21, 5:58 pm, samppi rbysam...@gmail.com wrote:
Allowing dissoc and select-keys to accept both keys as arguments and
as a collection would be nice, and backwards compatible.
Nope - Collections can be keys.
Ah the power of Clojure ;) The fact that (almost?) anything can be a key is
Thanks for the points.
What I was thinking, was that for things like π, in Clojure (as in CL),
perhaps it makes to sense to mark it like so:
+pi+
On Sat, Feb 21, 2009 at 8:59 PM, Chouser chou...@gmail.com wrote:
On Sat, Feb 21, 2009 at 5:36 PM, David Nolen dnolen.li...@gmail.com
wrote:
My
In general, I find that multiple arguments types for a function confusing.
If dotimes is going to take multiple types it should be a multifn. That
seems to imply a performance hit.
I think Clojure wisely does not (or rarely does not?) allow for multiple
types to be passed into a function.
On top
, David Nolen dnolen.li...@gmail.com
wrote:
In general, I find that multiple arguments types for a function
confusing.
If dotimes is going to take multiple types it should be a multifn. That
seems to imply a performance hit.
I think Clojure wisely does not (or rarely does not?) allow
Interesting thread on LtU on this subject:
http://lambda-the-ultimate.org/node/1646
On Mon, Feb 23, 2009 at 10:42 AM, Mark Volkmann
r.mark.volkm...@gmail.comwrote:
I have an idea I'd like to float to see if there are reasons why it's
a bad idea.
What if Clojure had an alternate surface
Is this supported yet? M-. is supposed to handle this, but I get an error
when I try.
David
--~--~-~--~~~---~--~~
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
(time (let [arr (make-array Float/TYPE 1 1)]
(dotimes [_ 10]
(let [#^floats sub-arr (aget arr 0)]
(aset-float sub-arr 0 0.0)
Seems to work? Looks an eligible candidate for a macro.
On Mon, Feb 23, 2009 at 9:04 PM, Jason Wolfe jawo...@berkeley.edu wrote:
I'm trying to call some
You're right, works perfectly on clojure sources, but not the instances
you've described. It would be great if this would work again. I don't
understand swank/slime well enough to try it myself.
On Mon, Feb 23, 2009 at 9:23 PM, Alec Berryman a...@thened.net wrote:
David Nolen on 2009-02-23 16
1) User-friendly printing.
I implement the multimethods print-method and print-dup for my
classes, which allows me to specify how objects are printed. print-
method and print-dup dispatch on class, so my types need to be
classes or at least derive from a class that is distinct from the
That should work fine as far as I can tell.
On Wed, Feb 25, 2009 at 3:36 PM, Jeffrey Straszheim
straszheimjeff...@gmail.com wrote:
If in namespace one I define
(defmulti fred dispatch-fred)
and have imported that ns into another, can I just do
(defmethod fred ::val [x] ),
or
25, 12:19 pm, Konrad Hinsen konrad.hin...@laposte.net wrote:
On Feb 25, 2009, at 17:40, David Nolen wrote:
Should print and println be multimethods? It seems the ability to
custom print a data structure would be generally useful.
It's already there, just not documented as far as I know
What about something like:
(defn gt [str1 str2]
(first (sort [str1 str2])))
(gt Zoe Bob) ; - Bob
On Fri, Feb 27, 2009 at 12:03 PM, Phil Hagelberg p...@hagelb.org wrote:
Christian Vest Hansen karmazi...@gmail.com writes:
Are you referring to using , , =, with objects that implement
Remember that you can force lazy sequences if you need to as you are with
doseq with doall (retains head) and dorun (does not) as well.
You probably want
(dorun (map #(add-watch % watcher callback-fn) all-agents))
I think it's pretty clear here what's going on. Your code needs
side-effects. In
I appreciate that they stand out. Again, this is similar to the constants
conversation earlier, visually marking the intended use is a good habit,
IMHO. Of course this doesn't mean that error-kit should define the base
error this way, but I intend to keep on wrapping my errors in earmuffs :)
capitals seems pretty weird for a Lisp. Now that I think about it, perhaps
foo-error isn't so bad.
David
On Tue, Mar 3, 2009 at 10:54 PM, Chouser chou...@gmail.com wrote:
On Tue, Mar 3, 2009 at 10:36 PM, David Nolen dnolen.li...@gmail.com
wrote:
I appreciate that they stand out. Again
Depending on what you are doing perhaps you could use (hash x). This might
not be very helpful if you need to update keys frequently. However if
you're mostly doing lookups, then this would help quite a bit.
On Sat, Mar 7, 2009 at 3:44 PM, Mark Engelberg mark.engelb...@gmail.comwrote:
Here's
Structs are maps with shared keys and positional constructors as Rich
mentions in the original post. I think Rich is saying that maps should
indeed be abused ;) By building all higher level structures on top of
them, consumers are guaranteed not only your custom functionality, but all
the
It does. Also Practical Common Lisp and On Lisp cover this in depth as well,
though you'll need to convert commas into tildes as well as use ~' for each
level of backquote depth that you don't want Clojure to namespace free
symbols.
On Tue, Mar 10, 2009 at 6:05 PM, .Bill Smith
Practical Common Lisp and On Lisp are available online and free.
On Tue, Mar 10, 2009 at 6:16 PM, David Nolen dnolen.li...@gmail.com wrote:
It does. Also Practical Common Lisp and On Lisp cover this in depth as
well, though you'll need to convert commas into tildes as well as use ~' for
each
Doesn't error-kit do this?
On Wed, Mar 11, 2009 at 10:15 PM, Mark Engelberg
mark.engelb...@gmail.comwrote:
I'm thinking about implementing a backtracking mechanism that throws
errors as a way to escape out of the current computation and try
another possibility. I'd want to create a specific
Amazing stuff. In particular this finally makes debugging macros sane.
For those of you that are using swank-clojure you only need to make minor
modifications to swank-clojure to pretty-print your macro expansions to the
macro expansion buffer. Even better you can move the cursor to subform
So that people can copy and paste the change in basic.clj
(defn- apply-macro-expander [expander string]
(binding [*print-suppress-namespaces* true]
(let [astr (with-out-str
(with-pprint-dispatch *code-dispatch*
(pprint (expander (read-from-string string)]
(subs astr 0 (dec
I suppose the following is more idiomatic:
(defn- apply-macro-expander [expander string]
(let [astr (with-out-str
(binding [*print-suppress-namespaces* true]
(with-pprint-dispatch *code-dispatch*
(pprint (expander (read-from-string string))]
(subs astr 0 (dec (count
* true]
(with-pprint-dispatch *code-dispatch*
(write (expander (read-from-string string)) :pretty true :stream
nil
Completely untested! :-)
Tom
On Mar 12, 11:07 am, David Nolen dnolen.li...@gmail.com wrote:
I suppose the following is more idiomatic:
(defn- apply-macro
On Mon, Mar 16, 2009 at 3:42 AM, Tassilo Horn tass...@member.fsf.orgwrote:
When adding ~/.clojure/ to `swank-clojure-extra-classpaths' and starting
SLIME, htop shows that this directory is not in the -cp java option.
Sending a SIGINT kills the clojure process and doesn't interrupt the
This has come up before. You can actually work around this (search the
mailing list for declare)
I think that when not hacking against the REPL that the default behavior is
a good one. Having to use declare bugged me a little at first, but I now
consider it a very minor annoyance compared to the
in another thread about
declare and someone had hacked the reader to not bail immediately on
undefined symbols).
In CL, if you have definitions out of order in the compiler will issue
warnings.
I'm not saying it's an easy change...
Paul
On Mon, Mar 16, 2009 at 3:45 PM, David Nolen dnolen.li
I'm mostly a front-end UI person with crazy amounts of JS experience so most
of my input will be from that stand point.
1. I agree with Sean on this one. No need to bring in middleware that can't
be expressed in 10X-20X less code in pure Clojure.
2. The framework should allow for any backend
Doesn't On Lisp talk about simulating CLOS with closures? It's free online.
I would like to add as the creator that I would not use Spinoza yet ;) And
I've put it on hold as I'm currently obsessed with trying to port cl-cont.
Spinoza still needs quite a bit of work, I started on that before a
You can get it here:
http://github.com/swannodette/clj-cont/tree/master
So over the past week I've been porting cl-cont (
http://common-lisp.net/project/cl-cont/) originally written by Slava
Akhmechet to Clojure. I've now ported most of the functionality that's
translatable from Common Lisp
Congrats! It's been said many a time, but it bears being said again, Clojure
makes hacking fun again. It's great working with a language that is very
production ready, yet still evolving at a quick clip. It's also fascinating
that a language supports so many different usage patterns- the
I'm wondering if it's possible to create a Clojure function that does what
the dot operator does. It seems like this would be possible with definline
but I'm unable to get this to work or figure it out. For example I want to
be able write something like the following:
(dot Hello world (list
On Sat, Mar 21, 2009 at 9:10 PM, Kevin Downey redc...@gmail.com wrote:
you want defmacro not definline. the result of a macro is a data
structure. that data structure is then evaluated in place of the call
to the macro. definline (I think?) behaves similar to a function, so
if it returns a
Or rather I did not express that requirement clearly enough.
On Sat, Mar 21, 2009 at 9:21 PM, David Nolen dnolen.li...@gmail.com wrote:
On Sat, Mar 21, 2009 at 9:10 PM, Kevin Downey redc...@gmail.com wrote:
you want defmacro not definline. the result of a macro is a data
structure
Thanks all for the pointers, this looks like a workable approach. In my
case I'm not bothered by the performance hit from reflection (CPS
transformation creates an obscene number of anonymous functions anyway).
However I am running into an issue. Here's my dot function:
(def not-seq? (comp not
That was it! At one point I knew these things. Thanks much.
On Sun, Mar 22, 2009 at 2:18 PM, Eric Tschetter eched...@gmail.com wrote:
(let [myref (ref {})]
(dot
clojure.lang.LockingTransaction
(list 'runInTransaction (fn [] (commute myref assoc :mykey :myval)
I'm getting a
on reflection you can't expect this code to be super performant.
That may or may matter depending on your use case ;)
On Sun, Mar 22, 2009 at 5:28 PM, David Nolen dnolen.li...@gmail.com wrote:
That was it! At one point I knew these things. Thanks much.
On Sun, Mar 22, 2009 at 2:18 PM, Eric Tschetter
You could always build something where setters/getters are auto-magically
created if specified by the constructor macro. And with clojure.contrib.def
you could auto-magically generate private setters/getters.
On Mon, Mar 23, 2009 at 4:27 AM, Mark Engelberg mark.engelb...@gmail.comwrote:
I've
You need to make sure all the different moving parts are based on the newest
version of Clojure as well. This includes swank-clojure, clojure-mode, and
any other libs you might be using.
On Mon, Mar 23, 2009 at 9:51 AM, Dan Pomohaci dan.pomoh...@gmail.comwrote:
Hi,
When I start slime with
The latest version of Clojure incorporated lazy sequences which broke many
libraries early on. Most of these problems have been worked out. In my
experience you should use the cutting edge version of everything including
SLIME. I clone everything from GitHub (clojure, clojure-contrib,
Javadoc would be nice, but I do note that Rich's Java code is pretty darn
clear ;)
I also note the indentation style is similar to Whitesmith's according to
Wikipedia http://en.wikipedia.org/wiki/Indent_style. I've always preferred
the BSD curly brace level matching convention over the KR
For what it's worth I'm a big fan of the wishful thinking programming style.
I write some functions how I think they should look, declare the functions I
haven't defined yet. Then I implement the lower level functions, write some
tests- then usually the higher level stuff works without too much
On Sat, Mar 28, 2009 at 4:40 PM, mikel mev...@mac.com wrote:
So, at minimum, to make a solid port, you need to add a function that
can return a sensible type value for any input
Enjoying the thread. Out of curiosity for which Clojure values is the return
value of the type function undefined?
Having thought a little about multiple inheritance when implementing Spinoza
I also ran into this problem. However at the time I wasn't hindered by
multifn dispatch as much as the fact that parents cannot be ordered (because
calling parents on a tag returns a set) as pointed out by Mark. I
very cool :)
On 3/28/09, Stuart Sierra the.stuart.sie...@gmail.com wrote:
Hi folks,
I finally came up with fixtures for clojure.contrib.test-is. Now you
can do before/after setup for each test case. Here's the
documentation, let me know what you think.
-Stuart Sierra
;; FIXTURES
On Sun, Mar 29, 2009 at 1:25 AM, mikel mev...@mac.com wrote:
(type (proxy [clojure.lang.IMeta clojure.lang.IRef][]))
java.lang.UnsupportedOperationException: meta (NO_SOURCE_FILE:0)
[Thrown class clojure.lang.Compiler$CompilerException]
No doubt someone is going to point out that the
Glad to be of help. To be totally honest I hadn't really tested it too much,
so I don't know ;) One obvious limitation here is that it doesn't work with
multiple inheritance (it only looks at the first item in the parents set).
As long you're sticking with a Java-style single inheritance model
There's a few posts on the mailing list suggesting some good starting
points. You can get far in Clojure without resorting to Java but it
definitely helps to know some if you really want to advance your knowledge
of Clojure's inner workings as well as get it to interoperate with Java
libraries.
Did you try using aset-int instead of aset?
On Tue, Mar 31, 2009 at 8:25 AM, Vincent Foley vfo...@gmail.com wrote:
For those interested, I managed to improve the performance of my
original program from 2 minutes 40 seconds to decode 1000+ files down
to 2 minutes. I'm still far from my goal,
defense I did not know such a function existed :) I'll
give it a whirl and report back!
On Mar 31, 9:57 am, David Nolen dnolen.li...@gmail.com wrote:
Did you try using aset-int instead of aset?
On Tue, Mar 31, 2009 at 8:25 AM, Vincent Foley vfo...@gmail.com
wrote:
For those
Other VM operations
0.0% 1 Class loader
0.0% 2 Unknown code
176.257 secs
On Mar 31, 8:57 pm, David Nolen dnolen.li...@gmail.com wrote:
Thanks to cl-format:
(fn
[buf__2572__auto__ len__2573__auto__]
(if (= len__2573__auto__ 1
Foley vfo...@gmail.com wrote:
I tried it just now; it made no difference. Nevertheless, thank you
for you help and time!
On Mar 31, 9:38 pm, David Nolen dnolen.li...@gmail.com wrote:
Did you try
(int (mask8 (. buf__2572__auto__ (get
?
Your macro should like this:
(defmacro
comp creates a new function that you can store.
- threads a value through a series of expressions.
On Wed, Apr 1, 2009 at 12:52 AM, kkw kevin.k@gmail.com wrote:
Hi folks,
I have some code where I wanted to:
- take a list of stuff (which includes another list inside)
- use
Very cool.
On Wed, Apr 1, 2009 at 8:47 AM, Rich Hickey richhic...@gmail.com wrote:
I've added get-method (SVN 1338).
(derive ::Circle ::Shape)
(derive ::Rect ::Shape)
(defmulti area :Shape)
;note - you can name methods
(defmethod area ::Shape area-shape [x] nil)
(get-method area
you should look into float-array and friends.
On Fri, Apr 3, 2009 at 12:04 AM, Sean francoisdev...@gmail.com wrote:
I'm working with AWT, and there is a method that requires a float[]
(The java.awt.BasicStroke constructor). Is it possible to directly
create an array of primitives directly
I think what you want is:
(def foo (ref 0))
(defn square [x] (* x x))
(defn square-ref [x] (dosync (ref-set foo (square x
(square-ref 2)
On Mon, Apr 6, 2009 at 3:02 PM, bgray graybran...@gmail.com wrote:
I have a some what (I believe) easy question. Could someone let me
know what I'm
Congrats!
Perhaps soon there should be a Projects Using Clojure section on the main
site?
Good way to get the word out that people are using Clojure in the real
world
David
On Tue, Apr 7, 2009 at 10:47 AM, Sean francoisdev...@gmail.com wrote:
Okay wow... it'll take some time to fully
Very exciting, thanks for the excellent and informative writeup.
On Wed, Apr 8, 2009 at 12:41 AM, John D. Hume duelin.mark...@gmail.comwrote:
As predicted, Google has now released Java support for AppEngine. I
was lucky enough to get an early look, which I dedicated entirely to
Clojure.
This is great. I had thought that supporting some kind of partial template
thing would be interesting, but that's actually just my poor logic at work
;)
It seems like with the new version of Enlive I could do something like this:
(deftemplate pageA-template path
[]
[[:div (attr?
Real quick thought:
(deftemplate-generator template-generator
[args]
rule-vector transform-fn)
Would produce a template generator.
(def template-name (template-generator path-to-xml-or-file-or-xml-string))
Would produce a real template.
(apply str (template-name arg1 arg2 arg3))
Using try-catch for control flow is probably not a good idea. Shameless
plug, do you think you could get this to work with clj-cont? clj-cont is a
port I did of cl-cont. It has some limitations, but because Clojure has so
few special forms (compared to Common Lisp), it has the chance to achieve
anything else.
However, with some quick testing I note that using Exceptions for flow
control might be even 2x slower than clj-cont.
On Mon, Apr 13, 2009 at 1:54 PM, David Nolen dnolen.li...@gmail.com wrote:
Using try-catch for control flow is probably not a good idea. Shameless
plug, do you
throwing away the away stack trace
making debugging more difficult? It got me thinking about arbitrary flow
control, on the nested loop thread I've added my findings...
On Mon, Apr 13, 2009 at 4:24 PM, Victor Rodriguez vict...@gmail.com wrote:
On Mon, Apr 13, 2009 at 2:13 PM, David Nolen dnolen.li
Out of simple curiosity I wondered how hard it would be to implement flow
control using proxy. I know Rich isn't hot on non-structured programming,
but there may be times where this might be useful:
(ns flow.return-from
(:import (flow IReturnFrom)))
(defn create-return-from
[value]
(proxy
Do you have any plans for continuing to support this? If so are you against
putting this on GitHub or Google Code so that people can follow it's
development?
Thanks for contributing it to the community.
On Wed, Feb 25, 2009 at 7:49 PM, jim jim.d...@gmail.com wrote:
I've just uploaded a
at 1:19 AM, David Nolen dnolen.li...@gmail.com wrote:
Do you have any plans for continuing to support this? If so are you against
putting this on GitHub or Google Code so that people can follow it's
development?
Thanks for contributing it to the community.
On Wed, Feb 25, 2009 at 7:49 PM, jim
Cool! Rather then waiting, you could host it in the interim on GitHub or
Google Code so people like myself can submit patches (which I'm more than
willing to do) ;) Just a thought...
A couple of things:
(println
(javascript (var x)))
I would expect this to convert to:
var x;
It does not.
Cool! Rather then waiting, you could host it in the interim on GitHub or
Google Code so people like myself can submit patches (which I'm more than
willing to do) ;) Just a thought...
A couple of things:
(println
(javascript (var x)))
I would expect this to convert to:
var x;
It does not.
Joda Time, Colt, Fork/Join seem like projects that truly add something to
Clojure. These are projects which solve problems that developers have come
to expect from their respective language.
Joda Time - sane date/time (really useful when building web services).
Colt - enough people want to do
again (writing
matrix math Clojure apps on top of Clojure vectors...)
On Tue, Apr 14, 2009 at 11:01 AM, David Nolen dnolen.li...@gmail.comwrote:
Joda Time, Colt, Fork/Join seem like projects that truly add something to
Clojure. These are projects which solve problems that developers have come
1 - 100 of 2038 matches
Mail list logo