Re: Parallel Game of Life

2009-03-16 Thread bOR_
Nice! A few more days of work and I've time to play with these kind of things again. Here are some comments, based on your description. As game of life is a cellular automata, you do not need any blocking at all, so you could use agents, rather than refs. It does become an asynchronous CA then,

Re: 08 and 09 are invalid numbers, but 01 through 07 are fine?

2009-03-16 Thread Paul Stadig
I couldn't find anything on the http://clojure.org/reader page, but someone had just posted an example of notation for alternative bases. It looks like you just enter BASErNUMBER user= 2r1000 8 user= 3r300 java.lang.NumberFormatException: For input string: 300 user= 3r200 18 Paul On Sun, Mar

Symbols evaluated at compile time?

2009-03-16 Thread Elena
Hi, in this code: (defn main [] (check-services)) (defn check-services [] 1) if I call slime-eval-defun on main before calling it on check- services, Clojure aborts with: java.lang.Exception: Unable to resolve symbol: check-services in this context (NO_SOURCE_FILE:3)

Re: Symbols evaluated at compile time?

2009-03-16 Thread Christophe Grand
Elena a écrit : Hi, in this code: (defn main [] (check-services)) (defn check-services [] 1) if I call slime-eval-defun on main before calling it on check- services, Clojure aborts with: java.lang.Exception: Unable to resolve symbol: check-services in this context

Re: Symbols evaluated at compile time?

2009-03-16 Thread Konrad Hinsen
On 16.03.2009, at 11:35, Elena wrote: in this code: (defn main [] (check-services)) (defn check-services [] 1) if I call slime-eval-defun on main before calling it on check- services, Clojure aborts with: java.lang.Exception: Unable to resolve symbol: check-services in

Re: Symbols evaluated at compile time?

2009-03-16 Thread Elena
On Mar 16, 10:40 am, Christophe Grand christo...@cgrand.net wrote: Yes, it prevents typos to go unnoticed. You can write a forward declaration : (declare check-services); equivalent to (def check-services) (defn main []         (check-services)) (defn check-services []         1)

Re: Promise for absense of side effects

2009-03-16 Thread Robert Pfeiffer
Meikel Brandmeyer schrieb: I remember some presentation of someone doing this for, I think, Python. There you hint things, where the type is known and the compiler inferred the rest as far as possible. What cannot be inferred was cast to a special type called dynamic. So this roughly worked

Which Java book(s) to order

2009-03-16 Thread DonLeo
Hi, My background: about 40 years experience in many fields of computing, mainly in the Scientific Computing Area. My experience ranges from working with small machines (not in physical size - 4 Kbyte core memory) in 1970, early adapter of Unix (1976), early experimentor with Linux (from version

Re: Which Java book(s) to order

2009-03-16 Thread Paul Drummond
2009/3/16 DonLeo leo.noordhui...@gmail.com: What book or books should I order to base my JAVA knowledge on ? I would suggest the following: 1. Thinking in Java by Bruce Eckel I learned C++ by reading Thinking in C++ by the same author so it was a natural progression to move on to this book.

Re: filter1 interesting?

2009-03-16 Thread Rich Hickey
On Mar 14, 11:26 am, Stuart Sierra the.stuart.sie...@gmail.com wrote: I've added a seek function to clojure.contrib.seq-utils: (defn seek Returns the first item of coll for which (pred item) returns logical true. Consumes sequences up to the first match, will consume the entire

Re: Which Java book(s) to order

2009-03-16 Thread Mark Feeney
I hate +1 emails, but this is essentially just that. Java Concurrency in Practice gets my vote as the most important book to read about Java. I always keep it and Effective Java close at hand. Both of these are references for when you know some java; they're not really tutorials. I haven't

Re: Which Java book(s) to order

2009-03-16 Thread Paul Stadig
The 3rd edition of Thinking in Java is available on the author's website for free. http://www.mindview.net/Books/TIJ/ Paul On Mon, Mar 16, 2009 at 8:47 AM, Mark Feeney mark.fee...@gmail.com wrote: I hate +1 emails, but this is essentially just that. Java Concurrency in Practice gets my

Re: Which Java book(s) to order

2009-03-16 Thread Paul Drummond
2009/3/16 Paul Stadig p...@stadig.name: The 3rd edition of Thinking in Java is available on the author's website for free. http://www.mindview.net/Books/TIJ/ That's true but beware it is quite old now and doesn't cover Java 5 or 6. The fourth edition (which isn't freely available) is the

