Do you like the Clojure syntax?

2013-08-12 Thread Răzvan Rotaru
Hi, I'm curious about the general opinion on the Clojure syntax, whether people actually like it or just use it because it provides macros. So I would like to ask you to participate in a poll. Thank You. Here's the link: https://docs.google.com/forms/d/1GSgfkeThpUYlgFVzhhNIgA1JbTilu6S9eudq_Sbxl

Re: Do you like the Clojure syntax?

2013-08-12 Thread Alan Forrester
On 12 Aug 2013, at 08:52, Răzvan Rotaru wrote: > Hi, > > I'm curious about the general opinion on the Clojure syntax, whether people > actually like it or just use it because it provides macros. So I would like > to ask you to participate in a poll. Thank You. > > Here's the link: > https://d

Re: Do you like the Clojure syntax?

2013-08-12 Thread Softaddicts
isolating the syntax from the other features of the language is a like removing a part from a rocket engine however small it may be and wondering if it will lift off without it. Macros are the first thing you may think of related to syntax change I am convinced that other areas benefit from the

Re: Do you like the Clojure syntax?

2013-08-12 Thread Jay Fields
I'll repeat something I've said publicly several times (sorry if you've previously heard it) - My first exposure to Clojure was a Stu Halloway blog post: http://thinkrelevance.com/blog/tags/java-next. At the time I was writing mostly Ruby & some Java. I remember finding Clojure syntax repulsive. D

Re: newbie struggling with Clooj and jars

2013-08-12 Thread Jason Turner
Thanks very much - that explains it, I didn't realize that Leiningen behaviour had changed from what Clooj expects - I could see the jars were in the Maven repo. On Monday, 12 August 2013 00:51:10 UTC+1, yair wrote: > > The problem is that clooj depends on leiningen 1 which used to have the > d

Re: Should ` ` be trimmed using `clojure.string/trim`? EOM

2013-08-12 Thread Tim Visher
Hi Andy, On Mon, Aug 12, 2013 at 12:17 AM, Andy Fingerhut wrote: > Clojure's clojure.string/trim uses Java's String/trim, but > clojure.string/triml and trimr use Java's Character/isWhitespace to > determine which characters are white space to remove. CLJ-935 has a > suggested patch to make them

Re: [ANN] bouncer 0.2.3-beta4

2013-08-12 Thread Leonardo Borges
Hi All, I just pushed 0.2.3 final to Clojars. There are no changes since beta4 below. As always, feedback is welcome. Cheers, Leonardo Borges www.leonardoborges.com On Wed, Jul 17, 2013 at 10:12 AM, Leonardo Borges < leonardoborges...@gmail.com> wrote: > Hi all, > > bouncer is a validation DS

Re: Do you like the Clojure syntax?

2013-08-12 Thread Colin Yates
I think that jarring effect is actually beneficial, it helps stop people carrying invalid assumptions across. It is all too easy to slip into writing code the old way using the new tool. The lack of familiarity between LISPs and Java (Groovy, Scala, rails etc.) makes it that much harder to sl

(newbie-ish) Modelling question - multi methods?

2013-08-12 Thread Colin Yates
Hi all, I have a strategy that defines handling a woosey. Most woosey handlers are going to need some help, maybe a wibbly and a woobly. In OO land I would have a WooseyHandler { void handle(Woosey woosey); }. The implementations would then receive Wibblies and Wooblies via dependency inject

Re: [ANN] Leiningen 2.3.0 released

2013-08-12 Thread Sean Corfield
On Sat, Aug 10, 2013 at 8:26 AM, Phil Hagelberg wrote: > None of these problems have had anything to do with SSL. On Windows it definitely has been a problem in the past. I'm pretty sure some users have run into problems with the S3 Amazon SSL certificate in the past on non-Windows platforms too,

Re: Leiningen 2.3.0 and uberjar

2013-08-12 Thread Sean Corfield
Or just: lein do clean, compile, uberjar On Sun, Aug 11, 2013 at 11:07 AM, Christian Sperandio wrote: > The workaround works fine, thanks for your help :) > > > I give below the workaround, thus everybody can get it: > > $ lein clean && lein compile && lein uberjar > > -- > -- > You received thi

