For the life of me, I can't get sessions to work, immaterial of which
tutorial I try and get going??? Is there any tutorial out there that
explicitly explains everything for a newb like me? After several
round, I did successfully get form params to work! YEAH! But now, I'd
like to create a login s
'read' and 'read-string' are what you're looking for. They each read a
single Clojure object from an input source (PushbackReader for read,
String for read-string).
Alternatively, something like this can read all top-level forms from a
file:
(defn read-all
"Reads all top-level forms from f, whi
On Mon, May 9, 2011 at 11:26 PM, Ken Wesson wrote:
> The code is idiomatic Clojure, using sequence functions in preference
> to loop/recur and itself using higher order functions in what might be
> described as a continuation-passing style. There is also no mutation
> or impure function use except
How do I actually manipulate it? I have some complicated logic that I
would like to transform into html (or maybe xml) for display
purposes.
I'm generating the Clojure code by parsing some nasty Java and
outputting s-expressions. The Java is basic, but quite deeply
nested. I want to generate wo
Many thanks for all of your contributions so far! I definitely will
(and already have to some extent) go through the recommended links.
One additional project I came across that looks interesting is midje:
https://github.com/marick/Midje/wiki
I see the point of having a forum to discuss best solut
>From http://en.wikipedia.org/wiki/Monty_Hall_problem we have this
description of the Monty Hall Problem:
> Suppose you're on a game show and you're given the choice of three
> doors [and will win what is behind the chosen door]. Behind one
> door is a car; behind the others, goats [unwanted booby
>
> Of course, it would be desirable to be able to not blow all the user's
> computer memory ... so maybe having the ability to share JVM between
> several open projects in the IDEA, while keeping isolated different
> clojure environments, would be a plus.
>
> I had the idea of investigating what t
> Just a question. The general philosophy of clojure is to have good
> base building tools, and maybe the "building blocks" of more
> integrated solutions could also be based on the same philosophy.
> I mean, all the points listed in b) could / should / may (?) not be
> tied to nrepl-server, should
Just a quick announcement that I've pushed an initial version of
Seesaw, my Clojure + Swing experiment, to Clojars. If anyone gives it
a try, I'd love to hear feedback. On GitHub here:
https://github.com/daveray/seesaw
Cheers,
Dave
--
You received this message because you are subscribed to
On Mon, May 9, 2011 at 6:43 PM, Mike Meyer wrote:
> One thing that happens to such posts is they turn into threads of
> "best way to solve this problem" - where "best" varies by author.
I'm not sure if you intended this as a criticism of the idea, or if
you are thinking the same thing I am, but I
On Mon, May 9, 2011 at 6:55 PM, Andy Fingerhut wrote:
> (ns movavg
> (:gen-class))
>
> (set! *warn-on-reflection* true)
>
>
> (defn sliding-window-moving-average [window lst]
> (let [w (int window)
> w-1 (int (dec w))]
> (loop [rolling-sum (apply + (take w lst))
> last-w (obj
Sooo, my question was *that* silly ? :'-(
2011/5/7 Laurent PETIT :
> Maybe a silly question, but anyway ...
>
> for CCW, there is this idea of having it maintain, for each open
> project (probably depending on a flag, but that's out of topic), in
> the background (totally transparently for the use
On Mon, May 9, 2011 at 17:50, Chris Perkins wrote:
> On May 9, 8:00 am, Simon Katz wrote:
> > I'm trying to implement a function similar to new, but where
> > the type is not known at compile time -- so I want to evaluate
> > the first argument.
> >
> > With the help of Google, I found the approa
On May 9, 2011, at 6:45 AM, Andreas Kostler wrote:
> Hi all,
> I'm trying to calculate the moving average of a certain window size.
> One straight forward approach is:
> (defn lazy-avg [coll]
> (let [[sum cnt] (reduce
> (fn [[v c] val] [(+ val v) (inc c)])
> [
Cool. I look forward to having approved 1.0.0 releases of contrib
libraries.
On May 9, 3:28 pm, Sean Corfield wrote:
> On Mon, May 9, 2011 at 2:38 PM, Armando Blancas
>
> wrote:
> > Having no clue what to make of 0.0.1 precisely w.r.t. its previous
> > versions numbers, I gathered it's because y
On Mon, 9 May 2011 03:24:44 -0700 (PDT)
Chris Perkins wrote:
> I have been thinking for while that it would be great to have
> something equivalent to book clubs for reading code. A group could
> meet weekly, all having read the same moderate-sized project, and
> discuss. I wonder if this could be
On Mon, May 9, 2011 at 2:38 PM, Armando Blancas
wrote:
> Having no clue what to make of 0.0.1 precisely w.r.t. its previous
> versions numbers, I gathered it's because you can't make out anybody's
> modules anyway, in which I agree.
Well, the previous modules didn't really have version numbers
in
On Mon, May 9, 2011 at 6:06 PM, Paul deGrandis wrote:
> I really like the code in Stuart Sierra's lazytest:
> https://github.com/stuartsierra/lazytest/tree/master/modules/lazytest/src/main/clojure/lazytest
>
> The code in Enlive is also a really great read:
> https://github.com/cgrand/enlive
>
> I
I really like the code in Stuart Sierra's lazytest:
https://github.com/stuartsierra/lazytest/tree/master/modules/lazytest/src/main/clojure/lazytest
The code in Enlive is also a really great read:
https://github.com/cgrand/enlive
I also would recommend going through compojure.
Pau
On May 9, 10:4
Having no clue what to make of 0.0.1 precisely w.r.t. its previous
versions numbers, I gathered it's because you can't make out anybody's
modules anyway, in which I agree.
On May 9, 11:34 am, Sean Corfield wrote:
> On Mon, May 9, 2011 at 8:22 AM, Armando Blancas
>
> wrote:
> > Yeap. Release numb
On Mon, May 9, 2011 at 11:38 AM, Cesare wrote:
> Manuscripts must not exceed 4,700 words including figures and tables,
> which count for 200 words each.
Damn, it's not just the real estate market that's crashed. I remember
when a picture was worth five times that many words!
--
You received thi
On Mon, May 9, 2011 at 8:22 AM, Armando Blancas
wrote:
> Yeap. Release numbers have become meaningless; your point is well
> taken.
Not sure what you mean by that?
The "new contrib" libraries can be seen here, with their current,
evolving version numbers:
https://oss.sonatype.org/index.html#nex
On May 9, 1:49 pm, Alan wrote:
> On May 9, 9:50 am, Chris Perkins wrote:
>
> A mild gripe: we're in a language that doesn't make us use ugly names
> like klass and clazz. Some will disagree with me for sure, but I think
> it's more readable to simply use the symbol "class" when you're
> talking a
Hi Max,
I have started investigating this, and it works very nice.
I am a noob in Clojure/Java and I have a question about posting to FB using
your library. I tried something like this:
*(def auth-token (facebook-auth-by-name))
(def auth-name (first (keys auth-token)))
(with-facebook-auth-by-na
On May 9, 9:50 am, Chris Perkins wrote:
> On May 9, 8:00 am, Simon Katz wrote:
> > I'm trying to implement a function similar to new, but where
> > the type is not known at compile time -- so I want to evaluate
> > the first argument.
>
> > With the help of Google, I found the approach used in ne
The code is somewhat out-of-date by now (pre-1.0 Clojure) but I wrote much
of AltLaw.org in Clojure:
https://github.com/stuartsierra/altlaw-template
https://github.com/stuartsierra/altlaw-clojure-restlet
https://github.com/stuartsierra/altlaw-crawler
https://github.com/stuartsierra/altlaw-backend
compojure is often put forward as an example of good idiomatic clojure code:
https://github.com/weavejester/compojure
On Mon, May 9, 2011 at 10:55 AM, Meikel Brandmeyer wrote:
> Hi,
>
> Am 09.05.2011 um 17:36 schrieb Jonathan Fischer Friberg:
>
>> I'm interested!
>>
>> The clojure source code is
On May 9, 8:00 am, Simon Katz wrote:
> I'm trying to implement a function similar to new, but where
> the type is not known at compile time -- so I want to evaluate
> the first argument.
>
> With the help of Google, I found the approach used in new*
> below:
>
> (ns dynamic-new)
>
> (defn
Well, that's sort of wanting to eat the cake and have it.
It's impossible to resolve a symbol where it isn't known where it came from,
if any resolving is to take place, it must assume to be in the current
namespace.
So yes, you're right; syntax-quote would work best here.
Jonathan
On Mon, May
Hi,
Am 09.05.2011 um 17:36 schrieb Jonathan Fischer Friberg:
> I'm interested!
>
> The clojure source code is a pretty good read, hehe
>
> Jonathan
>
> https://github.com/clojure/clojure/tree/master/src/clj/clojure
Although the code in the preamble of core there is explicitly *not* recommende
Have you considered factory functions and macros? Macros might suit
better if you are dealing with various records.
(defmacro instance
([^Class c]
`(new ~c))
([^Class c & more]
`(new ~c ~@more)))
Since macros are expanded, qualified vs unqualified issue will be
taken care of automatic
On Mon, May 9, 2011 at 16:21, Jonathan Fischer Friberg
wrote:
> Q1 This macro captures the correct namespace:
>
> (defmacro new* [type-name-as-symbol & args]
> `(clojure.lang.Reflector/invokeConstructor
> (ns-resolve ~*ns* ~type-name-as-symbol)
> (to-array '~args)))
>
Unfortunately th
Please disregard the previous version as this is the one containing
full submission information:
Call for Submissions
IEEE Software - Special Issue on Algorithms for Today's Practitioner
Submissions due: 1st June 2011
Publication date: January/February 2012
IEEE Software seeks submissions for
I'm interested!
The clojure source code is a pretty good read, hehe
Jonathan
https://github.com/clojure/clojure/tree/master/src/clj/clojure
On Mon, May 9, 2011 at 12:24 PM, Chris Perkins wrote:
> On May 9, 2:21 am, Christian Schuhegger
> wrote:
> > Hello list,
> >
> > I have a question that p
Never mind Q2, I didn't understand the question correctly.
Jonathan
On Mon, May 9, 2011 at 5:21 PM, Jonathan Fischer Friberg <
odysso...@gmail.com> wrote:
> Q1 This macro captures the correct namespace:
>
> (defmacro new* [type-name-as-symbol & args]
> `(clojure.lang.Reflector/invokeConstructo
Yeap. Release numbers have become meaningless; your point is well
taken.
On May 8, 7:11 pm, Sean Corfield wrote:
> The library formerly known as clojure.contrib.sql has had it's first
> non-snapshot release.
>
> Features added:
> * returns generated keys for single record inserts
> * supports nam
Q1 This macro captures the correct namespace:
(defmacro new* [type-name-as-symbol & args]
`(clojure.lang.Reflector/invokeConstructor
(ns-resolve ~*ns* ~type-name-as-symbol)
(to-array '~args)))
Q2 Backquote ` is unnecessary for symbols, use standard quote '
Q3 Answer to 1 fixes this
~~
IEEE Software
Special Issue
Algorithms and Today’s Practitioner
Call for Papers
~~
IEEE Software seeks submissions for a special issue on the topic of
Algorith
> Yes, that would explain that. In any case, all contributors to jark will
> need to have CA's lodged before it (or parts of it) can be brought into
> Clojure contrib.
> http://clojure.org/contributing
> - Chas
Thanks Chas.
Ambrose and myself will send the CA across.
--
isaac
--
You received
I recommend reading a book about lisp.
I liked land of lisp:
http://landoflisp.com/
Practical common lisp should be good as well:
http://www.gigamonkeys.com/book/
Some more:
http://www.cliki.net/Lisp%20books
When you have an understanding of lisp, you can move on to clojure.
Practical clojure wo
Hi all,
I'm trying to calculate the moving average of a certain window size.
One straight forward approach is:
(defn lazy-avg [coll]
(let [[sum cnt] (reduce
(fn [[v c] val] [(+ val v) (inc c)])
[0 0]
coll)]
(if (zero? cnt) 0 (/ sum cnt)
I'm trying to implement a function similar to new, but where
the type is not known at compile time -- so I want to evaluate
the first argument.
With the help of Google, I found the approach used in new*
below:
(ns dynamic-new)
(defn new* [type-name-as-symbol & args]
(clojure.lang.R
On May 7, 2011, at 1:31 PM, David Nolen wrote:
> On Sat, May 7, 2011 at 12:50 PM, isaac praveen wrote:
> Sure. We need very powerful clojure development and deployment tools.
> My request for subscription to clojure-dev got declined :(
>
> Send in a CA! :)
Yes, that would explain that. In any
Hello Thanks for your answer.
Yes it should throw an exception - there should be no cyclic orders.
I want to use this for the initialisation functions of the game I am
developing (http://resatori.com/cyber-dungeon-quest-alpha-1)
There is a number of those functions and some need to come after so
On May 9, 2:21 am, Christian Schuhegger
wrote:
> Hello list,
>
> I have a question that perhaps may be relevant for more people. I
> strongly believe that reading code of other people is an undervalued
> discipline of all developers. Typically it just happens as a side
> effect of working in a pro
45 matches
Mail list logo