On 04/14/2011 05:52 AM, dmiller wrote:
> Reloading will definitely cause a problem.
> ...
> I don't know why you'd need the app atom since you can just use
> Application/Current. Similarly, you could check Application/Current
> before doing (Application.)
In theory, that all sounds easy, but I h
And more numbers. d-small does not contain vectors with more than 50
elements, so the unrolled version should always hit a special case in
this run. However it's still twice as slow as the eager versions. The
lazy version is still the fastest.
user=> (bench (doall (flatten-maps d-small)))
Evaluati
Hi Laurent,
On 14 Apr., 09:42, Laurent PETIT wrote:
> Doesn't it seem counter intuitive to you that the lazy version is the
> fastest ?
>
> What could explain the result of your tests ? (I'm really curious !)
This is exactly the question I had earlier in this thread. :) I was
also surprised by
I could :-)
At the moment I have a hack() method which I call explicitly
post-deserialisation. This allows me to remain pure-Clojure. I'm not sure
that the necessary complexity required to do it right is worthwhile in my
particualr usecase - but thanks for all your suggestions.
Jules
--
You
Hi again,
On 14 Apr., 09:42, Laurent PETIT wrote:
> What could explain the result of your tests ? (I'm really curious !)
On the other hand the lazy version really just creates a simple linked
list with some fast boilerplate concerning the laziness. The vectors
however *are* more involved to con
On 13 Apr, 2011, at 17:16 , Aaron Cohen wrote:
> Do you need to bind *use-context-classloader* to true?
I considered this, not so much because I understand what this setting is good
for, but because its name suggests it might be relevant. But then I looked at
the source code to figure what what
2011/4/14 Meikel Brandmeyer :
> Hi again,
>
> On 14 Apr., 09:42, Laurent PETIT wrote:
>
>> What could explain the result of your tests ? (I'm really curious !)
>
> On the other hand the lazy version really just creates a simple linked
> list with some fast boilerplate concerning the laziness. The
Hi,
2011/4/14 Konrad Hinsen :
> On 13 Apr, 2011, at 17:16 , Aaron Cohen wrote:
>
>> Do you need to bind *use-context-classloader* to true?
>
> I considered this, not so much because I understand what this setting is good
> for, but because its name suggests it might be relevant. But then I looked
Hi,
On 14 Apr., 11:35, Laurent PETIT wrote:
> I don't understand either.
> Anyway, if there is no flaw in the tests, this could end as a good
> example of where premature optimization (of CPU at least) via recur
> does not get the expected result !
Always prove your assumptions. But I'm still s
On 14 Apr, 2011, at 11:43 , Laurent PETIT wrote:
> I won't pretend I understand how all this works, especially wrt to
> subtleties between loading from clojure, auto-loading of AOT compiled
> gen-classes, etc., but what has worked great so far for clojure.osgi
> and indirectly for CCW in a complex
2011/4/14 Meikel Brandmeyer :
> Hi,
>
> On 14 Apr., 11:35, Laurent PETIT wrote:
>
>> I don't understand either.
>> Anyway, if there is no flaw in the tests, this could end as a good
>> example of where premature optimization (of CPU at least) via recur
>> does not get the expected result !
>
> Alw
Thanks, I don't know how it got in my head but i thought it was supposed
to have side-effects.
On 12/04/11 01:56, Alan wrote:
Your "semantics" have side effects. The parser shouldn't be printing
to stdout, because it's still in the middle of backtracking and
deciding what matches. Instead the s
My RPG Game in clojure!
Play it here via Java Web Start:
http://resatori.com/cyber-dungeon-quest-alpha-1
--
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
Note that posts from new members a
Very cool!
But how to play with it? With Chrome, it downloads the .jnlp file but
if I click on it, an error raises:
com.sun.deploy.net.FailedDownloadException: Unable to load resource:
http://sappler.ls4.allbytes.de/cdq/cdq.jnlp
at
com.sun.deploy.net.DownloadEngine.actionDownload(Download
Thanks. That was a last minute change of the jnlp file location.
Should work now.
On 14 Apr., 13:39, Alfredo wrote:
> Very cool!
> But how to play with it? With Chrome, it downloads the .jnlp file but
> if I click on it, an error raises:
>
> com.sun.deploy.net.FailedDownloadException: Unable to
Thanks. That was a last minute change of the jnlp file location.
Should work now.
On 14 Apr., 13:39, Alfredo wrote:
> Very cool!
> But how to play with it? With Chrome, it downloads the .jnlp file but
> if I click on it, an error raises:
>
> com.sun.deploy.net.FailedDownloadException: Unable to
failed to run on mbp osx 10.6.7 (java version "1.6.0_24"). here is the
stack trace:
java.lang.NullPointerException
at
org.lwjgl.opengl.MacOSXContextImplementation.setSwapInterval(MacOSXContextImplementation.java:121)
at org.lwjgl.opengl.Context.setSwapInterval(Context.java:231)
at org.lwjgl.openg
Hmm I updated the natives-mac.jar.
But dont know this error I dont have a mac..
On 14 Apr., 14:16, Walter Chang wrote:
> failed to run on mbp osx 10.6.7 (java version "1.6.0_24"). here is the
> stack trace:
>
> java.lang.NullPointerException
> at
> org.lwjgl.opengl.MacOSXContextImplementation.se
FWIW, I did a small writeup of my first encounter with clojure-clr at:
http://kjeldahl.net/d7/clojure-clr-first-encounter
Thanks,
Marius K.
On 04/14/2011 09:04 AM, Marius Kjeldahl wrote:
On 04/14/2011 05:52 AM, dmiller wrote:
> Reloading will definitely cause a problem.
> ...
> I don't kno
coincidentally, me and my brother wrote this while on the train to
rubyconf last year:
https://github.com/mikejones/mississippi
havent put any docs or anything on there (its only a couple of
functions), but is essentially a validation function that take a map
(the thing to validate) and another m
Commercial Users of Functional Programming Workshop (CUFP) 2011
Call for Presentations: http://cufp.org/2011-call-presentations
Sponsored by SIGPLAN
Co-located with ICFP 2011
Tokyo, Japan
Sep 22-24
Proposal Submission Deadline 15 June 2011
Functional programming languages have been a hot topic
I'm not sure if this is the place to ask this but I've been struggling
with a few things in the world of Clojure. I've been using Processing
to learn Clojure (since I'm somewhat familiar with Processing) but the
tough part has been dealing with things like x, y positions of objects
without keeping
I live in Fort Worth and work in Addison. I'd love to get together
sometime. If there is any interest in getting a user group together, I
have the perfect place to host it.
On Mar 10, 8:28 am, Alex Robbins
wrote:
> Anyone else in the north Dallas area using/interested in Clojure? I'd
> love to ge
Hello,
I would like to announce the version 0.1 of the Tikkba library, a
library for the creation and the dynamic modification of SVG
documents.
I would be really happy with any feedbacks and comments, on the code
or the architecture.
While the library is not complete it is already extremely usa
We are looking for speakers for our next meeting (and future
meetings).
If you are ever traveling to the big apple and would like to speak to
a group of enthusiastic Clojurians, please let me know.
We meet at the google campus in Manhattan every month and are always
looking for interesting speakers
Here's something that could be clearer (it wasn't obvious to me that something
like addition would cause a null pointer exception):
user=> (+ 1 nil)
java.lang.NullPointerException (NO_SOURCE_FILE:0)
Sam
---
http://sam.aaron.name
On 8 Feb 2011, at 14:01, Stuart Halloway wrote:
> This conversat
I am puzzled by the results below. Can anyone explain the difference
in behavior?
-David
(defn mapper [f stream]
`(map ~f ~stream))
(eval (mapper #(+ 1 %) [10 11 12]))
;; -> (11 12 13)
(eval (mapper (partial + 1) [10 11 12]))
;; -> No matching ctor found for class clojure.core$partial..
Try this:
(eval (mapper `(partial + 1) [10 11 12]))
On Thu, Apr 14, 2011 at 9:46 AM, David McNeil wrote:
> I am puzzled by the results below. Can anyone explain the difference
> in behavior?
>
> -David
>
>
>
> (defn mapper [f stream]
> `(map ~f ~stream))
>
> (eval (mapper #(+ 1 %) [10 11
Mark - Thanks. I am able to permute it to make it work. However, I
cannot explain why the original code fails.
-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
Note that posts from n
I think it has to do with partial's use of apply, but you would need someone
smarter than me to tell you for sure ;)
On Thu, Apr 14, 2011 at 9:58 AM, David McNeil wrote:
> Mark - Thanks. I am able to permute it to make it work. However, I
> cannot explain why the original code fails.
>
> -David
Glad to hear from you. I live and work a little south of the
intersection of 121 and the Dallas North Tollway, so any meeting place
along the DNT would be great for me (Addison included).
Hopefully there are more than two clojure users in Dallas.
On Wed, Apr 13, 2011 at 3:44 PM, J.R. Garcia wrot
Actually, that doesn't seem to be the case, seems to have something to do
with the closure affecting macro expansion, but again, need someone smarter
to explain:
user> (defn plus-x [x] (fn [y] (+ x y)))
#'user/plus-x
user> (eval (mapper (plus-x 1) [1 2 3]))
; Evaluation aborted.
user> (eval (map
I'd start by making functions that take arguments. For instance (defn
draw-ball [ball] ...)
On Apr 13, 1:22 pm, Brandon Ferguson wrote:
> I'm not sure if this is the place to ask this but I've been struggling
> with a few things in the world of Clojure. I've been using Processing
> to learn Clo
This is great!
On Thu, Apr 14, 2011 at 6:23 AM, Pierre Allix <
pierre.allix.w...@googlemail.com> wrote:
> Hello,
>
> I would like to announce the version 0.1 of the Tikkba library, a
> library for the creation and the dynamic modification of SVG
> documents.
>
> I would be really happy with any f
I have learned that instances of records do not eval to themselves.
This seems inconsistent to me. I am curious if this is intentional or
if it is a gap in the current record implementation in Clojure.
Thanks.
-David
(defn eval-type [x]
(class (eval x)))
;; instances of structural types
When things begin to get recursive you may be on the right track :D
Initially I was going to implement Nominal Logic Programming for Logos a la
William Byrd's dissertation, but I realized that his implementation requires
pattern matching. All the pattern matching libs I've seen thus far for
Clojur
On Thu, Apr 14, 2011 at 10:42 AM, Mark Rathwell wrote:
>
> Actually, that doesn't seem to be the case, seems to have something to do
> with the closure affecting macro expansion, but again, need someone smarter
> to explain:
> user> (defn plus-x [x] (fn [y] (+ x y)))
> #'user/plus-x
> user> (eval
I'll be working in Zurich from 16 May through 3 June. Anyone interested in
weekend or evening Clojure hacking? Clojure user's group?
-
Brian Marick, Artisanal Labrador
Contract programming in Ruby and Clojure
Occasional consulting on Agile
www.exampler.com, www.twitter.com/marick
--
You rec
I wonder in which cases this code is a good choice: a function that
returns uneval'ed code. Something about macros not being an option
where a function is expected, or a kind of lazy eval? Will this be any
better or worse: (defn m [f s] (fn [] (map f s))) then doing (foo)
instead of (eval foo)?
On
> Will this be any
> better or worse: (defn m [f s] (fn [] (map f s))) then doing (foo)
> instead of (eval foo)?
Armando - Generally I agree that the "m" function you defined is
clearly preferred over a solution based on eval. However, this is a
special case (too much to relate) where I needed a f
On Wed, Apr 13, 2011 at 1:22 PM, Brandon Ferguson wrote:
> I'm not sure if this is the place to ask this but I've been struggling
> with a few things in the world of Clojure. I've been using Processing
> to learn Clojure (since I'm somewhat familiar with Processing) but the
> tough part has been d
Hi im not from zurich but I life near enough. There is no clojure user
group (sadly). I acctualy don't know of anybody else using clojure in
Switzerland.
There is however a new "Lisp and Stuff"-Meeting more or less every
month. It get hosted by a Startup that uses CL. The first to Meetings
were qu
I copy that. FWIW, I'm not in the eval-is-evil camp, so didn't have an
opinion one way or the other. I've seen code like that in posted
samples and wanted to know if that's a technique useful to have
around.
On Apr 14, 9:34 am, David McNeil wrote:
> > Will this be any
> > better or worse: (defn m
On Thu, Apr 14, 2011 at 12:26 PM, Armando Blancas
wrote:
> I wonder in which cases this code is a good choice: a function that
> returns uneval'ed code. Something about macros not being an option
> where a function is expected, or a kind of lazy eval? Will this be any
> better or worse: (defn m [f
Interesting. Thanks for your response.
On Apr 14, 10:06 am, Ken Wesson wrote:
> On Thu, Apr 14, 2011 at 12:26 PM, Armando Blancas
>
> wrote:
> > I wonder in which cases this code is a good choice: a function that
> > returns uneval'ed code. Something about macros not being an option
> > where a
Still doesn't work for me. Same error as Alfredo.
On Thu, Apr 14, 2011 at 1:26 PM, msappler wrote:
> Hmm I updated the natives-mac.jar.
> But dont know this error I dont have a mac..
>
> On 14 Apr., 14:16, Walter Chang wrote:
>> failed to run on mbp osx 10.6.7 (java version "1.6.0_24"). here is
On Thu, Apr 14, 2011 at 2:03 PM, mark skilbeck
wrote:
> Still doesn't work for me. Same error as Alfredo.
Worked great for me with Win 7, FF4
Want to highlight anything you did in the game? I'm interested in any
use of agents, etc that you used.
Timothy
--
“One of the main causes of the fall o
Doesn't work for me (Ubuntu x86)
2011/4/14 Timothy Baldridge :
> On Thu, Apr 14, 2011 at 2:03 PM, mark skilbeck
> wrote:
>> Still doesn't work for me. Same error as Alfredo.
>
> Worked great for me with Win 7, FF4
>
> Want to highlight anything you did in the game? I'm interested in any
> use of
Similar error for me, on Ubuntu. Exception and "wrapped exception"
follow. Looks like you may need permissions set better? 403 is
Forbidden.
com.sun.deploy.net.FailedDownloadException: Unable to load resource:
http://sappler.ls4.allbytes.de/resatori/webstart/cdq.jnlp
at
com.sun.deploy.net.
> I remember reading about it in the Joy of Clojure. It may be fixed in the
> future versions of Clojure.
Ivan - Thanks for the response. I checked Joy of Clojure and I see a
reference at the top of page 191 to the fact that records cannot be
printed and then eval'd. I was aware of this, however
Hello,
I'll be the third guy from Switzerland :) I live in Geneva... Any Clojurians
from Suisse romande?
Cheers,
Ivan.
On 14 April 2011 18:39, Nick Zbinden wrote:
> Hi im not from zurich but I life near enough. There is no clojure user
> group (sadly). I acctualy don't know of anybody else us
David,
Sorry, I misunderstood your question at first. There was actually a
discussion on it a couple of days ago:
http://groups.google.com/group/clojure/browse_thread/thread/abb87a73330fdc01
Cheers,
Ivan.
On 14 April 2011 22:07, David McNeil wrote:
> > I remember reading about it in the Joy o
I dont live in the DFW area but come down 1 to 2 times a year to see family,
so I'm interested in what you cook up.
On Thu, Apr 14, 2011 at 10:33 AM, Alex Robbins
wrote:
> Glad to hear from you. I live and work a little south of the
> intersection of 121 and the Dallas North Tollway, so any meeti
Hi,
Hi,
I live in Geneva too.
I recently found out (thanks to Christophe Grand) there are a few
Clojure users around here.
Max
On Apr 14, 10:07 pm, Ivan Koblik wrote:
> Hello,
>
> I'll be the third guy from Switzerland :) I live in Geneva... Any Clojurians
> from Suisse romande?
>
> Cheers,
>
I've posted this question on StackOverflow[1], but it might be a bit
technical, so I'll ask it on the mailing list where I might get more
precise expertise on Clojure.
[1]: http://stackoverflow.com/questions/5669084/clojures-send-is-asynchronous
I'm writing a simple networking framework for Cloju
Dear list,
I have working code for 2 inputs, but I am trying to write an
idiomatic version, where the result is that a function named "read-
files-into-memory" takes a variable number of file names and parses
the json. My code works well until I try to wrap my stand alone call
to map into my "re
(defn read-files-into-memory
[ & filenames ]
(print filenames)
(map #(read-json-filename %1) filenames))
The [& filenames] argument spec turns all the arguments given into a
sequence. You're not passing the filenames as separate arguments, but
as a vector, so you either have to change that:
Yes, I am missing a way to turn the [& filenames] into something like
"name1" "name2" …
How might this be done? (I am not certain what "type" this would be,
a stringified version of each item in the sequence, not a sequence
itself! )
(defn read-files-into-memory
[ & filenames ]
(print filena
Here are some potentially interesting observations. First, as similar
lazy and eager versions as I could come up with:
(defn flatten-maps-lazy [coll]
(lazy-seq
(when-let [s (seq coll)]
(let [m (first s)]
(cons (dissoc m :c)
(flatten-maps-lazy
(con
I was developing this project of mine, which has an intricate business
logic, and I wrote a macro that makes programming this kind of stuff
more comfortable. It's called "ilet", which stands for "implicit let".
The name is probably no longer appropriate, since I added more
features to it, but I can
After further analysis, I don't think this is globally a good
strategy.
I looked into a solution with a "(ref (clojure.lang.PersistentQueue/
EMPTY))" in the selector agent. The plan was to have be able to queue
"updates" to the schedule synchronously. Half-way through the
implementation, I reali
I am a beginner in Clojure.
I have a list of maps:
(def p '({:a 1 :b 2 :c 4}, {:a 2 :b 3 :c 5}, {:a 3 :b 4 :c 6}))
How do I add up all the :b values in the map? Result should be 9
(=2+3+4)
I know I should be using one of the higher level functions like apply,
reduce and combine it with a custom
(reduce + (map :b p))
Cheers
Andreas
On 15 April 2011 10:43, Bhinderwala, Shoeb wrote:
> I am a beginner in Clojure.
>
> I have a list of maps:
>
> (def p '({:a 1 :b 2 :c 4}, {:a 2 :b 3 :c 5}, {:a 3 :b 4 :c 6}))
>
> How do I add up all the :b values in the map? Result should be 9 (=2+3+4)
>
> I
Or: (reduce #(+ %1 (:b %2)) 0 p)
:)
On Apr 15, 10:51 am, Andreas Kostler wrote:
> (reduce + (map :b p))
> Cheers
> Andreas
>
> On 15 April 2011 10:43, Bhinderwala, Shoeb
> wrote:
>
>
>
>
>
>
>
>
>
> > I am a beginner in Clojure.
>
> > I have a list of maps:
>
> > (def p '({:a 1 :b 2 :c 4}, {:a
There's nothing wrong with this. Defining a mini-language for a class of
common calculations is very much in the spirit macros like Common Lisp's
`loop`.
That said, you won't get much support for adding this to the language.
These kinds of "mini-language" macros tend to have a large number o
I have fallen for Clojure. I would love to be able to practice and
hone my skills while contributing something to an open source
project. Do you have any suggestions for projects that might have
some low-hanging fruit for a newish person like me. Any floors that
need sweeping?
Carin Meier
@cari
I work off of the Tollway and Westgrove at Improving Enterprises. We
have a lot of space and have several user groups meet daily at our
office. I'm sure there are plenty of other Clojure users in the area.
There are plenty of people that I work with that would probably be
interested. Maybe we can m
I've been using Clojure to automate some file management tasks over
here; in particular, I whipped together about 100 lines of code to
build and maintain a hash database of certain files and thereby
efficiently discover duplications among these files. (Basically, it
uses a subdirectory of the files
This is definitely a good place to start. At very least getting most
of the functions away from the global bits. Thanks!
On Apr 14, 10:42 am, jweiss wrote:
> I'd start by making functions that take arguments. For instance (defn
> draw-ball [ball] ...)
>
> On Apr 13, 1:22 pm, Brandon Ferguson wr
Holy crap that's a lot to digest! Thanks! A lot of ideas in here to
play with. For me and my purposes with Processing the big challenge
has been the fact that I have little say about the draw loop. It just
fires (or I can call it manually with a redraw, but then it just
executes whatever is in that
Could "before next release" be changed to something like, er, "real
soon"? (at least for c.c namespaces)
Var *feeling-lucky-url* not marked :dynamic true, setting to :dynamic.
You should fix this before next release!
Var *feeling-lucky* not marked :dynamic true, setting to :dynamic. You
should fix
I think I fixed that yesterday evening:
Unable to load resource:http://sappler.ls4.allbytes.de/resatori/
webstart/cdq.jnlp
403 is forbidden.
I wrote deny all in the .htaccess file :)
-
Want to highlight anything you did in the game? I'm interested in any
use of agents, etc that you used.
Yes I
72 matches
Mail list logo