Re: Continuation monad tutorial

2009-12-01 Thread Konrad Hinsen
On 30 Nov 2009, at 23:07, jim wrote: Just finished the tutorial explaining the continuation monad in clojure. Haven't even proofed it but I want to head to the gym. :) http://intensivesystems.net/tutorials/cont_m.html Great work! One comment I'd add is that in the last example:

Re: Deep deref

2009-12-01 Thread Christophe Grand
Glad to hear that! https://www.assembla.com/spaces/clojure/tickets/213-Invariants-and-the-STM On Sun, Nov 29, 2009 at 3:05 PM, Rich Hickey richhic...@gmail.com wrote: On Tue, Nov 24, 2009 at 3:14 AM, Christophe Grand christo...@cgrand.net wrote: On Mon, Nov 23, 2009 at 11:56 PM, John Harrop

Clojure as a first programming language?

2009-12-01 Thread Towle
Hi all, Thanks for taking the time to read my post. I'm interested to get some opinions from experienced Clojure programmers on whether the language would be a good first language to learn, or rather to learn in-depth. I have minimal experienced with more common languages like Java, HTML, and

Getting Started in Mac OS X Snow Leopard

2009-12-01 Thread Charras
Hello; I already install Clojure using MacPorts, and I can use it with clj. But the environment is not what I will like. I'm trying to set up clojure, so I can use it in Aquamacs. I already download the clojure- mode.el, in there says that I can install it using ELPA, but I don't know how to

Re: Query blobs in clojure.contrib.sql?

2009-12-01 Thread John Harrop
On Mon, Nov 30, 2009 at 9:57 PM, Base basselsm...@gmail.com wrote: Hi I have a database that has a table with complex java objects stored in a binary field. In java i would do something like: protected Object read(byte[] buf){ Object obj = null; if (buf==null) return obj;

Re: Query blobs in clojure.contrib.sql?

2009-12-01 Thread Base
This is exactly what I was looking for! Early Christmas for me. Thank you Santa...e...John On Dec 1, 2:04 am, John Harrop jharrop...@gmail.com wrote: On Mon, Nov 30, 2009 at 9:57 PM, Base basselsm...@gmail.com wrote: Hi I have a database that has a table with complex java objects

Re: Clojure as a first programming language?

2009-12-01 Thread Adrian Cuthbertson
Hi Towle, Judging by the articulateness of your post, I would say that Clojure would definitely be an ideal language for what you are looking for. It is not handed to you on a plate and you will have to engage deeply to achieve your goals, but if you do so, along with the increasingly prolific

Re: Clojure as a first programming language?

2009-12-01 Thread Geoffrey Teale
Hi, I don't post here much and so you may see that as a reason to discount what I say. Infact that would probably be a good plan. I generally talk a load of twaddle. With those caveats firmly in mind here's my tuppence worth. I'd hate to think your first language is defining as you

Re: roll call of production use?

2009-12-01 Thread Jamie
On Nov 23, 5:00 pm, Raoul Duke rao...@gmail.com wrote: i'd be interested to hear who has successfully used clojure in production. i know of some, as some folks have been vocal; any other interesting-but-so-far-silent uses people'd be willing to fess up about? Our real-world use reported

Re: ANN: Clojuratica v2 -- Seamless Mathematica-within-Clojure!

2009-12-01 Thread Jamie
On Dec 1, 7:51 am, Mark Fayngersh phunny.pha...@gmail.com wrote: I dont suppose this is possible on *nix machines? If i recall correctly, the Mathematica Kernel is not available for *nix-based architectures. The Mathematica kernel runs on Solaris, Linux, and Max OS X:

Re: Clojure as a first programming language?

2009-12-01 Thread Tayssir John Gabbour
Hi, As an occasional Clojure user, and someone who's used Common Lisp a lot, I'd venture that Clojure is a good first choice. But let me metion areas of difficulty first. Geoffrey Teale discussed the big things, so let me mention some little ones: - Java's classpath currently demands that you

Re: Continuation monad tutorial

2009-12-01 Thread jim
Thanks. I'll add that comment. Konrad Hinsen wrote: On 30 Nov 2009, at 23:07, jim wrote: Just finished the tutorial explaining the continuation monad in clojure. Haven't even proofed it but I want to head to the gym. :) http://intensivesystems.net/tutorials/cont_m.html Great work!

Re: Clojure as a first programming language?

2009-12-01 Thread CuppoJava
There are more qualified people than me on these boards, but I can offer my own personal experience, which is to say, as a first language I would still recommend going the C/Java/Basic/Assembly route first before going with a Lisp. Because simply, I couldn't appreciate functional programming

