Re: Cyber Dungeon Quest Alpha 1

2011-04-15 Thread Daniel Kersten
Excellent work! Its surprisingly addictive, I wasn't expecting to play it the whole way through, but after I cleared the first area, I wanted to keep going :) Also, its incredibly smooth and the lowest framerate I saw was at the start of the blood caves, it briefly dropped to 57. The rest of the t

Re: Clojure interest in Zurich

2011-04-15 Thread Albert Cardona
Clojure user here, based in Zurich. Unfortunately I'll be away during Brian's visit. There's another clojure user in the city: a Google employee by the name of Pablo. He may speak up by himself. Albert -- http://albert.rierol.net -- You received this message because you are subscribed to the G

Re: Clojure interest in Zurich

2011-04-15 Thread Jeff Rose
I'm hacking Clojure down in Lugano every day for the next couple months, and I'd be happy to make the trip up to Zurich and/or Geneva. -Jeff On Apr 14, 6:39 pm, Nick Zbinden wrote: > Hi im not from zurich but I life near enough. There is no clojure user > group (sadly). I acctualy don't know of

Re: Is this a good idea? (merging let, cond and ->)

2011-04-15 Thread Alan
Someone implements ilet every couple of months on the mailing list. It gets a little support as like "well that could be handy", but the consensus seems to be that the value it adds is not much greater than the complexity it adds. So some people keep their own private versions that they use for wha

Re: call to idiomatic loop works as stand alone but not when wrapped in my function

2011-04-15 Thread Alan
I would do it by making read-files-into-memory take a single argument, a list of filenames, rather than N arguments, each of which is a filename. Just drop the & in the function's definition and you should be done. On Apr 14, 4:21 pm, Avram wrote: > Yes, I am missing a way to turn the [& filename

Re: Very odd memory allocation behavior

2011-04-15 Thread Alan
Holy cow wall of text. I really couldn't get through the whole thing, but I scanned it and I don't see you mentioning output-stream buffering, which would be one of my primary suspects for this sort of behavior. Sorry if you've already considered this. As for why it allocated a bunch of heap: if yo

odd reflection warning

2011-04-15 Thread Jules
I've reduced a compile-time reflection warning that I am getting to the following : put this in a file and compile it (I am using clojure-1.3.0alpha5 and clojure-maven-plugin-1.3.7) : (ns org.dada.demo.mytest) (if true (do (def ^java.util.Collection some-numbers [0 23 45 64 67 78]) (

Re: Adding key values in a list of maps

2011-04-15 Thread Laurent PETIT
For some people this might read better also : user=> (->> p (map :b) (reduce +)) 9 2011/4/15 Andreas Kostler : > Or: (reduce #(+ %1 (:b %2)) 0 p) > > :) > On Apr 15, 10:51 am, Andreas Kostler geosystems.com> wrote: >> (reduce + (map :b p)) >> Cheers >> Andreas >> >> On 15 April 2011 10:43, Bhin

Re: Adding key values in a list of maps

2011-04-15 Thread Ulises
> user=> (->> p (map :b) (reduce +)) Alternatively: user> (def p '({:a 1 :b 2 :c 4}, {:a 2 :b 3 :c 5}, {:a 3 :b 4 :c 6})) #'user/p user> (:b (apply merge-with + p)) 9 Depending on whether you'll want the other sums or not, this approach might be appropriate. U -- You received this message bec

Re: Cyber Dungeon Quest Alpha 1

2011-04-15 Thread Alfredo
Working here too! S cool!! it remembers me ultima online!! On Apr 15, 9:27 am, Daniel Kersten wrote: > Excellent work! Its surprisingly addictive, I wasn't expecting to play > it the whole way through, but after I cleared the first area, I wanted > to keep going :) > > Also, its incredibly sm

def and ;dynamic

2011-04-15 Thread Jules
since moving up to 1.3.0alphaxx I've seen lots of compile time warnings telling me, as I understand it, that I am dynamically resetting the root binding of a var ? e.g. Var *session-manager-name* not marked :dynamic true, setting to :dynamic. You should fix this before next release! I've let

Re: def and ;dynamic

2011-04-15 Thread David McNeil
Try removing the "*" characters from the names. E.g change *session- manager-name* to session-manager. -David -- 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 membe

Re: def and ;dynamic

2011-04-15 Thread Jules
It worked !!! I thought that *xxx* was just a _convention_ to mark a variable as global, not a syntax to mark a global as mutable... ? Thank you for your solution, but can you explain why it works ? Jules -- You received this message because you are subscribed to the Google Groups "Clojure" g

Re: Very odd memory allocation behavior

2011-04-15 Thread Ken Wesson
On Fri, Apr 15, 2011 at 4:17 AM, Alan wrote: > Holy cow wall of text. I really couldn't get through the whole thing, > but I scanned it and I don't see you mentioning output-stream > buffering, which would be one of my primary suspects for this sort of > behavior. I didn't mention it because it i

Re: Cyber Dungeon Quest Alpha 1

2011-04-15 Thread Wei Hsu
Very cool! I really enjoyed playing it. On Apr 14, 12:20 pm, Alan wrote: > Similar error for me, on Ubuntu. Exception and "wrapped exception" > follow. Looks like you may need permissions set better? 403 is > Forbidden. > > com.sun.deploy.net.FailedDownloadException: Unable to load > resource:ht

Re: def and ;dynamic

2011-04-15 Thread David McNeil
> Thank you for your solution, but can you explain why it works ? As best I recall... in Clojure 1.3 vars are no longer dynamic by default. In the short-term, to ease the pain of this change, Clojure 1.3 will automatically make vars with earmuffs (e.g. *foo*) into dynamic variables. But it warns y

Re: def and ;dynamic

2011-04-15 Thread Jules
Aha ! Thanks, David. Now I can sort all those annoying warnings :-) Jules -- 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 patien

Re: You should fix this before next release!

2011-04-15 Thread Stuart Sierra
If you're referring to clojure-contrib in its current, monolithic form, it is all deprecated. New development is happening in new, per-library repositories at http://github.com/clojure -Stuart Sierra clojure.com -- You received this message because you are subscribed to the Google Groups "Clo

Re: odd reflection warning

2011-04-15 Thread Stuart Sierra
I can't reproduce this in a bare REPL in Clojure 1.3.0-master-SNAPSHOT at commit f0a46155ba3b7243. Probably just a fluke. -Stuart Sierra clojure.com -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@google

Re: odd reflection warning

2011-04-15 Thread Jules
I don't get it if I type into a repl - only when I put it into a file and compile it... It's been hanging around for a while so I figured it was time to get to the bottom of it :-) Jules -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to th

