Re: ANN: Gantry system administration and deploy tool written in clojure

2011-07-08 Thread martin_clausen
Looks very nice. You should consider supporting rsync for the upload command. On Jul 6, 10:36 pm, Damon Snyder wrote: > Hello, > I wanted to let everyone know about a tool I have been working on. I'm > calling it gantry (a type of crane that I see every day on my commute > on BART to SF and inspi

find works on transient vector but not on transient map while get works on both transient vector and map .. ?

2011-07-08 Thread Sunil S Nandihalli
Hello everybody, find works on transient vector but not on transient map while get works on both transient vector and map .. ? bitvector.core> (find {:a 1} :a) [:a 1] bitvector.core> (find (transient {:a 1}) :a) nil bitvector.core> (get (transient {:a 1}) :a) 1 bitvector.core> (get (trans

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

2011-07-08 Thread David Miller
Disclosure: I only began learning/setting up Clojure about a week ago... Despite putting a relatively sizeable chunk of time into it, I still don't have what I would consider a pleasant working environment... How about: > > GETTING STARTED > snip This would have been great - one canonical source

Multiple slime instances in Emacs

2011-07-08 Thread Marko Kocić
Is there a way to have multiple instances of Slime installed in Emacs in the same time? The problem I have is that there is official Slime git repository, and that slime is used by all Common Lisp implementation. Then there is slime used by swank-clojure, which is more than a year old slime sn

Re: Multiple slime instances in Emacs

2011-07-08 Thread Stefan Kamphausen
Hi, I don't know of any way to have different SLIMEs in one Emacs. In the past I used to call Emacs with different init-files for that, but it's not nice. However, given the differences between Clojure and CL an 'official' fork of SLIME ('JIME', 'SLJME'? ;-) for Clojure might be the way to go.

Re: Multiple slime instances in Emacs

2011-07-08 Thread Ken Wesson
On Fri, Jul 8, 2011 at 8:56 AM, Stefan Kamphausen wrote: > Hi, > > I don't know of any way to have different SLIMEs in one Emacs.  In the past > I used to call Emacs with different init-files for that, but it's not nice. > > However, given the differences between Clojure and CL an 'official' fork

Re: Any ways to prevent protocol functions from being hardcoded in?

2011-07-08 Thread David McNeil
On Jul 2, 3:07 pm, Christophe Grand wrote: > Protocols are designed with the implementer in mind, not the user. > Sometimes user-facing API and implementer-facing API overlap but it's > not a given. So, from the user point of view, protocols are an > implementation detail, they are somewhat "low-l

Java/Clojure Developer at Wall Street Bank

2011-07-08 Thread Michael
I'm looking for a java/clojure developer for my small team at a Wall Street bank. If interested, please reply to sender and we can discuss details. Thanks, Michael -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email t

Re: Any ways to prevent protocol functions from being hardcoded in?

2011-07-08 Thread Stuart Sierra
*"Recently the received wisdom has been: protocols are a low-level implementation detail. Actual APIs should be built with normal functions that call the protocol methods."* I misspoke: This is not to say that protocols *cannot* be API functions, but that protocols are not *necessarily* APIs, a

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 ne

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

2011-07-08 Thread James Keats
On Jul 8, 6:19 am, Ken Wesson wrote: > On Fri, Jul 8, 2011 at 1:07 AM, Lee Spector wrote: > > > 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, > >> com

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

2011-07-08 Thread faenvie
>>do not >>expect to start "hacking" clojure in the morning and be "productive" >>and accomplishing work in the afternoon of that same day reality is cruel: http://norvig.com/21-days.html but fair ... isn't it ? -- You received this message because you are subscribed to the Google Groups "Cloj

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 th

Using slime with remote clojure image

2011-07-08 Thread Trastabuga
Hi When I run "java -jar project-standalone.jar" running swank server in it on a remote PC. Then when I open my remote *.clj file using tramp, connect to the image with Emacs's M-x slime-connect - everything works well until I try to go to the function definition (M . or M-x slime-edit- definition

Re: [ANN] emacs-clojure-vagrant: a sane development virtual environment

2011-07-08 Thread Joseph Jones
I'm having a problem on Max OS X 10.6.8 where vagrant hangs setting up the VM right after installing jark. It seems to just stop doing anything. I initially thought that that meant it was completed but opening a new terminal window and doing vagrant ssh brought me to a VM that had nothing setup. N

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

2011-07-08 Thread Jonathan Fischer Friberg
On Fri, Jul 8, 2011 at 4:29 PM, 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 think most programming languages overwhelm you if you don't have any prior experience. I started

Re: emacs-clojure-vagrant: a sane development virtual environment

2011-07-08 Thread nil
I was using the latest VirtualBox (4.0.10) and it was complaining about a version mismatch between Guest Additions Version: 4.0.6 and VirtualBox Version: 4.0.10. So I switched to VirtualBox Version 4.0.6 instead and the output is below. It no longer complains about the mismatch. I'm continuing to

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

2011-07-08 Thread Timothy Baldridge
> I disagree. This is a subject of religious debates that I don't want to get > into in detail, but FWIW this educator thinks that Lisp is a >perfectly > defensible first language and that Clojure can serve the purpose quite well > as long as installation and tooling doesn't make it ?unnecessari

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

2011-07-08 Thread Phil Hagelberg
Lee Spector writes: > 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 le

Re: [ANN] emacs-clojure-vagrant: a sane development virtual environment

2011-07-08 Thread Stan Dyck
There was a minor bug in the provisioning script that prevented the .emacs.d directory from being populated but a fix has been pushed for that. That being said, I also had the hang issue. I did the same as you; I did a vagrant ssh from a new terminal window and everything worked. Also, after br

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 me

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

2011-07-08 Thread Vivek Khurana
On Fri, Jul 8, 2011 at 9:47 PM, Phil Hagelberg wrote: > > Have you tried the Vagrant approach? It's a one-button > Emacs/Clojure/Leiningen hacking VM setup[1]: > > https://github.com/Seajure/emacs-clojure-vagrant > > -Phil > > [1] - provided you have virtualbox. That is still not as easy as pyt

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 jus

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

2011-07-08 Thread Jonathan Fischer Friberg
It looks like you haven't got enough privileges, try "sudo gem install vagrant" Jonathan On Fri, Jul 8, 2011 at 6:58 PM, Lee Spector wrote: > > 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

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 i

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

2011-07-08 Thread Michael Klishin
2011/7/8 Lee Spector > ERROR: Error installing vagrant: >thor requires RubyGems version >= 1.3.6 > > So I guess I need to track that down... what does gem --version output? To upgrade rubygems, use [sudo] gem update --system -- MK http://github.com/michaelklishin http://twitter.co

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

2011-07-08 Thread Colin Yates
I think we need to be careful here about the association between Java and Clojure. Sure, they run on the JVM, but that is their *only* relationship (from a consumer's point of view) as far as I can see. For me, after a decade+ of developing Enterprise Java (primarily web) applications I am sick a

Re: [ANN] emacs-clojure-vagrant: a sane development virtual environment

2011-07-08 Thread Joseph Jones
When I tried bringing it down and back up, it restarted the whole process over from scratch. Basically, vagrant halt seems to cause the entire VM to disappear as if vagrant destroy was called. :-( I'll try to re-get from git and see if it works better now. On Fri, Jul 8, 2011 at 9:30 AM, Stan Dyc

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

2011-07-08 Thread James Keats
On Jul 8, 4:30 pm, Lee Spector wrote: > 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

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

2011-07-08 Thread Sean Corfield
On Fri, Jul 8, 2011 at 7:29 AM, James Keats wrote: > - If you're new to programming, clojure will overwhelm you. Start with > something like python. Totally disagree. Lisps have been many people's first introduction to programming over several decades and it works extremely well as an introductor

Emacs and clojure for newbies

2011-07-08 Thread nchubrich
> I disagree. This is a subject of religious debates that I don't want to get > into in detail, but FWIW this educator thinks that Lisp > is a perfectly > defensible first language and that Clojure can serve the purpose quite well > as long as installation and tooling > doesn't make it unnecessa

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

2011-07-08 Thread Jonathan Fischer Friberg
I don't agree that clojure is, or should be seen as something entirely different than java. If it weren't for java, clojure wouldn't have much use at all. When it comes to IDEs, I agree. I write all code in vim (for editing only), and do the rest from the command line (meaning mostly leiningen). I

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

2011-07-08 Thread nchubrich
> Read my blog post (written a year ago; updated several times to ensure > it works with newer versions of Clojure and Leiningen): > http://corfield.org/blog/post.cfm/getting-started-with-clojure > Now replace clojure.org/getting_started with something like that and I > think most of the complain

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

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

2011-07-08 Thread Colin Yates
If it weren't for McDonalds I wouldn't have such a large belly, but my belly isn't McDonalds ;) I jest (obviously!), but I do think this is a fundamental point. I (like a lot of others I expect) found Clojure and Scala whilst looking for Java.next. I read a bit about Scala, and part of its marke

Recommendation for Clojure Enterprise Development toolkit

2011-07-08 Thread Colin Yates
*This isn't meant to start a flame-war!* I am pretty convinced that I want to use Clojure as my primary tool (in place of Java/Groovy Spring and Hibernate) in writing Enterprise applications on the JVM. By Enterprise I mean that my solution has to be very stable, maintainable by others, subject t

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

2011-07-08 Thread Mark Rathwell
> > I think we need to be careful here about the association between Java > > and Clojure. Sure, they run on the JVM, but that is their *only* > > relationship (from a consumer's point of view) as far as I can see. > Clojure != Java - different paradigms, different mindsets, different > beasts

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

2011-07-08 Thread Stuart Halloway
>> Read my blog post (written a year ago; updated several times to ensure >> it works with newer versions of Clojure and Leiningen): > >> http://corfield.org/blog/post.cfm/getting-started-with-clojure > >> Now replace clojure.org/getting_started with something like that and I >> think most of the

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

2011-07-08 Thread nchubrich
Mailing my contributor agreement today so I can helpreally excited! May I just add that at the same level of prominence after the "no decisions" beginner path, we might also put a tutorial on Web (via Noir, perhaps?) and Incanter development? Those are two amazing applications of Clojurel

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

2011-07-08 Thread Phil Hagelberg
Lee Spector writes: > Thanks so much. I've now successfully upgraded rubygems and completed > the "sudo gem install vagrant" step without error. > > I will take the next steps shortly. > > Is this an okay place to make suggestions about the vagrant readme? In > addition to adding "sudo" I would s

Re: Emacs and clojure for newbies

2011-07-08 Thread James Keats
On Jul 8, 7:14 pm, nchubrich wrote: > > I disagree. This is a subject of religious debates that I don't want to get > > into in detail, but FWIW this educator thinks that Lisp > is a perfectly > > defensible first language and that Clojure can serve the purpose quite well > > as long as insta

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 an

Extending a type to an Interface

2011-07-08 Thread David Jagoe
Hi All, I am battling with how to deal with the difference between Protocols and Interfaces in a particular case. Consider the following code: (defrecord DomainTypeA [] SomeInternalProtocol (foo [this] "foo result") clojure.lang.IFn (invoke [this] "invoke result")) This code works fine

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

2011-07-08 Thread James Keats
On Jul 8, 8:02 pm, Lee Spector wrote: > > I'm with you 95% here, but I do think that this much editor "fanciness" is > needed to have a sane environment for coding lisp for anything more than a > few minutes: bracket-matching and language-aware auto-re-indenting. If > there's a straightforwar

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 th

Mutable Clojure Data Structures

2011-07-08 Thread cran1988
Hi I love Clojure ,but Clojure sucks a lot of memory and that frustrates me ! I am looking forward to find a way to put mutability in my code the same way i put immutable data structures. For example imagine ~[ 1 2 3 4 ] to be mutable vector and every semicolon that have this ~ in front to be mu

Re: Modelling complex data structures (graphs and trees for example)

2011-07-08 Thread James Keats
On Jun 16, 3:08 pm, Colin Yates wrote: > (newbie warning) > > Our current solution is an OO implementation in Groovy and Java.  We > have a (mutable) Project which has a DAG (directed acyclic graph). > This is stored as a set of nodes and edges.  There are multiple > implementations of nodes (wh

Re: Mutable Clojure Data Structures

2011-07-08 Thread Timothy Baldridge
> I love Clojure ,but Clojure sucks a lot of memory  and that frustrates > me ! I seriously doubt the memory bloat is due to the immutable structures. During a fast inner loop that is allocating tons of structures, you may see a little memory bloat, but that's only until the GC catches up. I'm pre

Re: Modelling complex data structures (graphs and trees for example)

2011-07-08 Thread James Keats
On Jul 8, 8:57 pm, James Keats wrote: > On Jun 16, 3:08 pm, Colin Yates wrote: > > (newbie warning) > > > Our current solution is an OO implementation in Groovy and Java.  We > > have a (mutable) Project which has a DAG (directed acyclic graph). > > This is stored as a set of nodes and edges.  

Re: Mutable Clojure Data Structures

2011-07-08 Thread Timothy Baldridge
On Fri, Jul 8, 2011 at 3:02 PM, Timothy Baldridge wrote: >> I love Clojure ,but Clojure sucks a lot of memory  and that frustrates >> me ! In addition to all this, remember that GC's don't instantly free memory. So if for a instance memory balloons up to 300MB, many times the JVM (or CLR) will no

Re: Mutable Clojure Data Structures

2011-07-08 Thread Stuart Halloway
> I love Clojure ,but Clojure sucks a lot of memory and that frustrates > me ! > I am looking forward to find a way to put mutability in my code the > same way i put immutable data structures. > For example imagine ~[ 1 2 3 4 ] to be mutable vector and every > semicolon that have this ~ in front t

Re: Mutable Clojure Data Structures

2011-07-08 Thread cran1988
Sorry ,I just guessed that the fault is in immutability I read about for clojure performance tips http://gnuvince.wordpress.com/2009/05/11/clojure-performance-tips/ but i feel it is not enough. On Jul 8, 11:02 pm, Timothy Baldridge wrote: > > I love Clojure ,but Clojure sucks a lot of memory

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

2011-07-08 Thread Sean Corfield
On Fri, Jul 8, 2011 at 11:50 AM, Stuart Halloway wrote: > Here's a possible plan: > 1. Core will produce a smaller, up-to-date page > for clojure.org/getting_started. This page will do less, and will link out > prominently to the contributor wiki. Turnaround time on this: probably not > before the

Re: Mutable Clojure Data Structures

2011-07-08 Thread Sean Corfield
Have you profiled your code to determine where the performance bottlenecks really are? In Java applications, even large amounts of transient memory usage are not indicative of performance problems - that's kind of the point with automatically managed memory and garbage collection systems... Sean

Re: Using slime with remote clojure image

2011-07-08 Thread Trastabuga
The topic was also raised at http://groups.google.com/group/swank-clojure/browse_thread/thread/6afd2f13ecf9e194# Probably the reason it's not implemented is that slime-machine- instance in slime.el depends on a call to (cl:machine-instance) which is not part of Clojure. I wonder if working with a

Re: Extending a type to an Interface

2011-07-08 Thread Kevin Downey
if only lisp had macros On Fri, Jul 8, 2011 at 12:16 PM, David Jagoe wrote: > Hi All, > > I am battling with how to deal with the difference between Protocols > and Interfaces in a particular case. > > Consider the following code: > > (defrecord DomainTypeA [] >  SomeInternalProtocol >  (foo [thi

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

2011-07-08 Thread Ken Wesson
On Fri, Jul 8, 2011 at 11:46 AM, Jonathan Fischer Friberg wrote: > You probably don't mean an actual "hello world" program, but let's compare > them anyway. > > python: > print "hello world" > > clojure: > (print "hello world") > > Not that much harder, is it? And probably slightly *easier* than

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

2011-07-08 Thread Ken Wesson
On Fri, Jul 8, 2011 at 12:02 PM, Timothy Baldridge wrote: > As a quick compare... > Python: > python->pygame > Clojure: > JDK->lein->clojure->penumbra 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

Re: Mutable Clojure Data Structures

2011-07-08 Thread cran1988
Thanks I will try profiling the code On Jul 9, 12:12 am, Sean Corfield wrote: > Have you profiled your code to determine where the performance > bottlenecks really are? > > In Java applications, even large amounts of transient memory usage are > not indicative of performance problems - that's kin

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

2011-07-08 Thread Ken Wesson
On Fri, Jul 8, 2011 at 12:38 PM, Vivek Khurana wrote: > On Fri, Jul 8, 2011 at 9:47 PM, Phil Hagelberg wrote: > >> Have you tried the Vagrant approach? It's a one-button >> Emacs/Clojure/Leiningen hacking VM setup[1]: >> >> https://github.com/Seajure/emacs-clojure-vagrant >> >> -Phil >> >> [1] -

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 perso

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

2011-07-08 Thread Ken Wesson
On Fri, Jul 8, 2011 at 2:23 PM, nchubrich wrote: >> Read my blog post (written a year ago; updated several times to ensure >> it works with newer versions of Clojure and Leiningen): > >> http://corfield.org/blog/post.cfm/getting-started-with-clojure > >> Now replace clojure.org/getting_started wit

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 se

Help on a Clojure performance question

2011-07-08 Thread Christopher
Hi all, I have recently been watching a set of videos from O'Reilly on MapReduce. The author of the series is using Python for all of the examples, but, in an effort to use Clojure more, I've been following along and writing my code in Clojure. When I implemented the mapper function that he descri

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

2011-07-08 Thread Ken Wesson
On Fri, Jul 8, 2011 at 3:30 PM, James Keats wrote: > May I also add that I found remapping some keyboard keys quite useful > for a sane emacs lisp editing experience. It gives me 3 ctrl keys on > the right and 3 ctrl keys on the left so I could basically use any of > my fingers, pinky to thumb, fo

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

2011-07-08 Thread Ken Wesson
On Fri, Jul 8, 2011 at 7:02 PM, Lee Spector wrote: > I think I said recently that several setups are about 95% the way to being > newbie-friendly, and while the missing 5% for emacs/lein is mostly in > installation/configuration the missing 5% for Eclipse is in project > management. People hav

Re: Help on a Clojure performance question

2011-07-08 Thread Ken Wesson
On Fri, Jul 8, 2011 at 7:05 PM, Christopher wrote: > ;; mapper.clj > > (use ['clojure.java.io :only '(reader)]) > (use ['clojure.string :only '(split)]) > > (defn mapper [lines] >  (doseq [line lines] >    (doseq [word (split line #"\s+")] >      (println (str word "\t1") > > (mapper (line-seq

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

2011-07-08 Thread Michael Klishin
2011/7/9 Ken Wesson > e.g. Python interpreter Sorry, why does "Clojure starter kit" need to embed Python? I couldn't figure it out from a few recent posts. -- MK http://github.com/michaelklishin http://twitter.com/michaelklishin -- You received this message because you are subscribed to th

Re: Help on a Clojure performance question

2011-07-08 Thread Michael Klishin
2011/7/9 Christopher > % time cake run mapper.clj < input.txt > real0m3.573s > user0m2.031s > sys 0m1.528s > These numbers include JVM startup overhead (which is significant compared to Python startup overhead). -- MK http://github.com/michaelklishin http://twitter.com/michaelklis

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

2011-07-08 Thread Ken Wesson
On Fri, Jul 8, 2011 at 7:18 PM, Michael Klishin wrote: > 2011/7/9 Ken Wesson >> >> e.g. Python interpreter > > Sorry, why does "Clojure starter kit" need to embed Python? I couldn't > figure it out from > a few recent posts. Leiningen is a script, and I thought it might be a Python script. On W

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

2011-07-08 Thread Michael Klishin
2011/7/9 Ken Wesson > Leiningen is a script, and I thought it might be a Python script. > > On Windows, the interpreter won't typically already be installed > anyway -- at least, you can't count on it. > Ken, Leiningen is not just a script. It is a Clojure application with a script that makes i

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

Re: Help on a Clojure performance question

2011-07-08 Thread Christopher
Hi Michael, Thanks for the comments, though, I want to point out that I'm using cake to run the program which keeps an instance of the JVM spun up at all times. That should remove the startup time, unless I am misunderstanding how cake works. Also, the startup time should be constant (say a few se

Re: Help on a Clojure performance question

2011-07-08 Thread Alan Malloy
On Jul 8, 4:17 pm, Ken Wesson wrote: > On Fri, Jul 8, 2011 at 7:05 PM, Christopher wrote: > > ;; mapper.clj > > > (use ['clojure.java.io :only '(reader)]) > > (use ['clojure.string :only '(split)]) > > > (defn mapper [lines] > >  (doseq [line lines] > >    (doseq [word (split line #"\s+")] > >  

Re: Extending a type to an Interface

2011-07-08 Thread Devin Walters
What I think Kevin meant to say was that you might consider using a macro. If you have questions about specifics, please do reply. This group is here to Help, and it would be a shame if a response like the previous one steered you away from asking a follow-up. Sent via mobile On Jul 8, 2011, a

Re: Help on a Clojure performance question

2011-07-08 Thread Christopher
Hi Ken, Thanks for the comment. I tried what you suggested, but I am not getting any reflection warnings. That said, comments like this are exactly what I am looking for; I had no idea that you could turn on checking for reflection issues. I'd love it if I could find a way to speed this piece of c

Re: Help on a Clojure performance question

2011-07-08 Thread Benny Tsai
Hi Christopher, I ran your code with only one modification, using the "time" macro to measure the execution time of the mapper function itself: (use ['clojure.java.io :only '(reader)]) (use ['clojure.string :only '(split)]) (defn mapper [lines] (doseq [line lines] (doseq [word (split line

Re: Help on a Clojure performance question

2011-07-08 Thread David Nolen
Running a program like that with cake run is awful, use AOT: (ns clj-play.mapper (:use [clojure.java.io :only [reader]]) (:use [clojure.string :only [split]]) (:gen-class)) (defn mapper [lines] (doseq [line lines] (doseq [word (split line #"\s+")] (println (str word "\t1"))

Re: Help on a Clojure performance question

2011-07-08 Thread David Nolen
Here's a very ugly low-level version just to show that it can be done: (ns clj-play.mapper (:use [clojure.java.io :only [reader]]) (:use [clojure.string :only [split]]) (:gen-class)) (set! *warn-on-reflection* true) (defn mapper [^java.io.BufferedReader r ^java.io.OutputStreamWriter out]

Re: Help on a Clojure performance question

2011-07-08 Thread Christopher
Thanks Benny. I tried again without using cake and just compiling the code into a jar and it does execute much better. I guess using the cake run command as a way to avoid the JVM startup overhead isn't the best option for writing highly performant code. I was kind of hoping that after the first ru

Re: Help on a Clojure performance question

2011-07-08 Thread Christopher
Hi David, Thanks for the comments and the code rewrite. This is excellent information. I just tried it out on my own system and got the same results. This is a really great example of how to optimize Clojure code. I'm considering using Clojure for some more research-oriented work where I will need

Re: Help on a Clojure performance question

2011-07-08 Thread Kenny Stone
JVM is very slow to start. Try measuring around your method calls instead. Also try running it for a long enough time to see the JVM GC kick the butt of python's GC... On Fri, Jul 8, 2011 at 6:19 PM, Michael Klishin wrote: > 2011/7/9 Christopher > >> % time cake run mapper.clj < input.txt >>

Re: [ANN] emacs-clojure-vagrant: a sane development virtual environment

2011-07-08 Thread Joseph Jones
Still no love. Same thing, only this time there wasn't even an empty .emacs.d folder. On Fri, Jul 8, 2011 at 10:51 AM, Joseph Jones wrote: > When I tried bringing it down and back up, it restarted the whole process > over from scratch. Basically, vagrant halt seems to cause the entire VM to > dis