Re: challenge: best fibo implementation under the new laziness?

2009-02-24 Thread Christophe Grand
Laurent PETIT a écrit : > Hello, > What about giving back 'lazy-cons (or lcons as a shortcut), with the > optional possibility to give the cons an internal name ? It would work and that's why Stuart said "without resorting to code in clojure-contrib": (defn fibo[] (seq-utils/rec-cat fib [0 1] (

Re: challenge: best fibo implementation under the new laziness?

2009-02-24 Thread Laurent PETIT
2009/2/24 Christophe Grand > > Laurent PETIT a écrit : > > Hello, > > What about giving back 'lazy-cons (or lcons as a shortcut), with the > > optional possibility to give the cons an internal name ? > It would work and that's why Stuart said "without resorting to code in > clojure-contrib": > (d

Re: challenge: best fibo implementation under the new laziness?

2009-02-24 Thread Christophe Grand
Laurent PETIT a écrit : > > 2009/2/24 Christophe Grand > > > > Laurent PETIT a écrit : > > Hello, > > What about giving back 'lazy-cons (or lcons as a shortcut), with the > > optional possibility to give the cons an internal name ? > It would work

Re: challenge: best fibo implementation under the new laziness?

2009-02-24 Thread Dimiter "malkia" Stanev
And this is by using "java -server", not "java -client", right? On Feb 23, 2:46 pm, Raffael Cavallaro wrote: > On Feb 23, 2:51 pm, "Stephen C. Gilardi" wrote: > > > The fibs implementation in clojure.contrib.lazy-seqs is not a function   > > that returns fib(n) given n. > > I think defining a f

Re: How to get rid of reflection warning from countdown latch?

2009-02-24 Thread Anand Patil
Thanks Miʃel, On Feb 23, 10:15 pm, Michel Salim wrote: > > What's the object on which .countDown is called? You need to find > where it's first declared and give it a type annotation. > It's created here: let [ latch (java.util.concurrent.CountDownLatch. n) ... Sorry if I'

Re: Would people be interested in extending test-is with random tests?

2009-02-24 Thread James Reeves
On Feb 24, 3:11 am, "Michel S." wrote: > I started Quiche after taking a look at Fact, actually; the difference > between what I'm proposing and Fact is that the latter is a standalone > test framework, whereas the random-testing part of Quiche (property) > and Fact (fact) could, IMHO, be built o

Re: dotimes suggestion

2009-02-24 Thread Timothy Pratley
Disclaimer: I don't think this is an important issue. I'd like to hear some wider opinions on this out of interest. So far I haven't found the nays compelling, but then its not really an exciting feature either. I tend to come across (dotimes) where I want to get a rough feel for the timings on

Problem with svn checkout

2009-02-24 Thread atreyu
Hi, when i try to checkout clojure or clojure-contrib: svn checkout http://clojure-contrib.googlecode.com/svn/trunk/ clojure- contrib-read-only (or svn checkout http://clojure-contrib.googlecode.com/svn/trunk/) i get this error: svn: server sent unexpected return value (400 Bad Request) in resp

Re: Directed Graphs for Contrib

2009-02-24 Thread Tobias Ivarsson
On Feb 24, 1:33 am, Jeff Rose wrote: > > That would be great.  Especially if the algorithms can operate over some > kind of generalized interface, so the algorithms can run over different > graph implementations.  I'm writing a semi-structured storage library on > top of the neo4j graph database,

6 + 7 = 13

2009-02-24 Thread Marko
Hi, just reporting an error on the following page: http://clojure.org/dynamic 6 + 7 should really be 13, and not 42. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email

Re: 6 + 7 = 13

2009-02-24 Thread Onorio Catenacci
On Feb 24, 5:25 am, Marko wrote: > Hi, just reporting an error on the following page:http://clojure.org/dynamic > > 6 + 7 should really be 13, and not 42. Where do you see 6 + 7? I see 6 + 36. --~--~-~--~~~---~--~~ You received this message because you are subscr

Re: 6 + 7 = 13

2009-02-24 Thread Frantisek Sodomka
I see only 6 + 36 = 42 Frantisek On Feb 24, 11:25 am, Marko wrote: > Hi, just reporting an error on the following page:http://clojure.org/dynamic > > 6 + 7 should really be 13, and not 42. --~--~-~--~~~---~--~~ You received this message because you are subscribed

Re: dotimes suggestion

2009-02-24 Thread Rich Hickey
On Feb 24, 5:36 am, Timothy Pratley wrote: > Disclaimer: I don't think this is an important issue. I'd like to hear > some wider opinions on this out of interest. > > So far I haven't found the nays compelling, but then its not really an > exciting feature either. I tend to come across (dotimes

Re: alternate syntax

2009-02-24 Thread Onorio Catenacci
On Feb 23, 10:42 am, Mark Volkmann wrote: > I have an idea I'd like to float to see if there are reasons why it's > a bad idea. > > What if Clojure had an alternate "surface" syntax that was translated > into standard Clojure syntax by a kind of preprocessor? > > Many people that don't like Lisp

Re: Problem with svn checkout

2009-02-24 Thread Konrad Hinsen
On Feb 24, 2009, at 9:26, atreyu wrote: > i get this error: > > svn: server sent unexpected return value (400 Bad Request) in response > to REPORT request for '/svn/!svn/vcc/default' > > yes im a newbie with subversion and im behind a proxy in a windows pc. > I try to configure the proxy setting

Database connection examples

2009-02-24 Thread Sean
Hi, I'm trying to connect to a MYSQL instance. I need a little help making the intellectual connection from Clojure to JDBC. Specifically, I was hoping someone could post/link to an working example. Bonus Points: Provide a second example for Postgres. Negative Points: Provide an example for S

Re: Database connection examples

2009-02-24 Thread Onorio Catenacci
On Feb 24, 8:05 am, Sean wrote: > Hi, > I'm trying to connect to a MYSQL instance.  I need a little help > making the intellectual connection from Clojure to JDBC. > Specifically, I was hoping someone could post/link to an working > example. > > Bonus Points:  Provide a second example for Postgre

Re: transactions and retries

2009-02-24 Thread Mark Volkmann
On Mon, Feb 23, 2009 at 6:23 PM, Rich Hickey wrote: > > On Feb 23, 2009, at 4:47 PM, Mark Volkmann wrote: > >> On Mon, Feb 23, 2009 at 3:19 PM, Rich Hickey >> wrote >>> >>> On Feb 23, 2009, at 3:44 PM, Mark Volkmann wrote: >>> On Mon, Feb 23, 2009 at 2:31 PM, Dan wrote: >> If I underst

Re: How to get rid of reflection warning from countdown latch?

2009-02-24 Thread Michel Salim
On Tue, Feb 24, 2009 at 4:44 AM, Anand Patil wrote: > > Thanks Miʃel, > > On Feb 23, 10:15 pm, Michel Salim wrote: >> >> What's the object on which .countDown is called? You need to find >> where it's first declared and give it a type annotation. >> > > It's created here: > > let [ >          la

Re: alternate syntax

2009-02-24 Thread Mark Volkmann
On Tue, Feb 24, 2009 at 6:33 AM, Onorio Catenacci wrote: > > On Feb 23, 10:42 am, Mark Volkmann wrote: >> I have an idea I'd like to float to see if there are reasons why it's >> a bad idea. >> >> What if Clojure had an alternate "surface" syntax that was translated >> into standard Clojure synt

Re: transactions and retries

2009-02-24 Thread Laurent PETIT
Hello, I suspect you want to guess *when* things happen because you're tempted (or you're doing) do call code with side effect inside the transaction. So you say to yourself : "if the transaction is aborted at this place then this code will not have been called and this thing will not have been pr

Re: How to get rid of reflection warning from countdown latch?

2009-02-24 Thread Anand Patil
On Feb 24, 1:32 pm, Michel Salim wrote: > On Tue, Feb 24, 2009 at 4:44 AM, Anand Patil > > wrote: > > > Thanks Miʃel, > > > On Feb 23, 10:15 pm, Michel Salim wrote: > > >> What's the object on which .countDown is called? You need to find > >> where it's first declared and give it a type annotat

Clojure plugin for IntelliJ IDEA published

2009-02-24 Thread Ilya Sergey
Hello, all! I'm happy to present alpha-version of official Clojure plugin for IntelliJ IDEA "La Clojure". It may be downloaded from http://plugins.intellij.net/plugin/?id=4050 List of implemented features for now looks as follows: 1. Customizable code highlighting 2. Code folding 3. Brace matchi

Re: Problem with svn checkout

2009-02-24 Thread Laurent PETIT
Alas, sometimes those people don't listen to developers ... One solution is to install the following python software : http://ntlmaps.sourceforge.net/ it is a little local proxy that knows how to speak with a Microsoft NTLM proxy. I had success with it in many organisations where I was working.

Re: Database connection examples

2009-02-24 Thread Mark Volkmann
On Tue, Feb 24, 2009 at 7:05 AM, Sean wrote: > > Hi, > I'm trying to connect to a MYSQL instance.  I need a little help > making the intellectual connection from Clojure to JDBC. > Specifically, I was hoping someone could post/link to an working > example. > > Bonus Points:  Provide a second exam

Re: Would people be interested in extending test-is with random tests?

2009-02-24 Thread Michel Salim
On Tue, Feb 24, 2009 at 5:00 AM, James Reeves wrote: > > On Feb 24, 3:11 am, "Michel S." wrote: >> I started Quiche after taking a look at Fact, actually; the difference >> between what I'm proposing and Fact is that the latter is a standalone >> test framework, whereas the random-testing part o

Re: newbie troubles with new lazy-seq hotness (OutOfMemory)

2009-02-24 Thread Jeffrey Straszheim
Glad I could help. On Tue, Feb 24, 2009 at 1:07 AM, bsmith.occs wrote: > > > > On Feb 23, 11:46 pm, Jeffrey Straszheim > wrote: > > Have you figured this out yet? > > > > On Mon, Feb 23, 2009 at 4:58 PM, Jeffrey Straszheim < > > > > straszheimjeff...@gmail.com> wrote: > > > The identifier "fibl

Privacy problems with clojure-contrib mirrors

2009-02-24 Thread Konrad Hinsen
There are a couple of mirrors of clojure-contrib out there, for example: http://bitbucket.org/shoover/clojure-contrib-mirror/overview/ (Mercurial) http://github.com/kevinoneill/clojure-contrib/commits/ (git) While it is nice to have clojure-contrib accessible through different version contr

Re: alternate syntax

2009-02-24 Thread Laurent PETIT
Mark, If you have not been discouraged by the crowd of people having answered 'no' to your question :-), and still have the idea of exploring this area, would you consider designing a "surface language" that allows bidirectional flow to and from clojure code ? If you do so, then you would well pr

Re: Clojure plugin for IntelliJ IDEA published

2009-02-24 Thread Laurent PETIT
Congratulations! 2009/2/24 Ilya Sergey > Hello, all! > > I'm happy to present alpha-version of official Clojure plugin for IntelliJ > IDEA "La Clojure". It may be downloaded from > http://plugins.intellij.net/plugin/?id=4050 > > List of implemented features for now looks as follows: > > 1. Cust

Re: alternate syntax

2009-02-24 Thread Mark Volkmann
On Tue, Feb 24, 2009 at 7:43 AM, Laurent PETIT wrote: > Mark, > > If you have not been discouraged by the crowd of people having answered 'no' > to your question :-), and still have the idea of exploring this area, would > you consider designing a "surface language" that allows bidirectional flow

Waterfront - The Clojure-based editor for Clojure

2009-02-24 Thread Itay Maman
I've been silently following Clojure (and this group) for several months now.Somewhere around December I started working on a Clojure editor/REPL written in Clojure. This effort evolved into the Waterfront project which is now available on sourceforge (http:// sourceforge.net/project/showfiles.php

Re: Clojure plugin for IntelliJ IDEA published

2009-02-24 Thread Peter Wolf
Ah darn, scooped! Yes. This is wonderful news! Thank you so much Ilya for turning the IntelliJ plugin into a real product. You have made many of us very happy, and hopefully brought IntelliJ some new customers. For Mac users, this version should now work :-D Please give it a try and report

Re: Problem with svn checkout

2009-02-24 Thread Michael Wood
On Tue, Feb 24, 2009 at 3:07 PM, Konrad Hinsen wrote: > > On Feb 24, 2009, at 9:26, atreyu wrote: > >> i get this error: >> >> svn: server sent unexpected return value (400 Bad Request) in response >> to REPORT request for  '/svn/!svn/vcc/default' >> >> yes im a newbie with subversion and im behi

Re: Waterfront - The Clojure-based editor for Clojure

2009-02-24 Thread Itay Maman
Ooops... Sorry for the multiple posting. Seems to be some glitch. -Itay --~--~-~--~~~---~--~~ 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 To unsubscribe f

Re: Macro madness

2009-02-24 Thread Meikel Brandmeyer
Hi, Am 23.02.2009 um 21:25 schrieb max3000: No matter what escaping I try (quotes, semi-quotes), I always get some error similar to "No such var: clojure.core/link". Use the (.link controller ...) notation for method calls in macros. Symbols starting with a dot are left alone by syntax-quote.

Re: alternate syntax

2009-02-24 Thread Michael Wood
On Tue, Feb 24, 2009 at 3:35 PM, Mark Volkmann wrote: [...] > As I said, it's not me that has a problem with parentheses. It's not > hard to find developers that say that don't like Lisp because of the > parens. I think the question is whether we should make an effort to > appease those people. C

Re: alternate syntax

2009-02-24 Thread Onorio Catenacci
On Feb 24, 8:35 am, Mark Volkmann wrote: > On Tue, Feb 24, 2009 at 6:33 AM, Onorio Catenacci wrote: > > > On Feb 23, 10:42 am, Mark Volkmann wrote: > >> I have an idea I'd like to float to see if there are reasons why it's > >> a bad idea. > > >> What if Clojure had an alternate "surface" synta

Logic Programming Contrib

2009-02-24 Thread jim
One stepping stone to getting my parenscript-like javascript generator released is to get the logic programming module released. A couple of months ago, I implemented the system from "The Reasoned Schemer" in Clojure and posted it to the files section. I've updated it to take advantage of the mo

Re: transactions and retries

2009-02-24 Thread Mark Volkmann
On Tue, Feb 24, 2009 at 7:34 AM, Laurent PETIT wrote: > Hello, > > I suspect you want to guess *when* things happen because you're tempted (or > you're doing) do call code with side effect inside the transaction. > So you say to yourself : "if the transaction is aborted at this place then > this