Re: odd reflection warning

2011-04-15 Thread Jules
Originally I thought it might be something to do with the overload on the TreeSet ctor expecting a Collection when I am probably only able to provide Collection, but then I discovered the wierdness around the 'if'... Jules -- You received this message because you are subscribed to the Google G

Re: odd reflection warning

2011-04-15 Thread Stuart Sierra
It's definitely not caused by the generics: they're a fiction of javac, and Clojure ignores them completely. -S -- 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 me

Re: odd reflection warning

2011-04-15 Thread Laurent PETIT
2011/4/15 Jules : > I've reduced a compile-time reflection warning that I am getting to the > following : > > put this in a file and compile it (I am using clojure-1.3.0alpha5 and > clojure-maven-plugin-1.3.7) : > > (ns org.dada.demo.mytest) > > (if true >   (do >     (def ^java.util.Collection som

Re: You should fix this before next release!

2011-04-15 Thread Hugo Duncan
On Fri, 15 Apr 2011 09:28:39 -0400, Stuart Sierra wrote: If you're referring to clojure-contrib in its current, monolithic form, it is all deprecated. New development is happening in new, per-library repositories at http://github.com/clojure A couple of questions to help consider how/whe

Re: Very odd memory allocation behavior

2011-04-15 Thread Alex Miller
Presuming this is reproducible, you should enter this state, then take thread dumps (via ctrl-break, ctrl-\, jconsole, jstack, jvisualvm, etc). If you want more info on what's happening with gc, use -verbose:gc and/ or -XX:+PrintGCDetails If you want another level of analysis, use a performance p

Re: You should fix this before next release!

2011-04-15 Thread Armando Blancas
I'm using: org.clojure.contrib repl-utils 1.3.0-SNAPSHOT ... clojure-snapshots http://build.clojure.org/snapshots ... My user.clj has: (use '[clojure.contrib.repl-utils :only (show run run*)]) And I launch the repl with: java -cp "C:\Documents and

Re: You should fix this before next release!

2011-04-15 Thread Armando Blancas
> New development is happening in new, per-library > repositories athttp://github.com/clojure BTW, last night I noticed that this file hasn't been updated for 1.3: https://github.com/clojure/clojure-contrib/blob/master/modules/repl-utils/src/main/clojure/clojure/contrib/repl_utils/javadoc.clj bu

Re: You should fix this before next release!

2011-04-15 Thread ataggart
Note that the master branch no longer infers dynamic from the earmuffs, though a warning will still be emitted: https://github.com/clojure/clojure/commit/dd49d07b75c619075156d1b38bae9a364ffb63b1 On Apr 14, 9:36 pm, Armando Blancas wrote: > Could "before next release" be changed to something lik

Re: You should fix this before next release!

2011-04-15 Thread Stuart Sierra
On Apr 15, 9:53 am, "Hugo Duncan" wrote: > Is there a policy as regards whether the new per-library repos will run   > against clojure 1.2? New contrib libraries should work with any version of Clojure that has the necessary features (such as protocols). > Are all contrib libs going to move to n

Re: call to idiomatic loop works as stand alone but not when wrapped in my function