Re: Clojure as a first programming language?

2009-12-01 Thread Base
My 2 cents (probably only worth 1 cent...) as someone who is learning Clojure right now is that it is a great language, but there are a lot of great languages and all have their strengths and weaknesses. Given your curiosity and apparent thirst for knowledge, you wont learn just one language and

Re: Clojure as a first programming language?

2009-12-01 Thread Constantine Vetoshev
On Dec 1, 12:38 am, Towle towle.m...@gmail.com wrote: So after shopping around thoroughly and picking up bits about on theoretical computer science and the history of programming languages, I decided to pick up a Lisp; I'm intrigued by the greater concept/idea behind the Lisp family of

clojars and licences

2009-12-01 Thread bOR_
How in clojars do I attach a licence to the jar? I'm about to redistribute a BSD-licensed jarfile to clojars, but I'm not sure how I can make sure that the licence also gets redistributed. Are these things embedded in jar files by default? (the jar in question is automaton-1.11.jar) -- You

Re: ANN: Clojuratica v2 -- Seamless Mathematica-within-Clojure!

2009-12-01 Thread Mark Fayngersh
oh, great! On Tue, Dec 1, 2009 at 9:11 AM, Jamie jsmo...@gmail.com wrote: On Dec 1, 7:51 am, Mark Fayngersh phunny.pha...@gmail.com wrote: I dont suppose this is possible on *nix machines? If i recall correctly, the Mathematica Kernel is not available for *nix-based architectures. The

Re: Clojure as a first programming language?

2009-12-01 Thread Geoffrey Teale
Just want to second everyone pointing to SICP. A better in-depth introduction to programming has yet to grace my desk.There are also video lectures available on line: http://groups.csail.mit.edu/mac/classes/6.001/abelson-sussman-lectures/ If this material had been so readily available in

Re: roll call of production use?

2009-12-01 Thread Luc Préfontaine
On Nov 23, 5:00 pm, Raoul Duke rao...@gmail.com wrote: i'd be interested to hear who has successfully used clojure in production. i know of some, as some folks have been vocal; any other interesting-but-so-far-silent uses people'd be willing to fess up about? Our real-world use

Re: Leiningen Run ?

2009-12-01 Thread David Nolen
On Tue, Dec 1, 2009 at 12:16 AM, Alex Osborne a...@meshy.org wrote: Hi David, David Nolen wrote: So my Java ignorance once again rears it's ugly head. It turns out that JNI dynamic libs can't really be part of a .jar. I can't say I know much about JNI but I've used some libraries like

Re: Leiningen Run ?

2009-12-01 Thread David Nolen
On Tue, Dec 1, 2009 at 1:10 AM, Phil Hagelberg p...@hagelb.org wrote: David Nolen dnolen.li...@gmail.com writes: The problem is that JOGL needs JNIs and JNIs need to be on java.library.path or java.ext.dirs, not the classpath. In order to make life easier for people learning about clojure

Re: Clojure as a first programming language?

2009-12-01 Thread Chouser
On Tue, Dec 1, 2009 at 10:29 AM, CuppoJava patrickli_2...@hotmail.com wrote: There are more qualified people than me on these boards, but I can offer my own personal experience, which is to say, as a first language I would still recommend going the C/Java/Basic/Assembly route first before

Re: roll call of production use?

2009-12-01 Thread Luc Préfontaine
On Nov 23, 5:00 pm, Raoul Duke rao...@gmail.com wrote: i'd be interested to hear who has successfully used clojure in production. i know of some, as some folks have been vocal; any other interesting-but-so-far-silent uses people'd be willing to fess up about?

Re: Clojure as a first programming language?

2009-12-01 Thread Tayssir John Gabbour
Interestingly, there's this book which is a crash course on building a computer stack from the ground up: from logic gates, to a compiler, to an OS. And the simulator, in which you build all these things, is in Java. Nisan/Schocken's _The Elements of Computing Systems_: http://

Re: Clojure as a first programming language?

2009-12-01 Thread Tayssir John Gabbour
Interestingly, there's this book which is a crash course on building a computer stack from the ground up: from logic gates, to a compiler, to an OS. And the simulator, in which you build all these things, is in Java. Nisan/Schocken's _The Elements of Computing Systems_: http://

Re: roll call of production use?

