Re: ANN Drip: A fast JVM launcher

2012-09-16 Thread Tassilo Horn
Denis Labaye writes: >> I am still seeing a new JVM being started every drip run. I am >> testing Drip 0.1.7 with Lein 2 by running lein test 5 times in a row >> with LEIN_JAVA_CMD=drip in ~/.lein/leinrc, OS X, JDK 7. > > No multiple JVM started for me (at least in my trivial tests) > > drip 0.1.

core.logic - DCG

2012-09-16 Thread Alexsandro Soares
Hi, I'm trying to write a small parser using DCG, but when I use the code below -- parser.clj --- (ns compiler.parser (:refer-clojure :exclude [==]) (:use [clojure.core.logic] [clojure.core.logic.dcg] ) ) (def-->e token [tg x] ([_ ?tk] [?tk] (

Re: Why do Clojure collections have (seq) rather than supporting the ISeq interface directly?

2012-09-16 Thread Stuart Sierra
Mostly efficiency. A Seq generally gives you access to `first` and `rest` in constant time. Vectors, to take one example, cannot give you `rest` efficiently, but a Seq backed by the vector can. Clojure lists are implemented as singly-linked lists, which do have first/rest pointers, so they impl

Some feedback on clojurescript

2012-09-16 Thread Irakli Gozalishvili
Hi Folks, I'm still new to clojurescript, but I thought I would share with you some of the annoyances that person person coming from JS (like myself) will likely run into: http://jeditoolkit.com/2012/09/16/coljurescript-feedback.html Regards -- Irakli Gozalishvili Web: http://www.jeditoolkit

Re: Is anyone relying on the js* special form?

2012-09-16 Thread Alexander Hudek
>From your description of how proxy would work, yes. On Sunday, September 16, 2012 6:48:44 PM UTC-4, Brandon Bloom wrote: > > Would it be correct to interpret this as another vote for JVM Clojure's > proxy macro? > > On Wednesday, September 12, 2012 7:16:37 PM UTC-7, Alexander Hudek wrote: >> >>

Calling Clojurescript code from Clojure

2012-09-16 Thread Brent Millare
Background: I'm developing a web based development environment. Problem: Is there a way to evaluate clojurescript code from clojure? I need to call clojurescript code like (load-file "foo.cljs") from clojure. Note this is different then starting a clojurescript repl and typing in (load-file "fo

Re: Is anyone relying on the js* special form?

2012-09-16 Thread Brandon Bloom
Would it be correct to interpret this as another vote for JVM Clojure's proxy macro? On Wednesday, September 12, 2012 7:16:37 PM UTC-7, Alexander Hudek wrote: > > I've used it in conjunction with goog/base due to a problem with > simple/advanced compilation. I'm not sure if things have changed s

Modelling for DAG with identity map - or not?

2012-09-16 Thread Patrik Sundberg
Hi, I'm a newbie at clojure and functional programming and I'm toying with the idea of switching a project of mine to clojure. Sorry for a long first post, and it may also be a bit abstract - but you never know before trying :) In my previous OO prototype the domain is modelled via 2 basic pri

Why do Clojure collections have (seq) rather than supporting the ISeq interface directly?

2012-09-16 Thread Alex Dowad
...Just trying to understand the rationale between Clojure's design here. As I gradually get deeper into Clojure, I've been highly impressed by how well thought-out everything is, so I'm sure there is a very good reason for this one too. The question is: Why are Clojure's built-in collections *

Re: Can't start Rhino repl for ClojureScript

2012-09-16 Thread Stuart Sierra
Leiningen works under Windows (as lein.bat). I'm not sure if it works under Cygwin. I've encountered problems in the past with Cygwin because the Java executable is the Windows version, using Windows path-separator characters, but scripts expect Unix-style path separators. Try downloading Lein

Re: Using println inside a for print out some "nil"

2012-09-16 Thread Andy Fingerhut
println is a function that has the side effect of printing a string to the output, but it also has a return value of nil. When working at the REPL, these can sometimes be mingled together due to the order of evaluation. If you want to do something like 'for' but only for the purposes of side e

Re: ANN Drip: A fast JVM launcher