Re: transactions and retries

2009-02-24 Thread Laurent PETIT
Mark, I think Rich made a point very clear : even if you study the *current* code and understand it, there is no guarantee that the code will still behave as you've understood it in two month, because you will have looked at internal implementation detail. So this kind of knownledge can be dangerou

Re: transactions and retries

2009-02-24 Thread Mark Volkmann
On Tue, Feb 24, 2009 at 9:11 AM, Laurent PETIT wrote: > Mark, I think Rich made a point very clear : even if you study the *current* > code and understand it, there is no guarantee that the code will still > behave as you've understood it in two month, because you will have looked at > internal i

Re: Logic Programming Contrib

2009-02-24 Thread Rich Hickey
On Feb 24, 9:56 am, jim wrote: > One stepping stone to getting my parenscript-like javascript generator > released is to get the logic programming module released. A couple of > months ago, I implemented the system from "The Reasoned Schemer" in > Clojure and posted it to the files section. I

Re: Waterfront - The Clojure-based editor for Clojure

2009-02-24 Thread Tom Ayerst
This is an interesting idea and a lightweight IDE distributed in contrib would be a great addition IMHO. I have tried it (on Windows using a pre-lazy version of clojure) and it doesn't react to any events (though it does repaint after other apps windows are dragged over it). What version of cloju