Re: swank-clojure: swank-clojure-init-files not used

2009-03-16 Thread David Nolen
On Mon, Mar 16, 2009 at 3:42 AM, Tassilo Horn tass...@member.fsf.orgwrote: When adding ~/.clojure/ to `swank-clojure-extra-classpaths' and starting SLIME, htop shows that this directory is not in the -cp java option. Sending a SIGINT kills the clojure process and doesn't interrupt the

Re: swank-clojure: swank-clojure-init-files not used

2009-03-16 Thread Tassilo Horn
David Nolen dnolen.li...@gmail.com writes: Hi David, When adding ~/.clojure/ to `swank-clojure-extra-classpaths' and starting SLIME, htop shows that this directory is not in the -cp java option. Sending a SIGINT kills the clojure process and doesn't interrupt the current Thread only...

Re: filter1 interesting?

2009-03-16 Thread Laurent PETIT
Just to make me more enemies ;-), I would prefer, on the other hand, find-first over ffirst (I'm not that nostalgic of some Common Lisp-like abbreviations :-) No, really, ffirst is just 3 characters shorter than find-first, and looks like a typo at first glance. -- Laurent 2009/3/16 André

Re: Parallel Game of Life

2009-03-16 Thread Larry Sherrill
It would be interesting to throw gridgain (http://www.gridgain.com/) into the mix and let people register their machines as part of a CA grid. Not sure the remote overhead would pay for itself but it would be interesting. On Mar 16, 3:03 am, bOR_ boris.sch...@gmail.com wrote: Nice! A few more

Re: Parallel Game of Life

2009-03-16 Thread Laurent PETIT
Hello, 2009/3/16 bOR_ boris.sch...@gmail.com Nice! A few more days of work and I've time to play with these kind of things again. Here are some comments, based on your description. As game of life is a cellular automata, you do not need any blocking at all, so you could use agents, rather

Re: Game of Life

2009-03-16 Thread Larry Sherrill
Very cool. Thanks for the tip. I didn't know a type hint would make that much difference. Another possible speedup would be to use send/actor to take advantage of multiprocessor machines. Would be curious if the overhead would pay for itself in this situation. Thanks, Larry On Mar 14, 8:03 pm,

Re: Parallel Game of Life

2009-03-16 Thread Kyle R. Burton
On Mon, Mar 16, 2009 at 12:31 AM, Scott Fraser scott.e.fra...@gmail.com wrote: I have taken Larry's Game of Life example that he originally posted here: http://groups.google.com/group/clojure/msg/fdfc88f1ba95bdee ...and updated it to use all the CPU's your JVM has access to... Scott, Your

Re: Parallel Game of Life

2009-03-16 Thread Larry Sherrill
Hi Kyle, I added life-conway.clj to the files section last week. It has rand, clear, and bounded buttons, and the ability to use your mouse to draw the pattern rather than rely on rand. It's a good way to experiment with different automata such as gliders. Larry Sherrill On Mar 16, 9:33 am,

Re: Parallel Game of Life

2009-03-16 Thread bOR_
I'm not very used to concurrent programming, so I have a few questions you may find naïve, but well, let's just pretend they're interesting  ... : Learning here as well :). It seems to me that the game of life works in increments of its world. So I don't see at first what can be gained by

Re: filter1 interesting?

2009-03-16 Thread e
Rich didn't chime in about the overload of 'first', which probably means that's out. find-first is better than ffirst, but it's not really accurate, IMO. You don't have to find it. it's just the first one for which the predicate is true. (get-first ... ) has one less letter than (find-first

Re: Clojure Box

2009-03-16 Thread Kyle R. Burton
Shawn, Clojure Box works well, I'd like to make a feature request: can you add paredit [1]? Including it in the distribution (perhaps with it disabled) would be great. Thanks for putting it together. Kyle [1] http://www.emacswiki.org/cgi-bin/wiki/ParEdit --

Re: Qi's type system

2009-03-16 Thread Raoul Duke
could be applicable in Clojure.  From what I gathered from the tweets from Qcon, Qi was mentioned again there.  Does anyone know if there was anything more to it than it would be nice? (fwiw, Mark T. talked about it a bit on the Qi list.

Re: swank-clojure-extra-classpaths troubles

2009-03-16 Thread Shawn Hoover
On Tue, Mar 10, 2009 at 7:21 AM, Tassilo Horn tass...@member.fsf.orgwrote: user (require 'examples.introduction) I get this exception: , | java.io.FileNotFoundException: Could not locate \ | examples/introduction__init.class or \ | examples/introduction.clj on classpath:

Re: filter1 interesting?

2009-03-16 Thread Josh Daghlian
Anyone for detect? (detect odd? primes) -- 3 (detect even? primes) -- 2 (detect even? (rest primes)) -- runs forever (detect even? (rest one-million-primes)) -- nil On Mar 16, 10:51 am, Laurent PETIT laurent.pe...@gmail.com wrote: Just to make me more enemies ;-), I would prefer, on the other

Re: Symbols evaluated at compile time?

2009-03-16 Thread Elena
On Mar 16, 10:43 am, Konrad Hinsen konrad.hin...@laposte.net wrote: Yes. Clojure checks that symbols are defined before they are used.   You can put (declare check-services) before your definition of main to define the symbol and make it clear   to the (human) reader that you indeed to

Re: filter1 interesting?

2009-03-16 Thread Daniel Renfer
One of the nice things about overloading first is you could always just tell people that the one argument version of first is like saying: (first identity coll) even though the actual implementation wouldn't need to bother with it. The problem comes when you consider if we have a

Re: filter1 interesting?

2009-03-16 Thread Chouser
On Mon, Mar 16, 2009 at 1:38 PM, Daniel Renfer d...@kronkltd.net wrote: One of the nice things about overloading first is you could always just tell people that the one argument version of first is like saying: (first identity coll) even though the actual implementation wouldn't need to

Re: Promise for absense of side effects

2009-03-16 Thread Meikel Brandmeyer
Hi, Am 16.03.2009 um 12:26 schrieb Robert Pfeiffer: Did you mean this: http://wiki.jvmlangsummit.com/pdf/28_Siek_gradual.pdf It was presented at the JVM Summit, so Rich may already have given a thought to this. Argh.. Gradual Typing that was term I was missing. Here some more information.

Re: swank-clojure-extra-classpaths troubles

2009-03-16 Thread Tassilo Horn
Shawn Hoover shawn.hoo...@gmail.com writes: Hi Shawn, user (require 'examples.introduction) I get this exception: , | java.io.FileNotFoundException: Could not locate \ | examples/introduction__init.class or \ | examples/introduction.clj on classpath: (NO_SOURCE_FILE:0)

Re: Symbols evaluated at compile time?

2009-03-16 Thread Meikel Brandmeyer
Hi, Am 16.03.2009 um 18:36 schrieb Elena: IMHO, this is a no-no for interactive development. I understand that it helps avoiding undefined symbols, but such code integrity checks could be delayed to a final compilation stage. Having them earlier forces you to develop code in a bottom-up way.

Re: Symbols evaluated at compile time?

2009-03-16 Thread Jeffrey Straszheim
I agree. It doesn't matter what order the compiler reads the definitions: I can scroll up and type. It does effect humans reading the code, however. Often when looking at unfamiliar Clojure code, I find myself scrolling to the bottom first. On Mon, Mar 16, 2009 at 1:58 PM, Meikel Brandmeyer

Re: Symbols evaluated at compile time?

2009-03-16 Thread Elena
On 16 Mar, 20:14, Jeffrey Straszheim straszheimjeff...@gmail.com wrote: It does effect humans reading the code, however.  Often when looking at unfamiliar Clojure code, I find myself scrolling to the bottom first. That's exactly my point: why should I scroll to the bottom? That's not the way

Re: filter1 interesting?

2009-03-16 Thread Stuart Sierra
On Mar 16, 8:14 am, Rich Hickey richhic...@gmail.com wrote: Sorry to jump in late, but one problem with seek is that it is a homophone of seq. Did anyone consider ffilter or find-first? I thought find-first was too long, since it's almost as long as (first (filter ...) ffilter looks funny,

Re: Symbols evaluated at compile time?

2009-03-16 Thread David Nolen
This has come up before. You can actually work around this (search the mailing list for declare) I think that when not hacking against the REPL that the default behavior is a good one. Having to use declare bugged me a little at first, but I now consider it a very minor annoyance compared to the

swank-clojure: init-files / classpath troubles solved (was: swank-clojure: swank-clojure-init-files not used)

2009-03-16 Thread Tassilo Horn
Hi all, now I've solved my swank-clojure doesn't use my extra classpath and init files problems. This didn't work, cause I had something like this in my .emacs: --8---cut here---start-8--- (add-to-list 'load-path ~/repos/el/swank-clojure) (setq

Question about profiling

2009-03-16 Thread Vincent Foley
I was trying to make an application go faster today when I found out that a Java program that does pretty much the same task was 8 times faster. I used the -Xrunhprof:cpu=times profiling flag to know where I should look, and the results are a little puzzling: CPU TIME (ms) BEGIN (total =

Re: Symbols evaluated at compile time?

2009-03-16 Thread Laurent PETIT
I also agree that I keep going first to the end of the file, searching the real function to launch or to reuse when reading new clojure code ... What I would be happy with is a way to have clojure not complain before the end of a unit of compiled code. For the REPL, that would be somewhat

Re: filter1 interesting?

2009-03-16 Thread Christian Vest Hansen
On Mon, Mar 16, 2009 at 8:38 PM, Stuart Sierra the.stuart.sie...@gmail.com wrote: On Mar 16, 8:14 am, Rich Hickey richhic...@gmail.com wrote: Sorry to jump in late, but one problem with seek is that it is a homophone of seq. Did anyone consider ffilter or find-first? I thought find-first

Re: swank-clojure-extra-classpaths troubles

2009-03-16 Thread Shawn Hoover
On Mon, Mar 16, 2009 at 2:39 PM, Tassilo Horn tass...@member.fsf.orgwrote: Yes, for me having directories in `swank-clojure-extra-classpaths' doesn't work at all. Everything except jar files are discarded. So that's the general problem for me, the examples are one specific case which bites

Re: Symbols evaluated at compile time?

2009-03-16 Thread Paul Stadig
I may be missing something, but how does having to (declare) vars fix typos? I don't think anyone is suggesting *creating* a var that is referenced before it is defined. What people are asking for is that the compiler looks-ahead to verify that the var will eventually be defined, and then go on

Re: mocking in clojure

2009-03-16 Thread Allen Rohner
On Mar 13, 3:35 pm, Stephen C. Gilardi squee...@mac.com wrote: On Mar 13, 2009, at 4:10 PM, Stuart Sierra wrote: Hi Allen, Sorry I haven't kept up with this. I think, though, that it's best to have it as a standalone library in clojure-contrib, so that people can use it with other

Re: suggestion for resultset-seq and duplicate column names

2009-03-16 Thread Allen Rohner
On Mar 12, 1:32 pm, Ron Lusk ronl...@alum.mit.edu wrote: Works for me: I just overwrote my copy of resultset-seq with one that uses getColumnLabel, and I am now getting the results I expected from complex queries (in Interbase, at least). On Feb 23, 9:33 am, Rich Hickey

Re: Symbols evaluated at compile time?

2009-03-16 Thread David Nolen
On Mon, Mar 16, 2009 at 4:08 PM, Paul Stadig p...@stadig.name wrote: I may be missing something, but how does having to (declare) vars fix typos? I don't think anyone is suggesting *creating* a var that is referenced before it is defined. What people are asking for is that the compiler

Re: Symbols evaluated at compile time?

2009-03-16 Thread Elena
On 16 Mar, 20:45, David Nolen dnolen.li...@gmail.com wrote: This has come up before. You can actually work around this (search the mailing list for declare) I've searched the mailing list and I've found also an explanation by Rich Hickey (I apologize for not having done it in the first

Re: Symbols evaluated at compile time?

2009-03-16 Thread Elena
On 16 Mar, 20:58, Laurent PETIT laurent.pe...@gmail.com wrote: For files, that would be wait until the end of the file before complaining for undefined symbols, and let me arrange the defs in any order I feel most readable without having to think about placing those (declare) calls. I second

Re: Which Java book(s) to order

2009-03-16 Thread Mark Engelberg
Of course, with respect to Clojure, probably the most important thing is to learn the Java *libraries*. What are good books about that? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Clojure group. To post to this

Re: Symbols evaluated at compile time?

2009-03-16 Thread Phil Hagelberg
André Thieme splendidl...@googlemail.com writes: But it also protects you from typos. And this can be even more important. Imagine you have a complex program and accidently made a typo, and this will go unnoticed for days and days, until the program actually runs your code... If you go days

Re: Symbols evaluated at compile time?

2009-03-16 Thread Raoul Duke
If you go days and days without actually running your code, then you deserve what you get. A test suite would catch this for you every time; developing without one is irresponsible. geeze people, i'm tired of the tests are the answer to everything. give it a break. not every test suite will

Re: Symbols evaluated at compile time?

2009-03-16 Thread Laurent PETIT
2009/3/16 Meikel Brandmeyer m...@kotka.de Hi, Am 16.03.2009 um 22:19 schrieb Elena: On 16 Mar, 21:57, Laurent PETIT laurent.pe...@gmail.com wrote: I agree that it's not difficult. But, at least in my own experience, it's not the second step to cleaning up my programs. I generally try

Re: Symbols evaluated at compile time?

2009-03-16 Thread Meikel Brandmeyer
Hi, Am 16.03.2009 um 22:44 schrieb Laurent PETIT: In french, we have a sentence for that, that would translate literally into eat the banana by both ends at the same time. I don't think top-down and bottom-up programming are antogonists. I often do both at the same time myself.

advice needed converting large files to xml

2009-03-16 Thread Brian Doyle
I've been using Clojure for about 6 months now and really like it. I am somewhat new to multi-threading and using any of the parallel features in Clojure though. I have a situation where I need to convert 7 files from CSV to XML. Each one of these files is about 180MB apiece in size. I have

Re: Symbols evaluated at compile time?

2009-03-16 Thread Laurent PETIT
2009/3/16 Phil Hagelberg p...@hagelb.org André Thieme splendidl...@googlemail.com writes: But it also protects you from typos. And this can be even more important. Imagine you have a complex program and accidently made a typo, and this will go unnoticed for days and days, until the

Re: Symbols evaluated at compile time?

2009-03-16 Thread Elena
On 16 Mar, 22:31, André Thieme splendidl...@googlemail.com wrote: The behaviour of Clojure can be seen as a disadvantage, yes, because you either need these forward declarations, or you need to arrange functions different. But it also protects you from typos. And this can be even more

Re: Symbols evaluated at compile time?

2009-03-16 Thread André Thieme
On 16 Mrz., 20:45, David Nolen dnolen.li...@gmail.com wrote: Should the REPL have an interactive mode where it won't fire an exception on undefined symbols and instead issue compiler warnings? If compiler warnings were issued this would be a nice hook for Emacs and other IDEs. Yes, I was

Re: advice needed converting large files to xml

2009-03-16 Thread Stu Hood
If you write your CSV - XML processing as a function, you could pmap ( http://clojure.org/api#pmap) that function across the list of input files. pmap will transparently create the threads as needed, and it will probably be enough to saturate your disk. Thanks, Stu On Mon, Mar 16, 2009 at 5:56

Re: Symbols evaluated at compile time?

2009-03-16 Thread Timothy Pratley
Just FYI, The actual patch is in the files section: http://groups.google.com/group/clojure/web/auto-def.patch With an example: http://groups.google.com/group/clojure/web/lit-wc.clj From a longer thread about 'snake' which talked about literate programming:

Re: advice needed converting large files to xml

2009-03-16 Thread Mark Volkmann
On Mon, Mar 16, 2009 at 4:56 PM, Brian Doyle brianpdo...@gmail.com wrote: I've been using Clojure for about 6 months now and really like it.  I am somewhat new to multi-threading and using any of the parallel features in Clojure though.   I have a situation where I need to convert 7 files

Re: Promise for absense of side effects

2009-03-16 Thread André Thieme
On 16 Mrz., 19:43, Meikel Brandmeyer m...@kotka.de wrote: Am 16.03.2009 um 12:26 schrieb Robert Pfeiffer: Did you mean this: http://wiki.jvmlangsummit.com/pdf/28_Siek_gradual.pdf It was presented at the JVM Summit, so Rich may already have given a thought to this. Argh.. Gradual

Re: Promise for absense of side effects

2009-03-16 Thread Raoul Duke
please, for those who aren't Erlang nerds, also see Dialyzer. http://www.it.uu.se/research/group/hipe/dialyzer --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to

Re: Symbols evaluated at compile time?

2009-03-16 Thread Phil Hagelberg
Laurent PETIT laurent.pe...@gmail.com writes: OK, so now is time for another ugly english translation of a french proverb before saying something, roll your tongue 8 times in your mouth before speaking. I guess this could also be applied for e-mail Agreed, it could have been worded better.

Re: Symbols evaluated at compile time?

2009-03-16 Thread Elena
On 16 Mar, 22:55, Meikel Brandmeyer m...@kotka.de wrote: My remark was pointed at the fact, that before it was claimed, that the one way doesn't work in Clojure and one has to go the other. And then the same person goes on to contradict him(or her?)self. But be it... To say something more

Re: Symbols evaluated at compile time?

2009-03-16 Thread Elena
On 16 Mar, 23:26, Timothy Pratley timothyprat...@gmail.com wrote: For fully compiled code the 'checkpoint' is clear - but Clojure is dynamic... what should happen with this code: (defn myfun []   (another-fun 5)) (myfun) (defn another-fun [x]   (inc x)) In a compiled language that

Re: advice needed converting large files to xml

2009-03-16 Thread Brian Doyle
On Mon, Mar 16, 2009 at 4:21 PM, Stu Hood stuh...@gmail.com wrote: If you write your CSV - XML processing as a function, you could pmap ( http://clojure.org/api#pmap) that function across the list of input files. pmap will transparently create the threads as needed, and it will probably be

Behavior of 'empty'

2009-03-16 Thread Frantisek Sodomka
Hello Rich all! I am digging into behavior of function 'empty': user= (doc empty) - clojure.core/empty ([coll]) Returns an empty collection of the same category as coll, or nil (empty [1 2]) = [] (empty (seq [1 2])) = nil (empty '(1 2)) = () (empty (seq '(1 2))) = ()

Re: Symbols evaluated at compile time?

2009-03-16 Thread Phil Hagelberg
Laurent PETIT laurent.pe...@gmail.com writes: 2009/3/16 Phil Hagelberg p...@hagelb.org Laurent PETIT laurent.pe...@gmail.com writes: But please, think about it twice before saying people are irresponsible. Unit tests are not the only answer to bug-free and quality

Re: Symbols evaluated at compile time?

2009-03-16 Thread Elena
On 16 Mar, 23:47, Elena egarr...@gmail.com wrote: On 16 Mar, 23:26, Timothy Pratley timothyprat...@gmail.com wrote: what should happen with this code: (defn myfun []   (another-fun 5)) (myfun) (defn another-fun [x]   (inc x)) In a compiled language that would be valid, but in

Re: Behavior of 'empty'

2009-03-16 Thread Mark Engelberg
On Mon, Mar 16, 2009 at 3:54 PM, Frantisek Sodomka fsodo...@gmail.com wrote: (empty (seq [1 2])) = nil Now that there is the concept of empty sequences, maybe this should actually return an empty sequence, such as (). --~--~-~--~~~---~--~~ You received this

Re: advice needed converting large files to xml

2009-03-16 Thread Brian Doyle
On Mon, Mar 16, 2009 at 4:29 PM, Mark Volkmann r.mark.volkm...@gmail.comwrote: On Mon, Mar 16, 2009 at 4:56 PM, Brian Doyle brianpdo...@gmail.com wrote: I've been using Clojure for about 6 months now and really like it. I am somewhat new to multi-threading and using any of the parallel

Re: Qi's type system

2009-03-16 Thread Raoul Duke
there are (at least) 2 Qis: one is java-aop. the other is lisp++. sincerely. On Mon, Mar 16, 2009 at 4:19 PM, Howard Lewis Ship hls...@gmail.com wrote: I antended a talk on Qi at JavaZone 2008. Qi is a kind of AOP layer that knits together concerns via a bit of configuration and some

Re: Clojure Web Framework, what I want to add

2009-03-16 Thread Howard Lewis Ship
Personally, I've been noodling about what a Tapestry/Clojure hybrid might look like. I'd advise that you take a peek at Lift, a functional web framework built on Scala. I have some ideas about what a component based framework would look like in a function world (note: this would be leaving JSPs

Re: Clojure Web Framework, what I want to add

2009-03-16 Thread Jeffrey Straszheim
I'd love to see something built around very-high scalability, using NIO and thread pools and such. On Mon, Mar 16, 2009 at 7:40 PM, Sean francoisdev...@gmail.com wrote: I'm not sure if some of the design inputs make sense, specifically Spring and Hibernate. Point 1 - I've found the strength

Re: Promise for absense of side effects

2009-03-16 Thread André Thieme
On 16 Mrz., 23:36, Raoul Duke rao...@gmail.com wrote: please, for those who aren't Erlang nerds, also see Dialyzer. http://www.it.uu.se/research/group/hipe/dialyzer Funny, I just wanted to post exactly that link. It is very impressive what that tool did: Dialyzer has been applied to large

Re: Promise for absense of side effects

2009-03-16 Thread Raoul Duke
If the Dialyzer can do all this without having an optional type system in Erlang, then it should be obvious what would be possible, if Rich agrees and finds the time/resources to add one in Clojure. maybe this is a bad/crazy idea, but could one make a pluggable Dialyzer, which could then be

Re: Clojure Web Framework, what I want to add

2009-03-16 Thread Berlin Brown
On Mar 16, 7:52 pm, Jeffrey Straszheim straszheimjeff...@gmail.com wrote: I'd love to see something built around very-high scalability, using NIO and thread pools and such. On Mon, Mar 16, 2009 at 7:40 PM, Sean francoisdev...@gmail.com wrote: I'm not sure if some of the design inputs

Re: Symbols evaluated at compile time?

2009-03-16 Thread Stephen C. Gilardi
On Mar 16, 2009, at 6:59 PM, Elena wrote: Furthermore, if I understand Rich's opinion in that regards, this code: (defn myfun [] (another-fun 5)) should be rejected if definition of another-fun is missing (but I'd say: only in code to be released). I don't mind the current behavior of

Re: Symbols evaluated at compile time?

2009-03-16 Thread André Thieme
On 16 Mrz., 22:41, Phil Hagelberg p...@hagelb.org wrote: André Thieme splendidl...@googlemail.com writes: But it also protects you from typos. And this can be even more important. Imagine you have a complex program and accidently made a typo, and this will go unnoticed for days and days,

Re: Clojure Web Framework, what I want to add

2009-03-16 Thread Sean
Okay, if you have to work with something rpe-existing that makes more sense. My main point is that if I were started from scratch, I'd do it different. On Mar 16, 8:12 pm, Berlin Brown berlin.br...@gmail.com wrote: On Mar 16, 7:52 pm, Jeffrey Straszheim straszheimjeff...@gmail.com wrote:

Re: Symbols evaluated at compile time?

2009-03-16 Thread Laurent PETIT
Hello, Thanks for taking time thinking about this idea! Your solution is indeed close to what I had in mind in terms of requirements. I was currently hacking with clojure java class Compiler to enhance Timothy's patch and add a variation on what you described. My concern is that it should also

Re: Clojure Web Framework, what I want to add

2009-03-16 Thread David Nolen
I'm mostly a front-end UI person with crazy amounts of JS experience so most of my input will be from that stand point. 1. I agree with Sean on this one. No need to bring in middleware that can't be expressed in 10X-20X less code in pure Clojure. 2. The framework should allow for any backend

Re: Qi's type system

2009-03-16 Thread Howard Lewis Ship
Oops. Here we are at the intersection of Lisp and Java. Eventually all the projects will be assigned numbers instead of names! On Mon, Mar 16, 2009 at 4:24 PM, Raoul Duke rao...@gmail.com wrote: there are (at least) 2 Qis: one is java-aop. the other is lisp++. sincerely. On Mon, Mar

Re: Symbols evaluated at compile time?

2009-03-16 Thread Stephen C. Gilardi
On Mar 16, 2009, at 8:25 PM, Laurent PETIT wrote: Hi Laurent, Your solution is indeed close to what I had in mind in terms of requirements. I was currently hacking with clojure java class Compiler to enhance Timothy's patch and add a variation on what you described. Cool. I look

Re: Symbols evaluated at compile time?

2009-03-16 Thread Laurent PETIT
Hello again, 2009/3/17 Stephen C. Gilardi squee...@mac.com On Mar 16, 2009, at 8:25 PM, Laurent PETIT wrote: Hi Laurent, Your solution is indeed close to what I had in mind in terms of requirements. I was currently hacking with clojure java class Compiler to enhance Timothy's patch and

Re: Symbols evaluated at compile time?

2009-03-16 Thread Stephen C. Gilardi
On Mar 16, 2009, at 9:06 PM, Laurent PETIT wrote: The real one was : how to correctly get the thread bound value, and change the thread bound value of a Var instance, from within java code ? You can set the thread-bound value with set (defined in Var.java). You get the thread-bound

Re: Clojure Web Framework, what I want to add

2009-03-16 Thread Stuart Sierra
On Mar 16, 7:17 pm, BerlinBrown berlin.br...@gmail.com wrote: After many years (decade) of web development, here are the things that I want in a framework, mostly based in clojure: What do you think and what you add.  This is ambitious and just a ideas of what I would add.  What would you

Re: Symbols evaluated at compile time?

2009-03-16 Thread Laurent PETIT
2009/3/17 Stephen C. Gilardi squee...@mac.com On Mar 16, 2009, at 9:06 PM, Laurent PETIT wrote: The real one was : how to correctly get the thread bound value, and change the thread bound value of a Var instance, from within java code ? You can set the thread-bound value with set

Re: Question about profiling

2009-03-16 Thread Vincent Foley
I found that the problem is caused by the version of Sun's JVM on Ubunty Hardy Heron. On my Ibex machine at home, the first two lines (Object.wait and ReferenceQueue.remove) are not even there and the costliest method if AtomicInteger.get. Vincent.

I got to use Clojure at work today !!!

2009-03-16 Thread Jeffrey Straszheim
Only to do a tiny little test w/ not-deployed code. But still: I am a professional Clojure developer now :) (Please don't kill my dream.) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Clojure group. To post to

Re: Question about profiling

2009-03-16 Thread Jeffrey Straszheim
Are they both Java 6? I know it fixed a lot of performance issue over 5. On Mon, Mar 16, 2009 at 9:22 PM, Vincent Foley vfo...@gmail.com wrote: I found that the problem is caused by the version of Sun's JVM on Ubunty Hardy Heron. On my Ibex machine at home, the first two lines (Object.wait

Re: Question about profiling

2009-03-16 Thread Vincent Foley
Java 1.6.0_07 for Hardy vs Java 1.6.0_10 for Ibex. However, with this newer package, the Java program is now more than 13x faster than my Clojure program. Looks like I got a lot of work ahead of me. Vincent. On Mar 16, 9:31 pm, Jeffrey Straszheim straszheimjeff...@gmail.com wrote: Are they

Re: Question about profiling

2009-03-16 Thread Vincent Foley
Some numbers: Clojure: ]% time java -server -cp clj-starcraft.jar:$HOME/src/clojure/ clojure.jar clojure.main dump.clj misc/replays/*.rep 1047 Elapsed time: 159605.6084 msecs java -server -cp clj-starcraft.jar:$HOME/src/clojure/clojure.jar clojure.main 163.84s user 1.11s system 102% cpu

Re: Clojure Web Framework, what I want to add

2009-03-16 Thread Shawn Hoover
On Mon, Mar 16, 2009 at 9:18 PM, Stuart Sierra the.stuart.sie...@gmail.comwrote: On Mar 16, 7:17 pm, BerlinBrown berlin.br...@gmail.com wrote: After many years (decade) of web development, here are the things that I want in a framework, mostly based in clojure: What do you think and

Re: I got to use Clojure at work today !!!

2009-03-16 Thread Jeffrey Straszheim
Just using the REPL to test some Java code interactively. On Mon, Mar 16, 2009 at 9:44 PM, Vincent Foley vfo...@gmail.com wrote: Personal project at work, or part of something bigger? On Mar 16, 9:27 pm, Jeffrey Straszheim straszheimjeff...@gmail.com wrote: Only to do a tiny little test

Request Feedback on Clojure Blog Article

2009-03-16 Thread Keith Bennett
All - I am a relative newcomer to Clojure, but have been really enjoying learning and using it. I've published an article on my blog at http://snipurl.com/dyxz7. It's about some of my impressions of Clojure based on my studies and porting of a Swing app to Clojure (a previous article discussed

Re: I got to use Clojure at work today !!!

2009-03-16 Thread Paul Mooser
I've been using clojure in a similar way at work. I run a swank server in a separate thread inside of a running application instance, and I can connect to it remotely using SLIME. It works pretty well! --~--~-~--~~~---~--~~ You received this message because you are

Improving the test suite

2009-03-16 Thread Phil Hagelberg
OK, so I've posted a fair amount of smack talk about test suites and how important they are--I figure it's time to help out. What are some ways in which test-clojure is lacking? How can I help improve the coverage? -Phil --~--~-~--~~~---~--~~ You received this

Re: Parallel Game of Life

2009-03-16 Thread Scott Fraser
Larry, that you added mouse-drawing is awesome, I wanted to do that too. Kyle - my bad on the imports, thanks for the patch. I will take all these and refold in when I get some time. I also have some ideas on further speed ups. My gut tells me we could make this run faster. One other idea -

Re: Request Feedback on Clojure Blog Article

2009-03-16 Thread Timothy Pratley
Hi Keith, I don't follow the 'lazy-init' part... It seems to me that you create a delay but force it immediately which is effectively just running create-a-text-field. That behavior seems different from the factory style return if exists or create you originally started with. I don't see the

  1   2   >