Why the CLR languages fail?

2013-06-06 Thread Zed Becker
Why do the languages running on the CLR (ironRuby, ironPython, ironScheme, ScalaCLR) do not get to live long enough in the sunshine, whereas same languages get embraced by the Java runtime, and live in the limelight? Chas did a survey in 2012, which gave very negative results for clojureCLR,

Re: Why the CLR languages fail?

2013-06-06 Thread Rich Morin
On Jun 5, 2013, at 23:55, Zed Becker wrote: Why do the languages running on the CLR (ironRuby, ironPython, ironScheme, ScalaCLR) not get to live long enough in the sunshine, whereas same languages get embraced by the Java runtime, and live in the limelight? I have a theory for your

Re: Why the CLR languages fail?

2013-06-06 Thread Alexandru Nedelcu
On Thu, Jun 6, 2013 at 9:55 AM, Zed Becker zed.bec...@gmail.com wrote: Why do the languages running on the CLR (ironRuby, ironPython, ironScheme, ScalaCLR) do not get to live long enough in the sunshine, whereas same languages get embraced by the Java runtime, and live in the limelight? N.B.

Re: Why the CLR languages fail?

2013-06-06 Thread Colin Fleming
*The JVM as a target is much friendlier to other languages, compared to the CLR, in spite of the initial hype surrounding the CLR's multi-language capabilities.* I'm not sure this is true, Don Syme has written several times about how difficult it would be to implement F# on the JVM - I believe

sorted-map-by issue?

2013-06-06 Thread dennis zhuang
user= (sorted-map-by (constantly 1) :b 1 :a 2) {:b 1, :a 2} user= (:a (sorted-map-by (constantly 1) :b 1 :a 2)) nil user= (keys (sorted-map-by (constantly 1) :b 1 :a 2)) (:b :a) user= (count (sorted-map-by (constantly 1) :b 1 :a 2)) 2 user= (:a (sorted-map-by (constantly 1) :b 1 :a 2)) nil It

Re: [ANN] alpacas: a new Clojure source viewer

2013-06-06 Thread Phillip Lord
Laurent PETIT laurent.pe...@gmail.com writes: 2013/6/5 John Gabriele jmg3...@gmail.com: On Tuesday, June 4, 2013 4:24:49 PM UTC-4, Gary Trakhman wrote: Just fyi, most clojure libs are published under EPL or Apache licenses, of course the choice is up to you :-). GPL has some restrictions

Re: sorted-map-by issue?

2013-06-06 Thread dennis zhuang
Sorry, it's my mistake. Because treep map use the comparator to compare keys, and if the comparator returns 1 constantly,it can not find the item that equals the key. So i can modified the example,and it works: user= (sorted-map-by #(if (= %1 %2) 0 1) :b 1 :a 2) {:b 1, :a 2} user= (:a

No bit shift for clojure.lang.BigInt ?

2013-06-06 Thread bernardH
Hi, I wanted to shave a few cycles of a (quot n 2) by using (bit-shift-right n 1) instead, with n being a bigint. However, this fails with an IllegalArgumentException bit operation not supported for: class clojure.lang.BigInt clojure.lang.Numbers.bitOpsCast (Numbers.java:1008). Since the

[ANN] Just one more day to submit a proposal to Clojure/conj 2013!

2013-06-06 Thread Lynn Grogan
Hey All, The CFP for Clojure/conj 2013 closes tomorrow, June 6 at 5 PM EST. http://clojure-conj.org/call-for-proposals Clojure/conj 2013 Alexandria, VA (D.C. Area) November 14-16, 2013 All speakers receive a conference ticket, lodging at the conference hotel, airfare stipend and an

Re: Utility libraries and dependency hygiene

2013-06-06 Thread Stuart Sierra
puzzler wrote: I decided it would be a bad idea to include rhizome directly in instaparse's dependencies. Nevertheless, it made sense to enable the visualize function *provided* rhizome was already in the user's dependencies. I prefer to avoid these kinds of load-time tricks, as they break

Re: Making things go faster

2013-06-06 Thread Gary Trakhman
Note that the problem is actually the Clojure startup time, *not* the JVM startup. JVM starts up in about 0.1sec on my machine. The rest of the time is spend loading Clojure code, compiling all the core namespaces etc. That's one way to look at it, another is that clojure's design tightly

Re: sorted-map-by issue?

2013-06-06 Thread Andy Fingerhut
Your comparator #(if (= %1 %2) 0 1) may happen to give the correct answers for your example sorted-maps, but it is also a bad comparator that will fail for larger examples: user= (:a (sorted-map-by #(if (= %1 %2) 0 1) :z -26 :b 1 :a 2 :c 3 :m 13 :h 8)) nil user= (:z (sorted-map-by #(if (= %1 %2)

