Re: Intro to Live Programming with Overtone

2011-04-24 Thread rob levy
Wow, that is awesome, I am definitely going to have to play with that. As a side note, what did you write or use to configure your emacs in that way? On Sun, Apr 24, 2011 at 8:01 AM, Sam Aaron samaa...@gmail.com wrote: Hey there, you may have heard about Overtone - the Clojure front-end to

Re: Intro to Live Programming with Overtone

2011-04-24 Thread rob levy
(I mean, the visual effects in particular) On Sun, Apr 24, 2011 at 6:49 PM, rob levy r.p.l...@gmail.com wrote: Wow, that is awesome, I am definitely going to have to play with that. As a side note, what did you write or use to configure your emacs in that way? On Sun, Apr 24, 2011 at 8:01

Re: ANN: Clojure Atlas (preview!)

2011-04-19 Thread rob levy
This seems great. The $20 bothers me, not because I don't want to pay it, I would gladly donate this meager amount for such a useful resource. There's just something in poor taste about not making this open to everyone. And there's an implicit camaraderie and good will that developer

Re: ANN: Clojure Atlas (preview!)

2011-04-19 Thread rob levy
I think there might be something I don't get about the hand-curated aspect. It would be great if it could be crowd sourced, with the kinds of heterarchical guarantees of quality and expertise that have served services like StackOverflow and Wikipedia so well. On Tue, Apr 19, 2011 at 1:26 PM,

Re: ANN: Clojure Atlas (preview!)

2011-04-19 Thread rob levy
Emerick cemer...@snowtide.com wrote: On Apr 19, 2011, at 1:10 PM, rob levy wrote: This seems great. The $20 bothers me, not because I don't want to pay it, I would gladly donate this meager amount for such a useful resource. There's just something in poor taste about not making this open

Re: Clojures macro system is essentially hygienic -- In the good sense.

2011-04-12 Thread rob levy
Clojure's automatic gensym feature in defmacro is similar to the idea suggested in Hoyte's Common Lisp book Let Them Eat Lambda, though I gather it's not historically originated by Hoyte as similar ideas have been implemented by others. One Scheme advocate I know has that suggested that it would

Re: Clojures macro system is essentially hygienic -- In the good sense.

2011-04-12 Thread rob levy
Sometimes it is useful to have a referentially opaque symbol that you can refer to when calling a macro. Clojure's design encourages the idiom of let bindings instead of anaphora to maintain referential transparency, but in some cases it is preferable to capture a symbol and make use of it. If

Re: Where is the javadoc for clojure.lang ?

2011-04-09 Thread rob levy
Also, there is the Clojure in Small Pieces doc that Tim Daly is working on. On Sat, Apr 9, 2011 at 11:00 AM, Stuart Sierra the.stuart.sie...@gmail.comwrote: Unfortunately, there is no JavaDoc for clojure.lang because there are no comments in the source. If you want to understand Clojure's

Re: Jesus, how the heck to do anything?

2011-03-23 Thread rob levy
Emacs is...wellemacs. Sorry, but when I'm trying to learn a language, remembering what spell to cast on the keyboard to get the editor to run my script, was just a little too much to keep track of at one time. You either love emacs or you don't. I used to be surprised that there were

Reader macro suggestions

