Re: advantage of dynamic typing

2011-09-21 Thread Thorsten Wilms
On 09/21/2011 01:51 AM, Laurent PETIT wrote: I would see no problem of e.g. having a way to explicitly declare, in the public interface of the function (as opposed to derived implicitly from the current implementation detail of the function) the necessary constraints on the function arguments.

Re: advantage of dynamic typing

2011-09-21 Thread Dennis Haupt
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Am 20.09.2011 22:55, schrieb Islon Scherer: Scala is a OO language with FP support, clojure is a functional language with OO support, they are very different. It's normal for someone with a OO background to think that every method receives a

Re: Storm

2011-09-21 Thread Max Weber
Thank you very much for such a great contribution to the Clojure ecosystem! I cannot not wait to use Storm in my Clojure projects :-) Best regards Max On 20 Sep., 17:05, nathanmarz nathan.m...@gmail.com wrote: Yesterday I open-sourced Storm at Strange Loop. Storm is a distributed and

Re: advantage of dynamic typing

2011-09-21 Thread Laurent PETIT
2011/9/21 Thorsten Wilms t...@freenet.de On 09/21/2011 01:51 AM, Laurent PETIT wrote: I would see no problem of e.g. having a way to explicitly declare, in the public interface of the function (as opposed to derived implicitly from the current implementation detail of the function) the

Re: Exception: Can't define method not in interfaces: fly

2011-09-21 Thread ru
Oops! Sorry, my fault :( Sincerely, ru On 20 сен, 21:11, Meikel Brandmeyer m...@kotka.de wrote: Hi, Am 20.09.2011 um 18:47 schrieb ru: So, we can't define the same method with different signatures in one protocol. Is it justifiably? ??? You were shown the correct syntax: (defprotocol

Re: Exception: Can't define method not in interfaces: fly

2011-09-21 Thread ru
Oops! Sorry, my fault :( Sincerely, ru On 20 сен, 21:11, Meikel Brandmeyer m...@kotka.de wrote: Hi, Am 20.09.2011 um 18:47 schrieb ru: So, we can't define the same method with different signatures in one protocol. Is it justifiably? ??? You were shown the correct syntax: (defprotocol

coding-dojo-20110921

2011-09-21 Thread Denis Labaye
Hello, On a code une implem alternative de retour dans le RER: https://gist.github.com/1231894 A+ Denis -- 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

Recursion/Algorithm Question

2011-09-21 Thread ax2groin
I've been working through algorithm problems to learn the language a little better. I'm currently struggling with the question about a robot traversing a grid. If the grid is completely open, then the answer to how many possible ways to traverse the grid? is simply the math for combinations using

Re: ClojureScript: Problem getting Browser Repl Env to Work

2011-09-21 Thread David Nolen
Hmm in my experience 1. Start the Browser REPL 2. Open your project's main html file (index.html) And you're good to go. Sometimes you need to refresh the browser but that's about it as far as I can tell. Are you trying this against the built in sample? David On Tue, Sep 20, 2011 at 4:32 PM,

Re: advantage of dynamic typing

2011-09-21 Thread Ken Wesson
On Wed, Sep 21, 2011 at 3:00 AM, Dennis Haupt d.haup...@googlemail.com wrote: yes, but you magically need to know a) for which types does it work? if you give a byte to the function, will you get an error, or its first bit? or its first char after its been converted to a string? b) if i want

Re: coding-dojo-20110921

2011-09-21 Thread Ken Wesson
On Wed, Sep 21, 2011 at 8:20 AM, Denis Labaye denis.lab...@gmail.com wrote: Hello, On a code une implem alternative de retour dans le RER: https://gist.github.com/1231894 A+ Denis Hello, On a code what?? -- Protege: What is this seething mass of parentheses?! Master: Your father's Lisp

Re: advantage of dynamic typing

2011-09-21 Thread Dennis Haupt
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Am 21.09.2011 19:58, schrieb Ken Wesson: On Wed, Sep 21, 2011 at 3:00 AM, Dennis Haupt d.haup...@googlemail.com wrote: yes, but you magically need to know a) for which types does it work? if you give a byte to the function, will you get an error,

Re: coding-dojo-20110921

2011-09-21 Thread Meikel Brandmeyer
Am 21.09.2011 um 19:59 schrieb Ken Wesson: On Wed, Sep 21, 2011 at 8:20 AM, Denis Labaye denis.lab...@gmail.com wrote: On a code une implem alternative de retour dans le RER: https://gist.github.com/1231894 On a code what?? That's french. Someone has programmed an alternative

Re: coding-dojo-20110921

2011-09-21 Thread Denis Labaye
ops! I posted on clojure google group instead of *clojure-paris-user-group* google group sorry :-) On Wed, Sep 21, 2011 at 9:13 PM, Meikel Brandmeyer m...@kotka.de wrote: Am 21.09.2011 um 19:59 schrieb Ken Wesson: On Wed, Sep 21, 2011 at 8:20 AM, Denis Labaye denis.lab...@gmail.com

