Fwd: [ldnclj] Hackday on Sunday

2012-02-16 Thread Ben Evans
Fwding to Incanter and Clojure mailing lists. This hackday is in London, this Sunday the 19th of Feb. Unfortunately, I can't attend, but I know it will be awesome! Thanks, Ben -- Forwarded message -- From: Martin Seebach m...@martinseebach.dk Date: Wed, Feb 15, 2012 at 12:19

Re: Released: nREPL 0.2.0-beta1

2012-02-16 Thread Stathis Sideris
Apart from going a bit cross-eyed from seeing clojure-as-java code from the first time, I get it :-) Thanks Chas, I'll give it a try and let you know how it goes. Stathis On Feb 15, 3:31 pm, Chas Emerick c...@cemerick.com wrote: You can absolutely run an nREPL server from a mostly-Java

Re: Lack in the documentation

2012-02-16 Thread Linus Ericsson
Regarding don't want to learn Java. I understand fully, but can I suggest downloading a major java-IDE and make some small and simple java-katas in it? I would suggest IntelliJ IDEAs Community Edition (there are other, ofc) and then going through some examples from the surprisingly well written

Clojure online university

2012-02-16 Thread Peter Hanak
Hello fellow Clojurians, yesterday I was watching Neal Ford's brilliant world domination video and it got me again thinking about idea I've got for some time. With the advent of online learning initiatives like Stanford, MITx, and many others I think it would be great to create Clojure course.

Re: Cannot access variables without namespace in ClojureScript repl.

2012-02-16 Thread Krukow
On Jan 15, 3:32 pm, Brenton bashw...@gmail.com wrote: We found a couple of problems with theClojureScriptREPL while working onOneand will address them soon. If you confirm that this is the problem, please let us know. Also, feel free to add an issue to JIRA with the steps to reproduce. [snip]

mini mud-client for within emacs-swank

