Re: Problems with Leiningen and Clojure 1.4

2012-09-02 Thread Denis Labaye
On Fri, Aug 31, 2012 at 7:38 PM, Martin wrote: > Hi > > Im having problems using Leiningen together with Clojure 1.4 (and 1.3) on > Windows 7. Using Leiningen version 1.5.2 I can create a new project and use > lein deps to download clojure version 1.2.1. However if I change > dependencies in proj

Re: Possible to merge destructuring :or defaults with :as?

2012-09-02 Thread Peter Taoussanis
Hi Stephen, Thanks for the reply! Such behavior would be quite surprising; to see why, desugar :keys: I may well be missing something, but I'm not sure I see your problem here. (defn foo [& {x :x y :y :as args :or {x "x-default" y "y-default"}}] args) This is checking input args for an :x k

Re: Why IPersistentList doesn't extend ISeq?

2012-09-02 Thread Philip Potter
I should really check the source before replying. EmptyList does indeed implement ISeq, so my argument doesn't hold. Phil On 3 September 2012 07:01, Philip Potter wrote: > The docs you quoted seem to answer your question. > > Not all lists are valid seqs. In particular, the empty list is a valid

Re: ANN: ClojureSphere updated

2012-09-02 Thread Michael Klishin
2012/9/3 Justin Kramer > ClojureSphere has been updated with a new domain, refreshed index, and > some new features: > > http://www.clojuresphere.com/ > Justin, The new version looks great! I have noticed that ClojureSphere points to a fork of the Midje repository at https://github.com/bmabey/

Re: using take-while with pred function that has state

2012-09-02 Thread Ben Wolfson
On Sun, Sep 2, 2012 at 10:25 PM, Stephen Compall wrote: > On Fri, 2012-08-31 at 05:08 -0700, shaobohou wrote: >> I have written the following function using take-while and a pred >> function with an atom to store the set of unique tokens. It works > > Only because in the current implementation, ta

Re: Why IPersistentList doesn't extend ISeq?

2012-09-02 Thread Philip Potter
The docs you quoted seem to answer your question. Not all lists are valid seqs. In particular, the empty list is a valid list but not a valid seq. So if the empty list implemented ISeq, it would be lying. If the empty list implements IPersistentList, then IPersistentList can't implement ISeq. Phi

Re: Problems importing java classes