2009-12-01 Thread Daniel Werner
On Dec 1, 5:20 pm, Luc Préfontaine lprefonta...@softaddicts.ca wrote: http://www.infoq.com/news/2009/01/clojure_production Slightly off-topic: What prompted you to choose ActiveMQ over other popular message bus systems like RabbitMQ? Was it the ease of operability with Clojure/ Java, or are

Re: roll call of production use?

2009-12-01 Thread Luc Préfontaine
We picked one that met our minimal requirements... our prototype was in Java however and that probably biased the choice a bit. But for us it's an intermediate step. We need a more flexible solution. We will keep ActiveMQ in the picture to link different clusters (or an alternative) but for intra

Re: Web application framework (beta)

2009-12-01 Thread rzeze...@gmail.com
I'm not privy to all the technical details, but perhaps work done on Swarm could be insightful? http://code.google.com/p/swarm-dpl/ -- 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

Re: Datatypes and protocols - update

2009-12-01 Thread Krukow
On Dec 1, 2:42 am, Rich Hickey richhic...@gmail.com wrote: I have done a lot of work on performance, and refined the design. The big news is that you can now directly implement a protocol inside a deftype, and you can also reify protocols. This cements protocols as the superior way to model

Re: Leiningen Run ?

2009-12-01 Thread Zach Tellman
On Dec 1, 8:15 am, David Nolen dnolen.li...@gmail.com wrote: On Tue, Dec 1, 2009 at 1:10 AM, Phil Hagelberg p...@hagelb.org wrote: David Nolen dnolen.li...@gmail.com writes: The problem is that JOGL needs JNIs and JNIs need to be on java.library.path or java.ext.dirs, not the classpath.

Re: Non-blocking I/O

2009-12-01 Thread Ivan Sagalaev
John Harrop wrote: The java.nio.channels package. :) In other words there's no special patterns for non-bocking I/O in Clojure and it's done with callbacks as usually, right? -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group,

Re: Getting Started in Mac OS X Snow Leopard

2009-12-01 Thread Charras
Steve, I already try to follow does instructions. I copied the text into the *scratch* buffer, and did control j (C-j), but nothing happen, it just move the cursos to the next line. Do you know how can I make Aquamacs eval the *scratch* buffer? 'Cause I think that's my problem. Guido On Dec 1,

Updating Agent

2009-12-01 Thread Don
I am having trouble resetting an agent. I created a vector agent as such: (def ce2 (agent [])) I add to this vector by: (send ce2 conj 2) (await ce2) But I am having trouble thinking of a way to reset this agent. I don't believe there is a reset function for agents. Thank You -- You

Re: Updating Agent

2009-12-01 Thread Don
I actually came up with this function that takes in an agent and proceeds to pop each item while agent still has items. It's rugged, so maybe someone else will have a better solution. (defn ca [c] (let [cnt (count @c)] (loop [i cnt] (if (not (= i 0)) (do (send c

Re: clojars and licences

2009-12-01 Thread Alex Osborne
bOR_ boris.sch...@gmail.com writes: How in clojars do I attach a licence to the jar? I'm about to redistribute a BSD-licensed jarfile to clojars, but I'm not sure how I can make sure that the licence also gets redistributed. Are these things embedded in jar files by default? I think it's

Re: clojars and licences

