Re: [clojure-rabbitmq] Can TopologyRecoveryException be simulated?

2014-06-03 Thread Brian Marick
On Jun 3, 2014, at 2:16 PM, Michael Klishin mklis...@gopivotal.com wrote: You can delete a queue and declare it with different attributes from out of process. Then recovery will attempt to declare it with the original attributes and fail. Thanks. Small note for anyone doing this:

[clojure-rabbitmq] Re: Can TopologyRecoveryException be simulated?

2014-06-03 Thread Brian Marick
On Jun 3, 2014, at 2:13 PM, Brian Marick br...@getset.com wrote: We had a situation this morning where automatic topology recovery failed with this exception. I'd like to do something to my local rabbitmq server that provokes this exeption, to see if my fix works. Is there a way? Am I

Search seqs in seqs

2014-06-03 Thread Ulrich Küttler
Hi, what is the preferred way to find sub-seqs in a seq? I am trying to convert [:a :b :c :d :a :b :c :d :a :b :c] into ((:a) (:b :c) (:a :d) (:b :c) (:a)) using the sub-seq (:b :c) instead of positions. partition, partition-by and the like all look at one element at a time. What I need is a

Re: Search seqs in seqs

2014-06-03 Thread Linus Ericsson
Maybe reduce-fsm could be useful? https://github.com/cdorrat/reduce-fsm It creates a simple state finite state machine that can be applied on any sequence. /Linus 2014-06-03 11:04 GMT+02:00 Ulrich Küttler kuett...@gmail.com: Hi, what is the preferred way to find sub-seqs in a seq? I am

Re: Top-down code in namspaces

2014-06-03 Thread Phillip Lord
Sean Corfield s...@corfield.org writes: On Jun 1, 2014, at 11:53 PM, u1204 d...@axiom-developer.org wrote: Instead of calling load to read the file, call your tangle function. Whilst that might work from the REPL, it's not going to work with normal Clojure tooling and it would mean you

Migrating from 1.5.1 to 1.6 and dependencies

2014-06-03 Thread Mike Fikes
I'm making use of core.async, which specifies 1.6. Does leiningen help with ensuring any libraries I'm using are also compatible with 1.6? I'm concerned that I may have another dependency (perhaps transitive) that is incompatible, perhaps simply by being AOT compiled with 1.5.1. -- You

Re: What's clojure killer app? I don't see any.

2014-06-03 Thread Jony Hudson
On Monday, 2 June 2014 18:42:32 UTC+1, douglas smith wrote: A killer app for me and I think MANY others like me would be something very similar to a Kovas' 'Session' 'pretty like Light Table' and beefy like IPythons Notebooks. Hope you'll excuse a shameless plug, but have you seen

Your chance to employ an experienced clojure team!

2014-06-03 Thread Florian Over
Hey, you know how hard it is to find good clojure developers? This is your chance to hire a battle-proven team. :) Our startup shutdown the core product right and our whole clojure team is available from July. We would love to work together in this team in the future. Relocation is not really an

Re: 4Clojure exercise 47 question

2014-06-03 Thread Erlis Vidal
Thanks Stephen! On Mon, Jun 2, 2014 at 5:50 PM, Stephen Gilardi scgila...@gmail.com wrote: On Jun 2, 2014, at 4:53 PM, Erlis Vidal er...@erlisvidal.com wrote: Hi guys, Quick question about exercise 47, http://www.4clojure.com/problem/47 Here you could find the following *(not

Re: Is it the right Clojure group for a newbie

2014-06-03 Thread Erlis Vidal
Welcome!! On Tue, Jun 3, 2014 at 2:33 AM, Linus Ericsson oscarlinuserics...@gmail.com wrote: Also check out Kyle Kingsbury's Clojure from the ground up: http://aphyr.com/posts/301-clojure-from-the-ground-up-welcome A lot of things in Clojure gets much easier when one understands a bit of

Re: Top-down code in namspaces

2014-06-03 Thread Gregg Reynolds
On Sun, Jun 1, 2014 at 9:36 AM, Glen Mailer glenja...@gmail.com wrote: Hi everyone, I'm looking to get some opinions on code style. Specifically, I like to write my code in a top-down. What I mean by that is that within a file the highest-level functions sit at the top, and are implemented

Re: Is it the right Clojure group for a newbie

2014-06-03 Thread Gregg Reynolds
On Mon, Jun 2, 2014 at 4:36 PM, sharma...@gmail.com wrote: All, If this is the right Clojure group for a newbie, I would like to ask for the best online resources to begin with. I am new to programming, having recently switched from a non technical field. I have started looking at

PersisTVector PersistHashMap - internal implementation.

