Re: seeking a lazy way to interleave a constant

2012-04-09 Thread Ben Mabey
On 4/9/12 9:10 PM, Cedric Greevey wrote: On Mon, Apr 9, 2012 at 10:31 PM, Andrew wrote: Given a lazy sequence of numbers is there a way to interleave a constant and get another lazy sequence? Say the first sequence is 1 2 3 4 ... I'd like the second sequence to be 1 0 2 0 3 0 4 0 Thanks i

Re: seeking a lazy way to interleave a constant

2012-04-09 Thread Cedric Greevey
On Mon, Apr 9, 2012 at 10:31 PM, Andrew wrote: > Given a lazy sequence of numbers is there a way to interleave a constant and > get another lazy sequence? Say the first sequence is 1 2 3 4 ... I'd like > the second sequence to be 1 0 2 0 3 0 4 0 > > Thanks in advance! user=> (interpose 0 [1

ClojureScript: Problem with ->> macro and many arguments

2012-04-09 Thread Trevor Bentley
I'm not sure if this is a problem with Safari/WebKit or ClojureScript (or neither, maybe this is expected behavior). I implemented the game logic of my Tempest game by threading a "game state" structure through a long series of functions with the ->> macro. At some point during development, i

Re: [ANN] clojure-py 0.2 released

2012-04-09 Thread Timothy Baldridge
And it's always good to give links with a project release: Source: https://github.com/halgari/clojure-py Also via easy_install: easy_install clojure-py Timothy Baldridge -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send

[ANN] clojure-py 0.2 released

2012-04-09 Thread Timothy Baldridge
I'm proud to announce the release of clojure-py 0.2! There are numerous changes in this version, a few highlights: * implemented deftype with protocol support * implemented defprotocol and extend * implemented reify * implemented defrecord * binding is supported * implemented defmulti and defmeth

Re: seeking a lazy way to interleave a constant

2012-04-09 Thread Ben Mabey
On 4/9/12 8:31 PM, Andrew wrote: Given a lazy sequence of numbers is there a way to interleave a constant and get another lazy sequence? Say the first sequence is 1 2 3 4 ... I'd like the second sequence to be 1 0 2 0 3 0 4 0 Thanks in advance! Yep, and it is even called interleave. :)

Re: seeking a lazy way to interleave a constant

2012-04-09 Thread dennis zhuang
D o you want this? user=> (def x (interleave (iterate inc 1) (repeat 0))) #'user/x user=> (take 10 x) (1 0 2 0 3 0 4 0 5 0) 2012/4/10 Andrew > Given a lazy sequence of numbers is there a way to interleave a constant > and get another lazy sequence? Say the first sequence is 1 2 3 4 ... I'd > lik

seeking a lazy way to interleave a constant

2012-04-09 Thread Andrew
Given a lazy sequence of numbers is there a way to interleave a constant and get another lazy sequence? Say the first sequence is 1 2 3 4 ... I'd like the second sequence to be 1 0 2 0 3 0 4 0 Thanks in advance! -- You received this message because you are subscribed to the Google Groups

Re: Startup times for large clojure projects?

