Hello,
Small request from a Clojure/Lisp-newbie:
I wrote an article on interactive programming in order to really get
REPL / interactive work.
This style of development is new to me so I'm looking for any
suggestions you might have for improvement/aspects which I've
overlooked!
The article (+
If you have a fixed geometry of cells, it is quite easy to have one
ref per cell.
Which reduce a lot of contention.
For example, on a grid where ant can go instead of representing the
world as a ref
to a matrix, you can represent the world as a matrix of refs.
Those refs can then be update
Currently, it is not possible to insert duplicate rows
using the clojure.contrib.sql module (specifically, the
insert-values method).
Please let me know, if I can add this.
Thanks.
--
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this
I'd recommend taking a look at the implementation of dotrace (last
function in the file):
http://github.com/richhickey/clojure-contrib/blob/master/src/main/clojure/clojure/contrib/trace.clj
It let-binds a wrapper function for each of the functions you want to
trace, so that within the context of
Hi,
We are developing a data warehouse to facilitate reporting and data
mining for cash register transaction data. It seems like many people
in the Clojure community have data warehouse experience, so I wanted
to ask for advice from people who have already done this before.
Which libraries,
Hi,
just a few days ago I started considering GAE for a (pet-)project.
Being able to develop in Clojure on GAE seems like a valuable goal to
me. For example, take a look at http://the-deadline.appspot.com which
was written that way.
So it might be a good idea to avoid creating threads
On Sep 20, 2010, at 8:27 AM, Bart J wrote:
Currently, it is not possible to insert duplicate rows
using the clojure.contrib.sql module (specifically, the
insert-values method).
Please let me know, if I can add this.
Thanks.
Are you saying you want to end up with duplicate rows or that
On 20 September 2010 14:55, Jeff Rose ros...@gmail.com wrote:
I'd recommend taking a look at the implementation of dotrace (last
function in the file):
http://github.com/richhickey/clojure-contrib/blob/master/src/main/clojure/clojure/contrib/trace.clj
clojure and clojure-contrib have moved
Thanks Jason, this is great.
I was confused earlier because I wasn't seeing reflection warnings,
but it turns out that was only because I was evaluating the function
definitions in the emacs buffer, and the warnings weren't visible.
I have a question about gaussian-matrix3 though. What is aset-
Yeah this doesn't happen on using lazy-seq. Thanks!
Shantanu
On Sep 20, 8:52 am, Stephen C. Gilardi squee...@mac.com wrote:
On Sep 19, 2010, at 3:45 PM, Shantanu Kumar wrote:
I simulated a similar recursive call and found it
throws StackOverflowError at 5508 levels deep on a 32-bit Sun JVM
BTW, shouldn't this user.clj trick be marked as deprecated, to be removed
in a future version ?
2010/9/19 Kevin Downey redc...@gmail.com
you can also run into issues with things being on the classpath for
your project, but not being on the classpath for lein, but user.clj
being on the
Hello
I have a vector containing three macro calls. The third macro relies
on the first having been fully evaluated.
I want to define a macro to declare these three macros in order
Call my vector 'stuff' then the following code inside a macro works
(doall [(eval (get stuff 0)) (eval (get stuff
A few days ago I was thinking about how different it would be to write
flip-map* in Java vs Clojure. A very simple, small program, but easy
to see how Clojure can be more expressive.
public static MapV,K flipMap(MapK,V map)
{
MapV,K result = new HashMapV,K(map.size());
for (K key :
Hey All,
I know there are certainly a few groups out there (organized via
Meetup.com or otherwise) which I see things posted about from time to
time on the list. I'd like to propose that we make an effort to list
these groups on Meetup Everywhere (http://www.meetup.com/everywhere),
which is a
Oops, I found aset-double2 with tab completion and figured it was
build-in. Forgot it was a utility I built some time ago, a stub for a
Java method that does the setting.
Also, I got the type hint for the arr arg wrong, although it didn't
seem to matter.
Here's a fixed version in standard
Oh, I see you put the word concurrency in the subject but don't
mention it in your post. I guess my example isn't interesting for you,
then. You will get better responses if you put all relevant
information in the actual body - the subject is a space to summarize
the body, not to add to it.
On
On Sep 20, 12:08 pm, Alan a...@malloys.org wrote:
A few days ago I was thinking about how different it would be to write
flip-map* in Java vs Clojure. A very simple, small program, but easy
to see how Clojure can be more expressive.
public static MapV,K flipMap(MapK,V map)
{
MapV,K
There's no such thing as a lazy map. into uses reduce, which is
necessarily not lazy either.
Clarity is in the eye of the beholder, of course. I think my version
is clearer, but if you replaced second/first with val/key I'd rate
them about the same. You might even replace (just val key) with
Hi,
Am 20.09.2010 um 18:52 schrieb John Cromartie:
(def flip-map #(apply zipmap ((juxt vals keys) %)))
If I was going to write flip-map it might be a tad longer, but lazy
and a bit clearer (IMO), with:
(defn flip-map [m] (into {} (map (juxt second first) m)))
Is there some specific
I second the motion. Just moved to Edmonton, and have been looking
around for fellow Clojurians. I've created an Edmonton meetup (I
think), and hopefully some kindred souls will turn up :)
On Sep 20, 9:33 am, Andrew Gwozdziewycz apg...@gmail.com wrote:
Hey All,
I know there are certainly a
Sean,
Try this, http://gist.github.com/193550 . Adjust it to your taste.
Regards,
Emeka
On Mon, Sep 20, 2010 at 4:00 AM, Sean Corfield seancorfi...@gmail.comwrote:
That also sounds pretty useful for development. I may try that as an
exercise...
This weekend has been a journey through The
On Mon, Sep 20, 2010 at 11:09 AM, Emeka emekami...@gmail.com wrote:
Try this, http://gist.github.com/193550 . Adjust it to your taste.
So I'd say (file-repl console.txt) and everything typed in and
printed out would be written to that file for the REPL session?
That would be a bit like the
Replacing the doseq's with dotimes speeds it up a little more:
(defn gaussian-matrix5 [^[[D arr]
(dotimes [x (alength arr)]
(dotimes [y (alength (first arr))]
(aset-double ^doubles (aget arr (int x)) (int y) (next-
gaussian)
but I'm getting reflection warnings on alength. I guess
Hi,
Having recently upgraded to this newest lein
$ lein --version
Leiningen 1.3.1 on Java 1.6.0_18 OpenJDK Client VM
I notice that the lein swank command is no longer supported.
$ lein swank
That's not a task. Use lein help to list all tasks.
What's the recommended way to start up a
I think partition is slowing you down (but haven't profiled to
verify). Here's a functional version that's about 70% as fast as my
5:
(defn gaussian-matrix6 [L]
(to-array (for [i (range L)] (into-array Double/TYPE (for [j
(range L)] (next-gaussian))
and I'd guess that's about as good
On Sep 20, 9:17 am, Stefan Kamphausen ska2...@googlemail.com wrote:
So it might be a good idea to avoid creating threads automatically or
importing file/socket packages.
I think you're right. Dependencies are always a double-edged sword,
and in the case of App Engine, they are more toxic than
I'd like to announce the release of a working version of appengine-
magic, a library designed to make it easier to get started with Google
App Engine using Clojure.
appengine-magic abstracts away nearly all the boilerplate necessary to
deploy an App Engine application. It also enables interactive
2010/9/20 Meikel Brandmeyer m...@kotka.de
Hi,
Am 20.09.2010 um 18:52 schrieb John Cromartie:
(def flip-map #(apply zipmap ((juxt vals keys) %)))
If I was going to write flip-map it might be a tad longer, but lazy
and a bit clearer (IMO), with:
(defn flip-map [m] (into {} (map
On Mon, Sep 20, 2010 at 12:08 PM, Eric Schulte schulte.e...@gmail.com wrote:
Having recently upgraded to this newest lein
$ lein --version
Leiningen 1.3.1 on Java 1.6.0_18 OpenJDK Client VM
I notice that the lein swank command is no longer supported.
Hi Eric!
The swank command is not
On Sep 20, 10:15 pm, Constantine Vetoshev gepar...@gmail.com wrote:
I'd like to announce the release of a working version of appengine-
magic, a library designed to make it easier to get started with Google
App Engine using Clojure.
appengine-magic abstracts away nearly all the boilerplate
Hello Laurent.
Am 20.09.2010 um 22:38 schrieb Laurent PETIT:
The fact that currently having vals and keys return seqs in the same order is
not guaranteed by the documentation ?
Touché. Hard to swallow the own pill. It is not mentioned in the documentation,
but it is chouser's believe that
2010/9/21 Meikel Brandmeyer m...@kotka.de
Hello Laurent.
Am 20.09.2010 um 22:38 schrieb Laurent PETIT:
The fact that currently having vals and keys return seqs in the same
order is not guaranteed by the documentation ?
Touché. Hard to swallow the own pill. It is not mentioned in the
On Mon, Sep 20, 2010 at 3:08 PM, Eric Schulte schulte.e...@gmail.com
wrote:
Hi,
Having recently upgraded to this newest lein
$ lein --version
Leiningen 1.3.1 on Java 1.6.0_18 OpenJDK Client VM
I notice that the lein swank command is no longer supported.
$ lein swank
That's not a
I'm glad you think partition is the problem, because that was my guess
too. But I think I have the answer. This is the fastest version I've
seen so far:
(defn gaussian-matrix-final [L]
(into-array ^doubles (map double-array (repeat L (repeatedly L next-
gaussian)
If I understand what's
Actually it turns out the type hinting in gaussian-matrix-final isn't
even necessary. I just took it out and the speed doesn't seem to
change.
On Sep 20, 7:43 pm, Ranjit rjcha...@gmail.com wrote:
I'm glad you think partition is the problem, because that was my guess
too. But I think I have the
The fact that currently having vals and keys return seqs in the same
order is not guaranteed by the documentation ?
At the recent Pragmatic Studio class I asked Rich and Stuart about
this very point. As I recall, Rich said vals and keys do behave as one
would hope, so that for a map m we can
The L.A. one is at http://www.meetup.com/Los-Angeles-Clojure-Users-Group/
On Sep 20, 8:33 am, Andrew Gwozdziewycz apg...@gmail.com wrote:
Hey All,
I know there are certainly a few groups out there (organized via
Meetup.com or otherwise) which I see things posted about from time to
time on
We've got one in the Raleigh area that, while not specific to Clojure,
it is a common topic (along with other JVM based languages such as
Scala and Groovy):
http://www.meetup.com/TriJVM/
Though a Clojure specific meetup would be nice, I know for a fact
there are other Clojure users here.
On Sep
I list, i am trying to connect to a USB GSM Modem with clojure. Basically, i
want to open a serial connection to my modem and be able to pass commands to
it. ( I think I am new to this whole modem thing). I know I can do this in
Java, but wanted to check if someone had a working solutions in
On Sep 20, 4:43 pm, Ranjit rjcha...@gmail.com wrote:
I'm glad you think partition is the problem, because that was my guess
too. But I think I have the answer. This is the fastest version I've
seen so far:
(defn gaussian-matrix-final [L]
(into-array ^doubles (map double-array (repeat L
user.clj is very useful, I'd rather keep it.
On Mon, Sep 20, 2010 at 7:33 PM, Robert McIntyre r...@mit.edu wrote:
If it is to be deprecated, is there a correct way of achieving the
same result (having things automatically loaded when you create the
repl?)
--Robert McIntyre
On Mon, Sep 20,
On Mon, Sep 20, 2010 at 10:07 PM, Kevin Downey redc...@gmail.com wrote:
On Mon, Sep 20, 2010 at 7:33 PM, Robert McIntyre r...@mit.edu wrote:
If it is to be deprecated, is there a correct way of achieving the
same result (having things automatically loaded when you create the
repl?)
user.clj
On Mon, Sep 20, 2010 at 7:15 PM, David Cabana drcab...@gmail.com wrote:
The fact that currently having vals and keys return seqs in the same
order is not guaranteed by the documentation ?
At the recent Pragmatic Studio class I asked Rich and Stuart about
this very point. As I recall, Rich
43 matches
Mail list logo