Re: Got a Clojure library?

2009-01-29 Thread Christophe Grand
Name: clojure.contrib.javadoc URL: http://code.google.com/p/clojure-contrib/ Author: Christophe Grand Categories: repl utilities License: EPL Dependencies: clojure.contrib Description: A repl helper to quickly open javadocs. Name: clojure.contrib.javadoc.browse URL

Re: Bug with clojure.set/intersection, clojure.set/difference etc.

2009-01-29 Thread ntu...@googlemail.com
On Jan 29, 7:10 pm, Jason Wolfe wrote: > I think this is not a bug in disj.  disj takes a *set* and an element > as input.  nil is the empty seq, which is different from the empty set > #{}. Well, then forget my remark about disj and let's concentrate on the set functions. Those operate on sets

Re: Distributed Clojure

2009-01-29 Thread Konrad Hinsen
On 30.01.2009, at 00:59, Greg Harman wrote: > Agreed; the communication layer needs to come first. Regarding > serialization, specifically, I think we get that for "free" with s- > exps (there may be some under-the-hood evaluation time necessary for > remoted expressions, but [de]serialization is

Re: Alternatives to contains?

2009-01-29 Thread Rich Hickey
On Jan 29, 10:41 pm, Paul Barry wrote: > This is actually the point of this whole debate. You would assume that > contains? works like java.util.Collection.contains, but instead it means > something completely semantically different. > user=> (.contains [4 5 6] 4) > true > user=> (contains? [4

Re: Alternatives to contains?

2009-01-29 Thread Paul Barry
This is actually the point of this whole debate. You would assume that contains? works like java.util.Collection.contains, but instead it means something completely semantically different. user=> (.contains [4 5 6] 4) true user=> (contains? [4 5 6] 4) false Even worse, you do this and think it wo

Re: Simple Examples of Concurrency?

2009-01-29 Thread Telman Yusupov
Clojure sets the value of this var. If you call this var from REPL it will evaluate to nil: user=> *file* nil If you pass a file to Clojure on the command line, Clojure will set it to the location of this file. For example, create a simple file called test.clj with one line in it: (println *fi

Cells using agents and watchers

2009-01-29 Thread Stuart Sierra
Hi everyone, I have put together a another implementation of Cells. This one uses agents and watchers, so it's asynchronous, unlike the original Cells for Common Lisp. I've called it "auto-agents". It's in clojure.contrib.auto-agent. The idea is the same as Cells. You create a special variable (

Re: Alternatives to contains?

2009-01-29 Thread Stuart Sierra
On Jan 29, 5:48 pm, Chouser wrote: > What is the drawback of the (some #{:y} [:x :y :z]) idiom?   Too hard to understand at first, which is why I wrote seq-utils/ includes?. But a note to all: I've hardly used includes? since I wrote it. I found that if I was testing for the presence/absence o

Re: Simple Examples of Concurrency?

2009-01-29 Thread wubbie
Hi Telman, I know *file* is a built-in global. My question is that how the value of *file* is set in the program. It is in the first line of the program so I don't know how it's set. -sun On Jan 29, 7:44 pm, Telman Yusupov wrote: > Hi Sun, > > *file* seems to be one of the built-in global va

Re: Distributed Clojure

2009-01-29 Thread Raoul Duke
> Another thing to look at (there's always another thing to look at) this worries me... it is sorta like the discussions i see about how some new db engine is FAST, oh but it totally fails on occasion and trashes the data, oopsy, oh well. how do we know any given lib is not going to just end up

Re: Distributed Clojure

2009-01-29 Thread Mark Derricutt
How about Hazelcast? [1] Its much lighter weight than TC. [1] http://www.hazelcast.com On Fri, Jan 30, 2009 at 1:28 PM, Greg Harman wrote: > > Hank: > > I have looked at TC in the past, and took another look today at your > suggestion. Terracotta certainly seems to have promise feature-wise, >

Re: purpose of clojure-slim.jar

2009-01-29 Thread kkw
Hi Kevin, Thanks for the explanation! Kev On Jan 30, 11:59 am, Kevin Downey wrote: > clojure-slim.jar lacks compiled clojure code. The java code is > compiled, so clojure-slim.jar  is still completely usable as clojure, > it just have to compile things like core.clj when it loads them. > >

Clojure running atop Java ME (Micro Edition) for mobile phones

2009-01-29 Thread kkw
Hi folks, My question is similar to dokondr's question in http://groups.google.com/group/clojure/browse_thread/thread/42c87abf2b2a0689/b92ca96a14bf52cd?lnk=gst&q=mobile#b92ca96a14bf52cd titled "Running Clojure on Pocket PC": Does anyone have experience and accumulated wisdom using Clojur

Re: purpose of clojure-slim.jar

2009-01-29 Thread Kevin Downey
clojure-slim.jar lacks compiled clojure code. The java code is compiled, so clojure-slim.jar is still completely usable as clojure, it just have to compile things like core.clj when it loads them. On Thu, Jan 29, 2009 at 4:56 PM, kkw wrote: > > Hi folks, > >I noticed that when I run 'ant' t

purpose of clojure-slim.jar

2009-01-29 Thread kkw
Hi folks, I noticed that when I run 'ant' to build Clojure, in addition to clojure.jar, 'ant' gives birth to clojure-slim.jar. The build.xml says the clojure-slim.jar lacks compiled Clojure code. I don't know what purpose clojure-slim.jar serves. I searched the http://groups.google.com/group

Re: Simple Examples of Concurrency?

2009-01-29 Thread Telman Yusupov
Hi Sun, *file* seems to be one of the built-in global vars (there is more - vars like *command-line-args*, *compile-path* and others in core.clj file). If you really need to see the source of it, look for SOURCE_PATH in Compiler.java in Clojure's source code in jvm/clojure/lang directory. Cheer

Re: Distributed Clojure

2009-01-29 Thread Kevin O'Neill
Another thing to look at (there's always another thing to look at) might be grid gain (http://www.gridgain.com/). It's map/reduce centric and might suite clojure very well. -k. On Fri, Jan 30, 2009 at 11:28 AM, Greg Harman wrote: > > Hank: > > I have looked at TC in the past, and took another l

Re: Distributed Clojure

2009-01-29 Thread Greg Harman
Hank: I have looked at TC in the past, and took another look today at your suggestion. Terracotta certainly seems to have promise feature-wise, but I have to admit it's a "heavier" solution than I had been thinking of, and there are probably all sorts of gotchas (and reviewing old threads on the

Re: Distributed Clojure

2009-01-29 Thread Kevin Downey
have you looked at the available java frameworks like hadoop? there is also some kind of java interface to erlang instead of reinventing the wheel again... On Thu, Jan 29, 2009 at 6:15 AM, Greg Harman wrote: > > One of Clojure's big selling points (obviously) is the support for > concurrent prog

Re: Alternatives to contains?

2009-01-29 Thread Paul Mooser
Good point - I actually looked in Collections, but failed to look in Collection itself. On Jan 29, 3:55 pm, Kevin Downey wrote: > actually rhickey showed up on irc and pointed something out: > ... --~--~-~--~~~---~--~~ You received this message because you are sub

Re: Alternatives to contains?

2009-01-29 Thread Jason Wolfe
except (.contains nil 2) ==> NPE :-) -Jason On Jan 29, 2009, at 3:55 PM, Kevin Downey wrote: > actually rhickey showed up on irc and pointed something out: > > 15:23 rhickey : user=> (.contains [1 2 3] 2) > 15:23 rhickey : true > 15:23 rhickey : user=> (.contains '(1 2 3) 2) > 15:23

Re: Distributed Clojure

2009-01-29 Thread Greg Harman
Agreed; the communication layer needs to come first. Regarding serialization, specifically, I think we get that for "free" with s- exps (there may be some under-the-hood evaluation time necessary for remoted expressions, but [de]serialization is rarely a lightweight process). On Jan 29, 10:03 am,

Re: Alternatives to contains?

2009-01-29 Thread Kevin Downey
actually rhickey showed up on irc and pointed something out: 15:23 rhickey : user=> (.contains [1 2 3] 2) 15:23 rhickey : true 15:23 rhickey : user=> (.contains '(1 2 3) 2) 15:23 rhickey : true 15:23 rhickey : what contains debate? :) so because seqs, vectors, etc are java collect

Re: Alternatives to contains?

2009-01-29 Thread Jason Wolfe
> In that case, it makes me think of the degenerate example (I realize > this is slightly stupid): > > (some #{false} (list false)) Maybe this is an argument for adding "any?" to the list of core functions? -Jason --~--~-~--~~~---~--~~ You received this message be

Re: Got a Clojure library?

2009-01-29 Thread Mark McGranaghan
My name: Mark McGranaghan Lib name: Ring Home page: http://github.com/mmcgrana/ring Category: Web License: MIT Description: A Clojure web application library inspired by Python's WSGI and Ruby's Rack; abstracts the details of HTTP into a simple, unified API and enables web application components

Re: Alternatives to contains?

2009-01-29 Thread Paul Mooser
I understand that sets or hash maps are more efficient structures for lookups. However, in certain cases (especially if I'm programming something interactively), I have either short lists or data which is naturally a list that will be faster to walk through than to convert it to a set (which impli

Re: Alternatives to contains?

2009-01-29 Thread Paul Mooser
Additionally, I initially found (some #{:y} [:x :y :z]) to be confusing. The documentation of "some" (and or, in turn) uses the phrase "logical true" - I initially assumed this to mean actually true, but I suppose what it means is "not false or nil". In that case, it makes me think of the degener

Re: Alternatives to contains?

2009-01-29 Thread Achim Passen
Hi! Am 29.01.2009 um 23:52 schrieb Mark Volkmann: > I'd like for that to be moved to core so I don't have to load it ... > which is also verbose for something that is commonly needed. "includes?" being commonly needed might indicate that people really should be using sets instead of lists or v

RFC: new clojure.set functions

2009-01-29 Thread Jason Wolfe
I've posted code for faster, multi-argument clojure.set functions here: http://paste.lisp.org/display/74534 Basic algorithms: intersection: start with smallest set, and remove elements from it that aren't in each other set (always iterate through result-in-progress, which w

Re: Alternatives to contains?

2009-01-29 Thread Paul Mooser
Well, sorry for bringing it up again, but the reason I did so is I find the name uncommonly confusing, especially considering how good the names in clojure are in general. I know not everything can be clear without reading the documentation, but it was only clear to me that contains? was not what

Re: Alternatives to contains?

2009-01-29 Thread Paul Mooser
Well, sorry for bringing it up again, but the reason I did so is that uncommonly confusing because of the name, especially considering how good the names in clojure are in general. I know not everything can be clear without reading the documentation, but it was only clear to me that contains? was

Re: Alternatives to contains?

2009-01-29 Thread Mark Volkmann
On Thu, Jan 29, 2009 at 5:03 PM, Mark Engelberg wrote: > > On Thu, Jan 29, 2009 at 2:52 PM, Mark Volkmann > wrote: >>> What is the drawback of the (some #{:y} [:x :y :z]) idiom? Is it too >>> verbose? Too slow? Too flexible? Too good a re-use of existing >>> functionality? Too helpful in op

Re: Alternatives to contains?

2009-01-29 Thread Mark Engelberg
On Thu, Jan 29, 2009 at 2:52 PM, Mark Volkmann wrote: >> What is the drawback of the (some #{:y} [:x :y :z]) idiom? Is it too >> verbose? Too slow? Too flexible? Too good a re-use of existing >> functionality? Too helpful in opening ones eyes to the possibilities >> of sets and higher order

Re: Got a Clojure library?

2009-01-29 Thread Mark Engelberg
Author: Mark Engelberg License: Public Domain Dependencies: None Category: Math clojure.contrib.math Common math functions for Clojure's numeric tower. clojure.contrib.combinatorics Efficient, functional implementations of common combinatorial functions such as permutations, combinations, and m

Re: Alternatives to contains?

2009-01-29 Thread Mark Volkmann
On Thu, Jan 29, 2009 at 4:48 PM, Chouser wrote: > > On Thu, Jan 29, 2009 at 5:32 PM, Dan Larkin wrote: >> >> On Jan 29, 2009, at 5:23 PM, Cosmin Stejerean wrote: >>> >>> If in? was to be added how would it behave when given a map as the >>> first argument? I would rather have "contains?" do the

Re: Alternatives to contains?

2009-01-29 Thread Chouser
On Thu, Jan 29, 2009 at 5:32 PM, Dan Larkin wrote: > > On Jan 29, 2009, at 5:23 PM, Cosmin Stejerean wrote: >> >> If in? was to be added how would it behave when given a map as the >> first argument? I would rather have "contains?" do the right thing >> for list/vectors/sets and keep its current

Re: Alternatives to contains?

2009-01-29 Thread Dan Larkin
On Jan 29, 2009, at 5:23 PM, Cosmin Stejerean wrote: > > If in? was to be added how would it behave when given a map as the > first argument? I would rather have "contains?" do the right thing > for list/vectors/sets and keep its current behavior for maps. If we > do actually need a functio

Re: Alternatives to contains?

2009-01-29 Thread Cosmin Stejerean
On Thu, Jan 29, 2009 at 3:56 PM, Dan Larkin wrote: > > On Jan 29, 2009, at 2:55 PM, Cosmin Stejerean wrote: > > > > On Thu, Jan 29, 2009 at 1:06 PM, Paul Mooser wrote: > >> >> I know this has been discussed on the list before to some extent, but >> does clojure by default have any operations whi

Re: Alternatives to contains?

2009-01-29 Thread Dan Larkin
On Jan 29, 2009, at 2:55 PM, Cosmin Stejerean wrote: > > > On Thu, Jan 29, 2009 at 1:06 PM, Paul Mooser > wrote: > > I know this has been discussed on the list before to some extent, but > does clojure by default have any operations which actually do what > "contains?" sounds like it would do,

Re: Got a Clojure library?

2009-01-29 Thread Laurent PETIT
Library Name: clojure-dev URL: http://code.google.com/p/clojure-dev/ Authors names: Casey Marshall, Laurent Petit Category : IDE, editor License: EPL Description: *clojure-dev* is an integrated development environment (IDE) for the Clojure programming language, bui

Re: Got a Clojure library?

2009-01-29 Thread James Reeves
Name: Compojure URL: http://github.com/weavejester/compojure Author: James Reeves Categories: web License: EPL Dependencies: clojure.contrib, a Java servlet container (e.g. Jetty) Description: Compojure is a web framework that emphasizes a thin I/O layer and a functio

Re: Got a Clojure library?

2009-01-29 Thread Konrad Hinsen
On 29.01.2009, at 16:04, Rich Hickey wrote: > I'd like to try to get a directory of Clojure libs together and up on > the Clojure site. Towards that end, I'd appreciate it, if you are the > author of a Clojure library (including contrib authors!), you reply in > this thread with: ... Name: clo

Re: possible compiler bug

2009-01-29 Thread Christian Vest Hansen
On Thu, Jan 29, 2009 at 12:44 PM, seertaak wrote: > > Hello, > > After a recent discussion on proggit in which I complained that java > interop in clojure was deficient because you couldn't create > subclasses of abstract classes without resorting to java, and was > subsequently alerted to the ex

Re: Alternatives to contains?

2009-01-29 Thread Cosmin Stejerean
On Thu, Jan 29, 2009 at 1:06 PM, Paul Mooser wrote: > > I know this has been discussed on the list before to some extent, but > does clojure by default have any operations which actually do what > "contains?" sounds like it would do, for all collections? I know that > you can easily write somethi

Alternatives to contains?

2009-01-29 Thread Paul Mooser
I know this has been discussed on the list before to some extent, but does clojure by default have any operations which actually do what "contains?" sounds like it would do, for all collections? I know that you can easily write something similar using "some", but often times you just want to find

Re: clojure.contrib.command-line patch: multiple option format

2009-01-29 Thread Perry Trolard
Patch attached to issue at http://code.google.com/p/clojure-contrib/issues/detail?id=24 On Jan 28, 7:55 pm, Chouser wrote: > Please make the 'justify' fn (whatever you want to call it) private > for now so that it doesn't become another API to be maintained.  If it > proves to be more gener

Re: Simple Examples of Concurrency?

2009-01-29 Thread Michael Harrison (goodmike)
I'll be presenting at the meeting as well. I'm hammering out an illustration of a solution (not my own) to the Dining Philosopher's problem, as suggested by Blaine, in Clojure using refs and agents. Everyone in the DC area is welcome to attend: http://tinyurl.com/dc-clojure-meeting. mh On Jan 2

Re: Bug with clojure.set/intersection, clojure.set/difference etc.

2009-01-29 Thread Meikel Brandmeyer
Hi, Am 29.01.2009 um 15:42 schrieb ntu...@googlemail.com: If its left argument is nil, "intersection" throws a NPE (Clojure rev. 1235): The same is true for clojure.set/difference and everything else that uses clojure.disj with nil for the first parameter. IMHO, this is not a bug. nil is no

Re: Got a Clojure library?

2009-01-29 Thread listasantoniogarr...@gmail.com
clj-haml http://github.com/antoniogarrote/clj-haml/tree/master Antonio Garrote Web LGPL A rough port of Haml HTML library to clojure On 29 ene, 16:04, Rich Hickey wrote: > People regularly post here about Clojure libraries they are working > on, and it is great to see the explosion of new libs f

Re: Got a Clojure library?

2009-01-29 Thread listasantoniogarr...@gmail.com
clj-haml http://github.com/antoniogarrote/clj-haml/tree/master Antonio Garrote web LGPL (whatever) A rough port of Haml for clojure On 29 ene, 16:04, Rich Hickey wrote: > People regularly post here about Clojure libraries they are working > on, and it is great to see the explosion of new libs fo

Re: Classloading again

2009-01-29 Thread Ferdinando Villa
Also, there is a pretty extensive description of the approach to modularity that Java plans to support in the next major release, in JSR-000277. Not necessarily fitting Clojure, but most likely close to what we'll have to deal with in the future. On Jan 29, 9:52 am, Rich Hickey wrote: > On Jan 2

Re: Got a Clojure library?

2009-01-29 Thread Meikel Brandmeyer
Hi, Name: VimClojure URL:http://kotka.de/projects/clojure/vimclojure.html Author: Meikel Brandmeyer Categories: editor, IDE License:MIT Description: A Clojure filetype plugin for Vim. It provides sophisticated syntax highlighting, indenting and other settings to make editing

Re: Bug with clojure.set/intersection, clojure.set/difference etc.

2009-01-29 Thread Jason Wolfe
I think this is not a bug in disj. disj takes a *set* and an element as input. nil is the empty seq, which is different from the empty set #{}. The fact that clojure.set functions work at all on things other than bona fide sets is, in Rich's words, "an implementation artifact and not a promise

Re: Simple Examples of Concurrency?

2009-01-29 Thread wubbie
again I don't know how *file* gets current dir value. Maybe some magic? -sun On Jan 29, 12:30 pm, Telman Yusupov wrote: > I had the same question, that was answered by typing this into REPL: > > user=> (doc *file*) > > Output: > > - > clojure.core/*file* > nil >   The p

Re: Got a Clojure library?

2009-01-29 Thread Chouser
My name is Chouser, and these are my libs. All are licensed under the EPL. == Category: OS integration == * clojure.contrib.command-line Parses command-line options according to your programs specifications. Provide --help output automatically. * clojure.contrib.shell-out Launch external progra

Re: Simple Examples of Concurrency?

2009-01-29 Thread Paul Barry
Keith, Are you planning on going to the DC Clojure Study Group on Saturday? Concurrency is the topic and I've got some good exercises planned for us to work on. Also be sure to read Ch 6 in Stuart's book. On Tue, Jan 27, 2009 at 3:06 AM, Keith Bennett wrote: > > All - > > I'm trying to wrap my

Re: proposal for shell-out: option to return articulated out, err, & exit code

2009-01-29 Thread Perry Trolard
Patch submitted to the issue tracker: http://code.google.com/p/clojure-contrib/issues/detail?id=23 Thanks, Perry --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email t

Re: Simple Examples of Concurrency?

2009-01-29 Thread Telman Yusupov
I had the same question, that was answered by typing this into REPL: user=> (doc *file*) Output: - clojure.core/*file* nil The path of the file being evaluated, as a String. Evaluates to nil when there is no file, eg. in the REPL. On Jan 29, 7:03 am, wubbie wrote

Re: Indy .NET programmers discover parentheses

2009-01-29 Thread Stuart Sierra
A few people have gotten Clojure to run on .NET using bridges like IKVM. Check the list archives for details. -S On Jan 29, 10:50 am, Shawn Hoover wrote: > Heartland Clojure Users, > > I'm giving a presentation on Clojure next month for the Indianapolis > ALT.NETgroup. The talk is aimed at .NET

Re: Got a Clojure library?

2009-01-29 Thread samppi
Name: fnparse URL: http://github.com/joshua-choi/fnparse Author: Joshua Choi Tags: parsing, rules Licens: EPL Dependencies: clojure-contrib Description: fnparse is a library for creating functional parsers in the Clojure programming language. It presents an easy, functional way to create parsers f

Re: Common Lisp format function is now fully* CL-compatible

2009-01-29 Thread Tom Faulhaber
Thanks for the kind words, I hope you all find it useful. I'd be happy to add it to clojure.contrib if folks thinks that's a good idea. I don't exactly know who's the gatekeeper there. I know I'd need to do a CA first, which is fine with me (I think; I haven't actually read it yet). On Jan 29, 3

Re: Got a Clojure library?

2009-01-29 Thread Tom Faulhaber
Name: cl-format URL: http://github.com/tomfaulhaber/cl-format Author: Tom Faulhaber Tags: formatted output, pretty printing, Common Lisp compatibility License: EPL Dependencies: unit-test (@ http://github.com/tomfaulhaber/unit-test) for running the tests only Description: A fully functional implem

Re: Classloading again

2009-01-29 Thread Ferdinando Villa
Thanks much Rich. All your points are well taken, and OSGI and the like are clearly not designed with any support for dynamic compiled languages in mind. Having to live with that, here's the strategy that works for us. Our support for Clojure is based on Clojure bindings provided with each bundle

Re: zipper: missing down-right

2009-01-29 Thread Christophe Grand
Rather than 'down-right, I now prefer 'rightmost (first you go down then you go to the rightmost child): (defn rightmost "Returns the loc of the rightmost sibling of the node at this loc, or self" [loc] (let [[node {l :l r :r :as path}] loc] (when (and path r) (with-meta

Re: Loading two namespaces that :use each other.

2009-01-29 Thread Paul Stadig
I've run into some similar problems, but what I did was to just create a third namespace that contained the common core functionality. Could you, or have you tried something like that? Aside from that you could maybe try to do something in the body of your file (instead of the ns form) to deal wi

bug in clojure.zip

2009-01-29 Thread Christophe Grand
user=> (require '[clojure.zip :as zip]) user=> (-> '((1 2) 3) zip/seq-zip zip/next zip/next zip/next zip/node) 2 user=> (-> '((1 2) 3) zip/seq-zip zip/next zip/next zip/next zip/next zip/node) 3 user=> (-> '((1 2) 3) zip/seq-zip zip/next zip/next zip/next zip/next zip/remove zip/node) (1 2) whe

Re: IntelliJ Plugin Pre-Alpha 0.03 Available

2009-01-29 Thread Ilya Sergey
Hi, Keith. Last version IntelliJ IDEA EAP may be downloaded from http://jetbrains.net/confluence/display/IDEADEV/Diana+EAP Kind regards, Ilya On Jan 28, 1:53 am, Keith Bennett wrote: > Where did you find build version 8.1, #9678?  I'm looking at their web > site, and all I see is version 8.01,

Re: clojure.contrib.sql and SQL Server = cast exceptions?

2009-01-29 Thread BrianS
Steve, Now that I am beginning to really investigate this cool part of the clojure-contrib library with SQL Server, I have hit the point where I would like to call parameterized stored procedures, which is why you said you changed the SQL command from a string to a vector. I was wondering if yo

Re: Got a Clojure library?

2009-01-29 Thread Dan Larkin
Name: clojure-json URL: http://github.com/danlarkin/clojure-json/ Author: Dan Larkin Tags: parsing, web, data-interchange License: BSD Dependencies: clojure-contrib (only for running tests) Description: A JSON encoder/decoder for clojure. Supports reading/writing from strings and files, pretty

Indy .NET programmers discover parentheses

2009-01-29 Thread Shawn Hoover
Heartland Clojure Users, I'm giving a presentation on Clojure next month for the Indianapolis ALT.NETgroup. The talk is aimed at .NET programmers, introducing Clojure and showing them why they might care. More description and meeting details: http://indyalt.net/cms/meeting/february-2009/clojure

Re: Distributed Clojure

2009-01-29 Thread hank williams
As has been discussed on this list before, it seems to me the basis for this should be terracotta, which handles much (most?) of the heavy lifiting required for this kind of task. Have you looked at it? On Thu, Jan 29, 2009 at 9:15 AM, Greg Harman wrote: > > One of Clojure's big selling points (

Re: Will Clojure work on AppEngine?

2009-01-29 Thread Rich Hickey
On Jan 27, 2:44 pm, Robin wrote: > Under a huge assumption that Google will soon announce a 'Java > compatible' runtime forAppEngine. Could Clojure work out of the > box? Would Clojure's dynamic generation of ASM/bytecode pose a > security problem for a generic sandboxed environment? If expe

Re: Bug? overflow check in Numbers.minus

2009-01-29 Thread Frantisek Sodomka
user=> (- Integer/MAX_VALUE Integer/MIN_VALUE) java.lang.ArithmeticException: integer overflow (NO_SOURCE_FILE:0) user=> (- Long/MAX_VALUE Long/MIN_VALUE) java.lang.ArithmeticException: integer overflow (NO_SOURCE_FILE:0) Is this behavior correct? Frantisek On Jan 10, 5:25 am, Chouser wrote:

Got a Clojure library?

2009-01-29 Thread Rich Hickey
People regularly post here about Clojure libraries they are working on, and it is great to see the explosion of new libs for Clojure! I'd like to try to get a directory of Clojure libs together and up on the Clojure site. Towards that end, I'd appreciate it, if you are the author of a Clojure lib

Re: Distributed Clojure

2009-01-29 Thread Konrad Hinsen
On Jan 29, 2009, at 15:15, Greg Harman wrote: > So, I've been mulling over the idea of putting together a framework > for distributed applications. I think it should deal with issues such > as: ... I think the very first step should be to implement the basics of distributed computing: - comm

Re: Classloading again

2009-01-29 Thread Rich Hickey
On Jan 28, 2009, at 10:27 AM, Ferdinando Villa wrote: > > Clojure is saving our life and enabling thing we would never have > dreamed of without in our ARIES project (http:// > ecoinformatics.uvm.edu/ > aries). Still, we need to hack RT in order to be able to use it. I've > seen some discussion

Bug with clojure.set/intersection, clojure.set/difference etc.

2009-01-29 Thread ntupel
If its left argument is nil, "intersection" throws a NPE (Clojure rev. 1235): user=> (set/intersection nil #{1}) java.lang.NullPointerException (NO_SOURCE_FILE:0) user=> (.printStackTrace *e) java.lang.NullPointerException (NO_SOURCE_FILE:0) at clojure.lang.Compiler.eval(Compiler.java:418

Re: test-is: generating and processing testing data

2009-01-29 Thread Frantisek Sodomka
Patch for testing sequences attached! ;-) Frantisek --~--~-~--~~~---~--~~ 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 from this group, send

Re: Ways of making a Clojure program?

2009-01-29 Thread Stuart Halloway
Hi Tim, The next revision of the book will include Section 3.3, "Calling Clojure from Java" which shows how to create a standalone Java application. The sample code is already checked in to github [1], and the relevant file is examples/tasklist.clj. Also, the lancet application [2] can now

Distributed Clojure

2009-01-29 Thread Greg Harman
One of Clojure's big selling points (obviously) is the support for concurrent programming. However, the performance gains you get with this concurrency hits a scalability wall once you're fully utilizing all the cores available in your server. The next step, of course, is to add additional servers

Re: Serializable

2009-01-29 Thread Rich Hickey
On Jan 29, 8:54 am, Jeffrey Straszheim wrote: > This might be documented somewhere, but I didn't notice. Are the built in > Clojure types (Lists, vectors, symbols, and so on) Java Serializable? Not yet. Could you create an enhancement issue for that, please? Thanks, Rich --~--~-~--

Serializable

2009-01-29 Thread Jeffrey Straszheim
This might be documented somewhere, but I didn't notice. Are the built in Clojure types (Lists, vectors, symbols, and so on) Java Serializable? I want to wrap them up in a binary data structure, and using the built in stuff would be easiest. Jeffrey --~--~-~--~~~---~-

Re: "incremental" (sort of) clojure compilation

2009-01-29 Thread Laurent PETIT
OK, so it seems that currently, the only "reliable" way for me is to "touch" the ns defining file. Do you agree with that conclusion ? 2009/1/29 Christophe Grand > > Laurent PETIT a écrit : > > I tried this, but it didn't seem to work : > > ; a/b/c.clj > > (ns a.b.c) > > (defn f [] :f) > > (lo

Re: Ways of making a Clojure program?

2009-01-29 Thread Greg Harman
Oh, to make sure I answered your direct questions: > increases. So the question is: what are the different ways that one > can run or package up a Clojure/Java program, so that it is invoked by > running a shell (or DOS cmd) script? Compile the clojure files (or not) and package them in a .jar.

Re: Ways of making a Clojure program?

2009-01-29 Thread Greg Harman
Hi Tim, The REPL is your tool for working with your program, debugging, tuning, etc. But it's not your primary source repository! You'll keep your source in a file hierarchy, organized by namespace (similar to a Java package, albeit with subtle differences). As you're working with the source, you

Re: Questions about a Clojure Datalog

2009-01-29 Thread Rich Hickey
On Jan 26, 11:44 pm, smanek wrote: > Hello all, > > I'm a Common Lisp programmer who has just started learning Clojure. I > saw it mentioned online that several members of the existing community > were looking for someone to build a datalog for Clojure: I was > wondering what exactly you had in

Re: Ways of making a Clojure program?

2009-01-29 Thread Stephen C. Gilardi
On Jan 29, 2009, at 8:03 AM, timc wrote: I'm struggling to understand exactly what form(s) a Clojure program can take. In particular, the empty section "The REPL and main entry points" on the clojure.org web site doesn't help. I'm sorry about that being empty. I'm on the hook for that and I'l

Ways of making a Clojure program?

2009-01-29 Thread timc
I'm struggling to understand exactly what form(s) a Clojure program can take. In particular, the empty section "The REPL and main entry points" on the clojure.org web site doesn't help. Obviously, interacting manually with the REPL is nice for learning the language, but this becomes tedious as th

Re: "incremental" (sort of) clojure compilation

2009-01-29 Thread Christophe Grand
Laurent PETIT a écrit : > I tried this, but it didn't seem to work : > ; a/b/c.clj > (ns a.b.c) > (defn f [] :f) > (load "c1") > > ;a/b/c1.clj > (in-ns 'a.b.c) > (defn g [] :g) > > ;in REPL > user=>(let [real-load clojure.core/load] > (binding [clojure.core/load (fn [f] (println "file loaded: "

Re: Simple Examples of Concurrency?

2009-01-29 Thread wubbie
Hello, As you see, java.io.File. construct takes path argument but it is the first line of code and I don't know how *file* gets value of current directory. #!/usr/bin/env clj (add-classpath (str "file://" (.getParent (java.io.File. *file*)) "/")) (ns mire (:use [mire commands player rooms]

possible compiler bug

2009-01-29 Thread seertaak
Hello, After a recent discussion on proggit in which I complained that java interop in clojure was deficient because you couldn't create subclasses of abstract classes without resorting to java, and was subsequently alerted to the existence of the 'proxy' form, I decided to give clojure another g

Re: Creating executable Jars?

2009-01-29 Thread Emeka
luciofulci I'm interested in your instruction, however, are c:\user\apps\classes and c:\user\classes the same thing? Emeka --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send

Re: Common Lisp format function is now fully* CL-compatible

2009-01-29 Thread Josip Gracin
Tom, great job!! On Thu, Jan 29, 2009 at 11:38 AM, Marko Kocić wrote: > Tom Faulhaber је написао: >> The cl-format library now implements the full* Common Lisp spec for >> format (* = with the exception of a couple of things used by the >> internals of the CL pretty printer). > > Any plans to in

Re: test-is: generating and processing testing data

2009-01-29 Thread Frantisek Sodomka
Thank you for explanation. I will use "is" for tests with messages. Otherwise, I am quite happy with "are" macro. It really helps with not repeating myself. I created 3 new issues and added 2 patches: http://code.google.com/p/clojure-contrib/issues/list Issue for sequences is to inform that I am

Re: Common Lisp format function is now fully* CL-compatible

2009-01-29 Thread Marko Kocić
Tom Faulhaber је написао: > The cl-format library now implements the full* Common Lisp spec for > format (* = with the exception of a couple of things used by the > internals of the CL pretty printer). Any plans to include it in clojre-contrib? --~--~-~--~~~---~--~--

Re: functional lazy shuffle

2009-01-29 Thread bOR_
Hmm. (time isn't that reliable here. my lazy-shuffle might be quite slow after all. On Jan 26, 10:46 pm, bOR_ wrote: > In addition to the functional shuffle thread (can't seem to post to > that one anymore, might be too old?), I've written alazy shuffle. Not > sure if it is the best way to write

Re: Common Lisp format function is now fully* CL-compatible

2009-01-29 Thread Adrian Cuthbertson
My compliments - this is a great addition to the clojure suite! On Thu, Jan 29, 2009 at 10:15 AM, Tom Faulhaber wrote: > > The cl-format library now implements the full* Common Lisp spec for > format (* = with the exception of a couple of things used by the > internals of the CL pretty printer).

Re: nested maps

2009-01-29 Thread Christian Vest Hansen
On Wed, Jan 28, 2009 at 10:31 PM, Vincent Foley wrote: > > (-> person :employer :address :city) would be my pick I tend to prefer this method as well. I find that doto and -> in general are excellent tools for picking apart and poking nested structures. > > Vincent > > On Jan 28, 4:02 pm, Mark

Common Lisp format function is now fully* CL-compatible

2009-01-29 Thread Tom Faulhaber
The cl-format library now implements the full* Common Lisp spec for format (* = with the exception of a couple of things used by the internals of the CL pretty printer). So if you prefer the Lisp style of formatting to the Java style, you should be good to go. cl-format is hosted on github at ht