Re: Logic Programming Contrib

2009-02-24 Thread jim
Hadn't thought of that. There are two parts, the unification part and the implementation of the operators. In the interest of time and learning, I originally did a port of both parts. What I've since done is re-implement the operators, so that's a totally original implementation using lazy sequ

Re: 6 + 7 = 13

2009-02-24 Thread Rayne
Let me guess, your first time trying acid? Marko wrote: > Hi, just reporting an error on the following page: > http://clojure.org/dynamic > > 6 + 7 should really be 13, and not 42. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Go

Re: Waterfront - The Clojure-based editor for Clojure

2009-02-24 Thread Itay Maman
I built it against the latest download 20081217 (SVN Revision: 1173) -Itay On Feb 24, 6:19 pm, Tom Ayerst wrote: > This is an interesting idea and a lightweight IDE distributed in contrib > would be a great addition IMHO. > > I have tried it (on Windows using a pre-lazy version of clojure) and

Re: challenge: best fibo implementation under the new laziness?

2009-02-24 Thread Raffael Cavallaro
On Feb 24, 4:14 am, "Dimiter \"malkia\" Stanev" wrote: > And this is by using "java -server", not "java -client", right? yes --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, se

Re: pretty printing code

2009-02-24 Thread Tom Faulhaber
I'm just a few days away from having announcing the first release of my pretty printer (the pretty printer itself is working now, I'm just gearing up the defs for different code structures and organizing the packaging. It's all in the pprint branch of cl-format on github if you want to take a loo

