Re: accum

2009-06-17 Thread Mark Derricutt
There's prebuilt SNAPSHOT releases available in Howard's Tapestry repository - been using them happily from my maven based clojure app for awhile. Thou an official 1.0 stamped release in maven central (along with clojure-lang) would be most welcome. -- On Wed, Jun 17, 2009 at 6:05 PM, Parth wro

Re: accum

2009-06-17 Thread kkw
I only knew about map, apply, and reduce from studying haskell in uni. I've not heard of 'reduce' referred to as 'accum', but then again when I wanted to determine the number of elements in a seq, I kept searching for 'length' and 'size' but didn't think of 'count', so it can be a bit tricky eh? I

Re: Another Clojure Box

2009-06-17 Thread Emeka
Darmac, I use Scite Just edited it in order to run Clojure Repl(help help from this group). That's not great, it is ugly. I would like to use yours if it is as simple as Scite editor and pretty easy to install. Regards, Emeka --~--~-~--~~~---~--~~ You received

Re: multimethods

2009-06-17 Thread Konrad Hinsen
On 17.06.2009, at 08:36, Chris Dean wrote: > Sure. It's easy to write one's own version of get et.al. What's hard > to do is to get packages that you didn't write to use that version of > get. You need everyone to use c.c.generic.collection or all the > different libraries will have trouble in

reasoning/logic programming from Clojure

2009-06-17 Thread Daniel Lyons
Hi everyone, I'm doing a short talk on declarative/logic programming, reasoning and expert systems for the Albuquerque Lisp/Scheme group this Sunday. I have to talk about Prolog and CLIPS but since the future is here I hope to give some time to Clojure. If you've done something cool with Cl

Re: Clojure goes Git!

2009-06-17 Thread Rick Moynihan
2009/6/17 Rich Hickey : > > Clojure and contrib repos are now on GitHub: > > http://github.com/richhickey/clojure > http://github.com/richhickey/clojure-contrib > > Issues and other development collaboration has moved to Assembla: > > http://www.assembla.com/spaces/clojure > http://www.assembla.co

Re: Clojure goes Git!

2009-06-17 Thread Mark Volkmann
On Tue, Jun 16, 2009 at 8:17 PM, Antony Blakey wrote: > > On 17/06/2009, at 10:37 AM, Mark Volkmann wrote: > > > I think you've got that backwards. A "git push" is how I would ask > > the remote repo to accept my changes. A "git pull" says I want to > > update my local repo with changes someone ma

Re: Clojure goes Git!

2009-06-17 Thread Paul Stadig
On Wed, Jun 17, 2009 at 7:03 AM, Mark Volkmann wrote: > On Tue, Jun 16, 2009 at 8:17 PM, Antony Blakey wrote: > > We must be talking about a different way of using git. In my case I created > a local repo from the remote github repo using the following command: > > git clone git://github.com/richh

Re: Clojure goes Git!

2009-06-17 Thread Christian Vest Hansen
On Wed, Jun 17, 2009 at 1:03 PM, Mark Volkmann wrote: > On Tue, Jun 16, 2009 at 8:17 PM, Antony Blakey > wrote: >> >> On 17/06/2009, at 10:37 AM, Mark Volkmann wrote: >> >> > I think you've got that backwards. A "git push" is how I would ask >> > the remote repo to accept my changes. A "git pull"

Re: Clojure goes Git!

2009-06-17 Thread Meikel Brandmeyer
Hi, Am 17.06.2009 um 02:17 schrieb Rich Hickey: http://github.com/richhickey/clojure http://github.com/richhickey/clojure-contrib For the mercurial users out there: Both repos work with the latest hg-git from http://hg-git.github.com! :))) Sincerely Meikel smime.p7s Description: S/MIME cr

Re: Clojure and Jacob

2009-06-17 Thread janus
Meikel, I face a little challenge while using vbaxl. I wanted to achieve the below Set myRange = Worksheets("Sheet1").Range("A1:C10") answer = Application.WorksheetFunction.Min(myRange) I did ; (def myRange (.. Dispatch (call ws "Range" "A1:C10")(toDispatch))) Which seems to work, but I was not