Re: coding-dojo-20110921

2011-09-21 Thread Denis Labaye
But I can provide a translation: We did a clojure coding dojo at Paris, the exercise was: find the nth prime numbers, in TDD (midje), and in clojure With a co-worker we needed to go earlier, so we implemented an alternative solution in the tube https://gist.github.com/1231894 On Wed, Sep 21,

Re: Swarming experiment at Conj?

2011-09-21 Thread Brian Marick
On Sep 9, 2011, at 11:55 AM, Christopher Redinger wrote: Thursday evening we'll have the time, space and power to do this post-supper. A round table may be hard to come by, but I'll see what we can do. Keep me in the loop on what else you'll need. Thanks Chris. Not enough people (2) said

Re: Swarming experiment at Conj?

2011-09-21 Thread Colin Yates
Have you considered opening it to remote users? I wouldn't be able to contribute anything, but I would love to watch... On 21 September 2011 14:07, Brian Marick mar...@exampler.com wrote: On Sep 9, 2011, at 11:55 AM, Christopher Redinger wrote: Thursday evening we'll have the time, space

Re: ClojureScript: Problem getting Browser Repl Env to Work

2011-09-21 Thread Volker Schlecht
Hi, no, I've tried it against - essentially - a manual replication of the built-in sample. But thanks for the hint, because the sample does work, but so far I haven't figured out the deciding difference ... at least I have a reference now to compare against. Thanks! Volker On Sep 21, 7:26 pm,

Re: ClojureScript: Problem getting Browser Repl Env to Work

2011-09-21 Thread David Nolen
Do you get any JS errors from the browser at the JS console? David On Wed, Sep 21, 2011 at 4:23 PM, Volker Schlecht volker.schle...@gmail.comwrote: Hi, no, I've tried it against - essentially - a manual replication of the built-in sample. But thanks for the hint, because the sample does

Re: coding-dojo-20110921

2011-09-21 Thread Ken Wesson
On Wed, Sep 21, 2011 at 3:13 PM, Meikel Brandmeyer m...@kotka.de wrote: Am 21.09.2011 um 19:59 schrieb Ken Wesson: On Wed, Sep 21, 2011 at 8:20 AM, Denis Labaye denis.lab...@gmail.com wrote: On a code une implem alternative de retour dans le RER: https://gist.github.com/1231894 On a code

Re: Recursion/Algorithm Question

2011-09-21 Thread Nathan Sorenson
A recursive formulation is exactly the right idea. Also, you're right when you say it won't work with recur as you've set it up. In fact, you won't be able to use recur at all in this situation as a you are doing a depth-first search through possible paths--it's impossible to formulate a

Re: Swarming experiment at Conj?

2011-09-21 Thread Linus Ericsson
Would it be possible to store the original defn s-expression source code in metadata added to the java byte-code function? It would be highly inefficient (and most of the time meaningless) for autogenerated functions, but quite a small overhead for the few locs a developer spits out during a

clojars question

2011-09-21 Thread labwork07
I'm confused on what version to obtain from clojars for enlive. I see 1.2.0-alpha1 dated yesterday but I also see 2.00 dated from August. Which one should I pick? are there several versions? Please enlighten me. -- You received this message because you are subscribed to the Google Groups

Re: advantage of dynamic typing

2011-09-21 Thread Nathan Sorenson
These types of discussions seem to get very broad in their scope and not much is ever settled. That being said, it seems one place where dynamic typing is a huge advantage is for records--Clojure records are prevalent and extremely easy to use, and are an excellent substrate for where we would

Re: clojure type casting vs java type casting

2011-09-21 Thread Nathan Sorenson
long entails a call to RT/longCast, which dynamically dispatches on the type of the object passed to it. I haven't tested this, but i would imagine the java cast would compile directly to the single byte- code instruction i2l. Presumably, then, the java call would be a touch faster by a few

Re: clojars question

2011-09-21 Thread Mark Rathwell
Anyone can create their own account on clojars and publish their own forks to their own group name. There are 22 forks of enlive on github, the original is by Chrisotphe Grand [1], [2]. His most recent version published to clojars is 1.0.0. Generally, people try not to publish their own forks

Re: Re: clojars question

2011-09-21 Thread labwork07
Thanks. It does get confusing some times. On , Mark Rathwell mark.rathw...@gmail.com wrote: Anyone can create their own account on clojars and publish their own forks to their own group name. There are 22 forks of enlive on github, the original is by Chrisotphe Grand [1], [2]. His most

Re: implement a shell in repl

2011-09-21 Thread Timothy Washington
+1. My project has a shell on top of a repl, which is just load in a different namespace and associated functions and macros. This assumes that your shell language is an extension of Clojure / LISP, which is certainly the path I chose. I replaced a customed DSL I designed in Java, using SableCC.

