Re: Step by step debugging

2013-11-08 Thread Stefan Kamphausen
On Thursday, November 7, 2013 6:32:29 PM UTC+1, Lee wrote: In Common Lisp when you hit an error you're thrown into a break loop REPL in which you can view locals, move up and down the stack, and do lots of other fancier things (re-binding things, restarting...) that are probably useful

StackOverflowError

2013-11-08 Thread ru
Dear clojure-users, StackOverflowError clojure.lang.RT.nthFrom (RT.java:789) I got this error message during evaluation of count function call on a quite short list (about 200 elements). What can be reasons of the error. Any hints would be greatly appreciated. Sincerely, Ru -- -- You

Re: StackOverflowError

2013-11-08 Thread Jim
I cannot reproduce your result: user= (- 500 range doall count) 500 user= (- 500 range count) 500 Could you provide more details? How exactly are you calling 'count' ? Jim On 08/11/13 09:17, ru wrote: Dear clojure-users, StackOverflowError clojure.lang.RT.nthFrom (RT.java:789) I got

Re: StackOverflowError

2013-11-08 Thread ru
Hi Jim, I forget to say that call to count have been done in not a bare repl, but inside a quite complex program after it did a lot of work on a quite big data. But, after long and profound analysis of source code I did not found any places with deep recursive calls :( Something like stack is

Re: StackOverflowError

2013-11-08 Thread Jim
On 08/11/13 10:11, ru wrote: I forget to say that call to count have been done in not a bare repl, but inside a quite complex program after it did a lot of work on a quite big data. so your problem does not lie with 'count' but with something else...actually 'count' doesn't hold on to the

Re: StackOverflowError

2013-11-08 Thread ru
I tryed to add a call (clojure.stacktrace/e) to the code after the call to count like this: ... (if TRACE (println [:ЩАС])) (if TRACE (do (println [:OFACTS (count ofacts)]) (clojure.stacktrace/e))) And what a result I have got: ... [:ЩАС] StackOverflowError

Re: StackOverflowError

2013-11-08 Thread John Szakmeister
On Fri, Nov 8, 2013 at 5:11 AM, ru soro...@oogis.ru wrote: Hi Jim, I forget to say that call to count have been done in not a bare repl, but inside a quite complex program after it did a lot of work on a quite big data. But, after long and profound analysis of source code I did not found any

Re: confused over meta on var

2013-11-08 Thread Phillip Lord
Yes, I fear that you are right. I had a hack through the code last night. It looks to me like the metadata is set in the Compiler.load(Reader,String,String) method. This is called from only a couple of places. From within Compiler, it's called from loadFile. public static Object

Re: StackOverflowError

2013-11-08 Thread Jim
On 08/11/13 10:46, ru wrote: I am afraid, that I am not sure where to put (clojure.stacktrace/e) to make it work :( Or, may be this is not an exception? use (clojure.stacktrace/e) after the exception has been thrown to get some more information than just a line. Don't put it in your code,

Re: StackOverflowError

2013-11-08 Thread Bruce Adams
In this line: (if TRACE (do (println [:OFACTS (count ofacts)]) (clojure.stacktrace/e))) the StackOverflowError must be occurring in the evaluation of ofacts. The error breaks out of the evaluation, preventing (clojure.stacktrace/e) from being evaluated. The error sends you back to the

Re: StackOverflowError

2013-11-08 Thread Stefan Kamphausen
On Friday, November 8, 2013 11:11:14 AM UTC+1, ru wrote: Hi Jim, I forget to say that call to count have been done in not a bare repl, but inside a quite complex program after it did a lot of work on a quite big data. But, after long and profound analysis of source code I did not found

Re: Step by step debugging

2013-11-08 Thread Phillip Lord
As far as I can see, though ritz is not Emacs specific per se. It's a set of middleware for nrepl. So you should be able to build clients against it for different environments, including a textual one. There's no reason that a debugger shouldn't be part of lein. I think making it work with java

Re: StackOverflowError

2013-11-08 Thread ru
Thank you, all, for the very useful information. Stacktrace after StackOverflowError turns out: StackOverflowError clojure.lang.RT.nth (RT.java:764) rete.core= (clojure.stacktrace/e) java.lang.StackOverflowError: null at clojure.lang.RT.nth (RT.java:764) rete.core$fact_id.invoke

Re: StackOverflowError

2013-11-08 Thread Jim
ok we are getting somewhere...is it easy to post the source of your 'retract-fact' 'fact_id' fns? Jim On 08/11/13 13:17, ru wrote: Thank you, all, for the very useful information. Stacktrace after StackOverflowError turns out: StackOverflowError clojure.lang.RT.nth (RT.java:764)

Re: StackOverflowError

2013-11-08 Thread ru
Solution have found: (remove ...) = (doall (remove ...)) Full source of 'retract-fact' function is: (defn retract-fact [fid] Retract fact for given fact-id by removing it from alpha, beta and fact memory, and also by removing from conflict set activations, containing this fact-id

Re: StackOverflowError

2013-11-08 Thread Dimitrios Jim Piliouras
Did I see a def inside a defn? This is weird... glad you solved your problem though... On Nov 8, 2013 1:51 PM, ru soro...@oogis.ru wrote: Solution have found: (remove ...) = (doall (remove ...)) Full source of 'retract-fact' function is: (defn retract-fact [fid] Retract fact for given

Re: StackOverflowError

2013-11-08 Thread John Szakmeister
On Fri, Nov 8, 2013 at 8:51 AM, ru soro...@oogis.ru wrote: Solution have found: (remove ...) = (doall (remove ...)) Be careful with this technique. It can easily make your O(n) algorithm O(n^2). It may be better to use data structures that you can use with conj and disj if you need to

Re: StackOverflowError

2013-11-08 Thread ru
Jim, please, recommend a correct solution for global variable assignment. John, Indeed I would prefere technique with better performance. But, as I understand from scarce documentation, disj works with sets. And doesn't it recursive? пятница, 8 ноября 2013 г., 13:17:28 UTC+4 пользователь ru

Re: StackOverflowError

2013-11-08 Thread Dimitrios Jim Piliouras
You don't generally do global variable assignment in Clojure...it is seriously frowned upon and goes against the functional paradigm... I need to run now and I will be busy for the next 2 hours... perhaps someone else can explain if you are in a hurry? On Nov 8, 2013 2:34 PM, ru soro...@oogis.ru

Re: StackOverflowError

2013-11-08 Thread ru
No, I am not in a hurry :) Thanks in advance. пятница, 8 ноября 2013 г., 13:17:28 UTC+4 пользователь ru написал: Dear clojure-users, StackOverflowError clojure.lang.RT.nthFrom (RT.java:789) I got this error message during evaluation of count function call on a quite short list (about

ANN: ClojureScript 0.0-2024

2013-11-08 Thread David Nolen
ClojureScript, the Clojure compiler that emits JavaScript source code. README and source code: https://github.com/clojure/clojurescript New release version: 0.0-2024 Leiningen dependency information: [org.clojure/clojurescript 0.0-2024] The main change was fixing a regression introduced

Re: [ClojureScript] Re: ANN: ClojureScript 0.0-2014 - source maps, incremental compilation, and internal changes

2013-11-08 Thread David Nolen
Thanks for the report, fixed in 0.0-2024. On Thu, Nov 7, 2013 at 5:14 PM, Geraldo Lopes de Souza geraldo...@gmail.com wrote: David, Using relative source maps is not updating .cljs equivalents when the original source is updated. If you delete it'll be created. If you update the .cljs it

Re: Does Pedestal have a future in the long run

2013-11-08 Thread Ryan Neufeld
Shhh! Don't spill the beans. On Friday, November 8, 2013 1:02:36 AM UTC-5, Daniel wrote: I suspect Pedestal adoption will really take off once it has a well designed and advertised widget/ui toolkit. Just my two cents. -- -- You received this message because you are subscribed to the

gemacl: Scientific computing application written in Clojure

2013-11-08 Thread Jose M. Perez Sanchez
Hello everyone: This is my first post here. I'm a researcher writing a numerical simulation software in Clojure. Actually, I'm porting an app a coworker and I wrote in C/Python (called GEMA) to Clojure: The app has been in use for a while at our group, but became very difficult to maintain due

Re: Does Pedestal have a future in the long run

2013-11-08 Thread Andreas Liljeqvist
Will there by any presentation on Pedestal, or just announcements? On Fri, Nov 8, 2013 at 1:38 AM, Ryan Neufeld r...@thinkrelevance.comwrote: Speaking as a core Pedestal team member and engineer at Cognitect I can say we are *very* serious about continuing to grow and support Pedestal. It

Re: gemacl: Scientific computing application written in Clojure

2013-11-08 Thread Andy Fingerhut
Jose: I am not aware of any conclusive explanation for the issue, and would love to know one if anyone finds out. At least in the case of that program mentioned in the other discussion thread, much better speedup was achieved running N different JVM processes, each single-threaded, on a machine

Re: [ClojureScript] Re: ANN: ClojureScript 0.0-2014 - source maps, incremental compilation, and internal changes

2013-11-08 Thread Geraldo Lopes de Souza
Thank you David! On Friday, November 8, 2013 2:46:03 PM UTC-2, David Nolen wrote: Thanks for the report, fixed in 0.0-2024. On Thu, Nov 7, 2013 at 5:14 PM, Geraldo Lopes de Souza geral...@gmail.com wrote: David, Using relative source maps is not updating .cljs equivalents when

ANN: ClojureScript 0.0-2030, core.async compatibility

2013-11-08 Thread David Nolen
ClojureScript, the Clojure compiler that emits JavaScript source code. README and source code: https://github.com/clojure/clojurescript New release version: 0.0-2030 Leiningen dependency information: [org.clojure/clojurescript 0.0-2030] This release is mostly to address compatability

Re: [ClojureScript] ANN: ClojureScript 0.0-2030, core.async compatibility

2013-11-08 Thread Joe Smith
Thanks- addresses my duplicate bug! --- Joseph Smith j...@uwcreations.com @solussd On Nov 8, 2013, at 5:11 PM, David Nolen dnolen.li...@gmail.com wrote: ClojureScript, the Clojure compiler that emits JavaScript source code. README and source code:

Multi-arity protocol methods implemented in different maps

2013-11-08 Thread Jim Crossley
I'm guessing this is either impossible or I'm missing something obvious. Say I have this: (defprotocol X (foo [x] [x y])) For the sake of implementation inheritance, I'd like to define one of the arities in map x1: (def x1 {:foo (fn [x] x1)}) And the other arity in x2: (def x2

Re: Does Pedestal have a future in the long run

2013-11-08 Thread Ryan Waters
Pedestal-app and pedestal-service seem like they have a lot of solid design behind them and there's quite a few bright people that have put time into development and documentation. I don't doubt Cognitect's dedication to the project or their ability to derive productivity from it. I program in

Re: Does Pedestal have a future in the long run

2013-11-08 Thread kovas boguta
On Thu, Nov 7, 2013 at 5:30 PM, Marko Kocić ma...@euptera.com wrote: related with Pedestal. How serious Cognitect/Relevance is about it? There is a ton of activity in the repo. Looking forward to v3. -- -- You received this message because you are subscribed to the Google Groups Clojure

[ANN] Brambling: Datomic (Schema) Migration library/toolkit for Clojure

2013-11-08 Thread Christopher Allen
https://github.com/bitemyapp/brambling/ This is a very early point in time for the library, (alpha), but it has already been useful at work so I figured I would get it out there to see what bits people did and didn't care about. Why this exists: As with any historical database you have to

Re: Step by step debugging

2013-11-08 Thread Colin Fleming
One quick clarification about -Dclojure.compile.disable-locals-clearing=true which bit me - this is actually read in clojure.main, which uses it to initialise the *compiler-options* var. This means that if you start your app in any other way (I'm not sure if lein duplicates the clojure.main

Re: Step by step debugging

2013-11-08 Thread Colin Fleming
Cedric, you're right in both your assessment of the potential solution (this could definitely be done) and also the problems. You'd need an additional line number mapping of original source line to expanded-lines source line to be able to make any sense of stack traces, thread dumps etc, and of