Re: Clojure goes Git!

2009-06-17 Thread stephaner
Hi, I like this introductory tutorial on git : http://www.kernel.org/pub/software/scm/git/docs/gittutorial.html It doesn't show working with github, some tutorials are availables on github site. But it dit help me to get started. Bye, Stephane _/) On Jun 17, 2:11 am, Tassilo Horn wrote: >

Re: Clojure goes Git!

2009-06-17 Thread Matt Clark
On Jun 17, 9:16 am, Meikel Brandmeyer wrote: > For the mercurial users out there: > Both repos work with the latest hg-git > fromhttp://hg-git.github.com!:))) Meikel, thanks for this! I am one of those reticent Windows users who have given both git (with github) and mercurial a decent try and I

Re: Clojure goes Git!

2009-06-17 Thread Konrad Hinsen
On Jun 17, 2009, at 14:16, Meikel Brandmeyer wrote: > Am 17.06.2009 um 02:17 schrieb Rich Hickey: > >> http://github.com/richhickey/clojure >> http://github.com/richhickey/clojure-contrib > > For the mercurial users out there: > Both repos work with the latest hg-git > from http://hg-git.github.c

Re: reasoning/logic programming from Clojure

2009-06-17 Thread Sean Devlin
Sounds awesome! Will you be able to post any material after the talk? You know, slides, videos, notes, etc? Sean On Jun 17, 5:35 am, Daniel Lyons wrote: > Hi everyone, > > I'm doing a short talk on declarative/logic programming, reasoning and   > expert systems for the Albuquerque Lisp/Scheme

Re: Clojure goes Git!

2009-06-17 Thread Mark Volkmann
On Tue, Jun 16, 2009 at 7:17 PM, Rich Hickey wrote: > > Clojure and contrib repos are now on GitHub: > > http://github.com/richhickey/clojure > http://github.com/richhickey/clojure-contrib > Does this announcement have any impact on the Google Code Subversion repositories? Will those continue to

Re: No OO restrictions is good. why not still add dependency injection?

2009-06-17 Thread AndrewC.
On Jun 16, 11:34 am, Jules wrote: > I still don't know what dependency injection means exactly. The > examples I've seen that are said to use dependency injection can be > solved by using first class functions. Are first class functions what > you want? Dependecy injection is nothing more than

Re: Clojure goes Git!

2009-06-17 Thread Jonas Bonér
Awesome. Good decision. On Jun 17, 2:17 am, Rich Hickey wrote: > Clojure and contrib repos are now on GitHub: > > http://github.com/richhickey/clojurehttp://github.com/richhickey/clojure-contrib > > Issues and other development collaboration has moved to Assembla: > > http://www.assembla.com/spa

Re: accum

2009-06-17 Thread CuppoJava
Finding the right function in the doc admittedly takes a little practice. I've learned gradually, that Clojure pretty much has all its bases covered though. You just need to find the function. And this forum is filled with very helpful and friendly people, who will tell you the function name, if y

Re: Clojure goes Git!

2009-06-17 Thread Meikel Brandmeyer
Hi, Am 17.06.2009 um 15:26 schrieb Konrad Hinsen: It didn't work for me this morning. I used hg-git to clone the Clojure repository and then tried to build it. The build failed, and further inspection showed that core.clj was a few hundred lines shorter than the copy at github. I didn't pursue

Re: accum

2009-06-17 Thread Mark Volkmann
On Wed, Jun 17, 2009 at 9:41 AM, CuppoJava wrote: > > Finding the right function in the doc admittedly takes a little > practice. I've learned gradually, that Clojure pretty much has all its > bases covered though. You just need to find the function. And this > forum is filled with very helpful an

Re: Clojure goes Git!

