Re: Looking for parser generator library

2012-02-07 Thread Evan Gamble
fnparse has been forked by John Poplett and updated to work with clojure 1.3. On Clojars it's at https://clojars.org/org.clojars.jpoplett/fnparse. On Github it's at https://github.com/John-Poplett/fnparse - Evan On Jan 28, 7:19 am, Roman Perepelitsa wrote: > I'm looking for a parser generator

Re: newline question

2012-02-07 Thread Chris Perkins
http://stackoverflow.com/questions/8707679/how-to-get-suppress-m-characters-in-my-clojurebox-emacsw32-repl-connected-to -- 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

Calling all Melbourne, Australia, Clojure users

2012-02-07 Thread James Sofra
Hi all, I have been discussing recently possibly starting a Melbourne Clojure meetup. We have a possible location scouted out already but I really don't have a good idea of who may be using Clojure in Melbourne. I met a couple of people at the Conj last year so I am in contact with them and th

Re: Calling all Melbourne, Australia, Clojure users

2012-02-07 Thread Leonardo Borges
Hi James, I'm currently using Meetup.com - http://www.meetup.com/clj-syd/ - to handle our Sydney Clojure User Group. We're about to have our first open meeting - the group was internal to ThoughtWorks before that. So far I like Meetup's interface. Feel free to hit me up if I can be of any help.

Re: Calling all Melbourne, Australia, Clojure users

2012-02-07 Thread Stuart Campbell
Hi James, I'm currently only using Clojure for side projects, but I'm very keen to catch up! Stu On 7 February 2012 22:23, James Sofra wrote: > Hi all, > > I have been discussing recently possibly starting a Melbourne Clojure > meetup. > We have a possible location scouted out already but I re

Clojure and long auto-promotion to big decimal

2012-02-07 Thread Leandro Moreira
I thought clojure always did auto promotion between long and bigdecimal, but I run repl today and I notice this: (* 1000 1000 1000 1000 1000 1000 1000) raises overflow (* 1000M 1000M 1000M 1000M 1000M 1000M 1000M) this is ok So this was always working that way? or they've changed? (and if yes, wh

Re: ClojureScript One - Getting Started with ClojureScript

2012-02-07 Thread Tom Chappell
This problem is caused by the underlying Java library that is used to launch the browser, which, under linux, only launches the proper default browser if gnome is installed. Install enough gnome and it will start to work. -Tom On Jan 25, 10:49 am, Raju Bitter wrote: > ClojureScriptOne is fantasti

Re: where is defalias in the new contrib github repositories

2012-02-07 Thread R Daneel
Many thanks for the detailed discussion! I'm just going with (defn bar [args] (foo args)) - or the cascalog predicate equivalent - for now; I guess I can live without the metadata :) -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this g

read password from console

2012-02-07 Thread Stanley Cai
Hi, When I wrote a utility in clojure, I found I cannot find a way to read password from console. I use read-line for username, but would like not to print the password on the console when reading password. Any hints? Thanks, -stanley -- You received this message because you are subscribed to t

Re: read password from console

2012-02-07 Thread Kevin Ilchmann Jørgensen
I truly hope you find something better than: http://java.sun.com/developer/technicalArticles/Security/pwordmask/ One - not so portable way, would be sending an \033]8m - invisible char to the console beforehand ? /Kevin On Tue, Feb 7, 2012 at 10:26 AM, Stanley Cai wrote: > Hi, > > When I wro

Re: Clojure and long auto-promotion to big decimal

2012-02-07 Thread Aaron Cohen
This was the big change in clojure 1.3 See http://dev.clojure.org/display/doc/Enhanced+Primitive+Support The expectation now is that if you are doing math that is going to overflow, you can either introduce a bigint into the chain somewhere, after which all the math will use bigints (contagion) o

Re: read password from console

2012-02-07 Thread David Powell
If you have Java 6 (and you probably do), then look at: http://docs.oracle.com/javase/6/docs/api/java/io/Console.html Simple example: (String/valueOf (.readPassword (System/consol

[ANN] http.async.client v0.4.1 realeased

2012-02-07 Thread Hubert Iwaniuk
http.async.client is Asynchronous HTTP Client for Clojure and just got v0.4.1 release. This release is mainly community contributions. Code: http://github.com/neotyk/http.async.client Docs: http://neotyk.github.com/http.async.client/ Changelog: http://neotyk.github.com/http.async.client/changelog

Persistent collections and garbage collection

2012-02-07 Thread pron
Hi. I have a question: I love Clojure's persistent collections, but don't they generate many long-lived objects (that go to the surving generations) that are hard to garbage-collect? After all, the discarded nodes after "modification" are not necessarily short lived. It seems like they would beh

Clarification on ClojureScript libraries

2012-02-07 Thread Base
Hi All - I am finding that I am confused on the differences of using clojure libraries vs using Clojurescript libraries. For the former, it is easy enough to just add the reference to the project.clj and it automagically appears in the lib. Does the same hold true for Clojurescript libraries? I

Re: Clarification on ClojureScript libraries

