Re: ANN: Gloss, a byte-format DSL

2011-01-05 Thread Zach Tellman
Thanks for the patch! It's too bad that Gloss wasn't directly suited to your needs, but I appreciate you taking the time to familiarize yourself with the code and add new functionality. Zach On Jan 5, 2:45 pm, "Eric Schulte" wrote: > also, here's a patch to Gloss which I've used locally but whi

Re: ANN: Gloss, a byte-format DSL

2011-01-05 Thread Zach Tellman
I'm confused by what you expect the decoded value for that string to look like. Is it: [["blabla" "hi hi" "jg"] [" g"]] or [["blabla" "hi hi" "jg\0 g"]] Zach On Jan 5, 3:36 am, "pepijn (aka fliebel)" wrote: > Nothing :( > > $ lein repl > "REPL started; server listening on localhost:3

Re: Knuth's literate programming "tangle" function in Clojure

2011-01-05 Thread Tim Daly
On 1/6/2011 12:03 AM, Eric Schulte wrote: Can you post examples of these? I'd love to see some other examples. Sure thing, check out this old version of a file which tangles out into the directory layout expected by lein. http://gitweb.adaptive.cs.unm.edu/?p=asm.git;a=blob;f=asm.org;h=f043a8c8

Re: Clojure Quizzes?

2011-01-05 Thread Sean Corfield
On Wed, Jan 5, 2011 at 8:04 PM, John Svazic wrote: > I'm new to the Clojure community (admittedly, I'm only on chapter 6 of Welcome!! > Clojure in Action, so my Clojure skills are sub-sub-par at the > moment), but I was wondering if there were any weekly challenges for > writing Clojure code lik

Re: Knuth's literate programming "tangle" function in Clojure

2011-01-05 Thread Eric Schulte
> Can you post examples of these? I'd love to see some other examples. Sure thing, check out this old version of a file which tangles out into the directory layout expected by lein. http://gitweb.adaptive.cs.unm.edu/?p=asm.git;a=blob;f=asm.org;h=f043a8c8b0a917f58b62bdeac4c0dca441b8e2cb;hb=HEAD Al

Re: Knuth's literate programming "tangle" function in Clojure

2011-01-05 Thread Tim Daly
On 1/5/2011 11:19 PM, Eric Schulte wrote: Emacs org-mode, on the other hand, is a useful development technology but it really isn't literate programming. I would be interested to hear your thoughts as to why Org-mode is not a literate programming tool. I never said org-mode wasn't a 'literat

Re: Knuth's literate programming "tangle" function in Clojure

2011-01-05 Thread Tim Daly
On 1/5/2011 11:18 PM, Eric Schulte wrote: Mark Engelberg writes: On Wed, Jan 5, 2011 at 4:44 PM, Eric Schulte wrote: For the most up-to-date and comprehensive documentation of using Org-mode to work with code blocks (e.g. Literate Programming or Reproducible Research) the online manual is

Re: Knuth's literate programming "tangle" function in Clojure

2011-01-05 Thread Tim Daly
On 1/5/2011 10:58 PM, Seth wrote: Now that i think of it, it is mostly a fear of having decreased productivity in writing code that affected my statement that i liked the little files. Im used to, i suppose, developing code for a specific function in a file, being able to compile, goto line num

Re: Clojure 1.3 alpha 1 report - bitwise operations extremely slow

2011-01-05 Thread Mark Engelberg
On Wed, Jan 5, 2011 at 6:42 PM, Stuart Halloway wrote: > The tickets that came forward from Assembla should have the same numbers they > did in Assembla, since both ticketing systems start with ticket 1. > > Works in this case at least: http://dev.clojure.org/jira/browse/CLJ-446. > > Stu That do

Re: Knuth's literate programming "tangle" function in Clojure

2011-01-05 Thread Eric Schulte
>>> >>> Emacs org-mode, on the other hand, is a useful development >>> technology but it really isn't literate programming. >>> >> I would be interested to hear your thoughts as to why Org-mode is not a >> literate programming tool. > I never said org-mode wasn't a 'literate programming tool'. It i

