Re: hash of 0 and nil

2012-12-21 Thread Christian Sperandio
I write again my post because the previous was bad written and I want to respect the Englis language the more as I can. With your question, I'm feeling you think each item has a different hash code. But it's wrong. You can meet collisions. An hash code is not an id, it's a way to find an

Re: Maps, keywords, and functions

2012-12-21 Thread Marko Topolnik
Another common use case: leveraging the thrush operator. (- odd-coll :foo :bar :baz) On Friday, December 21, 2012 12:57:15 AM UTC+1, tbc++ wrote: I use them sometimes in transversing deep maps: (def odd-coll [{:foo {:bar {:baz 42}}} {:foo {:bar {:baz 43}}}]) (def

[ANN] Process a library inspired by the core idea of Prismatic's Graph

2012-12-21 Thread Max Weber
Hi, process is another library inspired by the core idea of Prismatic's Graph. For that reason it also has a lot of goals in common with Stuart Sierra's Flow https://github.com/stuartsierra/flow library. You should read Prismatic's blog

Differences between data.csv and clojure-csv

2012-12-21 Thread Giuliani Sanches
Hi. I need to parse a csv data and want to know what are the main diferences beetwen these two libraries. If you have used them, please, share your experiences. Thanks. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send

Re: Maps, keywords, and functions

2012-12-21 Thread travis vachon
Having both options available also allows you to make NullPointerException-averse decisions as appropriate. That is, in this function: (defn foo [a-map] (a-map :foo)) I'm potentially exposed to an NPE if the given map is nil. By rewriting it: (defn foo [a-map] (:foo a-map)) I avoid this

Conflation and objectivity

2012-12-21 Thread vemv
One man's composition is another's conflation - someone on Twitter I don't necessarily agree with the opening quote, but I thought it was an interesting one :) It is not uncommon to hear/read from the Clojure commmunity that X complects a with b, hence X is bad, without giving further

Looking for ideas for a hack-night to contribute back

2012-12-21 Thread Kyle R. Burton
All, We run a Clojure group out of our company's office. We want to put together a hack night where we work on something meaningful. To that end I thought I'd put that question to the wider community: what could be valuable to the community for us to work on? The group has a pretty varied

Re: How to structure a Clojure day for noobs?

2012-12-21 Thread ulsa
I used an early version of Clooj in a workshop some time ago, but got burned by some bug that rendered the REPL crazy and shredding people's code. That scared me away. Probably much better now, though. On Wednesday, 19 December 2012 20:38:05 UTC+1, Nando Breiter wrote: What about Clooj?

Re: How to structure a Clojure day for noobs?

2012-12-21 Thread ulsa
I have used the isBlank example in presentations. It's not a bad starting point. Might look at how it could be used in a workshop. Thanks. On Thursday, 20 December 2012 17:16:19 UTC+1, Thomas wrote: If you need to touch on the why of Clojure I found the example in the beginning Stuart

Re: How to structure a Clojure day for noobs?

2012-12-21 Thread ulsa
I also suspect that the IDE is important. These guys are experienced people, and I think that once they have an environment that works and they have some control over, they will have a foundation. I think they need and want to know how namespaces work, so that they can see how to modularize

Re: How to structure a Clojure day for noobs?

2012-12-21 Thread ulsa
This is good advice. I think you can cover a lot of ground using this approach, which I guess you need to do when writing a book. As I mentioned in another post, I believe I have to choose between covering a lot of ground and building them a foundation that they can experiment on further.

Re: Who's using Clojure?

2012-12-21 Thread Dima Sabanin
How do we get ourselves to the list? We rely on Clojure heavily at http://beanstalkapp.com and we're working on rewriting even more critical pieces of our infrastructure in Clojure. I tried to edit the page, but it's locked. -- Best regards, Dima Sabanin http://twitter.com/dimasabanin -- You

Re: hash of 0 and nil

2012-12-21 Thread Christian Sperandio
In this case, a good question could be are 0 and nil the same? In some languages like C or C++, NULL and 0 are the same (at least, for x86 Intel architecture, I don't know for others). You find some old code where you have ptr == 0 instead of ptr == NULL. And often, you have test for pointers

Re: hash of 0 and nil

2012-12-21 Thread Stathis Sideris
Yes that's exactly what I meant, sorry I think I didn't express it very well. Of course I know about hash collissions, but (maybe mistakenly) I always thought that they happened in relatively rare cases. Interestingly, '() has a hash of 1 which is the same as the hash of integer 1! On Friday,

Re: abysmal multicore performance, especially on AMD processors

2012-12-21 Thread Marshall Bockrath-Vandegrift
Wm. Josiah Erikson wmjos...@gmail.com writes: I hope this helps people get to the bottom of things. Not to the bottom of things yet, but found some low-hanging fruit – switching the `push-state` from a struct-map to a record gives a flat ~2x speedup in all configurations I tested. So, that’s

Re: hash of 0 and nil

2012-12-21 Thread Christian Sperandio
The rarity about the hash code depend essentially how it is computed. On a project, the string hash codes have been the 2 first letters. On 12/21/2012 11:04 PM, Stathis Sideris wrote: Yes that's exactly what I meant, sorry I think I didn't express it very well. Of course I know about hash

Re: How to structure a Clojure day for noobs?

2012-12-21 Thread Lee Spector
On Dec 21, 2012, at 2:27 PM, ulsa wrote: I used an early version of Clooj in a workshop some time ago, but got burned by some bug that rendered the REPL crazy and shredding people's code. That scared me away. Probably much better now, though. I've taught a couple of courses using clooj and

Re: abysmal multicore performance, especially on AMD processors

2012-12-21 Thread Lee Spector
On Dec 21, 2012, at 5:22 PM, Marshall Bockrath-Vandegrift wrote: Not to the bottom of things yet, but found some low-hanging fruit – switching the `push-state` from a struct-map to a record gives a flat ~2x speedup in all configurations I tested. So, that’s good? I really appreciate your

Re: abysmal multicore performance, especially on AMD processors

2012-12-21 Thread Marshall Bockrath-Vandegrift
Lee Spector lspec...@hampshire.edu writes: FWIW I used records for push-states at one point but did not observe a speedup and it required much messier code, so I reverted to struct-maps. But maybe I wasn't doing the right timings. I'm curious about how you changed to records without the

Re: abysmal multicore performance, especially on AMD processors

2012-12-21 Thread Meikel Brandmeyer
Hi, Am 22.12.12 00:37, schrieb Lee Spector: ;; this is defined elsewhere, and I want push-states to have fields for each push-type that's defined here (def push-types '(:exec :integer :float :code :boolean :string :zip :tag :auxiliary :return :environment) (defn

Re: [ANN] tools.namespace 0.2.2 and Flow 0.1.0

2012-12-21 Thread Stuart Sierra
On Tuesday, December 18, 2012 1:02:55 AM UTC-5, Mikera wrote: Re: tools.namespace, I've found some similar functions in the bultitude library (https://github.com/Raynes/bultitude/tree/master/src/bultitude). Apparently it addresses specific needs that clojure.tools.namespace did not