Re: Proposal: New Reader Macro #s{ ... }

2009-10-13 Thread B Smith-Mannschott
On Mon, Oct 12, 2009 at 01:31, James Reeves wrote: > > What if you need to use braces? It seems to me that any syntax for > representing long strings needs a terminator that is unlikely to occur > within the string itself. For example, Python uses """, and XML CDATA > uses ]]>, both of which are

Re: Proposal: New Reader Macro #s{ ... }

2009-10-13 Thread Laurent PETIT
2009/10/13 B Smith-Mannschott > > On Mon, Oct 12, 2009 at 01:31, James Reeves > wrote: > > > > What if you need to use braces? It seems to me that any syntax for > > representing long strings needs a terminator that is unlikely to occur > > within the string itself. For example, Python uses """,

Re: ClojureCLR limitations

2009-10-13 Thread Dmitry Kakurin
Thank you very much for such a quick fix! My code works without modifications now. Well, almost. I had to emulate parts of Contrib/math. Which brings me to the next question: what portion of contirb works under ClojureCLR? - Dmitry On Oct 11, 4:47 pm, David Miller wrote: > Latest commit adds s

Problem with .NET interop

2009-10-13 Thread Dmitry Kakurin
What's wrong with my definition of sqrt? user=> (defn sqrt [x] (. System.Math Sqrt x)) #'user/sqrt user=> (sqrt 4) System.InvalidCastException: Specified cast is not valid. at lambda_method(Closure , Object ) at AFunction_impl.invoke(Object ) at lambda_method(Closure ) at AFunction_im

Clojure Applets: Tutorial

2009-10-13 Thread andi.xeno...@googlemail.com
Hi, since I found only questions about applets written in Clojure but not really answers, I decided to write a small tutorial in the Clojure wiki: http://en.wikibooks.org/wiki/Clojure_Programming/Examples/Creating_an_Applet Applet demo: http://www.xenoage.com/extern/clojurebook/applet/cljapp.htm

Re: Agents for managing threads

2009-10-13 Thread Robert Stehwien
John, Excellent "library" I'm pulling this into my utilities functions ... with proper attribution of course and as long as you don't mind. It is just too useful to me to not keep around. --Robert On Sat, Oct 10, 2009 at 1:54 AM, John Harrop wrote: > Here is a quickie "library" for abstracti

Re: Clojure Applets: Tutorial

2009-10-13 Thread Jon
Hi, On Oct 13, 11:15 am, "andi.xeno...@googlemail.com" wrote: > Hi, > > since I found only questions about applets written in Clojure but not > really answers, I decided to write a small tutorial in the Clojure > wiki:http://en.wikibooks.org/wiki/Clojure_Programming/Examples/Creating_an... > App

Re: api html page not working in firefox?

2009-10-13 Thread gun43
In my Firefox on Win XP it's chopped off after (resultset-seq rs) but not in IE or Safari. On Oct 12, 8:56 pm, Manuel Woelker wrote: > On Sun, Oct 11, 2009 at 11:29 PM, Raoul Duke wrote: > > > it seems to get chopped off part way down the page for me, of late. > > (it doesn't get chopped off in

Re: Clojure Applets: Tutorial

2009-10-13 Thread andi.xeno...@googlemail.com
I could test only on Windows, Linux and Solaris (no problems on these systems). Unfortunately, I have no Mac where I could test it. Perhaps a Mac user can identify the problem? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Googl

Re: Clojure Applets: Tutorial