Re: Knuth's literate programming "tangle" function in Clojure

2011-01-05 Thread Eric Schulte
Mark Engelberg writes: > On Wed, Jan 5, 2011 at 4:44 PM, Eric Schulte wrote: >> For the most up-to-date and comprehensive documentation of using >> Org-mode to work with code blocks (e.g. Literate Programming or >> Reproducible Research) the online manual is also very useful. > > In literate pro

Re: clojure.java.shell hanging issues

2011-01-05 Thread kovas boguta
In retrospect it probably wasn't clojure.org, but an adjacent tab I opened from a google search. richhickey.github.com has really high pagerank :) which can confuse things; also all these branches have nearly the same visual identity which makes it easy to forget what is going on. On Wed, Jan 5, 2

Clojure Quizzes?

2011-01-05 Thread John Svazic
I'm new to the Clojure community (admittedly, I'm only on chapter 6 of Clojure in Action, so my Clojure skills are sub-sub-par at the moment), but I was wondering if there were any weekly challenges for writing Clojure code like there is (was?) for Ruby, i.e: http://rubyquiz.com/ When I was start

Re: Knuth's literate programming "tangle" function in Clojure

2011-01-05 Thread Seth
Now that i think of it, it is mostly a fear of having decreased productivity in writing code that affected my statement that i liked the little files. Im used to, i suppose, developing code for a specific function in a file, being able to compile, goto line numbers where there are errors, send code

Re: clojure.java.shell hanging issues

2011-01-05 Thread Sean Corfield
On Wed, Jan 5, 2011 at 4:41 PM, kovas boguta wrote: > Following the clojure.org api docs, I clicked through on the source code link > on > > http://richhickey.github.com/clojure-contrib/shell-api.html I'm curious as to how you got here? I went to clojure.org, clicked API, clicked clojure.java.sh

Re: Knuth's literate programming "tangle" function in Clojure

