Re: Why don't extends? and satisfies? require implementation of all protocol methods?

2012-03-07 Thread Tassilo Horn
Garth Sheldon-Coulson garth.sheldoncoul...@gmail.com writes: Hi Garth, I'm returning to Clojure in earnest for the first time since 1.1 (and very happy to be back!). Apologies if this question revisits old issues. I've revisited mostly the same 2 days ago: 87399ocg9a@thinkpad.tsdh.de

Re: Why don't extends? and satisfies? require implementation of all protocol methods?

2012-03-07 Thread David Powell
When you create a protocol, as an implementation detail, it also creates a Java interface. When you list protocols in a deftype or defrecord form, the generated class actually implements that Java interface. And protocol calls to that type call through the interface. This gives the best

Re: Why don't extends? and satisfies? require implementation of all protocol methods?

2012-03-07 Thread Tassilo Horn
David Powell d...@djpowell.net writes: Hi David, When you create a protocol, as an implementation detail, it also creates a Java interface. Is a protocal neccessarily an implementation detail? I mean, it might be, but it can also be a public specification of the requirements types have to

Re: Why don't extends? and satisfies? require implementation of all protocol methods?

2012-03-07 Thread Alan Malloy
On Mar 7, 1:09 am, Tassilo Horn tass...@member.fsf.org wrote: David Powell d...@djpowell.net writes: Hi David, When you create a protocol, as an implementation detail, it also creates a Java interface. Is a protocal neccessarily an implementation detail?  I mean, it might be, but it can

Re: Why don't extends? and satisfies? require implementation of all protocol methods?

