Re: abysmal multicore performance, especially on AMD processors

2012-12-16 Thread Lee Spector
On Dec 15, 2012, at 1:14 AM, cameron wrote: Originally I was using ECJ (http://cs.gmu.edu/~eclab/projects/ecj/) in java for my GP work but for the last few years it's been GEVA with a clojure wrapper I wrote (https://github.com/cdorrat/geva-clj). Ah yes -- I've actually downloaded and

Re: abysmal multicore performance, especially on AMD processors

2012-12-16 Thread Lee Spector
On Dec 14, 2012, at 10:41 PM, cameron wrote: Until Lee has a representative benchmark for his application it's difficult to tell if he's experiencing the same problem but there would seem to be a case for changing the PersistentList implementation in clojure.lang. We put together a

Re: abysmal multicore performance, especially on AMD processors

2012-12-13 Thread Lee Spector
On Dec 13, 2012, at 4:21 PM, cameron wrote: Have you made any progress on a small deterministic benchmark that reflects your applications behaviour (ie. the RNG seed work you were discussing)? I'm keen to help, but I don't have time to look at benchmarks that take hours to run. I've

Re: abysmal multicore performance, especially on AMD processors

2012-12-12 Thread Lee Spector
On Dec 12, 2012, at 10:03 AM, Andy Fingerhut wrote: Have you tried running your real application in a single thread in a JVM, and then run multiple JVMs in parallel, to see if there is any speedup? If so, that would again help determine whether it is multiple threads in a single JVM

Re: abysmal multicore performance, especially on AMD processors

2012-12-12 Thread Lee Spector
On Dec 12, 2012, at 10:45 AM, Christophe Grand wrote: Lee, while you are at benchmarking, would you mind running several threads in one JVM with one clojure instance per thread? Thus each thread should get JITted independently. I'm not actually sure how to do that. We're starting runs with

Re: abysmal multicore performance, especially on AMD processors

2012-12-11 Thread Lee Spector
On Dec 11, 2012, at 4:37 AM, Marshall Bockrath-Vandegrift wrote: I’m not sure what the next steps are. Open a bug on the JVM? This is something one can attempt to circumvent on a case-by-case basis, but IHMO has significant negative implications for Clojure’s concurrency story. I've gotten

Re: abysmal multicore performance, especially on AMD processors

2012-12-11 Thread Lee Spector
On Dec 11, 2012, at 11:40 AM, Marshall Bockrath-Vandegrift wrote: Or have I missed a currently-available work-around among the many suggestions? You can specialize your application to avoid megamodal call sites in tight loops. If you are working with `Cons`-order sequences, just use

Re: abysmal multicore performance, especially on AMD processors

2012-12-11 Thread Lee Spector
On Dec 11, 2012, at 1:06 PM, Marshall Bockrath-Vandegrift wrote: So I think if you replace your calls to `reverse` and any `conj` loops you have in your own code, you should see a perfectly reasonable speedup. Tantalizing, but on investigation I see that our real application actually does

Re: abysmal multicore performance, especially on AMD processors

2012-12-08 Thread Lee Spector
On Dec 7, 2012, at 9:42 PM, Andy Fingerhut wrote: When you say we can run multiple instances of the test on the same machine, do you mean that, for example, on an 8 core machine you run 8 different JVMs in parallel, each doing a single-threaded 'map' in your Clojure code and not a

Re: abysmal multicore performance, especially on AMD processors

2012-12-08 Thread Lee Spector
On Dec 8, 2012, at 9:36 AM, Marshall Bockrath-Vandegrift wrote: Although it doesn’t impact your benchmark, `pmap` may be further adversely affecting the performance of your actual program. There’s a open bug regarding `pmap` and chunked seqs: http://dev.clojure.org/jira/browse/CLJ-862

Re: abysmal multicore performance, especially on AMD processors

2012-12-08 Thread Lee Spector
On Dec 8, 2012, at 1:28 PM, Paul deGrandis wrote: My experiences in the past are similar to the numbers that Jim is reporting. I have recently been centering most of my crunching code around reducers. Is it possible for you to cook up a small representative test using reducers+fork/join

Re: abysmal multicore performance, especially on AMD processors

2012-12-08 Thread Lee Spector
On Dec 8, 2012, at 3:42 PM, Andy Fingerhut wrote: I'm hoping you realize that (take 1 (iterate reverse value)) is reversing a linked list 1 times, each time allocating 1 cons cells (or Clojure's equivalent of a cons cell)? For a total of around 100,000,000 memory allocations