2014-06-03 Thread sorin cristea
Hi all, I don't know if this question was already asked by someone here but can you tell me(explain) or guide me to a properly documentation about how is internal implemented PersistenVector and PersistentHashMap , how they behave to an insert , remove, update; this question is came from

PersistentVector PersistentHashMap - internal implementation

2014-06-03 Thread sorin cristea
Hi all, I don't know if this question was already asked by someone here but can you tell me(explain) or guide me to a properly documentation about how is internal implemented PersistenVector and PersistentHashMap , how they behave to an insert , remove, update; this question is came from

Re: Top-down code in namspaces

2014-06-03 Thread Timothy Baldridge
Another way of looking at Clojure code is not a top down abstraction first view, but as the building of a system from smaller parts. The best example of this is clojure/core.clj . Sure it's bootstrap code so it can be a bit verbose at times, but you start with nothing and end up with a complete

Re: PersistentVector PersistentHashMap - internal implementation

2014-06-03 Thread Stefan Kamphausen
Hi, On Tuesday, June 3, 2014 4:02:45 PM UTC+2, sorin cristea wrote: Hi all, I don't know if this question was already asked by someone here but can you tell me(explain) or guide me to a properly documentation about how is internal implemented PersistenVector and PersistentHashMap ,

Re: deskewing image

2014-06-03 Thread Glen Rubin
my clojure-fu and java-fu are both pretty weak as I am still rather green. I guess I will put a hold on this for now until I am more advanced. On Monday, June 2, 2014 10:42:35 PM UTC-7, Atamert Ölçgen wrote: On Tue, Jun 3, 2014 at 5:14 AM, Glen Rubin rubi...@gmail.com javascript:

Re: Advice on implementing atomic read/write socket operations

2014-06-03 Thread Joachim De Beule
That's indeed what I needed! Thanks!! -- 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

Re: Top-down code in namspaces

2014-06-03 Thread Phillip Lord
Gregg Reynolds d...@mobileink.com writes: 4. Put your helper funcs (defn- stuff) in helpers.clj, without a call to ns at the top, then (load helpers) at the top of the file that uses them. You still get the effect you're looking for, with a one line preface that tells the reader where to

Re: Advice on implementing atomic read/write socket operations

2014-06-03 Thread Joachim De Beule
Thanks a lot Timothy! Unfortunately, I don't control the remote end, otherwise I would indeed use request ID's and core.async as you suggest. -- 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

Re: [ANN] Nginx-Clojure v0.2.2 released

2014-06-03 Thread Xfeep Zhang
The multiprocess from nginx is quite different with some old server implementations. Within nginx one process can handle thousands of connections at the same time. But some old server implementations are one process per request. If your http service is stateless, multiprocess or single process

Re: [ANN] Nginx-Clojure v0.2.2 released

2014-06-03 Thread Xfeep Zhang
Further more if you use Encrypted Cookie store Or Remote Session Store to manage your state, your http service will become more lightweight and can be easily expanded horizontally, e.g. you can add more computers to host nginx-clojure to run your http service and let one computer with nginx or

Re: Top-down code in namspaces

2014-06-03 Thread Gregg Reynolds
On Tue, Jun 3, 2014 at 9:51 AM, Phillip Lord phillip.l...@newcastle.ac.uk wrote: Gregg Reynolds d...@mobileink.com writes: 4. Put your helper funcs (defn- stuff) in helpers.clj, without a call to ns at the top, then (load helpers) at the top of the file that uses them. You still get

Checking: Java 8 and Clojure

2014-06-03 Thread Dave Tenny
The clojure site says 1.6.0 is supported with java 6 and higher. I just wanted to double check whether people have been using it with Java 8 and whether it's believed to be stable when used with Java 8 before I tell people I work with that they can use it with Java 8. Thumbs up for java 8 and

Re: Checking: Java 8 and Clojure

2014-06-03 Thread Gary Trakhman
I've used Java 8 for testing on a large codebase with Clojure 1.5.1, works fine. On Tue, Jun 3, 2014 at 12:17 PM, Dave Tenny dave.te...@gmail.com wrote: The clojure site says 1.6.0 is supported with java 6 and higher. I just wanted to double check whether people have been using it with Java

Re: Checking: Java 8 and Clojure

2014-06-03 Thread Rafal Lewczuk
Java8+Clojure seems to work for me (not [yet] in production though). On 03.06.2014 18:17, Dave Tenny wrote: The clojure site says 1.6.0 is supported with java 6 and higher. I just wanted to double check whether people have been using it with Java 8 and whether it's believed to be stable when

Re: Migrating from 1.5.1 to 1.6 and dependencies

2014-06-03 Thread Alex Miller
You can use lein deps :tree to detect what different libraries depend on. Specifying an explicit Clojure dependency in your own project should override anything used by downstream dependencies. lein ancient is also useful in finding out of date dependencies. I am not aware of any binary

