Re: Status of Generic Functions (a la lisp)

2013-08-03 Thread Mark Engelberg
The word "fast" is relative, of course. I've been happily using Clojure's multimethods for a long time. They are certainly fast enough for a wide range of uses. I've seen a couple instances where people used a couple levels of protocols (e.g., one function dispatching on the type of the first ar

Re: Status of Generic Functions (a la lisp)

2013-08-03 Thread Alex Baranosky
Razvan, are you asking about dispatch on multiple types... protocols only give fast dispatch on their first arg's type. Currently you can either get fast dispatch on the type of the first arg, or you get slower dispatch on anything w/ multimethods. On Sat, Aug 3, 2013 at 11:48 PM, Robert Levy w

Re: Status of Generic Functions (a la lisp)

2013-08-03 Thread Robert Levy
But isn't that the whole point of protocols, polymorphic dispatch that is fast? On Sat, Aug 3, 2013 at 11:45 PM, Răzvan Rotaru wrote: > The keyword here is speed. Multimethods are not fast. They don't use the > JVM for dispatch (as far as I know). Protocols are fast. That's the reason > for thei

Re: Status of Generic Functions (a la lisp)

2013-08-03 Thread Răzvan Rotaru
The keyword here is speed. Multimethods are not fast. They don't use the JVM for dispatch (as far as I know). Protocols are fast. That's the reason for their existence. I want to find out whether there's some effort invested in making fast multiple dispatch in Clojure (and how else can it be bu

[ANN] core.typed 0.1.19 - core.async support

2013-08-03 Thread Ambrose Bonnaire-Sergeant
Hi, This should be exciting news for some, and perhaps the last reason to use Go for others ;) core.typed now includes support for core.async. - typed core.async examples . - companion namespace

Re: Can we please deprecate the :use directive ?

2013-08-03 Thread Ye He
What I mean is don't use it when you use :use. Regards, Ye He On Sun, Aug 4, 2013 at 12:52 PM, Takahiro Hozumi wrote: > Hi Ye, >> or at least *Do Not Use *those standard names*.* > The following guide suggests the opposite. > http://dev.clojure.org/display/community/Library+Coding+Standards >>

Re: Can we please deprecate the :use directive ?

2013-08-03 Thread Softaddicts
You did not get a warning that "symbol" was overriding the core symbol fn ? Luc P. > Yesterday, I spent hours trying to figure out why some code didn't work. > The code is like so: > (defn replace-symbol-in-ast-node [old new ast] > (tree-replace (symbol old) (symbol new) ast)) > > I use tree

Re: Can we please deprecate the :use directive ?

2013-08-03 Thread Takahiro Hozumi
Hi Ye, > or at least *Do Not Use *those standard names*.* The following guide suggests the opposite. http://dev.clojure.org/display/community/Library+Coding+Standards > Use good names, and don't be afraid to collide with names in other namespaces. That's what the flexible namespace support is t

Re: Can we please deprecate the :use directive ?

