Re: Read in a big file and get GC limit/outofmemory error.

2012-04-10 Thread Andy Fingerhut
On Apr 9, 2012, at 10:05 PM, Andy Wu wrote: > Hi there, > > I'm studying algo-class.org, and one of it's programming assignment > gives you a file containing contents like below: > 1 2 > 1 7 > 2 100 > ... > > There is roughly over 5 million lines, and i want to first construct a > vector of vect

Re: Read in a big file and get GC limit/outofmemory error.

2012-04-10 Thread Sean Corfield
On Mon, Apr 9, 2012 at 10:05 PM, Andy Wu wrote: > (def int-vec (with-open [rdr (clojure.java.io/reader "")] >                           (doall (map convert (line-seq rdr) This will convert all 5 million lines to a 5 million element vector of vector pairs. That's certainly a lot of memory, and

Re: Korma SQL ported to ClojureCLR

2012-04-10 Thread rippinrobr
David, I do most of my ClojureCLR dev in emacs so having the same experience as you do with lein would be ideal. Integration with vsClojure would be nice to have for me but not a must. -Rob On Apr 7, 11:22 am, dmiller wrote: > On Friday, April 6, 2012 6:23:43 PM UTC-5, Aaron wrote: > > > I thin

Read in a big file and get GC limit/outofmemory error.

2012-04-10 Thread Andy Wu
Hi there, I'm studying algo-class.org, and one of it's programming assignment gives you a file containing contents like below: 1 2 1 7 2 100 ... There is roughly over 5 million lines, and i want to first construct a vector of vector of integers for further process: [[1 2][1 7][2 100]...] Below i

Re: [ANN] clojure-py 0.2 released

2012-04-10 Thread Zhitong He
A good way to learn clojure, I would like to have a try :-) On Tue, Apr 10, 2012 at 4:09 PM, Devin Walters wrote: > Thanks for this. I've been enjoying reading the clojure-py code side-by-side > with Clojure proper. > > '(Devin Walters) > > > On Monday, April 9, 2012 at 9:57 PM, Timothy Baldridg

Re: Comprehensive ClojureScript Optimizations - Please Try!

2012-04-10 Thread David Nolen
On Tue, Apr 10, 2012 at 6:23 PM, Jason Hickner wrote: > Very cool! I'm seeing a size reduction in some code of mine that made > extensive use of core.match. Maybe from the removal of a lot of CLJS truth > tests? > > Do you have the source available to your CLJS spectral norm code? I'd like > to s

Re: Comprehensive ClojureScript Optimizations - Please Try!

2012-04-10 Thread Jason Hickner
Very cool! I'm seeing a size reduction in some code of mine that made extensive use of core.match. Maybe from the removal of a lot of CLJS truth tests? Do you have the source available to your CLJS spectral norm code? I'd like to see what special techniques (if any) are needed to get hand-coded

Re: Protocol Usage

2012-04-10 Thread Lead Visionary
As I understand it, Protocols are intended to basically do what Interfaces do in Java: define a contract whereby clients can reasonably expect certain operations to be defined, irregardless of what they actually do. shameless opinion: this is a powerful and sexy sexy sexy language feature that sho

Re: [ANN] Korma SQL ported to ClojureCLR

2012-04-10 Thread Aaron
I can comment on what is important to me for the build system. First, being able to embed .clj files in an existing C# project as embedded resources (as has been enabled by a couple forks - https://github.com/ralmoritz/clojure-clr and my own - https://github.com/aaronc/clojure-clr) is extremel

Re: Comprehensive ClojureScript Optimizations - Please Try!

2012-04-10 Thread David Nolen
I've merged these changes in master. I've also added another change that results in yet another large perf boost: - direct invocation of known fns instead of going through .call It's now possible to write CLJS that has the exact same performance as handwritten JS - I compared the handwritten JS s

Re: [ANN] analyze 0.1.3

2012-04-10 Thread Ambrose Bonnaire-Sergeant
Just released 0.1.5, updated the examples, fixed that bug. https://github.com/frenchy64/analyze Thanks, Ambrose On Tue, Apr 10, 2012 at 11:02 PM, Ambrose Bonnaire-Sergeant < abonnaireserge...@gmail.com> wrote: > No, that's a bug, thanks for the report. > > Ambrose > > On Tue, Apr 10, 2012 at 10

Re: [ANN] analyze 0.1.3

2012-04-10 Thread Ambrose Bonnaire-Sergeant
No, that's a bug, thanks for the report. Ambrose On Tue, Apr 10, 2012 at 10:49 PM, Sanel Zukan wrote: > Hi, > > Hm, look at the following output: > > user=> (= (->> '(1 2) ast :val class) >(->> [1 2] ast :val class)) > true > user=> > > This is intended (both will return LazySe

Re: [ANN] analyze 0.1.3

2012-04-10 Thread Sanel Zukan
Hi, Hm, look at the following output: user=> (= (->> '(1 2) ast :val class) (->> [1 2] ast :val class)) true user=> This is intended (both will return LazySeq as type)? Greetings, Sanel On Tuesday, April 10, 2012 3:16:33 PM UTC+2, Ambrose Bonnaire-Sergeant wrote: > > Hi Sanel,

Protocol Usage

2012-04-10 Thread tmountain
I'm working on a behavior simulation demo in Clojure, and I've opted to use protocols as a mechanism for composing entity capabilities. This snippit of code demonstrates what I'm doing: https://gist.github.com/2351790 Everything is working so far, but I'm wondering if this is an idiomatic usa

Re: Startup times for large clojure projects?

2012-04-10 Thread Roger Pack
Ok thanks for all the answer. > An app that has dozens (40-50, not sure) of namespaces, 15-20 dependencies > (almost none of which are AOT-compiled) a few bits in Java, a little bit of > configuration in > Clojure and relatively straightforward initialization process (4 TCP > connections, next to

Re: [ANN] analyze 0.1.3

2012-04-10 Thread Ambrose Bonnaire-Sergeant
Hi Sanel, Testing the class of the :val entry will provide that information. Thanks, Ambrose On Tue, Apr 10, 2012 at 8:36 PM, Sanel Zukan wrote: > Congrats! > > I'm just curious: reading your example on gist, (ast [1 2]) will yield > '{:op :constant, :env {:locals {}, :ns {:name analyze.core}}

Re: Boolean

2012-04-10 Thread Aaron Cohen
On Tue, Apr 10, 2012 at 8:46 AM, Vinzent wrote: > So I agree: you cannot make it work for each and every JVM language, so >> the current simplistic behavior is just fine. >> > Yeah, but my question about 'if' and equality remains open. > Not really, your example is trying to assign some special

Re: Boolean

2012-04-10 Thread Vinzent
> > So I agree: you cannot make it work for each and every JVM language, so > the current simplistic behavior is just fine. > Yeah, but my question about 'if' and equality remains open. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this

Re: [ANN] analyze 0.1.3

2012-04-10 Thread Sanel Zukan
Congrats! I'm just curious: reading your example on gist, (ast [1 2]) will yield '{:op :constant, :env {:locals {}, :ns {:name analyze.core}}, :val (1 2)}'. After downloading 0.1.4 version and running (ast '(1 2)), I'm getting the same; is it possible to get object type as part of output, e.g.

Re: [ANN] analyze 0.1.3

2012-04-10 Thread Ambrose Bonnaire-Sergeant
Fixed a silly bug, released 0.1.4. Enjoy! Ambrose On Tue, Apr 10, 2012 at 7:16 PM, Ambrose Bonnaire-Sergeant < abonnaireserge...@gmail.com> wrote: > analyze: Friendly interface to the Clojure compiler > > Usage: http://clojars.org/analyze > > *Release 0.1.3* > > - Improved interface (`ast`, `as

[ANN] analyze 0.1.3

2012-04-10 Thread Ambrose Bonnaire-Sergeant
analyze: Friendly interface to the Clojure compiler Usage: http://clojars.org/analyze *Release 0.1.3* - Improved interface (`ast`, `ast-in-ns`) - Finer grained literals - Many small changes after testing with typed-clojure - Multimethod implementation moved to protocols (thanks Bronsa) *Example

Re: Karotz apps in ClojureScript

2012-04-10 Thread Ulrik Sandberg
On Tuesday, 10 April 2012 00:15:36 UTC+2, David Nolen wrote: > > > Very neat! Sounds like you just barely made the 64K limit :) > It wasn't that bad. The basic "move ears and say something in Spanish" takes up 33K, so with the fundamentals all set, I hope theres still plenty of room for some i

Re: seeking a lazy way to interleave a constant

2012-04-10 Thread Alan Malloy
On Apr 10, 12:36 am, David Powell wrote: > > As an aside.. I just looked at the source for this, what does the :static > > tag in the metadata do? > > From what I can make out... nothing.  I think it is left over from an > experiment to improve var lookup times prior to dynamic binding being > dis

Re: [ANN] clojure-py 0.2 released

2012-04-10 Thread Devin Walters
Thanks for this. I've been enjoying reading the clojure-py code side-by-side with Clojure proper. '(Devin Walters) On Monday, April 9, 2012 at 9:57 PM, Timothy Baldridge wrote: > And it's always good to give links with a project release: > > Source: > > https://github.com/halgari/clojure-py

Re: seeking a lazy way to interleave a constant

2012-04-10 Thread David Powell
> As an aside.. I just looked at the source for this, what does the :static tag in the metadata do? >From what I can make out... nothing. I think it is left over from an experiment to improve var lookup times prior to dynamic binding being disabled by default. -- You received this message becau