[ANN] data.int-map 0.2.0

2015-05-25 Thread Zach Tellman
https://github.com/clojure/data.int-map The 0.1.0 release of this library was a faithful Clojure implementation of Okasaki's "Fast Mergeable Integer Maps" paper [1]. While it was much faster than Clojure's sorted-maps, it was in some cases slower than hash-maps, which was mostly due to the int

Re: How can I remove this "nil?" check from my code?

2015-05-25 Thread Chris Freeman
It seems like, if you don't mind doing the assoc all the time, you could replace the whole if with something like: (assoc nu (:winner c) (or ((:winner c) nu) {:history [{}]})) You might want to wrap that in a let so you don't repeat (:winner c). Also, it looks like add-placeholder-to-history cou

Re: {ANN} defun: A beautiful macro to define clojure functions with pattern match.

2015-05-25 Thread Jay Porcasi
hi Dennis wow... that's beyond beautiful, it's awesome this makes Clojure even more 'Haskell-ish', which is a good thing in my opinion thanks for sharing this gem with the world Jay On Sunday, September 14, 2014 at 1:47:28 PM UTC+7, dennis wrote: > > > Hi , i am pleased to introduce defun

Re: Relational mapping - turning an sql query result into array of hashes (with joins)

2015-05-25 Thread Leonardo Borges
It's interesting how this question pops up every now and again. I find that, for the types of projects I work with, I'm perfectly happy writing little combinators to work with result sets myself. At one project though, a standard RESTful web application with a traditional relational model, I ended

Re: How can I remove this "nil?" check from my code?

2015-05-25 Thread Timothy Baldridge
Try if-some: https://clojuredocs.org/clojure.core/if-some On Mon, May 25, 2015 at 4:07 PM, wrote: > > I started to write an essay, aimed at those programmers who are > experienced with highly mutable languages such as Javascript, Ruby, PHP, > etc, to demonstrate how one's code style changes when

How can I remove this "nil?" check from my code?

2015-05-25 Thread lawrence
I started to write an essay, aimed at those programmers who are experienced with highly mutable languages such as Javascript, Ruby, PHP, etc, to demonstrate how one's code style changes when one switches to a mostly immutable language such as Clojure. However, my Clojure code is not nearly as

Re: [ANN] System 0.0.8

2015-05-25 Thread Michael Klishin
On 26 May 2015 at 03:54:35, Daniel Szmulewicz (daniel.szmulew...@gmail.com) wrote: > Yes, sir. Well understood. > > On top of that, the announcement was mistaken. System's version > is at 0.1.8, not 0.0.8. > > Will do better next time. Thank you!  This sounds like a project that can grow in

Re: [ANN] System 0.0.8

2015-05-25 Thread Daniel Szmulewicz
Yes, sir. Well understood. On top of that, the announcement was mistaken. System's version is at 0.1.8, not 0.0.8. Will do better next time. On Tuesday, May 26, 2015 at 3:49:05 AM UTC+3, Michael Klishin wrote: > > On 26 May 2015 at 03:45:04, Daniel Szmulewicz (daniel.s...@gmail.com > ) wrot

Re: [ANN] System 0.0.8

2015-05-25 Thread Michael Klishin
 On 26 May 2015 at 03:45:04, Daniel Szmulewicz (daniel.szmulew...@gmail.com) wrote: > Is there a consensus as to what versioning scheme works best? > Or is there no such beast? > Peter Taoussanis has expressed some reservations regarding > SemVer and is proposing a variation on it, which he ca

Re: [ANN] System 0.0.8

2015-05-25 Thread Daniel Szmulewicz
Thank you pointing this out. Is there a consensus as to what versioning scheme works best? Or is there no such beast? Peter Taoussanis has expressed some reservations regarding SemVer and is proposing a variation on it, which he calls BreakVer. https://github.com/ptaoussanis/encore/blob/master

Re: [ANN] System 0.0.8

2015-05-25 Thread Michael Klishin
On 24 May 2015 at 03:59:52, Daniel Szmulewicz (daniel.szmulew...@gmail.com) wrote: > System 0.0.8 has just been released, but it is not the same anymore. Then perhaps it deserves at least a minor version bump.   Non-standard, confusing version numbers is already a significant enough problem in

