Re: Why I have chosen not to employ clojure

2010-03-21 Thread David Nolen
On Sun, Mar 21, 2010 at 9:12 PM, Antony Blakey antony.bla...@gmail.comwrote: On 22/03/2010, at 9:28 AM, e wrote: And don't get me started on trying to get emacs or vi all hooked up on my mac. I've never succeeded. I'm about to use Clojure commercially, but it's been a frustrating

Re: java vector canvas

2010-03-22 Thread David Nolen
On Mon, Mar 22, 2010 at 7:59 AM, Martin DeMello martindeme...@gmail.comwrote: A bit off topic, but I'm hoping someone here will know - is there a vector canvas available for the jvm? I mean something like tk's canvas, where you can draw vector objects that retain their own identity, and can

Re: Nubie Question

2010-03-23 Thread David Nolen
On Tue, Mar 23, 2010 at 9:35 AM, WoodHacker ramsa...@comcast.net wrote: I understand how conj works.But how do you add a value to a persistent vector?You have to add the new item to the vector with (conj vector item), but how do you assign the return value to the persistent vector.

Re: Nubie Question

2010-03-24 Thread David Nolen
On Wed, Mar 24, 2010 at 5:43 PM, WoodHacker ramsa...@comcast.net wrote: Actually, swap! doesn't seem to work in my case.I should state what I'm trying to do.I'm writing a graphics editing program where I want the user to be able to choose and save color values. I start out with a

Re: Choosing a Clojure build tool

2010-03-26 Thread David Nolen
On Fri, Mar 26, 2010 at 7:33 AM, Chas Emerick cemer...@snowtide.com wrote: Now, it *would* be nice, when it's really called for, to be able to create a maven plugin using clojure. The API is just a pile of interfaces, so it's fundamentally the same as implementing any other Java API. As for

Re: towards definitive getting started assistance

2010-03-30 Thread David Nolen
Just a thought. Would it be more effective to create a GitHub page for this? Assembla is cool for ticketing but it's kinda ugly and unfriendly. For example I think something like this: http://mmcgrana.github.com/2010/03/clojure-web-development-ring.html is much friendlier and the kind of

Re: Trying to set emacs for some clojure coding

2010-03-31 Thread David Nolen
Some accurate instructions here: http://www.assembla.com/wiki/show/clojure/Getting_Started_with_Emacs ? 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

How to return a number from a deftype method?

2010-04-02 Thread David Nolen
http://gist.github.com/353121 I'm unsure how to return a number. When I try to call the length-squared method of my vec2 instance I get a very strange exception. Any help or insight much appreciated. David -- You received this message because you are subscribed to the Google Groups Clojure

Re: How to return a number from a deftype method?

2010-04-02 Thread David Nolen
On Fri, Apr 2, 2010 at 10:48 AM, Konrad Hinsen konrad.hin...@fastmail.netwrote: On 02.04.2010, at 15:48, David Nolen wrote: http://gist.github.com/353121 I'm unsure how to return a number. When I try to call the length-squared method of my vec2 instance I get a very strange exception

Re: A syntax question: positional keyword

2010-04-07 Thread David Nolen
The runtime cost of destructuring is not worth getting worked up about. It's easy to check this yourself with (time ...) David On Wednesday, April 7, 2010, Sophie itsme...@hotmail.com wrote: On Apr 6, 7:03 pm, ataggart alex.tagg...@gmail.com wrote: See:

Re: A syntax question: positional keyword

2010-04-08 Thread David Nolen
quite tedious. David On Thursday, April 8, 2010, Sophie itsme...@hotmail.com wrote: On Apr 7, 7:56 am, David Nolen dnolen.li...@gmail.com wrote: The runtime cost of destructuring is not worth getting worked up about. It's easy to check this yourself with (time ...) Results below: user= (defn

Simple macro hack for converting to fast primitive math

2010-04-13 Thread David Nolen
Recently I've been working on bits of code that require me to type in fairly long sequences of math operations. I found it tedious to convert these to type hinted binary operations so I've created the following truly simplistic macro: http://gist.github.com/364328 It lets you write things like

Re: noob: call multimethod in a map?