Re: abysmal multicore performance, especially on AMD processors

2012-12-08 Thread Lee Spector
architectures too, but it doesn't look promising. -Lee -- Lee Spector, Professor of Computer Science Cognitive Science, Hampshire College 893 West Street, Amherst, MA 01002-3359 lspec...@hampshire.edu, http://hampshire.edu/lspector/ Phone: 413-559-5352, Fax: 413-559-5438 -- You received this message

Re: abysmal multicore performance, especially on AMD processors

2012-12-08 Thread Lee Spector
On Dec 8, 2012, at 10:19 PM, meteorfox wrote: Now if you run vmstat 1 while running your benchmark you'll notice that the run queue will be most of the time at 8, meaning that 8 processes are waiting for CPU, and this is due to memory accesses (in this case, since this is not true for

abysmal multicore performance, especially on AMD processors

2012-12-07 Thread Lee Spector
on AMD machines. Any help would be greatly appreciated! Thanks, -Lee -- Lee Spector, Professor of Computer Science Cognitive Science, Hampshire College 893 West Street, Amherst, MA 01002-3359 lspec...@hampshire.edu, http://hampshire.edu/lspector/ Phone: 413-559-5352, Fax: 413-559-5438 -- You

Re: abysmal multicore performance, especially on AMD processors

2012-12-07 Thread Lee Spector
Thanks Andy. My applications definitely allocate a lot of memory, which is reflected in all of that consing in the test I was using. It'd be hard to do what we do in any other way. I can see how a test using a Java mutable array would help to diagnose the problem, but if that IS the problem

Re: Evaluating an anonymous function with closure

2012-10-15 Thread Lee Spector
On Oct 15, 2012, at 12:51 PM, Alan Malloy wrote: Evaluating function literals is not intended to work; that it works for non-closure functions should be treated as a coincidence. Really? Eval Evaluates the form data structure (not text!) and returns the result. Why would certain things like

Re: Evaluating an anonymous function with closure

2012-10-15 Thread Lee Spector
On Oct 15, 2012, at 2:42 PM, Ben Smith-Mannschott wrote: I think you're confusing: (eval (list '(fn [x] x) 1)) with: (eval (list (fn [x] x) 1)) In both cases, eval is being passed a list of two items. The first element of the list differs, however: In the first case, it is a

Re: Clojure : a good start for non-programmers?

2012-09-26 Thread Lee Spector
, visit this group at http://groups.google.com/group/clojure?hl=en -- Lee Spector, Professor of Computer Science Cognitive Science, Hampshire College 893 West Street, Amherst, MA 01002-3359 lspec...@hampshire.edu, http://hampshire.edu/lspector/ Phone: 413-559-5352, Fax: 413-559-5438 -- You

Re: Clojure : a good start for non-programmers?

2012-09-26 Thread Lee Spector
what I originally understood... It just seems impossible to convince academics that 1st years should become problem-solvers first and programmers after...Java is too grounded in most schools! Jim On 26/09/12 14:29, Jim foo.bar wrote: On 26/09/12 14:04, Lee Spector wrote: Having taught

Re: How to run Clooj?

