add-watch and writing data into a core.async channel

2015-07-30 Thread Raymond Huang
I'd like to use `add-watch` on an atom which writes the data to a core.async channel. So far, I've come up with this, but it seems bad because I create a new go-routine everytime something happens. (add-watch ref watch-id #(go (a/>! user-changes %&))) This seems like a bad idea to me because I

Re: [ANN] stateful-check 0.3.0 - test stateful systems with test.check

2015-07-30 Thread Mayank Jain
Thanks this looks useful. Will try it out. On Jul 31, 2015 9:36 AM, "Carlo Zancanaro" wrote: > Hey everyone! > > I've just released a new version of my library for testing stateful > systems with test.check! > > [org.clojars.czan/stateful-check "0.3.0"] > > https://github.com/czan/stateful-ch

Re: Using go/

2015-07-30 Thread Martin Raison
Fair point, thanks a lot for the insight. Any pointers to a significant data-flow oriented clojure codebase would be awesome, because that's not something I see a lot in the wild, and I'm still trying to wrap my head around how to implement this on a very complex system. Le jeudi 30 juillet 201

[ANN] stateful-check 0.3.0 - test stateful systems with test.check

2015-07-30 Thread Carlo Zancanaro
Hey everyone! I've just released a new version of my library for testing stateful systems with test.check! [org.clojars.czan/stateful-check "0.3.0"] https://github.com/czan/stateful-check https://clojars.org/org.clojars.czan/stateful-check Important changes in this version: + Updated t

Re: range no longer returns a LazySeq; how to check whether realized?

2015-07-30 Thread Mars0i
OK, thanks. (I didn't have a real use case. It's useful for experimenting at the prompt.) On Thursday, July 30, 2015 at 7:30:46 PM UTC-5, Alex Miller wrote: > > Yes, this behavior has changed. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To pos

Re: Using a dynamic var for my database connection for implicit connections+transactions

2015-07-30 Thread James Reeves
On 31 July 2015 at 01:44, J. Pablo Fernández wrote: > > I found passing around the database connection to each function that uses > it very error prone when you are using transactions as passing the wrong > one could mean a query runs outside the transaction when in the source code > it is inside

Re: My first Clojure program (and blog post about it)

2015-07-30 Thread kirby urner
On Thu, Jul 30, 2015 at 6:33 PM, Amith George wrote: > > Hi, > > From a cursory glance, I didn't really understand the domain, so the > function names I used in my rewrite might seem silly. But I wanted to > illustrate that there is a lot of repetition in your code. Also discrete > functions (wit

Re: My first Clojure program (and blog post about it)

2015-07-30 Thread kirby urner
On Thu, Jul 30, 2015 at 6:14 PM, Leif wrote: > This still seems very verbose to me. I think it is because the definition > of "open," "opposite," and "closed" are implicit in the great big blocks of > arithmetic you are doing. I think a useful exercise would be to define > edges in terms of poi

Re: [ANN] Release 0.32.0 of Counterclockwise

2015-07-30 Thread François
A premiere vue c'est un tres, tres bon cru cette release, et vraiment bienvenue! Bravo et (* 1000 merci) pour le zoom, macroexpand, les commandes lein, et surtout le support nickel de cljs! Juste un bemol sur la doc autour de cljs et cider : un peu complecte, du coup j'ai tente figwheel et ca ma

Re: My first Clojure program (and blog post about it)

2015-07-30 Thread Amith George
Hi, >From a cursory glance, I didn't really understand the domain, so the function names I used in my rewrite might seem silly. But I wanted to illustrate that there is a lot of repetition in your code. Also discrete functions (with proper names) can make the code easier to grok. https://gis

Re: My first Clojure program (and blog post about it)

2015-07-30 Thread Leif
This still seems very verbose to me. I think it is because the definition of "open," "opposite," and "closed" are implicit in the great big blocks of arithmetic you are doing. I think a useful exercise would be to define edges in terms of points, and maybe faces in terms of edges and an `face?

Using a dynamic var for my database connection for implicit connections+transactions

2015-07-30 Thread J . Pablo Fernández
Hello Clojurians, I found passing around the database connection to each function that uses it very error prone when you are using transactions as passing the wrong one could mean a query runs outside the transaction when in the source code it is inside the with-db-transaction function. So I en

Re: range no longer returns a LazySeq; how to check whether realized?

2015-07-30 Thread Alex Miller
Yes, this behavior has changed. -- 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

Re: Clojure Development jobs?

2015-07-30 Thread Alex Miller
Clojure job posts here are ok. Job posts to clojure-dev are not. -- 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 yo

Re: My first Clojure program (and blog post about it)

2015-07-30 Thread kirby urner
Thanks to excellent feedback, I now realize my code was overly verbose, a common phenomenon among beginners in many a computer language. As an example, the newer version replaces this: === > > (ns test-project.synmods) > > (defn add-open > [edges] > (let [[a b c d e f] edges > [a2

Re: My first Clojure program (and blog post about it)

2015-07-30 Thread kirby urner
Excellent feedback so far, I thank experienced Clojure programmers for giving me tips. I may post a next version after incorporating some of this advice. Yes, I have much to learn! Kirby -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post

Re: My first Clojure program (and blog post about it)

2015-07-30 Thread Mark Engelberg
Given that your functions expect a list of exactly 6 inputs, I'd be inclined to write these as functions that take 6 inputs, rather than a list. That way you get a meaningful error if they pass the wrong number of inputs. If you do prefer to keep them as-is, you can also shorten the code by a lin

clj-soap (was: Beginner question

2015-07-30 Thread Sean Corfield
On Jul 29, 2015, at 7:47 PM, Mike wrote: > I have done some searching, and there is an old clj-soap library which Sean > Corfield has mostly abandoned. Just to clarify: I too had started down the path of trying to find a way to do SOAP via Clojure and came across the old and already abandoned c

Re: My first Clojure program (and blog post about it)

2015-07-30 Thread Mark Engelberg
(println (format ...)) can be rewritten as (printf ...) if you add a \n to your string. A large chunk of your computations after the definitions appear to be global definitions and print messages to achieve some sort of unit testing. I encourage you to refactor this using clojure.test so you can

Re: My first Clojure program (and blog post about it)

2015-07-30 Thread Mark Engelberg
The do's are unnecessary. On Thu, Jul 30, 2015 at 2:50 PM, James Reeves wrote: > One quick suggestion is that arithmetic operations in Clojure frequently > take multiple arguments. So: > > (reduce + [1 2 3]) > > Is equivalent to: > > (+ 1 2 3) > > In terms of style, variables are typical

Re: My first Clojure program (and blog post about it)

2015-07-30 Thread James Reeves
One quick suggestion is that arithmetic operations in Clojure frequently take multiple arguments. So: (reduce + [1 2 3]) Is equivalent to: (+ 1 2 3) In terms of style, variables are typically lower-case in Clojure except when referring to a class, interface or protocol. - James On 30

Re: Clojure Development jobs?

2015-07-30 Thread Andy Fingerhut
This is not an 'official' answer, but there have been multiple job postings here in the past. I believe they are reasonably welcome if they are from the development team itself that is doing the hiring. I have personally rejected many attempts to post recruiting messages here and on the Clojure D

My first Clojure program (and blog post about it)

2015-07-30 Thread kirby urner
Greetings all. I'm new to Clojure (but not to programming) and wanted to document a first effort. The blog post: http://controlroom.blogspot.com/2015/07/ramping-up.html === (ns test-project.synmods) (defn add-open [edges] (let [[a b c d e f] edges [a2 b2 c2 d2 e2 f2] (map (fn [x

Clojure Development jobs?

2015-07-30 Thread Dan McLaughlin
Wanted to check in to see if it was OK to post any Clojure job openings here? Is that cool or not acceptable? We have multiple openings, great team, phenomenal compensation and bonus, and backend is all Clojure. Let me know, thanks! Dan -- You received this message because you are subscribed to

Re: [ANN] Release 0.32.0 of Counterclockwise

2015-07-30 Thread Alan Thompson
Clearly the Clojure community does not get enough exposure to Italian culture. World-famous motorcycle racer for Ducati, Andrea Iannone. Actress Debi Mazar and her husband, chef Gabriele Corcos. Seriously people, put down the keyboard and watch a little TV once in a while! Alan On Thu, J

Re: range no longer returns a LazySeq; how to check whether realized?

2015-07-30 Thread Mars0i
Also, (realized? (range)) is true in 1.7.0, but false in 1.6.0. (realized? (rest (range))) is false in 1.7.0 but throws an exception in 1.6.0, fwiw. On Thursday, July 30, 2015 at 11:16:03 AM UTC-5, Mars0i wrote: > > In Clojure 1.6.0, *range* returned a LazySeq, which could be tested with > *rea

range no longer returns a LazySeq; how to check whether realized?

2015-07-30 Thread Mars0i
In Clojure 1.6.0, *range* returned a LazySeq, which could be tested with *realized?*. In Clojure 1.7.0 and 1.8.0-alpha3, it returns an Iterate, a Range, or a LongRange*. * realized? only works with the first of these three. For example: Clojure 1.6.0: user=> (class (range 5)) clojure.lang.

Re: [ANN] clojure.tools.cli 0.3.2 (was: Next release for clojure.tools.cli? Is it dead?

2015-07-30 Thread Keith Irwin
Thanks! > On Jul 28, 2015, at 3:44 PM, Sean Corfield wrote: > > clojure.tools.cli — tools for working with command line arguments > > https://github.com/clojure/tools.cli > > I’m pleased to announce that Sung Pae has passed the torch on to me and I > have released version 0.3.2 to Maven Centr

Re: Using go/

2015-07-30 Thread Timothy Baldridge
My advice is to treat channel ops (!) as IO, which they are. In functional programming we try to stay away from doing IO deep down inside a call stack. So don't do that. Instead use async/pipeline functions and channel transducers to create pipelines and flow the data through them. A sort of anti-

Re: Using go/

2015-07-30 Thread Martin Raison
Hey Thomas, Thanks for the great feedback! A few clarifications below. > It should be noted that your async macro does in fact use the dispatcher > just like a normal go would, the only difference is that it will start > executing immediately in the current thread until the first "pause" inst

Re: [ANN] Pink 0.2.0, Score 0.3.0

2015-07-30 Thread Steven Yi
Unfortunately, not at the moment. I'll need to add audio input, as well as distortion audio functions. The first should be straightforward, the second I think there are different approaches to distortion, so I'd probably start with translating Csound's distort and distort1 opcodes and move on fr

Re: [ANN] Pink 0.2.0, Score 0.3.0

2015-07-30 Thread Chris Zheng
Wow, just watched the talk. I just recently inherited a USB keyboard so I'll be trying some things out with this On a seperate topic, would pink be able to do distortion effects, ie.. Plugging in an acoustic guitar and having it modulate the waveforms? > On 30 Jul 2015, at 6:39, Steven Yi wrot

Re: [ANN] sniper, emacs assistant for deleting dead code

2015-07-30 Thread benedek fazekas
> But it doesn't look like it has the same graph analysis to understand cyclic references, etc, you are right it does not. Wondering if you were interested in adding an API to sniper and publish it on clojars... so we could give a try to do a wrapper around it in refactor-nrepl and perhaps some

Re: [ANN] Release 0.32.0 of Counterclockwise

2015-07-30 Thread Andrea Richiardi
Great! :D On Thursday, July 30, 2015 at 1:34:29 AM UTC+2, Laurent PETIT wrote: > > Counterclockwise, the Eclipse Clojure development tool. > > Counterclockwise 0.32.0 has been released. > > Highlights: > > - Clojure 1.7.0 support > - Cider-nrepl support > - Clojurescript support > - macro-expansio

Re: [ANN] Release 0.32.0 of Counterclockwise

2015-07-30 Thread Andrea Richiardi
LOL! I can confirm I am indeed male, and btw, in the wiki page maybe it says the same, it was also the name of an apostle and he moved to the eastern part of Europe to preach. That is probably why the masculine name is more popular in Europe...not sure though. I am going to read the link, thanks

Re: [ANN] Release 0.32.0 of Counterclockwise

2015-07-30 Thread Colin Fleming
I can't believe it's come to this: https://en.wikipedia.org/wiki/Andrea "Gender Female , except in Italian , Albanian and Romansh

Re: [ANN] Release 0.32.0 of Counterclockwise

2015-07-30 Thread Fluid Dynamics
On Thursday, July 30, 2015 at 7:05:07 AM UTC-4, Laurent PETIT wrote: > > No, just a problem in your syntax analyzer, which does not seem to know > that Andrea can also be a surname given to males in Europe. > It wasn't a surname. Andrea is a feminine given name. There are masculine variants, And

Re: Using go/

2015-07-30 Thread Thomas Heller
Hey, I made a similar suggestion (minus the ThreadLocal) a few weeks ago, although for slightly different reasons. [1] It should be noted that your async macro does in fact use the dispatcher just like a normal go would, the only difference is that it will start executing immediately in the cu

Re: [ANN] Release 0.32.0 of Counterclockwise

2015-07-30 Thread Gary Verhaegen
I'm all for increasing the visibility of women in technology and for trying to avoid simplistic assimilations like "programmer = male", but in this case I think it's more like a simplistic "ends in a = female" on your part, and I'm afraid Laurent did not make a grammatical mistake: https://github.

Re: [ANN] Release 0.32.0 of Counterclockwise

2015-07-30 Thread Laurent PETIT
No, just a problem in your syntax analyzer, which does not seem to know that Andrea can also be a surname given to males in Europe. Same for Cecil, in the opposite direction: in France, Cecile is generally given to females. Cheers, 2015-07-30 13:02 GMT+02:00 Fluid Dynamics : > On Thursday, July

Re: [ANN] Release 0.32.0 of Counterclockwise

2015-07-30 Thread Fluid Dynamics
On Thursday, July 30, 2015 at 5:43:39 AM UTC-4, Laurent PETIT wrote: > > I have forgotten to thank Andrea Richiardi for his involvement in this > release content. > ^^ ^^^ Syntax error, line 1: Clauses do not agree as to grammatical gender. Typo som

Re: core.logic: Help with insertion sort

2015-07-30 Thread Tassilo Horn
Nicolás Berger writes: Hi Nicolás, > Sounds interesting :). I hope I get some time to take a look into it > soon. I appreciate your feedback! > In the meantime, have you tried playing with the log and trace > "goals"? I mean log, trace-s and trace-lvar. They might be of help > in trying to d

Re: [ANN] Release 0.32.0 of Counterclockwise

2015-07-30 Thread Steffen Dienst
Thank you for this great release! I can finally jump to definitions again, do not need to click a link in the console every time I start the REPL, can use all the nice color outputting libraries (ANSI support), see macro expansions, All in all a very appreciated efforts of all collaborators

Re: [ANN] Release 0.32.0 of Counterclockwise

2015-07-30 Thread Laurent PETIT
I have forgotten to thank Andrea Richiardi for his involvement in this release content. He is the author of many enhancement and fixes, including but not limited to - addition of macro-expansion hovers, and a generic hover extension for facilitating the ulterior addition of new kinds of hovers - b