2010-04-16 Thread David Nolen
On Fri, Apr 16, 2010 at 3:46 PM, Brian Wolf brw...@gmail.com wrote: Hi, Is it possible to call a multimethod in a map? In this simplified example, I just want to increment every element of the array when the multimethod is called (my real application is operating on sets of hash tables ie

Re: Has deftype changed?

2010-04-18 Thread David Nolen
On Sun, Apr 18, 2010 at 1:49 PM, Rob Lachlan robertlach...@gmail.comwrote: For deeftype, has the syntax for field accessors changed too? I can't get it to work: user (deftype someType [b f]) user.someType user (def y (new someType 2 3)) #'user/y user (:b y) nil user (:f y) nil

Re: Not so happy with my code

2010-04-18 Thread David Nolen
On Sun, Apr 18, 2010 at 9:20 PM, verec jeanfrancois.brouil...@googlemail.com wrote: I have two problems with the following code. First, I have this `tos' business (to-string) because: user= (first abc) \a user= (rest abc) (\b \c) Since I wanted to get strings out of strings, a character

Re: deftype feature or bug?

2010-04-20 Thread David Nolen
On Tue, Apr 20, 2010 at 3:09 PM, Brenton bashw...@gmail.com wrote: Hello group, I am working with edge Clojure and, as of today, noticed that deftype's behavior has changed (which is expected as it is still alpha). The version in question is: clojure-1.2.0-master-20100420.150114-37.jar

Re: Newbie: Finding performance bottlenecks

2010-04-23 Thread David Nolen
In your code you have: (defstruct body :id :type ; :projectile or :unit - projectiles do not collide with other bodies; :current-position ; ref :current-cells ; ref :current-rotation ;atom :pixel-half-width :pixel-half-height :half-width :half-height :components) ; a map of

Re: Testing equality

2010-04-28 Thread David Nolen
On Wed, Apr 28, 2010 at 9:30 AM, WoodHacker ramsa...@comcast.net wrote: Can someone explain to me why this doesn't work: (let [ p Bill/ sep (System/getProperty file.separator) ] (if (= (last p) sep) (println found separator) (println no

Re: what is wrong with (use `clojure.contrib.string) ?

2010-04-29 Thread David Nolen
On Fri, Apr 30, 2010 at 1:32 AM, gary ng garyng2...@gmail.com wrote: On Thu, Apr 29, 2010 at 9:11 PM, Meikel Brandmeyer m...@kotka.de wrote: c.c.string is not designed to be used like that. Use require plus an alias: (require '[clojure.contrib.string :as s]). Then repeat is the core

Re: Primitive arithmetic and mod

2010-05-03 Thread David Nolen
On Mon, May 3, 2010 at 4:21 PM, Brian Watkins wildu...@gmail.com wrote: Any ideas about this? On May 2, 1:44 am, Brian Watkins wildu...@gmail.com wrote: I'm trying to speed up computing terms of a simple recurrence where the terms are computed modulo some value each iteration, (defn

Re: refs towards ref

2010-05-04 Thread David Nolen
On Tue, May 4, 2010 at 10:44 AM, Nicolas Oury nicolas.o...@gmail.comwrote: Dear all, I have a problem where a lot of concurrency could be gained by having a tree of references. ie a tree where each nodes contain a ref to a set of similar tree. (I know that having mutable trees is asking

Re: ?: promotion of integral types

2010-05-05 Thread David Nolen
On Wed, May 5, 2010 at 10:32 AM, Sean Devlin francoisdev...@gmail.comwrote: And I was too quick to post. Sorry about that. You've got the unchecked addition fn for speed, and those are allowed the throw overflow errors. The + fn is always supposed to work. The fact that it auto-promotes

Re: ?: promotion of integral types

2010-05-05 Thread David Nolen
On Wed, May 5, 2010 at 11:11 AM, Sean Devlin francoisdev...@gmail.comwrote: I think there's a fundamental assumption that I disagree with. Since we've already opened the can of worms that is auto-promotion, it should *always* work. Given auto-promotion, + shouldn't be fast (use

Re: divide-n-conquer collections

2010-05-07 Thread David Nolen
On Wed, May 5, 2010 at 8:08 PM, Fabio Kaminski fabiokamin...@gmail.comwrote: im really a newcomer, and since i couldnt find this information anywhere.. there we go :) how can i split a collection and later join a collection in clojure.. to apply concurrent transversal patterns in

Re: Question about namespaces

2010-05-09 Thread David Nolen
If you just need to break up your code into smaller files another technique is: ; me/lib.clj (ns me.lib) (load me/foo) (load me/bar) ; me/foo.clj (in-ns 'me.lib) ; me/bar.clj (in-ns 'me.lib) On Sat, May 8, 2010 at 10:44 PM, Mark Engelberg mark.engelb...@gmail.comwrote: I've seen people say

Re: ANN: try clojure

2010-05-14 Thread David Nolen
Pretty cool. Been waiting for this. My main criticism is that it isn't very pretty :) Is there a github repo for it so people can fork it and play around with CSS? Also how difficult would it be to build a tutorial for it like the ones that http://tryhaskell.org and http://tryruby.org have? Would

Re: Dynamic use of protocols

2010-05-16 Thread David Nolen
On Saturday, May 15, 2010, Mikhail Kryshen set of extenders and implementing functions. This state (what types currently implement the protocol and how) is what I really want to be able to manipulate. The way it is tied to the protocol definition and changed by the extend function seems to

Re: swank-clojure and GNU Emacs 23 - package.el install issues

2010-05-17 Thread David Nolen
I'm running into this issue as well. On Mon, May 17, 2010 at 4:18 PM, Terrence Brannon scheme...@gmail.comwrote: Hello, I wanted to try out Clojure. It was my understanding that swank-clojure was a package GNU Emacs that would download clojure automatically. But the docs for it no longer say

Re: functional check slower than imperative?

2010-05-18 Thread David Nolen
On Tue, May 18, 2010 at 10:18 AM, braver delivera...@gmail.com wrote: I have a huge graph of the form {john {1 {alice 1, bob 3}, 4 {alice 2, stan 1}, alice {1 {john 1, mandy 2}, 2 {john 3, stan 2}}} It shows for each user days on which he communicated, and for each day, with whom and how

Re: clojure date library

2010-05-24 Thread David Nolen
On Mon, May 24, 2010 at 1:53 PM, islon islonsche...@gmail.com wrote: I missed a date/time API in clojure so I made one myself. Is it possible to put it in clojure.contrib? Sugestions, critics and improvements are welcome. - http://www.copypastecode.com/29707/ Islon Have you looked at

Re: Newbie question about vector performance

2010-05-31 Thread David Nolen
On Fri, May 28, 2010 at 12:20 PM, Rubén Béjar ruben.be...@gmail.com wrote: Hi again, I have tried a few more things: I have done the same in Java but using an array of Integers, instead of an array of ints. It just takes 78 ms. (more than 16, still far less than 4 secs). I have also

Re: Newbie question about vector performance

2010-05-31 Thread David Nolen
On Sun, May 30, 2010 at 3:49 PM, Rubén Béjar ruben.be...@gmail.com wrote: is not very precise with that short periods of time) and in Clojure the 2000x2000 CA is updated in 98 secs some times and up to 150 s. other times (the 500x500 was 4 secs), When numbers fluctuate like that I'm pretty

Re: Clojure Enhancement Proposals or wish list

2010-06-09 Thread David Nolen
On Wed, Jun 9, 2010 at 4:25 PM, frantz franis.sirko...@gmail.com wrote: I would like to know if there is Clojure Enhacements Proposals list (wish list). I would like to add something. Best wishes, Franis. user (= mailing-list wish-list) true ;) -- You received this message because you