Re: Checking: Java 8 and Clojure

2014-06-03 Thread Plínio Balduino
I'm also using Java 8 and I didn't have any problem so far. On Tue, Jun 3, 2014 at 1:20 PM, Rafal Lewczuk rafal.lewc...@gmail.com wrote: Java8+Clojure seems to work for me (not [yet] in production though). On 03.06.2014 18:17, Dave Tenny wrote: The clojure site says 1.6.0 is supported with

Re: Checking: Java 8 and Clojure

2014-06-03 Thread Dave Tenny
Thanks all, good to know. On Tuesday, June 3, 2014 12:17:52 PM UTC-4, Dave Tenny wrote: The clojure site says 1.6.0 is supported with java 6 and higher. I just wanted to double check whether people have been using it with Java 8 and whether it's believed to be stable when used with Java 8

Re: Top-down code in namspaces

2014-06-03 Thread Gregg Reynolds
On Tue, Jun 3, 2014 at 8:32 AM, Gregg Reynolds d...@mobileink.com wrote: On Sun, Jun 1, 2014 at 9:36 AM, Glen Mailer glenja...@gmail.com wrote: Hi everyone, I'm looking to get some opinions on code style. ... 4. Put your helper funcs (defn- stuff) in helpers.clj, without a call to ns

Re: Parallel Programming with Lisp for Performance

2014-06-03 Thread daly
The Parallel Programming with Lisp for Performance talk was given at the European lisp conference. http://medias.ircam.fr/xe5f73b At around 13:00 he mentions STM and comments that it works but is not good for performance. At around 14:00 he mentions livelock where STM process 1 does a rollback

Re: Migrating from 1.5.1 to 1.6 and dependencies

2014-06-03 Thread Mike Fikes
Thanks Alex. That's great! My fear of a “dependency yak shave” is unfounded. I noticed the following (once) in my server log file, but have been unable to trace it down not see any ill effects and presumed it could be caused by mixing versions. I'll report if I find anything specific.

Re: non-lazy clojure?

2014-06-03 Thread guns
On Mon 2 Jun 2014 at 10:38:23PM -0400, Lee Spector wrote: PS would a call to vec do the same thing as into [] here? IIRC vec and into [] are equivalent unless the source collection implements IEditableCollection, in which case transients are used for a significant performance boost. guns

Re: gemacl: Scientific computing application written in Clojure

2014-06-03 Thread Mars0i
Jose, This is an old thread, and whatever problems you might be dealing with now, they're probably not the same ones as when the thread was active. However, I think that if parallel code uses the built-in Clojure random number functions, there is probably a bottleneck in access to the RNG.

Re: non-lazy clojure?

2014-06-03 Thread Mars0i
On Monday, June 2, 2014 3:32:59 PM UTC-5, Lee wrote: I've generally liked Clojure's pervasive laziness. It's cute and it sometimes permits lovely, elegant approaches to particular programming problems. After worrying about some bad potential problems with mutation of data structures

Re: Top-down code in namspaces

2014-06-03 Thread Softaddicts
Does not work on my iPad, I forget to lock the display every time. Damn it... Luc P. I just turn the monitor upside-down ;-). On Tue, Jun 3, 2014 at 1:50 PM, Luc Prefontaine lprefonta...@softaddicts.ca wrote: Yeah, it's certainly hard, just tried it, blood pressure increases in

Allow reseeding/rebinding RNG behind rand?

2014-06-03 Thread Mars0i
t appears that the random number generator for rand used can't be reseeded, so there is no way to precisely repeat an experiment involving randomness, except by redefining rand. Also, there is no way to specify that rand in different threads should use different RNGs (a strategy discussed in

Re: PersistentVector PersistentHashMap - internal implementation

2014-06-03 Thread sorin cristea
On Tuesday, June 3, 2014 5:07:30 PM UTC+3, Stefan Kamphausen wrote: Hi, On Tuesday, June 3, 2014 4:02:45 PM UTC+2, sorin cristea wrote: Hi all, I don't know if this question was already asked by someone here but can you tell me(explain) or guide me to a properly documentation about

[ANN] sweatkit, a Clojure(Script) library to work with sports activities data

2014-06-03 Thread Daniel Zacarias
Hello everyone, I've recently published the first official release for sweatkit, a Clojure(Script) library to work with sports activities data. Here's the link: https://github.com/dzacarias/sweatkit In a nutshell, sweatkit's goal is to provide a set of: - Composable abstractions and functions

seesaw: drawing text