Re: Relational mapping - turning an sql query result into array of hashes (with joins)

2015-05-25 Thread Sean Corfield
On May 25, 2015, at 3:19 PM, Sam Roberton wrote: > On Tuesday, 26 May 2015 06:43:18 UTC+10, Krzysiek Herod wrote: > Sean, maybe my use case is specific to web applications. In REST API's it's > common to respond with something like "Example Result" here: > https://dev.twitter.com/rest/reference/

Re: Relational mapping - turning an sql query result into array of hashes (with joins)

2015-05-25 Thread Daniel Orias
Actually I wasn't going there to ORMs. I don't think I'm going any where, but I'm having a good time any way. I do share your thought that ORMs are neither necessary nor sufficient for these problems. My recent somewhat functional adventures in this domain is within the realm of Racket. There

Re: Relational mapping - turning an sql query result into array of hashes (with joins)

2015-05-25 Thread Sam Roberton
On Tuesday, 26 May 2015 06:43:18 UTC+10, Krzysiek Herod wrote: > > Sean, maybe my use case is specific to web applications. In REST API's > it's common to respond with something like "Example Result" here: > https://dev.twitter.com/rest/reference/get/statuses/mentions_timeline I > completely agr

Re: what demonstrates Stuart Sierra's "State/Event Pattern"

2015-05-25 Thread piastkrakow
Stuart Sierra, Thank you for the response. I won't take that talk as encyclopedic. The 'chain-consequences' function is very interesting, though it is unfamiliar to me. I am still learning about Clojure. You mention that the State/Event pattern is a common one. If you were talking about archi

Re: Relational mapping - turning an sql query result into array of hashes (with joins)

2015-05-25 Thread Krzysiek Herod
Thanks Daniel, and Sean for your answers. Daniel, the part that interests me the most is "converting resultset rows to collection (of objects)", and I think a lot of people do just what you said (own customized function). I was looking for, and will probably in the end implement an open source

[ANN]: Matcha, a library for composable test assertions with human readable error messages

2015-05-25 Thread tcrayford
Matcha lets you write flexible, composable test assertions with human friendly error messages. It's modeled after the excellent Java Hamcrest library. As a quick example, you might build up a matcher that says "this map has 5 elements, and the :foo key must be greater than 10" like so: ``` (re

Re: Relational mapping - turning an sql query result into array of hashes (with joins)

2015-05-25 Thread Sean Corfield
I just don’t consider it a problem. A query returns a flat result set — a sequence of hash-maps. That’s it. That’s what SQL returns (essentially a table) and it’s a perfectly reasonable data structure for Clojure to work with. The JOINs in SQL just say how to link tables together to produce that

New Functional Programming Job Opportunities

2015-05-25 Thread Functional Jobs
Here are some functional programming job opportunities that were posted recently: Clojure/Erlang backend engineer/architect at Zoomo http://functionaljobs.com/jobs/8831-clojure-erlang-backend-engineer-architect-at-zoomo Back End/Full Stack Scala Developer at nToggle.com http://functionaljo

Re: what demonstrates Stuart Sierra's "State/Event Pattern"

2015-05-25 Thread Stuart Sierra
This is a pattern I have used **occasionally**. That whole talk is just patterns that were in my head at the time. Take whatever you find useful from it, but don't treat it as a universal or complete list. If you squint, that 'chain-consequences' function behaves sort of like a monad, but I wo

Re: Help with async operations

2015-05-25 Thread Oleg Dashevskii
Hi Rangel, thanks! works perfectly! понедельник, 18 мая 2015 г., 4:07:53 UTC+6 пользователь Rangel Spasov написал: > > You can checkout the new pipeline stuff, I think it fits what you're > looking for nicely: > > https://gist.github.com/raspasov/7c9d8f2872d6065b2145 > > -- You received this

Re: [ANN, GSoC] A Common Clojure Source Metadata Model

2015-05-25 Thread Richard Möhn
Am Freitag, 22. Mai 2015 11:09:40 UTC+9 schrieb Colin Fleming: > > On one of the latest Cognicasts, Colin Fleming talked about a repo where >> library authors can upload extensions that help the IDE understand their >> macros. I have to listen to it again, but it sounded a bit like what you're