Bug in prim branch?

2010-06-09 Thread David Nolen
(defn foo [#^ARef wah]) Works fine on master but throws: java.lang.IllegalArgumentException: Unable to resolve classname: ARef (NO_SOURCE_FILE:6) on the prim branch. David -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send

Re: Bug in prim branch?

2010-06-10 Thread David Nolen
Here's the patch. http://github.com/swannodette/swank-clojure/commit/8c6a037c9b62edc83c852673523e95a0b14acece On Thu, Jun 10, 2010 at 12:10 AM, David Nolen dnolen.li...@gmail.comwrote: (defn foo [#^ARef wah]) -- You received this message because you are subscribed to the Google Groups

Re: Bug in prim branch?

2010-06-10 Thread David Nolen
Oh sorry this if you want swank-clojure to work with the prim branch. On Thu, Jun 10, 2010 at 10:56 AM, David Nolen dnolen.li...@gmail.comwrote: Here's the patch. http://github.com/swannodette/swank-clojure/commit/8c6a037c9b62edc83c852673523e95a0b14acece On Thu, Jun 10, 2010 at 12:10 AM

Re: 1.2 letfn/reduce bug?

2010-06-11 Thread David Nolen
On Fri, Jun 11, 2010 at 12:00 PM, russellc russell.christop...@gmail.comwrote: (defn foo [] (letfn (bar [acc val] acc) (reduce bar {} (range 1 10 doesn't compile java.lang.IllegalArgumentException: Don't know how to create ISeq from: clojure.lang.Symbol

Re: Newbie question about vector performance

2010-06-11 Thread David Nolen
On Sun, May 30, 2010 at 3:49 PM, Rubén Béjar ruben.be...@gmail.com wrote: Thanks to all of you for your interest, I will inform of any further advance... :-) Rubén Because I like sitting around optimizing Clojure code I looked into this some more: http://gist.github.com/420036 With the

Re: Protocol type hints - Java interface

2010-06-12 Thread David Nolen
On Sat, Jun 12, 2010 at 11:21 AM, David McNeil mcneil.da...@gmail.comwrote: As near as I can tell the protocol type hints are not used in the resulting Java interface. For example: (ns demo.impl.boat) (defprotocol Boat (go [boat ^int distance])) You can't put type hints on protocol

Re: Mac Emacs users: which version do you prefer (Aquamacs, Carbon Emacs, other?)

2010-06-12 Thread David Nolen
Carbon Emacs is great, I used it for years. However it will no longer be supported. I've since switched over to the Cocoa 23 port. It's lacking in some niceties but it's totally usable. On Sat, Jun 12, 2010 at 8:25 AM, Thomas Kjeldahl Nilsson tho...@kjeldahlnilsson.net wrote: What are the

Re: Protocol type hints - Java interface

2010-06-12 Thread David Nolen
Here is a gist of what statics look like: http://gist.github.com/432465 David On Sat, Jun 12, 2010 at 12:09 PM, David McNeil mcneil.da...@gmail.comwrote: David - Thanks for the tips on definterface and the new statics feature. I will need to look into these because I am not familiar with

Re: noob questions - Hello world + learning

2010-06-13 Thread David Nolen
If your are new to programming I recommend reading at least the first three chapters of The Structure and Interpretation of Computer Programs. It's available online. David On Friday, June 11, 2010, Jared tri...@gmail.com wrote: Hi everyone, I'm 100% new to LISP, 95% new to Java, and 90% new

Re: noob questions - Hello world + learning

2010-06-15 Thread David Nolen
On Mon, Jun 14, 2010 at 4:09 PM, Jared tri...@gmail.com wrote: I'm trying to grok this hello world template before I move on to other stuff. What is the ns line for? I read the documentation on ns, but it didn't make much sense to me. Is ns related to scope? All I know is when I delete the ns

Re: Recommendations on prepping a library for 1.2 release?

2010-06-16 Thread David Nolen
On Wed, Jun 16, 2010 at 10:17 PM, Richard Lyman richard.ly...@gmail.comwrote: Everything's on github - right? The simplest commands to grab the core (and contrib?) from github as well as the commands to keep updating every week or so until release would be fantastic. git clone url, to get it

Re: Recommendations on prepping a library for 1.2 release?

2010-06-16 Thread David Nolen
On Wed, Jun 16, 2010 at 11:34 PM, Richard Lyman richard.ly...@gmail.comwrote: On Wed, Jun 16, 2010 at 8:36 PM, David Nolen dnolen.li...@gmail.com wrote: On Wed, Jun 16, 2010 at 10:17 PM, Richard Lyman richard.ly...@gmail.com wrote: Everything's on github - right? The simplest commands

Re: Enhanced Primitive Support

2010-06-17 Thread David Nolen
On Thu, Jun 17, 2010 at 11:00 PM, Rich Hickey richhic...@gmail.com wrote: In the end, this does put the interests of two sides of the community at odds. Only one set of interests can be the default. Part of the point of this discussion is to measure the sides (so speak up people!). I am

Re: Enhanced Primitive Support

2010-06-17 Thread David Nolen
On Thu, Jun 17, 2010 at 11:57 PM, Mark Engelberg mark.engelb...@gmail.comwrote: I assume that most Clojure users really like its dynamic nature. If this is true, then for most of us, the common case is to NOT annotate our code with types. Certainly I like the idea of making it as easy as

Re: Enhanced Primitive Support

2010-06-17 Thread David Nolen
On Fri, Jun 18, 2010 at 12:24 AM, Antony Blakey antony.bla...@gmail.comwrote: That's fine for fact, but as a consumer of library functions, how do I know when I should pass in bigints? How do I know when an intermediate value, for my particular combination of parameter values, is going to

Re: Enhanced Primitive Support

2010-06-18 Thread David Nolen
On Fri, Jun 18, 2010 at 1:44 AM, Antony Blakey antony.bla...@gmail.comwrote: On Fri, Jun 18, 2010 at 12:24 AM, Antony Blakey antony.bla...@gmail.com wrote: This proposal is IMO a very bad idea. Why do you need know? You're assumption is built on someone writing a writing a bad library (one

Re: Enhanced Primitive Support

2010-06-18 Thread David Nolen
On Fri, Jun 18, 2010 at 2:10 AM, Mark Engelberg mark.engelb...@gmail.comwrote: Elaborating on Anthony's explanation, let's say you call (fact (foo n)). This imposes too high a burden on any programmer who cares about safety. Don't buy it. That's the whole point of BigInt contagion. If

Re: Enhanced Primitive Support

2010-06-18 Thread David Nolen
On Fri, Jun 18, 2010 at 6:47 AM, Carson c.sci.b...@gmail.com wrote: (defn fact [n] (if (zero? n) 1 (* n (fact (dec n) (defn twice-fact [n] (fact (fact n))) (defn bad-twice-fact [n] (fact (- n fact range last inc))) Not only is it contrived, under the proposal, this implementation of fact

Re: Enhanced Primitive Support

2010-06-18 Thread David Nolen
On Fri, Jun 18, 2010 at 4:52 PM, Rich Hickey richhic...@gmail.com wrote: I've revised and enhanced the strategy, based upon the feedback here. I think it is a nice compromise. Docs (see update section at the top)

Re: How to derive a protocol from another protocol?

2010-06-18 Thread David Nolen
Unless I'm mistaken, protocols cannot be derived. 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

Re: Enhanced Primitive Support

2010-06-19 Thread David Nolen
On Sat, Jun 19, 2010 at 5:13 AM, Mike Meyer mwm-keyword-googlegroups.620...@mired.org wrote: Were those real world programs, or arithmetic benchmarks? Most real world programs I see spend so little of their time doing arithmetic that making the math an order of magnitude slower wouldn't make

Re: Enhanced Primitive Support

2010-06-19 Thread David Nolen
On Sat, Jun 19, 2010 at 4:10 PM, Michał Marczyk michal.marc...@gmail.com wrote: (defn fact [n] (loop [n n r 1] (if (zero? n) r (recur (dec n) (* r n) Huh? That doesn't look like it's going to work at all. 1) 1 is primitive, we know that, accept it 2) we don't know the type

Re: Enhanced Primitive Support

2010-06-19 Thread David Nolen
for working code. Until then this is just theoretical rhetoric. On Saturday, June 19, 2010, Mark Engelberg mark.engelb...@gmail.com wrote: On Sat, Jun 19, 2010 at 5:13 PM, David Nolen dnolen.li...@gmail.com wrote: Huh? That doesn't look like it's going to work at all. 1) 1 is primitive, we know

Re: Enhanced Primitive Support

2010-06-20 Thread David Nolen
On Sun, Jun 20, 2010 at 12:57 PM, Luke VanderHart luke.vanderh...@gmail.com wrote: anything that would mean I'd have to explain the intricacies of primitives, boxing, hinting and casting in an Intro to Clojure course. As much as humanely possible, that should be reserved for the Performance

Re: Enhanced Primitive Support

2010-06-20 Thread David Nolen
On Sun, Jun 20, 2010 at 8:19 PM, Mark Engelberg mark.engelb...@gmail.comwrote: My favorite option of those proposed is: +, *, -, inc, dec auto-promote. loop/recur is changed so that primitive bindings are boxed. +',*',-',inc',dec' give error upon overflow. A new construct, loop', is

Re: [ANN] Calx, a wrapper for OpenCL

2010-06-21 Thread David Nolen
On Mon, Jun 21, 2010 at 2:04 AM, Zach Tellman ztell...@gmail.com wrote: Wrappers for OpenCL have been discussed a few times on this list, so hopefully a few of you will be interested to hear that one is available at http://github.com/ztellman/calx. In my opinion, the C-variant language used

Re: Enhanced Primitive Support

2010-06-21 Thread David Nolen
On Mon, Jun 21, 2010 at 10:52 AM, Rich Hickey richhic...@gmail.com wrote: I've added the speculative analysis required to detect when recur arguments fail to match the type of primitive loop locals, and recompile the loop with those loop args boxed. When *warn-on-reflection* is true it will

Re: Transform columnar data into a tree?

2010-06-21 Thread David Nolen
Is it really necessary to have the keys :data and :children? If not: (reduce (fn [r x] (assoc-in r x {})) {} (partition 3 '(A1 B1 C1 A1 B1 C2 A1 B2 C3 A1 B2 C4 A2 B3 C5 A2 B3 C6 A2 B4 C7 A2 B4 C8))) {A2 {B4 {C8 {}, C7 {}}, B3 {C6 {}, C5 {}}}, A1 {B2 {C4 {}, C3 {}}, B1 {C2 {}, C1 { Works out

Re: Enhanced Primitive Support

2010-06-22 Thread David Nolen
On Tue, Jun 22, 2010 at 6:04 AM, Heinz N. Gies he...@licenser.net wrote: Yes. With Rich's primitive work we can get to *1 billion arithmetic operations* in 2/3 of a second on commodity hardware. Which is absolutely great since I always wanted to do that :P sarcasm/, meaning the example is

Re: cond formatting

2010-06-22 Thread David Nolen
On Tue, Jun 22, 2010 at 4:27 PM, cageface milese...@gmail.com wrote: Any thoughts on this or other approaches? (defn compare-row [a b] ;; compare null rows as to advance cursor (cond (and (nil? a) (nil? b)) [0,0] (and (nil? a) (not= b nil)) [1, 0] (and (not= a nil) (nil?

Re: Reflection warnings in defrecord (missing hint in core_deftype.clj?)

2010-06-23 Thread David Nolen
I've been seeing this as well. On Wed, Jun 23, 2010 at 11:17 AM, Michał Marczyk michal.marc...@gmail.comwrote: Hi, just noticed that (defprotocol Foo (foo [self])) (defrecord Bar [x] Foo (foo [self] x)) gives a reflection warning -- call to contains can't be resolved. My initial guess

Re: State of Clojure web development

2010-06-24 Thread David Nolen
On Thu, Jun 24, 2010 at 3:12 PM, Tim Robinson tim.blacks...@gmail.comwrote: (def stuff {:key1 {:item1 {:sub1 val1}}) (((stuff :key1) :item1) sub1) --- YUCK val1 (get-in m [:key1 :item1 :sub1]) --- YUM ;) (rest stuff) (2 3 4 5) (next stuff) (2 3 4 5) this can be done

Re: State of Clojure web development

2010-06-24 Thread David Nolen
On Thu, Jun 24, 2010 at 12:27 PM, Daniel Gagnon redalas...@gmail.comwrote: I don't use Clojure for web development and I thought sharing why could be useful too. For web development, my favourite tool is Djangohttp://www.djangoproject.com/. It comes as a fullstack framework which means I

Re: New Primitive data types (equal branch) - impact on optimized code.

2010-06-24 Thread David Nolen
On Thu, Jun 24, 2010 at 5:08 PM, Heinz N. Gies he...@licenser.net wrote: So out of curiosity I did some benchmarking of the new equal branch and wanted to see how much I can get out of clojure if I push the limits. Now that said I know equal isn't done yet but I figured it won't hurt. Bad news

Re: New Primitive data types (equal branch) - impact on optimized code.

2010-06-24 Thread David Nolen
On Thu, Jun 24, 2010 at 5:17 PM, David Nolen dnolen.li...@gmail.com wrote: On Thu, Jun 24, 2010 at 5:08 PM, Heinz N. Gies he...@licenser.net wrote: So out of curiosity I did some benchmarking of the new equal branch and wanted to see how much I can get out of clojure if I push the limits. Now

Re: New Primitive data types (equal branch) - impact on optimized code.

2010-06-24 Thread David Nolen
If you want some ideas: http://gist.github.com/452032 This was posted earlier in the ML in an un-optimized Clojure form as taking 98secs while the Java version took about 16ms on the OP's machine. With Rich's latest changes this optimized Clojure code runs in about 20-25ms on my i7 laptop. David

Re: New Primitive data types (equal branch) - impact on optimized code.

2010-06-24 Thread David Nolen
On Thu, Jun 24, 2010 at 10:50 PM, Mark Engelberg mark.engelb...@gmail.comwrote: With respect to this particular benchmark, I don't think it will be possible to get idiomatic code in the same ballpark as Java, because if you use Clojure's vectors to store the permuted values, they will be

Re: Hash-map destructuring

2010-06-25 Thread David Nolen
On Wed, Jun 16, 2010 at 7:00 PM, Brian Carper briancar...@gmail.com wrote: Given: (defn foo [x {:as args}] [x args]) (foo 1 :bar 2 :baz [:quux]) = [1 {:bar 2, :baz [:quux]}] If I have those rest-arguments already in a map, what's the most elegant way to call foo with them? (def args

Re: Clojure's n00b attraction problem

2010-06-28 Thread David Nolen
On Sun, Jun 27, 2010 at 5:58 PM, Greg g...@kinostudios.com wrote: This weekend I've been diving head-first into Clojure, and I've documented a lot of the sticking points that I've run into as a n00b. I'd like to share them with the community here, in the hopes that we might be able to

Re: Documentation and examples (and where is the documentation on reduce)?

2010-06-29 Thread David Nolen
On Tue, Jun 29, 2010 at 5:55 AM, michele michelemen...@gmail.com wrote: I really like Clojure, but as a complete n00b on Lisp languages, it is frustrating that I many times have to hunt high and low for documentation on basic stuff. Recently I saw a code snippet that showed that reduce takes

Re: Proposal: Suppressing tracebacks from clojure.core

2013-01-22 Thread David Nolen
Better tracebacks have been available in Clojure since 1.3: user= (require '[clojure.repl :as r]) user= (r/pst *e) e* is the last exception. It's up to the tools to support it. That said allowing customized tracebacks for tools could be improved - but no one's ever submitted any serious patches

Re: GSOC 2013 projects?

2013-01-31 Thread David Nolen
I helped manage the process last year. It's not a small amount of work. I don't think I have the time to put into it this year, though I'd be willing to be a mentor. Anybody want to step forward and lead that process? David On Thu, Jan 31, 2013 at 10:23 AM, Dmitry Groshev

[ClojureScript] Please test CLJS-418, fixing browser REPL

2013-02-07 Thread David Nolen
http://dev.clojure.org/jira/browse/CLJS-418 Some of you may have encountered bizarre problems when trying to use browser REPL with the latest releases of ClojureScript. This ticket contains a patch that should resolve the issue but we need people to test. Thanks, David -- -- You received this

Re: Can't use Clojure 1.5 with emacs and swank

2013-02-11 Thread David Nolen
I'm not sure if swank-clojure has been patched for 1.5, I believe the line column information changes might have broken things. nrepl.el works pretty well as a replacement and development seems to be moving along pretty quickly. David On Mon, Feb 11, 2013 at 5:53 PM, JvJ kfjwhee...@gmail.com

Re: Google Summer of Code 2013

2013-02-14 Thread David Nolen
WOOT! I'm of course more than happy to mentor any projects around ClojureScript, core.logic, and core.match. David On Thu, Feb 14, 2013 at 1:03 PM, Daniel Solano Gómez cloj...@sattvik.comwrote: Hello, all, It's official: Google Summer of Code 2013 is on. Last year, Clojure was able to

Re: [GSoC Idea] cljs layer/dsl over express js

2013-02-14 Thread David Nolen
I responded to Omer on Twitter, it's probably worth looking into existing projects like Bodil Stokke's Dog Fort first - https://github.com/bodil/dogfort David On Thu, Feb 14, 2013 at 5:48 PM, Tamreen Khan histor...@gmail.com wrote: But compojure isn't in cljs, so you have to use the jvm. A

Re: [ClojureScript] features expression

2013-02-16 Thread David Nolen
I personally think the CL feature expression approach is satisfactory. I'd like to see this get into 1.6. It's likely that ClojureScript will switch to tools.reader in order to get more accurate information for source maps, so perhaps we can move more quickly if we just implement it there. On

Re: [ClojureScript] features expression

2013-02-16 Thread David Nolen
from few cli/cljs gurus the effort could be shared with less experienced clojurist ? Or it's more efficient to let those gurus to make a step ahead by themselves? mimmo On Feb 16, 2013, at 5:53 PM, David Nolen dnolen.li...@gmail.com wrote: I personally think the CL feature expression approach

Re: [ANN] ClojureScript release 0.0-1586

2013-02-16 Thread David Nolen
Sweet! Thank you! On Saturday, February 16, 2013, Stuart Sierra wrote: Coming soon to a Maven repository near you: [org.clojure/clojurescript 0.0-1586] List of changes: http://build.clojure.org/job/clojurescript-release/22/ Notable change: fix for CLJS-418, the broken dependency

Re: Google Summer of Code 2013

2013-02-20 Thread David Nolen
It's probably possible but too broad a scope for GSoC 2013. I think the community would be better served by directly contributing to core.logic core.typed both of which could use lots of help :) On Wed, Feb 20, 2013 at 11:13 AM, Maik Schünemann maikschuenem...@gmail.com wrote: given the

Re: Google Summer of Code 2013

2013-02-20 Thread David Nolen
to participate as a student in GSoC 2013, but I may participate as a mentor instead. I'm hoping to find out in the next few weeks. http://dev.clojure.org/display/community/Project+Ideas#ProjectIdeas-TypeSystems On Thu, Feb 21, 2013 at 12:41 AM, David Nolen dnolen.li...@gmail.comwrote: It's

Re: Clojure Performance For Expensive Algorithms

2013-02-21 Thread David Nolen
= i }else { return f } } }; That looks like some highly optimized JS to me ;) I think I'll stick with writing my fast code in Clojure thank you very much. David On Thu, Feb 21, 2013 at 4:49 PM, David Nolen dnolen.li...@gmail.com wrote: On Thu, Feb 21, 2013 at 4:55 AM, Marko

Re: Clojure Performance For Expensive Algorithms

2013-02-22 Thread David Nolen
On Fri, Feb 22, 2013 at 3:43 AM, Marko Topolnik marko.topol...@gmail.comwrote: My 5-year experience with Clojure (since 0.9) hasn't helped me to see it that way. I've been doing Clojure for about 5 years as well. Optimizing Clojure in the early days was pretty tough stuff, and resorting to

Re: Clojure Performance For Expensive Algorithms

2013-02-22 Thread David Nolen
On Fri, Feb 22, 2013 at 2:06 PM, Marko Topolnik marko.topol...@gmail.comwrote: Fair enough. My point was simply that Clojure implementations have a small learnable subset that performs well when performance is desired - primitives, loops, arrays, deftypes, etc regardless of host. It's

Re: Clojure Performance For Expensive Algorithms

2013-02-22 Thread David Nolen
Er re: assigning stack based locals. Forget wasting time making a tuple type, probably best to just do that with a small mutable array. This worked ok for us when porting some Java persistent data structure code to ClojureScript. On Friday, February 22, 2013, David Nolen wrote: On Fri, Feb 22

Re: Clojure Performance For Expensive Algorithms

2013-02-22 Thread David Nolen
On Friday, February 22, 2013, Marko Topolnik wrote: Annoying *and* slower than Java's locals, unfortunately. Most of the time it won't make a huge dent in the performance, but I just happen to have an inner loop that iterates between zero and three times only, zero being by far the most

Re: Clojure Performance For Expensive Algorithms

2013-02-22 Thread David Nolen
OK, though threading one 3 element object array into the loop with one double cast doesn't really seem that problematic or slow to me. On Fri, Feb 22, 2013 at 3:27 PM, Marko Topolnik marko.topol...@gmail.comwrote: On Friday, February 22, 2013 8:41:15 PM UTC+1, David Nolen wrote: Er re

Re: Clojure Performance For Expensive Algorithms

2013-02-22 Thread David Nolen
performance and just don't want to bother. On Fri, Feb 22, 2013 at 3:27 PM, Marko Topolnik marko.topol...@gmail.comwrote: On Friday, February 22, 2013 8:41:15 PM UTC+1, David Nolen wrote: Er re: assigning stack based locals. Forget wasting time making a tuple type, probably best to just do

Re: Clojure Performance For Expensive Algorithms

2013-02-23 Thread David Nolen
Lisp programmers know the value of everything and the cost of nothing ;) On Saturday, February 23, 2013, Marko Topolnik wrote: I tend to think clojure is in a similar position - fast enough for the vast majority of things (ymmv of course - depending on what your domain is) and if you meet a

Re: ClojureScript js-clj not converting

2013-02-25 Thread David Nolen
Are you expecting token to get converted into a ClojureScript map? On Mon, Feb 25, 2013 at 11:23 AM, Mike Longworth m...@mikelongworth.co.ukwrote: I've updated to 0.0-1586 build #22 from a much older release: 0.0-1450 I'm now geting a problem with (js-clj token) not converting the object I

Re: Support for pmap?

2013-02-25 Thread David Nolen
Not sure how we could given JS is single threaded. On Monday, February 25, 2013, MC Andre wrote: Does ClojureScript support pmap? -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to

Re: ClojureScript browser REPL goes bonkers after it evals

2013-02-26 Thread David Nolen
Feel free to open a ticket in JIRA. More details would be helpful and a patch would be nice. Thanks! On Monday, February 25, 2013, Bobby Wang wrote: Update: this seems to only happen if I start the CLJS REPL inside a CLJ REPL. If I start straight from the command line (ie. lein trampoline

Re: Support for pmap?

2013-02-26 Thread David Nolen
Maybe one day. Far as I know the current overhead is significant. On Tue, Feb 26, 2013 at 2:05 PM, Alan Shaw noden...@gmail.com wrote: Could parallel.js and web workers help? On Feb 25, 2013 6:12 PM, David Nolen dnolen.li...@gmail.com wrote: Not sure how we could given JS is single threaded

Re: Clojure Performance For Expensive Algorithms

2013-02-26 Thread David Nolen
On Tue, Feb 26, 2013 at 3:50 PM, Marko Topolnik marko.topol...@gmail.comwrote: Things don't look very rosy for Clojure: it turns out to be about as verbose as Java and significantly slower (this confirms my experience; slightly slower than *regular* Java code, significantly slower than highly

Re: core.logic: Dividing the knowledge base

2013-02-27 Thread David Nolen
Sounds like an interesting idea though I can't give much guidance about how to approach it. Curious to know how it goes though! On Wed, Feb 27, 2013 at 3:50 PM, JvJ kfjwhee...@gmail.com wrote: I'm creating something with core.logic that involves multiple agents(not the same as a clojure

Re: core.logic: Dividing the knowledge base

2013-02-27 Thread David Nolen
-based relations. [nme rest] `(defrel ~nme ~'agent ~@rest)) On Wednesday, 27 February 2013 16:17:30 UTC-5, JvJ wrote: Thanks for the quick reply. I guess I'll go through with my initial plan and see what happens. Thanks. On Wednesday, 27 February 2013 16:14:49 UTC-5, David

Re: core.logic: Dividing the knowledge base

2013-02-27 Thread David Nolen
I'm also enthusiastic about eventually replacing the current core.logic defrel/fact stuff with this excellent work. David On Wed, Feb 27, 2013 at 4:45 PM, Norman Richards o...@nostacktrace.comwrote: On Wed, Feb 27, 2013 at 2:50 PM, JvJ kfjwhee...@gmail.com wrote: I'm creating something

<    1   2   3   4   5   6   7   8   9   10   >