2011-03-21 Thread rob levy
One useful reader macro would be do the analog of a syntax-quote in an ignored sexp ( #- is the analog of ~ ): #_(ignore (continuing to ignore #-except do not ignore this and ignore this)) Another language feature that I think many wish for to have some way of specifying a string

Re: [ANN]VTD-XML 2.10

2011-03-01 Thread rob levy
FWIW tagsoup is not bad for that. Nekohtml is alright as well. On Tue, Mar 1, 2011 at 8:03 PM, Kasim ktu...@gmail.com wrote: Hi, I was just wondering if I can use it for cleaning up not well formed html files. Thanks -- You received this message because you are subscribed to the Google

Re: ANN: Clojure Libraries

2011-02-28 Thread rob levy
Nice! It would be cool if this could could be integrated with Clojars, to keep the lein artifact group ID up to date without manually editing. On Sun, Feb 27, 2011 at 6:56 PM, Glen Stampoultzis gst...@gmail.com wrote: Hi everyone, I'd like to announce the availability of Clojure Libraries

Re: ANN: Clojure Libraries

2011-02-28 Thread rob levy
It looks like you would have to scrape it right now, as there doesn't appear to be rss for the library pages, but that would be a straightforward thing to add. On Mon, Feb 28, 2011 at 8:31 AM, rob levy r.p.l...@gmail.com wrote: Nice! It would be cool if this could could be integrated

Re: Ordering of defn's?

2011-02-23 Thread rob levy
A related problem occurs when you separate your code into multiple namespaces. You can't create cyclic links with use or require. There's a case to be made for avoiding that situation, but the solution clojure provides when you need it is to import the vars using ns-resolve as in (def myfn

Re: Transforming map entries

2011-02-22 Thread rob levy
The usual intuitive options for this are reduce, zipmap, or into. You can also write a lazily recursive solution. I wonder why there's no function in core that lazily re-constructs the map with the results of the function? It seems to have been discussed on the list at least once or twice. It

Re: Transforming map entries

2011-02-22 Thread rob levy
. On Tue, Feb 22, 2011 at 6:43 PM, Alan a...@malloys.org wrote: On Feb 22, 3:23 pm, rob levy r.p.l...@gmail.com wrote: The usual intuitive options for this are reduce, zipmap, or into. You can also write a lazily recursive solution. I wonder why there's no function in core that lazily re

Re: Transforming map entries

2011-02-22 Thread rob levy
} On Feb 22, 4:23 pm, rob levy r.p.l...@gmail.com wrote: The usual intuitive options for this are reduce, zipmap, or into. You can also write a lazily recursive solution. I wonder why there's no function in core that lazily re-constructs the map with the results of the function? It seems

Re: flattening a tree

2011-02-21 Thread rob levy
One way to approve the problem is to write a function to convert the nested maps into nested seqs. Once it is in that form you can use flatten on it and partition the flat list as you like: (defn flatten-maptree [m] (letfn [(maptree-seqtree [m] (lazy-seq (cond

Re: flattening a tree

2011-02-21 Thread rob levy
That is, had flattening actually been your goal. It seem like you didn't really want to throw out that structure, just transform it, so flattening is irrelevant I guess other than the subject line. :) On Mon, Feb 21, 2011 at 5:34 PM, rob levy r.p.l...@gmail.com wrote: One way to approve

Re: Docstring on def

2011-02-20 Thread rob levy
Have you looked at c.c.def/defvar? http://richhickey.github.com/clojure-contrib/def-api.html On Sun, Feb 20, 2011 at 2:53 PM, Ken Wesson kwess...@gmail.com wrote: On Sun, Feb 20, 2011 at 12:45 PM, Daniel Solano Gomez cloj...@sattvik.com wrote: On Sun Feb 20 17:30 2011, Paul Richards wrote:

Re: Boston Clojure Meetup Thursday Jan 13

2011-02-16 Thread rob levy
No one has planned anything yet, but my sense is that anyone who wants to take initiative to host or help plan a second meeting should get in touch with Eric (who created the meetup.com page and organized the first meeting), so as to coordinate with him and post the details on meetup. Also, there

Re: Boston Clojure Meetup Thursday Jan 13

2011-02-16 Thread rob levy
to a large contingent from Sonian's Clojure team who came from around the world, as well as a big group of Schemers and Haskellers from Northeastern that happened to show up. On Wed, Feb 16, 2011 at 9:16 AM, rob levy r.p.l...@gmail.com wrote: No one has planned anything yet, but my sense is that anyone

Re: The Joy of Closure

2011-01-18 Thread rob levy
This may be a typo, but since I saw it more than once, it could be worth noting (maybe save you some trouble) that clo[jsz]ure is not an equivalence class. Closure with a capital C can either be Google's JS library, or a Common Lisp web browser (and some of its associated component libraries like

Re: ANN: clojurejs -- a Clojure (subset) to Javascript translator

2011-01-18 Thread rob levy
I've just released a stable version of `clojurejs' -- an unimaginatively named Clojure library for translating a Clojure subset language to Javascript. Unimaginative could be a good thing in this case, I was thinking maybe CloJSure, and then someone could invert abstractions and

Re: Clojure and Android update status

2011-01-14 Thread rob levy
There was recently a stack overflow thread on this: http://stackoverflow.com/questions/4651757/clojure-on-android/4675855#4675855 One of the people who replied (Arthur Ulfeldt) says that JIT has helped greatly with performance. So maybe it's time to revisit it. It looks like remvee's example

Re: running just one test

2011-01-12 Thread rob levy
On Wed, Jan 12, 2011 at 1:41 AM, ka sancha...@gmail.com wrote: (detest xyz ...) Freudian slip? ;) -- 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

Re: When to use #'

2011-01-12 Thread rob levy
One common use is for referring to private functions in other namespaces. For example, say you want to write tests for foo.core/p, a privately defined function. It is private in terms of your intent as expressed in your API, but you can still access the var from foo.core-test and call the

Re: Boston meetup Jan 11?

2011-01-06 Thread rob levy
I'm also going to Boston Coding Dojo tonight. The Clojure Meetup is going to be at Akamai, a week from tonight's dojo, which I'm looking forward to: http://groups.google.com/group/clojure/browse_thread/thread/821248c3dd0b69b8 On Thu, Dec 30, 2010 at 9:34 PM, Alyssa Kwan

Re: ANN: Clojure web application using NHPM for server push

2010-12-22 Thread rob levy
...@gmail.com wrote: On Mon, Dec 20, 2010 at 6:06 PM, rob levy r.p.l...@gmail.com wrote: I have posted a repository containing the code for a web application I made using a server push (AKA Comet, long polling) architecture. The front end is in Javascript, and the back end is in Clojure

ANN: Clojure web application using NHPM for server push

2010-12-20 Thread rob levy
I have posted a repository containing the code for a web application I made using a server push (AKA Comet, long polling) architecture. The front end is in Javascript, and the back end is in Clojure. The clojure code is able to send notifications to clients' browsers effectively through use of

Re: Partition At True Values Of Predicate

2010-11-27 Thread rob levy
partition-by does exactly what you need. On Sat, Nov 27, 2010 at 3:04 PM, Benny Tsai benny.t...@gmail.com wrote: Could do it this way. Use index-filter (borrowed from Programming Clojure) to get the indices where the predicate is true in the sequence. partition-when-true then just calls

Re: Partition At True Values Of Predicate

2010-11-27 Thread rob levy
PM, rob levy r.p.l...@gmail.com wrote: partition-by does exactly what you need. Not quite. user= (take 10 (partition-by #(= 0 (rem % 3)) (iterate inc 1))) ((1 2) (3) (4 5) (6) (7 8) (9) (10 11) (12) (13 14) (15)) At first it seems you can fix this as follows: user= (defn

Re: Partition At True Values Of Predicate

2010-11-27 Thread rob levy
) (vector (concat (last %1) (vector %2) [] l)) On Sat, Nov 27, 2010 at 4:18 PM, rob levy r.p.l...@gmail.com wrote: Something like this? (defn partition-when [f l] (reduce #(if (f %2) (conj %1 (vector %2)) (conj (butlast %1

Re: Partition At True Values Of Predicate

2010-11-27 Thread rob levy
This is clearer to read though: (defn partition-when [f l] (reduce #(if (f %2) (conj %1 (vector %2)) (conj (vec (butlast %1)) (conj (vec (last %1)) %2))) [] (vec l))) On Sat, Nov 27, 2010 at 4:47 PM, rob levy r.p.l...@gmail.com wrote

Re: Partition At True Values Of Predicate

2010-11-27 Thread rob levy
fwiw my folding solution above yields the expected result. On Sat, Nov 27, 2010 at 7:07 PM, Benny Tsai benny.t...@gmail.com wrote: Subvec, however, isn't lazy. That's true. I just realized there's another problem with my approach as well: it does not preserve elements before the first true

Re: RegEx

2010-07-30 Thread rob levy
That's not a Clojure question, but if you ask it on StackOverflow you'll get an answer in like 2 seconds. :) From your description it sounds like you want /^[ML]{3}[0-9]{2}$/ but the description of your problem could be interpreted in a few other ways, so that might not be what you want. On

Re: Idea for personal Clojure project

2010-07-29 Thread rob levy
I think that a big part of the problem is that most approaches to word similarity (especially thesaurus-based approaches like Wordnet, but also the significantly better distributional approaches) use very impoverished representations of knowledge. As such, they are unable to make useful

Re: Idea for personal Clojure project

2010-07-29 Thread rob levy
I think that a big part of the problem is that most approaches to word similarity (especially thesaurus-based approaches like Wordnet, but also the significantly better distributional approaches) use very impoverished representations of knowledge. As such, they are unable to make useful

Re: terracotta?

2010-07-11 Thread rob levy
I've been following this too, and have not heard anything in a while. I know that Luc Prefontaine was trying to get terracotta to work with Clojure as well. I have not heard any news recently. A potentially more straightforward solution for distributed processing right now is swarmiji. With

Re: terracotta?

2010-07-11 Thread rob levy
as a distributed computing solution. On Jul 11, 9:02 pm, rob levy r.p.l...@gmail.com wrote: I've been following this too, and have not heard anything in a while. I know that Luc Prefontaine was trying to get terracotta to work with Clojure as well. I have not heard any news recently

Re: Dynamic gen-class

2010-06-27 Thread rob levy
HI Michael, If I understand correctly, the proxy function might be what you are looking for. I think gen-class can only be used with AOT compilation. -Rob On Sun, Jun 27, 2010 at 8:19 AM, Michael Jaaka michael.ja...@googlemail.com wrote: Hi, Is there any way to generate class in runtime

Re: the joys of lisp

2010-06-27 Thread rob levy
Certainly macros can be dangerous if used recklessly or clumsily, but isn't trusting the programmer and giving him powerful tools what Lisp is all about? No other language provides the same power of expression. A tour through the Clojure code demonstrates just how powerful this idea is and

Re: Clojure / Common Lisp Question

2010-06-26 Thread rob levy
You can use Perl's map/grep pretty much anywhere, though they're not as nice to use because the language is a mess (albeit more functional than Python). I, too, have found myself using fewer and fewer explicit loops as time goes on, starting with a revelation about the versatility of map while

Re: Clojure / Common Lisp Question

2010-06-25 Thread rob levy
Rich Hickey's insightful videos have caused me to stop writing loops whenever possible. For me this is the same level of thinking-change that happened when I moved to using Structured Programming rather than GOTO (in Fortran). Rich needs to write a paper called Loops considered harmful

Re: Clojure / Common Lisp Question

2010-06-25 Thread rob levy
It can (but its startup is slow, currently). May I ask you why you wouldn't want to use it? One reason is that from what little I know about ABCL it seems more straightforward working with Java libraries in Clojure, but also there is a huge amount of enthusiasm and energy going into Clojure,

Re: cond formatting

2010-06-22 Thread rob levy
user= (ns utils) utils= (ns-unmap 'utils 'cond) utils= (defmacro cond [ body] `(clojure.core/cond ~@(apply concat body))) #'utils/cond utils= (macroexpand-1 '(cond (false false) (true true))) (clojure.core/cond false false true true) utils= (cond (false false) (true

Clojure / Common Lisp Question

2010-06-18 Thread rob levy
As an informal survey of people who use both Clojure and Common Lisp for different projects, what do you see as the main determining factors behind your choice to use either Clojure or Common Lisp for a project, given the present state of Clojure. Let's only assume we are talking about projects

Re: Keyboard Input in Applets

2010-06-18 Thread rob levy
state. Like so: (defn -paint [#^JApplet this #^Graphics g] (draw-images this g)) Rob On Mon, Jun 14, 2010 at 3:52 AM, Meikel Brandmeyer m...@kotka.de wrote: Hi, On Jun 14, 8:55 am, rob levy r.p.l...@gmail.com wrote: (ns ... ... (:gen-class :extends javax.swing.JApplet

Re: Keyboard Input in Applets

2010-06-14 Thread rob levy
for some people). Rob On Mon, Jun 14, 2010 at 3:52 AM, Meikel Brandmeyer m...@kotka.de wrote: Hi, On Jun 14, 8:55 am, rob levy r.p.l...@gmail.com wrote: (ns ... ... (:gen-class :extends javax.swing.JApplet ??? :implements java.awt.event.KeyListener)) :implements

Re: Which GUI toolkit would you like to see wrapped in an idiomatic Clojure library?

2010-05-30 Thread rob levy
This is a great idea, and is something that Clojure really needs in my opinion (for starters it would be nice to be able to write GUI apps in Clojure without worrying about the Java level, with its completely different and completely annoying semantics). My vote is for Swing, simply because the

Re: Clojure on Android

2010-05-20 Thread rob levy
Hi David, Check-out http://github.com/remvee/clojurehelloandroid I'm surprised we don't hear more talk of people doing this. It's on my list of things to do too (I just got an mp3 player that runs Android 1.6 and I'm going to start with Remvee's Hello World example). Rob On Thu, May 20, 2010

Re: Clojure on Android

2010-05-20 Thread rob levy
Also see the tutorial: http://riddell.us/ClojureAndAndroidWithEmacsOnUbuntu.html On Thu, May 20, 2010 at 3:21 PM, rob levy r.p.l...@gmail.com wrote: Hi David, Check-out http://github.com/remvee/clojurehelloandroid I'm surprised we don't hear more talk of people doing this. It's on my list

compiling a GUI app and also: interference of Java's built-in architechture

2009-02-16 Thread rob levy
Hi, I know that all Java GUI libraries can be used within the REPL, but it is my understanding that in order to make it self-contained and executable (a jar or a class file), it is necessary to write some Java and call the Clojure code from the java applet or application. Is this true, or am I