2011-04-15 Thread Avram
Thank-you, I think that works for me! I do need the & to be able to take in a variable number of arguments, but it looks like I can call "vec" to convert this to a vector, then call the read-files-into- memory function that now will take a single argument. Such an elegant language but difficult to

Re: call to idiomatic loop works as stand alone but not when wrapped in my function

2011-04-15 Thread Alan
You never "need" & when you are defining your own functions. It's equivalent to declaring that your function takes one argument, a vector, and then always wrapping up in a vector whatever args you want to use. On Apr 15, 11:05 am, Avram wrote: > Thank-you, I think that works for me!  I do need th

Re: Agent action queuing is asynchronous.

2011-04-15 Thread Ivan Koblik
Hello André, Just wanted to mention that Java 7 is feature complete. You can see the list of approved features here: http://openjdk.java.net/projects/jdk7/features/ It seems that JSR203 was selected for the release, although I remember reading that Clojure won't support Java 7 for awhile. Cheers

Re: call to idiomatic loop works as stand alone but not when wrapped in my function

2011-04-15 Thread Avram
This makes perfect sense. I reached for this strategy initially but got lost along the way trying to consider how to enable N inputs via a -main function. I'm all set now. Many thanks, Avram On Apr 15, 11:11 am, Alan wrote: > You never "need" & when you are defining your own functions. It's > e

Re: Clojure interest in Zurich

2011-04-15 Thread mrzepka
Great I'm also a clojure user and live near Zurich. Ready for clojure hacking anytime. See you soon, Maximilien On 14 Apr., 18:39, Nick Zbinden wrote: > Hi im not from zurich but I life near enough. There is no clojure user > group (sadly). I acctualy don't know of anybody else using clojure in

Re: Agent action queuing is asynchronous.

2011-04-15 Thread André Caron
Hi Ivan, Thanks for the tip. I'll get the polling solution working until Java 7 is supported by Clojure. I really want to see how well I can model different network protocols using Clojure's agents as asynchronous state machines, as this is why I started looking at Clojure in the first place. I

Re: Open Source Projects for Beg/ Intermediate

2011-04-15 Thread Ptr6464
I'd like to second that. Since I started with Clojure it got me, but I need some practice, so if anyone needs enthusiastic workforce please let me know also. To Carin: Good luck in learning Clojure, should be pretty demanding but it will be great if we learn it. On Apr 15, 2:47 am, Carin Meier wr

Re: Open Source Projects for Beg/ Intermediate

2011-04-15 Thread Alex Robbins
I'm learning Clojure also, and have been working through some of the project euler problems. (Got started on it from the labrepl introduction.) It has been a lot of fun and I think I'm learning a fair amount about how the language works. http://projecteuler.net/index.php?section=problems I've got

Re: Open Source Projects for Beg/ Intermediate

2011-04-15 Thread Alan
dbyrne is writing a sort of interactive "learn clojure by problem- solving" website at https://github.com/dbyrne/4clojure/. When he mentioned it to me I tweaked a few things, but it could use another hand or two. Especially, we're both dreadful web designers and so the pages look terrible. If someo

Re: Adding key values in a list of maps

2011-04-15 Thread Jeffrey Schwab
On Thursday, April 14, 2011 8:51:47 PM UTC-4, Andreas Kostler wrote: > > (reduce + (map :b p)) ; Or, save one character: (apply + (map :b p)) -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.

Re: def and ;dynamic

2011-04-15 Thread Alan
I heard that this idea of automatically marking *foo* as dynamic had been dropped for the final 1.3 build. Did I misunderstand? Also, if Jules really liked those * characters in names, would it be an option to explicitly declare them ^{:dynamic false}? On Apr 15, 6:01 am, David McNeil wrote: > >

Re: Cyber Dungeon Quest Alpha 1

2011-04-15 Thread Julian
I looked at this and thought, "It reminds me of Wyvern". The lead developer behind Wyvern, Steve Yegge, was a fairly visionary and expressive programmer who has written a lot about LISP and JVM related subjects. I was reminded of Steve Yegge's post on when he thought he'd rewrite Wyvern to reduc

Re: ANN: Logos v0.6 - Pattern matching, Tabling, Disequality Constraints, and now on Clojars

2011-04-15 Thread David Nolen
On Mon, Apr 11, 2011 at 2:01 PM, Vagif Verdi wrote: > Can it be used as an inference (rule) engine ? You can now - (defrel man p) (fact man 'Bob) (fact man 'John) (fact man 'Ricky) (defrel woman p) (fact woman 'Mary) (fact woman 'Martha) (fact woman 'Lucy) (defrel likes p1 p2) (fact likes '

Re: Open Source Projects for Beg/ Intermediate

2011-04-15 Thread Carin Meier
Thanks. Very cool project. On Apr 15, 5:49 pm, Alan wrote: > dbyrne is writing a sort of interactive "learn clojure by problem- > solving" website athttps://github.com/dbyrne/4clojure/. When he > mentioned it to me I tweaked a few things, but it could use another > hand or two. Especially, we're