Re: How to attach debugger on clojure's repl ?

2011-09-21 Thread Timothy Washington
This guy's put together a good video on how to use debugging to swank / slime. - http://www.youtube.com/watch?v=galfpq969Hg Tim Washington twash...@gmail.com 416.843.9060 On Tue, Sep 20, 2011 at 10:37 AM, cran1988 rmanolis1...@hotmail.com wrote: I am trying to figure out how abcl does

Re: coding-dojo-20110921

2011-09-21 Thread Meikel Brandmeyer
Am 21.09.2011 um 22:31 schrieb Ken Wesson: That's french. Yeah, I thought it might be. But it's odd that it suddenly switched from plain English to a foreign language in mid-sentence. That's all french. It just happens by coincidence that the words also have some meaning in english.

Spread work onto multiple threads (in pure Clojure)

2011-09-21 Thread ronen
I was looking for a pure Clojure solution to run multiple non- dependant tasks on multiple threads, iv considered using Agent, Promises or Futures, yet the simplest cleanest succinct solution iv found is: (defn email-approved [approved] (doall (pmap deref (for [req approved] (future

Re: Spread work onto multiple threads (in pure Clojure)

2011-09-21 Thread Andy Fingerhut
pmap already uses future/deref in its implementation. When it does so, it limits the *maximum* parallelism possible to be at most (number-of-cpus + 2) threads running at a time, and depending upon the time taken by each of the objects you are mapping over, it can be less then that. I don't know

Re: Spread work onto multiple threads (in pure Clojure)

2011-09-21 Thread Nathan Sorenson
Futures begin executing their contents immediately, you don't have to deref them to trigger the side effects. (perhaps you were thinking of delay?) I'm assuming you are using futures because email-request is an io- blocking operation? The thing to note is that the body of a future automatically

issues to build clojure-1.3.0-RC0 with JDK-1.7

2011-09-21 Thread JSchmitt
Hallo, I have tried to build clojure-1.3.0-RC0 agains Fedora Rawhide, which supports JDK-1.7. Unfortunately, I have got error messages in the for: [java] FAIL in (test-annotations-on-field) (java_6_and_later.clj: 65) [java] expected: (= expected-annotations (into #{} (map

clojurescript closure problem?

2011-09-21 Thread Eric Harris-Braun
Check out this little bit of code: (doseq [hid [a b c]] (goog.dom.appendChild (goog.dom.$ some-element-id) (goog.dom.createDom div (.strobj {id hid}) (str Test-hid))) (goog.events.listen (goog.dom.$ hid) goog.events.EventType.CLICK, (fn [e] (js/alert hid What I want it do to is add in a

Re: coding-dojo-20110921

2011-09-21 Thread eniotna
Hi Ken, 2011/9/21 Ken Wesson kwess...@gmail.com On Wed, Sep 21, 2011 at 3:13 PM, Meikel Brandmeyer m...@kotka.de wrote: Am 21.09.2011 um 19:59 schrieb Ken Wesson: On Wed, Sep 21, 2011 at 8:20 AM, Denis Labaye denis.lab...@gmail.com wrote: On a code une implem alternative de retour

Re: coding-dojo-20110921

2011-09-21 Thread eniotna
R.E.R : Réseau Express Régional, Regional Express Network 2011/9/21 eniotna eniotn...@gmail.com Hi Ken, 2011/9/21 Ken Wesson kwess...@gmail.com On Wed, Sep 21, 2011 at 3:13 PM, Meikel Brandmeyer m...@kotka.de wrote: Am 21.09.2011 um 19:59 schrieb Ken Wesson: On Wed, Sep 21, 2011 at

Re: ClojureScript on repl.it?

2011-09-21 Thread amjad.masad
Hi, I'm one of the developer's who built repl.it. I really like Clojure and ClojureScript, and would love to have it in repl.it. However ClojureScript uses the JVM to compile, and repl.it's main philosophy is to be completely client-side. There is always the possibility of embedding a Java Applet

Re: How to attach debugger on clojure's repl ?

2011-09-21 Thread Scott Jaderholm
While that still works, ritz is really where it's at for awesome debugging clojure in emacs. It allows stepping and stuff with a nice UI. https://github.com/pallet/ritz Video (only for overview, follow instructions at url above) http://www.youtube.com/watch?v=d_L51ID36w4 One of my favorite

Re: Arithmetic Exception in 1.3

2011-09-21 Thread PC
I see! I'll have to go back and read up on these features. Thanks to everyone! -- 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: Storm

2011-09-21 Thread nathanmarz
Yea, I have it on my todo list to document this (which seems to be getting longer by the minute). Hopefully I'll do that within the next few weeks. In the meantime, I pasted some example code showing usage of the Clojure DSL, if that helps at all in the meantime: https://gist.github.com/1228302