Game Engine: Modelling Objects as Finite State Machines

2012-10-20 Thread JvJ
I've started to make a 2D game engine in Clojure using Penumbra and JBox2D (I'm thinking of calling it "Enjine", but the name was already taken by a JavaScript game engine.) Because FSM's are such an integral part of game programming, I'd like to build them into the design. In particular, I'd

finding intervals quickly

2012-10-20 Thread Brian Craft
I have a vector of maps representing intervals with (start, end) coords in one dimension, that are non-overlapping, and sorted. At the moment I'm not using a sorted data type, just a vector. The bottleneck in my code is in searching for intervals that overlap a region, like so: (defn filter-pr

Re: ANN: Spyscope, a trace/println-oriented debugging tool for Clojure

2012-10-20 Thread Jim - FooBar();
looks neat! I'll check it out as soon as possible...:-) Jim On 21/10/12 00:01, David Greenberg wrote: Spyscope is a better println, inspired by some of the recent postings on the Clojure mailing list about using reader macros for debugging. Spyscope can be included in your project by adding [s

CLJS: How can you find the version of clojurescript that you're running?

2012-10-20 Thread Frank Siebenlist
When you have different versions of clojurescript in the dependencies of your main project, how do you ask the repl what version it is running with… is there any easy function/var that I overlooked? Thanks, FrankS. -- You received this message because you are subscribed to the Google Groups "C

Re: What is the design guideline for =?

2012-10-20 Thread Warren Lynn
> To work around the issue, = was changed to be in terms of equiv (see the > definitions in [2]). This allows compliance with the Map interface and > prevents (= (Square. 1 :red) (Rope. 1 :red)). > > [1] One idea was to have a hidden key corresponding to the record's type > be visible when usi

Re: ANN: Spyscope, a trace/println-oriented debugging tool for Clojure

2012-10-20 Thread Mark Engelberg
Very interesting. Nice contribution! Thanks, Mark -- 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 patient with your first post

Re: What is the design guideline for =?

2012-10-20 Thread Brian Goslinga
When records were first introduced there was a little debate over what the behavior of first case should be. If = is defined solely in terms of .equals then two different records with the same key/value mappings must [1] be = to each other to obey the contract of the Map interface even though t

ANN: Spyscope, a trace/println-oriented debugging tool for Clojure

2012-10-20 Thread David Greenberg
Spyscope is a better println, inspired by some of the recent postings on the Clojure mailing list about using reader macros for debugging. Spyscope can be included in your project by adding [spyscope "0.1.0"] to your :dependencies. Spyscope provides 3 reader tags for debugging: simple pretty prin

Re: What is the design guideline for =?

2012-10-20 Thread AtKaaZ
=> (.equals (AA. 1) {:a 1} ) true => (= (AA. 1) {:a 1} ) false => (.equals {:a 1} (AA. 1) ) true => (= {:a 1} (AA. 1) ) false Looks like "=" is not ".equals", hmm... but this doc says different: http://clojuredocs.org/clojure_core/clojure.core/= > Equality. Returns true if x equals y, false if no

Re: Hiccup -> HTML -> PNG

2012-10-20 Thread nchurch
Thank you gentlemen, I'm trying out PhantomJS and it looks good so far; will let you know how the full project goes. On Oct 17, 4:18 am, David Powell wrote: > I'm using PhantomJS > It is a headless WebKit build that can render webpages as png or pdf, > amongst other stuff.

What is the design guideline for =?

2012-10-20 Thread Warren Lynn
With Clojure 1.4, I see this: (defrecord AA [a]) (= (AA. 1) {:a 1}) => false (= [1 2] '(1 2)) => true Another thread mentioned the second case. So if the second case is true, I thought the first one should be true too (different concrete type, but same data).I am quite confu

Re: Error when compiling the node.js example on the quick page.

2012-10-20 Thread David Nolen
On Sat, Oct 20, 2012 at 2:05 AM, Jiajian Huang wrote: > I am trying clojurescript right now and when I compiling the node example > on the quick page, an error happens. > > * temp : cat nodehello.cljs > (ns nodehello) > > (defn -main [& args] > (println (apply str (map [\ "world" "hello"] [2 0

Re: Cdr car

2012-10-20 Thread Curtis
Thank you everyone !! I really appreciate you assistance and am so glad to hear about the diversity of backgrounds.! On Tuesday, October 16, 2012 3:40:24 PM UTC-7, Curtis wrote: > > Hello - I was familar with lisp years ago and am very new to clojure. > > I am having a hard time understanding h

Re: Cdr car

2012-10-20 Thread Curtis
This is golden! thank you so much! On Wednesday, October 17, 2012 12:10:15 PM UTC-7, Jeff Heon wrote: > > If I may suggest the following presentation: > > http://blip.tv/clojure/clojure-for-lisp-programmers-part-1-1319721 > http://blip.tv/clojure/clojure-for-lisp-programmers-part-2-1319826 > >