Re: Clojure Editor
Hi Shantanu, I found it by going to the Document menu, selecting the Language Mode sub-list menu option, and selecting the Clojure option. Regards, Kevin On Mar 14, 12:49 am, Shantanu Kumar kumar.shant...@gmail.com wrote: Do I need a plugin? I downloaded the stock 2.0.3-1 version of the editor and it doesn't even seem to syntax-highlight the Clojure code. Regards, Shantanu On Mar 13, 5:09 pm, WoodHacker ramsa...@comcast.net wrote: If you are looking for a very good editor for Clojure try Bluefish. It's been around for ever, is very stable, and does everything you would want an editor to do. And it now works with Clojure. http://bluefish.openoffice.nl Bill -- 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 email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: Monad Lessons
Hi Brian, Thanks for craeting the videos. They've been the most helpful monad tutorial I've ever followed. I'm looking forward to the next video! Keep up the good work. Kevin On Mar 13, 11:20 am, Brian Marick mar...@exampler.com wrote: I don't know if this is useful, but I've been doing a series of videos on monads. They have a different style than others I've read (very visual, avoiding standard jargon, not caring about category theory). They might be useful to people joining the session. http://www.vimeo.com/20717301http://www.vimeo.com/20798376http://www.vimeo.com/20963938 - Brian Marick, Artisanal Labrador Contract programming in Ruby and Clojure Author of /Ring/ (forthcoming; sample:http://exampler.com/tmp/ring.pdf)www.exampler.com,www.exampler.com/blog,www.twitter.com/marick -- 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 email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: Tailing a file in Clojure
Hi Viksit, For production support, I also wanted to tail -f a file on a Windows server with no tail facility (no one had installed the Windows Resource Kit yet, and executing the install file myself would've been prohibitive (it's a long story)). However, this Windows server did have Java. I thought to write a tail -f with clojure until I discovered the JDK installed was 1.4.2. I found an old version of Jython that was compatible (at the time, I used jython 2.1 and 2.2) and wrote a Jython script that implemented tail -f for me. It's not clojure, but it did solve my initial problem, which was doing a tail -f on a log file. I didn't build any parsing facility because I was content to have the file write out to a Windows GUI dialog. I realise it's not exactly what you want, but it's ready (with no guarantees that it's safe, as with any code received from strangers) and located in it's entirety at: https://sites.google.com/site/kevinkwoo/work/guitail-fforjython21-1 It should be publicly accessible, but if it's not do let me know! Regards, Kevin On Dec 2, 6:53 pm, viksit vik...@gmail.com wrote: Hi all, What would you recommend as the best method to tail a file using Clojure? Are there any built in functions in contrib or core that allow a program to read the last line of a file as it is appended to? If not - how do people solve a problem like this? My aim is simple - I've got a log file and I'd like to parse it as it gets appended to. Thanks Viksit -- 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 email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
comment macro not ignoring contents
Hi folks, Anyone get the following interesting messages? 1:19 com.kkw.ss= (comment 1) nil 1:20 com.kkw.ss= (comment s1) nil 1:21 com.kkw.ss= (comment 1) nil 1:22 com.kkw.ss= (comment s) nil 1:23 com.kkw.ss= (comment s1) nil 1:24 com.kkw.ss= (comment 1s) java.lang.NumberFormatException: Invalid number: 1s java.lang.Exception: Unmatched delimiter: ) 1:25 com.kkw.ss= Kindly let me know if I've done something abnormal. Regards, Kev --~--~-~--~~~---~--~~ 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 email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~--~~~~--~~--~--~---
Re: comment macro not ignoring contents
That makes really good sense. Thanks for the clear explanation! Kev On Jul 17, 1:56 pm, Richard Newman holyg...@gmail.com wrote: 1:24 com.kkw.ss= (comment 1s) java.lang.NumberFormatException: Invalid number: 1s java.lang.Exception: Unmatched delimiter: ) 1:25 com.kkw.ss= Kindly let me know if I've done something abnormal. comment is a macro, not a syntactic element. A macro is evaluated after read time (at macroexpansion time, funnily enough). That means that anything inside a comment form *must* be syntactic, such that it can be read by the reader. 1s is not syntactic, as a brief spell with the reader will demonstrate: user= (read-string 1s) java.lang.RuntimeException: java.lang.NumberFormatException: Invalid number: 1s (NO_SOURCE_FILE:0) If you want unsyntactic input in your file, comment it out with semicolons. Adding true block comments -- #| |# -- is on the to-do list. -R --~--~-~--~~~---~--~~ 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 email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~--~~~~--~~--~--~---
quick question about ANN:
Hi folks, Occasionally, I see ANN: in subject headers to posts here. I've tried to figure out what it means, but have failed. Searches on google haven't been too good either. What does ANN: mean? Kev --~--~-~--~~~---~--~~ 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 email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~--~~~~--~~--~--~---
Re: quick question about ANN:
Great - thankyou! On Jun 26, 1:59 pm, Richard Newman holyg...@gmail.com wrote: What does ANN: mean? Announcement, I believe. --~--~-~--~~~---~--~~ 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 email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~--~~~~--~~--~--~---
Re: sorted-map-by sample call
Hi Steve, I didn't know the difference between a keyfn and a comparator. Thanks for pointing that out! Kev On Jun 22, 3:50 pm, Stephen C. Gilardi squee...@mac.com wrote: On Jun 22, 2009, at 1:23 AM, kkw wrote: I had some fortune with the sorted-by function: 1:11 user= (sort-by (fn [e] (second e)) [[1 99] [3 4] [5 6] [7 8]]) ([3 4] [5 6] [7 8] [1 99]) You were using the form of sort-by that accepts a keyfn, not the one where you also provide a comparator. so I thought I'd have a go with sorted-map-by also: 1:13 user= (doc sorted-map-by) - clojure.core/sorted-map-by ([comparator keyvals]) keyval = key val Returns a new sorted map with supplied mappings, using the supplied comparator. 1:14 user= (sorted-map-by (fn [c] c) 1 2) {1 2} No comparisons were necessary, so your comparator function wasn't called. 1:16 user= (sorted-map-by (fn [c] c) 1 2 3 4) java.lang.RuntimeException: java.lang.IllegalArgumentException: Wrong number of args passed to: user$eval--85$fn (repl-1:16) sorted-map-by called your comparator, but comparators take two arguments and your function only accepts one. --Steve smime.p7s 3KViewDownload --~--~-~--~~~---~--~~ 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 email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~--~~~~--~~--~--~---
sorted-map-by sample call
Hi folks, I had some fortune with the sorted-by function: 1:11 user= (sort-by (fn [e] (second e)) [[1 99] [3 4] [5 6] [7 8]]) ([3 4] [5 6] [7 8] [1 99]) so I thought I'd have a go with sorted-map-by also: 1:13 user= (doc sorted-map-by) - clojure.core/sorted-map-by ([comparator keyvals]) keyval = key val Returns a new sorted map with supplied mappings, using the supplied comparator. 1:14 user= (sorted-map-by (fn [c] c) 1 2) {1 2} 1:15 user= (sorted-map-by (fn [c] c) 1 2 3) java.lang.IllegalArgumentException: No value supplied for key: 3 (repl-1:15) 1:16 user= (sorted-map-by (fn [c] c) 1 2 3 4) java.lang.RuntimeException: java.lang.IllegalArgumentException: Wrong number of args passed to: user$eval--85$fn (repl-1:16) I expected line 1:15 to fail because I didn't have matching quantities of keys and values, but I don't know what I've done wrong in 1:16. I searched the google group discussions for sorted map by, but I didn't understand what I found. Would a compassionate soul guide me to where I went wrong? Kev --~--~-~--~~~---~--~~ 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 email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~--~~~~--~~--~--~---
Re: Which map access is more idiomatic
(my-map :my-key) has felt more natural to me, and I suspect it's because it feels more OO to me (for better or worse). I hadn't considered nil-map tolerance/robustness before, so I'd be quite happy to change my mind on new work I write with maps. Kev On Jun 19, 10:13 am, J. McConnell jdo...@gmail.com wrote: On Thu, Jun 18, 2009 at 7:30 PM, Howard Lewis Ship hls...@gmail.com wrote: I have code that gets passed a map (actually a struct-map), should I (my-map :my-key) or (:my-key my-map) I'm beginning to gravitate towards the latter, as it is more tolerant of the map being nil. I tend to prefer the latter as well, whenever possible. - J. --~--~-~--~~~---~--~~ 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 email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~--~~~~--~~--~--~---
Re: accum
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've certainly asked my fair share of noob- questions, and folks in this group have been quite happy to oblige me. I now find it easier to ask a question in this group about functions I've wanted, rather than implement (or poorly re-implement, as I did in my earlier days!) popular functions. clojure.contrib isn't a part of clojure.core (otherwise it'd called clojure.core right?), but it I think it's very well-worth downloading and compiling. Parth's build instructions for clojure.contrib are good. However, clojure.contrib isn't required for 'accum'/'reduce' because 'reduce' is part of clojure.core. In fact, at the REPL you can enter: (doc reduce) and clojure.core will give you some information. (find-doc reduce) turns up some extra stuff also. 'find-doc' is great! I admit that (find-doc accum) didn't lead to 'reduce' which is mildly sad, but I'm sure I'll cope somehow. 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. If you don't feel comfortable with the offerings in clojure.contrib, that's fine also. Perhaps other folks can give testimonies about the usefulness/utility of clojure.contrib? I've found clojure.contrib really helpful and had no problems with it, even though there's no official release of it. Wishing you peace, Kev On Jun 17, 4:49 pm, Sean Devlin francoisdev...@gmail.com wrote: Wrexsoul, Your right, I was out of line. I'm sorry. I should go through the effort to explain myself rather than resort to personal attacks. Sean On Jun 17, 1:25 am, Wrexsoul d2387...@bsnow.net wrote: On Jun 17, 12:57 am, Sean Devlin francoisdev...@gmail.com wrote: Daniel, don't feed the WrexTroll Personal attacks are unwelcome here. Indeed! It's called reduce: http://clojure.org/api#toc476 I'm shocked you haven't noticed it in the API documentation. I SPECIFICALLY did a search of the entire api docs to see if there was anything like accum already in there. I examined every occurrence of seq and turned up a blank. 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! Being able to read is one of the most basic, useful skills in programming. This rudeness is uncalled-for. Especially if you want to be pompous without being an ass. Personal attacks are unwelcome here. Oh? What about compared to this: (use 'clojure.contrib.seq-utils) (def *tris* (reductions + (iterate inc 1))) Depends on a library that hasn't been released yet. --~--~-~--~~~---~--~~ 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 email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~--~~~~--~~--~--~---
Re: replacing java + xml (possible java1 demo)
Hello, Here's what I've done in times past: (ns process-xml-in-a-file (:require [clojure.zip :as zip]) (:require [clojure.contrib.zip-filter.xml :as zfx]) (:require [clojure.xml :as xml])) ; creating list of all checkable instances (def dev2-cfg-xml (- c:/dl/tibsup/Prod_Stg_auto_shutdown/dev2/dev2_config_start.xml (xml/parse) (zip/xml-zip))) (def instances (fn [cfg-xml] (zfx/xml- cfg- xml :Phases :Phase :ServiceInstances :Sequence :group :instances zfx/ text))) (instances dev2-cfg-xml) I can't provide dev2_config_start.xml as there's confidential info in the dev2_config_start.xml, and I'm pressed for time. I'm not sure if it's exactly what you had in mind, but I hope it helps nonetheless. Kev On May 28, 10:19 am, Raoul Duke rao...@gmail.com wrote: wow. the fact that people use java+somehatefullibs+xml and apparently think that is something good, completely drives me insane. i mean, it isn't just additional bloat, it is more like ackermann-function-scale bloat. gargh! has anybody done something like: 1) convert the bloody XML to Clojure lispy goodness 2) ok well you are done, it is now code! :-} ? ack. barf. --~--~-~--~~~---~--~~ 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 To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~--~~~~--~~--~--~---
Re: ANN: Full, continuously updated documentation for clojure.contrib
Tom, This is a really helpful service. Thank you very much! It's already helped me find stuff in the clojure.contrib.sql package that I didn't have the smarts to originally search. Kev On May 4, 4:30 pm, Tom Faulhaber tomfaulha...@gmail.com wrote: By the way, source of the robot is available on GitHub, for those who appreciate fine masochism: http://github.com/tomfaulhaber/contrib-autodoc/ Really, nothing to see there, but we like to be open. Enjoy! On May 3, 11:41 pm, Tom Faulhaber tomfaulha...@gmail.com wrote: Hello everybody, As many of you know, I have been working on a contrib autodoc robot for the last little while. It is now up and running and you can use the results here: http://code.google.com/p/clojure-contrib/wiki/OverviewOfContrib It includes: * An overview of each namespace in contrib (including the author and shortcut links to documentation for each of the functions). * An API page for each name space that includes the doc string for each function or variable in the namespace and a direct link to the source for that function or variable. * An index of all the documented functions and variables so that you can find them by name. * A JSON file that allows other tools to build off this information (athttp://clojure-contrib.googlecode.com/svn/wiki/ApiDocIndex.json- still very much under development). Each page has a sidebar to allow for quick access from place to place. All the pages are stored in the wiki on the google code home for clojure-contrib. This is both a blessing and a curse, since the google code wiki is a little brain-dead. As a result, the formatting is not as awesome as I would like. The goal of this project is to make contrib a more open and accessible resource for the community. Please take advantage of this to see and understand the great stuff that folks have added to contrib for your programming pleasure. I will be making sure it is kept up-to-date (eventually that will be automated, but for now I have to type ant once in a while). To contrib authors: I have added metadata to your namespaces. Please update and correct it as you would like. The updates will be propagated to the site. Also, please review the doc for your contributions to make sure it is complete and correct in general. Let me know if anything doesn't seem to be going through the wringer correctly. Happy perusing! Tom --~--~-~--~~~---~--~~ 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 To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~--~~~~--~~--~--~---
Re: Clojure 1.0
Bravo to Rich and all contributors! Kev On May 5, 2:04 am, tmountain tinymount...@gmail.com wrote: Congrats! I'm loving Clojure more all the time. Thank you for making the Lisp I've been waiting for all these years. Travis On May 4, 8:58 am, Rich Hickey richhic...@gmail.com wrote: After a sustained period of API stability and minimal bugs reports, I'm happy to announce the release of Clojure 1.0! http://clojure.googlecode.com/files/clojure_1.0.0.zip Numbered releases will enable people to consume a stable version of Clojure and move to bugfix-only incremental versions while preserving API stability, and to consume libraries designed to work with specific versions. Providing the bugfix-only revisions depends upon the community to submit patches for the release branch as well as the trunk. Clojure represents several years of effort on my part, but has also been shaped profoundly by the community in the 18 months since its release to the public. I can't thank everyone enough for your contributions of ideas, bug reports, suggestions, tests, tools, documentation and code - patches and enhancements. Clojure wouldn't be where it is today without its community and all of your efforts. Of course, there is more to do. Many good ideas have been suggested in the discussions preceding this release that were best put off for 1.1. Now with the release we can pursue them, and many others: http://clojure.org/todo I want to give special thanks to those who have made donations - they really help! I did the core work on Clojure during a self-funded sabbatical that has run its course (i.e. through my savings :) - donations help fund the future. Clojure 1.0 is a milestone of achievement, but it also represents a beginning. With 1.0, Stuart's book, the burgeoning set of libraries in and outside of contrib, and the large, friendly community, Clojure is poised to enter a period of increased adoption and application in many domains. Here's to the future! Rich --~--~-~--~~~---~--~~ 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 To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~--~~~~--~~--~--~---
Re: clojure.contrib.repl-utils/source: getting source not found
Hi Sigrid, Was clojure-contrib compiled with a relevant -Dclojure.jar= option? For example, ant -Dclojure.jar=/path/to/clojure.jar For what it's worth, I startup a Clojure REPL with: java -cp c:\dl\clojure\clojure.jar;c:\dl\clojure-contrib\clojure- contrib.jar;. clojure.lang.Repl And I was able to run: user= (use 'clojure.contrib.repl-utils) nil user= (source map) (defn map Returns a lazy sequence consisting of the result of applying f to the set of first items of each coll, followed by applying f to the set of second items in each coll, until any one of the colls is exhausted. Any remaining items in other colls are ignored. Function f should accept number-of-colls arguments. ([f coll] (lazy-seq (when-let [s (seq coll)] (cons (f (first s)) (map f (rest s)) ([f c1 c2] (lazy-seq (let [s1 (seq c1) s2 (seq c2)] (when (and s1 s2) (cons (f (first s1) (first s2)) (map f (rest s1) (rest s2))) ([f c1 c2 c3] (lazy-seq (let [s1 (seq c1) s2 (seq c2) s3 (seq c3)] (when (and s1 s2 s3) (cons (f (first s1) (first s2) (first s3)) (map f (rest s1) (rest s2) (rest s3))) ([f c1 c2 c3 colls] (let [step (fn step [cs] (lazy-seq (let [ss (map seq cs)] (when (every? identity ss) (cons (map first ss) (step (map rest ss)))] (map #(apply f %) (step (conj colls c3 c2 c1)) nil Kev On Apr 25, 4:41 pm, Sigrid keyd...@gmx.de wrote: Hi, I'm just starting with clojure, and I cannot get to use the clojure.contrib.repl-utils/source function: user= (use 'clojure.contrib.repl-utils) nil user= (source map) Source not found nil I have the clojure-sources.jar in my classpath: alias repl='java -cp /Users/hunli/Library/clojure/clojure.jar:/Users/ hunli/Library/clojure/clojure-contrib.jar:/Users/hunli/Library/clojure/ clojure-sources.jar clojure.lang.Repl' Does anyone have an idea what I'm doing wrong? thanks a lot for any help Sigrid --~--~-~--~~~---~--~~ 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 To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~--~~~~--~~--~--~---
Re: Monads tutorial
Hi Jim, Thanks for writing the tutorial! Kev On Apr 16, 2:01 am, jim jim.d...@gmail.com wrote: I've just posted a tutorial on using monads in Clojure at http://intensivesystems.net/tutorials/monads_101.html It's one big chunk of text since I haven't had time to break it up yet. It's also kind of rough, so if you see any typos, misspellings, errors, etc., post 'em here. Comments as well. Thanks, Jim --~--~-~--~~~---~--~~ 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 To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~--~~~~--~~--~--~---
- vs. comp
Hi folks, I have some code where I wanted to: - take a list of stuff (which includes another list inside) - use 'seq-utils/flatten' to flatten the list - use 'interpose' to add comma-delimiting strings between the elements - print out the results, thereby creating comma-delimited output I may choose between: ((comp (fn [x] (apply println x)) (fn [x] (interpose , x)) seq-utils/flatten) mr) OR (- mr seq-utils/flatten ((fn [x] (interpose , x))) ((fn [x] (apply println x And I found the - notation marginally easier to interpret and understand. Apart from appearance, are there any benefits to using - instead of the comp function? I happily concede that there exist nicer ways to achieve this goal, but the question I wanted to raise concerned the benefits of using - vs comp or vice-versa. Kev Kev --~--~-~--~~~---~--~~ 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 To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~--~~~~--~~--~--~---
Re: Monad tutorial, part 1
Hi folks, Whilst we are talking about monads, allow me to direct all and sundry to: http://www.mefeedia.com/tags/brian_beckman Brian Beckman gives a very beautiful description about monads. I find these tutorials very well done. I commend them. Kev On Mar 7, 12:19 am, Konrad Hinsen konrad.hin...@laposte.net wrote: On Mar 5, 2009, at 19:21, Konrad Hinsen wrote: For those who are interested in monads but don't want to learn Haskell first to understand the Haskell-basedmonadtutorials, I have started to write a Clojuremonadtutorial. Part 1 is now available: Part 2 is now published as well: http://onclojure.com/2009/03/06/a-monad-tutorial-for-clojure- programmers-part-2/ You will have to more patient for part 3, as it isn't written yet! Konrad. --~--~-~--~~~---~--~~ 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 To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~--~~~~--~~--~--~---
Re: Creating executable Jars?
Hi Emeka, Where Lucio says: after that I execute this command in the same folder (c:\user \classes): I had success if I instead followed: after that I execute this command in the same folder (c:\user\apps \classes): Adding the c:\user\apps\classes directory to your classpath is mandatory, otherwise the (compile) step won't work. I saw another thread where Rich advised creating a jar file with the .clj source inside instead: http://groups.google.com/group/clojure/browse_thread/thread/e45be60b8f7a4d16/356b1cf2a2701bbd?lnk=gstq=compiling+clj+jar#356b1cf2a2701bbd This sounds like the better way to go. Kev On Feb 17, 11:09 pm, Emeka emekami...@gmail.com wrote: Kev, I didn't make it, however, I guess the issue was on namespace and not on the instruction given. I will try again and again until I get my head around namespace, or could you help me to jump start? Emeka On Feb 17, 11:09 pm, Emeka emekami...@gmail.com wrote: Kev, I didn't make it, however, I guess the issue was on namespace and not on the instruction given. I will try again and again until I get my head around namespace, or could you help me to jump start? Emeka --~--~-~--~~~---~--~~ 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 To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~--~~~~--~~--~--~---
Re: Creating executable Jars?
Hi Emeka, Did you have success in this? Kev On Jan 29, 10:43 pm, Emeka emekami...@gmail.com wrote: luciofulci I'm interested in your instruction, however, are c:\user\apps\classes and c:\user\classes the same thing? Emeka --~--~-~--~~~---~--~~ 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 To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~--~~~~--~~--~--~---
Re: what does - mean?
Hi sun, I thought this question looked familiar. I found some answers here also: http://groups.google.com/group/clojure/browse_thread/thread/1f21663ea1ae9f58/ Kev On Feb 2, 2:29 am, Adrian Cuthbertson adrian.cuthbert...@gmail.com wrote: Sorry! That should have read; (- m :one :b) 2 On Sun, Feb 1, 2009 at 5:13 PM, e evier...@gmail.com wrote: I was able to work through the first two examples, and thanks for those. I will have to study maps more, I guess, to understand the last one. I don't know where 'x' came from: user= (- x :one :b) 2- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ 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 To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~--~~~~--~~--~--~---
purpose of clojure-slim.jar
Hi folks, I noticed that when I run 'ant' to build Clojure, in addition to clojure.jar, 'ant' gives birth to clojure-slim.jar. The build.xml says the clojure-slim.jar lacks compiled Clojure code. I don't know what purpose clojure-slim.jar serves. I searched the http://groups.google.com/group/clojure/ and found zero hits. Where would clojure-slim.jar be useful? Kev --~--~-~--~~~---~--~~ 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 To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~--~~~~--~~--~--~---
Clojure running atop Java ME (Micro Edition) for mobile phones
Hi folks, My question is similar to dokondr's question in http://groups.google.com/group/clojure/browse_thread/thread/42c87abf2b2a0689/b92ca96a14bf52cd?lnk=gstq=mobile#b92ca96a14bf52cd titled Running Clojure on Pocket PC: Does anyone have experience and accumulated wisdom using Clojure to write apps for the Java Micro Edition platform? Kev --~--~-~--~~~---~--~~ 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 To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~--~~~~--~~--~--~---
Re: purpose of clojure-slim.jar
Hi Kevin, Thanks for the explanation! Kev On Jan 30, 11:59 am, Kevin Downey redc...@gmail.com wrote: clojure-slim.jar lacks compiled clojure code. The java code is compiled, so clojure-slim.jar is still completely usable as clojure, it just have to compile things like core.clj when it loads them. On Thu, Jan 29, 2009 at 4:56 PM, kkw kevin.k@gmail.com wrote: Hi folks, I noticed that when I run 'ant' to build Clojure, in addition to clojure.jar, 'ant' gives birth to clojure-slim.jar. The build.xml says the clojure-slim.jar lacks compiled Clojure code. I don't know what purpose clojure-slim.jar serves. I searched thehttp://groups.google.com/group/clojure/ and found zero hits. Where would clojure-slim.jar be useful? Kev -- And what is good, Phaedrus, And what is not good— Need we ask anyone to tell us these things? --~--~-~--~~~---~--~~ 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 To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~--~~~~--~~--~--~---
Re: what does - mean?
One use I've found for - (though there are others I haven't come to appreciate yet) is when I have something like: (f1 (f2 (f3 (f4 x which can be re-written as (- x f4 f3 f2 f1) I find the latter expression easier to read. Kev On Dec 30 2008, 2:49 pm, wubbie sunj...@gmail.com wrote: Very criptic for newbie. What does Threads the expr through the forms. mean? Does it create a thread to execute? thanks sun On Dec 29, 10:07 pm, Paul Barry pauljbar...@gmail.com wrote: You can look up the documentation for a function/macro interactively from the repl: user= (doc -) - clojure.core/- ([x form] [x form more]) Macro Threads the expr through the forms. Inserts x as the second item in the first form, making a list of it if it is not a list already. If there are more forms, inserts the first form as the second item in second form, etc. nil On Dec 29, 8:27 pm, wubbie sunj...@gmail.com wrote: Hi all, Looking intoants.clj, I came across (defn place [[x y]] (- world (nth x) (nth y))) What - mean here? thanks sun --~--~-~--~~~---~--~~ 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 To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~--~~~~--~~--~--~---
Re: Clojure blog post about laziness
I'd vote for increased priority to reaching 1.0 also because of workplace constraints. Kev On Jan 9, 4:23 am, MikeM michael.messini...@invista.com wrote: Do people want it now? I would vote for 1.0 ahead of streams if adding streams now will delay 1.0. --~--~-~--~~~---~--~~ 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 To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~--~~~~--~~--~--~---
Re: FAQ
How about: What's the recommended way of getting Clojure up and running? - Download the latest snapshot with SVN - Create the Clojure.jar file with Ant - Test by starting up the REPL with java -cp clojure.jar clojure.lang.Repl Kev On Dec 18, 9:24 am, lpetit laurent.pe...@gmail.com wrote: Hello, * Is there an IDE for Clojure? Answer: There are plug-ins for Eclipse http://code.google.com/p/ clojure-dev/ and NetBeans http://enclojure.net/. There's also Emacs. Sincerely, clojure-dev (Eclipse plugin) is still currently in infancy. I think it's not fair for the emacs version and NetBeans version, because they are far better functional currently. Maybe add a note to state the state of the plugin. Because it could also be counter productive for clojure-dev : users will go to it (thinking it is a good candidate), be disappointed, and never go back to it later. --~--~-~--~~~---~--~~ 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 To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~--~~~~--~~--~--~---
building with Ant vs building with Maven
Hi folks, When I run 'mvn install' from the clojure\trunk directory (svn 1160), Maven creates: 16/12/2008 10:37 PM 519,267 clojure-lang-1.0-SNAPSHOT.jar When I run 'ant' from the clojure\trunk directory (svn 1160), Ant creates: 16/12/2008 10:37 PM 1,393,895 clojure.jar Since the Ant-built file is bigger, should I build using Ant instead of Maven? Which is the recommended way of building Clojure from the SVN checkout? I searched through the group archives to see if this question had been asked and answered but didn't have much luck. Kindly point me to the right thread if this question has been answered already. With Thanks, Kev --~--~-~--~~~---~--~~ 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 To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~--~~~~--~~--~--~---
Re: building with Ant vs building with Maven
Thanks Meikel and Dave! Much appreciated. Kev On Dec 17, 12:13 am, Dave Newton newton.d...@yahoo.com wrote: --- On Tue, 12/16/08, kkw kevin.k@gmail.com wrote: Since the Ant-built file is bigger, should I build using Ant instead of Maven? It looks like the Ant build is compiling more; for example the Maven build includes zip.clj, where the Ant build has all the zip%*.class files. Dave --~--~-~--~~~---~--~~ 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 To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~--~~~~--~~--~--~---