Re: Privacy problems with clojure-contrib mirrors

2009-02-24 Thread Cosmin Stejerean
On Tue, Feb 24, 2009 at 7:46 AM, Konrad Hinsen wrote: > > There are a couple of mirrors of clojure-contrib out there, for example: > > http://bitbucket.org/shoover/clojure-contrib-mirror/overview/ > (Mercurial) > http://github.com/kevinoneill/clojure-contrib/commits/ (git) > > While it is nice to

retrieving argument :tag metadata

2009-02-24 Thread Stuart Halloway
Is there a way to programmatically retrieve the :tag of an argument? The var metadata will return the tag of a return value... Stu --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this g

Re: 6 + 7 = 13

2009-02-24 Thread Rich Hickey
On Feb 24, 2009, at 11:24 AM, Rayne wrote: > > Let me guess, your first time trying acid? > There's no purpose to messages such as this, so let's not send them, ok? Thanks, Rich --~--~-~--~~~---~--~~ You received this message because you are subscribed to th

Re: 6 + 7 = 13

2009-02-24 Thread Marko
Strange, I'm sure I saw 7 this morning and not 36. Either I was delusional or somebody changed it already. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@

Re: 6 + 7 = 13

2009-02-24 Thread Richard Lyman
It's probably already been changed. They've had a really fast response time here for things like that. -Richard On Tue, Feb 24, 2009 at 10:08 AM, Marko wrote: > > Strange, I'm sure I saw 7 this morning and not 36. Either I was > delusional or somebody changed it already. > > > --~--~---