2013-08-03 Thread Ye He
Yesterday, I spent hours trying to figure out why some code didn't work. The code is like so: (defn replace-symbol-in-ast-node [old new ast] (tree-replace (symbol old) (symbol new) ast)) I use tree-replace directly like this: (ast/tree-replace (symbol 'a) (symbol 'c) (ast/sexp->parsley '(+ a b)

Re: Hiring Clojure Programmer(s)

2013-08-03 Thread Quinn Finney
It doesn't matter to us, it's a job for one project that can be worked on from anywhere. However, we are located in Orange County, California. (The number is from Seattle, but that is just my personal cell) On Friday, August 2, 2013 9:47:21 AM UTC-7, Quinn Finney wrote: > > Hello all, > > My com

Re: Hiring Clojure Programmer(s)

2013-08-03 Thread Asim Jalis
The area code suggests Seattle, WA. On Aug 2, 2013, at 2:14 PM, Marcus Blankenship wrote: > Unless that doesn't matter… > > > On Aug 2, 2013, at 12:27 PM, Andrew Stine wrote: > >> Might help if you said what part of the world you're in. >> >> On Friday, August 2, 2013 12:47:21 PM UTC-4, Qui

Re: core.async: faulty rebinding of loop-bindings in go blocks

2013-08-03 Thread Kemar
It appears to be working, awesome! Thanks! Cheers, Kevin Am Samstag, 3. August 2013 21:05:57 UTC+2 schrieb Ghadi Shayban: > > Fixed -- should make it to maven within an hour. > -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this grou

trying out overtone, leipzip, chris-ford's functional composition code

2013-08-03 Thread Geoffrey Knauth
I'm fairly new to Clojure. At LambdaJam I saw Chris Ford give a great demo of functional composition [music]. I want to show my 16-yo the same code working, since he's really doing well with Racket (and Gregor Kiczales' MOOC via UBC) and loving it, and he loves music and music composition too.

Re: core.async: faulty rebinding of loop-bindings in go blocks

2013-08-03 Thread Ghadi Shayban
Fixed -- should make it to maven within an hour. On Thursday, August 1, 2013 12:47:16 PM UTC-4, Ghadi Shayban wrote: > > It's a nasty bug, seems like a local symbol scope issue. I will take a > look at it. Thanks for the report. > > On Thursday, August 1, 2013 6:05:59 AM UTC-4, Kemar wrote: >>

Re: [ANN] Nightcode, an IDE for Clojure and Java

2013-08-03 Thread Zach Oakes
Thanks for the complements! I just released 0.0.2, which should make Run/Build faster and more reliable. It also fixes shortcuts on OS X so they use command instead of control. On Saturday, August 3, 2013 8:07:31 AM UTC-4, Manuel Paccagnella wrote: > > Wow, it looks very promising. I'd also like

Re: Status of Generic Functions (a la lisp)

2013-08-03 Thread Robert Levy
Oh wait nm, misread completely. The solution exists and it's called protocols. On Sat, Aug 3, 2013 at 11:37 AM, Robert Levy wrote: > Sounds like he wants predicate dispatch? That was an early motivation for > core.logic and as far as I know it's in the works. > > > On Sat, Aug 3, 2013 at 4:22 A

Re: Status of Generic Functions (a la lisp)

2013-08-03 Thread Robert Levy
Sounds like he wants predicate dispatch? That was an early motivation for core.logic and as far as I know it's in the works. On Sat, Aug 3, 2013 at 4:22 AM, Răzvan Rotaru wrote: > Hi, > > I'm looking for fast lisp style generic functions in clojure. In other > words: multimethods that dispatch o

Re: should contains? throw an exception on sorted maps?

2013-08-03 Thread Bronsa
Ops, I didn't see Andy already replied, sorry for the unnecessary mail. On Sat, Aug 3, 2013 at 7:10 PM, Nicola Mometto wrote: > > http://dev.clojure.org/jira/browse/CLJ-1242 > > Jay Fields writes: > > > This: (contains? (sorted-map 1 2 3 4) :a) > > Results in this: ClassCastException java.lang.

Re: should contains? throw an exception on sorted maps?

2013-08-03 Thread Nicola Mometto
http://dev.clojure.org/jira/browse/CLJ-1242 Jay Fields writes: > This: (contains? (sorted-map 1 2 3 4) :a) > Results in this: ClassCastException java.lang.Long cannot be cast to > clojure.lang.Keyword clojure.lang.Keyword.compareTo (Keyword.java:102) > > -- -- -- You received this message be

Re: should contains? throw an exception on sorted maps?

2013-08-03 Thread Andy Fingerhut
It throws because it calls the compare function on the value you are checking and one or more values in the ordered set, and compare throws when called with 2 values that are of different enough types. https://github.com/jafingerhut/thalia/blob/master/doc/project-docs/clojure.core-1.5.1/clojure.c

Re: Status of Generic Functions (a la lisp)

2013-08-03 Thread Softaddicts
I can't understand why multi methods or protocols do not satisfy your needs. Care to shed some light on your needs ? Luc P. > Hi, > > I'm looking for fast lisp style generic functions in clojure. In other > words: multimethods that dispatch on the java type. > A search on the web revealed littl

Re: Status of Generic Functions (a la lisp)

2013-08-03 Thread Mark Engelberg
What's wrong with the built-in multimethods? -- -- 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

Re: futures - The Joy Of Clojure book question

2013-08-03 Thread Ryan Moore
Thanks guys. I had a feeling that it wasn't doing the calculation twice the way it was coded in the book. Ryan On Tuesday, July 23, 2013 11:23:21 AM UTC-4, Lars Nilsson wrote: > > On Tue, Jul 23, 2013 at 11:12 AM, Baishampayan Ghose > > > wrote: > > It's definitely got to do with the code, th

Re: the snake game with core.async and swing

2013-08-03 Thread Chris Ford
Cool! If you want to make the Swing stuff more idiomatic, you could take a look at Seesaw . On 2 August 2013 17:11, wrote: > Below is a little (stupid) snake game I wrote using core.async and swing. > It uses channels for timer, keyboard input and repaint to

should contains? throw an exception on sorted maps?

2013-08-03 Thread Jay Fields
This: (contains? (sorted-map 1 2 3 4) :a) Results in this: ClassCastException java.lang.Long cannot be cast to clojure.lang.Keyword clojure.lang.Keyword.compareTo (Keyword.java:102) -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this

Re: [ANN] Nightcode, an IDE for Clojure and Java

2013-08-03 Thread Manuel Paccagnella
Wow, it looks very promising. I'd also like add a +1 for smart indent and paredit. Kudos to you Zach! Manuel Il giorno venerdì 2 agosto 2013 15:03:03 UTC+2, Zach Oakes ha scritto: > > I’ve been working on a simple IDE for the past few months. It started as > an attempt to add Leiningen integr

Status of Generic Functions (a la lisp)

2013-08-03 Thread Răzvan Rotaru
Hi, I'm looking for fast lisp style generic functions in clojure. In other words: multimethods that dispatch on the java type. A search on the web revealed little, since protocols and multimethods always show up. I have also seen some old discussion in this group on the topic, but I couldn't fi