Re: [ANN] Leiningen 2.3.0 released

2013-08-12 Thread John Gabriele
On Saturday, August 10, 2013 11:26:37 AM UTC-4, Phil Hagelberg wrote: > > On Friday, August 9, 2013 10:07:39 PM UTC-7, Sean Corfield wrote: > > None of these problems have had anything to do with SSL. > > It's been two things: the self-install function was moved, and the S3 ACL > was incorrect due

Re: [ANN] Clojure Cheatsheet for Emacs

2013-08-12 Thread Philip Potter
I just tried to install it from MELPA but get a 404: http://melpa.milkbox.net/packages/clojure-cheatsheet-20130808.2305.el *sadface* On 9 August 2013 22:40, Andy Fingerhut wrote: > Very nice, Kris! > > In case anyone wants to use the Clojure cheatsheet offline using a web > browser, in a form

Re: [ANN] Clojure Cheatsheet for Emacs

2013-08-12 Thread Michael Fogus
The number of cheatsheets is growing (this is a good thing IMO) and I wonder if it would be worth aggregating them all under one location? I have my own ClojureScript cheatsheet ( https://github.com/readevalprintlove/clojurescript-cheatsheet) and the CLJS synonyms page (http://himera.herokuapp.com

Re: Do you like the Clojure syntax?

2013-08-12 Thread David Pollak
A couple of quick reactions... The survey itself is too "flat". It's like asking "do you like red or green?" Well... I like green on my walls, but I like red on my ties. Scala has macros and a much richer syntax (although doing anything like core.async with Scala macros might be like putting tabs

Feature toggles via Leiningen profiles

2013-08-12 Thread Michal Till
I would like to have two different implemntation of something in my project and switch between them based on a Leiningen profile. For example I have abstracted all storage-related functions to app.repository and I have namespace app.stoage.fs for development and app.storage.sql for production.

Re: Do you like the Clojure syntax?

2013-08-12 Thread Phillip Lord
David Pollak writes: > The survey itself is too "flat". It's like asking "do you like red or > green?" Well... I like green on my walls, but I like red on my ties. I'd agree with this. "Do you like" is also a relative thing, I think. I mean, compared to what? Java? Or common lisp. The thing th

Re: [ANN] Leiningen 2.3.0 released

2013-08-12 Thread Phillip Lord
Sean Corfield writes: > On Sat, Aug 10, 2013 at 8:26 AM, Phil Hagelberg wrote: >> None of these problems have had anything to do with SSL. > > On Windows it definitely has been a problem in the past. I'm pretty > sure some users have run into problems with the S3 Amazon SSL > certificate in the

Re: (newbie-ish) Modelling question - multi methods?

2013-08-12 Thread Russell Mull
Generally, I'd go for a simple strategy (ahem) like this: (defn make-handler [wibblie wooblie] (fn [woosy] )) But perhaps there's something about your case that I don't understand; I'm not entirely sure where multimethods need to come into it, unless you need to change which handler you'r

Re: ANN RabbitMQ tutorials ported to Clojure

2013-08-12 Thread Robert Pitts
This is awesome, thanks for your efforts! Wish this was around a few months ago, but I imagine people will be well served by it in the future :) On Monday, August 12, 2013 2:15:20 AM UTC-4, Michael Klishin wrote: > > I'm happy to announce that 5 out of 6 RabbitMQ tutorials [1] are now > availab

Re: Question on `cljx` and `lein-dalap`

2013-08-12 Thread Chas Emerick
On Aug 11, 2013, at 5:19 PM, Shantanu Kumar wrote: > Hi, > > I am thinking about how to use Cljx correctly in my projects (for > portability); I have few questions: > > 1. I understand the Cljx plugin generates .clj and .cljs source code in > target/classes destination. Does that mean, when I

Re: Do you like the Clojure syntax?

2013-08-12 Thread Softaddicts
In 2008 I was surveying alternatives to Java, I wanted something concise and needed better support for concurrency, parallelism , ... We had a prototype written in Java but I could not see how we could get a decent product out using Java without making the business case crumble. I looked at Scala