Re: Problem with svn checkout

2009-02-24 Thread Cosmin Stejerean
On Tue, Feb 24, 2009 at 8:09 AM, Michael Wood wrote: [...] If you can't get fix or get around the proxy then you will need to > fetch Clojure from somewhere like an unofficial Git repository. I > don't know the URL off hand, but it's been mentioned on the Clojure > group. > git://github.com/ke

Re: Privacy problems with clojure-contrib mirrors

2009-02-24 Thread Konrad Hinsen
On Feb 24, 2009, at 17:55, Cosmin Stejerean wrote: > But more importantly you can't expect that people go ahead and > change all (any really) of the existing git or mercurial clones of > the repository. You can probably trying filing bug requests with > github or bitbucket to not show email

Re: test-is integration via SLIME

2009-02-24 Thread Phil Hagelberg
Michel Salim writes: > That would be really neat! I'm having a bit of trouble setting it up, > though: > - When loading a .clj file in Emacs, it automatically triggers Slime This should happen only on test files, not every clojure file. > - However, the file is not actually loaded; I had to C

Re: Privacy problems with clojure-contrib mirrors

2009-02-24 Thread Cosmin Stejerean
On Tue, Feb 24, 2009 at 11:21 AM, Konrad Hinsen wrote: > > On Feb 24, 2009, at 17:55, Cosmin Stejerean wrote: > > > But more importantly you can't expect that people go ahead and > > change all (any really) of the existing git or mercurial clones of > > the repository. You can probably trying fili

Re: Privacy problems with clojure-contrib mirrors

2009-02-24 Thread Laurent PETIT
Konrad, If you are so much concerned with this issue, you should consider not letting you e-mail address in the author section of the license, but place an URL that would display an image representing the personal information you would like forkers of your code to know about ? By providing an URL

dorun and map

2009-02-24 Thread Mark Volkmann
It seems that, at least in demo code that I write, I frequently call dorun on the lazy sequence returned by map to force side effects such as calls to println. I know I could write my own function that combines those, but does such a thing already exist? I don't want to reinvent the wheel or use a

Bugfix for core.line-seq [patch]

2009-02-24 Thread Toralf Wittner
Dear list members, It seems that core.line-seq contains a small bug w.r.t. laziness. The side effect (. rdr (readLine)) occurs before lazy-seq, so the sequence created is not fully delayed. Fix attached. Cheers, Toralf --~--~-~--~~~---~--~~ You received this messa

Re: pretty printing code

2009-02-24 Thread Jeffrey Straszheim
I look forward to it. A good pretty-printer would be very helpful in my current work. On Tue, Feb 24, 2009 at 11:54 AM, Tom Faulhaber wrote: > > I'm just a few days away from having announcing the first release of > my pretty printer (the pretty printer itself is working now, I'm just > gearing

Re: retrieving argument :tag metadata

2009-02-24 Thread Chouser
On Tue, Feb 24, 2009 at 11:59 AM, Stuart Halloway wrote: > > Is there a way to programmatically retrieve the :tag of an argument? > The var metadata will return the tag of a return value... The :arglists metadata attached to the Var by defn appear to keep the metadata given in the defn form: us

Re: Logic Programming Contrib

2009-02-24 Thread Michel S.
On Feb 24, 11:03 am, Rich Hickey wrote: > On Feb 24, 9:56 am, jim wrote: > > > One stepping stone to getting my parenscript-like javascript generator > > released is to get the logic programming module released.  A couple of > > months ago, I implemented the system from "The Reasoned Schemer"

Re: retrieving argument :tag metadata