Re: Why the CLR languages fail?

2013-06-06 Thread David Pollak
On Wed, Jun 5, 2013 at 11:55 PM, Zed Becker zed.bec...@gmail.com wrote: Why do the languages running on the CLR (ironRuby, ironPython, ironScheme, ScalaCLR) FWIW -- Scala on the CLR has always been a Microsoft funding issue. When Martin's lab got a grant for ScalaCLR, it did the work. When

Compiler bug?

2013-06-06 Thread Frantisek Sodomka
Hi all, I am trying new parsing library Instaparse. I setup a Leiningen project, included [instaparse 1.1.0] as my dependency and tried to run it. Unfortunately, I am getting this error: Exception in thread main java.lang.NoClassDefFoundError: instaparse/print$parser__GT_str (wrong name:

Re: sorted-map-by issue?

2013-06-06 Thread dennis zhuang
Thanks,you are right.I want to creat a map which keeps elements in insertion order, but clojure doesn‘t have. 在 2013-6-6 下午10:02,Andy Fingerhut andy.finger...@gmail.com写道: Your comparator #(if (= %1 %2) 0 1) may happen to give the correct answers for your example sorted-maps, but it is also a

Re: sorted-map-by issue?

2013-06-06 Thread Andy Fingerhut
A few people, I believe primarily Alan Malloy and Anthony Grimes, have created a Clojure library for what they call ordered sets and maps that do exactly this. They are implemented not as you tried to do, but by remembering a number for each element (for ordered sets) or key (for ordered maps)

Re: Why the CLR languages fail?

2013-06-06 Thread dmiller
On Thursday, June 6, 2013 1:55:13 AM UTC-5, Zed Becker wrote: Why do the languages running on the CLR (ironRuby, ironPython, ironScheme, ScalaCLR) do not get to live long enough in the sunshine, whereas same languages get embraced by the Java runtime, and live in the limelight? Many

Re: sorted-map-by issue?

2013-06-06 Thread Philip Potter
The java core library also provides LinkedHashMap which preserves insertion order, although this is a mutable bash-in-place data structure rather than an immutable persistent data structure. On Jun 6, 2013 4:06 PM, Andy Fingerhut andy.finger...@gmail.com wrote: A few people, I believe primarily

Re: Making things go faster

2013-06-06 Thread David Pollak
Folks, I'm skipping Midge for the time being. I've written up a little more on my environment for other newbies: http://blog.goodstuff.im/clojure_setup I plan to read more of Chas' book on my NYC flight on Saturday. Thanks, David On Wed, Jun 5, 2013 at 2:44 AM, Chas Emerick

Re: Why aim for repeatability of specification / generative testing?

2013-06-06 Thread Raoul Duke
i always thought it was basically solely for letting you re-run the test that just/previously failed, nothing more weird or silly than that. -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to

Shortcut for variadic map destructuring?

2013-06-06 Thread JvJ
Consider the following: (let [ [{:keys [] :as m}] [:a 1 :b 2 :c 3]] m) == {:a 1 :b 2 :c 3} Is there a shorter form of [{:keys [] :as m}]? -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to

Re: Shortcut for variadic map destructuring?

2013-06-06 Thread JvJ
Well... I'm a dingus. [{:as m}] On Thursday, 6 June 2013 15:23:22 UTC-4, JvJ wrote: Consider the following: (let [ [{:keys [] :as m}] [:a 1 :b 2 :c 3]] m) == {:a 1 :b 2 :c 3} Is there a shorter form of [{:keys [] :as m}]? -- -- You received this message because you are

Re: Shortcut for variadic map destructuring?

2013-06-06 Thread Ambrose Bonnaire-Sergeant
[ {:as m}] On Fri, Jun 7, 2013 at 3:23 AM, JvJ kfjwhee...@gmail.com wrote: Consider the following: (let [ [{:keys [] :as m}] [:a 1 :b 2 :c 3]] m) == {:a 1 :b 2 :c 3} Is there a shorter form of [{:keys [] :as m}]? -- -- You received this message because you are subscribed to

Re: Shortcut for variadic map destructuring?

2013-06-06 Thread Jim - FooBar();
On 06/06/13 20:23, JvJ wrote: Is there a shorter form of [{:keys [] :as m}]? if you don't care about the actual keys just do this: [ {:as m}] HTH, Jim -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to

Re: Why aim for repeatability of specification / generative testing?

2013-06-06 Thread Chas Emerick
Well, if *that's* all it is, I'll feel like quite the heel for putting so much thought into it! ;-) Assuming failures are rarer, then starting with a just-previously-failed seed would be better as an explicit action, rather than defaulting to a constant? - Chas On Jun 6, 2013, at 3:21 PM,