2011-01-05 Thread Tim Daly
On 1/5/2011 10:20 PM, Ken Wesson wrote: On Wed, Jan 5, 2011 at 8:39 PM, Tim Daly wrote: On 1/5/2011 8:27 PM, Mark Engelberg wrote: On Wed, Jan 5, 2011 at 4:44 PM, Eric Schulte wrote: For the most up-to-date and comprehensive documentation of using Org-mode to work with code blocks (e.g. L

Re: feedback on first compojure app: Sportello

2011-01-05 Thread Alex Baranosky
I defined it as: (defn zip [seq-of-seqs] (apply map list seq-of-seqs)) -- 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

Re: ANN: ClojureQL 1.0.0 now released

2011-01-05 Thread Sean Corfield
On Wed, Jan 5, 2011 at 6:14 AM, LauJensen wrote: > Just a quick heads up that ClojureQL 1.0.0 is now released. All > interfaces should be final and there are no known bugs. Looks really interesting. We're about to start moving some of our web app back end over to Clojure and this might be a good

Re: clojure.java.shell hanging issues

2011-01-05 Thread Ken Wesson
On Wed, Jan 5, 2011 at 9:40 PM, Stuart Halloway wrote: >> On Wed, Jan 5, 2011 at 8:00 PM, Stuart Halloway >> wrote: >>> All the code you are referring to is in clojure.contrib. Note the comment >>> at the top of the files: >>> >>> ;; DEPRECATED in 1.2: Promoted to clojure.java.shell >> >> At the

Re: Knuth's literate programming "tangle" function in Clojure

2011-01-05 Thread Ken Wesson
On Wed, Jan 5, 2011 at 8:39 PM, Tim Daly wrote: > On 1/5/2011 8:27 PM, Mark Engelberg wrote: >> On Wed, Jan 5, 2011 at 4:44 PM, Eric Schulte >>  wrote: >>> >>> For the most up-to-date and comprehensive documentation of using >>> Org-mode to work with code blocks (e.g. Literate Programming or >>> R

Re: feedback on first compojure app: Sportello

2011-01-05 Thread Ken Wesson
On Wed, Jan 5, 2011 at 10:09 PM, Alex Baranosky wrote: > Thanks for the feedback Timothy, it is appreciated. > map-by key is a good name, I'll change it to that. > As far as I understand zip is different than flatten. > (zip [[1 2] [3 4]]) => ((1 3) (2 4)) > (zip [[1 2 3] [4 5 6]]) => ((1 4) (2 5)

Re: feedback on first compojure app: Sportello

2011-01-05 Thread Alex Baranosky
Thanks for the feedback Timothy, it is appreciated. map-by key is a good name, I'll change it to that. As far as I understand zip is different than flatten. (zip [[1 2] [3 4]]) => ((1 3) (2 4)) (zip [[1 2 3] [4 5 6]]) => ((1 4) (2 5) (3 6)) -- You received this message because you are subscrib

Re: clojure.java.shell hanging issues

2011-01-05 Thread kovas boguta
One effective way to do it is to change the background color of either the whole page, or of the title (eg API for shell - clojure-contrib v1.2 (stable)) An analogous case that is handled well I think: http://reference.wolfram.com/mathematica/NonlinearRegression/ref/NonlinearRegress.html On Wed

Re: Clojure 1.3 alpha 1 report - bitwise operations extremely slow

2011-01-05 Thread Stuart Halloway
The tickets that came forward from Assembla should have the same numbers they did in Assembla, since both ticketing systems start with ticket 1. Works in this case at least: http://dev.clojure.org/jira/browse/CLJ-446. Stu > Anyone know what this bug was called in the bug tracker? I can't find

Re: feedback on first compojure app: Sportello

2011-01-05 Thread Timothy Pratley
On Sun, Jan 2, 2011 at 11:30 AM, Alex Baranosky wrote: > Any comments on style, technique or just anythings I missed would be greatly > appreciated.  I'm really trying to expand my horizons and perfect the app as > a kind of kata. Sophisticated! I like it. I will take exception to the naming of "

Re: clojure.java.shell hanging issues

2011-01-05 Thread Stuart Halloway
> On Wed, Jan 5, 2011 at 8:00 PM, Stuart Halloway > wrote: >> All the code you are referring to is in clojure.contrib. Note the comment at >> the top of the files: >> >> ;; DEPRECATED in 1.2: Promoted to clojure.java.shell > > At the top of which files? If you mean the library's source code, it

Re: clojure.java.shell hanging issues

2011-01-05 Thread Stuart Halloway
If you send me a pointer to the link that still pointed to richhic...@github I will fix it. Thanks, Stu > Actually I did look at the source, but was just looking for the > relevant bits of code rather than perusing the frontmatter. > > The main "problem" was just that there are a lot of referen

Re: My first clojure web app

2011-01-05 Thread Timothy Pratley
Neat, looks pretty nice. I love invitations to nit pick! database.clj (defn complete-todo [id] (dosync (ref-set *todo* (vec (remove #(= (get % :id) id) @*todo*) 1) ref-set is unnecessary you could re-factor this to use alter. The result is the same, but semantically set only applies when the

Re: Clojure 1.3 alpha 1 report - bitwise operations extremely slow

2011-01-05 Thread Mark Engelberg
Anyone know what this bug was called in the bug tracker? I can't find it in the tracking database to determine the status. On Sat, Oct 2, 2010 at 5:42 PM, ataggart wrote: > I just submitted a patch for this issue. > > On Oct 1, 2:42 pm, ataggart wrote: >> I'm working on the latter right now.  N

Re: Knuth's literate programming "tangle" function in Clojure

2011-01-05 Thread Tim Daly
On 1/5/2011 8:27 PM, Mark Engelberg wrote: On Wed, Jan 5, 2011 at 4:44 PM, Eric Schulte wrote: For the most up-to-date and comprehensive documentation of using Org-mode to work with code blocks (e.g. Literate Programming or Reproducible Research) the online manual is also very useful. In lit

Re: clojure.java.shell hanging issues

2011-01-05 Thread kovas boguta
Actually I did look at the source, but was just looking for the relevant bits of code rather than perusing the frontmatter. The main "problem" was just that there are a lot of references to the old lib lying around in various forms of documentation that seemed current. On Wed, Jan 5, 2011 at 5:

Re: Knuth's literate programming "tangle" function in Clojure

2011-01-05 Thread Mark Engelberg
On Wed, Jan 5, 2011 at 4:44 PM, Eric Schulte wrote: > For the most up-to-date and comprehensive documentation of using > Org-mode to work with code blocks (e.g. Literate Programming or > Reproducible Research) the online manual is also very useful. In literate programming org-mode, will Clojure c

Re: Knuth's literate programming "tangle" function in Clojure

2011-01-05 Thread Tim Daly
On 1/5/2011 7:37 PM, Eric Schulte wrote: Hi Tim, I'm confused as to what parts of LP practice are not supported by Org-mode. Are you aware that Org-mode files can be exported to formats more suitable for publication and human consumption (e.g. woven). See http://orgmode.org/manual/Exporting.

actors vs. Message Passing for HPC

2011-01-05 Thread Sunil S Nandihalli
Hello everybody, While I am familiar with Message Passing .. I am not familiar with the actors model.. but I know about jobim the actor library for clojure.. While I am exploring more about it myself.. I would like to hear from others as to how actors compare to Message passing? can they be used i

Re: clojure.java.shell hanging issues

2011-01-05 Thread Ken Wesson
On Wed, Jan 5, 2011 at 8:00 PM, Stuart Halloway wrote: > All the code you are referring to is in clojure.contrib. Note the comment at > the top of the files: > > ;; DEPRECATED in 1.2: Promoted to clojure.java.shell At the top of which files? If you mean the library's source code, it's very likel

Re: clojure.java.shell hanging issues

2011-01-05 Thread Stuart Halloway
All the code you are referring to is in clojure.contrib. Note the comment at the top of the files: ;; DEPRECATED in 1.2: Promoted to clojure.java.shell clojure.java.shell is clojure itself, you should not need contrib at all. Cheers, Stu > Stumbled on another branch of documentation, the code

Re: Knuth's literate programming "tangle" function in Clojure

2011-01-05 Thread Eric Schulte
For the most up-to-date and comprehensive documentation of using Org-mode to work with code blocks (e.g. Literate Programming or Reproducible Research) the online manual is also very useful. http://orgmode.org/manual/Working-With-Source-Code.html also, for a good review of Org-mode's support for

Re: Knuth's literate programming "tangle" function in Clojure

2011-01-05 Thread Eric Schulte
Hi Tim, I'm confused as to what parts of LP practice are not supported by Org-mode. Are you aware that Org-mode files can be exported to formats more suitable for publication and human consumption (e.g. woven). See http://orgmode.org/manual/Exporting.html Tim Daly writes: > I looked at org-m

Re: Knuth's literate programming "tangle" function in Clojure

2011-01-05 Thread Eric Schulte
Hi, Seth writes: >>Just discovered org-mode myself --- does anyone know of guide to using >>it with clojure for a total newbie? > > I havent actually used it for clojure per se. I was just imagining how > it could be used. You have the ability to embed arbitrary code (from > many different langu

Re: Knuth's literate programming "tangle" function in Clojure

2011-01-05 Thread Eric Schulte
Seth writes: > The literate programming is actually a contrib to org-mode. > http://orgmode.org/worg/org-contrib/babel/ > This has been moved out of contrib and into the Org-mode core, so with recent versions of Org-mode the code block "Literate Programming" and "Reproducible Research" support i

Re: clojure.java.shell hanging issues

2011-01-05 Thread kovas boguta
Stumbled on another branch of documentation, the code described at https://github.com/clojure/clojure-contrib/blob/6e721ff777dd52801cafe693868d8118a62076de/src/main/clojure/clojure/contrib/shell.clj#L86 is also without the patches. On Wed, Jan 5, 2011 at 4:41 PM, kovas boguta wrote: > Hi, thank

Re: clojure.java.shell hanging issues

2011-01-05 Thread kovas boguta
Hi, thanks for the quick response. Looking at the source code I'm not sure if the patches were applied. Maybe there was a "regression". The symptoms seem consistent with what was supposed to have been fixed. Following the clojure.org api docs, I clicked through on the source code link on http://

Re: Funding 2011?

2011-01-05 Thread Sergey Didenko
I completely understand the Rich desire to keep flexibility and fun in Clojure development. And I think it is important for the success of Clojure. As for me a donation is much more about what is already done and enforces little if any obligations. I hope Rich will accept them from people who dec

Re: clojure.java.shell hanging issues

2011-01-05 Thread Stuart Halloway
(1) The ticket you reference is marked completed and the patches went in last July. Is it possible you are seeing a different problem? (2) Clojure does not depend on anything in the clojure.contrib namespace. (3) Running inside a pmap should be ok, but make sure you understand the interleaving

Re: Notice: c.c.json parser and clojure.lang.Ratio

2011-01-05 Thread Michael Ossareh
> > I'm unclear on what the correct course of action in this case should be. > However this can be solved by transforming the ratios before and after to the jsonification: https://gist.github.com/767204 (clojure.walk/postwalk transform-ratio {:a [3/4] :b {:foo {:bar 3/4} :bar {:a 1}}}) => {:a [

Re: Funding 2011?

2011-01-05 Thread Daniel Werner
On 4 January 2011 19:20, Jon Seltzer wrote: > Why not update the funding from simple donation to a purchase of > clojure/core software like a refined version of the eclipse plugin or > some other incentive based approach?  I think I understand why rich > might find 'donation' approach a bit uncomf

Re: ANN: Gloss, a byte-format DSL

2011-01-05 Thread Eric Schulte
also, here's a patch to Gloss which I've used locally but which may be generally useful. Cheers -- Eric "Eric Schulte" writes: > Thanks for sharing this library, I found reading your code to be very > useful. > > I need to be able to read and write elf files from within Clojure code, > and Glo

Re: Compiling dynamically created namespaces, without on-disk source code?

2011-01-05 Thread kovas boguta
Thanks for the suggestion. My cursory googling has given me the impression that is a function of the classloader, or otherwise requiring some serious hackery. See http://stackoverflow.com/questions/2737285/java-is-there-a-way-to-obtain-the-bytecode-for-a-class-at-runtime The particular use case I

clojure.java.shell hanging issues

2011-01-05 Thread kovas boguta
Hello everyone, A while back there was some discussion on the fact that clojure.java.shell can hang under various circumstances, and some patches were submitted: http://dev.clojure.org/jira/browse/CLJ-392?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel But doesn't seem to h

Re: ANN: Gloss, a byte-format DSL

2011-01-05 Thread Eric Schulte
Thanks for sharing this library, I found reading your code to be very useful. I need to be able to read and write elf files from within Clojure code, and Gloss initially looked like a good option. However much of the streaming support and frame-based conception got in the way of my particular nee

Re: problem with stream

2011-01-05 Thread Ken Wesson
On Wed, Jan 5, 2011 at 4:40 PM, rainerh wrote: > Hello everybody, > > I'm trying to use clojure to parse web sites. Unfortunately there is > some problem with following code (used library is Apache Commons HTTP > Client): > > (defn request [url] >  (let [client (new org.apache.http.impl.client.Def

problem with stream

2011-01-05 Thread rainerh
Hello everybody, I'm trying to use clojure to parse web sites. Unfortunately there is some problem with following code (used library is Apache Commons HTTP Client): (defn request [url] (let [client (new org.apache.http.impl.client.DefaultHttpClient)] (with-open [rdr (reader

Re: #clojure in 2010

2011-01-05 Thread Michael Ossareh
On Tue, Jan 4, 2011 at 19:06, Miki wrote: > If someone is interested in some other statistics, please let me know and > I'll try to make it happen. > > The most talkative person per session would be interesting :) though perhaps session time is a PITA to establish particularly across days boundar

Notice: c.c.json parser and clojure.lang.Ratio

2011-01-05 Thread Michael Ossareh
Hi, It turns out that c.c.json/json-str will spit out Ratio's in a manner which is not json compliant. (json-str [3/4]) => "[3/4]" This parses correctly in the reverse situation: (read-json (json-str [3/4])) => [3/4] When being read [1] we switch over to using the clojure form reader so this p

Re: Trick to getting bindings in a repl

2011-01-05 Thread Chas Emerick
Clojure's vars maintain bindings in ThreadLocals[1]. I'm pretty sure accessing ThreadLocals of other threads can't be done. Looking at ThreadLocal and Thread sources, you might be able to dig around private and package-private fields to get at them. Generally a bad idea. FWIW, the Enclojure REP

Re: ANN: Tom Faulhaber: "Lisp, Functional Programming, and the State of Flow" video available

2011-01-05 Thread Chris Riddoch
On Mon, Jan 3, 2011 at 11:14 AM, Alan Dipert wrote: > I'm happy to announce that Tom Faulhaber's Conj talk, "Lisp, > Functional Programming, and the State of Flow" is now available on > Clojure's blip.tv page: http://clojure.blip.tv/file/4521022/ Thanks for your work on making the videos availabl

Re: My first Clojure program: request for code review

2011-01-05 Thread Benny Tsai
Hi Ken, Sorry for the very late response; I've been away for a friend's wedding. Though I'm not sure if I will end up using this macro frequently, it was highly educational to step through its inner workings. Thank you very much for putting it together. On Dec 23 2010, 11:07 pm, Ken Wesson wro

Re: Knuth's literate programming "tangle" function in Clojure

2011-01-05 Thread Tim Daly
On 1/5/2011 9:27 AM, Seth wrote: Just discovered org-mode myself --- does anyone know of guide to using it with clojure for a total newbie? I havent actually used it for clojure per se. I was just imagining how it could be used. You have the ability to embed arbitrary code (from many different

Re: Emacs `align' function customization for Clojure

2011-01-05 Thread Scott Jaderholm
On Tue, Jan 4, 2011 at 9:10 PM, Eric Schulte wrote: > I wonder if anyone else has written any similar Emacs alignment rules > for Clojure which they would be interested in sharing? Alignment rules for let and defroutes are at the top of my most wanted list. (let [n(count content-

Re: Faster ring reload middleware

2011-01-05 Thread David Jagoe
Hi James, On 5 January 2011 18:50, James Reeves wrote: > Ring enhancement and patches are best posted to the "ring-clojure" > group. There's a chance they might be missed if only posted to the > Clojure group. Ok, will do that in future. > > Regarding wrap-reload, your enhancements would put it

Re: Faster ring reload middleware

2011-01-05 Thread James Reeves
Ring enhancement and patches are best posted to the "ring-clojure" group. There's a chance they might be missed if only posted to the Clojure group. Regarding wrap-reload, your enhancements would put it halfway between the current wrap-reload, and the wrap-reload-modified middleware available as a

Re: if-let bug

2011-01-05 Thread David
Nevermind - it was late, and I found the error message cryptic. Sorry for throwing up a red herring. On Jan 5, 5:30 am, Alessio Stalla wrote: > On Wednesday, January 5, 2011 11:06:34 AM UTC+1, David wrote: > > java.lang.String cannot be cast to clojure.lang.IFn > >   [Thrown class java.lang.Cla

Emacs `align' function customization for Clojure

2011-01-05 Thread Eric Schulte
Hi, I just recently became aware of the built-in `align' [1] function for Emacs while looking for a nice way to auto-align some hash-maps in my Clojure code. This was easily done using align with the following piece of customization. #+begin_src emacs-lisp (add-to-list 'align-lisp-modes 'cloju

Faster ring reload middleware

2011-01-05 Thread David Jagoe
G'day, Ring ships with some development middleware that reloads the supplied namespaces every request. This is fantastic for quick iterative development, particularly because the JVM takes so long to start. However as soon as you have more than a few namespaces every request becomes rather slow -

Re: ANN: ClojureQL 1.0.0 now released

2011-01-05 Thread Nicolas Buduroi
Congratulation, you've finally made it! P.S.: Nice job on the website! On Jan 5, 9:14 am, LauJensen wrote: > Hey everybody, > > Just a quick heads up that ClojureQL 1.0.0 is now released. All > interfaces should be final and there are no known bugs. Works out of > the box with PostgreSQL and MyS

Re: Knuth's literate programming "tangle" function in Clojure

2011-01-05 Thread Seth
>Just discovered org-mode myself --- does anyone know of guide to using >it with clojure for a total newbie? I havent actually used it for clojure per se. I was just imagining how it could be used. You have the ability to embed arbitrary code (from many different languages). You can edit the code

Re: How to write a protected java method in clojure

2011-01-05 Thread Laurent PETIT
2011/1/5 Thilina Piyasundara > I need to know the way we can write a clojure code for a program like > this. > > --- > import javax.servlet.ServletException; > import javax.servlet.http.HttpServletRequest; > import clojure.lang.RT; > import com.vaadin.Applicati

ANN: ClojureQL 1.0.0 now released

2011-01-05 Thread LauJensen
Hey everybody, Just a quick heads up that ClojureQL 1.0.0 is now released. All interfaces should be final and there are no known bugs. Works out of the box with PostgreSQL and MySQL but the compiler is a multimethod so you can implement your own backend if you need to work with other database back

How to write a protected java method in clojure

2011-01-05 Thread Thilina Piyasundara
I need to know the way we can write a clojure code for a program like this. --- import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import clojure.lang.RT; import com.vaadin.Application; import com.vaadin.terminal.gwt.server.Abst

Re: Knuth's literate programming "tangle" function in Clojure

2011-01-05 Thread Seth
The literate programming is actually a contrib to org-mode. http://orgmode.org/worg/org-contrib/babel/ Ive actually used it to create my emacs.el, by having code in emacs.org and have init.el tangle out the emacs code. Of course i never documented anything and did it for the novelty of being able

Re: ANN: Gloss, a byte-format DSL

2011-01-05 Thread pepijn (aka fliebel)
Nothing :( $ lein repl "REPL started; server listening on localhost:32399." user=> (use '[gloss core io]) nil user=> (defcodec t (repeated (string :utf-8 :delimiters ["\n"]) :delimiters ["\0"])) #'user/t user=> (decode t (.getBytes "blabla\nhihi\njg\0 g\n\0")) java.lang.Exception: Cannot evenl

Re: if-let bug

2011-01-05 Thread Alessio Stalla
On Wednesday, January 5, 2011 11:06:34 AM UTC+1, David wrote: > > Consider the two definitions: > > (defn if-let-good [str] > (if-let [rest (seq (drop-while (partial = \a) str))] > (first rest) > "empty")) > > (defn if-let-bad [seq] > (if-let [rest (seq (drop-while (partial = \a)

Re: if-let bug

2011-01-05 Thread Laurent PETIT
Hello David, what's the question ? 2011/1/5 David > Consider the two definitions: > > (defn if-let-good [str] > (if-let [rest (seq (drop-while (partial = \a) str))] >(first rest) >"empty")) > > (defn if-let-bad [seq] > (if-let [rest (seq (drop-while (partial = \a) seq))] >(first r

if-let bug

2011-01-05 Thread David
Consider the two definitions: (defn if-let-good [str] (if-let [rest (seq (drop-while (partial = \a) str))] (first rest) "empty")) (defn if-let-bad [seq] (if-let [rest (seq (drop-while (partial = \a) seq))] (first rest) "empty")) The only difference between them is the name of