2009-12-01 Thread Alex Osborne
bOR_ boris.sch...@gmail.com writes: How in clojars do I attach a licence to the jar? I'm about to redistribute a BSD-licensed jarfile to clojars, but I'm not sure how I can make sure that the licence also gets redistributed. Are these things embedded in jar files by default? (the jar in

Re: Updating Agent

2009-12-01 Thread Kevin Downey
uh, and you just want the agent to reference an empty vector? (send a (comp second list) []) (send a (constantly [])) (send a empty) ... On Tue, Dec 1, 2009 at 2:37 PM, Don josereyno...@gmail.com wrote: I actually came up with this function that takes in an agent and proceeds to pop each item

Re: Updating Agent

2009-12-01 Thread Don
Yes. I actually use it reference a vector, then after certain computation I need to reset it, or reference an empty vector. Awesome. Much more efficient solution. Thank you. On Dec 1, 2:45 pm, Kevin Downey redc...@gmail.com wrote: uh, and you just want the agent to reference an empty vector?

Re: Leiningen Run ?

2009-12-01 Thread David Nolen
So just to keep the conversation going: http://download.java.net/maven/2/net/java/dev/gluegen/ http://download.java.net/maven/2/net/java/dev/jogl/ I note that these two maven repos specify the platform with the following: lib-{platform}-{arch} where platform is: macosx linux windows arch is:

Re: how goes ClojureCheck?

2009-12-01 Thread Raoul Duke
ah. i guess i'm supposed to use clojure.test and clojure.test.tap, i see. On Tue, Dec 1, 2009 at 5:05 PM, Raoul Duke rao...@gmail.com wrote: how far along is the implementation of QuickCheck-esque features? (from http://bitbucket.org/kotarak/clojurecheck/ it looks to me like it hasn't had

Re: Getting Started in Mac OS X Snow Leopard

2009-12-01 Thread David Nolen
http://tromey.com/elpa/install.html Just follow the instructions here. They are pretty clear. David On Tue, Dec 1, 2009 at 5:30 PM, Charras guido.carba...@gmail.com wrote: David; My problem is that I haven't been able to install the clojure-mode. What I read is that this is done using

Remove Value From Vector at Given Index

2009-12-01 Thread Don
I have a vector [2 4 5 8 6 4] And I want to remove a value based on index. Specifically, I want to remove every third item. So my new vector would be [2 4 8 6] Thank you. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send

Re: Remove Value From Vector at Given Index

2009-12-01 Thread Wilson MacGyver
you can do it using partition and flatten from clojure.contrib.seq-utils (use 'clojure.contrib.seq-utils) (flatten (partition 2 3 [2 4 5 8 6 4])) this yields (2 4 8 6) On Tue, Dec 1, 2009 at 10:06 PM, Don josereyno...@gmail.com wrote: I have a vector [2 4 5 8 6 4] And I want to remove a

Re: Remove Value From Vector at Given Index

2009-12-01 Thread Don
Thank you Wilson. On Dec 1, 7:31 pm, Wilson MacGyver wmacgy...@gmail.com wrote: you can do it using partition and flatten from clojure.contrib.seq-utils (use 'clojure.contrib.seq-utils) (flatten (partition 2 3 [2 4 5 8 6 4])) this yields (2 4 8 6) On Tue, Dec 1, 2009 at 10:06 PM, Don

HOWTO: Compojure Development without Web Server Restarts using VimClojure

2009-12-01 Thread Gilbert
I figured this out recently; hopefully this is helpful to others. 1. Install VimClojure http://kotka.de/projects/clojure/vimclojure.html - vimclojure offers a number of features, but the documentation is hidden in a text file inside ~/.vim/doc/clojure.txt (you can also read it here:

Re: Clojure as a first programming language?

2009-12-01 Thread John Harrop
On Tue, Dec 1, 2009 at 8:30 PM, Alex Osborne a...@meshy.org wrote: Clojure would be challenging language to start with, as (all?) the books and documentation are aimed at people who are already programmers. But if you like a challenge then perhaps that's even a good thing. If you're already

Re: Space leak with lazy sequences.

2009-12-01 Thread rzeze...@gmail.com
I'm having similar problems, but am hesitant to post until I do some further analysis. However, I thought I'd share some techniques I'm trying to use to hunt down my memory leak. First, you can make GC verbose. -verbose:gc For even more detail, add the following. -XX:+PrintGCTimeStamps

Re: Datatypes and protocols - update

2009-12-01 Thread Krukow
On Dec 1, 10:56 pm, Rich Hickey richhic...@gmail.com wrote: [snip] There are 2 ways to make a deftype reach a protocol. First, you can implement the protocol directly in the deftype/reify, supplying the protocol where you do interfaces, and the methods of the protocol as methods of the type.

Re: Getting Started in Mac OS X Snow Leopard

2009-12-01 Thread Jason
in Aquamacs try coping the code on the ELPA install page and then eval'ing with C-x-e (hold down control key, then type x key and then e key) On Dec 1, 2:30 pm, Charras guido.carba...@gmail.com wrote: David; My problem is that I haven't been able to install the clojure-mode. What I read is

ClojureCLR questions

2009-12-01 Thread Mike K
Hi Clojurites! I'm reading about Clojure and ClojureCLR with great interest. Since I'm a .net developer with little Java / JVM experience, I'm particularly interested in ClojureCLR. It seems like David M. and crew are doing a fantastic job with the CLR implementation! A few quick questions:

Re: Getting Started in Mac OS X Snow Leopard

2009-12-01 Thread Giancarlo Angulo
I also had trouble installing elpa I went the more roundabout route. What I did was download clojuremode.el here: http://github.com/technomancy/clojure-mode I got this code snippet (add-to-list 'load-path ~/clojure/clojure-mode) (setq inferior-lisp-program clj) (require 'clojure-mode)