2009-02-24 Thread Stephen C. Gilardi
On Feb 24, 2009, at 11:59 AM, Stuart Halloway wrote: Is there a way to programmatically retrieve the :tag of an argument? The var metadata will return the tag of a return value... Yes. Here an example: user=> (source slurp) (defn slurp "Reads the file named by f into a string and returns i

Re: challenge: best fibo implementation under the new laziness?

2009-02-24 Thread Luke VanderHart
Just out of curiosity - did you by any chance "warm up" the JVM to make sure that the fib function was JIT'd before you did this benchmark? On Feb 23, 5:46 pm, Raffael Cavallaro wrote: > On Feb 23, 2:51 pm, "Stephen C. Gilardi" wrote: > > > The fibs implementation in clojure.contrib.lazy-seqs i

Re: dorun and map

2009-02-24 Thread Jason Wolfe
You could use doseq? Now, if you want eager evalation *and* a result seq, I think you're stuck with (doall (for ...)) or (doall (map ...)). -Jason On Feb 24, 9:49 am, Mark Volkmann wrote: > It seems that, at least in demo code that I write, I frequently call > dorun on the lazy sequence return

Re: Logic Programming Contrib

2009-02-24 Thread jim
Good to know. Thanks. Michel S. wrote: > On Feb 24, 11:03 am, Rich Hickey wrote: > Kanren / Mini Kanren (Mini is the version in Reasoned Schemer) are MIT- > licensed: > > http://kanren.sourceforge.net/#Availability > > so even a port is alright. When I took Dan Friedman's class based on > the b

Re: Waterfront - The Clojure-based editor for Clojure

2009-02-24 Thread Itay Maman
All, thanks so much for the feedback. I am working on adapting Waterfront to the Clojure's latest snapshot. Will let you know when this process is complete. Till then it can be tried with Clojure's previous version (Dec.17). -Itay On Feb 24, 6:32 pm, Itay Maman wrote: > I built it against the

Re: Would people be interested in extending test-is with random tests?

2009-02-24 Thread Meikel Brandmeyer
Hi, Am 24.02.2009 um 16:03 schrieb Michel Salim: I'd need to sit down sometimes and read both monad implementations. I was toying with it myself -- 'return' in particular is problematic as the type is "whatever the consuming expression wants". Rewriting is a cute hack, but definitely not elegan

Re: dorun and map

2009-02-24 Thread Stuart Sierra
I've occasionally thought of adding "domap" to clojure.contrib.seq- utils: (defn domap [f coll] (doall (map f coll))) -Stuart Sierra On Feb 24, 1:23 pm, Jason Wolfe wrote: > You could use doseq? > > Now, if you want eager evalation *and* a result seq, I think you're > stuck with (doall (for .

Re: test-is integration via SLIME

2009-02-24 Thread Michel S.
On Feb 24, 12:17 pm, Phil Hagelberg wrote: > Michel Salim writes: > > That would be really neat! I'm having a bit of trouble setting it up, > > though: > > - When loading a .clj file in Emacs, it automatically triggers Slime > > This should happen only ontestfiles, not every clojure file. Ah,

Re: dorun and map

2009-02-24 Thread Mark Volkmann
On Tue, Feb 24, 2009 at 12:23 PM, Jason Wolfe wrote: > > You could use doseq? I don't have a body to execute though. I need to build things with map first. > Now, if you want eager evalation *and* a result seq, I think you're > stuck with (doall (for ...)) or (doall (map ...)). Yeah. > On Feb

Re: dorun and map

2009-02-24 Thread Mark Volkmann
On Tue, Feb 24, 2009 at 1:00 PM, Stuart Sierra wrote: > > I've occasionally thought of adding "domap" to clojure.contrib.seq- > utils: > > (defn domap [f coll] >  (doall (map f coll))) I'd use that. > -Stuart Sierra > > On Feb 24, 1:23 pm, Jason Wolfe wrote: >> You could use doseq? >> >> Now,

Re: alternate syntax

2009-02-24 Thread jwhitlark
If you want to do this, knock yourself out. Just don't call it Clojure anymore. Personally I'm opposed to watering something down just because it's tricky. ~Jason On Feb 24, 6:27 am, Onorio Catenacci wrote: > On Feb 24, 8:35 am, Mark Volkmann wrote: > > > > > On Tue, Feb 24, 2009 at 6:33 AM,

Re: dorun and map

2009-02-24 Thread Jason Wolfe
On Feb 24, 2009, at 11:58 AM, Mark Volkmann wrote: > > On Tue, Feb 24, 2009 at 12:23 PM, Jason Wolfe > wrote: >> >> You could use doseq? > > I don't have a body to execute though. I need to build things with > map first. >> Huh? As far as I know, as long as you're only iterating through

Re: dorun and map

2009-02-24 Thread Jason Wolfe
On Feb 24, 2009, at 12:07 PM, Jason Wolfe wrote: > > > On Feb 24, 2009, at 11:58 AM, Mark Volkmann wrote: > >> >> On Tue, Feb 24, 2009 at 12:23 PM, Jason Wolfe >> wrote: >>> >>> You could use doseq? >> >> I don't have a body to execute though. I need to build things with >> map first. >>> > > >

Re: Privacy problems with clojure-contrib mirrors

2009-02-24 Thread Konrad Hinsen
On 24.02.2009, at 18:40, Laurent PETIT wrote: > If you are so much concerned with this issue, you should consider > not letting you e-mail address in the author section of the > license, but place an URL that would display an image representing > the personal information you would like fork

Re: Waterfront - The Clojure-based editor for Clojure

2009-02-24 Thread AlamedaMike
Thanks for this Itay.Very sweet. I've been running it against the Dec. 17th download and it works fine on Vista SP1. I'm particularly impressed with the quality of the error messages. A few suggestions / questions: * there's a lot of whitespace to the right even when I don't have the window max

ANN: ClojureCLR alpha up on clojure-contrib

2009-02-24 Thread dmiller
ClojureCLR is up on clojure-contrib. Look in trunk/ClojureCLR. Previously mentioned here at http://groups.google.com/group/clojure/browse_thread/thread/54571c9b8f625dba/ Compatible with pre-lazy Clojure (r1279). (See versions.txt in the root directory.) Status: definitely alpha. Developers

Re: Logic Programming Contrib

2009-02-24 Thread Chouser
On Tue, Feb 24, 2009 at 1:18 PM, Michel S. wrote: > > Kanren / Mini Kanren (Mini is the version in Reasoned Schemer) are MIT- > licensed: > > http://kanren.sourceforge.net/#Availability > > so even a port is alright. The problem is that to be included in contrib, it needs to be the original work

Re: newbie troubles with new lazy-seq hotness (OutOfMemory)

2009-02-24 Thread bsmith.occs
On Feb 24, 7:07 am, "bsmith.occs" wrote: > On Feb 23, 11:46 pm, Jeffrey Straszheim > wrote: > > > Have you figured this out yet? > > > On Mon, Feb 23, 2009 at 4:58 PM, Jeffrey Straszheim < > > > straszheimjeff...@gmail.com> wrote: > > > The identifier "fibl" is holding on to the head of the se

Re: Waterfront - The Clojure-based editor for Clojure

2009-02-24 Thread Itay Maman
On Feb 24, 10:22 pm, AlamedaMike wrote: > Thanks for this Itay.Very sweet.  I've been running it against the > Dec. 17th download and it works fine on Vista SP1. I'm particularly > impressed with the quality of the error messages. Thanks > > A few suggestions / questions: > > * there's a lot

Why pass bindings as vector

2009-02-24 Thread Joshua Fox
Why do many core macros pass bindings as a vector, then destructure them in various ways into symbols and values. This is instead of just providing the symbol and value, e.g., (defmacro my-macro [s v & body] `(let [~s ~v] ... In at least five macros in core.clj, this was changed recent

Dotted method invocations (and other reader niceties) do not work in #= forms

2009-02-24 Thread Chas Emerick
This works fine: user/ (read-string "#=(java.lang.Float. \"5\")") 5.0 However, these two cases fail: user/ (read-string "#=(.toCharArray \"foo\")") java.lang.Exception: Can't resolve .toCharArray user/ (read-string "#=(java.lang.Enum/valueOf java.lang.Thread$State \"NEW\")") java.lang.ClassC

Re: dorun and map

2009-02-24 Thread Mark Volkmann
On Tue, Feb 24, 2009 at 2:08 PM, Jason Wolfe wrote: > > On Feb 24, 2009, at 12:07 PM, Jason Wolfe wrote: > >> >> On Feb 24, 2009, at 11:58 AM, Mark Volkmann wrote: >> >>> On Tue, Feb 24, 2009 at 12:23 PM, Jason Wolfe >>> wrote: You could use doseq? >>> >>> I don't have a body to execut

Re: Waterfront - The Clojure-based editor for Clojure

2009-02-24 Thread AlamedaMike
Thanks for the quick response Itay. >> Thus, the workaround is this: highlight only the "Math" part and then choose >> Reflect. Yup! Very nice feature. A few further suggestions, if you're in the mood: * a separate REPL tab would be very useful and save me from having to enter code into the f

Re: Why pass bindings as vector

2009-02-24 Thread Chouser
On Tue, Feb 24, 2009 at 4:15 PM, Joshua Fox wrote: > Why do many core macros pass bindings as a vector, then destructure them in > various ways into symbols and values. > This is instead of just providing the symbol and value, e.g., > (defmacro my-macro >   [s v & body] >     `(let [~s ~v]  .

Re: challenge: best fibo implementation under the new laziness?

2009-02-24 Thread Raffael Cavallaro
On Feb 24, 1:18 pm, Luke VanderHart wrote: > Just out of curiosity - did you by any chance "warm up" the JVM to > make sure that the fib function was JIT'd before you did this > benchmark? > > On Feb 23, 5:46 pm, Raffael Cavallaro > wrote: > > for comparison, here are some timings under differ

bug? ClassNotFoundException from macro

2009-02-24 Thread MikeM
Under SVN 1303, I'm getting a ClassNotFoundException from a macro. Here's a simplified example of the problem: (defn test1 [x] (+ x 1)) (defmacro test2 [form] (list 'list form {:a test1})) (test2 (+ 1 1)) => java.lang.ClassNotFoundException: user$test1__3765 Is this a bug? --~--~-~--~

Re: Logic Programming Contrib

2009-02-24 Thread Michel S.
On Feb 24, 3:28 pm, Chouser wrote: > On Tue, Feb 24, 2009 at 1:18 PM, Michel S. wrote: > > > Kanren / Mini Kanren (Mini is the version in Reasoned Schemer) are MIT- > > licensed: > > >http://kanren.sourceforge.net/#Availability > > > so even a port is alright. > > The problem is that to be inc

Re: Waterfront - The Clojure-based editor for Clojure

2009-02-24 Thread Itay Maman
After a few hours of intense work I managed to port Waterfront's code to Clojure's latest snapshot. This version is now available for download as "RC1-147" at the same location (http://sourceforge.net/ project/showfiles.php?group_id=249246). This version is fully functional and so far I didn't en

Re: Macro madness

2009-02-24 Thread max3000
Thanks, it worked! Max On Feb 23, 4:16 pm, Telman Yusupov wrote: > Try this syntax: ~'link > > Cheers, > > Telman > > On Feb 23, 3:25 pm, max3000 wrote: > > > Hi, > > > I'm new to lisp and clojure, so what follows may be a very easy (i.e. > > stupid) question... > > > I want a macro to generat

Re: :use feature requests

2009-02-24 Thread Stephen C. Gilardi
On Feb 23, 2009, at 1:54 PM, Chouser wrote: This is much prettier to my eye, but has a couple things that could be better. So, feature request #1 is that if a libspec has an ":as" option, that the ":only []" option be implied. That is, if I'm aliasing an namespace, don't by default refer in a

Re: retrieving argument :tag metadata

2009-02-24 Thread Stuart Halloway
Cool, thanks. > > On Tue, Feb 24, 2009 at 11:59 AM, Stuart Halloway > wrote: >> >> Is there a way to programmatically retrieve the :tag of an argument? >> The var metadata will return the tag of a return value... > > The :arglists metadata attached to the Var by defn appear to keep > the metadat

Re: Waterfront - The Clojure-based editor for Clojure

2009-02-24 Thread Kevin Albrecht
Itay, I took a look at Waterfront and it seems to have a lot of potential. Keep me and the group updated on your future work. I have also been working on a GUI application in Clojure and I share your perspective on the challenges of designing a functional GUI. I am definitely intrigued by the a

new laziness: terminology help

2009-02-24 Thread Stuart Halloway
I am wrestling the sequences chapter of the book into conformance with the new laziness, and I am finding it tricky to infer accurate definitions of the words sequence, seq (noun), seq (function), and ISeq from the variety of extant documentation, code, email chats, and IRC logs. I would a

Re: IntelliJ Plugin -- Wonderful News!

2009-02-24 Thread Mark Derricutt
TeamCity Professional is free to ANYONE, however the server has the following limits: - 20 users - 20 build profiles - 3 build runners Which is PLENTY for even a fairly modest dev shop. On Tue, Feb 17, 2009 at 5:57 AM, Tom Ayerst wrote: > Team City is not an IDE, it is a continuous integration

unbean

2009-02-24 Thread .Bill Smith
I finally got around to writing an "unbean" function. As the name suggests, it's the reverse of the bean function: it takes a class and a map of property name/values and returns an instance of that class with those property values. So for example, if class House has properties "address", "color

Flatten a list

2009-02-24 Thread Sean
I've got the following list (:a nil nil :b :a) I want to call a "nil-killer" function, and get the following list (:a :b :a) How do I go about this? Could someone post a quick example? --~--~-~--~~~---~--~~ You received this message because you are subscribed t

  1   2   >