2012-04-09 Thread Michael Klishin
2012/4/9 rogerdpack > So I guess my question is "is this all the overhead I'm likely to > encounter" for startup times for projects in clojure? For large > projects, what are typical load times? Just trying to figure out if > clojure would work for my next project > An app that has dozens (40-

Re: How come (`+ 1 2) => 2 ???

2012-04-09 Thread Sean Corfield
On Mon, Apr 9, 2012 at 2:29 PM, Aaron Cohen wrote: > I don't really like this feature, I wish the "not-found" version of invoke > was only available by explicitly calling "get". > > It is however, documented, here: http://clojure.org/data_structures#Data > Structures-Symbols It would be nice if i

Re: Karotz apps in ClojureScript

2012-04-09 Thread David Nolen
On Mon, Apr 9, 2012 at 6:05 PM, Ulrik Sandberg wrote: > There's a little toy rabbit called Karotz (karotz.com). It's the > successor of the now discontinued Nabaztag, and it's actively being > developed. Karotz has some cool features such as text-to-speach, voice > recognition, camera, and media p

Karotz apps in ClojureScript

2012-04-09 Thread Ulrik Sandberg
There's a little toy rabbit called Karotz (karotz.com). It's the successor of the now discontinued Nabaztag, and it's actively being developed. Karotz has some cool features such as text-to-speach, voice recognition, camera, and media player. It can also change color and move its ears. Lots of fun,

Re: How come (`+ 1 2) => 2 ???

2012-04-09 Thread Aaron Cohen
On Mon, Apr 9, 2012 at 5:24 PM, Stuart Sierra wrote: > This is an undocumented feature for symbols, I think. I wouldn't rely on > it too much. > -S I don't really like this feature, I wish the "not-found" version of invoke was only available by explicitly calling "get". It is however, documente

Re: How come (`+ 1 2) => 2 ???

2012-04-09 Thread Stuart Sierra
This is an undocumented feature for symbols, I think. I wouldn't rely on it too much. -S On Monday, April 9, 2012 8:00:33 AM UTC-4, Aaron Cohen wrote: > > When symbols and keywords are in function position, (as you say) they look > themselves up "in" the second argument. The third argument spec

[JOB] Data-centric Software Developer (Full-Time Telecommuting)

2012-04-09 Thread Sean Corfield
(since we only have a small number of job postings on the list, I hope it's OK to continue posting openings here... I guess we can all look forward to the need for a separate clojure-jobs list!). World Singles is looking for a smart, motivated developer to join our small, fully distributed team of

Re: GSoC :: Clojars

2012-04-09 Thread Lead Visionary
I had a great discussion with Sean Corfield about this at ClojureWest, and had my own visions for CloJARS. It'd be great to collaborate. I like the idea of a full-fledged Maven repo. The convenience of something like Grails BuildConfig.groovy to declare dependencies in one place, then have Ivy or

Re: Boolean

2012-04-09 Thread Tassilo Horn
Daniel Solano Gómez writes: > Second, I revised my code yet again and ran it outside the profiler. > I am finding that eval2 is at least an order of magnitude slower, > somewhere around 20×. Indeed, I can confirm that. :-) Bye, Tassilo -- You received this message because you are subscribed t

Re: Boolean

2012-04-09 Thread Daniel Solano Gómez
On Mon Apr 9 14:07 2012, Daniel Solano Gómez wrote: > On Mon Apr 9 18:54 2012, Tassilo Horn wrote: > > To check that, I've created the simple benchmark below that runs the > > current and enhanced implementation 10 million times with a evenly > > distributed set of numbers, Booleans "created prop

Re: Boolean

2012-04-09 Thread Tassilo Horn
Daniel Solano Gómez writes: > Unfortunately, your methodology is flawed. The overhead of iterating > through a list and converting the ints into objects is obscuring the > perfomance difference between the two. Well, yes, it was a quick shot. > Running a modified version of the code (attached)

Re: Boolean

2012-04-09 Thread Daniel Solano Gómez
On Mon Apr 9 18:54 2012, Tassilo Horn wrote: > To check that, I've created the simple benchmark below that runs the > current and enhanced implementation 10 million times with a evenly > distributed set of numbers, Booleans "created properly" with valueOf(), > Booleans created with the constructor

Re: Boolean

2012-04-09 Thread Tassilo Horn
Vinzent writes: > That's interesting, thanks for your investigation! Then such decision > was clearly made because Java is not the only JVM language, just as > Luc said. For example, JRuby has its own class which wraps false: > http://jruby.org/apidocs/org/jruby/RubyBoolean.False.html Obviously,

Re: Startup times for large clojure projects?

2012-04-09 Thread Andrew Kondratovich
It's start-up time for jvm (plus classloading). In case of clojure this is also additional time for loading runtime core library. Also, in case of running source code - additional time for compilation. There is no linear dependency from project size. If you would run already compiled sources, boots

Re: Boolean

2012-04-09 Thread Vinzent
That's interesting, thanks for your investigation! Then such decision was clearly made because Java is not the only JVM language, just as Luc said. For example, JRuby has its own class which wraps false: http://jruby.org/apidocs/org/jruby/RubyBoolean.False.html Obviously, it's impossible to imple

Startup times for large clojure projects?

2012-04-09 Thread rogerdpack
Just had a question on startup times, if anybody has had experience here: I know (on my local box) clojure takes about 1.3s to "load" C:\> cat yo.clj (+ 1 2 3) C:\>timer java -cp clojure-1.3.0.jar clojure.main yo.clj 1.347414 So I guess my question is "is this all the overhead I'm likely to enco

Re: GSOC : Constraint based UI layout

2012-04-09 Thread SHIVAM HANDA
sir (sorry for the late reply), I read about garnet, and garnet in it self is a full blown Library to write UI in lisp . Its a good tool to use and its a valuable tool to be in Clojure community ( i think wort porting). But the aim of this project is not that, it is to create just an API for other

Re: IMPORTANT: For Potential GSoC 2012 mentors, do this now please!

2012-04-09 Thread Timothy Baldridge
>>Feeling a bit slow... It's not just you...the GSOC site is really poorly designed IMO. It took me close to 5 minutes of clicking around to finally find the area to sign up/select projects for mentoring. Timothy -- You received this message because you are subscribed to the Google Groups "Cloj

Re: IMPORTANT: For Potential GSoC 2012 mentors, do this now please!

2012-04-09 Thread Phil Hagelberg
On Mon, Apr 9, 2012 at 9:54 AM, David Nolen wrote: > You don't see a My Dashboard link? I see; thanks. I was expecting proposals to be listed on the Clojure page. -Phil -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send ema

Re: IMPORTANT: For Potential GSoC 2012 mentors, do this now please!

2012-04-09 Thread David Nolen
You don't see a My Dashboard link? On Mon, Apr 9, 2012 at 12:52 PM, Phil Hagelberg wrote: > On Mon, Apr 9, 2012 at 7:17 AM, David Nolen > wrote: > > Yes apply to be a mentor - sorry it wasn't more clear - this could have > been > > done at anytime. > > > > Also important DO NOT associate yourse

Re: Boolean

2012-04-09 Thread Tassilo Horn
"Jim - FooBar();" writes: >> (= (Boolean. false) false) ;=> true >> >> now, that is really weird. By all means (at least those, I can come >> up with ;-) it looks like false and (Boolean. false) are the same: > > I think when you use the = operator in Clojure it calls to the > .equals() meth

Re: IMPORTANT: For Potential GSoC 2012 mentors, do this now please!

2012-04-09 Thread Phil Hagelberg
On Mon, Apr 9, 2012 at 7:17 AM, David Nolen wrote: > Yes apply to be a mentor - sorry it wasn't more clear - this could have been > done at anytime. > > Also important DO NOT associate yourself with a proposal in Confluence - you > MUST do this in Melange. Feeling a bit slow... I don't see any pr

Re: Congomongo or monger ???

2012-04-09 Thread Simone Mosciatti
Sorry, was my bad... I was using clojure 1.2.1... Il giorno venerdì 6 aprile 2012 13:04:35 UTC-5, Michael Klishin ha scritto: > > Simone Mosciatti: > > > (Do you need more info ???) > > Simone, > > Please post full exception instead of just "Error". If you can put > together a small sample > proj

IMPORTANT: GSoC Potential Mentors - Select Proposal in Melange NOT Confluence

2012-04-09 Thread David Nolen
That is all. David -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group,

Re: IMPORTANT: For Potential GSoC 2012 mentors, do this now please!

2012-04-09 Thread David Nolen
Yes apply to be a mentor - sorry it wasn't more clear - this could have been done at anytime. Also important DO NOT associate yourself with a proposal in Confluence - you MUST do this in Melange. DAvid On Mon, Apr 9, 2012 at 9:50 AM, Timothy Baldridge wrote: > > Can I apply to be a mentor now?

Re: IMPORTANT: For Potential GSoC 2012 mentors, do this now please!

2012-04-09 Thread Timothy Baldridge
> Can I apply to be a mentor now? > Ditto...I've done a fair amount of research on running clojure on alternative platforms (C++, LLVM, python), so I feel I'd be up to mentoring on any of the compiler projects (linter, func/cola, optimizer, etc.). But I didn't know we still needed mentors until no

Re: IMPORTANT: For Potential GSoC 2012 mentors, do this now please!

2012-04-09 Thread Baishampayan Ghose
Can I apply to be a mentor now? Regards, BG On Mon, Apr 9, 2012 at 7:10 PM, David Nolen wrote: > If this is not done by end of day we will likely have to reject the > proposal. Sorry for the short notice - I'm new to the GSoC process and it > seems Google would like us to move quickly. > > > On

Re: IMPORTANT: For Potential GSoC 2012 mentors, do this now please!

2012-04-09 Thread David Nolen
If this is not done by end of day we will likely have to reject the proposal. Sorry for the short notice - I'm new to the GSoC process and it seems Google would like us to move quickly. On Mon, Apr 9, 2012 at 9:28 AM, David Nolen wrote: > If you are a mentor or said that you will be, you need to

IMPORTANT: For Potential GSoC 2012 mentors, do this now please!

2012-04-09 Thread David Nolen
If you are a mentor or said that you will be, you need to associate yourself with a proposal in Melange ASAP. Thanks, David -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts

Re: Boolean

2012-04-09 Thread Vinzent
I'll answer only C, since other letters are either irrelevant or do not contradict my points. > C) ... By which universal law these two things should be considered equal > ? > Um, that's what my complaint is all about, no? I have no idea by which law these two things are considered equal, an

GSoC :: Clojars

2012-04-09 Thread Andrew Kondratovich
Hello. My name is Andrew and I'm a student from Minsk (Belarus). I've decided to participate in this year's GSoC. I want to contribute in Clojars system. I've talked to Phil (technomancy) about plans of Clojars future development. With his help, i've wrote a proposal and posted it to google-melan

Re: Boolean

2012-04-09 Thread Mark Shroyer
On Sat, Apr 07, 2012 at 07:53:17AM -0700, Steven Obua wrote: > [...] Nevertheless, somehow Boolean objects seem to creep into live, > and I have code like that: > > (if (:leaf m-node) > > ... > ) > > that breaks because of it. I am using from the github repository > ( 14428c296de483e

Re: I'm writing a Tempest clone in ClojureScript

2012-04-09 Thread Curtis Gagliardi
This is some cool stuff, I'll have to poke through the code later. I've never played tempest, so I don't know what's supposed to happen, but it was interesting to just move towards the focal point and let the flippers pile up around the edges. On Mar 22, 7:14 pm, Trevor Bentley wrote: > I'm teach

Re: How come (`+ 1 2) => 2 ???

2012-04-09 Thread Jim - FooBar();
Aaaa ok, it makes sense now... Thanks a lot! Jim On 09/04/12 13:00, Aaron Cohen wrote: When symbols and keywords are in function position, (as you say) they look themselves up "in" the second argument. The third argument specifies a not-found value. Since "1" isn't a collection, it will alwa

Re: How come (`+ 1 2) => 2 ???

2012-04-09 Thread Aaron Cohen
On Mon, Apr 9, 2012 at 7:54 AM, Jim - FooBar(); wrote: > Hello everyone... > > Can somebody please provide some insight as to why > (`+ 1 2) => 2 and > ('+ 1 2) => 2 ??? > > Thanks in advance... > > Jim > > ps. I understand that symbols are functions that look themselves up in > sequences but he

How come (`+ 1 2) => 2 ???

2012-04-09 Thread Jim - FooBar();
Hello everyone... Can somebody please provide some insight as to why (`+ 1 2) => 2 and ('+ 1 2) => 2 ??? Thanks in advance... Jim ps. I understand that symbols are functions that look themselves up in sequences but here i'm not passing a seq - instead i'm passing 2 args! Shouldn't there be

Re: Boolean

2012-04-09 Thread Jim - FooBar();
On 08/04/12 21:05, Stefan Kamphausen wrote: Hi, (= (Boolean. false) false) ;=> true now, that is really weird. By all means (at least those, I can come up with ;-) it looks like false and (Boolean. false) are the same: I think when you use the = operator in Clojure it calls to the .equ

Re: Boolean

2012-04-09 Thread Softaddicts
A) JVM does not = Java, that's the biggest misunderstanding that pours from all your posts. Read carefully the text on the page you referenced. Clojure shares JVM facilities, types, gcc, and happens to allow you to call Java... B) JVM data types are of two kinds, primitive ones (bo