2012-09-06 Thread Lee Spector
(It has been a while since the OP asked this question, but I didn't see an answer...) You should be able to just download a standalone jar version of clooj, launch it as an application, and get to work editing and running code. No downloading of anything else or command-line calls to java are

Anyone going to PPSN?

2012-08-28 Thread Lee Spector
Maybe a long shot, but are any Clojurians going to the Parallel Problem Solving from Nature conference in Sicily later this week (http://www.dmi.unict.it/ppsn2012/)? I'll be giving a tutorial there that will cover genetic programming work currently being done in Clojure

Re: (let [a 0] (eval 'a)))

2012-08-01 Thread Lee Spector
a (the value) or any other expression like 1, that succeeds. And then if I try the code from the initial attempt (the exact code that failed in the previous paragraph) it now also succeeds! Why might that be? On Tue, Jul 31, 2012 at 8:30 PM, Lee Spector wrote: An approach that doesn't involve

Re: (let [a 0] (eval 'a)))

2012-07-31 Thread Lee Spector
An approach that doesn't involve dynamic variables is to build, evaluate, and then call a function that's made out of the given code and takes an argument for the variable. Assuming for the moment that the code is in symbolic form (rather than string form) like this: = (def exp 'a)

Re: community interest in machine learning (?)

2012-07-28 Thread Lee Spector
has been fixed and I've updated the dependencies. I've run the samples a built a fresh checkout on a clean machine so I think you should be ok now though I did have to delete ~/.m2 in one case. Let me know if you have any problems. Cheers, Cameron. -- Lee Spector, Professor

Re: community interest in machine learning (?)

2012-07-26 Thread Lee Spector
Cameron, I'm eager to check this out. There's a missing quote mark in the dependency line in the getting started guide, but after fixing it I still get: Downloading: org/clojars/cdorrat/geva-clj/1.2-SNAPSHOT/geva-clj-1.2-SNAPSHOT.pom from repository clojars at http://clojars.org/repo/

Re: Any downside of record compared to map

2012-07-23 Thread Lee Spector
Considering that maps do have upsides compared to records in some cases (as indicated, e.g., by Chas's flowchart), and that struct-maps add a couple of handy features in the context of some uses of maps, can anybody say why struct-maps are deprecated? -Lee On Jul 23, 2012, at 1:07 AM,

Re: Any downside of record compared to map

2012-07-23 Thread Lee Spector
On Jul 23, 2012, at 4:06 PM, Aravindh Johendran wrote: Are struct-maps really deprecated? I don't see a deprecation warning anywhere (clojure website, source, api, etc.). All I see is the following line in clojure website. --- Note: Most uses of StructMaps would now be better served by

Re: Any downside of record compared to map

2012-07-22 Thread Lee Spector
On Jul 22, 2012, at 7:42 PM, Warren Lynn wrote: I plan to change all my major data structures to records instead of plain maps. Since record has everything a map provides, I figure there won't be any harm. But is that really so? Would appreciate the opinions from people who know better. I

Re: community interest in machine learning (?)

2012-07-21 Thread Lee Spector
I'd like to see this, as might others in the evolutionary computing community. I just gave some presentations at GECCO at which I mentioned that my current work is implemented in Clojure, and a couple of people told me that they were interested in working in Clojure too. -Lee On Jul 21,

Re: community interest in machine learning (?)

2012-07-17 Thread Lee Spector
this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -- Lee Spector, Professor of Computer Science Cognitive Science, Hampshire College 893 West Street, Amherst, MA 01002-3359 lspec...@hampshire.edu, http

Re: meta-questions - [clojure] in front of Subject line

2012-06-18 Thread Lee Spector
On Jun 18, 2012, at 3:02 AM, Tassilo Horn wrote: There's really no need to obscure subjects. For all your filtering needs, there's the List-ID header: List-ID: clojure.googlegroups.com Here's a SIEVE snippet you can install somehow to your IMAP server to move messages to this list to

Re: meta-questions - [clojure] in front of Subject line

2012-06-17 Thread Lee Spector
On Jun 17, 2012, at 8:23 PM, Peter Buckley wrote: Having [clojure] in front of the subject obscures the subject with redundant information. It's wasting valuable space at the front of the subject line that could be used for, well, the subject, which I'm actually interested in. The mail

Re: code as data vs. code injection vulnerability

2012-05-09 Thread Lee Spector
On May 9, 2012, at 12:15 PM, Michael Gardner wrote: I've never understood why anyone would use prn/read for data transfer, other than extreme laziness. But extreme laziness is an excellent reason! Larry Wall called laziness the first great virtue of a programmer. -Lee -- You received

Re: Best Clojure Learning Resource for Lisper

2012-05-07 Thread Lee Spector
On May 7, 2012, at 12:37 AM, HelmutKian wrote: Hey there, I'm a fairly experienced Common Lisp programmer. By that I mean I've read PAIP, On Lisp, Let Over Lambda, and written several real world CL applications and taught the principles of FP using Racket as a TA. Now I'm looking

Re: Best Clojure Learning Resource for Lisper

2012-05-07 Thread Lee Spector
On May 7, 2012, at 3:10 PM, Larry Travis wrote: Lee's comments ring true for me so let me extend them. Before I discovered Clojure, my experience as a programmer had been mainly in the area of artificial-intelligence experimental programming. I was once a reasonably proficient Lisp

Re: Best Clojure Learning Resource for Lisper

2012-05-07 Thread Lee Spector
On May 7, 2012, at 11:02 PM, Sean Corfield wrote: On Mon, May 7, 2012 at 6:57 PM, Lee Spector lspec...@hampshire.edu wrote: FWIW I've often thought that it would be really wonderful to have real Aquamacs support/polish for swank-clojure/SLIME, especially if it could be packaged in form

Re: Light Table - a new IDE concept

2012-04-13 Thread Lee Spector
On Apr 13, 2012, at 2:34 PM, looselytyped wrote: http://www.chris-granger.com/2012/04/12/light-table---a-new-ide-concept/ Very nice! Small note: In Interlisp, if I remember it correctly, code was structured into functions -- not files -- and one got an editor window for each function

Re: Light Table - a new IDE concept

2012-04-13 Thread Lee Spector
On Apr 13, 2012, at 3:18 PM, Lee Spector wrote: Interlisp did the live propagation of values thing that's in this demo... but still, it's interesting to see the idea of function editors coming back. OOPS -- I meant Interlisp DIDN'T DO the live propagation of values thing Interlisp had

Re: Need help to find a bug in a genetic algorithm

2012-04-11 Thread Lee Spector
On Apr 11, 2012, at 2:27 PM, Marcus Lindner wrote: Another thing about the posted code here. When the alogrithm is stopped, the start-stop-agent became the state stopped. Because this agent has not the state running anymore, there is no send for any other agent anymore. But these agents are

Re: Need help to find a bug in a genetic algorithm

2012-04-08 Thread Lee Spector
I don't know if this will help with the issues that are really motivating this thread, but for what it's worth I've written a couple of genetic programming systems (genetic algorithms in which the genomes are programs that are run as part of the fitness tests) in Clojure and I generally use

Re: Source code as metadata

2012-03-30 Thread Lee Spector
On Mar 30, 2012, at 5:11 PM, Cedric Greevey wrote: That opens a giant can of worms. How, for example, do we discover that (partial * 2) and #(* % 2) and (fn [x] (* 2 x)) and #(+ %1 %1) are all equal? Nevermind once we get into situations like #(reduce + (map (constantly 1) %) equals #(loop

Re: newbie struggling with Clooj and jars

2012-03-23 Thread Lee Spector
To use leiningen in conjunction with clooj: 1. Edit project.clj to reflect your dependencies (using clooj or whatever other editor). 2. Run lein deps from the command line within the project's directory. 3. Quit/restart clooj, since it builds its classpath on launch. Works for me at least.

Re: 3d modeling tools

2012-03-19 Thread Lee Spector
On Mar 16, 2012, at 10:05 AM, Niels van Klaveren wrote: AFAIK there's not much projects focussing on 3D in Clojure, but you can take a look at processing (http://processing.org) and one of it's Clojure wrappers. It's a great little language for 2D/3D visuals, and there's plenty of

3d modeling tools

2012-03-12 Thread Lee Spector
I'm starting a new project involving 3d modeling and I'd like info on availability of related clojure tools -- and I'd also like to pitch a related tool-building project for anyone who might be interested in working on such a thing. First, I see from github that penumbra is not under active

Re: Best IDE

2012-01-19 Thread Lee Spector
On Jan 19, 2012, at 11:42 AM, David Brunell wrote: How long did it take you to get comfortable with paredit? I keep getting frustrated and going back to manually matching parens. FWIW I've tried many times over many years and I never lost the frustration; I prefer free editing but with

Re: Best IDE

2012-01-19 Thread Lee Spector
On Jan 19, 2012, at 8:26 PM, Mark Nutter wrote: On Thu, Jan 19, 2012 at 11:42 AM, David Brunell quantal...@gmail.com wrote: How long did it take you to get comfortable with paredit? I keep getting frustrated and going back to manually matching parens. I had the same experience for a

Re: Best IDE

2012-01-18 Thread Lee Spector
On Jan 18, 2012, at 3:12 PM, Sean Corfield wrote: On Wed, Jan 18, 2012 at 11:51 AM, Cedric Greevey cgree...@gmail.com wrote: don't see very many S.O.Ses or complaints from CCW, Clooj, or LaClojure, or Enclojure users. Probably because 60-70% of Clojure developers are using Emacs so

Re: Homoiconicity in clojure (macro power)

2011-11-02 Thread Lee Spector
On Oct 31, 2011, at 5:40 AM, vikbehal wrote: I am from java Background. We say Homoiconicity in Clojure (Lisp). Code is data and data is code. I read various blogs on it, still not clear, Can you give me some example? FWIW I think that homoiconicity can be useful in a variety of

Re: Spread work onto multiple threads (in pure Clojure)

2011-10-12 Thread Lee Spector
On Oct 12, 2011, at 4:41 PM, Avram wrote: I haven't read the entire thread carefully, but have you considered the work library https://github.com/getwoven/work as a potential fit for what you are trying to do? I hadn't heard of it, but it does look promising and I will check it out. Thanks!

Re: Spread work onto multiple threads (in pure Clojure)

2011-10-11 Thread Lee Spector
On Oct 11, 2011, at 7:56 AM, Tassilo Horn wrote: So indeed, one starts with the number of available processors + 2, and one single longer running task will wipe out any parallelism. :-( IMO, that's not what 99% of the users would expect nor want when calling (pmap foo coll). I'd vote for

Re: Spread work onto multiple threads (in pure Clojure)

2011-10-11 Thread Lee Spector
On Tue, Oct 11, 2011 at 10:55 AM, j-g-faustus johannes.fries...@gmail.com wrote: I expect it would be possible to nest it (possible as in no exceptions or deadlocks), but I can't see any scenario where you would want to - you would get an exponentially increasing number of threads. If 48

Re: Spread work onto multiple threads (in pure Clojure)

2011-10-10 Thread Lee Spector
, at 7:24 PM, Lee Spector wrote: I've been playing with medusa and it sometimes does what I expect, but sometimes it's doing something strange and I'm wondering if someone can help me to do one specific medusa-like thing but more simply (and without the strangeness, which I haven't fully

Re: Spread work onto multiple threads (in pure Clojure)

2011-10-10 Thread Lee Spector
definition with something like #(agent % :error-handler (fn [agnt except] (println except))). On Oct 10, 2011, at 4:07 PM, Lee Spector wrote: I think that the following partially answers my own question and that it provides a way to get decent multicore performance for collections of non

Re: Spread work onto multiple threads (in pure Clojure)

2011-10-10 Thread Lee Spector
On Oct 10, 2011, at 7:16 PM, Phil Hagelberg wrote: What you're really looking for is pdoseq, right? Seems like futures might be a better building-block for this, although again Clojure's lack of flexibility over the thread pool could easily bite you here. No -- I want all of the returned

Re: statistics library?

2011-10-10 Thread Lee Spector
On Oct 10, 2011, at 4:36 PM, Ben Evans wrote: There should be 1.2.4 (and a snapshot of 1.3.0) up on clojars now. Could I ask you to give one of them a go, and mail your findings to the list? We have our regular Incanter Hack Day coming up next weekend, so if things are still b0rken for you,

Re: Spread work onto multiple threads (in pure Clojure)

2011-10-10 Thread Lee Spector
be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -- Lee Spector, Professor of Computer Science Cognitive Science, Hampshire College 893 West Street

Re: Spread work onto multiple threads (in pure Clojure)

2011-10-09 Thread Lee Spector
I've been playing with medusa and it sometimes does what I expect, but sometimes it's doing something strange and I'm wondering if someone can help me to do one specific medusa-like thing but more simply (and without the strangeness, which I haven't fully traced but I hope to avoid having to).

statistics library?

2011-09-27 Thread Lee Spector
I need to do some pretty simple statistics in a Clojure program and Incanter produces results that I think must be wrong (details below). So I don't think I can trust it. Is there other code for statistical testing out there? Or maybe somebody could explain to me how to interpret the

Re: statistics library?

2011-09-27 Thread Lee Spector
On Sep 27, 2011, at 1:37 PM, Johann Hibschman wrote: Johann Hibschman joha...@gmail.com writes: There may be an easier way to do this, but this worked for me: user= (org.apache.commons.math.stat.inference.TestUtils/tTest (into-array Double/TYPE [40 5 2]) (into-array Double/TYPE [1 5

Re: statistics library?

2011-09-27 Thread Lee Spector
On Sep 27, 2011, at 5:44 PM, David Powell wrote: I see that there was a recent fix made to Incanter: Fixed typo in :lower-tail? keyword. This was causing the complement of the p-value to be returned. https://github.com/liebke/incanter/pull/39 Have you tried the latest version in

Re: advantage of dynamic typing

2011-09-27 Thread Lee Spector
On Sep 27, 2011, at 3:40 AM, Paul Koerbitz wrote: That said, I read somewhere (can't find the link now, sorry) that compile-time type checking in Lisps is difficult because they allow code generation at run time? That would still leave the possibility to apply it to everything which is

Re: Spread work onto multiple threads (in pure Clojure)

2011-09-24 Thread Lee Spector
Thanks for this info -- I didn't realize quite how pmap worked. I often launch parallel threads with pmap and have sometimes been puzzled by dips in processor utilization that I can't trace to memory resource contention, etc. I have similar issues sometimes when I launch parallel threads via

Re: clojinc: a Clojure tutorial in the form of an extended REPL session

2011-09-08 Thread Lee Spector
On Sep 8, 2011, at 12:06 AM, Ambrose Bonnaire-Sergeant wrote: This is interesting, might I ask what in context are you teaching this? It's primarily for a genetic programming course I'm teaching at Hampshire College (https://moodle.hampshire.edu/course/view.php?id=1788). -Lee -- You

clojinc: a Clojure tutorial in the form of an extended REPL session

2011-09-07 Thread Lee Spector
I developed this for use in my own teaching, but I'm sharing it in case somebody else might also find it useful. As it says in the README: ;; The material in this file is informal and idiosyncratic in its coverage, ;; leaving out many things that other Clojure introductions include and

Re: Should 'contains?' be in 'Content tests' on Clojure cheat sheet

2011-09-05 Thread Lee Spector
FWIW I've had to re-remember this behavior of contains? several times, and to warn students off of it because it's so easy to think from the name that it's a general membership test. And the some idiom takes a while to remember. The cheat sheet may indeed be contributing to the problem -- I do

Re: new Getting Started page

2011-09-03 Thread Lee Spector
On Sep 3, 2011, at 2:58 PM, Colin Yates wrote: My semi-serious point is that as a beginner the question being answered is more like what is it all about and how can I try these samples/examples rather than how do I do 'proper' enterprise development with this. The best answer for the

Re: new Getting Started page

2011-09-03 Thread Lee Spector
On Sep 3, 2011, at 5:29 PM, nchurch wrote: I've edited the page a little bit to make it less prescriptive towards Clooj. http://dev.clojure.org/display/doc/Getting+Started+for+Beginners I like the revision too. I'm not even sure we should put up labrepl, because there are no

Re: new Getting Started page

2011-09-02 Thread Lee Spector
FWIW I think nchurch's proposed new page is very nice and I disagree with almost all of jonathan.watmough's critiques. I won't rebut them all systematically, but one top-level issue is that I think that a reasonable getting-started path should include an editor with at least minimal

Re: get keys from defrecord

2011-08-29 Thread Lee Spector
On Aug 29, 2011, at 2:57 PM, Tassilo Horn wrote: I guess the problem with that is that you need to have an instance of the record before you can use `keys'. And to create an instance, at least you have to know the number of keys. However, you can inspect the record's constructor using

Re: map vs. pmap

2011-08-27 Thread Lee Spector
On Aug 27, 2011, at 10:41 PM, Andy Fingerhut wrote: I suspect that (rand), which calls java.lang.Math.random(), is a synchronized method, meaning that if you try to call it from many parallel threads, even those on physically separate cores, will execute one at a time. Things could even

Re: I/O

2011-08-26 Thread Lee Spector
On Aug 25, 2011, at 11:39 PM, Dave Ray wrote: user.dir is the directory from which the JVM was launched, i.e. the initial working directory of the process. So, you're probably double-clicking the Clooj jar which resides in your Downloads folder and thus all further file system operations

Re: I/O

2011-08-26 Thread Lee Spector
On Aug 26, 2011, at 9:15 AM, Terje Dahl wrote: I disagree. Simply use: (System/getProperty user.home) This will give you a useful path to work with, no matter where you start from. Works on my Mac. Should work on Windows. From there I would build a simple library which tests which

Re: I/O

2011-08-26 Thread Lee Spector
On Aug 26, 2011, at 12:01 PM, Laurent PETIT wrote: What kind of problem with Eclipse / CCW ? CCW uses a standard java launcher, so to say it uses the Eclipse Java Development Tools defaults, which are to create a launch configuration with the project's path as the current directory (of

Re: I/O

2011-08-25 Thread Lee Spector
On Aug 25, 2011, at 2:00 PM, Terje Dahl wrote: Great question. And great answer. Seriously! I did not know it could be that easy. Unfortunately it's not actually that easy, at least for the OP's question of reading from and writing to (presumably local) files. While slurp and spit are

Re: I/O

2011-08-25 Thread Lee Spector
On Aug 25, 2011, at 9:27 PM, Ken Wesson wrote: On Thu, Aug 25, 2011 at 6:49 PM, Lee Spector lspec...@hampshire.edu wrote: While slurp and spit are beautifully elegant it's not so elegant to tell slurp how to find the file you want it to slurp. In many other languages/environments there's

Re: Stanford AI Class

2011-08-13 Thread Lee Spector
On Aug 12, 2011, at 9:07 PM, daly wrote: On Fri, 2011-08-12 at 16:30 -0700, pmbauer wrote: +1 On Friday, August 12, 2011 3:16:15 PM UTC-7, Sergey Didenko wrote: BTW, Is there a case when AI self-modifying program is much more elegant than AI just-data-modifying program?

Re: Libraries and build management hell

2011-07-30 Thread Lee Spector
On Jul 30, 2011, at 11:24 AM, Mark Engelberg wrote: I would love to have a more streamlined way in Clojure for my personal common case -- writing a short script and using it interactively. +1 on the whole perspective presented here, most of which I cut. -Lee -- You received this message

Re: protocols and records -- use when?

2011-07-29 Thread Lee Spector
On Jul 28, 2011, at 8:19 PM, Alex Osborne wrote: The main use cases for the old structs feature on the other hand are completely replaced by records and it is recommended that new code use defrecord instead of defstruct. I had some code using structs and, following advice like this, replaced

Re: Libraries and build management hell

2011-07-29 Thread Lee Spector
On Jul 29, 2011, at 8:14 AM, Alex Osborne wrote: 6. Click hooke-1.1.2.jar and save the jar file to your project. The repository is really nothing more than a bunch of directories each containing a jar files and another file containing a list of dependencies. I'm not sure how you could

Re: better community docs: getting started

2011-07-29 Thread Lee Spector
On Jul 29, 2011, at 5:39 PM, Ken Wesson wrote: On Fri, Jul 29, 2011 at 5:33 PM, Laurent PETIT laurent.pe...@gmail.com wrote: Sorry to make things look different than the apparent consensus of the participants to this thread, but isn't it a little bit too prematurate to put that pressure on

Re: better community docs: getting started

2011-07-25 Thread Lee Spector
On Jul 25, 2011, at 4:11 AM, Michael Wood wrote: On 25 July 2011 09:41, Sean Corfield seancorfi...@gmail.com wrote: On Sun, Jul 24, 2011 at 11:51 PM, pmbauer paul.michael.ba...@gmail.com wrote: [...] That's why I would give Clooj some prominence rather than burying it at the bottom of the

Re: [parallel][incanter]State, how to do it right ? (rng state for parallel computing)

2011-07-24 Thread Lee Spector
On Jul 22, 2011, at 11:20 AM, bernardH wrote: But there is a small catch : most of the time is spent in the Random Number Generator [3] so it would be sub-optimal to just have worker threads processing the output of a single threaded rng. I am not very confident in my solution to a similar

Re: clooj, a lightweight IDE for clojure

2011-07-19 Thread Lee Spector
On Jul 18, 2011, at 11:06 PM, Ken Wesson wrote: Or, the traditional thing: full control, but tab or something will reindent the current line, or all lines intersecting the selection if any, to structurally-correct positions based on all of the code above, if tab is hit outside a string

Re: clooj, a lightweight IDE for clojure

2011-07-19 Thread Lee Spector
On Jul 19, 2011, at 3:54 AM, Clojure Neophyte wrote: Again, for Clojure to have wider adoption it should have a beginners' IDE. It shouldn't be distributed just as jar files. FWIW I just double-clicked on the clooj jar and it launched like any other application -- I didn't have to know

Re: clooj, a lightweight IDE for clojure

2011-07-18 Thread Lee Spector
- please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -- Lee Spector, Professor of Computer Science Cognitive Science, Hampshire College 893

Re: clooj, a lightweight IDE for clojure

2011-07-18 Thread Lee Spector
On Jul 18, 2011, at 11:10 AM, Arthur Edelstein wrote: The REPL input is the lower right pane. I think I should add some labels on each pane. Ah yes -- now I see it and that works fine. Thanks also to Adam Burry for pointing this out. As Tamreen Khan noted it's a little confusing that

Re: Please stand firm against Steve Yegge's yes language push

2011-07-08 Thread Lee Spector
On Jul 8, 2011, at 1:19 AM, Ken Wesson wrote: If your programming experience lies elsewhere, or you're new to programming altogether, _insert something here_. The last one is maybe the trickiest. Best might be a good text editor for programming that isn't Emacs, combined with leiningen.

Re: Please stand firm against Steve Yegge's yes language push

2011-07-08 Thread Lee Spector
On Jul 8, 2011, at 2:39 AM, Ken Wesson wrote: (with the downside of the emacs interface learning curve, to whatever extent that can't be addressed via configuration) That's not a downside, that's a pit full of sharks with lasers on their heads, at least from your hypothetical newb's

Re: Please stand firm against Steve Yegge's yes language push

2011-07-08 Thread Lee Spector
On Jul 8, 2011, at 10:29 AM, James Keats wrote: May I also add the following caveat emptors: - If you're new to programming, clojure will overwhelm you. Start with something like python. I disagree. This is a subject of religious debates that I don't want to get into in detail, but FWIW this

Re: Please stand firm against Steve Yegge's yes language push

2011-07-08 Thread Lee Spector
On Jul 8, 2011, at 12:17 PM, Phil Hagelberg wrote: Have you tried the Vagrant approach? It's a one-button Emacs/Clojure/Leiningen hacking VM setup[1]: I haven't, although I've been watching the list traffic on this. Now I see that I must. I will! Thanks, -Lee -- You received this

Vagrant setup [was Re: Please stand firm against Steve Yegge's yes language push]

2011-07-08 Thread Lee Spector
On Jul 8, 2011, at 12:38 PM, Vivek Khurana wrote: That is still not as easy as python. Running VM is a bigger overhead... There are different kinds of overhead. If the installation and setup of the VM is simple and bullet proof then this is acceptable overhead for me. On the other hand I

Re: Vagrant setup [was Re: Please stand firm against Steve Yegge's yes language push]

2011-07-08 Thread Lee Spector
On Jul 8, 2011, at 1:02 PM, Jonathan Fischer Friberg wrote: It looks like you haven't got enough privileges, try sudo gem install vagrant Thanks. That solved some of the problems (and I would suggest that sudo be added to the vagrant readme instructions) but I still get: ERROR: Error

Re: Vagrant setup [was Re: Please stand firm against Steve Yegge's yes language push]

2011-07-08 Thread Lee Spector
On Jul 8, 2011, at 1:24 PM, Michael Klishin wrote: what does gem --version output? It was 1.3.5. To upgrade rubygems, use [sudo] gem update --system Thanks so much. I've now successfully upgraded rubygems and completed the sudo gem install vagrant step without error. I will take

Re: Please stand firm against Steve Yegge's yes language push

2011-07-08 Thread Lee Spector
On Jul 8, 2011, at 2:13 PM, Sean Corfield wrote: Now replace clojure.org/getting_started with something like that and I think most of the complaints would go away. No one needs a fancy editor / IDE setup to use Clojure - the key is just getting it installed and then a REPL to experiment and a

Re: Vagrant setup [was Re: Please stand firm against Steve Yegge's yes language push]

2011-07-08 Thread Lee Spector
On Jul 8, 2011, at 3:00 PM, Phil Hagelberg wrote: Maybe a troubleshooting section at the bottom of the readme? Sounds good to me; feel free to issue a pull request. I don't have the expertise to write such a thing. In other news, I've now done vagrant up in the directory containing the

Re: Please stand firm against Steve Yegge's yes language push

2011-07-08 Thread Lee Spector
On Jul 8, 2011, at 3:30 PM, James Keats wrote: Sam Aaron's emacs setup with cake's swank is really really nice. It could possibly be combined with a cheatsheet for emacs' most needed keyboard shortcuts. inc! May I also add that I found remapping some keyboard keys quite useful I'd

Re: Please stand firm against Steve Yegge's yes language push

2011-07-08 Thread Lee Spector
On Jul 8, 2011, at 6:23 PM, Ken Wesson wrote: If you download and install Eclipse or NetBeans they will install a JDK by default, and if you then use their internal plugin browsers to find and install CCW resp. Enclojure, they will install Clojure 1.2.0 (last time I checked) for you and set

Re: Please stand firm against Steve Yegge's yes language push

2011-07-08 Thread Lee Spector
On Jul 8, 2011, at 7:13 PM, Ken Wesson wrote: My concern there is with newbies just getting their feet wet in Clojure needing to hack a Clojure file in order to start learning how to hack Clojure files. :) Yeah, but it's a minimal copy this line and your library name goes here kind of edit

Re: Please stand firm against Steve Yegge's yes language push

2011-07-07 Thread Lee Spector
On Jul 7, 2011, at 7:29 PM, Sean Corfield wrote: And yet the #1 FAQ we see on lists and reflected in blog posts is about getting Clojure up and running... We see Java developers, committed to their favorite IDE, still asking Should I install / learn Emacs? We see old-time Lispers, happy with

<    1   2   3   4   5   >