Re: Clojure on Nokia N900

2010-01-30 Thread hoeck
On 26 Jan., 17:42, npt11tpn wrote: > Hi guys, > Have not seen this discussed before and thought that it might be of > interest to mention that clojure runs on the latest Nokia tablet/ > mobile phone with JRE either from > > https://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-S...

Re: clj-iter, an iteration macro for Clojure inspired by Common Lisp's Iterate

2009-11-06 Thread hoeck
Hi Daniel, I too like the iter macro so much that I've written my own version for clojure (http://github.com/hoeck/clojurebox2d/blob/master/hoeck/ iterate.clj :). I use it to make it easier to work with the JBox2D physics engine, which is a a Java port from Box2D (written in C++) and thus

Re: Memory Characteristics of Persistent Datastructures

2009-10-03 Thread hoeck
Hi, to measure memory requirements of java programs, it is better use a tool like jvisualvm. The JVM process aquires memory as it needs according to its max heap and max permgen settings. I ran your little snippet on my machine with java -Xmx5M -jar clojure.jar, and while jvisualvm reported arou

Re: Q: is there a better way to do this

2009-09-22 Thread hoeck
Hi, I gave it a try to find a solution to your problem. I ended up using a single atom to hold the produced data and as means to detect that consuming started (by swapping in a fn wrapping the produced value). Don't know wether this fits your problem better than the one already posted. (def data

Re: Clojure for game programming?

2009-08-31 Thread hoeck
Hi, I'm using Clojure together with Processing and JBox2D to write small, 2D physics-powered games. The constraint given by JBox2D is, that the physics simulation has to be run in and only accessed from the same thread. So the whole game simulation is confined to the physics simulation thread and

Re: ClassNotFoundException with def

2009-06-28 Thread hoeck
Hi Daniel, add-classpath should only be used to add a clojure library on the fly within a repl session. If you encounter any problems with your code using add-classpath, you should use the normal way of adding it to jvm's startup classpath instead. (The reason is that add-classpath works only for

Re: generating java classes at runtime

2009-06-18 Thread hoeck
Hi, if your generated classes implement a varying but finite set of interfaces, or extend a given class, then using the proxy macro would be the easiest way to generate them at runtime: http://clojure.org/java_interop#toc26 or type (doc proxy) at the commandline. If your generated classes exten

Re: Exception trying to use a macro within proxy

2009-06-18 Thread hoeck
Hi, proxy is a macro, where you supply the method definitions according to its docstring in the following format: user> (doc proxy) ... f => (name [params*] body) or (name ([params*] body) ([params+] body) ...) ... so it expects: a list of name vector body* > Unfortunately, I get an ex

Re: matlab like clojure

2009-06-15 Thread hoeck
Hi, I've got a simple implementation of the Jacobi-method for approximating the solution of a linear system of equations, maybe your interested in this. (defn jacobi-x-step [m b x i] "Calculate a part of the solution of a jacobi-method step" ;; 1 ;; xi = --- (bi - ( sum aij *

Re: Weird Clojure Box - library issue

2009-05-26 Thread hoeck
On 20 Mai, 14:25, Shawn Hoover wrote: > I can't help with COM, but this patch might help slime automatically connect > to the REPL on Windows > XP:http://bitbucket.org/shoover/clojure-box-swank-clojuremq/src/tip/hack... Hi Shawn, thanks for this patch, now starting swank-clojure on windows w

Re: Weird Clojure Box - library issue

2009-05-20 Thread hoeck
On 19 Mai, 12:25, martin_clausen wrote: > I am trying to use the JACOB library with Clojure using Clojure Box. > > I have added this to my .emacs: > > (setq swank-clojure-library-paths (list "c:/dev/dlls")) > > c:/dev/dlls/ contains the jacob-1.14.3-x86.dll > > I have added a .clojure dir to my

Re: Parameter ordering on map/reduce

2009-03-31 Thread hoeck
Hi Nathan, On 31 Mrz., 09:40, Nathan Sorenson wrote: > First of all, I would like to thank Rich and this community for > producing such a pleasurable language, and for putting up with with > all the unpleasant nit-picking of new users. That being said... > > I am curious as to why the function p

Re: Why not "sorted-set-by"?

2009-03-25 Thread hoeck
Hi hjlee, there is already a filed issue and a patch from Timothy Pratley which adds sorted-set-by to clojure: http://code.google.com/p/clojure/issues/detail?id=76&colspec=ID%20Type%20Status%20Priority%20Reporter%20Owner%20Summary But its priority is set tow "low". erik --~--~-~--~---

Re: Questions about a Clojure Datalog

2009-02-03 Thread hoeck
hi jeffrey, On Feb 3, 2:50 pm, Jeffrey Straszheim wrote: > Erik, > > Did you use a bottom up evaluation strategy?  What top level > optimizations did you use (e.g. magic sets and so on)? I only wrote a clojure-wrapper for the iris-reasoner (www.iris- reasoner.org) mentioned above. One thing i a

Re: Questions about a Clojure Datalog

2009-02-03 Thread hoeck
Inspired by the Allegro CL Prolog syntax i set up a little DSL for writing datalog programs and providing relations from clojure-sets and sql-queries. Unfortunately the whole package is currently broken while I'm completing the surrounding relational algebra library. But maybe someone wants to l

Re: Vector concatenation

2008-12-01 Thread hoeck
puzzler wrote: > subvec is O(1) because it takes advantage of sharing. This is quite > useful. > > Is there a way to write concatvec in an O(1) way, taking advantage of > sharing? > I suspect that the "obvious way" to concatenate vectors, i.e., (into > [] (concat v1 v2)), would be O(n). Anothe

Re: A trivial question about type and class

2008-11-06 Thread hoeck
On Nov 6, 8:27 am, "Michael Wood" <[EMAIL PROTECTED]> wrote: > On Thu, Nov 6, 2008 at 8:25 AM, Chanwoo Yoo <[EMAIL PROTECTED]> wrote: > > > Hi all. In Stuart's book - Programming Clojure, there is a multi > > method like following: > > > (defmulti blank? class) > > (defmethod blank? String [s] (

Re: offtopic - where are you come from? (poll)

2008-10-19 Thread hoeck
Dresden, Germany On Oct 17, 11:27 am, "Rastislav Kassak" <[EMAIL PROTECTED]> wrote: > Hello Clojurians, > > I think after 1st year of Clojure life it's good to check how far has > Clojure spread all over the world. > > So wherever are you come from, be proud and say it. > > I'm from Slovakia. :)

Re: "Getting Started" is NOT starting for me...

2008-09-22 Thread hoeck
Hi, same on my win2k machine, the first time a messageDialog or a swing window is shown, it pops behind whatever application is currently running. This includes the clojure repl running in windows cmd.exe or (x)emacs. When opening a messageDialog the second time, it appears on top of all other wi

Re: Processing wrapper

2008-09-11 Thread hoeck
Wow, cool, 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 this group, send email to [EMAIL PROTECTED] For mo

Re: Clojure Poll 09/2008

2008-09-11 Thread hoeck
On 10 Sep., 21:28, Allen Rohner <[EMAIL PROTECTED]> wrote: > Finally, not that I'm asking you or anyone else to build this, I'm > just throwing this out there to see if anyone else is thinking along > the same lines as me :-). I think it would be really cool to build a > database in Clojure. SQL