2012-09-02 Thread Stephen Compall
On Fri, 2012-08-31 at 22:22 -0700, Daniel Woelfel wrote: > Caused by: java.lang.ClassNotFoundException: > org.opensourcephysics.controls.AbstractSimulation > (ns fractal.fractalapp > (:import [org.opensourcephysics.frames PlotFrame] >[org.opens

Re: using take-while with pred function that has state

2012-09-02 Thread Stephen Compall
On Fri, 2012-08-31 at 05:08 -0700, shaobohou wrote: > I have written the following function using take-while and a pred > function with an atom to store the set of unique tokens. It works Only because in the current implementation, take-while happens to be called in coll order, which is not a guar

Re: Advice/recommendations for generating templated (non-Clojure) s-expressions?

2012-09-02 Thread Maik Schünemann
Hi If the sexp will not be evaluated from clojure code, why aren't you using a function to generate the code instead of a macro. That avoids the namespace resolution. If you want to go with macros, there is a trick to turn namespace resolution of. just unquote like this @': Am 03.09.2012 01:07 sc

ANN: ClojureSphere updated

2012-09-02 Thread Justin Kramer
ClojureSphere has been updated with a new domain, refreshed index, and some new features: http://www.clojuresphere.com/ ClojureSphere lets you browse the dependency graph of the open source Clojure ecosystem. The dependency information is provides now is slightly more accurate and useful. The

Re: Why IPersistentList doesn't extend ISeq?

2012-09-02 Thread Tamreen Khan
Sorry, I meant IPersistentList and PersistentList in the first sentence of my previous email. On Sun, Sep 2, 2012 at 11:00 PM, Tamreen Khan wrote: > First, IPersistentSeq is the interface, PersistentSeq is the actual class. > > If you look at it a little more closely, PersistentList extends ASeq

Re: Why IPersistentList doesn't extend ISeq?

2012-09-02 Thread Tamreen Khan
First, IPersistentSeq is the interface, PersistentSeq is the actual class. If you look at it a little more closely, PersistentList extends ASeq, which is an abstract class. ASeq implements the ISeq interface. So PersistentList does implement ISeq through its parent class. https://github.com/cloju

Re: webnoir on openshift (Paas by RedHat), little guide

2012-09-02 Thread Raoul Duke
now if only they had a webinar that explained the utterly horrendous leagaleze nightmare tolsoty-length terms and conditions. On Fri, Aug 31, 2012 at 2:49 PM, John Holland wrote: > This is awesome! > > On Friday, August 31, 2012 4:31:38 PM UTC-4, Simone Mosciatti wrote: >> >> A little guide to us

Reflecting over protocols in macros for clojurescript

2012-09-02 Thread Ceri Storey
Hi there. I'm having a play around with ClojureScript, and I'd find it really useful to be able to be able to create some Mockito style test spies. Ultimately, I'd like to be able to generate a spy by reflecting over a protocol and find out what operations it supports programatically. However, no

Problems with Leiningen and Clojure 1.4

2012-09-02 Thread Martin
Hi Im having problems using Leiningen together with Clojure 1.4 (and 1.3) on Windows 7. Using Leiningen version 1.5.2 I can create a new project and use lein deps to download clojure version 1.2.1. However if I change dependencies in project.clj to org.clojure/clojure "1.4.0", I run into troub

Re: Code retreat exercices where Clojure could shine?

2012-09-02 Thread Alex Walker
If the audience is largely Java, then http://www.infoq.com/presentations/Clojure-Java-Interop ; The isBlank refactoring starting at about 13:50 is worth considering as a starting point. On Thursday, August 30, 2012 8:53:16 AM UTC-5, Denis Labaye wrote: > > > > On Thu, Aug 30, 2012 at 12:20 AM,

Why IPersistentList doesn't extend ISeq?

2012-09-02 Thread Andrei Zhlobich
Why IPersistentList doesn't extend ISeq? Clojure docs say: >> Lists are collections. They implement the ISeq interface directly (except for the empty list, which is not a valid seq) At this moment EmptyList implements ISeq, but PersistentList doesn't. It seems very strange for me. Also Persist

Clojurescript keywords starting with numbers and read-string

2012-09-02 Thread Jens Haase
Hi, I have a problem with read-string in Clojurescript. Reading keywords starting with a number will fail: (cljs.reader/read-string ":123") (cljs.reader/read-string ":1abc") Both will return following error: "Uncaught TypeError: Cannot read property '0' of null" I think this is a bug. Any sug

Re: European conferences in 2012?

2012-09-02 Thread Andrew Jones
On 29 August 2012 14:08, Jonathan Lange wrote: > Just wondering if there are any conferences in Europe coming up in the > remainder of the year that would be of interest to someone interested > in Clojure? There's FP Days in Cambridge, UK on October 25th and 26th. http://www.fpdays.net/fpdays2012

How to run Clooj?

2012-09-02 Thread gearss
I am new to Clojure, I want to know how ot run the Clooj IDE? If it needs to install Clojure to my computer, or every time I use java -cp /path/to/the/clojure.jar clojure.main /path/to/your/code.clj to run my code? -- You received this message because you are subscribed to the Google Groups "

Why IPersistentList doesn't extend ISeq?

2012-09-02 Thread Andrei Zhlobich
>From docs: >> Lists are collections. They implement the ISeq interface directly (except for the empty list, which is not a valid seq). But at this time IPersistentList does not extend ISeq (but PersistentList does). It sees a bit strange. Also PersistentQueue implements IPersistentList. Seman

Problems importing java classes

2012-09-02 Thread Daniel Woelfel
I'm attempting to translate some exercises from the book Introduction to Computer Simulation Methods from Java to Clojure. First, I packaged up the opensourcephysics source codeand sub

I want to know how can I run it?

2012-09-02 Thread gearss
I have a file named pong.clj, it isunder following, I want to know how can I run it? Thank you. (ns example.game.pong (:use [penumbra opengl] [clojure.contrib.def]) (:require [penumbra [app :as app] [text :as text]])) (def ball-width 0.03) (def ball-height 0.03) (def paddle-

using take-while with pred function that has state

2012-09-02 Thread shaobohou
Hi, I am trying to write a function which takes a list of strings, tokenize each one, and maximise N such that the number of unique tokens in the first N strings is less than some number M. I have written the following function using take-while and a pred function with an atom to store the se

Advice/recommendations for generating templated (non-Clojure) s-expressions?

2012-09-02 Thread Don Jackson
‎ Hello, I want to generate non-Clojure s-expressions in Clojure code, with a nice templating format (like syntax-quote provides), BUT with the option of providing my own methods/functions for resolving/processing symbols, and the ability to provide my own methods/functions for evaluating synta

Re: Status of the ClojureScript pluggable backend changes

2012-09-02 Thread David Nolen
On Sun, Sep 2, 2012 at 5:59 PM, Timothy Baldridge wrote: > What is the status of the Clojurescript pluggable backend? Are the latest > changes in the main trunk? Are their any plans to do this? I'd like to work > on an alternate back-end and I'd like to take advantage of this code. > > Timothy Th

Clojure / RootBeer / CUDA / GPU

2012-09-02 Thread Jules
Guys, Has anyone read about RootBeer - https://github.com/pcpratts/rootbeer1 My understanding is that it can compile Java bytecode -> CUDA GPU code. A Java class that you want to run on your CUDA GPU must subclass the RootBeer Kernel interface. So, I wondering what would happen if I 1) imple

Re: screencast corruption

2012-09-02 Thread Sean Corfield
Thanx Ben. That's the first time I've seen that preso and it really does help things "click" regarding the seq abstraction! On Sun, Sep 2, 2012 at 12:43 PM, Ben Smith-Mannschott wrote: > You should be able to download it from here for the next few days: > > https://dl.dropbox.com/u/8238674/clojur

Re: Possible to merge destructuring :or defaults with :as?

2012-09-02 Thread Stephen Compall
On Fri, 2012-08-31 at 03:40 -0700, Peter Taoussanis wrote: > (foo) => {:x "x-default" :y "y-default} > > > I.e. to merge the :or defaults over the :args binding? Such behavior would be quite surprising; to see why, desugar :keys: {x (expr-that-computes :x), y (expr-that-computes :y), z (expr-

Status of the ClojureScript pluggable backend changes

2012-09-02 Thread Timothy Baldridge
What is the status of the Clojurescript pluggable backend? Are the latest changes in the main trunk? Are their any plans to do this? I'd like to work on an alternate back-end and I'd like to take advantage of this code. Timothy -- “One of the main causes of the fall of the Roman Empire was that–

Re: screencast corruption

2012-09-02 Thread Ben Smith-Mannschott
You should be able to download it from here for the next few days: https://dl.dropbox.com/u/8238674/clojure-sequences.mov // Ben On Sun, Sep 2, 2012 at 6:56 PM, Andrew Rafas wrote: > I would appreciate, > Thank you very much, > Andrew > > > On Sunday, September 2, 2012 4:19:10 PM UTC+1, bsmith.

Re: Question about sets

2012-09-02 Thread vemv
This issue best illustrates how imperative and functional thinking differ. When I write code such as (map not [true false]) , I implicitly think imperatively: "compiler, please traverse this collection, applying 'not to each element...". I could also word my thoughts functionally: "I desire the

Re: quick question about #'

2012-09-02 Thread Moritz Ulrich
I usually store vars to functions when developing in the REPL. The practical difference is that when you redefine `foo' in the above example, calls via the `actions' map will use the "old" function as the function itself ist stored, while after redefining `bar' calls through `actions' will use the

Re: screencast corruption

2012-09-02 Thread Andrew Rafas
I would appreciate, Thank you very much, Andrew On Sunday, September 2, 2012 4:19:10 PM UTC+1, bsmith.occs wrote: > > I can't fix the version posted on blip.tv, but I downloaded it over a > year ago when it was still working. > > It's a 107 MB quicktime file encoded using H.264. Running time is

Re: screencast corruption

2012-09-02 Thread Ben Smith-Mannschott
I can't fix the version posted on blip.tv, but I downloaded it over a year ago when it was still working. It's a 107 MB quicktime file encoded using H.264. Running time is 1 hour 14 minutes. I could make it available somewhere, if that would help. // Ben On Sun, Sep 2, 2012 at 12:37 PM, Mayank

Re: quick question about #'

2012-09-02 Thread nicolas.o...@gmail.com
I tend to like 1 better. I do not like working with vars without a good reason. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be pa

quick question about #'

2012-09-02 Thread Jim - FooBar();
Hi all, I was just wondering whether there is any particular preference between storing fns in maps via #' or simply the name of the var? example: (defn foo [a b] ...) (defn bar [c d] ...) (def actions {:act-foo foo ;;1st :act-bar #'bar}) ;;2nd I understand that the firs

Re: screencast corruption

2012-09-02 Thread Mayank Jain
Confirmed. The video is indeed broken. On Sun, Sep 2, 2012 at 3:34 PM, Andrew Rafas wrote: > Hi! > > I just wanted to watch this screencast (Clojure Sequences) as I really > need that little table which compares C#, Java and Clojure sequences. > However the video on this link seems to be like 5

IPersistentStack semantics and PersistentQueue

2012-09-02 Thread Philip Potter
Hi all, Does IPersistentStack have defined stack semantics? I'm confused because IPersistentStack defines peek and pop and (via IPersistentCollection) conj. I had previously expected that peek and pop would remove from the same end that conj adds to, as happens with lists and vectors, in order to

screencast corruption

2012-09-02 Thread Andrew Rafas
Hi! I just wanted to watch this screencast (Clojure Sequences) as I really need that little table which compares C#, Java and Clojure sequences. However the video on this link seems to be like 5 seconds long instead of more than an hour. Can you fix it? Or do you have the slides somewhere? http

Re: 'connection reset by peer' when connecting to socket

2012-09-02 Thread Michael Wood
Hi On 2 September 2012 02:02, larry google groups wrote: > This is probably more of a socket and network question than a Clojure > question. I am learning Clojure and wanted to serve a web page through a > simple app, mostly to teach myself how to put together such an app in > Clojure. I grabbed