On 21 April 2012 14:41, Dan Cross cro...@gmail.com wrote:
On Sat, Apr 21, 2012 at 6:20 AM, David Jagoe davidja...@gmail.com wrote:
Can anybody tell me whether wkhtmltopdf or flying-saucer deal with
pagination properly? I've been templating TeX to get properly laid out
tables broken over
Hi all,
Glad to announce the new release of slacker, an RPC framework for clojure:
https://github.com/sunng87/slacker
Major changes in this release:
* clojure 1.3 compatible
* performance boost: 8x faster than previous release
* ring app wrapper: slacker can be wrapped as a ring app
If you
On Sun, Apr 22, 2012 at 3:33 AM, David Jagoe davidja...@gmail.com wrote:
On 21 April 2012 14:41, Dan Cross cro...@gmail.com wrote:
On Sat, Apr 21, 2012 at 6:20 AM, David Jagoe davidja...@gmail.com wrote:
Can anybody tell me whether wkhtmltopdf or flying-saucer deal with
pagination
Oups :) Should have read twice :)
He did say, compile-time error. These errors are at run-time - that
is, the following is just as obviously bad, but generates no warning
until bar is called:
(defn foo [x] 1)
(defn bar [y] (foo y 1)) ;; compiles fine
(bar 5) ;; throws runtime
I wanted to log some information during the execution of the genetic
algorithm I posted earlier
herehttps://groups.google.com/forum/?fromgroups#!topic/clojure/mwFTyEA0xvY.
So I chnaged the code and changed the function 'track-evolution' so, that
it now accept a maximal runtime and returns a
I didn't know that support had been added to paredit mode! When I
googled for better Clojure support, I didn't see that one.
The differences between Kovac's Nov 2011 version and mine is only that
mine applies the mode to VimClojure REPL buffers. I haven't checked to
see whether he treats {} the
Hi, all. I am new to Clojure and feel exciting playing with it.
Recently, I read the book The Joy of Clojure, and got a strong
feeling toward translating the book from English to Chinese, to
introduce Clojure to more programmers in China.
Actually I am working now. However, though having some
Just a quick guess after a quick glimpse at the code you linked:
(map #(send % a-day-in-the-life-agent-fn) domiciles)
map is lazy. It doesn't execute anything until you request the result.
(do ... (map ...) (foo)) discards the result of map, making it a
no-op.
This also explains why it works in
BTW, is there any way to get the book's source code (latex or other)?
so that I can do a fully translation, with the right typesetting, etc.
I will try to publish the book translated if chances, and contribute all
the remuneration (if any) to the Clojure community.
I would like to know if this
I had made some changes on the code I posted.
Here is the actual usedcode with the logging functions included.
(ns evolution.genalg
(:use [util.time])
(:use [util.profile]))
;; Implementation of a genetic algorithm based on the code given
;; in the book Clojure by Stefan Kamphausen and Tim
Version 0.9.3 does indeed support balanced map literals.
I believe that the bitbucket repository is the official home of slimv (from
which paredit.vim comes): https://bitbucket.org/kovisoft/slimv/ .
On Sunday, April 22, 2012 7:53:26 AM UTC-7, dgrnbrg wrote:
I didn't know that support had
Thanks Cedric - that's very nice.
I'm beginning to understand the power of macros. I have to say they are not
very well explained in the clojure docs.
In particular, how many distinct 'macro operators' are there, and what are
their precise definitions?
For instance, is ~' a single operator, or
~' is two operators.
'x is the same as (quote x)
~'x has the effect of not namespacing the symbol when it expands. You can
use this technique to create symbols with known names (rather than random
autogensymed symbols) that you can use inside your macro.
--
You received this message because
I often write functions like this:
(defn foobar []
(let [log (makeLogger foobar)]
blah blah ))
where makeLogger returns a logging function that prefixes all messages with
the name provided.
It looks as though macros don't have a stringize ability (like the C
preprocessor) so that
On Sun, Apr 22, 2012 at 5:42 PM, timc timgcl...@gmail.com wrote:
I often write functions like this:
(defn foobar []
(let [log (makeLogger foobar)]
blah blah ))
where makeLogger returns a logging function that prefixes all messages with
the name provided.
It looks as though
On Sun, Apr 22, 2012 at 3:28 PM, Evan Mezeske emeze...@gmail.com wrote:
Version 0.9.3 does indeed support balanced map literals.
I believe that the bitbucket repository is the official home of slimv (from
which paredit.vim comes): https://bitbucket.org/kovisoft/slimv/ .
Just an FYI, but
On Apr 22, 10:40 am, Zhitong He hez...@gmail.com wrote:
Hi, all. I am new to Clojure and feel exciting playing with it.
Recently, I read the book The Joy of Clojure, and got a strong
feeling toward translating the book from English to Chinese, to
introduce Clojure to more programmers in
On Friday, April 20, 2012 8:21:56 AM UTC+10, Craig Ching wrote:
Ok, I've read that what I want to do is a no no. But this is the sort of
thing I did in Scheme about 20 years ago (and because of that I'm probably
misremembering ;-)).
Basically I'm learning clojure and thought I'd write a
On Saturday, April 21, 2012 12:26:30 AM UTC+10, Craig Ching wrote:
On Friday, April 20, 2012 9:07:49 AM UTC-5, Walter van der Laan wrote:
You could start with pure functions to handle the game logic, e.g.:
(defn new-game []
[[\- \- \-]
[\- \- \-]
[\- \- \-]])
(defn
Not sure what you want to obtain, but consider this example
(defmacro foo [fn-name]
`(defn ~fn-name []
~(str fn-name)))
(foo some-name) ; This will define a function some-name, which returns it's
name as a string some-name
понедельник, 23 апреля 2012 г., 1:42:26 UTC+4 пользователь timc
(defmacro foo [fname body]
`(defn ~fname []
(let [~'log (~'makeLogger ~fname)]
~@body)))
You may be able to do this as:
(defmacro foo [fname body]
`(defn ~fname []
(let [~'log (~'makeLogger ~(str fname))]
~@body)))
Macros can call other functions - so you
Regarding learning about macros: I suspect that most within the
community are relying on existing knowledge of writing macros in
Common Lisp or relying on documentation for Common Lisp. I highly
recommend reading Paul Graham's _On Lisp_.
http://paulgraham.com/onlisp.html
Ken
On Sun, Apr 22,
Hi
I'm new to Clojure but very keen to learn. I'm following Web
Development with Clojure (http://www.vijaykiran.com/2012/01/11/web-
application-development-with-clojure-part-1/) and came across the
following code:
(run-jetty #'routes {:port (or port 8080) :join? false}))
I know that #'routes
Hi,
I've run into such an error:
(clojure.template/apply-template '[x] 'x '[[x]]) ;=
StackOverflowError
It appears to be caused by replacing x with [x] infinitely
recursively. Is it a bug or spec?
--
You received this message because you are subscribed to the Google
Groups Clojure group.
To
I think that falls under the heading of don't do that. :)
clojure.template (which I wrote) wasn't a great idea to begin with. It was
slightly useful in clojure.test, but I haven't found a use for it since.
-S
On Sunday, April 22, 2012 8:02:45 AM UTC-4, Shogo Ohta wrote:
Hi,
I've run into
Hi Dave,
If you write
(run-jetty routes ...)
then the current value of routes is looked-up and passed to run-jetty.
You won't see any change if you subsequently redefine routes, because the
original definition is what was passed to run-jetty.
On the other hand,
(run-jetty #'routes ...)
I am having trouble porting my simple VimClojure support with the
version 0.9.6 of the script. The integration w/ slimv's REPL appears
to have increased. I'm not sure what the best course of action is,
since I don't really want to continue trying to merge the codebases,
and instead just fix any
Thank you, George. I will to contact a publisher to negotiate the
translation rights with Manning.
On Mon, Apr 23, 2012 at 7:50 AM, George Oliver georgeolive...@gmail.com wrote:
On Apr 22, 10:40 am, Zhitong He hez...@gmail.com wrote:
Hi, all. I am new to Clojure and feel exciting playing with
I don't think the book is an open source one, so you should have to find a
publisher in China first. And ask them to contact Manning for the importing
details.
On Apr 23, 2012 1:59 AM, Zhitong He hez...@gmail.com wrote:
BTW, is there any way to get the book's source code (latex or other)?
so
Note that Tomas recently extracted paredit from slimv, so it has its
own home now: https://bitbucket.org/kovisoft/paredit
Also, there have been several important bug fixes applied to paredit
in the last few months. It would be great if any improvements you've
made could make it back into the
30 matches
Mail list logo