Re: My SLIME installation diary

2009-02-13 Thread bOR_
That starter-kit sounds perhaps easier. I'll try the starter-kit. I want the install to be fairly easy, if I want to convince others at work to play with it :). On Feb 12, 6:35 pm, Phil Hagelberg wrote: > bOR_ writes: > >>> (push "/home/boris/.emacs.d" load-path) > >>This is actually already on

Idiomatic sub-hashmap

2009-02-13 Thread Adrian Cuthbertson
Hi, I have had need of a "sub" hash map function and implemented it as follows; (defn sub-hashmap "Return a sub map of hmap containing the specified keys." [hmap & ks] (reduce (fn [mm k] (assoc mm k (k hmap))) {} ks)) (sub-hashmap {:a 1 :b 2 :c 3} :a :c) ;=> {:c 3, :a 1} Is there a similar ex

Re: Questions about the Enlive template library

2009-02-13 Thread Christophe Grand
Hi Tom, Tom Hickey a écrit : > Snippets > I think what you have suggested for snippets sounds perfect. > I added defsnippet and defsnippets. > Setting content & escaping > Thanks you for explaining the cases here. Having a better idea of what > to expect will help in testing further. (I'm s

Re: Idiomatic sub-hashmap

2009-02-13 Thread Timothy Pratley
Yup: select-keys user=> (select-keys {:a 1 :b 2 :c 3} [:a :c]) {:c 3, :a 1} Regards, Tim. On Feb 13, 8:01 pm, Adrian Cuthbertson wrote: > Hi, > > I have had need of a "sub" hash map function and implemented it as follows; > > (defn sub-hashmap > "Return a sub map of hmap containing the specifi

Re: Idiomatic sub-hashmap

2009-02-13 Thread Adrian Cuthbertson
Thanks! On Fri, Feb 13, 2009 at 1:28 PM, Timothy Pratley wrote: > > Yup: select-keys > > user=> (select-keys {:a 1 :b 2 :c 3} [:a :c]) > {:c 3, :a 1} > > Regards, > Tim. > > On Feb 13, 8:01 pm, Adrian Cuthbertson > wrote: >> Hi, >> >> I have had need of a "sub" hash map function and implemented

with-local-vars vs. let

2009-02-13 Thread Mark Volkmann
What are some reasons to use with-local-vars instead of let or binding? -- R. Mark Volkmann Object Computing, Inc. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email

loop [#^Integer c 0] vs. loop [c (int 0)] and optimization question...

2009-02-13 Thread Dimiter "malkia" Stanev
Hi guys, I'm optimizing a little benchmark called pnpoly, and I was wondering what is the proper way of hinting the compiler for types. In certain cases Clojure accepts for example loop [#^Integer c 0] and in others loop [c (int 0)] - I'm really trying to hint the compiler as best as I can. I'm

Re: with-local-vars vs. let

2009-02-13 Thread Konrad Hinsen
On Feb 13, 2009, at 13:31, Mark Volkmann wrote: > What are some reasons to use with-local-vars instead of let or > binding? Let just creates bindings for a lexical scope. They cannot be modified at all. Binding and with-local-vars deal with vars, i.e. mutable references. Binding creates a

Re: loop [#^Integer c 0] vs. loop [c (int 0)] and optimization question...

2009-02-13 Thread Laurent PETIT
Hello, I can't manage to get the code from the URL (server timeout) 2009/2/12 Dimiter malkia Stanev > > Hi guys, > > I'm optimizing a little benchmark called pnpoly, and I was wondering > what is the proper way of hinting the compiler for types. In certain > cases Clojure accepts for example lo

Re: loop [#^Integer c 0] vs. loop [c (int 0)] and optimization question...

2009-02-13 Thread Vincent Foley
Dimiter, The latest revision of Clojure is r1278; are you using the Google code trunk? Vincent On Feb 12, 5:35 pm, "Dimiter \"malkia\" Stanev" wrote: > Hi guys, > > I'm optimizing a little benchmark called pnpoly, and I was wondering > what is the proper way of hinting the compiler for types.

Re: Lazy graph walk

2009-02-13 Thread Jeffrey Straszheim
That looks like it should work. This may be one of the cases where using a mutable structure behind the scenes is the right thing to do. On Thu, Feb 12, 2009 at 10:45 PM, Jason Wolfe wrote: > I'm not sure if I fully understand what you want, but I find this sort of > thing is often cleanest usi

Re: loop [#^Integer c 0] vs. loop [c (int 0)] and optimization question...

2009-02-13 Thread Rich Hickey
On Feb 12, 2009, at 5:35 PM, Dimiter malkia Stanev wrote: > > Hi guys, > > I'm optimizing a little benchmark called pnpoly, and I was wondering > what is the proper way of hinting the compiler for types. In certain > cases Clojure accepts for example loop [#^Integer c 0] and in others > loop [c

Re: generated class with overloaded methods

2009-02-13 Thread Christophe Grand
Laurent PETIT a écrit : > Hello, > > Thanks for having shared that, > > Do you know if there's a way to overload methods with the same arity, > then ? > > I'm thinking about .read(char ) .read(byte ) .read(String ) > .read(Integer ) ... for example, ? Create functions named -read-char -read-byt

Re: loop [#^Integer c 0] vs. loop [c (int 0)] and optimization question...

2009-02-13 Thread Rich Hickey
On Feb 13, 8:41 am, Rich Hickey wrote: > On Feb 12, 2009, at 5:35 PM, Dimiter malkia Stanev wrote: > > > > > > > Hi guys, > > > I'm optimizing a little benchmark called pnpoly, and I was wondering > > what is the proper way of hinting the compiler for types. In certain > > cases Clojure accepts

Re: generated class with overloaded methods

2009-02-13 Thread Laurent PETIT
2009/2/13 Christophe Grand > > Laurent PETIT a écrit : > > Hello, > > > > Thanks for having shared that, > > > > Do you know if there's a way to overload methods with the same arity, > > then ? > > > > I'm thinking about .read(char ) .read(byte ) .read(String ) > > .read(Integer ) ... for example

Re: Issue request: RT.load's "don't load if already loaded" mechanism breaks ":reload-all"

2009-02-13 Thread Stephen C. Gilardi
Rich, May I please enter an issue to track the defect that require/use's ":reload-all" flag is not working properly in Clojure. --Steve On Feb 11, 2009, at 8:01 AM, Stephen C. Gilardi wrote: On Feb 6, 2009, at 8:45 AM, Laurent PETIT wrote: Hello, Does it also mean that the following us

Re: Reflection warnings starting at r1265

2009-02-13 Thread Vincent Foley
Should I add this to the list of issues in the Google Code tracker? Vincent. On Feb 12, 4:15 pm, Vincent Foley wrote: > Hello, > > I was surprised today to see that my Starcraft replay program became > slower when I updated my Clojure working copy.  About a week ago, > Chouser helped me adding

Re: generated class with overloaded methods

2009-02-13 Thread Craig McDaniel
I just tried it out to be sure. Overloaded methods with the same arity work as expected. Clojure picks the right method to call via reflection. package expmeth; public class ClassA { public void hello() { System.err.println("hello from Java!"); } public void hello(int x) {

Re: with-local-vars vs. let

2009-02-13 Thread Adrian Cuthbertson
Have a look at compojure - a good example of with-local-vars is where a servlet request is executed. Each (get, post) request occurs in its entirety on a single (jetty or tomcat) thread. The compojure call to the application service function binds the http headers, servlet request parameters, etc,

Re: generated class with overloaded methods

2009-02-13 Thread Christophe Grand
Laurent PETIT a écrit : > 2009/2/13 Christophe Grand > > > > Laurent PETIT a écrit : > > Hello, > > > > Thanks for having shared that, > > > > Do you know if there's a way to overload methods with the same > arity, > > then ? > > >

Re: generated class with overloaded methods

2009-02-13 Thread Laurent PETIT
??? 2009/2/13 Craig McDaniel > > I just tried it out to be sure. Overloaded methods with the same arity > work as expected. Clojure picks the right method to call via > reflection. > > package expmeth; > public class ClassA { >public void hello() { >System.err.println("hello from Jav

Re: generated class with overloaded methods

2009-02-13 Thread Craig McDaniel
Christophe, you're right. I tried it and that method also works. I didn't know about that secret feature. (ns expmeth.TestMe (:gen-class :extends expmeth.ClassA :exposes-methods {hello helloSuper})) (defn -hello [this] (.helloSuper this) (println "hello from clojure!")) (defn

Re: generated class with overloaded methods

2009-02-13 Thread Laurent PETIT
Thanks Christophe, that's the answer I was hoping to get, If I was twenty years younger, I would just say Clojure roxxXXooRR :-) (well, I think this is supposed to say that clojure is really cool, hope I didn't misunderstood the rooxxXXooRR "thing" :-) -- Laurent 2009/2/13 Christophe Grand >

Re: Reflection warnings starting at r1265

2009-02-13 Thread Rich Hickey
On Feb 13, 9:06 am, Vincent Foley wrote: > Should I add this to the list of issues in the Google Code tracker? > No. Those hints were suspect to begin with. .get returns a byte already, and .getShort a short, so those hints shouldn't do anything useful. Similarly, coercing to primitive on re

Re: generated class with overloaded methods

2009-02-13 Thread Laurent PETIT
Hello , Your example code below is not complete (where's helloSuper definition ?), but I think it does not answer my specific question ? Anyway, it seems that Christophe found the answer. But I don't know if we should use this knowledge, since it is not exposed as an API ? -- Laurent 2009/2/1

Re: Issue request: RT.load's "don't load if already loaded" mechanism breaks ":reload-all"

2009-02-13 Thread Rich Hickey
On Feb 13, 9:04 am, "Stephen C. Gilardi" wrote: > Rich, > > May I please enter an issue to track the defect that require/use's > ":reload-all" flag is not working properly in Clojure. > How does this interact with: http://code.google.com/p/clojure/issues/detail?id=3 Rich --~--~-~--

Re: loop [#^Integer c 0] vs. loop [c (int 0)] and optimization question...

2009-02-13 Thread Dimiter "malkia" Stanev
On Feb 13, 5:35 am, Vincent Foley wrote: > Dimiter, > > The latest revision of Clojure is r1278; are you using the Google code > trunk? > > Vincent Thanks, Vincent! I kept wondering why I don't see any more versions, I was till on the sourceforge one. --~--~-~--~~~---

Re: Reflection warnings starting at r1265

2009-02-13 Thread Vincent Foley
Thanks Rich! On Feb 13, 10:01 am, Rich Hickey wrote: > On Feb 13, 9:06 am, Vincent Foley wrote: > > > Should I add this to the list of issues in the Google Code tracker? > > No. Those hints were suspect to begin with. > > .get returns a byte already, and .getShort a short, so those hints > shou

Re: with-local-vars vs. let

2009-02-13 Thread Konrad Hinsen
On Feb 13, 2009, at 15:35, Adrian Cuthbertson wrote: > Have a look at compojure - a good example of with-local-vars is where > a servlet request is executed. Each (get, post) request occurs in its > entirety on a single (jetty or tomcat) thread. The compojure call to > the application service fun

Re: generated class with overloaded methods

2009-02-13 Thread Craig McDaniel
On Feb 13, 9:59 am, Laurent PETIT wrote: > Your example code below is not complete (where's helloSuper definition ?), Yes, it is complete. See :exposes-methods under (doc gen-class). "helloSuper" is the exposed name for the hello method in the superclass. Clojure creates that method for you. -C

Re: generated class with overloaded methods

2009-02-13 Thread Laurent PETIT
Didn't know, thank you again for this knowledge, -- laurent 2009/2/13 Craig McDaniel > > On Feb 13, 9:59 am, Laurent PETIT wrote: > > Your example code below is not complete (where's helloSuper definition > ?), > > Yes, it is complete. See :exposes-methods under (doc gen-class). > "helloSuper

Re: generated class with overloaded methods

2009-02-13 Thread Craig McDaniel
Both my method (multi-arity) and Christophe's method (overridden method names contain arguments) do work. I tested them both with the code posted. -Craig --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" grou

Re: generated class with overloaded methods

2009-02-13 Thread Laurent PETIT
Yes, but please note that Christophe's method also solves the problem of defining overloaded methods with different java signatures, but still same name and same arity. I still can't see how your proposed method solves this particular problem ? Regards, -- Laurent 2009/2/13 Craig McDaniel >

Re: bug + patch: lazy branch take-while is broken

2009-02-13 Thread Rich Hickey
On Feb 12, 10:20 pm, Chouser wrote: > There's a misplaced paren in take-while in the lazy branch. Patch attached. > > --Chouser > Fixed in SVN 1280 - thanks for the report. Rich --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

Syslog

2009-02-13 Thread jim
Has anyone done logging using syslog from clojure or java? Thanks --~--~-~--~~~---~--~~ 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 thi

Re: A stupid beginners question about Compile

2009-02-13 Thread Mark Volkmann
On Thu, Feb 12, 2009 at 5:09 PM, Laurent PETIT wrote: > In a nutshell (not tested, but nothing should miss, just typos if it doesn't > work) : > > mkdir test-compile > cd test-compile > mkdir classes > mkdir src > mkdir src/echo > echo "(ns echo.test) (defn echo [msg] msg)" > src/echo/test.clj >

Re: Issue request: RT.load's "don't load if already loaded" mechanism breaks ":reload-all"

2009-02-13 Thread Stephen C. Gilardi
On Feb 13, 2009, at 10:12 AM, Rich Hickey wrote: On Feb 13, 9:04 am, "Stephen C. Gilardi" wrote: Rich, May I please enter an issue to track the defect that require/use's ":reload-all" flag is not working properly in Clojure. How does this interact with: http://code.google.com/p/clojure/is

Re: A stupid beginners question about Compile

2009-02-13 Thread Laurent PETIT
2009/2/13 Mark Volkmann > > On Thu, Feb 12, 2009 at 5:09 PM, Laurent PETIT > wrote: > > In a nutshell (not tested, but nothing should miss, just typos if it > doesn't > > work) : > > > > mkdir test-compile > > cd test-compile > > mkdir classes > > mkdir src > > mkdir src/echo > > echo "(ns echo.

Re: A stupid beginners question about Compile

2009-02-13 Thread Mark Volkmann
On Fri, Feb 13, 2009 at 10:18 AM, Laurent PETIT wrote: > 2009/2/13 Mark Volkmann >> >> On Thu, Feb 12, 2009 at 5:09 PM, Laurent PETIT >> wrote: >> > In a nutshell (not tested, but nothing should miss, just typos if it >> > doesn't >> > work) : >> > >> > mkdir test-compile >> > cd test-compile >

Re: A stupid beginners question about Compile

2009-02-13 Thread Laurent PETIT
That's really a matter of conventions. Both work, and you just have to correctly adjust the call to load : 1st layout : src/echo/test.clj src/echo/test/test-part2.clj Then you'll have (ns echo.test (:load "test/test-part2") in src/echo/test.clj 2d layout: src/echo/test.clj src/echo/test-part2.cl

Re: Syslog

2009-02-13 Thread Luc Prefontaine
We use apache common logging and log4j to do all our logging from both Clojure and java components. You can use the SyslogAppender iof log4j to log to syslog. To get log4j configured we use Spring but you could use the -Dlog4j.configuration= when starting Clojure to load a log4j configuration. Tha

Re: with-local-vars vs. let

2009-02-13 Thread Adrian Cuthbertson
> What I see in your example is binding, but I don't see with-local- > vars anywhere. Or did I misunderstand something? Sorry, I checked the compojure source again and the servlet headers, cookies, etc are wrapped in a "with-servlet-vars" macro (rather than with-local-vars) which just uses let. T

Re: generated class with overloaded methods

2009-02-13 Thread Craig McDaniel
I guess I don't understand. In the Clojure code below, the double arity method does in fact override all three of the methods from the superclass (two of which have the same name and same arity). Isn't that what you're looking for? Try it out. |-- build.xml |-- go.clj |-- src | `-- expmeth |

Re: Syslog

2009-02-13 Thread jim
Thanks Luc Prefontaine wrote: > We use apache common logging and log4j to do all our logging from both > Clojure and java components. > You can use the SyslogAppender iof log4j to log to syslog. > > To get log4j configured we use Spring but you could use the > -Dlog4j.configuration= when starting

Re: A stupid beginners question about Compile

2009-02-13 Thread Mark Volkmann
On Fri, Feb 13, 2009 at 10:29 AM, Laurent PETIT wrote: > That's really a matter of conventions. Both work, and you just have to > correctly adjust the call to load : > > 1st layout : > src/echo/test.clj > src/echo/test/test-part2.clj > > Then you'll have (ns echo.test (:load "test/test-part2") in

Re: generated class with overloaded methods

2009-02-13 Thread Laurent PETIT
Hello, The code you provided works well. But still, I insist, it has nothing to do with how to solve the problem of how one can overload methods with same name, same arity, but different types in the signature. You only demonstrated that clojure handles well the dispatching of method calls based

calling Clojure functions from Java

2009-02-13 Thread Mark Volkmann
Can someone point me to documentation on how to invoke Clojure functions from Java? -- R. Mark Volkmann Object Computing, Inc. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group,

Useful memory profiling tool

2009-02-13 Thread levand
Determining exactly how much memory objects are using is often desirable, especially since one of Clojure's few flaws (which is the JVM's fault, mostly) is that it can be fairly memory-hungry. So, I took the techniques described in http://www.javaworld.com/javaworld/javatips/jw-javatip130.html,

Re: calling Clojure functions from Java

2009-02-13 Thread Laurent PETIT
http://en.wikibooks.org/wiki/Clojure_Programming/Tutorials_and_Tips#Invoking_Clojure_from_Java 2009/2/13 Mark Volkmann > > Can someone point me to documentation on how to invoke Clojure > functions from Java? > > -- > R. Mark Volkmann > Object Computing, Inc. > > > > --~--~-~--~~---

Re: More Swing Examples

2009-02-13 Thread Emeka
http://clojure.googlegroups.com/web/2c-calculator.clj?gda=GfxNgEMAAAC2LrkjeC7f10uHiY7GOiyxomoTIbx5E_ZvCUIqi7LhkTsFONunm7BW3wPdbl53QhAytiJ-HdGYYcPi_09pl8N7FWLveOaWjzbYnpnkpmxcWg http://www.plt1.com/1070/even-smaller-snake/ --~--~-~--~~~---~--~~ You received this mes

Re: A stupid beginners question about Compile

2009-02-13 Thread Stephen C. Gilardi
I wonder what the rationale was for making it so namespaces need to be quoted when using in-ns. They don't need to be quoted when using ns. For example, I have (ns com.ociweb.talk (:gen-class)) in one file and (in-ns 'com.ociweb.talk) in another. I guess this is because it's conceivable one mi

Re: A stupid beginners question about Compile

2009-02-13 Thread Laurent PETIT
2009/2/13 Stephen C. Gilardi > I wonder what the rationale was for making it so namespaces need to be >> quoted when using in-ns. They don't need to be quoted when using ns. >> For example, I have >> >> (ns com.ociweb.talk (:gen-class)) in one file >> >> and >> >> (in-ns 'com.ociweb.talk) in ano

Re: calling Clojure functions from Java

2009-02-13 Thread Mark Volkmann
On Fri, Feb 13, 2009 at 11:19 AM, Laurent PETIT wrote: > http://en.wikibooks.org/wiki/Clojure_Programming/Tutorials_and_Tips#Invoking_Clojure_from_Java > > 2009/2/13 Mark Volkmann >> >> Can someone point me to documentation on how to invoke Clojure >> functions from Java? Thanks! That's interes

Re: A stupid beginners question about Compile

2009-02-13 Thread Stephen C. Gilardi
On Feb 13, 2009, at 12:28 PM, Laurent PETIT wrote: Yes, and the prefix list convenience would also solve Stephen's problem with the violation of the DRY principle in this area :-) Exactly! --Steve smime.p7s Description: S/MIME cryptographic signature

Re: Questions about the Enlive template library

2009-02-13 Thread Tom Hickey
Hi Christophe, I was not on the latest version (and I now know that the "download" button on github does not necessarily give you the latest!). I am now seeing the differences in output on descendent updates. I understand about only one rule being applied, and the warning definitely helps to see

Re: generated class with overloaded methods

2009-02-13 Thread Craig McDaniel
OK, I understand. When you want separate Clojure functions that execute different code for same arity/different signature case, you must use the method demonstrated by Christophe. The code I showed was only useful when you don't care about the type. You could use the multi-arity function and manua

eliminating uses of nil punning

2009-02-13 Thread Chouser
In the lazy branch, empty sequences don't always evaluate as false in a boolean context. Tracking down places you've made this assumption can be hard. Attached is a patch that helps by providing a flag, assert-if-lazy-seq. When this flag is on, 'if' is replaced with a new (slower) version that t

Re: calling Clojure functions from Java

2009-02-13 Thread Chas Emerick
Mark, If you use the #^{:static true} metadata on a :methods definition in a gen-class spec for your class' implementing namespace, then those fns appear as static functions in the generated Java class: Clojure: (ns bar.Foo (:gen-class :methods [#^{:static true} [stringLength [Strin

Re: calling Clojure functions from Java

2009-02-13 Thread Matt Revelle
Mark, In case you were asking how to call a Clojure function from Java without wrapping it, check out clojure.lang.IFn and AFn. For example, say you prefer to write a class in Java but need to accept a Clojure fn as an argument in one of the class methods: public int callFromClojure(IFn clo

cljc?

2009-02-13 Thread Mark Volkmann
Is there a reason why it would be inadvisable or particularly difficult to create a "cljc" script, short for "Clojure compile", that would take a path to a Clojure source file and compile it to .class files? It seems tedious to have to add ":gen-class" to the source file, start a REPL, and enter a

Re: cljc?

2009-02-13 Thread Stephen C. Gilardi
On Feb 13, 2009, at 3:47 PM, Mark Volkmann wrote: Is there a reason why it would be inadvisable or particularly difficult to create a "cljc" script, short for "Clojure compile", that would take a path to a Clojure source file and compile it to .class files? It seems tedious to have to add ":gen

Re: cljc?

2009-02-13 Thread Mark Volkmann
On Fri, Feb 13, 2009 at 3:00 PM, Stephen C. Gilardi wrote: > > On Feb 13, 2009, at 3:47 PM, Mark Volkmann wrote: > > Is there a reason why it would be inadvisable or particularly > difficult to create a "cljc" script, short for "Clojure compile", that > would take a path to a Clojure source file

Re: cljc?

2009-02-13 Thread chris
It would perhaps be a lot more inefficient. >From what I can understand, clojure loads the namespace in question and the actual command to the compiler is "write this namespace to here". It checks symbols from other modules and does a very light sort of link step. This requires knowledge of oth

Re: A Clojure documentation browser

2009-02-13 Thread Craig Andera
> Please consider whether or not you'd like to send in a Contributor Agreement > to enable that. If you hurry you could become the first registered Clojure > contributor whose last name begins with A. :-) (clojure.org/contributing) OK, I've added the things I want to add, and sent in the agreemen

Re: My SLIME installation diary

2009-02-13 Thread David
I have a small problem with clojure-mode in your setup. Since clojure-mode is autoloaded, it, and SLIME, aren't available until I load a '.clj' file. Starting SLIME, though, doesn't add the SLIME menu to the previously loaded '.clj' buffer (Newly loaded files get the menu, as they should). Thank

Re: My SLIME installation diary

2009-02-13 Thread Phil Hagelberg
David writes: > I have a small problem with clojure-mode in your setup. > > Since clojure-mode is autoloaded, it, and SLIME, aren't available > until I load a '.clj' file. > Starting SLIME, though, doesn't add the SLIME menu to the previously > loaded '.clj' buffer > (Newly loaded files get the

Re: cljc?

2009-02-13 Thread Stephen C. Gilardi
On Feb 13, 2009, at 4:10 PM, Mark Volkmann wrote: As far as I know, the classpath only needs clojure.jar, the src directory and the classes directory. Here's an idea. The locations of those could be command-line arguments to the cljc script. They could default to simply "src" and "classes" rela

run clojure on 5,832 cores?

2009-02-13 Thread Raoul Duke
http://sicortex.com/products --~--~-~--~~~---~--~~ 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 email to clojure+unsub

Re: run clojure on 5,832 cores?

2009-02-13 Thread Christian Vest Hansen
I see no mention of a JVM being available for those CPUs, but perhaps the no-asm HotSpot can be build with gcc on it. Otherwise, cool gear :) On Fri, Feb 13, 2009 at 11:47 PM, Raoul Duke wrote: > > http://sicortex.com/products > > > > -- Venlig hilsen / Kind regards, Christian Vest Hansen.

Re: A Clojure documentation browser

2009-02-13 Thread Stephen C. Gilardi
Hi Craig, On Feb 13, 2009, at 4:21 PM, Craig Andera wrote: OK, I've added the things I want to add, and sent in the agreement, which will probably make it to Rich next week. The code is on github [1] - if you want it somewhere else, let me know. I assume someone other than me will be committing

Re: run clojure on 5,832 cores?

2009-02-13 Thread Stuart Sierra
On Feb 13, 6:13 pm, Christian Vest Hansen wrote: > I see no mention of a JVM being available for those CPUs, but perhaps > the no-asm HotSpot can be build with gcc on it. Looks like they run Linux, so it would probably be possible. This article

New mod code is breaking the contrib unit tests

2009-02-13 Thread Jeffrey Straszheim
I just updated, and the unit tests for mod are breaking. It looks like the new mod only works for ints. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@go

how to emulate lisp's labels functionality?

2009-02-13 Thread wubbie
Hi, do we have labels equiv. in clojure? The code below is from OnLisp. Trying to convert to clj file, but have minor difficulties. (defun count-instances (obj lsts) (labels ((instances-in (lst) (if (consp lst) (+ (if (eq (car lst) obj) 1 0) (instances-in (cdr lst))) 0))) (map

Re: how to emulate lisp's labels functionality?

2009-02-13 Thread Phil Hagelberg
wubbie writes: > Hi, do we have labels equiv. in clojure? > The code below is from OnLisp. Trying to convert to clj file, > but have minor difficulties. You can use "let" since variables and functions are kept in the same namespace. > (defun count-instances (obj lsts) > (labels ((instances-i

Re: how to emulate lisp's labels functionality?

2009-02-13 Thread Chouser
On Fri, Feb 13, 2009 at 8:01 PM, Phil Hagelberg wrote: > > wubbie writes: >> Hi, do we have labels equiv. in clojure? >> The code below is from OnLisp. Trying to convert to clj file, >> but have minor difficulties. > > You can use "let" since variables and functions are kept in the same > namesp

Re: run clojure on 5,832 cores?

2009-02-13 Thread Mark H.
SiCortex had a nice booth at Supercomputing '08. They have desktop versions of their machines too. I've heard that the SiCortex machines have a fabulous communication network, but they expect you to use it via their MPI stack. I don't think they offer a shared memory abstraction that the JVM co

Newbie at macros: Manipulating a vector of bindings

2009-02-13 Thread samppi
I'm trying to write a macro that expands from this: (product-context [n rule0, m rule1)] (rule-maker2 (+ n m)) rule3)) Into this (assume that conc-fn and conc-products are functions): (fn [tokens] (if-let [[remainder# n m] (conc-products [rule0 rule1] tokens)] (conc-fn [(rule-maker2 (+

Re: New mod code is broken

2009-02-13 Thread Stephen C. Gilardi
On Feb 13, 2009, at 7:40 PM, Jeffrey Straszheim wrote: I just updated, and the unit tests for mod are breaking. It looks like the new mod only works for ints. Thanks for the report. I removed the non-integer tests. The new mod isn't working properly though: Testing clojure.contrib

Re: Newbie at macros: Manipulating a vector of bindings

2009-02-13 Thread Chouser
On Fri, Feb 13, 2009 at 11:17 PM, samppi wrote: > > I'm trying to write a macro that expands from this: > > (product-context [n rule0, m rule1)] > (rule-maker2 (+ n m)) rule3)) > > Into this (assume that conc-fn and conc-products are functions): > > (fn [tokens] > (if-let [[remainder# n m] (con

Re: New mod code is broken

2009-02-13 Thread Chouser
On Sat, Feb 14, 2009 at 12:45 AM, Stephen C. Gilardi wrote: > > The new mod isn't working properly though: > >Testing clojure.contrib.test-clojure.numbers > >FAIL in (test-mod) (numbers.clj:104) >expected: (= (mod 9 -3) 0) > actual: (not (= -3 0)) > >FAIL

Re: eliminating uses of nil punning

2009-02-13 Thread Chouser
On Fri, Feb 13, 2009 at 1:30 PM, Chouser wrote: > > To turn on the flag you need to rebuild clojure with an > extra option, like this: > > ant -Dclojure.assert-if-lazy-seq=please > > Any non-empty string will do for the value. > > You will need to set the value at runtime as well. There > may be