2012-03-07 Thread Tassilo Horn
Alan Malloy a...@malloys.org writes: Hi Alan, IMHO, `extenders' should return also types implementing the protocol interface directly [i.e., deftypes and defrecords], so that (extends? P T) = (some #(= % T) (extenders P)) holds. You're entitled to that humble opinion, but it's not

Re: Why don't extends? and satisfies? require implementation of all protocol methods?

2012-03-07 Thread Armando Blancas
user= (boom (Record.)) AbstractMethodError user.Record.boom()Ljava/lang/Object; user/eval55 (NO_SOURCE_FILE:3) Apparently, types/records can implement a protocol in name only. That can't in name only since you obviously got an implementation, though abstract. What is behind this

Re: How to use goog.dom.query

2012-03-07 Thread Brent Millare
Have you tried giving the full path in the :libs option? On Tuesday, January 24, 2012 12:35:00 PM UTC-5, Jonas wrote: Hi all I was wondering if it's possible to use goog.dom.query[1] from ClojureScript or ClojureScript One? It's a third party module but it's bundled with the Closure

Re: Google Summer of Code 2012 - any mentors?

2012-03-07 Thread Alexander Yakushev
Great job answering the application questions, David! I was just wondering if Steve Yegge could vouch for Clojure since I remember him being very excited about the language, so maybe he might say a nice word for Clojure participation... -- You received this message because you are subscribed

Google Summer of Code 2012 Application

2012-03-07 Thread David Nolen
I've made some progress here: http://dev.clojure.org/display/community/Google+Summer+of+Code+2012+Application+Questions For those with edit right please edit as you see fit and as soon as you can, we're running out of time, thanks! :) David On Wed, Mar 7, 2012 at 1:37 PM, Alexander Yakushev

Google Summer of Code 2012 Proposal Backup Mentors

2012-03-07 Thread David Nolen
http://dev.clojure.org/display/community/Google+Summer+of+Code+2012 A reminder that we're still looking for proposals from community members and interested students. We're also looking for backup mentors - if you'd be willing to step up this summer should something happen to a mentor please say

Re: Google Summer of Code 2012 Application

2012-03-07 Thread Federico Brubacher
Looks amazing David, I'm very interested to apply as a student if we get in as an Organization. Best, Federico On Wed, Mar 7, 2012 at 4:47 PM, David Nolen dnolen.li...@gmail.com wrote: I've made some progress here:

Re: How I can use InteractionEvent in clojure?

2012-03-07 Thread Aaron Cohen
Unfortunately, I've been unable to get vtk to compile locally. At this point, it's seeming to me that your issue is more vtk-related than clojure, though. Can you put a println in the callback to confirm that it's at least being called? One question, is it significant that your code is slightly

Re: What Java classes/objects/methods do you find yourself most often using?

2012-03-07 Thread Jim - FooBar();
On 06/03/12 17:09, John Gabriele wrote: While writing Clojure code, what Java classes, objects, and static methods do you most often find yourself using? I use java.lang.Math quite a lot... Jim -- You received this message because you are subscribed to the Google Groups Clojure group. To

labrepl in eclipse 3.6

2012-03-07 Thread nilesh Shah
I am a novice at both java and clojure. I installed the counterclockwise eclipse plugin and the labrepl as per http://dev.clojure.org/display/doc/Getting+Started+with+Eclipse+and+Counterclockwise . After install one of the steps is to Enable Clojure Support - Right-click the labrepl

Re: How to escape a space in a keyword?

2012-03-07 Thread Leif
Unfortunately, the reader does not actually follow this spec, e.g. it will happily accept :div#id.cla$$ as a valid keyword. Some web programming clojure[script] libraries use this pseudo-CSS syntax in keywords, so if the reader was changed to strictly follow these rules, a lot of web code

Can Clojure be as readable as Python or Ruby ?

2012-03-07 Thread Leon Talbot
If so, how ? Thanks ! -- 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 post. To unsubscribe from this

Re: Can Clojure be as readable as Python or Ruby ?

2012-03-07 Thread Angel Java Lopez
An old thread: http://groups.google.com/group/clojure/browse_thread/thread/319a1c77ed718ba/3e4be7484b7cbe38?pli=1 Also, someone proposed instead of (f a b c) begin to use f(a, b, c) or something alike but I don't have the thread link now On Wed, Mar 7, 2012 at 2:39 PM, Leon Talbot

Re: Can Clojure be as readable as Python or Ruby ?

2012-03-07 Thread Angel Java Lopez
Maybe this proposal: http://grokbase.com/t/gg/clojure/11ctt573jq/list-syntax-sugar-f-x-notation On Wed, Mar 7, 2012 at 6:09 PM, Angel Java Lopez ajlopez2...@gmail.comwrote: An old thread: http://groups.google.com/group/clojure/browse_thread/thread/319a1c77ed718ba/3e4be7484b7cbe38?pli=1

Re: Can Clojure be as readable as Python or Ruby ?

2012-03-07 Thread Timothy Baldridge
If so, how ? I think Python may be easier for you, but it's not simpler than Clojure. Simplicity is the strength of Clojure. http://www.infoq.com/presentations/Simple-Made-Easy I can learn a new syntax almost overnight (last night I started writing Dart code for the first time after googling

Re: Can Clojure be as readable as Python or Ruby ?

2012-03-07 Thread Aaron Cohen
On Wed, Mar 7, 2012 at 12:39 PM, Leon Talbot leontal...@gmail.com wrote: If so, how ? Thanks ! Isn't it already? -- 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

Re: Can Clojure be as readable as Python or Ruby ?

2012-03-07 Thread Jeff Heon
I think readable is in the eye of the beholder. I've only moderate experience with Clojure, but the following example from Open Dylan made me realize I really do prefer a concise representation over what is considered easier to read.

Re: How to escape a space in a keyword?

2012-03-07 Thread Meikel Brandmeyer
Hi, Am 07.03.2012 um 01:11 schrieb Leif: Unfortunately, the reader does not actually follow this spec, e.g. it will happily accept :div#id.cla$$ as a valid keyword. Some web programming clojure[script] libraries use this pseudo-CSS syntax in keywords, so if the reader was changed to

Re: Google Summer of Code 2012 Application

2012-03-07 Thread David Nolen
Looks like Dan Friedman, William Byrd and the IU Googlers they know might be getting behind our application as vouchers. There's no better time to submit proposals or step up to be a mentor than now :) David On Wed, Mar 7, 2012 at 1:47 PM, David Nolen dnolen.li...@gmail.com wrote: I've made

Re: Google Summer of Code 2012 Application

2012-03-07 Thread Chris Granger
When's the official cutoff? Cheers, Chris. On Wed, Mar 7, 2012 at 2:24 PM, David Nolen dnolen.li...@gmail.com wrote: Looks like Dan Friedman, William Byrd and the IU Googlers they know might be getting behind our application as vouchers. There's no better time to submit proposals or step

[ANN] Leiningen 2.0.0-preview1

2012-03-07 Thread Phil Hagelberg
Hello folks! I'm proud to announce the release of Leiningen 2.0.0-preview1. While this isn't a final stable release, it's fairly stable and should be usable for the majority of projects. This is a near-rewrite and contains a few backwards-compatibility breaks, but updating should be pretty

Re: Google Summer of Code 2012 Application

2012-03-07 Thread David Nolen
March 9th! David On Wed, Mar 7, 2012 at 5:26 PM, Chris Granger ibdk...@gmail.com wrote: When's the official cutoff? Cheers, Chris. On Wed, Mar 7, 2012 at 2:24 PM, David Nolen dnolen.li...@gmail.comwrote: Looks like Dan Friedman, William Byrd and the IU Googlers they know might be

Re: Can Clojure be as readable as Python or Ruby ?

2012-03-07 Thread James Sofra
Hi, I have recently started working in python, I don't find python very readable at all compared to clojure. It is more about familiarity than anything else. On Thursday, March 8, 2012 4:39:08 AM UTC+11, Leon Talbot wrote: If so, how ? Thanks ! -- You received this message because you

Re: Can Clojure be as readable as Python or Ruby ?

2012-03-07 Thread Alex Baranosky
If we're going to talk about readability at all, then we need to first define what attributes make up that which is readable. What commonly passes for readability is simply a variant of Easy, namely readable means near to your current body of knowledge. Is German less readable than English? I

Re: How I can use InteractionEvent in clojure?

2012-03-07 Thread Antonio Recio
When I print myCallback I obtain this: (println myCallback) user = #example$myCallback example$myCallback@6e1c51b4 I have used this: (doto coneMapper (.SetInput (.GetOutput cone))) And the applications runs, with not errors in the prompt too, but the boxWidget still doesn't work. On

Re: How I can use InteractionEvent in clojure?

2012-03-07 Thread Aaron Cohen
I meant do: (def myCallback (fn [] (println Invoked!) (let [t (vtk.vtkTransform.)] (.GetTransform t) (- boxWidget .GetProp3D (.SetUserTransform t) -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group,

Re: Clojure 1.3 treatment of integers and longs

2012-03-07 Thread Paul Stadig
On Sunday, October 23, 2011 5:21:52 PM UTC-4, Rich Hickey wrote: Hi all, This reply is to the thread, not Luc specifically. Thanks everyone for your feedback and input. I have pushed 3 commits: 1) Fixes the inconsistency between the hash function used by Clojure maps (was .hashCode)

Re: How I can use InteractionEvent in clojure?

2012-03-07 Thread Antonio Recio
It seems that callback is not called. I have added (println Testing callback) in the definition of myCallback and there is not message in the prompt when I run the application. (def myCallback (fn [] (let [t (vtk.vtkTransform.)] (.GetTransform t) (- boxWidget .GetProp3D

Re: How I can use InteractionEvent in clojure?

2012-03-07 Thread Aaron Cohen
On Mon, Mar 5, 2012 at 5:50 PM, Antonio Recio amdx6...@gmail.com wrote:       (.AddObserver interactionEvent myCallback run) I suspect this is mis-capitalized, it need to be InteractionEvent. --Aaron -- You received this message because you are subscribed to the Google Groups Clojure group.

Re: How to escape a space in a keyword?

2012-03-07 Thread Frank Siebenlist
Clojure is a young language, and I believe there is little argument that some of the interfaces/implementations and associated docs could be improved. You can find plenty of examples where functions would throw exceptions for invalid input, others return nil in that case, and a number return

Re: How to escape a space in a keyword?

2012-03-07 Thread Phil Hagelberg
Frank Siebenlist frank.siebenl...@gmail.com writes: My suggestion still stands: add more text to the doc-string of some of the functions such that the user has a better understanding of what to expect: no validation, nil, exception, expected parameter type, ???. I'd be happy to suggest

Re: Can Clojure be as readable as Python or Ruby ?

2012-03-07 Thread Alan Malloy
On Mar 7, 9:39 am, Leon Talbot leontal...@gmail.com wrote: If so, how ? Thanks ! [Closed as: Not a real question] -- 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

Re: Can Clojure be as readable as Python or Ruby ?

2012-03-07 Thread Mark Engelberg
On Wed, Mar 7, 2012 at 3:16 PM, Alex Baranosky alexander.barano...@gmail.com wrote: I think that the real question that is: if you know Python and Clojure equally well, then which is easier to read? Alex I know both equally well (actually, I've logged more hours in my life coding in Lisp

Re: [ANN] Leiningen 2.0.0-preview1

2012-03-07 Thread Phil Hagelberg
Just found a bug that only manifests when you don't have any profiles and are running outside a project. It's fixed in git, but if you're getting an NPE on 2.0.0-preview1 and don't have any profiles defined, try this as a temporary workaround: $ mkdir ~/.lein; echo {:user {:plugins []}}

clojure on android over CLI

2012-03-07 Thread Rostislav Svoboda
Hi. I'm trying to run: java -cp clojure-${VERSION}.jar clojure.main on an Android phone from bash (using the 'terminal-ide' app) but I can't make it past the error bellow. I did the jar-to-dex conversion using: dx --verbose --dex --output=clojure-${VERSION}.dex.jar clojure-${VERSION}.jar

Re: How to escape a space in a keyword?

2012-03-07 Thread Justin Steward
On Thu, Mar 8, 2012 at 9:00 AM, Meikel Brandmeyer m...@kotka.de wrote: However documenting everywhere that feeding garbage in might result in shit coming out has this “things in the mirror might be closer than they appear” taste. WTF? The mirror is not the problem. Nor is the car manufacturer

Re: Can Clojure be as readable as Python or Ruby ?

2012-03-07 Thread Joachim De Beule
On Mar 7, 6:39 pm, Leon Talbot leontal...@gmail.com wrote: If so, how ? Thanks ! Please define readable. Thanks! -- 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

Re: Can Clojure be as readable as Python or Ruby ?

2012-03-07 Thread Mark Engelberg
On Wed, Mar 7, 2012 at 3:12 PM, Joachim De Beule joachim.de.be...@gmail.com wrote: Please define readable. Thanks! Readable is a measure of how readily apparent the meaning of a program is from looking at it. If you wanted to measure this objectively, one possible way to do this would be

[ANN] clojure-py 0.1.0 Clojure on Python

2012-03-07 Thread Timothy Baldridge
The Clojure-Py team is happy to announce the release of Clojure-Py 0.1.0. https://github.com/halgari/clojure-py Clojure-Py is an implementation of Clojure running atop the Python VM. As it currently stands, we have translated over 235 functions from clojure.core. This is not a clojure

Clojurescript: named/numbered releases?

2012-03-07 Thread kovas boguta
It's great to see the steady activity on the clojurescript github page. However I'm not totally comfortable developing against the master branch. As it stands now, if I change development environments, or deploy on a new machine, the master branch may have moved. I could choose an arbitrary

Re: How I can use InteractionEvent in clojure?

2012-03-07 Thread Antonio Recio
You are right. I have capitalized InteractionEvent and now callback it is called and it prints invoke. The application runs but the boxWidget still doesn't work, and I obtain an error message: Exception in thread main java.lang.IllegalArgumentException: No matching field found: GetTransform

Re: clojure-py 0.1.0 Clojure on Python

2012-03-07 Thread Shantanu Kumar
Congrat's on the release! I am getting the following error on my Macbook (running 64-bit Lion, Python 2.7.1) when trying to run sudo easy_install clojure-py: Searching for clojure-py Reading http://pypi.python.org/simple/clojure-py/ Reading https://github.com/halgari/clojure-py Best match:

Re: How I can use InteractionEvent in clojure?

2012-03-07 Thread Mark Rathwell
You are trying to call method GetTransform on an instance of vtk.vtkTransform, and this method does not exist (you are probably wanting to call that method on boxWidget, not t). On Thu, Mar 8, 2012 at 12:32 AM, Antonio Recio amdx6...@gmail.com wrote: You are right. I have capitalized

Re: Can Clojure be as readable as Python or Ruby ?

2012-03-07 Thread Mark Engelberg
Going back to the original poster's question, I think if I could make only one change to Clojure's syntax to improve readability, I'd take a page from other functional languages like F# and Racket and add a way to bind local variables that doesn't indent. So, for example, (let x 2) code would

Re: Can Clojure be as readable as Python or Ruby ?

2012-03-07 Thread Andy Fingerhut
You might have a difficult time getting other Clojure coders to adopt the practice in their code, but would this be almost as good? (let [x 2] code) Achieving that would be as simple as hand-indenting it that way, or adjusting the auto-indenter of your favorite text editor to do it that way.

Re: Can Clojure be as readable as Python or Ruby ?

2012-03-07 Thread Mark Engelberg
On Wed, Mar 7, 2012 at 10:43 PM, Andy Fingerhut andy.finger...@gmail.comwrote: You might have a difficult time getting other Clojure coders to adopt the practice in their code, but would this be almost as good? (let [x 2] code) Achieving that would be as simple as hand-indenting it that

Re: Can Clojure be as readable as Python or Ruby ?

2012-03-07 Thread Sean Corfield
On Wed, Mar 7, 2012 at 5:10 PM, Mark Engelberg mark.engelb...@gmail.com wrote: * introducing variables creates new indenting level, making code creep to the right Mitigated by breaking functions into sub-functions (which is good practice anyway). * as code creeps to the right, you need to

Re: Leiningen 2.0.0-preview1

2012-03-07 Thread C. Arel
The clojure community is thankful! On Mar 7, 11:28 pm, Phil Hagelberg p...@hagelb.org wrote: Hello folks! I'm proud to announce the release of Leiningen 2.0.0-preview1. While this isn't a final stable release, it's fairly stable and should be usable for the majority of projects. This is a