Re: Adding primitive type hints to anonymous functions

2012-01-25 Thread Tassilo Horn
Hi again, I think, I got it. I wrote a little helper function to print the metadata of a form: --8---cut here---start-8--- (use 'clojure.walk) (defn print-meta ([form level] (prewalk (fn [x] (when-let [m (meta x)] (println Level

Accessing vals in clojure.lang.PersistentVector

2012-01-25 Thread Simon Holgate
Hi, I've retrieved some data from my database which is returned as a clojure.lang.PersistentVector: org.psmsl.netcdf.core res [{:name BREST, :time #Date 1807-01-01, :rlrdata 6882M} {:name BREST, :time #Date 1807-02-01, :rlrdata 6908M} {:name BREST, :time #Date 1807-03-01, :rlrdata 6873M}...{:name

Re: Accessing vals in clojure.lang.PersistentVector

2012-01-25 Thread Simon Holgate
Answering myself, I see that I need to do: (vals (res 1)) -- 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 patient with your first

Re: Accessing vals in clojure.lang.PersistentVector

2012-01-25 Thread Rasmus Svensson
On Wed, Jan 25, 2012 at 10:45 AM, Simon Holgate simon.holg...@gmail.com wrote: I've retrieved some data from my database which is returned as a clojure.lang.PersistentVector: org.psmsl.netcdf.core res [{:name BREST, :time #Date 1807-01-01, :rlrdata 6882M} {:name BREST, :time #Date 1807-02-01,

Re: Is this a bug? extending protocol on js/Object

2012-01-25 Thread David Nolen
On Fri, Jan 13, 2012 at 1:32 PM, Jozef Wagner jozef.wag...@gmail.comwrote: How about using (extend-type default ...) ? Is it safe to use it? Oops, extend-type with default does work and it seems to work well. David -- You received this message because you are subscribed to the Google Groups

Re: Adding primitive type hints to anonymous functions

2012-01-25 Thread Ben Mabey
On 1/25/12 2:25 AM, Tassilo Horn wrote: Hi again, I think, I got it. I wrote a little helper function to print the metadata of a form: --8---cut here---start-8--- (use 'clojure.walk) (defn print-meta ([form level] (prewalk (fn [x]

Re: Is this a bug? extending protocol on js/Object

2012-01-25 Thread Takahiro
How about using (extend-type default ...) ? Is it safe to use it? Oops, extend-type with default does work and it seems to work well. This is what I am looking for! Thanks. 2012/1/26 David Nolen dnolen.li...@gmail.com: On Fri, Jan 13, 2012 at 1:32 PM, Jozef Wagner jozef.wag...@gmail.com

Re: Adding primitive type hints to anonymous functions

2012-01-25 Thread Tassilo Horn
Ben Mabey b...@benmabey.com writes: Am I missing something, or does the new primitive support only apply to bound functions? On the one hand, the docs don't mention such a restriction, but on the other hand, all examples given are always defn-defined. I tried to look into the compiler to find

Re: ClojureScript One - Getting Started with ClojureScript

2012-01-25 Thread Raju Bitter
ClojureScript One is fantastic! Great work, thanks! I just have one question, am running it on Ubuntu Linux. How can I set the browser when I launch inferior/lisp script/cljs-repl? On Linux, a Java based browser window is opened, and the page is not rendered correctly? Thanks again, - Raju --

Re: ClojureScript One - Getting Started with ClojureScript

2012-01-25 Thread Raju Bitter
clojure.java.browse/open-url-in-swing is called a fallback method, and then the ClojureScript app is not rendered correctly. http://bit.ly/yPagHl I'll see if I can create a workaround for that. - Raju -- You received this message because you are subscribed to the Google Groups Clojure group.

No support for primitive type returns within protocols (1.3)?

2012-01-25 Thread Ben Mabey
Hi again, Is it possible to add primitive type hints to protocols (as the return type)? My attempt below failed: (definterface IPrimitiveTester (getType [^int x]) (getType [^long x]) (getType [^float x]) (getType [^double x]) (getType [^Object x])) (deftype PrimitiveTester []

[ANN] New Version of ClojureScript One

2012-01-25 Thread Brenton
We have released a new version of ClojureScript One. The most significant changes are: No more scripts! Everything now works through Leiningen. We have added support for retrieveing git dependencies via Leiningen. Allow connections to the REPL form remote machines. See the change log:

Re: No support for primitive type returns within protocols (1.3)?

2012-01-25 Thread David Nolen
On Wed, Jan 25, 2012 at 3:34 PM, Ben Mabey b...@benmabey.com wrote: Hi again, Is it possible to add primitive type hints to protocols (as the return type)? My attempt below failed: (definterface IPrimitiveTester (getType [^int x]) (getType [^long x]) (getType [^float x]) (getType

Re: No support for primitive type returns within protocols (1.3)?

2012-01-25 Thread Ben Mabey
On 1/25/12 1:41 PM, David Nolen wrote: On Wed, Jan 25, 2012 at 3:34 PM, Ben Mabey b...@benmabey.com mailto:b...@benmabey.com wrote: Hi again, Is it possible to add primitive type hints to protocols (as the return type)? My attempt below failed: (definterface IPrimitiveTester

Re: [ANN] New Version of ClojureScript One

2012-01-25 Thread Ryan Waters
On Wed, Jan 25, 2012 at 2:40 PM, Brenton bashw...@gmail.com wrote: We have released a new version of ClojureScript One. ... No more scripts! Everything now works through Leiningen. We have added support for retrieveing git dependencies via Leiningen. It's nice that leiningen can handle the

Re: [ANN] New Version of ClojureScript One

2012-01-25 Thread Sam Aaron
Very nice :-) I've got some quality code reading ahead of me... One quick question - why do you still rely on git checkouts of ClojureScript and Domina - especially now ClojureScript is available on maven? Sam --- http://sam.aaron.name On 25 Jan 2012, at 20:40, Brenton wrote: We have

Re: ClojureScript One - Getting Started with ClojureScript

2012-01-25 Thread Brenton
With the recent update, we no longer have a script/cljs-repl. You would now use: lein repl (go) to accomplish the same thing. In your case, you can use: lein repl (binding [*open-url-script* x] (go)) Brenton On Jan 25, 3:19 pm, Raju Bitter rajubit...@googlemail.com wrote:

Re: No support for primitive type returns within protocols (1.3)?

2012-01-25 Thread David Nolen
On Wed, Jan 25, 2012 at 3:51 PM, Ben Mabey b...@benmabey.com wrote: On 1/25/12 1:41 PM, David Nolen wrote: On Wed, Jan 25, 2012 at 3:34 PM, Ben Mabey b...@benmabey.com wrote: Hi again, Is it possible to add primitive type hints to protocols (as the return type)? My attempt below failed:

Re: Adding primitive type hints to anonymous functions

2012-01-25 Thread Cedric Greevey
On Wed, Jan 25, 2012 at 11:58 AM, Ben Mabey b...@benmabey.com wrote: On 1/25/12 2:25 AM, Tassilo Horn wrote: Hi again, I think, I got it.  I wrote a little helper function to print the metadata of a form: --8---cut here---start-8--- (use 'clojure.walk)

Re: [ANN] New Version of ClojureScript One

2012-01-25 Thread Stuart Sierra
Why git checkouts? We don't have automated Maven releases of ClojureScript yet, so to pull the latest code it needs to get it from git. Maybe this Friday I'll be able to get automated releases up on Hudson. -S -- You received this message because you are subscribed to the Google Groups

Re: New Version of ClojureScript One

2012-01-25 Thread Rafał Babinicz
Thanks for great work, Brenton. Keep it coming! PS I stubbed sever side of 'CS One's example, but still have some troubles with making it work on mobile browsers. Anybody try this with success? -- You received this message because you are subscribed to the Google Groups Clojure group. To post

Setting up Emacs to edit Clojure for Windows folks

2012-01-25 Thread Rick Hall
I tried to set up a development environment for Clojure on a Windows box. As you all know there are lots of editors available and multiple ways of setting up each editor. There are also several versions of instructions as the process has changed over time. I have virtually never ventured out of

Re: Clojure for Cocoa

2012-01-25 Thread D.Theisen
Hello, Matthias! On Jan 24, 6:53 am, Matthias Benkard mulkiat...@gmail.com wrote: Toilet Lisp is an incomplete implementation of Common Lisp hosted on the Objective-C runtime.  It includes both an interpreter and an LLVM- based compiler, which, IIRC, are actually complete.  (It's the standard

Re: How to add a new type of collection?

2012-01-25 Thread joachim
Great, thanks people. So to be surfe I understand, let me summarize as follows: There are two ways to go: (1) import the existing sparse matrix class in my clojure project and wrap a new type around it that implements all required java interfaces (using them as protocols) (2) code a new java

Re: Concurrency Talk materials

2012-01-25 Thread Sergey Stupin
Thank you sooo much. Its exactly that i was searching for. I have not thought of googling ClojureConcurrencyTalk.pdf. My queries were just like clojure concurrency talk slides. Thank you! -- You received this message because you are subscribed to the Google Groups Clojure group. To post to

One-day conference: Functional Programming eXchange, March 16th, London

2012-01-25 Thread Anaïs
You're invited to our 1-day conference on Functional Programming at the Skills Matter eXchange, London's meetup space for the developer community. Join leading experts in the field to learn and share the latest innovative ideas, best tools and practices in the different programming languages

Re: Setting up Emacs to edit Clojure for Windows folks

2012-01-25 Thread Phil Hagelberg
Rick Hall rickhall2...@hotmail.com writes: I have written a blog post that shows how to install the jdk, leigingen, emacs, clojure-mode and slime. The level of detail in some places may seem excessive, but given the amount of time it took me to comprehend instructions like: from within a

Re: New Version of ClojureScript One

2012-01-25 Thread Brenton
One quick question - why do you still rely on git checkouts of ClojureScript and Domina - especially now ClojureScript is available on maven? ClojureScript will continue to change rapidly. We are already depending on a newer version than the one in Maven. Also, I don't think that Domina has a

Re: Setting up Emacs to edit Clojure for Windows folks

2012-01-25 Thread daly
On Wed, 2012-01-25 at 11:59 -0800, Rick Hall wrote: I tried to set up a development environment for Clojure on a Windows box. As you all know there are lots of editors available and multiple ways of setting up each editor. There are also several versions of instructions as the process has

Re: Setting up Emacs to edit Clojure for Windows folks

2012-01-25 Thread Sean Corfield
On Wed, Jan 25, 2012 at 11:59 AM, Rick Hall rickhall2...@hotmail.com wrote: For anyone who needs the help, the post is here: http://onbeyondlambda.blogspot.com/2012/01/setting-up-clojure-emacs-on-windows.html Thanx Rick. I started down a similar path and got these instruction pulled together:

ClojureScript One bootstrap problem on Windows?

2012-01-25 Thread David Powell
Hmm, I seem to be having a problem with the new bootstrap script. On Windows, I'm running: git version 1.7.7.msysgit.1 This release puts: c:\Program Files (x86)\Git\cmd\ on the PATH, which contains a git.cmd (batch file) which runs the .exe. Unfortunately, Runtime.exec won't run batch files

Re: ClojureScript One - Getting Started with ClojureScript

2012-01-25 Thread Raju Bitter
Thanks for your response, Brenton. 2012/1/25 Brenton bashw...@gmail.com: With the recent update, we no longer have a script/cljs-repl. You would now use: lein repl (go) That works on OS X. On Ubuntu 11.04 - with a clean system (no Leiningen / Clojure installed), I do 1) Install Leiningen,

Re: ClojureScript One - Getting Started with ClojureScript

2012-01-25 Thread Raju Bitter
3) Try to launch the repl, but that fails. Seems to be a classpath issue, looks like Leiningen is not finding the Clojure JAR file. Any idea what this might be? raju@titan:~/test/one$ lein repl Exception in thread main java.lang.RuntimeException: java.lang.NoSuchMethodError:

Re: ClojureScript One - Getting Started with ClojureScript

2012-01-25 Thread Raju Bitter
I don't have a $CLASSPATH set, and no ~/.clojure folder, so there shouldn't be any conflicting Clojure JAR file on the classpath. - Raju -- 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

Re: Setting up Emacs to edit Clojure for Windows folks

2012-01-25 Thread Cedric Greevey
I think it may be worth noting the size and complexity of that blog post in contrast to these: Netbeans setup on Windows: 1. Download Netbeans+JDK from the options at the Netbeans site. 2. Run installer. 3. Run Netbeans. 4. Browse in its built-in plugin-browser for Enclojure and install that. 5.

Re: ClojureScript One - Getting Started with ClojureScript

2012-01-25 Thread Brenton
This is not an issue with One but with Leiningen. Others have run into the same problem: https://github.com/technomancy/leiningen/issues/375 https://github.com/dakrone/clojuredocs-client/issues/6 Another work-around is to make sure you have clojure-1.2.1 in your local maven repository. On Jan

Re: Setting up Emacs to edit Clojure for Windows folks

2012-01-25 Thread Roberto Mannai
My notes about installing Emacs 24 on Windows 7, with clojure support: http://sourceforge.net/apps/wordpress/codesounding/2011/09/29/installing-emacs-24-and-clojure-mode-on-windows-7-step-by-step/ On Wed, Jan 25, 2012 at 11:40 PM, Sean Corfield seancorfi...@gmail.comwrote:

Re: ClojureScript One - Getting Started with ClojureScript

2012-01-25 Thread Raju Bitter
Thanks for your help. Should have looked into the Leiningen issues myself. - Raju -- 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

Re: ClojureScript One - Getting Started with ClojureScript

2012-01-25 Thread Phil Hagelberg
Raju Bitter rajubit...@googlemail.com writes: Thanks for your help. Should have looked into the Leiningen issues myself. Just a heads-up; this is fixed in the 1.x branch of Leiningen. I hope to have a stable release in a couple weeks. -Phil -- You received this message because you are

Re: Setting up Emacs to edit Clojure for Windows folks

2012-01-25 Thread Lars Nilsson
Assuming people attempting to use Emacs for Clojure are not adverse to mucking around with Emacs init files... Also given are clojure-mode.el in the .emacs.d directory, lein in PATH. (add-to-list 'load-path (expand-file-name .emacs.d ~)) (autoload 'clojure-mode clojure-mode A major mode for

Re: Setting up Emacs to edit Clojure for Windows folks

2012-01-25 Thread Sean Corfield
On Wed, Jan 25, 2012 at 4:55 PM, Cedric Greevey cgree...@gmail.com wrote: This isn't, by the way, to say that emacs sucks!. It's more emacs setup sucks! with perhaps a dash of ported software sucks! Well, it's certainly a truism that *nix-based software is harder to setup on Windows than on

Re: Setting up Emacs to edit Clojure for Windows folks

2012-01-25 Thread Cedric Greevey
On Wed, Jan 25, 2012 at 10:51 PM, Sean Corfield seancorfi...@gmail.com wrote: On Wed, Jan 25, 2012 at 4:55 PM, Cedric Greevey cgree...@gmail.com wrote: This isn't, by the way, to say that emacs sucks!. It's more emacs setup sucks! with perhaps a dash of ported software sucks! Well, it's

Re: Setting up Emacs to edit Clojure for Windows folks

2012-01-25 Thread Sean Corfield
On Wed, Jan 25, 2012 at 9:18 PM, Cedric Greevey cgree...@gmail.com wrote: In other words, ported software setup sucks!? :) That's not the conclusion I would have drawn... ;) Rather ironic, when the tendency, at least historically, has been for Windows (and Mac) to have superior usability when

Re: Setting up Emacs to edit Clojure for Windows folks

2012-01-25 Thread Cedric Greevey
On Thu, Jan 26, 2012 at 12:25 AM, Sean Corfield seancorfi...@gmail.com wrote: On Wed, Jan 25, 2012 at 9:18 PM, Cedric Greevey cgree...@gmail.com wrote: In other words, ported software setup sucks!? :) That's not the conclusion I would have drawn... ;) Rather ironic, when the tendency, at

Re: Setting up Emacs to edit Clojure for Windows folks

2012-01-25 Thread Sean Corfield
On Wed, Jan 25, 2012 at 10:21 PM, Cedric Greevey cgree...@gmail.com wrote: I guess you're talking about a different kind of usability than I am. Like I said: I'm sure we'll just agree to disagree on this one... On the other hand, there's setup for the typical configuration is point, click,

Re: Setting up Emacs to edit Clojure for Windows folks

2012-01-25 Thread nchurch
Cedric, you should append this to The Unix-Hater's HandbookI'm not providing a link because I'm sure you already know it! ---Fellow Unix-hater, and Mac OS user (add flame suppressor here) On Jan 25, 10:21 pm, Cedric Greevey cgree...@gmail.com wrote: On Thu, Jan 26, 2012 at 12:25 AM, Sean

Re: Adding primitive type hints to anonymous functions

2012-01-25 Thread Tassilo Horn
Cedric Greevey cgree...@gmail.com writes: Hi Cedric, Actually, on further testing, I'm not sure that (def ^{Double/TYPE} ...) is really working either, rather than boxing and then unboxing on each call: user= (def ^{:tag Double/TYPE} b (fn [^double x] (+ x 0.5))) #'user/b user= (defn c

[ANN] Lime: An SMTP Client Library for Clojure

2012-01-25 Thread Jeremy Heiler
Hey all, I've begun working on an SMTP client library[0] for Clojure that *does not* depend on JavaMail. It is still in a very early stage of development, but I hope to make it somewhat useful soon. For my motivation, please check out my blog[1], which I will be writing about the project as it