2014-06-03 Thread Christopher Howard
Hi. In seesaw, how do you draw text to a graphics 2d object? I see in seesaw.graphics how to draw circles and lines and such, but want to draw a line of text. (I'm drawing on a canvas.) -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this

Re: seesaw: drawing text

2014-06-03 Thread Dave Ray
The canvas example shows two ways of doing this: https://github.com/daveray/seesaw/blob/develop/test/seesaw/test/examples/canvas.clj paint1 uses the .drawString method directly. paint2 uses string-shape for the same effect. Hope this helps, Dave On Tue, Jun 3, 2014 at 11:56 AM, Christopher

loop/recur being functional

2014-06-03 Thread Mike Fikes
I'm trying to “internalize” loop/recur as being a functional construct. I'm sure I'm not alone in this: I initially struggled with it, with my view unduely influenced by its implementation, especially when multiple loop heads are present. (It could be viewed as vulgar but necessary imperative

Re: loop/recur being functional

2014-06-03 Thread James Reeves
loop/recur is explicit tail recursion, and therefore will only work if the recur is in the tail position, i.e. the last form evaluated. For example, this function is tail recursive: (defn sum [coll result] (if (seq coll) (sum (rest coll) (+ result (first coll))) 0)) While this

Re: loop/recur being functional

2014-06-03 Thread Gary Trakhman
Have you considered the similarity between loop-recur and sequence operations? IE, tail-recursion turns the call stack into a sequence of states. The nice trick you can play in clojure is to reify this sequence as a lazy sequence. (take 5 ((fn this-fn [last] (cons (inc last) (lazy-seq (this-fn

Parsing ODT files (with Pantomime?)

2014-06-03 Thread Bastien
Hi all, I'm trying to get the content of an ODT file as plain text. I've found Pantomime, but don't understand how to use it? Can anyone put me on the right tracks with a minimal working example? Thanks in advance! -- Bastien -- You received this message because you are subscribed to the

Re: gemacl: Scientific computing application written in Clojure

2014-06-03 Thread Jose M. Perez Sanchez
Thank you very much. I'm using the Colt random number generator directly. I've managed to reduce computing time by orders of magnitude using type hints and java arrays in some critical parts. I haven't had the time to write a report on this for the list, since have been busy with other

Re: loop/recur being functional

2014-06-03 Thread Matching Socks
Recommended: Programming Clojure, in which Stuart Halloway Aaron Bedra discuss these forms of recursion. -- 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

Re: Parsing ODT files (with Pantomime?)

2014-06-03 Thread Denis Fuenzalida
Hi Bastien, ODT files from OpenOffice/LibreOffice are just Zip files which contain a bunch of xml files and folders for the images or media which you've inserted into a document. The text itself is contained in a file called content.xml inside of it. There's a plain Java parser for ODT files

[ANN] clj-generators - generator magic inspired by Python

2014-06-03 Thread Alex Engelberg
https://github.com/aengelberg/clj-generators My all-time favorite feature of Python is generators. It allows you to write lazy sequences imperatively. def infinite_range(): x = 1 while True: yield x x += 1 for i in infinite_range(): if (i 5): break else:

Re: Your chance to employ an experienced clojure team!

2014-06-03 Thread Alan Moore
Sorry to hear of the shutdown news... but this also means that your talents are now available to work on something else. :-) Good luck! Alan On Tuesday, June 3, 2014 4:22:17 AM UTC-7, Florian Over wrote: Hey, you know how hard it is to find good clojure developers? This is your chance to

Re: Top-down code in namspaces

2014-06-03 Thread Colin Fleming
(load foo) is legal Clojure; if a tool can't handle it, that's either a bug or a deliberate limitation in the tool. This is not true. Cursive, for example, indexes Clojure projects in order to perform its magic. In IntelliJ, index data for a file is only allowed to depend on the contents of

Re: deskewing image

2014-06-03 Thread Atamert Ölçgen
On Tue, Jun 3, 2014 at 10:43 PM, Glen Rubin rubing...@gmail.com wrote: my clojure-fu and java-fu are both pretty weak as I am still rather green. I guess I will put a hold on this for now until I am more advanced. I hope you won't get discouraged. At the very least clojure is a language fun

Re: [ANN] sweatkit, a Clojure(Script) library to work with sports activities data

2014-06-03 Thread Atamert Ölçgen
Looks really nice. Code has tests, API docs are hosted, there's an introductory tutorial... For those who wants to know what sports activities data look like: https://github.com/dzacarias/sweatkit/tree/master/test-resources/tcx On Wed, Jun 4, 2014 at 1:54 AM, Daniel Zacarias dzacar...@me.com

Runnable.com + Clojure

2014-06-03 Thread Mark Mandel
I got bored and set up a simple Clojure project to fork if they want on Runnable.com http://runnable.com/U46bKu4Y8pZgeAW9/clojure-%2B-leiningen-example For some reason, the editor currently can't open .clj files, but that's easy enough to work around with a text editor in the terminal. (Bug: