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

2011-07-28 Thread Sean Corfield
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 the devil? Why was this done? Seems like wheel reinvention to me.

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

2011-07-28 Thread Sean Corfield
On Wed, Jul 27, 2011 at 11:48 PM, Tom Faulhaber wrote: > FWIW, clojure.pprint.cl-format handles this fine in 1.3: > > (cl-format nil "~d" 2N) > => "2" Wow, I just spent the last 30 minutes reading Common Lisp the Language, 2nd Ed, chapter 22 which describes how powerful and mind-bending that is..

protocols and records -- use when?

2011-07-28 Thread Oskar
Hi! I have not heard much about records and protocols. What is a typical use case in idiomatic Clojure code for them? Is it a good idea, for example, to make a "Character" protocol and "Player" and "Monster" records or something in a game. It feels a bit too much like OOP for me to be comfortable

Re: Code structure/design problems

2011-07-28 Thread OGINO Masanori
I agree with Oskar. We can separate codes into state managers and others and move something to the latter if we find its state is unnecessary. After all, it is good enough--it might be not best, but good enough--if it seems that state managers are small enough, IMO. Of course, if there is no state

passing value to functions

2011-07-28 Thread Tuba Lambanog
Hello, I'm trying to pass a variable through a series of functions, which may change the value of the variable. However, the next function in line uses the original value, rather than the changed value. Here's a pseudo-code of what I'm doing. (defn process-1 [s] ; change value of s then return it

Re: passing value to functions

2011-07-28 Thread Baishampayan Ghose
> I'm trying to pass a variable through a series of functions, which may > change the value of the variable. However, the next function in line > uses the original value, rather than the changed value. Here's a > pseudo-code of what I'm doing. > > (defn process-1 [s] > ; change value of s then retu

Re: passing value to functions

2011-07-28 Thread OGINO Masanori
http://clojure.org/state may help you to know Clojure's "value". ; AFAIK Java's string is also immutable...isn't it? -- 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 gr

Re: passing value to functions

2011-07-28 Thread Laurent PETIT
Hi, 2011/7/28 Tuba Lambanog > Hello, > > I'm trying to pass a variable through a series of functions, which may > change the value of the variable. However, the next function in line > uses the original value, rather than the changed value. Here's a > pseudo-code of what I'm doing. > > (defn pro

Re: Code structure/design problems

2011-07-28 Thread Sergio Bossa
I also value pragmatism and code simplicity over everything else, so I'd say: keep your "shared" state into "shared" refs, write down a few functions to manage such a state and limit every state changing activity to them, writing everything else, in particular all algorithms and logic, in purely fu

Re: Code structure/design problems

2011-07-28 Thread Alex Osborne
Hi Oskar! Excellent questions. I totally agree with you that writing a simulation in a purely functional style is not the (only) answer in Clojure. After all the primary goal of the language is to deal with (necessary) state well, not to get rid of it or hide it. Oskar writes: > For the monst

Re: protocols and records -- use when?

2011-07-28 Thread abp
Have a look at this: http://cemerick.com/2011/07/05/flowchart-for-choosing-the-right-clojure-type-definition-form/ Now, as far as i understood, you define a protocol and the extend it on types defined via defrecord. That's more like Character is a protocol that defines functions for movement, at

Re: Generated nodejs code from ClojureScript doesn't include some functions

2011-07-28 Thread Brenton
Anthony, Did you try deleting the output directory where generated JavaScript files are stored? If core lib JavaScript files exist in this directory they will not be re-compiled. On Jul 27, 10:59 pm, Anthony Grimes wrote: > I guess I should have added that it's not just rand that isn't being > i

Re: passing value to functions

2011-07-28 Thread Thorsten Wilms
On 07/28/2011 11:29 AM, Tuba Lambanog wrote: I'm trying to pass a variable through a series of functions, which may change the value of the variable. However, the next function in line uses the original value, rather than the changed value. Here's a pseudo-code of what I'm doing. I think you s

Re: protocols and records -- use when?

2011-07-28 Thread Alex Osborne
Oskar writes: > I have not heard much about records and protocols. What is a typical > use case in idiomatic Clojure code for them? Is it a good idea, for > example, to make a "Character" protocol and "Player" and "Monster" > records or something in a game. It feels a bit too much like OOP for >

Re: protocols and records -- use when?

2011-07-28 Thread Colin Yates
(nothing to add, just wanted to say that explanation has certainly clarified things for me. These excellent replies, as oppose to "go read XYZ" really differentiate this community! Thanks again) On 28 July 2011 12:46, Alex Osborne wrote: > Oskar writes: > > > I have not heard much about recor

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

2011-07-28 Thread Andrea Tortorella
Thanks for your replies, +1 for enhancing format Maybe it could handle also rationals, converting them to doubles, but it could be to much. On Jul 28, 9:47 am, Sean Corfield wrote: > On Wed, Jul 27, 2011 at 11:48 PM, Tom Faulhaber > wrote: > > FWIW, clojure.pprint.cl-format handles this fine

Re: protocols and records -- use when?

2011-07-28 Thread Anton Beloglazov
Thanks Alex! It's much clearer now to me as well. -- 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. T

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

2011-07-28 Thread Chas Emerick
Tweaking `format` so that it accounts for all sorts of edge cases almost certainly isn't going to happen, and would be a horrible kludge in any case. To extend Tom's point, if you really want a format that knows about all of Clojure's scalars and data structures, cl-format is what you want, and

Re: Basic Data Structure Question

2011-07-28 Thread semperos
@Ken Thanks for taking the time to walk through all of that. I had considered recursive approaches, but was hoping to avoid a "naive" approach given the size of the root map and all its children. The [key1 key2 key3] as id won't be possible in this context, but thanks for the multiple options.

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

2011-07-28 Thread Andrea Tortorella
As I said tweaking `format` to work on rationals could be too much, and i can restate that as "it is too much". Nevertheless, extending it to work on bigint doesn't seem to me really an edge case, given that i could get a bigint out of any function that uses autopromotion, so: (printf "%d" (autop

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

2011-07-28 Thread Stuart Halloway
> What the devil? Why was this done? Seems like wheel reinvention to me. Understanding the motivation for such a decision requires taking the time to understand the limitations of what Java provides. Java provides no wheel here -- BigInteger's hash is broken. The draft docs are here: http://

Re: Bizarre ClojureScript issue

2011-07-28 Thread Rich Hickey
Could you please file a bug report with both your example, the JS code and the explanation? Thanks, Rich On Jul 27, 2011, at 9:48 PM, Anthony Grimes wrote: Hah! That was it! You, sir, are one clever fellow. Thank you very much. -- You received this message because you are subscribed to t

Re: Generated nodejs code from ClojureScript doesn't include some functions

2011-07-28 Thread Rich Hickey
On Jul 28, 2011, at 6:54 AM, Brenton wrote: Anthony, Did you try deleting the output directory where generated JavaScript files are stored? If core lib JavaScript files exist in this directory they will not be re-compiled. This is an ongoing source of problems and should probably work dif

Re: Basic Data Structure Question

2011-07-28 Thread Laurent PETIT
Hello, Is the hierarchy always done with the same key ? If so, you can use zippers. Of course, without indexation of the position of your map, you may well end up walking the tree in O(n) more than necessary, which could or could not become the perf. bottleneck of your application, depending on ho

Re: protocols and records -- use when?

2011-07-28 Thread OGINO Masanori
Many thanks, abp and Alex. Additionally I think this post (and original discussion here) is also worth reading: http://kotka.de/blog/2011/07/Separation_of_concerns.html though the conclusion is not the community consensus (for now). -- Name: OGINO Masanori (荻野 雅紀) E-mail: masanori.og...@gmail.c

ClojureScript mailing list?

2011-07-28 Thread Wolodja Wentland
Hi all, 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? -- Wolodja 4096R/CAF14EFC 081C B7CD FF04 2BA9 94EA 36B2 8B7F 7D30 CAF1 4EFC signature.asc Description: Digi

Re: Basic Data Structure Question

2011-07-28 Thread semperos
@lpetit Thanks for that, that's a nice complete example of using zippers and easy to follow. O(n) time is fine at this stage of the application (due to smaller amounts of data and a shallow tree), but definitely won't scale over time. -- You received this message because you are subscribed to

Clojurescript - Javascript constructor and namespace with the same name problem

2011-07-28 Thread Marko Kocić
Hi all, When dealing with ClojureScript and Closure library it happens pretty often that Closure namespace is in the same time constructor for some object. Take a look for this example: (ns notepad (:require [goog.dom :as dom] [goog.ui.Zippy :as Zippy])) First, require forces me t

Re: Code structure/design problems

2011-07-28 Thread Michael Gardner
On Jul 28, 2011, at 1:44 AM, Oskar wrote: > I have a hard time coming up reasons why this would be better. My > function that I wanted that checks if two characters are close enough > to each other is just a very small part of my game. And I could make > just that function fuctional and my list of

Re: Code structure/design problems

2011-07-28 Thread Benny Tsai
Hi Oskar, My apologies; when I linked that series of articles, I did not mean to imply that 100% pure functional is the only way to go. In the handful of simple games I've written in Clojure (all of which are probably less complex than yours), I've also taken the hybrid approach others have ad

Re: Code structure/design problems

2011-07-28 Thread Jack Moffitt
> Hm it seems like what he did was a bit extreme. Would you do it that > way? In Clojure you could just use atoms and all would be well, right? > My game is going to be quite a bit more complex than Pac-Man, the game- > state is going to be way more complex. His stated goal was to provide examples

Re: Generated nodejs code from ClojureScript doesn't include some functions

2011-07-28 Thread Brenton
> This is an ongoing source of problems and should probably work   > differently (date/time check?) > > Rich There is now an issue for this. CLJS-41. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googleg

Java 7 is out!

2011-07-28 Thread Daniel Gagnon
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 you are subscribed to the Google Groups "Clojure

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

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: 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: 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 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
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 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: 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: 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 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: 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: 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: 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 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: 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: 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 .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: 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: 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

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: 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

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: 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: 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: 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: 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 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 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: 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: 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: 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: 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: 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

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: 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

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: 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: 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: 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

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]]

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

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

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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: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: 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: 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: 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: 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: 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: 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 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: 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: 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: 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 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: 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: 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

  1   2   >