2009-10-13 Thread DavidF
It does work in Mac OS X 10.6.1 with Safari 4.0.3. I see a bordered yellow box with "Hello World!" I'll try it later when I'm near a 10.5 box and see if I can figure out the problem. On Oct 13, 8:35 am, "andi.xeno...@googlemail.com" wrote: > I could test only on Windows, Linux and Solaris (no

Re: Agents for managing threads

2009-10-13 Thread John Harrop
On Tue, Oct 13, 2009 at 7:24 AM, Robert Stehwien wrote: > John, > > Excellent "library" I'm pulling this into my utilities functions ... with > proper attribution of course and as long as you don't mind. It is just too > useful to me to not keep around. Thanks. Consider any code I post here to

Re: Hiring full-time work-at-home clojure/emacs dev

2009-10-13 Thread safsafhwef90hwe09fhewq09hf09weqhgf09qwejhf90
If you have to work Remote, why limit yourself to us only? There are developers outside the states you know... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to cloj

Re: Clojure Applets: Tutorial

2009-10-13 Thread andi.xeno...@googlemail.com
Perhaps Java 5 was running. I forgot to compile also for Java 5 (now updated in tutorial and in demo).Could you please try again? So far I know from two MacOS X 10.6 where it works and two 10.5 where it fails. --~--~-~--~~~---~--~~ You received this message because

Re: Clojure Applets: Tutorial

2009-10-13 Thread pmf
In your article, you mention the problematic size of 1.4MB of clojure.jar. You might want to try clojure-slim.jar, which gets built alongside clojure.jar, and is about 500KB. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Gr

Re: Problem with .NET interop

2009-10-13 Thread David Miller
The problem is not in your code. The problem is in the ClojureCLR compiler's reliance on how the DLR handles calls to methods in these circumstances. In ClojureCLR, at present: (defn sqrt [x] (Math/Sqrt x)) (sqrt 4.0) # -> 2.0 (sqrt 4) # fails (Math/Sqrt 4.0) # -> 2.0 (Math/Sqrt 4) # -> 2

Re: ClojureCLR limitations

2009-10-13 Thread David Miller
< what portion of contirb [sic] works under ClojureCLR? Close to none, I'm guessing. The problem is that you have to do some translations. Most of the translations are trivial and come in two varieties: (a) Change a call to a JVM library method to an equivalent call to a CLR library method

Re: Dealing with StringTemplate template paths

2009-10-13 Thread Stuart Sierra
On Oct 12, 8:40 am, Stuart Halloway wrote: > We are using StringTemplate's ability to search the classpath. Yep, that's how I do it. -SS --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to thi

Re: Duplicated keys in maps

2009-10-13 Thread Stuart Sierra
On Oct 11, 11:17 pm, John Harrop wrote: > > I just discovered that maps support duplicated keys: > I suspect it's a bug. It's been discussed on IRC and declared not a bug. It's officially "undefined" what happens when you write a literal map with duplicate keys. As soon as you assoc/dissoc any

Re: Hiring full-time work-at-home clojure/emacs dev

2009-10-13 Thread B Smith-Mannschott
On Tue, Oct 13, 2009 at 08:36, safsafhwef90hwe09fhewq09hf09weqhgf09qwejhf90 wrote: > > If you have to work Remote, why limit yourself to us only? There are > developers outside the states you know... Yes, but if you're pair programming (which they are), it sure helps to if all involved are awake

Re: The Enclojure REPL System (It's not just for Netbeans!)

2009-10-13 Thread Thorsen Eric
On Oct 9, 2009, at 5:30 PM, Laurent PETIT wrote: > Hi Eric, > > 2009/10/9 Eric Thorsen > > Laurent, > In the code analysis section of the article: > http://www.enclojure.org/The+Enclojure+REPLs+%28Not+just+for+Netbeans%21%29#ExampleCodeAnalysis > It points you to where the bulk of the communicat

Re: Duplicated keys in maps

2009-10-13 Thread John Harrop
On Tue, Oct 13, 2009 at 12:35 PM, Stuart Sierra wrote: > On Oct 11, 11:17 pm, John Harrop wrote: > > > I just discovered that maps support duplicated keys: > > I suspect it's a bug. > > It's been discussed on IRC and declared not a bug. It's officially > "undefined" what happens when you write

Re: Hiring full-time work-at-home clojure/emacs dev

2009-10-13 Thread Robert Stehwien
On Tue, Oct 13, 2009 at 10:38 AM, B Smith-Mannschott wrote: > > On Tue, Oct 13, 2009 at 08:36, > safsafhwef90hwe09fhewq09hf09weqhgf09qwejhf90 > wrote: > > > > If you have to work Remote, why limit yourself to us only? There are > > developers outside the states you know... > > Yes, but if you're

Re: Clojure persistent immutable priority queue and jobs.

2009-10-13 Thread Robert Stehwien
John, I'm going to grab this one too :) You make some great stuff! On Sun, Oct 11, 2009 at 2:35 AM, John Harrop wrote: > I've implemented a Clojure persistent, immutable priority queue data > structure (built on a heap, in turn built on a Clojure vector). The > namespace below exports the heap

Re: Hiring full-time work-at-home clojure/emacs dev

2009-10-13 Thread Wojciech Kaczmarek
On Tue, Oct 13, 2009 at 18:58, Robert Stehwien wrote: > >> > >> > If you have to work Remote, why limit yourself to us only? There are >> > developers outside the states you know... >> >> Yes, but if you're pair programming (which they are), it sure helps to >> if all involved are awake at the sa

Re: Proposal: New Reader Macro #s{ ... }

2009-10-13 Thread Greg
> (0) I'm not feeling the itch for verbatim strings, seeing as clojure > already does multi-line literals (with escaping) and has special > syntax for regex patterns. That's unfortunate, as I think it would be an important addition to the language. I didn't know Clojure's #"" doesn't require ex

Re: Hiring full-time work-at-home clojure/emacs dev

2009-10-13 Thread Phil Hagelberg
Robert Stehwien writes: > How well does remote pair programming work?  I telecommute 100% so I'm > curious.  Must be working for you guys, I just haven't tried Rudel.  Since I > almost live in emacs I should give it a try sometime... I work with Tim and wrote up a blog post summarizing our expe

clj-gradle – a Clojure Plugin for Gradle

2009-10-13 Thread Meikel Brandmeyer
Hi, I'd like to announce the first release of a Clojure plugin for Gradle. It features integration in the Gradle build and configuration system and automatic namespace discovery for compilation. It is targeted for Gradle 0.8. An example of use is included in the README. http://bitbucket.o

Re: clj-gradle – a Clojure Plugin for Gradle

2009-10-13 Thread Meikel Brandmeyer
Hi again, Am 13.10.2009 um 21:16 schrieb Meikel Brandmeyer: To build the plugin set the GRADLE_HOME environment variable to the directory, where you installed Gradle. Put the clojure.jar in the lib subdirectory and adjust the version information in the build.gradle file. The file should be

Re: clj-gradle – a Clojure Plugin for Gradle

2009-10-13 Thread Laurent PETIT
Hello, is the "automatic namespace discovery for compilation" something that could be shared ? How "smart" is it right now ? Cheers, -- Laurent 2009/10/13 Meikel Brandmeyer > Hi, > > I'd like to announce the first release of a Clojure plugin for Gradle. It > features integration in the Gradl

Re: clj-gradle – a Clojure Plugin for Gradle

2009-10-13 Thread Meikel Brandmeyer
Hi, Am 13.10.2009 um 21:34 schrieb Laurent PETIT: is the "automatic namespace discovery for compilation" something that could be shared ? How "smart" is it right now ? Very similar to c.c.find-namespaces. Gradle hands over a list of source files. This list is traversed. The first form is

Re: clj-gradle – a Clojure Plugin for Gradle

2009-10-13 Thread Laurent PETIT
Ok, thanks for the insight, cu, -- laurent 2009/10/13 Meikel Brandmeyer > Hi, > > Am 13.10.2009 um 21:34 schrieb Laurent PETIT: > > is the "automatic namespace discovery for compilation" something that >> could be shared ? >> How "smart" is it right now ? >> > > Very similar to c.c.find-name

Re: Clojure Applets: Tutorial

2009-10-13 Thread Andreas Wenger
> You might want to try clojure-slim.jar, which gets built > alongside clojure.jar, and is about 500KB. Good idea, thanks. I'll add it. Another idea: Since the applet itself needs not to be signed, it would be great if there is an "official" precompiled clojure.jar which is certified from a ce

crash observed compiling when ns declaration spans more than one line

2009-10-13 Thread B Smith-Mannschott
I am attempting to use clojure-maven-plugin 1.0 and discovered that I can crash the compile by inserting a newline in the ns declaration between "ns" and the symbol naming the namespace: (ns somenamespace) This produces the following stack trace: Compiling to /home/smithma/w/minima

Re: clj-gradle – a Clojure Plugin for Gradle

2009-10-13 Thread Wilson MacGyver
Thank you SO much for writing this. We use gradle for our groovy stuff. Now we can intergrate clojure into the build process. On Oct 13, 2009, at 3:16 PM, Meikel Brandmeyer wrote: > Hi, > > I'd like to announce the first release of a Clojure plugin for > Gradle. It features integration in t

Re: Hiring full-time work-at-home clojure/emacs dev

2009-10-13 Thread Rick Moynihan
Apologies for the non clojure related post! 2009/10/13 Phil Hagelberg : > > Robert Stehwien writes: > >> How well does remote pair programming work?  I telecommute 100% so I'm >> curious.  Must be working for you guys, I just haven't tried Rudel.  Since I >> almost live in emacs I should give it

ANN: clojure-maven-plugin 1.1 released!

2009-10-13 Thread Mark Derricutt
'lo all, I'm glad to announce that the clojure-maven-plugin 1.1 has now been released and available from maven central. Many thanks to Stuart Sierra, Scott Fleckenstein, and Jukka Zitting for various patches and contributions bringing to the new release: - clojure:repl goal - run the clojure r

Re: api html page not working in firefox?

2009-10-13 Thread ehanneken
I see the list of functions chopped off prematurely in Firefox 3.5.3 on Windows. Where the list ends depends on the size of the window. However, the same version of Firefox on OS X, and other browsers on both operating systems, show the entire list. I investigated the page using Firebug, and it

Re: ANN: clojure-maven-plugin 1.1 released!

2009-10-13 Thread Mark Derricutt
One additional thing to note - jline support is also enabled with the repl if you have jline listed as a dependency in your project. And the URL for the project: http://github.com/talios/clojure-maven-plugin Mark -- Pull me down under... On Wed, Oct 14, 2009 at 12:31 PM, Mark Derricutt wro

.vimrc settings for editing Clojure code with VIM

2009-10-13 Thread MarkSwanson
0. Perhaps it should go without saying: start with vimclojure and the vim settings it recommends. 1. syntax sync minlines=200 This made a big difference for me. Without it I would always see brackets marked as 'not paired' or code as a big red text string because the syntax parser wouldn't l

clojure-mode patch for docstrings

2009-10-13 Thread Jeff Valk
Hi Emacs/clojure-mode users, Below is a small patch to enable docstring highlighting. Currently docstrings default to 'font-lock-string-face' rather than using 'font-lock-doc-face'. Also, if there's a way of contributing patches to clojure-mode that's preferred to posting here, please let me kn

Re: .vimrc settings for editing Clojure code with VIM

2009-10-13 Thread MarkSwanson
Edit: After using this it seems it didn't stick (or is not always used?). More searching revealed that putting this in your ~/.vimrc will work: (and it seems to work for me - and I don't notice rendering slow down at all) autocmd BufEnter * :syntax sync fromstart Found from here: http://vim.wiki

Re: .vimrc settings for editing Clojure code with VIM

2009-10-13 Thread Meikel Brandmeyer
Hi, On Oct 14, 7:29 am, MarkSwanson wrote: > Edit: After using this it seems it didn't stick (or is not always > used?). More searching revealed that putting this in your ~/.vimrc > will work: > (and it seems to work for me - and I don't notice rendering slow down > at all) > > autocmd BufEnter

