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 > ob

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 wrote: > Yesterday I open-sourced Storm at Strange Loop. Storm is a distributed > and fault-tolerant realtime comp

Re: advantage of dynamic typing

2011-09-21 Thread Laurent PETIT
2011/9/21 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 >> necess

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 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 Fly

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 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 Fly

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 a

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 usi

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, V

Re: advantage of dynamic typing

2011-09-21 Thread Ken Wesson
On Wed, Sep 21, 2011 at 3:00 AM, Dennis Haupt 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 my data structure to

Re: coding-dojo-20110921

2011-09-21 Thread Ken Wesson
On Wed, Sep 21, 2011 at 8:20 AM, Denis Labaye 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 REPL. This is

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 > 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

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 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 implementation o

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 wrote: > > Am 21.09.2011 um 19:59 schrieb Ken Wesson: > > > On Wed, Sep 21, 2011 at 8:20 AM, Denis Labaye > wrote: > >> > >> On a code une imp

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, 201

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) sai

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 wrote: > > On Sep 9, 2011, at 11:55 AM, Christopher Redinger wrote: > > Thursday evening we'll have the time, space and power to do th

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, Da

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 wrote: > 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 have

Re: coding-dojo-20110921

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

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 depth-firs

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 hack-

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 "Clo

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 nor

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 instruc

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 to

Re: Re: clojars question

2011-09-21 Thread labwork07
Thanks. It does get confusing some times. On , Mark Rathwell 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 recent version publishe

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 wrote: > I am trying to figure out how abcl does it > > On Sep 20, 12:41 p

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 (email-reque

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 i

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 ru

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 annotation->ma

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 t

Re: coding-dojo-20110921

2011-09-21 Thread eniotna
Hi Ken, 2011/9/21 Ken Wesson > On Wed, Sep 21, 2011 at 3:13 PM, Meikel Brandmeyer wrote: > > > > Am 21.09.2011 um 19:59 schrieb Ken Wesson: > > > >> On Wed, Sep 21, 2011 at 8:20 AM, Denis Labaye > wrote: > >>> > >>> On a code une implem alternative de retour dans le RER: > >>> https://gist.git

Re: coding-dojo-20110921

2011-09-21 Thread eniotna
R.E.R : Réseau Express Régional, "Regional Express Network" 2011/9/21 eniotna > Hi Ken, > > 2011/9/21 Ken Wesson > >> On Wed, Sep 21, 2011 at 3:13 PM, Meikel Brandmeyer wrote: >> > >> > Am 21.09.2011 um 19:59 schrieb Ken Wesson: >> > >> >> On Wed, Sep 21, 2011 at 8:20 AM, Denis Labaye >> wrot

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 i

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 thing

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 p

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 -

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

2011-09-21 Thread Sean Corfield
On Wed, Sep 21, 2011 at 6:06 PM, ronen wrote: > (defn email-approved [approved] >  (doall (pmap deref (for [req approved] (future (email-request > req)) Wouldn't the following be close enough to what you want? (defn email-approved [approved] (doall (pmap email-request approved))) -- Sean