2009-06-17 Thread Luke Renn
If you're looking for a git/github workflow I can't recommend the following post enough: http://blog.mhartl.com/2008/10/14/setting-up-your-git-repositories-for-open-source-projects-at-github/ I use something similar to (barely) contribute to compojure. There isn't anything like his 'edge' branc

Re: Runtime Compilation of Clojure from Android

2009-06-17 Thread Marklar
Very nice, thanks for sharing. I tried the first version you posted on my rooted G1. It could evaluate strings and numbers, but unfortunately when I tried to create a function it didn't do anything. It just stopped, though the activity was still responding (the menu worked, etc). I looked at logc

Re: reasoning/logic programming from Clojure

2009-06-17 Thread Richard Newman
> Sounds awesome! Will you be able to post any material after the > talk? You know, slides, videos, notes, etc? Seconded -- I haven't *yet* done anything cool with Clojure and Datalog... but I would like to :) --~--~-~--~~~---~--~~ You received this message be

Re: accum

2009-06-17 Thread Richard Newman
> Finding the right function in the doc admittedly takes a little > practice. I often end up reading through /api to find what I want, but "Clojure Categorized" might be a much faster way to do it: http://java.ociweb.com/mark/clojure/ClojureCategorized.html I don't know if it's kept up-to-dat

Re: cannot use swig native shared libraries

2009-06-17 Thread Antonio, Fabio Di Narzo
With the relatively recent release of clojure 1.0.0, I decided to give another try to using SWIG-generated native libraries with it. It still doesn't work on my box: I get an "UnsatisfiedLinkError" exception when trying to call a native function. Still, calling the function from plain Java code wo

Re: reasoning/logic programming from Clojure