Re: clj-gradle – a Clojure Plugin for Gradle

2009-10-13 Thread Meikel Brandmeyer
Hi, On Oct 14, 12:32 am, Wilson MacGyver wrote: > Thank you SO much for writing this. We use gradle for our groovy   > stuff. Now we can intergrate clojure into the build process. Good to hear, you find it useful. But be aware that this plugin is not really tested. I don't really have a clue

Re: Problem with .NET interop

2009-10-13 Thread David Miller
Fixed in latest commit. (commit 7dd9fcb, which is taking quite some time to appear on github, so make sure you see this one in the commit history) -David On Oct 13, 2:22 am, Dmitry Kakurin wrote: > What's wrong with my definition of sqrt? > > user=> (defn sqrt [x] (. System.Math Sqrt x)) > #'

Finding elements in 2 sequences that match (indexwise)

2009-10-13 Thread Mark Tomko
This is basically a problem of parallel iteration. I've devised 2 solutions, one is recursive (alas, not tail-recursive) and the other appears to be a more idiomatic Clojure solution. Can someone suggest a more efficient or cleaner solution? Here's the "literal" solution: (defn matching-elemen

Re: Finding elements in 2 sequences that match (indexwise)

2009-10-13 Thread Meikel Brandmeyer
Hi, On Oct 14, 8:06 am, Mark Tomko wrote: > (defn matching-elements2 [coll1 coll2] >   (map first (filter #(let [[e1 e2] %] (= e1 e2)) (partition 2 > (interleave coll1 coll2) > > Can anyone suggest an improved implementation of either > implementation? I'm not sure it is improved, but it s

Re: Clojure Applets: Tutorial

2009-10-13 Thread Jon
Yes, now it works on my Mac. Good! ;-) /Jon On Oct 13, 4:46 pm, "andi.xeno...@googlemail.com" wrote: > Perhaps Java 5 was running. I forgot to compile also for Java 5 (now > updated in tutorial and in demo).Could you please try again? > So far I know from two MacOS X 10.6 where it works and two

Flags, binding, and laziness, oh my!

2009-10-13 Thread Garth Sheldon-Coulson
Hi All, I'm looking for general advice on using dynamic bindings to store flags/options that users pass to my code. a) Should I use dynamic bindings for this purpose? (elaboration on "this purpose" below...) b) If I do, how might the new macros I've been hearing about (with-bindings, bound-fn) al