Re: Why aim for repeatability of specification / generative testing?

2013-06-06 Thread Raoul Duke
yes, a constant is weird. whenever i've implemented my own variant of this, i always use a seed from the clock or whatever, and then spit out the seed in test/assertion failure messages so people can paste it back in to reproduce. -- -- You received this message because you are subscribed to

Re: Why aim for repeatability of specification / generative testing?

2013-06-06 Thread Andy Fingerhut
I've worked on hardware logic design, where the time and effort required to create good tests that find subtle bugs rivals the complexity of the hardware being designed itself. In this context, much of the testing has often been generated using pseudo-random streams similar to test.generative and

Re: Why aim for repeatability of specification / generative testing?

2013-06-06 Thread Chas Emerick
Thanks for that perspective, Andy! It sounds like one ends up looking for canaries in the coal mine, perhaps just borderline behaviour or results, odd sideband emissions, etc. that indicate that it'd be worthwhile to turn the debug knobs up to 11. It's interesting to think of cases where the

Re: Shortcut for variadic map destructuring?

2013-06-06 Thread JvJ
I just realized it after I posted, but thanks for the help anyways. On Thursday, 6 June 2013 15:27:28 UTC-4, Jim foo.bar wrote: On 06/06/13 20:23, JvJ wrote: Is there a shorter form of [{:keys [] :as m}]? if you don't care about the actual keys just do this: [ {:as m}] HTH, Jim

Re: Why aim for repeatability of specification / generative testing?

2013-06-06 Thread Philip Potter
I can quite imagine seeing a failure from a Travis ci run which can't be explained by the test output; being able to reproduce it locally is the first step towards diagnosis. (warning: thread drift ahead...) I also have a hardware background - specifically, xilinx FPGAs. The xilinx synthesis

Re: Why aim for repeatability of specification / generative testing?

2013-06-06 Thread Chas Emerick
Sure; just to clarify, I was definitely talking about capturing test *input*, not output. BTW, if anyone with a hardware testing background have pointers to good literature on the topic that might be accessible to lowly software twiddlers, fire away... :-) - Chas On Jun 6, 2013, at 6:16 PM,

Re: Compiler bug?

2013-06-06 Thread Mark Engelberg
Short answer: This is fixed in 1.2.0-SNAPSHOT. Long answer: There was a file in instaparse that had two functions: parser-str and Parser-str On case-insensitive filesystems, the clojure compiler ends up spitting out a bunch of classfiles that correspond to the different functions, and the one

Re: Compiler bug?

2013-06-06 Thread Mark Engelberg
On Thu, Jun 6, 2013 at 4:27 PM, Mark Engelberg mark.engelb...@gmail.comwrote: Short answer: This is fixed in 1.2.0-SNAPSHOT. To be clear, just change your project file to [instaparse 1.2.0-SNAPSHOT] and you should be good to go. As a bonus, there are some new perf improvements and features

Re: Best IDE

2013-06-06 Thread Lee Spector
On Jun 5, 2013, at 11:12 AM, Catonano wrote: My 2 cents: it´s ture that the Emacs features are not discoverable and that the learning curve is mean. But it also true that once you´ve done it, it brings you a great value. My suggestions about Emacs: 1) ... 2) ... 3) ... 4) ...

Re: Why the CLR languages fail?

2013-06-06 Thread Brandon Bloom
Alexandru's analysis is spot on. Here's the pithy IRC version I've used in the past: C# has a better type system and compiler, so it doesn't need as good of a JIT. That's a problem for languages that aren't C#, especially dynamic ones. There are lots of caveats, but that more or less covers

clojure diffs

2013-06-06 Thread Moocar
Hi all, Diffs for clojure code (and lisps in general) can be hard to read. Every time we wrap a form, any lines below are indented. The resulting diff just shows that you've deleted lines and added lines, even though you've only changed a few characters. What diff tools do people use to

Re: clojure diffs

2013-06-06 Thread John D. Hume
One neat hidden Github feature is that if you add the query string parameter w=1 to any diff view, it will ignore whitespace-only changes (like passing -w to git diff). That doesn't help with those final lines with added or removed close parens, but it still improves readability of many diffs.

Re: clojure diffs

2013-06-06 Thread Alex Baranosky
Intellij diffs, FileMerge, or Meld - they all highlight the words that changed not just the lines. On Thu, Jun 6, 2013 at 7:57 PM, John D. Hume duelin.mark...@gmail.comwrote: One neat hidden Github feature is that if you add the query string parameter w=1 to any diff view, it will ignore