2012-02-16 Thread bOR_
Started playing with getting an within emacs clojure-based mud client, but puzzling a bit with parsing the incoming stream. The below works (for emacs+swank-clojure 1.4.0), but puts a space between every character. When I try to solve that (for example by swapping (print ... with (print (apply

Re: add-watch in clojurescript: awesome, or not awesome?

2012-02-16 Thread David Nolen
Sounds like you should build a simple abstraction layer over atoms instead of trying to use them directly? Or provide a new data binding / propagation protocol that avoids the limitation of atoms? For data binding you most definitely always want to receive the old value in my experience. On

Re: A Bug of map function?

2012-02-16 Thread Eric Fong
That's the point. Empty lazy sequence doesn't work, but not empty lazy sequence works. On 2月15日, 上午9时44分, Armando Blancas abm221...@gmail.com wrote: eval doesn't mind lazy seqs as input: user= (map identity ['quote ()]) (quote ()) user= (class (map identity ['quote ()]))

AOT Error

2012-02-16 Thread Eric Fong
1. create a new leinigen project: lein new foo 2. modify foo.core.clj as follow: (ns foo.core) (defn format [] 1) 3. modify project.clj, add foo.core to aot: (defproject foo 1.0.0-SNAPSHOT :description FIXME: write description :dependencies [[org.clojure/clojure 1.3.0]] :aot

Re: A Bug of map function?

2012-02-16 Thread Yixun Fang
http://groups.google.com/group/clojure/browse_thread/thread/ef16bb620d3e86d7/2e8e38067325c973#2e8e38067325c973 On Mon, Feb 13, 2012 at 17:02, Eric Fong fangyi...@gmail.com wrote: = (eval `'~(map identity [1 2 3])) (1 2 3) = (eval `'~(map identity ())) CompilerException

Re: ClojureScript def, vars, and binding

2012-02-16 Thread Brandon Bloom
I've updated my fork with IWatchable and validation implemented on Var: https://github.com/brandonbloom/clojurescript/compare/8ba4849e60e5957cdac36ef6946c647e824ca3c8...vars @dnolen I assume I need to wait for my CA to be delivered/approved before I can update that Wiki page? I'd like to add

Re: Lack in the documentation

2012-02-16 Thread Tim Cross
Hi All, very new to clojure, so thought my experience may be relevant. Initially, the java aspect is a bit daunting. However, I don't believe you need to know java in order to take advantage of all the java interop features of clojure. All that you really need is to understand how to read

Exception in thread main java.lang.ArrayIndexOutOfBoundsException: 3 (test-xml.clj:6)

2012-02-16 Thread Levi Campbell
I'm trying to I'm trying to create a solution for bug a href=https:// github.com/weavejester/lein-ring/issues/21#21/a in a href=https://github.com/weavejester/lein-ring;lein-ring/a, but before I start mucking about in weavejester's code, I want to get clojure.xml/emit to print out a modified

Re: Looking for parser generator library

2012-02-16 Thread DAemon
atto is 10^-18, and a parsec is 3.1×10^13 km, which is 3.1×10^16m, which is 3.1×10^18cm, so Cedric was right, from what I can see... Turns out I misread a 3 as a 5... lol *facepalm* On Thu, Feb 16, 2012 at 1:04 PM, Alan Malloy a...@malloys.org wrote: Roman Gonzalez: this library is a port of

Re: Looking for parser generator library

2012-02-16 Thread DAemon
Not massively - I get about 3.1 metres. 10^-18x10^15x10^3x3.1m... On Thu, Feb 16, 2012 at 12:47 PM, Despite desp...@gmail.com wrote: Haskell has a parser library named for a distance of approximately three centimetres? :) Not that it's pertinent, but a parsec is 31 trillion kilometers.

Re: ClojureScript def, vars, and binding

2012-02-16 Thread Brandon Bloom
Given the single-threaded nature of JavaScript I don't see how future-call or agents could be implemented. There are analogous constructs in a single-threaded, async-callback world. In particular, many Javascript libraries have a concept of promises and futures for managing the async callback

Re: AOT Error

2012-02-16 Thread Tassilo Horn
Eric Fong fangyi...@gmail.com writes: 1. create a new leinigen project: lein new foo 2. modify foo.core.clj as follow: (ns foo.core) (defn format [] 1) Exclude clojure.core/format then: (ns foo.core (:refer-clojure :exclude [format])) Bye, Tassilo -- You received this

Re: Problem with the Chas Emerick: Modeling the world ... video

2012-02-16 Thread Sergey Didenko
The same here. -- 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, send

Re: ClojureScript def, vars, and binding

2012-02-16 Thread David Nolen
On Wednesday, February 15, 2012, Brandon Bloom snprbo...@gmail.com wrote:. There are analogous constructs in a single-threaded, async-callback world. In particular, many Javascript libraries have a concept of promises and futures for managing the async callback speghetti. Like I said, that part

Re: Lack in the documentation

2012-02-16 Thread Timothy Baldridge
Initially, the java aspect is a bit daunting. However, I don't believe you need to know java in order to take advantage of all the java interop features of clojure. So as a background, before I give my two cents. I'm a C# developer by trade, and feel very comfortable with .NET. I also have

How to be lazy…

2012-02-16 Thread Wolodja Wentland
Hi all, I am trying to implement a function that splits any given sequence on a subsequence. I would like it to behave like this: user (split-at-subsequence [5 6] (range 10)) ((0 1 2 3 4) (7 8 9)) user (split-at-subsequence [5 7] (range 10)) ((0 1 2 3 4 5 6 7 8 9)) user

Re: How to be lazy…

2012-02-16 Thread Michael Gardner
partition-by is lazy in that it only splits its argument into as many subseqs as requested; the subseqs themselves are not lazy. So when you partition-by the result of (replace-subseq-with-sentinel [1 2] sentinel (range)) and then request the infinite third subseq thereof, partition-by won't

Re: Lack in the documentation

2012-02-16 Thread Gregg Williams
I think the big problem, is that Clojure makes a big deal about being Simple. That is, avoiding unneeded complexity, but then throws its users into the sea of complexity that is Java. If I want to write arbitrary binary data to a file, I really don't want to take the time to learn what a

Re: How to be lazy…

2012-02-16 Thread Wolodja Wentland
On Thu, Feb 16, 2012 at 10:51 -0600, Michael Gardner wrote: partition-by is lazy in that it only splits its argument into as many subseqs as requested; the subseqs themselves are not lazy. So when you partition-by the result of (replace-subseq-with-sentinel [1 2] sentinel (range)) and then

Re: Lack in the documentation

2012-02-16 Thread David Nolen
On Thu, Feb 16, 2012 at 12:04 PM, Gregg Williams greg...@innerpaths.netwrote: Would it kill somebody to write a library of simple functions that would answer most beginners' simple needs, then have it blessed as canonical? I'd write it myself, but I still don't know enough! If every beginner

Re: Lack in the documentation

2012-02-16 Thread Phil Hagelberg
Armando Blancas abm221...@gmail.com writes: Can you provide some more specific examples of what's missing? Surely you're joking, Mr. Hagelberg. I was asking because when I was starting, I found I had trouble specifically with Java's IO classes. This article was written after I had already

Re: Lack in the documentation

2012-02-16 Thread Chas Emerick
On Feb 16, 2012, at 12:16 PM, David Nolen wrote: On Thu, Feb 16, 2012 at 12:04 PM, Gregg Williams greg...@innerpaths.net wrote: Would it kill somebody to write a library of simple functions that would answer most beginners' simple needs, then have it blessed as canonical? I'd write it

Re: Looking for parser generator library

2012-02-16 Thread Alan Malloy
https://www.google.com/search?q=attoparsec+in+centimeters is where I got a citation to back the 3.1 centimeter number (though, curiously, I asked for km instead of cm the first time). On Feb 15, 5:51 pm, DAemon forsakendae...@gmail.com wrote: Not massively - I get about 3.1 metres.

Re: How to be lazy…

2012-02-16 Thread Michael Gardner
On Feb 16, 2012, at 11:08 AM, Wolodja Wentland wrote: Thanks for the explanation. What would be a good way to ensure that the subseqeuence are lazy too? I can't think of a good way to do this with higher-order functions, so you'll probably have to write a recursive function that manually

Re: add-watch in clojurescript: awesome, or not awesome?

2012-02-16 Thread kovas boguta
I'm arguing that IMHO, the atom+watcher abstraction is not rich enough to build upon. Atoms have the watcher list natively built into their datastructure. But the watcher abstraction is too simple to do anything beyond syntactic sugar. If you want to roll your own, you need to maintain your own

Re: add-watch in clojurescript: awesome, or not awesome?

2012-02-16 Thread David Nolen
On Thu, Feb 16, 2012 at 4:39 PM, kovas boguta kovas.bog...@gmail.comwrote: I'm arguing that IMHO, the atom+watcher abstraction is not rich enough to build upon. I'm not disagreeing :) If you want to roll your own, you need to maintain your own notification system and bypass the existing

Re: Clojure online university

2012-02-16 Thread Sean Corfield
On Thu, Feb 16, 2012 at 1:57 AM, Peter Hanak ptr6...@gmail.com wrote: If someone in the community is thinking about something like this, and needs any help please let me know. Something like this, from the author of Clojure in Action, Amit Rathore:

Problem with amap over byte arrays

2012-02-16 Thread Andreas Kostler
Hi all, I'm experiencing the following problem: (def an-array (byte-array 200 (byte 1))) (amap ^bytes an-array idx ret (bit-xor (byte 0) (aget ^bytes an-array idx))) Resulting in: No matching method found: aset Wheras this: (def another-array (int-array 200 (int 1))) (amap

Re: Problem with amap over byte arrays

2012-02-16 Thread dennis zhuang
Because bit-xor returns a integer,so you have to cast it to byte: (amap ^bytes an-array idx ret (byte (bit-xor (byte 0) (aget ^bytes an-array idx 2012/2/17 Andreas Kostler andreas.koestler.le...@gmail.com Hi all, I'm experiencing the following problem: (def an-array

Re: Problem with amap over byte arrays

2012-02-16 Thread Andreas Kostler
How stupid of me. Cheers On 17 February 2012 12:12, dennis zhuang killme2...@gmail.com wrote: Because bit-xor returns a integer,so you have to cast it to byte: (amap ^bytes an-array idx ret (byte (bit-xor (byte 0) (aget ^bytes an-array idx 2012/2/17 Andreas Kostler

Re: Lack in the documentation

2012-02-16 Thread Gregg Williams
It's tiresome to hear people complain about something they do not contribute anything towards. Thank you for your extremely helpful critique. By the way, please go to http://www.GettingClojure.com, a web site that I started and contributed to, which nobody (except Sean Cornfeld) expressed any

Re: Lack in the documentation

2012-02-16 Thread David Nolen
Nothing I said was meant to dismiss any particular contribution(s) of any kind made by anyone. If this was not clear, apologies. On Thursday, February 16, 2012, Gregg Williams greg...@innerpaths.net wrote: It's tiresome to hear people complain about something they do not contribute anything

Re: ClojureScript def, vars, and binding

2012-02-16 Thread Laurent PETIT
2012/2/16 David Nolen dnolen.li...@gmail.com On Wednesday, February 15, 2012, Brandon Bloom snprbo...@gmail.com wrote:. There are analogous constructs in a single-threaded, async-callback world. In particular, many Javascript libraries have a concept of promises and futures for managing

Clojure/West - last day for regular registration rates

2012-02-16 Thread Alex Miller
Friday Feb. 17th is the last day for regular registration rates at Clojure/West! - http://clojurewest.org/schedule - http://regonline.com/clojurewest2012 Monday Feb. 20th is the last day for the hotel block rate of $119/ night - https://resweb.passkey.com/go/clojurewest We've had a late addition

Re: ClojureScript def, vars, and binding

2012-02-16 Thread Cedric Greevey
On Fri, Feb 17, 2012 at 1:28 AM, Laurent PETIT laurent.pe...@gmail.com wrote: Forgive me if I'm wrong, but global vars / dynamic variables have essentially more to do with scoping than multithreading, e.g. they existed in lisps and other languages way before thread support was added to them.

Re: ClojureScript def, vars, and binding

2012-02-16 Thread David Nolen
On Fri, Feb 17, 2012 at 1:28 AM, Laurent PETIT laurent.pe...@gmail.comwrote: Forgive me if I'm wrong, but global vars / dynamic variables have essentially more to do with scoping than multithreading, e.g. they existed in lisps and other languages way before thread support was added to them.

Re: ClojureScript def, vars, and binding

2012-02-16 Thread Laurent PETIT
Envoyé de mon iPhone Le 17 févr. 2012 à 08:24, David Nolen dnolen.li...@gmail.com a écrit : On Fri, Feb 17, 2012 at 1:28 AM, Laurent PETIT laurent.pe...@gmail.comwrote: Forgive me if I'm wrong, but global vars / dynamic variables have essentially more to do with scoping than multithreading,