2012-02-07 Thread David Nolen
On Tue, Feb 7, 2012 at 11:18 AM, Base wrote: > Hi All - > > I am finding that I am confused on the differences of using clojure > libraries vs using Clojurescript libraries. > > For the former, it is easy enough to just add the reference to the > project.clj and it automagically appears in the li

Re: Clarification on ClojureScript libraries

2012-02-07 Thread Base
Well, that explains why i cant get this stuff working like that!! Thanks David. On Feb 7, 11:22 am, David Nolen wrote: > On Tue, Feb 7, 2012 at 11:18 AM, Base wrote: > > Hi All - > > > I am finding that I am confused on the differences of using clojure > > libraries vs using Clojurescript libra

Re: Clarification on ClojureScript libraries

2012-02-07 Thread Sean Corfield
On Tue, Feb 7, 2012 at 8:18 AM, Base wrote: > For the former, it is easy enough to just add the reference to the > project.clj and it automagically appears in the lib. > > Does the same hold true for Clojurescript libraries?  I cannot seem to > get this to work correctly and end up dropping the fi

Re: newline question

2012-02-07 Thread Mark Engelberg
Thanks. I'm curious: did something change in 1.3 to make Clojure's newline not respect the platform it is running on? I had a similar situation the other day, independent of Emacs, where I wrote out a file which had been "join"ed (clojure.string) with "\n", and the resulting file didn't seem to o

Re: newline question

2012-02-07 Thread David Powell
\n in Java and Clojure is just line feed. The Windows line ending is \r\n. println and similar now use the platform appropriate line ending. This was changed some time ago. Emacs displays ^M if you have a mix of \n and \r\n in the same buffer. -- Dave -- You received this message because you

Destructuring a seq of maps

2012-02-07 Thread Manuel Paccagnella
I've some questions about destructuring a seq of maps, like: 1. Is it possible? 2. If yes, does it have any sense? 3. And if it's possible and is reasonable, how can I do it? For example, let's say that I have a list of maps like this: (def something [{:a 1 :b 2}

Re: Destructuring a seq of maps

2012-02-07 Thread Aaron Cohen
On Tue, Feb 7, 2012 at 3:28 PM, Manuel Paccagnella wrote: > I've some questions about destructuring a seq of maps, like: > > 1. Is it possible? > 2. If yes, does it have any sense? > 3. And if it's possible and is reasonable, how can I do it? > > For example, let's say that I have a list of maps l

Re: Destructuring a seq of maps

2012-02-07 Thread Manuel Paccagnella
On 02/07/2012 09:37 PM, Aaron Cohen wrote: Well, destructuring requires a literal, so you have to know exactly the structure you're wanting to pick apart. For your specific example, I can write a destructuring usage that will work, but there's no way to do it in a general way. user=>(defn do-sum

Re: Destructuring a seq of maps

2012-02-07 Thread Cedric Greevey
On Tue, Feb 7, 2012 at 3:28 PM, Manuel Paccagnella wrote: > And let's say that I want a function that returns the sum of all :a values > of the something seq. I could write the function in this way: > >        (defn do-sum [some-coll] >          (reduce + (map #(:a %) some-coll))) > > Not a big de

Re: Destructuring a seq of maps

2012-02-07 Thread Manuel Paccagnella
On 02/07/2012 09:48 PM, Cedric Greevey wrote: One better way: (defn do-sum [some-coll] (reduce + (map :a some-coll))) Keywords can be used as functions. Sure! That's probably tidy enough not to feel the need to do something else, such as destructuring. Yes, I understa

[ANN] Clojure Hangman

2012-02-07 Thread Jozef Wagner
Hi, I'm going to speak about Clojure at our small university workshop. People will hear about Clojure for the first time, and they do not have a good CS background. I've prepared some introductory slides for the talk and I've also prepared a practical demonstration to show interactive and dynam

Re: Looking for parser generator library

2012-02-07 Thread Roman Gonzalez
I released yesterday zetta-parser (http://github.com/van-clj/zetta-parser) through the van-clj group (http://van-clj.github.com), this library is a port of Haskell's attoparsec. The difference between this and the ones I've seen so far is that zetta allows you to use a parser without having al

Re: Looking for parser generator library

2012-02-07 Thread Cedric Greevey
On Tue, Feb 7, 2012 at 5:46 PM, Roman Gonzalez wrote: > I released yesterday zetta-parser (http://github.com/van-clj/zetta-parser) > through the van-clj group (http://van-clj.github.com), this library is a > port of Haskell's attoparsec. Haskell has a parser library named for a distance of approx

Re: Destructuring a seq of maps

2012-02-07 Thread Asim Jalis
I frequently find myself passing around maps that are basically structs. I use this macro to destructure the fields into let variables. ; Macro. (defmacro def-fields [struct-name & fields] (let [field-symbol-vector (->> fields (map name) (map symbol) vec) arg (gensym) body (gens

Transactional Synchronization in Haswell

2012-02-07 Thread edlich
Hi all, will this RTM have a big language effect on Clojure and other languages? http://software.intel.com/en-us/blogs/2012/02/07/transactional-synchronization-in-haswell/ Best Stefan Edlich -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post t