2009-06-17 Thread Daniel Lyons
On Jun 17, 2009, at 7:39 AM, Sean Devlin wrote: > > Sounds awesome! Will you be able to post any material after the > talk? You know, slides, videos, notes, etc? Sure thing. I'll post my slides and whatever code I wind up writing. I don't think anyone will be taping it though (which is pro

Re: clojure.contrib.trace enhancement proposal: dotrace

2009-06-17 Thread Stuart Sierra
Hi Michel, Thanks for working on this! I'm going away this week, but I'll be sure to look at this more closely when I get back. (I wrote the first c.c.trace, it may have been modified by others since.) -Stuart Sierra On Jun 16, 7:13 pm, Michel Salim wrote: > I've often felt the need to enable

Re: No OO restrictions is good. why not still add dependency injection?

2009-06-17 Thread Raoul Duke
Andrew, you have just said what needs to be said about DI that for some reason it seems like nobody else on earth ever says -- no, they have to write some giant screed that includes references to Hollywood. No wonder technology sucks, when the people writing the tutorials can't even explain things

Re: Runtime Compilation of Clojure from Android

2009-06-17 Thread George Jahad
Odd, it does work on my rooted G1, (an Android Developer Phone.) Remco, does it work for you, either on the emulator or the G1? What you are seeing indicates that run-time compilation isn't working at all for you. (Self-evalution of numbers and strings from the repl don't require compilation, a

Re: Runtime Compilation of Clojure from Android

2009-06-17 Thread George Jahad
Odd, it does work on my rooted G1, (an Android Developer Phone.) Remco, does it work for you, either on the emulator or the G1? What you are seeing indicates that run-time compilation isn't working at all for you. (Self-evalution of numbers and strings from the repl don't require compilation, a

Re: Runtime Compilation of Clojure from Android

2009-06-17 Thread George Jahad
Odd, it does work on my rooted G1, (an Android Developer Phone.) Remco, does it work for you, either on the emulator or the G1? What you are seeing indicates that run-time compilation isn't working at all for you. (Self-evalution of numbers and strings from the repl don't require compilation, a

Re: accum

2009-06-17 Thread Wrexsoul
On Jun 17, 3:10 am, Mark Derricutt wrote: > There's prebuilt SNAPSHOT releases available in Howard's Tapestry repository > - been using them happily from my maven based clojure app for awhile. > Thou an official 1.0 stamped release in maven central (along with > clojure-lang) would be most welcom

Re: accum

2009-06-17 Thread Wrexsoul
On Jun 17, 2:05 am, Parth wrote: > On Jun 17, 10:24 am, Wrexsoul wrote: > > > On Jun 17, 12:44 am, Daniel Lyons wrote: > > > > (use 'clojure.contrib.seq-utils) > > > Don't have that library. Still hasn't been released yet, last I > > checked. > > I am not sure if a pre-built clojure-contrib.jar

Re: accum

2009-06-17 Thread Wrexsoul
On Jun 17, 3:20 am, kkw wrote: > I only knew about map, apply, and reduce from studying haskell in uni. > I've not heard of 'reduce' referred to as 'accum', but then again when > I wanted to determine the number of elements in a seq, I kept > searching for 'length' and 'size' but didn't think of

Re: accum

2009-06-17 Thread Wrexsoul
On Jun 17, 10:51 am, Mark Volkmann wrote: > On Wed, Jun 17, 2009 at 9:41 AM, CuppoJava wrote: > > Finding the right function in the doc admittedly takes a little > > practice. I've learned gradually, that Clojure pretty much has all its > > bases covered though. You just need to find the function

Re: accum

2009-06-17 Thread Cosmin Stejerean
On Wed, Jun 17, 2009 at 12:51 PM, Wrexsoul wrote: > > > Even though clojure.contrib hasn't been released as 1.0 or anything > > official-sounding, I reckon it still beats the heck out of me > > reinventing the wheel, especially with the calibre of folks who've > > contributed to clojure.contrib.

Re: multimethods

2009-06-17 Thread Fogus
> would it be possible for routines to check to see if they are not > using multimethod-ness, and in that case be performance optimized, yet > have the syntax for them all be somehow less different? There is certainly a case for that, but (correct me if I'm wrong), but one of the underlying philo

Re: accum

2009-06-17 Thread Kyle Schaffrick
On Wed, 17 Jun 2009 10:51:48 -0700 (PDT), Wrexsoul wrote: > On Jun 17, 3:20 am, kkw wrote: >> I only knew about map, apply, and reduce from studying haskell in uni. >> I've not heard of 'reduce' referred to as 'accum', but then again when >> I wanted to determine the number of elements in a seq,

Adding source file information to compiler exceptions

2009-06-17 Thread vseguip
Currently Clojure adds source and line information in the cause string to exceptions thrown when compiling. This makes it difficult for slime to highlight this errors as it actually has to parse the cause message to get the source and file. This regex parsing fails in my system (I have fixed the

Re: Adding source file information to compiler exceptions

2009-06-17 Thread J. McConnell
On Wed, Jun 17, 2009 at 2:55 PM, vseguip wrote: > > or is there a preferred way to communicate patches? This is new: http://clojure.org/patches - J. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" group.

Re: accum

2009-06-17 Thread Rich Hickey
On Jun 17, 12:44 am, Daniel Lyons wrote: > On Jun 16, 2009, at 10:34 PM, Wrexsoul wrote: > > > > > > > > > I'm shocked that this is missing from clojure.core: > > > (defn accum [f init coll] > >  (loop [x init c coll] > >    (if (empty? c) > >      x > >      (recur (f x (first c)) (rest c)

Re: accum

2009-06-17 Thread Daniel Lyons
On Jun 17, 2009, at 1:43 PM, Rich Hickey wrote: > Please refrain from communicating this way on this group. If a post > annoys you please ignore it. It is much more important that we > maintain civility and respectfulness here. My apologies to Wrexsoul. I was out of line. Civility and mutual

Re: accum

2009-06-17 Thread Rich Hickey
On Jun 17, 1:22 am, Wrexsoul wrote: > On Jun 17, 12:44 am, Parth wrote: > > > > > > > On Jun 17, 9:34 am, Wrexsoul wrote: > > > I'm shocked that this is missing from clojure.core: > > > > (defn accum [f init coll] > > >   (loop [x init c coll] > > >     (if (empty? c) > > >       x > > >    

Re: Clojure goes Git!

2009-06-17 Thread Sudish Joseph
I'll second this. One large source of confusion when first switching to git is the seeming obtuseness of the terminology and concepts. The model itself is actually quite simple and everything becomes easier once you get the basic concepts inside git (I think of it as repo = directed graph of nod

clojuredev on Twitter

2009-06-17 Thread Mark Volkmann
Yikes! I thought I might learn some interesting things by following clojuredev on Twitter, but the "Ticket created ..." messages are overwhelming. -- R. Mark Volkmann Object Computing, Inc. --~--~-~--~~~---~--~~ You received this message because you are subscribe

Re: clojuredev on Twitter

2009-06-17 Thread Rich Hickey
There's a one-time import of issues from Google Code going on right now. I imagine the issues volume will slow down quite a bit when that's done. Hang tight, I'm looking for feedback on what should be in the Twitter stream. Rich On Wed, Jun 17, 2009 at 4:46 PM, Mark Volkmann wrote: > > Yikes! I

Re: clojuredev on Twitter

2009-06-17 Thread Richard Newman
> Yikes! I thought I might learn some interesting things by following > clojuredev on Twitter, but the "Ticket created ..." messages are > overwhelming. Heh, I've got those plus maybe a hundred ticket emails trickling in from Assembla. Seems it's emailing me the entire ticket history of the C

Re: Another Clojure Box

2009-06-17 Thread e
will definitely check it out. Thanks. On Tue, Jun 16, 2009 at 8:20 PM, Darmac wrote: > > Hi, I have been experimenting with Clojure last two months and in my > learning process I used several applications. > So, I have made a package and want it to share it with everybody that > want to learn C

Re: accum

2009-06-17 Thread Wrexsoul
On Jun 17, 2:25 pm, Cosmin Stejerean wrote: > On Wed, Jun 17, 2009 at 12:51 PM, Wrexsoul wrote: > > > > Even though clojure.contrib hasn't been released as 1.0 or anything > > > official-sounding, I reckon it still beats the heck out of me > > > reinventing the wheel, especially with the calibre

Re: accum

2009-06-17 Thread Wrexsoul
On Jun 17, 2:47 pm, Kyle Schaffrick wrote: > As a friendly suggestion, I'd like to offer that perhaps the derision is > caused not by the fact that you had the initiative to implement it > yourself, but rather by such phrasing as: > > > I'm shocked that [reduce/accum/foldr] is missing from clojur

Re: accum

2009-06-17 Thread Wrexsoul
On Jun 17, 3:52 pm, Daniel Lyons wrote: > On Jun 17, 2009, at 1:43 PM, Rich Hickey wrote: > > > Please refrain from communicating this way on this group. If a post > > annoys you please ignore it. It is much more important that we > > maintain civility and respectfulness here. > > My apologies to

Re: Dynamically accessing static fields

2009-06-17 Thread Michael Reid
On Mon, Jun 15, 2009 at 9:13 AM, Parth wrote: > > > > On Jun 15, 7:08 am, James Koppel wrote: >> I am trying to write a function to simplify working with GridBagConstraints >> -- that is, instead of writing >> >> (let [c (GridBagConstraints.)] >>     (set! (.weightx c) 2.0) >>     (set! (.gridwid

Re: accum

2009-06-17 Thread Wrexsoul
On Jun 17, 4:00 pm, Rich Hickey wrote: > On Jun 17, 1:22 am, Wrexsoul wrote: > > The docs definitely have problems if this can be missed despite a very > > thorough search. The only more-thorough search would have been to > > actually read the docs in their entirety, rather than to search them!

Re: accum

2009-06-17 Thread Rich Hickey
On Jun 17, 5:45 pm, Wrexsoul wrote: > On Jun 17, 2:47 pm, Kyle Schaffrick wrote: > > > As a friendly suggestion, I'd like to offer that perhaps the derision is > > caused not by the fact that you had the initiative to implement it > > yourself, but rather by such phrasing as: > > > > I'm shock

Google Code issues

2009-06-17 Thread Rich Hickey
Chas Emerick and Jarkko Oranen have copied the Google Code issues into Assembla. Thanks guys! Rich --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@google

Re: Google Code issues

2009-06-17 Thread Mark Derricutt
Congrats on the move to github - I'm curious however, why the use of Assembla for bugtracking/wiki as opposed to github's own flavour? Mark -- On Thu, Jun 18, 2009 at 10:11 AM, Rich Hickey wrote: > Chas Emerick and Jarkko Oranen have copied the Google Code issues into > Assembla. --~--~-

Re: accum

2009-06-17 Thread Max Suica
Wrexsoul, please mate, these are good guys. Remember the beauty and tradition of the language you're learning. It's a lisp and gives you the power to effortlessly create almost any abstraction you can imagine. Not being convinced of the beauty of this, open you mind a bit and humble yourself some

Re: Dynamically accessing static fields

2009-06-17 Thread James Koppel
Thanks! Seems I forgot java.lang.reflect exists when I wrote that. On Wed, Jun 17, 2009 at 4:47 PM, Michael Reid wrote: > > On Mon, Jun 15, 2009 at 9:13 AM, Parth wrote: > > > > > > > > On Jun 15, 7:08 am, James Koppel wrote: > >> I am trying to write a function to simplify working with > GridB

Re: Google Code issues

2009-06-17 Thread Richard Newman
> Chas Emerick and Jarkko Oranen have copied the Google Code issues into > Assembla. I notice the contrib issues have not yet been moved over. Will anything screw up if I create issues in Assembla before the move has occurred? In other words, should I wait? --~--~-~--~~---

Apply a function to some values in a map

2009-06-17 Thread Rowdy Rednose
Say I've got this map of keys to integer values: (def m {:one 0 :two 0 :three 0}) I want to write a function "inc-values-in-map" that takes such a map, a collection of keys and will increment those keys' values in the map. In other words, calling (inc-values-in-map m [:one :three]) should ret

Re: Apply a function to some values in a map

2009-06-17 Thread Timothy Pratley
Your version is already succinct, is there something you particularly don't like about it? I would probabbly write it like this: (defn inc-values-in-map [map keys] (reduce #(assoc %1 %2 (inc (%1 %2 0))) map keys)) Because it caters better with (inc-values-in-map m [:one :three :one :four]) O

Clojure in "Computing in Science and Engineering"

2009-06-17 Thread Konrad Hinsen
The July/August issue of the IEEE magazine "Computing in Science and Engineering" has an introduction to functional programming for scientists that uses Clojure for the examples. It is already available (a bit in advance of the paper issue) at IEEE's Computing Now portal: http://w

Re: Clojure in "Computing in Science and Engineering"

2009-06-17 Thread Max Suica
On Jun 18, 2:00 am, Konrad Hinsen wrote: > The July/August issue of the IEEE magazine "Computing in Science and   > Engineering" has an introduction to functional programming for   > scientists that uses Clojure for the examples. It is already   > available (a bit in advance of the paper issue) a

Re: Apply a function to some values in a map

2009-06-17 Thread Stephen C. Gilardi
On Jun 18, 2009, at 1:21 AM, Rowdy Rednose wrote: I've come up with this: (defn inc-values-in-map [map keys] (merge-with + map (zipmap keys (repeat 1 Aren't there more elegant ways to implement this function? Here's a shot at generalizing mapping over values in a map: (ns rednose) (

Re: clojure.contrib.trace enhancement proposal: dotrace

2009-06-17 Thread Michel Salim
You're welcome -- the changes are in my github fork of Rich's clojure- contrib repository, http://github.com/hircus/clojure-contrib/tree/master I'll send you a pull request, but it appears that you're not on github just yet. -- Michel On Jun 17, 1:13 pm, Stuart Sierra wrote: > Hi Michel, > Th