[ANN] fsrun : file change notifier high order lein task

2013-11-24 Thread Deniz Kurucu
fsrun is a simple high order lein task that run some other tasks when a file modification occurs. Originally, i wanted to run my clojurescript tests automatically and created fsrun. It is my first clojure project, so please keep that in mind :) github : https://github.com/makkalot/fsrun Thanks.

[ANN] clojure.java.jdbc 0.3.0-beta2 BREAKING CHANGES!

2013-11-24 Thread Sean Corfield
Based on feedback from the community, I have released clojure.java.jdbc 0.3.0-beta2 to Maven Central. This includes two very important changes: * The clojure.java.jdbc.sql and clojure.java.jdbc.ddl namespaces have been removed. * The API functions that were already marked as deprecated have moved

Spit seems to use incorrect line terminator on Windoze

2013-11-24 Thread Stefan Kamphausen
I agree with Alex. I would not want any magic to happen to my string. Best, Stefan -- -- 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 - plea

Re: [ClojureScript] ANN: ClojureScript 0.0-2075

2013-11-24 Thread Tim Visher
Hi Mark, On Sun, Nov 24, 2013 at 6:54 PM, Mark Mandel wrote: > I just upgraded from 0.0-2030 > > And now when I run lein-cljsbuild, I keep getting the error: > Compiling "resources/public/js/main.js" from ["src-cljs"]... > Compiling "resources/public/js/main.js" failed. > java.lang.AssertionError

Re: Spit seems to use incorrect line terminator on Windoze

2013-11-24 Thread Tim Visher
On Sun, Nov 24, 2013 at 7:53 PM, Cedric Greevey wrote: > I already have more than enough user/pass pairs to keep straight. I'm not > creating yet another one just to submit one lousy bug report that I've > *already* posted where I know the developers often read. You can try something like LastPas

Re: Spit seems to use incorrect line terminator on Windoze

2013-11-24 Thread Tim Visher
Sorry. I didn't read the OP carefully enough. I agree with Alex. The JVM (and no platform I'm aware of) never has and probably never will offer to convert your end of line characters for you to whatever your target system is. On Sun, Nov 24, 2013 at 6:09 PM, Alex Miller wrote: > I do not think t

Re: Spit seems to use incorrect line terminator on Windoze

2013-11-24 Thread Cedric Greevey
I already have more than enough user/pass pairs to keep straight. I'm not creating yet another one just to submit one lousy bug report that I've *already* posted where I know the developers often read. On Sun, Nov 24, 2013 at 7:32 PM, Timothy Baldridge wrote: > > Not everyone wants to go to that

Re: Spit seems to use incorrect line terminator on Windoze

2013-11-24 Thread Timothy Baldridge
> Not everyone wants to go to that much trouble just to tell > everyone what he already told everyone via this list. So instead you ask that language maintainers read every email you write, in the off-chance that you might be reporting a bug? Don't be ridiculous. If you think you might have a bug,

Re: Releasing Caribou today: Open Source Clojure Web Ecosystem

2013-11-24 Thread Jim Crossley
Prasanna, Ryan and Justin, Hi. I just got around to playing with Caribou today. Very nice! I was happy to see you including Immutant config in the application template, but you don't need it. Immutant will happily bootstrap a deployed app using the :ring options map in project.clj. As long as you

Re: [ClojureScript] ANN: ClojureScript 0.0-2075

2013-11-24 Thread Mark Mandel
I just upgraded from 0.0-2030 And now when I run lein-cljsbuild, I keep getting the error: Compiling "resources/public/js/main.js" from ["src-cljs"]... Compiling "resources/public/js/main.js" failed. java.lang.AssertionError: Assert failed: :output-dir "/home/mark/workspace/chaperone/target/cljsbu

Spit seems to use incorrect line terminator on Windoze

2013-11-24 Thread Alex Miller
I do not think this is a bug. Spit takes string content and puts it in a file. I do not expect it to modify that string. It's up to you to create the proper string. Alex -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, sen

Re: Spit seems to use incorrect line terminator on Windoze

2013-11-24 Thread Cedric Greevey
Not everyone wants to go to that much trouble just to tell everyone what he already told everyone via this list. On Sun, Nov 24, 2013 at 4:56 PM, Timothy Baldridge wrote: > Anyone can create an account on JIRA and create a ticket. > > Timothy > > > On Sun, Nov 24, 2013 at 2:19 PM, Cedric Greevey

[ANN] Optimus - a Ring middleware for frontend performance optimization.

2013-11-24 Thread Magnar Sveen
I just open sourced optimus. README and code here: https://github.com/magnars/optimus Optimus is a Ring middleware for frontend performance optimization. It serves your static assets: - in production: as optimized bundles - in development: as unchanged, individual files In other words: D

Re: Spit seems to use incorrect line terminator on Windoze

2013-11-24 Thread Timothy Baldridge
Anyone can create an account on JIRA and create a ticket. Timothy On Sun, Nov 24, 2013 at 2:19 PM, Cedric Greevey wrote: > On Sun, Nov 24, 2013 at 3:36 PM, Tim Visher wrote: > >> Sounds like a bug to me. You could open a ticket to get further >> discussion going. >> > > Actually, TTBOMK I can

experiments in term-rewriting

2013-11-24 Thread kovas boguta
Hi, I've been doing some experiments with term-rewriting in clojure https://github.com/kovasb/combinator This is a very limited project aimed at maximizing performance for a particular term-rewriting system. The results show that clojure is a promising platform for this kind of computation. See

Re: Spit seems to use incorrect line terminator on Windoze