2012-09-16 Thread Denis Labaye
On Sun, Sep 16, 2012 at 8:59 PM, Michael Klishin < michael.s.klis...@gmail.com> wrote: > Denis Labaye: > > After the bug fix on ubuntu: >> >> denis@zeus:~/.m2$ time drip -cp ./repository/org/clojure/** >> clojure/1.4.0/clojure-1.4.0.**jar clojure.main -e "(reduce + (range >> 100))" >> 4950 >> >> r

Re: Is anyone relying on the js* special form?

2012-09-16 Thread Alexander Hudek
I've used it in conjunction with goog/base due to a problem with simple/advanced compilation. I'm not sure if things have changed since I encountered this problem, or if there is something else I'm doing wrong. See the code and comment below. The deactivated "this-as" code only worked with whit

Re: Question: Looking at Noir code - hey, are those singletons?

2012-09-16 Thread Sung Pae
On Thu, Sep 13, 2012 at 12:56:47PM -0400, Chas Emerick wrote: > One of the great advantages of Ring (and other purely functional bits > that stack on top, like Compojure, Bishop, etc) is that its handlers > are readily composable. Among other things, this means that way you > compose handlers from

Re: Immutant 0.3.0 released

2012-09-16 Thread Ali M
Greetings Jim Can you please elaborate more on this line ... maybe give examples On Wednesday, September 12, 2012 3:45:56 AM UTC+2, Jim Crossley wrote: > > ... > For certain applications, I would recommend using libraries to access > external processes like Memcached, RabbitMQ, or cron, for exa

Using println inside a for print out some "nil"

2012-09-16 Thread Giuliani Sanches
Hi guys, Maybe the subject does not give a got clue about my question, so here's a snippet of code: http://pastebin.com/tJNhabJw Could you please help me to understand why in the second case the output is (Juice Sandwich nil Banana nil nil) ? Where these "nil" came from ? Thank you! -- Y

Re: Clojurescript/facebook JS-SDK

2012-09-16 Thread Kris Jenkins
Hi Mimmo, I don't really have an answer to this, but I share your interest in the question. The only thing I can suggest is taking a look at Jayq. It's a ClojureScript wrapper around jQuery. It wrapping a large & complex existing JavaScript API, successfully,

println inside a inside a for print some "nil values"

2012-09-16 Thread Giuliani Sanches
Hi guys. In this code http://pastebin.com/tJNhabJw When the second case is executed the output is: The output is (Juice Sandwich nil Banana nil nil) Where these "nil" come from ? Thanks -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to

slime-ritz help needed on clean emacs 24.2.1 new setup

2012-09-16 Thread sal
Hi Everyone, Trying to setup emacs 24.2 on mac osx clean setup, nothing else. clojure-mode 20120808 installed Major mode for Clojure code [source: github] nrepl 20120912.248 installed Client for Clojure nREPL [source: github] nrepl-ritz 20120913 installed nrepl ext

Multi Method Namespace Structure

2012-09-16 Thread rod naph
Hi, I'm trying to use multi-methods, with the implementations broken over a few namespaces, but am a little confused as to the best way to structure this. At the moment i have this in two namespaces/files... (ns jiff.vcs) (defmulti jiff-seq :vcs) (ns jiff.svn (:use jiff.vcs)) ;; svn impl... B

Nested functions on #() reader

2012-09-16 Thread vhsmaia
Hello. I'm new here, so, not sure if those were already posted. But why is this not used? An example would be: #(%a %%b %%%c) would be the same as (fn [a] (fn [b] (fn [c] (a b c))) -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group

Re: ANN Drip: A fast JVM launcher

2012-09-16 Thread Michael Klishin
Denis Labaye: After the bug fix on ubuntu: > > denis@zeus:~/.m2$ time drip -cp > ./repository/org/clojure/clojure/1.4.0/clojure-1.4.0.jar clojure.main -e > "(reduce + (range 100))" > 4950 > > real0m0.123s > user0m0.032s > sys 0m0.016s > denis@zeus:~/.m2$ time java -cp > ./repositor

Re: ANN Drip: A fast JVM launcher

2012-09-16 Thread Denis Labaye
After the bug fix on ubuntu: denis@zeus:~/.m2$ time drip -cp ./repository/org/clojure/clojure/1.4.0/clojure-1.4.0.jar clojure.main -e "(reduce + (range 100))" 4950 real0m0.123s user0m0.032s sys 0m0.016s denis@zeus:~/.m2$ time java -cp ./repository/org/clojure/clojure/1.4.0/clojure-1.4

Re: idiomatic use of iterate + cycle ?

2012-09-16 Thread Jim - FooBar();
exactly!!! this is great stuff indeed! I spent all morning trying to find more info than the actual docstring but I can't find anything! It seems to work as advertised though...very handy but it only works with 1.5 :-) (reduce #(if (= 3 %2) (reduced %) (conj % %2)) [] (range 5)) =>[0 1 2] J

Re: idiomatic use of iterate + cycle ?

2012-09-16 Thread Sean Corfield
On Sun, Sep 16, 2012 at 5:15 AM, Jim - FooBar(); wrote: > It turns out that reduce is exactly what I need...I didn't know this but > there is a handy 'reduced' fn that makes it easy to terminate from within a > reduce at any given time. At least this is what i understand from the > docs...so the f

Re: [ANN] clj-ns-browser 1.3.0 - the "cool button-row widget" release

2012-09-16 Thread Denis Labaye
On Fri, Sep 14, 2012 at 7:53 PM, Frank Siebenlist < frank.siebenl...@gmail.com> wrote: > We're happy to announce the new clj-ns-browser 1.3.0 - the "cool > button-row widget" - release. > > The Clojure Namespace Browser is a GUI-based, Smalltalk-like development > tool that makes it easy to see, i

Re: idiomatic use of iterate + cycle ?

2012-09-16 Thread Jim - FooBar();
Hi again, It turns out that reduce is exactly what I need...I didn't know this but there is a handy 'reduced' fn that makes it easy to terminate from within a reduce at any given time. At least this is what i understand from the docs...so the final thing looks like this: (defn tournament "St

idiomatic use of iterate + cycle ?

2012-09-16 Thread Jim - FooBar();
Hi all, I'm trying to come up with a way to create a 'tournament' fn that basically alternates between players (in turns) and calls soem 'move' fn on each. Now, obviously this can be done with loop/recur no problem, however perhaps a combination of cycle & iterate is more appropriate...so I'm