Re: protocols and records -- use when?

2011-07-28 Thread Nick Zbinden
> 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 should think of > pr

Re: Code structure/design problems

2011-07-28 Thread Laurent PETIT
Hi, 2011/7/29 msappler > I am also developing a clojure rpg and have open sourced the last > alpha version: > > https://code.google.com/p/clojure-rpg/ > > ~ > > Basically I am using an atom for every entity in the game (monster, > player, projectiles, explosions...) and for every cell in the gri

Re: Libraries and build management hell

2011-07-28 Thread Michal B
The situation you describe clearly requires a build tool. But I'm not talking about this case. -- 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 moderate

Re: Are they scared of us yet?

2011-07-28 Thread Laurent PETIT
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 semantics of Java 7' try-with-resources statement, wrt exception shado

Re: passing value to functions

2011-07-28 Thread Tuba Lambanog
Alan, The macro is great (output could use a bit of formatting for readability, but, hey, I'm not complaining). Thank you very much. Tuba On Thu, Jul 28, 2011 at 10:34 PM, Alan Malloy wrote: > On Jul 28, 8:11 pm, Resty Cena wrote: > > Hi, Masanori, > > Yes, I noticed the similarity. I'm using L

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

2011-07-28 Thread Ken Wesson
On Fri, Jul 29, 2011 at 2:36 AM, Meikel Brandmeyer (kotarak) wrote: > Hi, > > Am Freitag, 29. Juli 2011 08:24:54 UTC+2 schrieb Ken Wesson: >> >> Er, "fast" would be for primitive integer arithmetic to wrap rather >> than throw an exception or auto-promote. Both of the latter behaviors >> require e

Re: Code structure/design problems

2011-07-28 Thread msappler
I am also developing a clojure rpg and have open sourced the last alpha version: https://code.google.com/p/clojure-rpg/ ~ Basically I am using an atom for every entity in the game (monster, player, projectiles, explosions...) and for every cell in the grid of the map. There are a lot of functio

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

2011-07-28 Thread Meikel Brandmeyer (kotarak)
Hi, Am Freitag, 29. Juli 2011 08:24:54 UTC+2 schrieb Ken Wesson: > Er, "fast" would be for primitive integer arithmetic to wrap rather > than throw an exception or auto-promote. Both of the latter behaviors > require every math op to be accompanied by a test of some sort and a > branch (to either

Are they scared of us yet?

2011-07-28 Thread Ken Wesson
They've just added "with-open" to JavaSE: http://download.oracle.com/javase/7/docs/technotes/guides/language/try-with-resources.html -- Protege: What is this seething mass of parentheses?! Master: Your father's Lisp REPL. This is the language of a true hacker. Not as clumsy or random as C++; a l

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

2011-07-28 Thread Ken Wesson
On Fri, Jul 29, 2011 at 1:52 AM, Meikel Brandmeyer (kotarak) wrote: > Hi, > > Am Freitag, 29. Juli 2011 01:28:27 UTC+2 schrieb Sean Corfield: >> >> Kinda hard since that expression is not valid in 1.3 anyway: >> >> ArithmeticException integer overflow >> clojure.lang.Numbers.throwIntOverflow (Numb

Re: dynamically generated let bindings

2011-07-28 Thread Ken Wesson
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. -- Protege: What is this seething mass of parentheses?! Master: You

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

2011-07-28 Thread Meikel Brandmeyer (kotarak)
Hi, Am Freitag, 29. Juli 2011 01:28:27 UTC+2 schrieb Sean Corfield: > > Kinda hard since that expression is not valid in 1.3 anyway: > > ArithmeticException integer overflow > clojure.lang.Numbers.throwIntOverflow (Numbers.java:1374) > > So that code breaks explicitly in 1.3 and in many ways (for

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

2011-07-28 Thread Stuart Halloway
> I can't think of a single good reason why any of these pages should > not be world-readable. We're an open source project. It's not as if we > have trade secrets or something. > > I have no problem, of course, with restricting *edit* privileges to > those with accounts that have proven to be res

Re: dynamically generated let bindings

2011-07-28 Thread Jeff Rose
I don't think it's very typical to pass a form to a function, unless you plan on using eval at runtime. If it doesn't need to happen at runtime, then you'd do this with a macro approximately like this: user=> (defmacro bar [f] `(fn [& args#] (let [~'size (count args#)] ~f))) #'user/bar user=> (ba

Re: passing value to functions

2011-07-28 Thread Alan Malloy
On Jul 28, 8:11 pm, Resty Cena wrote: > Hi, Masanori, > Yes, I noticed the similarity. I'm using Laurent's 'manual way' for now. > I'll look at Alan's and Laurent's more concise solution in a few days. The > "manual way" is easy to debug as all I have to do is println the > intermediate results.

Re: protocols and records -- use when?

2011-07-28 Thread Jeff Heon
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 should think of protocols as "j

Re: clojure.contrib.command-line

2011-07-28 Thread OGINO Masanori
Well, README and tests are very good. I withdrew into REPL and overlooked them stupidly. I'm very sorry. 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.internals? -- Name: OGINO Masanori (荻野

Re: Clojure User Group, Phoenix

2011-07-28 Thread pmbauer
Great! I've created a mailing list: http://groups.google.com/ group/clj-phx On Thursday, July 28, 2011 8:17:14 PM UTC-7, Charlie Griefer wrote: > > On Thu, Jul 28, 2011 at 8:12 PM, pmbauer wrote: > > Anyone in the

Re: Clojure User Group, Phoenix

2011-07-28 Thread Charlie Griefer
On Thu, Jul 28, 2011 at 8:12 PM, pmbauer wrote: > Anyone in the Phoenix area care to help start a Clojure user group? > http://clj-phx.wikispaces.com/Startup+Discussion I'm in. I'm a total n00b, but I'm definitely in. -- Charlie Griefer http://charlie.griefer.com/ I have failed as much as I h

Clojure User Group, Phoenix

2011-07-28 Thread pmbauer
Anyone in the Phoenix area care to help start a Clojure user group? http://clj-phx.wikispaces.com/Startup+Discussion -- 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

Re: passing value to functions

2011-07-28 Thread Resty Cena
Hi, Masanori, Yes, I noticed the similarity. I'm using Laurent's 'manual way' for now. I'll look at Alan's and Laurent's more concise solution in a few days. The "manual way" is easy to debug as all I have to do is println the intermediate results. Thanks. Tuba 2011/7/28 OGINO Masanori > Lauren

Re: clojure.contrib.command-line

2011-07-28 Thread gaz jones
are there any scenarios in particular you feel need more documentation? im happy to add more if it is lacking. hopefully the README on the project page and tests provide a pretty good idea of what options are available: https://github.com/clojure/tools.cli https://github.com/clojure/tools.cli/blob

Re: Java 7 is out!

2011-07-28 Thread OGINO Masanori
>From http://www.oracle.com/technetwork/java/hotspotfaq-138619.html : --- I would like java to default to -server. I have a lot of scripts which I cannot change (or do not want to change). Is there any way to do this? Since Java SE 5.0, with the exception of 32-bit Windows, the server VM will aut

Re: Digest for clojure@googlegroups.com - 14 Messages in 9 Topics

2011-07-28 Thread Luc Prefontaine
We cannot prevent people pulling their hairs and getting bald with dependency management if they wish to do so. Now if you say that Maven is not mainstream, hampers Java projects and should be ditched that's a discussion for a different mailing list. Leiningen brings simplicity on top of Maven

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

2011-07-28 Thread Praki Prakash
On Thu, Jul 28, 2011 at 5:20 PM, Tal Liron wrote: > jQuery is not so much an elephant as it is a mammoth. It was one of > the first clientside-JS frameworks to reach a broad audience, but it > also one of the worst. It incorporates so many terrible JS practices, > performs miserably, and really c

Re: Java 7 is out!

2011-07-28 Thread Bill Robertson
The new JVM really starts fast. Clojure users will like that. I also noticed that (at least for 64-bit) that the Windows version only comes with the hotspot compiler. No client jvm. I haven't checked 32-bit. This is a big change, because previous 32-bit JRE's only came w/ client. I had never checke

Re: clojure.contrib.command-line

2011-07-28 Thread OGINO Masanori
(defn -main [& args] (with-command-line args "Get csv file name" [[in-file-name ".csv input file name" "resultset.csv" ]] (println "in-file-name:", in-file-name))) The second vector of vector seems unnecessary. Or tools.cli way: (ns foo.main (:gen-class) (:use [clojure.tools.cli :o

Re: Libraries and build management hell

2011-07-28 Thread Mark Rathwell
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 care of that for you. As for complicated installation

Re: Libraries and build management hell

2011-07-28 Thread Luc Prefontaine
+1 We build a dozen projects here with a mix of Clojure and Java and we only use Leiningen. The biggest effort was to consolidate the dependency libs pulled by Leiningen in our different projects. You end up with multiple version of the same jar, a result of the dependency solving done by Leini

Re: clojure.contrib.command-line

2011-07-28 Thread octopusgrabbus
Thanks. I'll switch over. 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 -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to cl

Re: Digest for clojure@googlegroups.com - 14 Messages in 9 Topics

2011-07-28 Thread gaz jones
i would have to disagree with that. i hardly feel saddled with lein, it frees me from thinking about any build stuff 95% of the time, and as far as i know it is not the 'official' build system of clojure. it's just extremely popular because it makes creating and building projects so easy. you're fr

Re: Libraries and build management hell

2011-07-28 Thread Brent Millare
I have to chime in my solution to the problem, dj. git://github.com/bmillare/dj.git Acts more like a distro then a build tool though. On Jul 28, 7:49 pm, Sean Corfield wrote: > On Thu, Jul 28, 2011 at 2:23 PM, Michal B wrote: > > Why does it have to be so complicated to use libraries? > > I ca

Re: dynamically generated let bindings

2011-07-28 Thread Alan Malloy
On Jul 28, 3:48 pm, Sam Aaron wrote: > Hi there, > > I'm trying to create a fn which does the following: > > * returns a fn which takes an arbitrary number of args > * calls a helper fn, passing the incoming args returning a vector of > alternating symbols and vals > * creates a let form using th

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

2011-07-28 Thread Ken Wesson
On Thu, Jul 28, 2011 at 9:03 PM, pmbauer wrote: > That wasn't called for. ?? > Given Stu linked to the page (and is linked in the 1.3 release notes), it's > reasonable to assume the permission error is merely a mistake and not some > nefarious plot to withhold information from the Clojure commun

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

2011-07-28 Thread pmbauer
That wasn't called for. Given Stu linked to the page (and is linked in the 1.3 release notes), it's reasonable to assume the permission error is merely a mistake and not some nefarious plot to withhold information from the Clojure community. On Thursday, July 28, 2011 4:48:34 PM UTC-7, Ken Wess

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

2011-07-28 Thread Lars Rune Nøstdal
.. but isn't jQuery and ExtJS totally different things? -- 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 p

Re: Digest for clojure@googlegroups.com - 14 Messages in 9 Topics

2011-07-28 Thread JAX
I'm all for simplifying clojure. Even if Lein is great... If clojure is heavily biased and saddled by yet another framework/build system , it will never go mainstream. Jay Vyas MMSB UCHC On Jul 29, 2011, at 12:32 AM, clojure+nore...@googlegroups.com wrote: > Today's Topic Summary > Group: ht

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

2011-07-28 Thread Tal Liron
James, your tone was unfortunate, but I do want do defend your position *a little*. Projects like ClojureScript (and CoffeeScript) -- and GWT and Vaadin for that matter -- come from a certain anti-JavaScript attitude. Though I sympathize, I would like to encourage all the JavaScript haters to give

Re: protocols and records -- use when?

2011-07-28 Thread Alex Osborne
Oskar writes: > Why protocols (and records)? What benefits do I get? Alex mentioned > polymorphism; how is this different from/related to multimethods? As Andreas mentioned, yes protocols basically give you a subset of the polymorphism functionality of multimethods. But they also give you some

Re: Java 7 is out!

2011-07-28 Thread OGINO Masanori
AFAIK using InvokeDynamic *requires* Java7, so I think it will be done if Java7 gets default and it fits for Clojure. However, for example, new HotSpot gains more performance then Clojure may also gain if you use Java7... (but you can't force everyone to use Java7 of course.) Also, you can call n

Re: Java 7 is out!

2011-07-28 Thread Ken Wesson
On Thu, Jul 28, 2011 at 7:32 PM, Kenny Stone wrote: > Can clojure take advantage of  some features if they are available?  I know > the JRuby dudes are pretty excited about invoke dynamic... I'm not really sure there's a single answer to that question. On the one hand, assuming that Java 7 doesn

Re: Java 7 is out!

2011-07-28 Thread Tal Liron
I have to agree with this. In fact, it would be much easier to integrate into Clojure than JRuby (or other JVM languages). I know the Clojure Java source code pretty well, and wouldn't mind playing with it a bit to see how feasible it is. The ideal deployment solution would be to have an extra ja

Re: dynamically generated let bindings

2011-07-28 Thread Ken Wesson
On Thu, Jul 28, 2011 at 6:48 PM, Sam Aaron wrote: > Hi there, > > I'm trying to create a fn which does the following: > > * returns a fn which takes an arbitrary number of args > * calls a helper fn, passing the incoming args returning a vector of > alternating symbols and vals > * creates a let

Re: Calling clojure from java.

2011-07-28 Thread Ken Wesson
On Thu, Jul 28, 2011 at 1:58 PM, Meikel Brandmeyer wrote: > If the thing you want to call is a macro, you have to hope that the library > other provided the logic as star function (as in Nicolas' case). If there is > no function containing the actual logic, you have to re-implement the macro >

Re: Problem with ClojureScript and Node.js

2011-07-28 Thread Anthony Grimes
Oh! I apologize. I was replying via the google interface and didn't realize it wasn't quoting. Here is a link to the topic for context: https://groups.google.com/d/topic/clojure/ZyVrCxmOFTM/discussion I've also filed a bug here: http://dev.clojure.org/jira/browse/CLJS-43 Sorry. :) On Thursday,

Re: Libraries and build management hell

2011-07-28 Thread Sean Corfield
On Thu, Jul 28, 2011 at 2:23 PM, Michal B wrote: > Why does it have to be so complicated to use libraries? I can't imagine it being much simpler than using Leiningen... > To use libraries, you need to learn how to operate half a dozen build tools Just one: Leiningen. You can learn Cake or Maven

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

2011-07-28 Thread Ken Wesson
On Thu, Jul 28, 2011 at 7:30 PM, Sean Corfield wrote: > I think one of the authors / core members needs to change the > permissions. I have edit access on the parent page > http://dev.clojure.org/display/doc/Enhanced+Primitive+Support and the > sibling page http://dev.clojure.org/display/doc/Bit+O

Re: dynamically generated let bindings

2011-07-28 Thread Kent
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 difference is that my function also takes the "bin

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

2011-07-28 Thread Ken Wesson
On Thu, Jul 28, 2011 at 7:28 PM, Sean Corfield wrote: > On Thu, Jul 28, 2011 at 1:53 PM, Ken Wesson wrote: >>> Chas has already pointed you at the rationale / discussion but I'm a >> Discussions about primitive arithmetic, not BigInteger arithmetic. > > I take it you didn't actually bother to rea

Re: passing value to functions

2011-07-28 Thread OGINO Masanori
Laurent's way and Alan's way have different surfaces, but same mean. (-> word fix-ou fix-ize) (fix-ize (fix-ou word)) You can check it using clojure.walk/macroexpand-all. user=> (macroexpand-all '(-> "labour" fix-ou fix-ize)) (fix-ize (fix-ou "labour")) Indeed you can choose only one way, I sug

Re: Problem with ClojureScript and Node.js

2011-07-28 Thread Rich Hickey
Could you please use quoting in your messages? Otherwise they have no context. Thanks, Rich On Jul 28, 2011, at 7:10 PM, Anthony Grimes wrote: Actually, it seems to be caused by this commit: https://github.com/clojure/clojurescript/commit/954e8529b1ec814f40af77d6035f90e93a9126ea If I chec

Re: ClojureScript mailing list?

2011-07-28 Thread Sean Corfield
+1 to (dec op-suggestion) for the reasons that Devin, Stefan and Anthony gave... Also on #clojure (IRC) one of the core team said discussion about ClojureScript would happen here so I don't think there would be much "management" support for splitting ClojureScript out. Sean On Thu, Jul 28, 2011

Re: Java 7 is out!

2011-07-28 Thread Kenny Stone
Can clojure take advantage of some features if they are available? I know the JRuby dudes are pretty excited about invoke dynamic... Kenny On Thu, Jul 28, 2011 at 6:14 PM, Sean Corfield wrote: > On Thu, Jul 28, 2011 at 8:54 AM, Daniel Gagnon > wrote: > > So, what does it means for Clojure? >

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

2011-07-28 Thread Sean Corfield
I think one of the authors / core members needs to change the permissions. I have edit access on the parent page http://dev.clojure.org/display/doc/Enhanced+Primitive+Support and the sibling page http://dev.clojure.org/display/doc/Bit+Operations but, like you, don't have view access to the Numerics

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

2011-07-28 Thread Sean Corfield
On Thu, Jul 28, 2011 at 1:53 PM, Ken Wesson wrote: >> Chas has already pointed you at the rationale / discussion but I'm a > Discussions about primitive arithmetic, not BigInteger arithmetic. I take it you didn't actually bother to read the page he linked to? Let me quote the relevant part for yo

Re: clojure.contrib.command-line

2011-07-28 Thread Anthony Grimes
command-line is deprecated in favor of tools.cli now. http://github.com/clojure/tools.cli -- 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 - p

Re: Java 7 is out!

2011-07-28 Thread Sean Corfield
On Thu, Jul 28, 2011 at 8:54 AM, Daniel Gagnon wrote: > So, what does it means for Clojure? It's not going to mean anything for a long time. Clojure still supports Java 5 so it is probably going to be years before Java 7 is mainstream enough that Clojure can _require_ it. -- Sean A Corfield -- (

Re: Problem with ClojureScript and Node.js

2011-07-28 Thread Anthony Grimes
Actually, it seems to be caused by this commit: https://github.com/clojure/clojurescript/commit/954e8529b1ec814f40af77d6035f90e93a9126ea If I checkout before that, everything is peachy. I guess I'll submit a bug report. -- You received this message because you are subscribed to the Google Gro

Re: better community docs: getting started

2011-07-28 Thread uMany
I'm a total newbie with Clojure/Lisp/Java/Cake/Lein/Emacs etc. But I want to help translating to Spanish. If you tell me where can I find instructions to do it I will with pleasure. By the way, I've been fighting with Emacs/Clojure and everything else. It has been frustrating but I've learn a lot

dynamically generated let bindings

2011-07-28 Thread Sam Aaron
Hi there, I'm trying to create a fn which does the following: * returns a fn which takes an arbitrary number of args * calls a helper fn, passing the incoming args returning a vector of alternating symbols and vals * creates a let form using the vector of alternating symbols and vals returned b

clojure.contrib.command-line

2011-07-28 Thread octopusgrabbus
Are there any command-line examples or documentation other than what's up on clojure.org or ClojureDocs? I'm using (defn -main [& args] (with-command-line args "Get csv file name" [[in-file-name ".csv input file name" "resultset.csv" ]] [[in-file-name ".csv input file name" 1]]

Re: Problem with ClojureScript and Node.js

2011-07-28 Thread Anthony Grimes
I'm all of a sudden getting this exact same error on OS X 10.6.8. And I do mean all of a sudden. I actually updated to this version of OS X last night and today it isn't working. Is this happening to any OS X users on an older Snow Leopard? This is the only thing that has changed in my setup, so

Re: Pair Coding over Skype

2011-07-28 Thread nil
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. On Jul 28, 1:26 pm, Jay Vyas wrote: > Hi guys (and hello to my beloved london-clojuri

Re: passing value to functions

2011-07-28 Thread Tuba Lambanog
Hi, Laurent, Your suggestion of manually piping intermediate results works. Thank you very much! Tuba On Thu, Jul 28, 2011 at 3:44 AM, Laurent PETIT wrote: > Hi, > > 2011/7/28 Tuba Lambanog > >> Hello, >> >> I'm trying to pass a variable through a series of functions, which may >> change the v

Re: Libraries and build management hell

2011-07-28 Thread gaz jones
i would agree with all that if i were writing plain java (a lib dir for dependencies and a couple of shell scripts for building etc), but leiningen makes it so easy for clojure that its more work _not_ to use it... at least that has been my experience. On Thu, Jul 28, 2011 at 4:23 PM, Michal B wr

Re: Libraries and build management hell

2011-07-28 Thread Timothy Baldridge
> Why does it have to be so complicated to use libraries? I used to think it was hard until I read up on lein. Can't get much simpler than clojars and lein: http://clojars.org/ http://alexott.net/en/clojure/ClojureLein.html Now I'm starting to think that I actually like the lein method over pyth

Libraries and build management hell

2011-07-28 Thread Michal B
Why does it have to be so complicated to use libraries? 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. If figuring out how to install an IDE with clojure wasn't bad enough, now you need to fi

Re: better community docs: getting started

2011-07-28 Thread Stefan Kamphausen
Hi, may I humbly suggest to come up with the most common user stories and put links to pages for those users right after the introductory paragraph. The typical scenarios will probably combine a few things, e.g. setting up maven and CCW. Further down the page the links to the detailed topics

Re: ClojureScript mailing list?

2011-07-28 Thread Anthony Grimes
Going to have to dec. A lot of ClojureScript questions in the future (after there are less bugs and everything is more stable) will probably be answerable by plain ol' Clojure programmers, since most of them will likely be normal Clojure problems unrelated to JavaScript. I think it should stay

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

2011-07-28 Thread Ken Wesson
On Thu, Jul 28, 2011 at 3:05 AM, Sean Corfield wrote: > On Wed, Jul 27, 2011 at 5:56 PM, Ken Wesson wrote: >>> In Clojure 1.2: >>> >>> (type (bigint 2)) => java.math.BigInteger >>> >>> In Clojure 1.3: >>> >>> (type (bigint 2)) => clojure.lang.BigInt >>> (type 2N) => clojure.lang.BigInt >> >> What

Re: passing value to functions

2011-07-28 Thread Resty Cena
Hi, Alan, I can see that your suggestion will work. The key, as I understand it, is the embedding of functions, thus: (fix-ize (fix-ou word))) which is indeed a Lisp-y way of doing things. It seems imperatively I miss elegant one-liners such as this. I'm right now close to getting Laurent's ap

Re: Bizarre ClojureScript issue

2011-07-28 Thread Anthony Grimes
Absolutely. -- 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. To unsubscribe from this group, send em

Re: ClojureScript mailing list?

2011-07-28 Thread Stefan Kamphausen
dec I'd like to follow all that in one place and it's not that much, yet. Maybe that will change with time. When the subject lines don't tell which dialect is meant, it may be time to create a dedicated list. But even then, some questions will clearly regard both dialects. Regards, Stefan

Re: passing value to functions

2011-07-28 Thread Resty Cena
Hi, Thorsten, Yes, you're right, once inside a function, the function is already being applied. I mean that within the function, there's a test for whether the input variable needs to be changed or not. Sort of vacuous application if conditions are not met. Yes, an enriched facility for pattern m

Re: ClojureScript url path confusion

2011-07-28 Thread kjeldahl
Following up on my own confusion, I'll contribute some comments about potential improvements to either the ClojureScript compiler itself, or documentation about it's usage in development mode, where everything is not stuffed into one single js file. First of all, the options to the compiler. I'll

Re: passing value to functions

2011-07-28 Thread Alan Malloy
On Jul 28, 12:22 pm, Thorsten Wilms wrote: > On 07/28/2011 06:34 PM, Tuba Lambanog wrote: > > > The determination of whether a called function will apply is left as a > > responsibility of the function itself, rather than the calling > > function. The motivation is that a function may be called fr

Re: passing value to functions

2011-07-28 Thread Thorsten Wilms
On 07/28/2011 06:34 PM, Tuba Lambanog wrote: The determination of whether a called function will apply is left as a responsibility of the function itself, rather than the calling function. The motivation is that a function may be called from a number of places. Perhaps there's a better way? Th

Re: ClojureQL: debugging generated SQL / Dates

2011-07-28 Thread Meikel Brandmeyer
Hi, Am 28.07.2011 um 21:10 schrieb Brian Marick: > > On Jul 27, 2011, at 7:26 PM, Brian Marick wrote: >> How *does* one provide dates to ClojureQL for transmission to Postgres? I >> want to do something like this: >> >> (ql/conj! (ql/table :animals) {:official_name "fred" :added_to_service >

Re: ClojureQL: debugging generated SQL / Dates

2011-07-28 Thread Brian Marick
On Jul 27, 2011, at 7:26 PM, Brian Marick wrote: > How *does* one provide dates to ClojureQL for transmission to Postgres? I > want to do something like this: > > (ql/conj! (ql/table :animals) {:official_name "fred" :added_to_service > <<>>}) Boy I was dumb yesterday: user> (ql/conj! (ql/ta

Re: ClojureScript browser-oriented REPL

2011-07-28 Thread Matthew Gilliard
I can confirm that this is awesome! Thanks Chris mg On Thu, Jul 28, 2011 at 7:40 PM, Chris Granger wrote: > Hey Guys, > > I set out and built a clojurescript REPL that uses the browser as it's > execution environment instead of rhino (yes, you can pop up all the > alerts you want!). I'm sure

ClojureScript browser-oriented REPL

2011-07-28 Thread Chris Granger
Hey Guys, I set out and built a clojurescript REPL that uses the browser as it's execution environment instead of rhino (yes, you can pop up all the alerts you want!). I'm sure there might be rough edges here and there, but it currently provides a much better experience than the current REPL: - u

Re: protocols and records -- use when?

2011-07-28 Thread Andreas Liljeqvist
I would say that protocols are a subset of multimethod functionality. You want protocols because they are faster and simpler. Protocols only does dispatch on the type, with multimethods you can do dispatch on several args of whatever. 2011/7/28 Oskar > Thank you Alex and abp! > > Your posts ce

Re: Calling clojure from java.

2011-07-28 Thread Meikel Brandmeyer
Hi, Am 28.07.2011 um 19:43 schrieb mmwaikar: > Thanks again Meikel. Where can I read about things like bindRoot, intern or > to be precise java-clojure interop? There are only a few things you must know: - RT.var to get a variable from a namespace - v.invoke to invoke a function stored in a Va

Re: Calling clojure from java.

2011-07-28 Thread .Bill Smith
It may also be useful to read up on primitives, since primitive support is often a source of impedance mismatch when software in one language talks to software in another. Would someone mind supplying a link to a description of how Clojure works with Java primitives in the 1.2.1 and 1.3 release

Re: better community docs: getting started

2011-07-28 Thread Bill Robertson
Hello Stu, I think the "clear no options getting started path" should include a tutorial and focus on the repl and using a *generic* text editor. A downloadable archive file (zip and tar) that included things like jline, clojure jars, and some scripts (.sh *and* .bat) to just start it would allow

Re: Calling clojure from java.

2011-07-28 Thread mmwaikar
Thanks again Meikel. Where can I read about things like bindRoot, intern or to be precise java-clojure interop? -- 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 mem

Re: ClojureScript mailing list?

2011-07-28 Thread Devin Walters
I don't think there has been a significant enough influx of mail on the list to warrant the creation of a new, separate list. There are so many similarities between the two that I think we'd run into situations where people felt that the ClojureScript list was getting too much Clojure in it. The

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

2011-07-28 Thread Perry James
Hi, Is there any way to get to those docs? First I had to crate a user account, then I was told that You cannot view this page Page level restrictions have been applied that limit access to this page. Thanks, Perry == "This must be Thursday. I never could get the hang of Thursdays" -- Ar

Re: ClojureScript mailing list?

2011-07-28 Thread David Nolen
On Thu, Jul 28, 2011 at 1:04 PM, Phil Hagelberg wrote: > On Thu, Jul 28, 2011 at 6:53 AM, Wolodja Wentland > wrote: > > given the recent interest in ClojureScript and the resulting influx of > mails > > regarding it I was wondering if a distinct mailing list for it would make > > sense. What do

Re: ClojureScript mailing list?

2011-07-28 Thread Phil Hagelberg
On Thu, Jul 28, 2011 at 6:53 AM, Wolodja Wentland wrote: > given the recent interest in ClojureScript and the resulting influx of mails > regarding it I was wondering if a distinct mailing list for it would make > sense. What do you think? I'll inc that. -Phil -- You received this message beca

Re: Code structure/design problems

2011-07-28 Thread Oskar
On Jul 28, 6:40 pm, Islon Scherer wrote: > Hi Oskar, I've been a game programmer for more than 5 years going from > simple card games to 3D MMORPGs. > Even though you can make a simple game in a functional way it would be a big > challenge to do the same with a moderately complex game. >

Re: Code structure/design problems

2011-07-28 Thread Oskar
Wow, thank you everyone! Lots of great responses. I'm going to take some time to let it all sink in. > I'd say "yes" if only for the experience of writing a "purely functional" > game (minus the I/O, of course). I wrote a Pong clone in a similar way, > though I don't share that author's dislike

Re: Code structure/design problems

2011-07-28 Thread Islon Scherer
Hi Oskar, I've been a game programmer for more than 5 years going from simple card games to 3D MMORPGs. Even though you can make a simple game in a functional way it would be a big challenge to do the same with a moderately complex game. Games are all about state, your character if full of state,

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

2011-07-28 Thread ronen
Im not a javascript guru but from my experience JQuery isn't suitable for large web application, starting with the JQueryUi immaturity and the plethora of plugins that sometime work and sometime don't. Rich and the rest of the core team, don't be discouraged by such comments, if it wasn't for your

Re: passing value to functions

2011-07-28 Thread Tuba Lambanog
Hi, Thorsten, << Why, if that is the case at > all, do you want to pass an argument through functions that do not work > with it? >> The determination of whether a called function will apply is left as a responsibility of the function itself, rather than the calling function. The motivation is tha

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

2011-07-28 Thread Daniel Gagnon
> > I like CoffeeScript. But CoffeeScript is largely syntactic sugar. Hardly > anything in the way of new semantics. And it encourages traditional stateful > OOP and classical inheritance. > > Underscore.js does what it can, but it's goals are largely trumped by > CoffeeScript. > > David > > Coffee

Re: passing value to functions

2011-07-28 Thread Tuba Lambanog
I'm trying to write a spelling 'standardizer' for a language that has no standardized spelling. There are about 25 spelling rules, and a few more may be added. . The input words, streamed one at a time from a text file, go through these rules, and may change if conditions are met. To take English e

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

2011-07-28 Thread David Nolen
On Thu, Jul 28, 2011 at 12:09 PM, Daniel Gagnon wrote: > Javascript is simply painful to use functionally. The verbosity of >> anonymous functions, the lack of crucial HOFs like map/filter/reduce, the >> lack of functional data structures, the lack of macros (not strictly a >> "functional" feature

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

2011-07-28 Thread Daniel Gagnon
> > Javascript is simply painful to use functionally. The verbosity of > anonymous functions, the lack of crucial HOFs like map/filter/reduce, the > lack of functional data structures, the lack of macros (not strictly a > "functional" feature, but especially useful with functional code)... You can

Re: protocols and records -- use when?

2011-07-28 Thread Oskar
Thank you Alex and abp! Your posts certainly contains valuable information. But I have questions still. One might say that you explained how to use protocols, but the questions I have left are: Why protocols (and records)? What benefits do I get? Alex mentioned polymorphism; how is this different

  1   2   >