Re: ANN: core.logic Go solver

2012-10-05 Thread Baishampayan Ghose
Must say, you sir have written some very interesting code there! Regards, BG On Thu, Oct 4, 2012 at 10:53 PM, nchurch nchubr...@gmail.com wrote: Here's a Go solver code: https://github.com/nchurch/go/blob/master/src/go/core.clj README: https://github.com/nchurch/go It's a really fun

Re: optimized clojurescript-js file throws exception but debug version does not?

2012-10-05 Thread Andrew
Ok, I've made *some* progress in ripping out code unrelated to this issue. So far it seems if I remove any more the issue disappears. See https://github.com/achengs/subparissue1 It's a mystery to me why ... - removing any of the three arguments to the loop/recur in the parse function in

Re: {:new ClojureScript One TodoMVC }

2012-10-05 Thread Wei Hsu
Thanks for sharing! I found it quite helpful. On Tuesday, October 2, 2012 1:34:56 AM UTC-7, Pierre-Henry Perret wrote: The best way to learn is to practice ! So I have choosed to make the *TodoMVC* template (see [0]) application with *ClojureScript One* and *Enfocus*. ( see [1] for running

Re: mapv-in or map-in?

2012-10-05 Thread Gijs S.
Look at clojure.walk for mapping functions over nested structures: (defn mapv-in [f coll] (clojure.walk/prewalk #(if (coll? %) % (f %)) coll)) Clojure walk api: http://clojure.github.com/clojure/clojure.walk-api.html On Friday, October 5, 2012 7:58:30 AM UTC+2, nchurch wrote: I ended up

nth performance (was: performance in versions = 1.4.0)

2012-10-05 Thread Karsten Schmidt
I understand the O(n) aspect, however this was also true for 1.3.0. And since nth is used to obtain arguments in every single destructuring call, it seems to me that its performance should not just suddenly be allowed to drop and especially this drastically. New versions of a software should be

Re: == is not transitive?

2012-10-05 Thread Jean Niklas L'orange
On Friday, October 5, 2012 2:39:05 AM UTC+2, Ben wrote: user [(== 0 0.0) (== 0.0 0.0M) (== 0.0M 0)] [true true false] When passing two arguments to ==, == will be transitive. user [(== 0 0.0 0.0M) (== 0 0.0M 0.0) (== 0.0 0 0.0M) (== 0.0 0.0M 0) (== 0.0M 0.0 0) (== 0.0M 0 0.0)]

Re: nth performance (was: performance in versions = 1.4.0)

2012-10-05 Thread Meikel Brandmeyer (kotarak)
Hi, Am Freitag, 5. Oktober 2012 10:58:05 UTC+2 schrieb Karsten Schmidt: I've also seen the checks for RandomAccess and Sequential and by simply moving them to the top (after the null check) of the long if-then cascade in RT.nthFrom(), the old performance is restored. I will open a ticket

Re: == is not transitive?

2012-10-05 Thread Ben Smith-Mannschott
On Fri, Oct 5, 2012 at 11:08 AM, Jean Niklas L'orange jeann...@hypirion.com wrote: On Friday, October 5, 2012 2:39:05 AM UTC+2, Ben wrote: user [(== 0 0.0) (== 0.0 0.0M) (== 0.0M 0)] [true true false] When passing two arguments to ==, == will be transitive. user [(== 0 0.0 0.0M) (== 0

Re: ANN: core.logic Go solver

2012-10-05 Thread David Nolen
On Fri, Oct 5, 2012 at 1:53 AM, nchurch nchubr...@gmail.com wrote: Here's a Go solver code: https://github.com/nchurch/go/blob/master/src/go/core.clj README: https://github.com/nchurch/go Neat! There are some issues that I'd like to get input on. For one thing, I've used mutual

Re: optimized clojurescript-js file throws exception but debug version does not?

2012-10-05 Thread Andrew
Oh. I'm pretty sure it's because in the broken case I use two blobs of js which were minified at *separate* times thus allowing for name conflicts. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to

Re: optimized clojurescript-js file throws exception but debug version does not?

2012-10-05 Thread David Nolen
On Fri, Oct 5, 2012 at 8:16 AM, Andrew ache...@gmail.com wrote: Oh. I'm pretty sure it's because in the broken case I use two blobs of js which were minified at *separate* times thus allowing for name conflicts. Yes Closure assumes whole program optimization. You can't use two separately

Re: optimized clojurescript-js file throws exception but debug version does not?

2012-10-05 Thread Andrew
How do I tell Closure to include Codemirror.js and other js files when it optimizes? My project.clj file has this: :cljsbuild { :builds { :prod {:source-path src-cljs :compiler {:output-to

Re: ANN: core.logic Go solver

2012-10-05 Thread nchurch
I realized what the latter issue is: I forgot to relationalize opposite. It turns out not to matter when you're checking for alive, but it does matter checking for dead for some reason. See the new push. The board size limitation issue has a \very odd error message that doesn't seem to come

Re: ANN: core.logic Go solver

2012-10-05 Thread David Nolen
On Fri, Oct 5, 2012 at 8:42 AM, nchurch nchubr...@gmail.com wrote: CompilerException java.lang.ClassFormatError: Too many arguments in method signature in class file go/core $eval2878$fn__2881$fn__2882$_inc__2883$fn__2884$_inc__2885$fn__2890, compiling:(NO_SOURCE_PATH:1) Yeah that's not

Re: ANN: core.logic Go solver

2012-10-05 Thread nchurch
Hmm! Then I must have hit the limit for how many arguments I can put in an arglist, there in fresh: (i.e. (fresh [~@positions]). I had no idea there \was a limit. Can't see any way around that at the moment. I never dreamed I'd try to put 256 arguments in a function On Oct 5, 5:46 am,

Re: optimized clojurescript-js file throws exception but debug version does not?

2012-10-05 Thread David Nolen
On Fri, Oct 5, 2012 at 8:38 AM, Andrew ache...@gmail.com wrote: How do I tell Closure to include Codemirror.js and other js files when it optimizes? My project.clj file has this: :cljsbuild { :builds { :prod {:source-path

Re: ANN: core.logic Go solver

2012-10-05 Thread David Nolen
On Fri, Oct 5, 2012 at 8:51 AM, nchurch nchubr...@gmail.com wrote: Hmm! Then I must have hit the limit for how many arguments I can put in an arglist, there in fresh: (i.e. (fresh [~@positions]). I had no idea there \was a limit. Can't see any way around that at the moment. I never

Re: ANN: core.logic Go solver

2012-10-05 Thread nchurch
Thanks David! I'll try to fix that in the next few days. On Oct 5, 5:57 am, David Nolen dnolen.li...@gmail.com wrote: On Fri, Oct 5, 2012 at 8:51 AM, nchurch nchubr...@gmail.com wrote: Hmm!  Then I must have hit the limit for how many arguments I can put in an arglist, there in fresh: (i.e.

Re: ANN Ritz 0.5.0

2012-10-05 Thread bruce li
Hello, Hugo. I'm trying ritz and having some issues with SLDB that really confused me. When I switch on the slime-break-on-exception, it seems it sometimes doesn't work. The SLDB buffer won't pop up and I sometimes can see the exceptions in the terminal (but sometimes not :( ). The easiest

Re: ANN: a Clojure docs site, and github organization

2012-10-05 Thread Mayank Jain
On Fri, Oct 5, 2012 at 6:54 PM, Michael Klishin michael.s.klis...@gmail.com wrote: 2012/10/5 Michael Fogus mefo...@gmail.com You say that as if it's a bad thing. I'm of the opinion that these kinds of efforts should have a low barrier to contribution and be fun. My apologies, I did not

Smarter code reloading with tools.namespace 0.2.0

2012-10-05 Thread Stuart Sierra
Announcing... tools.namespace 0.2.0. Just released, it will reach Maven Central in a few hours. Short summary: reload code in the REPL with greater accuracy and awareness of dependencies. Full documentation in the README: https://github.com/clojure/tools.namespace This is my latest attempt at

Re: == is not transitive?

2012-10-05 Thread Patrick Houk
I was bitten by this a year ago and posted here: http://groups.google.com/group/clojure/browse_frm/thread/9091ad790fc96b24 My workaround is to call BigDecimal#stripTrailingZeros before passing it to code that might compare it to some other number. user (== 1 (.stripTrailingZeros 1.0M)) true

clojure.java.jdbc create-table

2012-10-05 Thread Matt
Hi, I'm relatively new to Clojure. This must be easy. I am trying to write a function that creates a table with a name passed as argument, and this naturally requires passing * clojure.java.jdbc/create-table *a value for the table name, rather than specifying the name as a constant. However I'm

Fast REPL restarts Re: Smarter code reloading with tools.namespace 0.2.0

2012-10-05 Thread Grant Rettke
REPL restarts are slow and costly, but the freshness they provide is obviously so valuable, too. Has anyone experimented with something like JRebel or some alternative to provide super-fast like fraction of a section REPL restarts? On Fri, Oct 5, 2012 at 8:56 AM, Stuart Sierra

Re: ANN Ritz 0.5.0

2012-10-05 Thread Hugo Duncan
bruce li leilmy...@gmail.com writes: I'm trying ritz and having some issues with SLDB that really confused me. When I switch on the slime-break-on-exception, it seems it sometimes doesn't work. The SLDB buffer won't pop up and I sometimes can see the exceptions in the terminal (but

Re: Core.logic performance of looping over a list with tabling

2012-10-05 Thread David Nolen
I believe I understand one problem in the original tabling implementation. I will try to get a patch in this weekend. There may be another trickier issue but let's see how much the fix I have in mind will help first. On Monday, October 1, 2012, Reinout Stevens wrote: On Saturday, September

Handling exceptions (subject renamed)

2012-10-05 Thread Matt
Hi, Sorry to anyone who read the original post. Apparently I had malformed the try block encompassing the create-table in a very non-clojure-ish way. So my problem wasn't with clojure.java.jdbc's create-table. Being 'dynamic', clojure could not warn me about it until it crashes in runtime. I

Re: == is not transitive?

2012-10-05 Thread Ben Wolfson
On Fri, Oct 5, 2012 at 2:08 AM, Jean Niklas L'orange jeann...@hypirion.com wrote: On Friday, October 5, 2012 2:39:05 AM UTC+2, Ben wrote: user [(== 0 0.0) (== 0.0 0.0M) (== 0.0M 0)] [true true false] When passing two arguments to ==, == will be transitive. I'm not sure what you mean by

Re: optimized clojurescript-js file throws exception but debug version does not?

2012-10-05 Thread Andrew
After I read the link you provided and another pagehttp://code.google.com/p/closure-compiler/wiki/FAQ#When_using_Advanced_Optimizations,_Closure_Compiler_adds_new_var, I discovered that wrapping my compiled stuff in an anonymous function keeps Google Closure's output symbols from colliding

Re: optimized clojurescript-js file throws exception but debug version does not?

2012-10-05 Thread David Nolen
On Fri, Oct 5, 2012 at 2:37 PM, Andrew ache...@gmail.com wrote: After I read the link you provided and another pagehttp://code.google.com/p/closure-compiler/wiki/FAQ#When_using_Advanced_Optimizations,_Closure_Compiler_adds_new_var, I discovered that wrapping my compiled stuff in an anonymous

Re: Handling exceptions (subject renamed)

2012-10-05 Thread gaz jones
http://clojure.github.com/clojure/clojure.stacktrace-api.html On Fri, Oct 5, 2012 at 12:06 PM, Matt ma...@cloudaloe.org wrote: Hi, Sorry to anyone who read the original post. Apparently I had malformed the try block encompassing the create-table in a very non-clojure-ish way. So my problem

Re: Handling exceptions (subject renamed)

2012-10-05 Thread Matan Safriel
Awesome. On Fri, Oct 5, 2012 at 8:40 PM, gaz jones gareth.e.jo...@gmail.com wrote: http://clojure.github.com/clojure/clojure.stacktrace-api.html On Fri, Oct 5, 2012 at 12:06 PM, Matt ma...@cloudaloe.org wrote: Hi, Sorry to anyone who read the original post. Apparently I had malformed

Re: ANN: a Clojure docs site, and github organization

2012-10-05 Thread Andy Fingerhut
On Oct 4, 2012, at 1:34 PM, Michael Klishin wrote: There are pretty specific plans about the guides and moving clojuredocs.org forward to 1.4 and (hopefully, at some point) multi-version support. Michael, are these specific plans described anywhere that we could read? Or would you be able

Re: Meaning of =

2012-10-05 Thread Stuart Sierra
On Wednesday, October 3, 2012 1:56:19 PM UTC-4, Warren Lynn wrote: Out of curiosity, if we want to check if two collections has the same structure/type and elements, namely if I want (my-equal [1 2 3 4 '(5)] [1 2 3 4 [5]]) = false (my-equal [1 2 3 4 [5]] [1 2 3 4 [5]]) = true Is there

Re: Smarter code reloading with tools.namespace 0.2.0

2012-10-05 Thread Mayank Jain
This will be very helpful to me. Writing selenium tests on repl then restarting is a pain. Will share my views on it. Thank you for your time :) Sent from phone. Please excuse brevity. On Oct 5, 2012 7:26 PM, Stuart Sierra the.stuart.sie...@gmail.com wrote: Announcing... tools.namespace 0.2.0.

ANN: a Clojure docs site, and github organization

2012-10-05 Thread Michael Jaaka
why don't you use advantage of html and split the site into two panes on left the table of content in hiperlink form and on the right the content reloaded on clickin in link in toc also use numbers for chapters and subchapters dont use bullets for lists, its harder to make references also add

Re: Core.logic performance of looping over a list with tabling

2012-10-05 Thread David Nolen
On Mon, Oct 1, 2012 at 9:13 AM, Reinout Stevens reste...@vub.ac.be wrote: Hi, I quickly changed the code so that the graph structure no longer contains the list of nodes, and the same behaviour still persists. For the actual implementation I have changed it to a function that returns a list

Re: clojurescript: how to use clojure.reflect/doc in the cljs-repl?

2012-10-05 Thread Frank Siebenlist
…bumb… Is this maybe related to the use of lein-cljsbuild and having a separate server from which the js is downloaded? In other words, the reflect handler seems to be listening on the repl server on port 9000, while the web server from which the js is initially downloaded is listening on

Re: clojurescript: how to use clojure.reflect/doc in the cljs-repl?

2012-10-05 Thread Frank Siebenlist
Forgot to mention that the issue is most probably on the browser side, because pointing a webbrowser at http://localhost:9000/reflect?var=example.hello/say-hello; by hand, yields in the browser window:

Re: clojurescript: how to use clojure.reflect/doc in the cljs-repl?

2012-10-05 Thread Frank Siebenlist
Ok - I managed to get clojure.reflect/doc to work if the browser loads the javascript from the repl-server instead of the separate webserver… When the reason for this issue is that the repl- web-servers are listening on different ports, where the js is downloaded from the webserver while the