Re: ClojureQL: consistent select queries?

2011-07-29 Thread László Török
Hi, thanks for the pointer, I thought clojure.java.jdbc is 1.3 only. :) Las 2011/7/30 Sean Corfield > On Fri, Jul 29, 2011 at 5:07 AM, László Török wrote: > > I'll probably resort to clojure.contrib.sql for now. > > You mean clojure.java.jdbc I hope? :) > > That's the updated version of c.c.s

Re: Java object field access

2011-07-29 Thread Ken Wesson
On Sat, Jul 30, 2011 at 1:00 AM, Petr Gladkikh wrote: > I tried this since I have not used macroses for real problem so far. > And it actually works. > But I do not understand why it works. > I have class: > class Foo { >    public String s; >    public int v; >    public String toString()  { retu

Re: ClojureQL: consistent select queries?

2011-07-29 Thread Sean Corfield
On Fri, Jul 29, 2011 at 5:07 AM, László Török wrote: > I'll probably resort to clojure.contrib.sql for now. You mean clojure.java.jdbc I hope? :) That's the updated version of c.c.sql and it's compatible with both Clojure 1.2 and 1.3. If you hit any problems or think of any useful enhancements,

Re: Good book on migrating from (Java) OO to FP

2011-07-29 Thread Sean Corfield
On Fri, Jul 29, 2011 at 5:03 AM, Colin Yates wrote: > Not sure whether this is good etiquette or not, but I wanted to > praise http://oreilly.com/catalog/0636920021667.  I found it pretty useful > in bridging the gap between OO and FP.  It isn't Clojure specific, but as a > (well established) Java

Re: Java object field access

2011-07-29 Thread Petr Gladkikh
On Tue, Jul 26, 2011 at 5:14 PM, Ken Wesson wrote: > On Tue, Jul 26, 2011 at 6:02 AM, Petr Gladkikh wrote: >> On Tue, Jul 26, 2011 at 3:28 PM, Alan Malloy wrote: >>> On Jul 25, 11:10 pm, Petr Gladkikh wrote: I am trying to construct java object and assign it's fields from a map. That

Online videos of Montreal Clojure User Group presentations

2011-07-29 Thread Jeff Heon
Some presentations of the Montreal Clojure User Group are now online. http://vimeo.com/groups/bonjure/videos -- 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 member

Re: Good book on migrating from (Java) OO to FP

2011-07-29 Thread Wilson MacGyver
for java, I use google guava quite a bit. (formerly known as google collections). http://code.google.com/p/guava-libraries/ there is quite a bit of FPish things in it. On Fri, Jul 29, 2011 at 9:49 PM, Jeff Heon wrote: > In the vein of FP for Java programmers, these two libraries might be > of i

Re: Libraries and build management hell

2011-07-29 Thread Alex Osborne
Lee Spector writes: > FWIW for some JVM newcomers (like me when I started) #6 involves some > mysteries related to where exactly the jar should be saved and how > exactly the other code can be told to find it. It varies depending on > how you run your code (e.g. whether you have to figure out how

Re: better community docs: getting started

2011-07-29 Thread nchurch
> But my question is : is it ready yet ? As a quick and simple way to get a REPL and edit code it seems to work fine. I added a sentence about its newness just so people would be aware of it...if the author prefers no tutorial so far, then of course it should be taken down. -- You received thi

Re: Good book on migrating from (Java) OO to FP

2011-07-29 Thread Jeff Heon
In the vein of FP for Java programmers, these two libraries might be of interest. Sequence-like operations on collection using annotations. Nice and small. http://jedi.codehaus.org/ More advanced and Scalaish. Benefits from a bigger community. http://functionaljava.org/ -- You received this mes

Re: Libraries and build management hell

2011-07-29 Thread Stefan Kamphausen
Hi, On Thursday, July 28, 2011 11:23:58 PM UTC+2, Michal B wrote: > > Why does it have to be so complicated to use libraries? > because it is a complicated topic. Maybe I can compare it to other ecosystems. * CPAN for Perl is a paradise for functionality. However, trying to use CPAN together

Re: better community docs: getting started

2011-07-29 Thread Stefan Kamphausen
inc IMHO there are three types of people coming to Clojure 1. Java Programmers 2. Old-school lispers 3. all the other, who just want to try (and possibly follow the examples in a tutorial or book) For the first two groups the obstacles and interest can probably be sorted out and t

[ANN] (first phoenix-clojure-user-group-meetings)

2011-07-29 Thread pmbauer
Announcement Link, details: https://groups.google.com/d/topic/clj-phx/l_S4qcOSuaY/discussion August 30th, 6:30 PM Food provided. Please use the group mailing list for replies, RSVPs ( http://groups.google.com/group/clj-phx) Hosted by *Shutterfly *. -- You received t

Re: better community docs: getting started

2011-07-29 Thread Lee Spector
On Jul 29, 2011, at 5:39 PM, Ken Wesson wrote: > On Fri, Jul 29, 2011 at 5:33 PM, Laurent PETIT > wrote: >> Sorry to make things look different than the apparent consensus of the >> participants to this thread, but isn't it a little bit too prematurate to >> put that pressure on Clooj ? >> I un

Re: Pair Coding over Skype

2011-07-29 Thread cej38
I am not your man for being a tutor, but what type of math libraries? On Jul 28, 1:26 pm, Jay Vyas wrote: > Hi guys (and hello to my beloved london-clojurians) : My name is jay and I > want to pair program some Clojure scripts against REPL  with a moderate to > good clojure tutor.  If anyone is

Re: Libraries and build management hell

2011-07-29 Thread octopusgrabbus
On Jul 28, 10:06 pm, Mark Rathwell wrote: > The problem with jar downloads as the default distribution method is that > non-Java people, and even plenty of Java people, seem to have problems > consistently setting classpaths correctly.  Seems much more straightforward > to just have lein take car

Re: Pair Coding over Skype

2011-07-29 Thread nil
Yes On Jul 29, 3:24 pm, Jeremy Heiler wrote: > > Is this the site you are talking about? > > http://clojure-euler.wikispaces.com/ -- 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

Re: clojure.contrib.command-line

2011-07-29 Thread OGINO Masanori
> no reason other than its a small lib with a handful of functions... I see. Thanks. -- Name: OGINO Masanori (荻野 雅紀) E-mail: masanori.og...@gmail.com -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googl

Re: better community docs: getting started

2011-07-29 Thread Ken Wesson
On Fri, Jul 29, 2011 at 5:33 PM, Laurent PETIT wrote: > Sorry to make things look different than the apparent consensus of the > participants to this thread, but isn't it a little bit too prematurate to > put that pressure on Clooj ? > I understand the desire to have Clooj for "filling the gap". >

Re: Possible Issue with Listing 11.5 from the "Joy of Clojure"

2011-07-29 Thread Ken Wesson
On Fri, Jul 29, 2011 at 3:19 PM, Julien wrote: > This listing is an attempt to make the function safe for concurrent > modification. My claim is that count and seq should also be locking > around "a" for exactly same reason as aget and aset. In particular, > locking is not only ensuring mutual exc

Re: better community docs: getting started

2011-07-29 Thread Laurent PETIT
Sorry to make things look different than the apparent consensus of the participants to this thread, but isn't it a little bit too prematurate to put that pressure on Clooj ? I understand the desire to have Clooj for "filling the gap". But my question is : is it ready yet ? 2011/7/29 nchurch >

Re: Good book on migrating from (Java) OO to FP

2011-07-29 Thread Laurent PETIT
2011/7/29 Colin Yates > Hi all, > > Not sure whether this is good etiquette or not, but I wanted to praise > http://oreilly.com/catalog/0636920021667. I found it pretty useful in > bridging the gap between OO and FP. It isn't Clojure specific, but as a > (well established) Java/OO guy, this hel

Re: better community docs: getting started

2011-07-29 Thread nchurch
Here's a tutorial on getting started with Clooj: http://dev.clojure.org/display/doc/getting+started+with+Clooj If this looks good to people, I'll try to get permission to reorganize the Getting Started docs a little. -- You received this message because you are subscribed to the Google Groups "

Re: Good book on migrating from (Java) OO to FP

2011-07-29 Thread Colin Yates
It is only 80 or so pages which made it jump to the top of my queue :). There wasn't really any one thing, it just made lots of things click. He describes a FP construct or principle and then shows the Java implementation. I am currently in hammock time before I jump in with both feet, and My ro

Re: Good book on migrating from (Java) OO to FP

2011-07-29 Thread ax2groin
Can you provide a more detailed review? How did it help you? What area(s) that it focused on did you find most useful? I've been playing with Clojure for nearly a year now, but it has just been on my own. At work, however, it is just Java and C#. Of course, I've also got several computer books wai

Re: dynamically generated let bindings

2011-07-29 Thread Ken Wesson
> P.S. Thanks everyone for your help so far. My brain is overheating but I am > learning a lot. You're welcome. To do what you're proposing you will probably need the emitted function to look like: (fn [& args] (let [foo (some logic goes here) bar (some logic goes here) ...]

Re: Question regarding structural sharing, records, and maps

2011-07-29 Thread Ken Wesson
On Fri, Jul 29, 2011 at 4:33 PM, Trenton Strong wrote: > Thanks for clearing that up. ... > Thanks for taking the time to craft such a thoughtful reply, it is > really helpful. You're welcome. -- Protege: What is this seething mass of parentheses?! Master: Your father's Lisp REPL. This is the

Re: Question regarding structural sharing, records, and maps

2011-07-29 Thread Trenton Strong
On Jul 29, 4:38 am, Ken Wesson wrote: > Yes. In fact this should work with records, too -- all the "native" > fields of the record need to be copied for each version, but most will > typically be pointers and most of those will typically be to existing > objects. Only the ones that were changed wi

Re: Alright, fess up, who's unhappy with clojurescript?

2011-07-29 Thread Tal Liron
Lars, Yes, they are different things. :) Ext Core is probably close in scope to jQuery by itself. But you can really build Ext JS modularly and use only what you want. Also, jQuery + plugins ends being just as full- featured as the complete Ext JS (though the quality of jQuery plugins tends to be

Re: Defrecord and Interfaces..

2011-07-29 Thread Aaron Cohen
On Fri, Jul 29, 2011 at 3:18 PM, Andreas Liljeqvist wrote: > Is this a bug? > > Nope, expectation dissonance. > (defprotocol Notcloseable (dosomething [this])) > > This is what actually defines the function "dosomething". Once this definition happens, the function exists and can be called. If yo

Re: Libraries and build management hell

2011-07-29 Thread Lee Spector
On Jul 29, 2011, at 8:14 AM, Alex Osborne wrote: > > 6. Click "hooke-1.1.2.jar" and save the jar file to your project. > > The repository is really nothing more than a bunch of directories > each containing a jar files and another file containing a list of > dependencies. I'm not sure how you c

Re: Pair Coding over Skype

2011-07-29 Thread Jeremy Heiler
On Thu, Jul 28, 2011 at 5:37 PM, nil wrote: > Until you find someone, one site you can look at is the clojure euler > site. It has some math examples written by folks who know clojure to > varying degrees. You can see different ways of tackling a given > problem. Is this the site you are talking

Possible Issue with Listing 11.5 from the "Joy of Clojure"

2011-07-29 Thread Julien
Hi Everyone. I have been reading the "Joy of Clojure" with great interest, but I may have noticed a possible problem with listing 11.5. For those of you who don't have the book, here is the listing: (defn make-safe-array [ t sz] (let [a (make-array t sz)] (reify SafeArray (count

Defrecord and Interfaces..

2011-07-29 Thread Andreas Liljeqvist
Is this a bug? (defprotocol Notcloseable (dosomething [this])) (defrecord Archive [] java.io.Closeable (close [_] (print "closeable")) Notcloseable (dosomething [_] (print "something"))) user> (def a (Archive.)) user> (.close a) closeable user> (close a) Unable to resolve symbol

Re: Libraries and build management hell

2011-07-29 Thread James Reeves
On 29 July 2011 08:01, Michal B wrote: > Leiningen definitely alleviates the hairiness of library management. But I > wish people won't settle for a lein like solution for simple projects. As > much as it helps, it is still an unnecessary burden and an obstacle to > adoption, in my opinion and exp

Re: Java 7 is out!

2011-07-29 Thread Aaron Bedra
On 07/28/2011 11:54 AM, Daniel Gagnon wrote: So, what does it means for Clojure? Faster execution? Some new interesting stuff in the standard Java library? And I remember there was something about forkjoin that would be good for Clojure, what about that? -- You received this message because y

Re: Java 7 is out!

2011-07-29 Thread cassiel
On Jul 29, 1:18 am, Ken Wesson wrote: > On the one hand, assuming that Java 7 doesn't outright break anything, [...] Like loops? http://www.lucidimagination.com/blog/2011/07/28/dont-use-java-7-for-anything/ -- You received this message because you are subscribed to the Google Groups "Clojure"

Re: protocols and records -- use when?

2011-07-29 Thread Lee Spector
On Jul 28, 2011, at 8:19 PM, Alex Osborne wrote: > The main use cases for the old structs feature on the other hand are > completely replaced by records and it is recommended that new code use > defrecord instead of defstruct. I had some code using structs and, following advice like this, replace

Re: Clojure 1.3 Beta 1

2011-07-29 Thread abedra
Can you provide a couple of concrete examples for this? I will make the ticket in JIRA and start working on it, but I am spread thin on quite a few things at the moment and these examples will help a lot. Cheers, Aaron Bedra -- Clojure/core http://clojure.com On Jun 24, 12:47 pm, Mark Engelberg

Re: Question regarding structural sharing, records, and maps

2011-07-29 Thread Trenton Strong
On Jul 29, 8:58 am, Michael Gardner wrote: > > An atom would be more appropriate, unless you're coordinating updates to the > tree with updates to some other ref. Ah, for some reason that didn't occur to me, thanks. Since the tree in this case acts as a supporting index on spatial data, it pret

Re: Question regarding structural sharing, records, and maps

2011-07-29 Thread Michael Gardner
On Jul 28, 2011, at 10:59 PM, Trenton Strong wrote: > So far, I > have settled on just using a single ref wrapping the root node of the > tree with all update functions acting on that ref via dosync. An atom would be more appropriate, unless you're coordinating updates to the tree with updates t

Re: Libraries and build management hell

2011-07-29 Thread Jonah Benton
Re: > > Hopefully some bright spark will come along and revolutionise dependency > management, like how Rich revolutionised the notion of state in > programming.  As far as I'm aware nobody has so far, for any programming > language (or OS distro), I'm not completely happy with any of them. > > It

Re: Code structure/design problems

2011-07-29 Thread Michael Gardner
On Jul 29, 2011, at 1:50 AM, Laurent PETIT wrote: > Without too much thinking about it, I would have thought monsters, players, > etc. need to be changed in a same "transaction", so would have by default > implemented them as refs instead of atoms. > > Could you elaborate more on the choice of

Re: ClojureQL: consistent select queries?

2011-07-29 Thread László Török
Hi 2011/7/29 Michael Wood > On 29 July 2011 14:01, Ken Wesson wrote: > > On Fri, Jul 29, 2011 at 7:41 AM, László Török > wrote: > >> Hi, > >> > >> is there a way to execute multiple select queries on a table using > clojureql > >> in a transaction? > >> > >> sg. like > >> > >>(with-results

Re: Apply holding onto the head of lazy seqs nested within args; .invoke weirdness

2011-07-29 Thread abedra
It seems like the behavior has changed a little in Clojure 1.3, but still warrants some additional discussion. Here's what I saw (count (range 1)) user=> 1 (apply count [(range 1)]) user=> 1 (apply + (range 1)) user=> 49995000 (. count (applyTo (

Re: ClojureQL: consistent select queries?

2011-07-29 Thread Michael Wood
On 29 July 2011 14:01, Ken Wesson wrote: > On Fri, Jul 29, 2011 at 7:41 AM, László Török wrote: >> Hi, >> >> is there a way to execute multiple select queries on a table using clojureql >> in a transaction? >> >> sg. like >> >>    (with-results [res1 query1 >>     res2 query2]

Clojure and Incanter Talk 3 August in London

2011-07-29 Thread Bruce Durling
Fellow Clojurians, Ben Evans of the LJC and JCP will be giving a talk on how much he loves and what he does with Clojure and Incanter at Skillsmatter in London. The talk is on 3 August. Doors open at 18.30! I hope to see you there! The sign up page is here: http://skillsmatter.com/event/java-je

Re: clojure.contrib.command-line

2011-07-29 Thread octopusgrabbus
Thanks. This fixed it. On Jul 29, 9:45 am, gaz jones wrote: > it lives on github:http://github.com/clojure/tools.cli > like all the new contrib libs, to use it in a project you need to add > it to your dependencies: > > :dependencies [[org.clojure/clojure "1.2.1"] >                       [org.clo

Re: Building cli

2011-07-29 Thread octopusgrabbus
This fixed it. Thanks Gaz Jones: :dependencies [[org.clojure/clojure "1.2.1"] [org.clojure/tools.cli "0.1.0"]] On Jul 29, 10:01 am, octopusgrabbus wrote: > I have downloaded the source to tools.cli and built it with maven. > I've put the jar out in /usr/share/java, and crea

Building cli

2011-07-29 Thread octopusgrabbus
I have downloaded the source to tools.cli and built it with maven. I've put the jar out in /usr/share/java, and created a link to it: sudo ln -s /usr/share/java/tools.cli-0.1.0.jar /usr/share/java/ tools.cli.jar. I am getting this error on compile Caused by: clojure.lang.Compiler$CompilerExcepti

Re: dynamically generated let bindings

2011-07-29 Thread Sam Aaron
On 29 Jul 2011, at 12:56, Ken Wesson wrote: >>> >> >> That seems to blow up > > How so? (defn binding-vec [foos] (vec (interleave names (take (count names) (repeat `(count ~foos)) (defmacro magic-fn [& forms] (let [args (gensym 'args)] `(fn [& ~args] (let ~(binding-vec args)

Re: clojure.contrib.command-line

2011-07-29 Thread gaz jones
> Well, README and tests are very good. > I withdrew into REPL and overlooked them stupidly. I'm very sorry. > no worries, glad they help. > BTW some functions seems not to be public API though they are public. > Why they are not separated by defn- or specific namespace like > clojure.tools.cli.i

Re: clojure.contrib.command-line

2011-07-29 Thread gaz jones
it lives on github: http://github.com/clojure/tools.cli like all the new contrib libs, to use it in a project you need to add it to your dependencies: :dependencies [[org.clojure/clojure "1.2.1"] [org.clojure/tools.cli "0.1.0"]] On Fri, Jul 29, 2011 at 7:56 AM, octopusgrabb

Re: protocols and records -- use when?

2011-07-29 Thread Oskar
Thank you everyone. I now have a much better understanding of protocols aed records. This video helped too http://vimeo.com/11236603 On Jul 29, 3:01 pm, Jeff Heon wrote: > Thanks for the clarification. I see I was mixing up various concepts > in my head. > > On Jul 29, 8:19 am, Alex Osborne wrot

Re: protocols and records -- use when?

2011-07-29 Thread Jeff Heon
Thanks for the clarification. I see I was mixing up various concepts in my head. On Jul 29, 8:19 am, Alex Osborne wrote: > Clojure has some of those features, but it is sufficiently different > from the traditional model that I would consider "not particularly OO" a > valid, if not particularly u

Re: clojure.contrib.command-line

2011-07-29 Thread octopusgrabbus
On Jul 28, 7:24 pm, Anthony Grimes wrote: > command-line is deprecated in favor of tools.cli > now.http://github.com/clojure/tools.cli Where is the repository located? (ns addr-verify (:gen-class) (:require [clojure.tools.cli :only (cli optional)]) . . . results in this error: clojur

Re: protocols and records -- use when?

2011-07-29 Thread Alex Osborne
Jeff Heon writes: > I'm puzzled when we say that Clojure is not particularly OO, but using > protocols and datatypes feel OO to me, > except that the namespace of the protocol method implementations is > decoupled from the namespace of the type. > > Perhaps my definition of OO is too loose and I

Re: Libraries and build management hell

2011-07-29 Thread Alex Osborne
Michal B writes: > To use libraries, you need to learn how to operate half a dozen build > tools and git because each library author distributes their library > differently. There is a simple de facto standard, which in typical Clojure-style we've inherited from the Java community for the sake

Re: ClojureQL: consistent select queries?

2011-07-29 Thread László Török
Hi 2011/7/29 Ken Wesson > On Fri, Jul 29, 2011 at 7:41 AM, László Török wrote: > > Hi, > > > > is there a way to execute multiple select queries on a table using > clojureql > > in a transaction? > > > > sg. like > > > >(with-results [res1 query1 > > res2 query2] > >

Good book on migrating from (Java) OO to FP

2011-07-29 Thread Colin Yates
Hi all, Not sure whether this is good etiquette or not, but I wanted to praise http://oreilly.com/catalog/0636920021667. I found it pretty useful in bridging the gap between OO and FP. It isn't Clojure specific, but as a (well established) Java/OO guy, this helped me "get FP". (not connected in

Re: ClojureQL: consistent select queries?

2011-07-29 Thread Ken Wesson
On Fri, Jul 29, 2011 at 7:41 AM, László Török wrote: > Hi, > > is there a way to execute multiple select queries on a table using clojureql > in a transaction? > > sg. like > >    (with-results [res1 query1 >     res2 query2] >    .. do sg) > > and res1 and res2 would be ta

Re: dynamically generated let bindings

2011-07-29 Thread Ken Wesson
On Fri, Jul 29, 2011 at 7:35 AM, Sam Aaron wrote: > > On 29 Jul 2011, at 12:11, Ken Wesson wrote: >> >> Why not just (vec (interleave names (take (count names) (repeat >> `(count ~foos)? >> > > That seems to blow up How so? > The actual end goal is to be able to define a macro (or whatever)

ClojureQL: consistent select queries?

2011-07-29 Thread László Török
Hi, is there a way to execute multiple select queries on a table using clojureql in a transaction? sg. like (with-results [res1 query1 res2 query2] .. do sg) and res1 and res2 would be taken from a same consistent snapshot. p.s. by looking at lau's repository

Re: Question regarding structural sharing, records, and maps

2011-07-29 Thread Ken Wesson
On Thu, Jul 28, 2011 at 11:59 PM, Trenton Strong wrote: > 1.) Does structural sharing play well with nested structures? With a > tree whose nodes are represented by nested maps, if a leaf node is > updated with new data, will structural sharing efficiently represent > the new version of the tree a

Re: dynamically generated let bindings

2011-07-29 Thread Sam Aaron
On 29 Jul 2011, at 12:11, Ken Wesson wrote: > > Why not just (vec (interleave names (take (count names) (repeat > `(count ~foos)? > That seems to blow up: (defn binding-vec [foos] (vec (interleave names (take (count names) (repeat `(count ~foos)) (defmacro magic-fn [& forms] (let

Re: dynamically generated let bindings

2011-07-29 Thread Ken Wesson
On Fri, Jul 29, 2011 at 6:57 AM, Sam Aaron wrote: > However, something like the following doesn't work: > > (defn binding-vec [foos] >  `(vec (interleave ~names ~(take (count names) (repeat '`(count ~foos)) > > A, because the above code is probably incorrect (I just cobbled it together > for

Re: dynamically generated let bindings

2011-07-29 Thread Sam Aaron
Hi there, On 29 Jul 2011, at 10:05, Alan Malloy wrote: > > (defn binding-vec [foos] > ['size `(count ~foos)]) > > (defmacro magic-fn > [& forms] > (let [args (gensym 'args)] >`(fn [& ~args] > (let ~(binding-vec args) > ~@forms > > ((magic-fn (+ size 10)) 1 2) ;=> 12 Ac

Question regarding structural sharing, records, and maps

2011-07-29 Thread Trenton Strong
Hi all, this is my first post. I'm currently building a tree data structure (quadtree to be exact) while doing some exploratory game server programming using Clojure. This tree will end up with a lot of "entities" stored in the nodes, whose positions determine which node they end up in. As game s

Re: Libraries and build management hell

2011-07-29 Thread josh rotenberg
On Thu, Jul 28, 2011 at 2:23 PM, Michal B wrote: > Why does it have to be so complicated to use libraries? Heh. My current project is C/C++, and we are using gnu autotools for the build. A few dependencies use pkgconfig, some have m4 macros (that are out of date), one has its own backtick-config

Re: Libraries and build management hell

2011-07-29 Thread Davi Santos
Hello, I am absolutely new to Clojure and Intellij. I just installed the La Clojure plugin and everything is working. This has been relevant in my decision of which JVM functional language to use. Maybe the over-engineering is indirect Haskell influence (despite being ML descendant): you have to l

Re: dynamically generated let bindings

2011-07-29 Thread Sam Aaron
Hi Alan, On 29 Jul 2011, at 10:05, Alan Malloy wrote: >> >> Sorry, I was just trying to simplify things to try and get directly to the >> meat of the problem. > > No apologies needed - reducing to a simple case is great. But here, > the simplification was probably too severe. > Sorry, I'm Eng

Re: dynamically generated let bindings

2011-07-29 Thread Alan Malloy
On Jul 29, 1:49 am, Sam Aaron wrote: > On 29 Jul 2011, at 07:22, Ken Wesson wrote: > > > On Fri, Jul 29, 2011 at 12:49 AM, Jeff Rose wrote: > >> I don't think it's very typical to pass a form to a function, unless > >> you plan on using eval at runtime. > > > Or it's a function called by a macro

Re: dynamically generated let bindings

2011-07-29 Thread Sam Aaron
On 29 Jul 2011, at 00:46, Kent wrote: > I'm not sure what you're trying to do with this and, based on that > ignorance, I'm not sure I think it's a great idea. Maybe you are being > a bit crazy, and maybe your a genius. Who am I to say? > > Here is a function that does what you want. The only

Re: dynamically generated let bindings

2011-07-29 Thread Sam Aaron
On 29 Jul 2011, at 07:22, Ken Wesson wrote: > On Fri, Jul 29, 2011 at 12:49 AM, Jeff Rose wrote: >> I don't think it's very typical to pass a form to a function, unless >> you plan on using eval at runtime. > > Or it's a function called by a macro to do some processing of forms. Yep, this is p

Re: format and printf can't be used with BigInt

2011-07-29 Thread Sean Corfield
On Thu, Jul 28, 2011 at 10:52 PM, Meikel Brandmeyer (kotarak) wrote: > I think this is one of the misunderstandings or points of disagreements (or > whatever you want to name it) in this whole discussion: this code is *not* > broken. Code that runs on 1.2 but throws an exception on 1.3 is "broken

Re: Are they scared of us yet?

2011-07-29 Thread Ken Wesson
On Fri, Jul 29, 2011 at 2:48 AM, Laurent PETIT wrote: > So they decided to go the route of adding a .getSuppressed() (Exceptions) > method in Throwable, thus behaving differently from other finally clauses > ... > > ... so now we have a (with-open) whose semantics are not aligned with those > sema

Re: Code structure/design problems

2011-07-29 Thread msappler
Yes. This game was me starting to learn clojure a year ago and I just made it sequential. So I used atoms :) So for making it run in parallel I would have to change the atoms to refs. For example movement-update would need to synchronize the grid-cells and the position of an entity as one atomic

Re: Libraries and build management hell

2011-07-29 Thread Michal B
Leiningen definitely alleviates the hairiness of library management. But I wish people won't settle for a lein like solution for simple projects. As much as it helps, it is still an unnecessary burden and an obstacle to adoption, in my opinion and experience. -- You received this message becau