Deft: A Typeshaping Library

2013-08-12 Thread Steve Shogren
Hello everyone! I recently created this libraryto solve a problem I was having with maps. I am not sure if it would be helpful to anyone else, I would appreciate any feedback. The point of the library is to provide some run-time "typeshape" checking of C

Re: (newbie-ish) Modelling question - multi methods?

2013-08-12 Thread Colin Yates
Hi Russell, Maybe the concrete case will help. I have a single entry point into which Commands can be posted, let's call it a CommandGateway. This gateway will do many things, the least of which will be to delegate the handling of the command to the command handler registered with the gateway.

Re: [ANN] Leiningen 2.3.0 released

2013-08-12 Thread Greg
Hey Phil, thanks for the update! > As usual, you can get the latest version by running `lein upgrade`. I used Homebrew to upgrade. Do you happen to know what the relationship is between your `lein upgrade` command and the `brew upgrade leiningen` command? For example, if lein was installed view

[ANN] Marginalia has a new home

2013-08-12 Thread Fogus
A few days ago I posted that I was looking for a new home for Marginalia[1] and today I am happy to say that I have found one. Gary Deer (https://github.com/gdeer81) has graciously agreed to take the reins and push Marginalia in new and exciting directions. Two projects fall under the Marginal

Re: [ANN] Leiningen 2.3.0 released

2013-08-12 Thread Phil Hagelberg
On Monday, August 12, 2013 6:52:55 AM UTC-7, Sean Corfield wrote: > On Windows it definitely has been a problem in the past. I'm pretty > sure some users have run into problems with the S3 Amazon SSL > certificate in the past on non-Windows platforms too, but I'll defer > to you regarding the no

Re: [ANN] Clojure Cheatsheet for Emacs

2013-08-12 Thread Andy Fingerhut
I have added links to Kris's Clojure Emacs cheatsheet, and Michael's ClojureScript cheatsheets, here: http://jafingerhut.github.io That page has had links to tooltip versions of the Clojure/JVM HTML & PDF cheatsheets for some time now, and is linked from the top of http://clojure.org/cheatshe

Re: [ANN] Leiningen 2.3.0 released

2013-08-12 Thread Phil Hagelberg
On Monday, August 12, 2013 9:29:53 AM UTC-7, Greg wrote: > I used Homebrew to upgrade. Do you happen to know what the relationship is between your `lein upgrade` command and the `brew upgrade leiningen` command? We include a `bin/lein-pkg` script for downstream packagers like Debian, homebrew,

Re: Do you like the Clojure syntax?

2013-08-12 Thread Steven Degutis
I love Clojure's syntax, and not because of macros. I love it because it's both extremely consistent and extremely simple. Just some quick examples: - In Ruby, blocks use || for param lists and functions use (). In Clojure it's always the same. - In Ruby if you pass a block argument to a

Re: Do you like the Clojure syntax?

2013-08-12 Thread Steven Degutis
I also like Clojure's syntax because it shows me the structure of my function more clearly than does the imperative code I've written in other languages. My functions always turn out in either pyramids or triangles or walls. Each function's shape indicates its nature very visually, including poten

Re: [ANN] Clojure Cheatsheet for Emacs

2013-08-12 Thread Rostislav Svoboda
> The number of cheatsheets is growing (this is a good thing IMO) It's not about having one brilliant cheatsheet. The ultimate goal is to get rid off them all. -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to c

Lazy group-by for sorted maps?

2013-08-12 Thread Colin Yates
Is there such a thing as a lazy group-by for a sequence of elements when the elements are sorted on the criteria used to group them? I can imagine how one would look in a few lines of Clojure code but I am surprised there isn't one already. My actual criteria is that I am pulling things from a

Re: Do you like the Clojure syntax?

2013-08-12 Thread Colin Yates
Nice tip - thanks. On Monday, 12 August 2013 18:09:56 UTC+1, Steven Degutis wrote: > > I also like Clojure's syntax because it shows me the structure of my > function more clearly than does the imperative code I've written in other > languages. > > My functions always turn out in either pyramids

Re: Lazy group-by for sorted maps?

2013-08-12 Thread Jonah Benton
Sounds like a job for partition-by: http://clojuredocs.org/clojure_core/clojure.core/partition-by On Mon, Aug 12, 2013 at 1:55 PM, Colin Yates wrote: > Is there such a thing as a lazy group-by for a sequence of elements when > the elements are sorted on the criteria used to group them? I can

Re: Lazy group-by for sorted maps?

2013-08-12 Thread Colin Yates
Great - thanks! On 12 August 2013 19:07, Jonah Benton wrote: > > Sounds like a job for partition-by: > > http://clojuredocs.org/clojure_core/clojure.core/partition-by > > > > On Mon, Aug 12, 2013 at 1:55 PM, Colin Yates wrote: > >> Is there such a thing as a lazy group-by for a sequence of elem

ANN Elastisch 1.2.0 is released

2013-08-12 Thread Michael Klishin
Elastisch [1] is a small, feature complete Clojure client for ElasticSearch that provides both HTTP and native transports and has solid documentation. 1.2.0 is a minor feature release. Release notes: http://blog.clojurewerkz.org/blog/2013/08/11/elastisch-1-dot-2-0-is-released/ 1. http://clojureel

Clojure Developer searching small work for next 30 days

2013-08-12 Thread resatori
My experience in clojure programming: - developed a video game with it in (playable here: resatori.com/cyber-dungeon-quest) - developed a multi agent exploration simulation (JAVA SWING, multithreaded using refs) I finished university a few months ago and I still do not have a j

Re: Feature toggles via Leiningen profiles

2013-08-12 Thread Karsten Schmidt
Hi Michal, have a look at this gist to see how this can be done: https://gist.github.com/postspectacular/6214886 Best, K. -- Karsten Schmidt http://postspectacular.com | http://toxiclibs.org | http://thi.ng -- -- You received this message because you are subscribed to the Google Groups "Clojur

core.logic - getting good at writing non-terminating programs

2013-08-12 Thread Mark
I needed to extend rembero to handle removing multiple items. For example (rememberallo [1 2 3] [1 2 3 4 5] [4 5]) is true. My relation is: (l/defne remberallo [s l o] ([() l l]) ([[h . r] _ _] (l/fresh [o-h] (l/rembero h l o-h) (remberallo r o-h o It's go

Re: Feature toggles via Leiningen profiles

2013-08-12 Thread Phil Hagelberg
On Monday, August 12, 2013 1:36:43 PM UTC-7, Karsten Schmidt wrote: > Hi Michal, have a look at this gist to see how this can be done: > https://gist.github.com/postspectacular/6214886 Rather than shadowing one implementation with another, I'd recommend keeping both implementations in different

Searching for Regular Expressions in a file

2013-08-12 Thread JvJ
Is there a way to do a regex search over an entire file without loading the file into memory? -- -- 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 moder

Re: Searching for Regular Expressions in a file

2013-08-12 Thread Mark
Clojure's regex functions are built on top of Java's and Java's regex support is built on the CharSequence abstraction, not String as we normally think of them. You could adapt files to CharSequence without much trouble. I think this approach would keep the memory requirements to a minimum.

Re: [ANN] Clojure Cheatsheet for Emacs

2013-08-12 Thread Devin Walters
Could you clarify: Why is that a good goal? '(Devin Walters) On Aug 12, 2013, at 12:09 PM, Rostislav Svoboda wrote: > > The number of cheatsheets is growing (this is a good thing IMO) > > It's not about having one brilliant cheatsheet. The ultimate goal is to get > rid off them all. > -- >

Re: Do you like the Clojure syntax?

2013-08-12 Thread Ramesh
Great points here! I think once someone is comfortable with Clojure, Scala will be more disgusting than Java. This is because, Scala has such great adornments, ironically aspiring toward simplification. -ramesh On Mon, Aug 12, 2013 at 7:58 AM, David Pollak wrote: > A couple of quick reactions

Re: [ANN] Leiningen 2.3.0 released

2013-08-12 Thread Sean Corfield
On Mon, Aug 12, 2013 at 9:39 AM, Phil Hagelberg wrote: > I recall issues around the certificate GitHub used, but I'm not aware of any > troubles that have been reported with the Amazon certificates. We switched > to Amazon when GitHub turned off its upload functionality at the end of > 2012, so ev

Re: [ANN] Clojure Cheatsheet for Emacs

2013-08-12 Thread Rostislav Svoboda
What would we like to have is a language easy to learn without any need for a cheatsheet. On 13 August 2013 02:10, Devin Walters wrote: > Could you clarify: Why is that a good goal? > > '(Devin Walters) > > On Aug 12, 2013, at 12:09 PM, Rostislav Svoboda > wrote: > >> The number of cheatsheets i

Re: Do you like the Clojure syntax?

2013-08-12 Thread Devin Walters
I have to echo previous sentiments. I'm not going to fill out the survey because as it currently stands, it seems like it's begging for a conclusion that satisfies the author. I'd like to see more targeted questions w/r/t syntax. But there again, I think this kind of question is highly subjecti

Re: [ANN] Clojure Cheatsheet for Emacs

2013-08-12 Thread Devin Walters
If I could plug into a machine and say "I know kung-fu" I would agree with you, but that is simply not reality. Steps which allow learners to rely less on cheatsheets over time are important, but curiously, cheatsheets are one of those steps. '(Devin Walters) On Aug 12, 2013, at 7:31 PM, Rosti

Re: Searching for Regular Expressions in a file

2013-08-12 Thread Joel Holdbrooks
You could use *line-seq* which, if I'm not mistaken, is lazy. Then do your regex search line by line lazily. On Monday, August 12, 2013 4:25:15 PM UTC-7, JvJ wrote: > > Is there a way to do a regex search over an entire file without loading > the file into memory? > -- -- You received this me

Re: (newbie-ish) Modelling question - multi methods?

2013-08-12 Thread Jonah Benton
It sounds like it depends on whether the collaborators are properly known to the command, e.g. at command generation/creation time, or to the handler, e.g. at handler creation/registration time. If the former, then it would make sense for each command to be a record that was created with all requi

Re: Lazy group-by for sorted maps?

2013-08-12 Thread Michael-Keith Bernard (SegFaultAX)
For the partition-by solution to work, you have to ensure that the result set from the query is sorted by the foreign key: (partition-by identity "aaabbbcccaaabbbcc") ;;=> ((\a \a \a) (\b \b \b) (\c \c \c) (\a \a \a) (\b \b \b) (\c \c)) (partition-by identity (sort "aaabbbcccaaabbbcc")) ;;=> ((\a

(reduce conj ["A"]) verification from source code...

2013-08-12 Thread drclj
Is this happening on lines: for (reduce conj ["A"]) [f val coll] gets called eventually from [f coll] and since s does not exist it ends with val straight. (def reduce (fn r ([f coll] (let [s (seq coll)] (if s (r f (first s) (next s))

Re: Do you like the Clojure syntax?

2013-08-12 Thread Christian Sperandio
I think the choice of a language has always a subjective part. Particularly when you learn a language by yourself for pleasure. Because it's 'for pleasure' you want to learn a fun stuff. At work, I believe the subjective part works against a choice. Currently, at my office, the 8 other colleague

Re: Do you like the Clojure syntax?

2013-08-12 Thread Alex Baranosky
To me you cannot separate Clojure's syntax from its capabilities, because a number of its capabilities are enabled by the syntax. On Mon, Aug 12, 2013 at 10:55 PM, Christian Sperandio < christian.speran...@gmail.com> wrote: > I think the choice of a language has always a subjective part. > Partic

Re: Question on `cljx` and `lein-dalap`

2013-08-12 Thread Shantanu Kumar
Thanks, Chas! Appreciate the detailed reply. Shantanu On Monday, 12 August 2013 21:26:31 UTC+5:30, Chas Emerick wrote: > > > On Aug 11, 2013, at 5:19 PM, Shantanu Kumar wrote: > > > Hi, > > > > I am thinking about how to use Cljx correctly in my projects (for > portability); I have few questi