2013-11-24 Thread Cedric Greevey
On Sun, Nov 24, 2013 at 3:36 PM, Tim Visher wrote: > Sounds like a bug to me. You could open a ticket to get further > discussion going. > Actually, TTBOMK I cannot, since I think one needs an account at some site I don't have an account at to do that. But someone who does and has a 'doze box ca

Re: Breaking out of a map type function

2013-11-24 Thread David Simmons
> > Jernau - that looks perfect. I'll give it a go. >> > cheers 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 Note that posts from new members are moderated - please be patien

Re: Spit seems to use incorrect line terminator on Windoze

2013-11-24 Thread Tim Visher
Sounds like a bug to me. You could open a ticket to get further discussion going. On Sun, Nov 24, 2013 at 12:20 AM, Cedric Greevey wrote: > (spit "C:\\foo.txt" "test1\n") > (spit "C:\\foo.txt" "test2\n" :append true) > > open file in notepad => "test1test2" > > (spit "C:\\foo.txt" "test1\r\n") >

Re: Breaking out of a map type function

2013-11-24 Thread Jernau
Hi Dave, Another option is to use the formacro's while clause to stop processing as soon as you hit an error. Here's a basic example with a simple my-func that returns a string-based error to give you an idea of how it could look: (defn my

Re: Breaking out of a map type function

2013-11-24 Thread David Simmons
> > Many thanks James > -- -- 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 th

Re: Breaking out of a map type function

2013-11-24 Thread James Reeves
Something like: (defn safe-sum [coll] (reduce (fn [s x] (if x (+ x s) (reduced s))) coll)) This will compute the sum until it hits a "falsey" (i.e. nil or false) value. Alternatively, you could write it: (defn safe-sum [coll] (apply + (take-while identity coll))) - James On 24 November 20

Re: Breaking out of a map type function

2013-11-24 Thread David Simmons
> > @James - I'll take a look at take-while @Michael - I thought using exceptions to break out of a stuff was considered bad practice? cheers Davew -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure

Re: Breaking out of a map type function

2013-11-24 Thread Michael Gardner
On Nov 24, 2013, at 10:19 , David Simmons wrote: > I wish to process each item in a vector. I know I can use map to do this e.g. > (map my-func my-vector). My problem is that I need to be able to break out of > the map if my-func returns an error when processing any of the items. I know > map

Re: Breaking out of a map type function

2013-11-24 Thread David Simmons
Hi Stu I understand Reduce but can't quite see how this would work. Don't suppose you'd have a simple example would you? Many thanks 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

Re: Breaking out of a map type function

2013-11-24 Thread James Reeves
Another option is to take-while the values in the sequence are valid, and then map over the ones that are. - James On 24 November 2013 16:50, Stuart Halloway wrote: > Hi Dave, > > You can use reduce for this job, and have the reducing function return a > (reduced retval) when you want to break

Re: Breaking out of a map type function

2013-11-24 Thread Stuart Halloway
Hi Dave, You can use reduce for this job, and have the reducing function return a (reduced retval) when you want to break out. Cheers, Stu On Sun, Nov 24, 2013 at 11:19 AM, David Simmons wrote: > Hi All. > > Still struggling to get my head around Clojure - this is attempt number 4. > > I wish

Breaking out of a map type function

2013-11-24 Thread David Simmons
Hi All. Still struggling to get my head around Clojure - this is attempt number 4. I wish to process each item in a vector. I know I can use map to do this e.g. (map my-func my-vector). My problem is that I need to be able to break out of the map if my-func returns an error when processing any

Re: Clojure CLR versioning and binary downloads

2013-11-24 Thread Shantanu Kumar
I am trying to run some tests (that worked fine with Mono+ClojureCLR 1.4.1) in Mono+ClojureCLR 1.5.0 from SourceForge and finding the below exception: $ # CLOJURE_LOAD_PATH is configured properly $ mono "/path/to/clojure-clr-1.5.0-Release-4.0/Clojure.Main.exe" -i /tmp/intermediate-file -e "(use

Re: preferred way to dereference a ref: outside or inside dosync?

2013-11-24 Thread Jim - FooBar();
On 23/11/13 14:17, Justin Smith wrote: you may want to make that (defonce generate-keys (get-key-generator)) and even better, add a "start" argument to get-key-generator so you can persist across restarts of the vm. Of course in a real app the key should be serialized to a persistent, consis

Re: Red Tape Form Validation - a style question

2013-11-24 Thread Mimmo Cosenza
Nice lib. I didn't know about it. Personally I use https://github.com/cemerick/valip for form validation because it allows me to share the validation rules (and unit tests too) between clojure and clojurescript (by adding clojurescript.test, clix and cljsbuild crossovers setting) and still be a

[ANN] cljs-start 0.0.5

2013-11-24 Thread Mimmo Cosenza
I just updated the cljs-start lein template which allows you to start creating you wonderful cljs lib with batteries included. https://github.com/magomimmo/cljs-start > lein new cljs-start yourlibname > cd yourlibname > lein do compile, test > lein rep user=> (run) ; run the http server to be r

Red Tape Form Validation - a style question

2013-11-24 Thread David Simmons
Hi Folks I've been looking at the red-tape form validation library and really like it (especially coming from a Django background). The one thing that makes me nervous is that the when validating data it uses exceptions if the data is invalid. I'd read somewhere that you should only use except

Re: java.jdbc DSLs (java.jdbc.sql / java.jdbc.ddl)

2013-11-24 Thread Colin Yates
Perfect. --- Original Message --- From: "Sean Corfield" Sent: 24 November 2013 05:26 To: clojure@googlegroups.com Subject: Re: java.jdbc DSLs (java.jdbc.sql / java.jdbc.ddl) On Sat, Nov 23, 2013 at 8:27 PM, Keith Irwin wrote: > Personally, the DSL doesn’t bother me at all. (Just a data point.)