RIP Anthony Grimes (Raynes)

2016-12-07 Thread Chas Emerick
As some may have already seen on Twitter or other channels, our friend Anthony Grimes (Raynes in #clojure IRC and elsewhere, @StRaynes on Twitter) has passed away. The most immediate announcement of this came via Lance Bradley, one of Anthony's closer friends from the Clojure community: http

[ANN] Nightlight 1.3.0: Total Rewrite (of the frontend)

2016-12-07 Thread Zach Oakes
TL;DR: Nightlight, and embedded Clojure editor, just got a makeover: https://sekao.net/nightlight/ Well, it had to happen at some point. The original version of Nightlight I wrote a few months ago was cobbled together with bootstrap, jQuery, and regrets. I knew about React, but I was but a simp

RIP Anthony Grimes (Raynes)

2016-12-07 Thread Alan Moore
Oh no... so sad and tragic. I remember everyone pitching in to "get him to the conj"... and all his great Clojure contributions. I always admired his enthusiasm and spirit. My condolences to his close friends and family. While I never met him in person his presence was felt in this forum and in

Index of an element in a vector of vectors

2016-12-07 Thread 'Rickesh Bedia' via Clojure
If I have (def players [["1" "2" "3"] ["4" "5" "6"] ["7" "8" "9"]]) How would I get the index of number 5? I think it should be [1 1] but don't know how to get this If it were more simple such as (def players ["1" "2" "3"]) I can get the index using (.indexOf players "2") > 1

Java memory model & stateful tranducers

2016-12-07 Thread Léo Noel
Hi ! I'm a bit confused about the official design rules for stateful transducers and transducing contexts, especially about which one should be in charge of memory visibility guarantees. The common practice seems to be using volatiles to hold state in transducers (e.g distinct

Re: RIP Anthony Grimes (Raynes)

2016-12-07 Thread Alex Miller
Just tragic news today. You can find some other memories at https://www.reddit.com/r/Clojure/comments/5gyyxw/clojure_open_source_contributor_anthony_grimes/ as well. He will be missed! On Wednesday, December 7, 2016 at 7:32:23 AM UTC-6, Chas Emerick wrote: > > As some may have already seen on

Re: Java memory model & stateful tranducers

2016-12-07 Thread Alex Miller
Transducers are expected to be invoked always in a single thread context. Everything in core maintains that by just running it in a single thread. core.async channels may be invoked from many threads, but only one at a time, and channel itself properly locks to make that state visible. That sai

Re: Java memory model & stateful tranducers

2016-12-07 Thread Alex Miller
I think the reason for some things being volatile and some not is that we want all of that stuff to be stateful. The volatile ones are making things stateful by explicitly creating a stateful Clojure container for immutable values. The ArrayLists are inherently stateful because they are mutable

Re: Index of an element in a vector of vectors

2016-12-07 Thread Andy-
One option is to use keep-indexed: (first (keep-indexed (fn [i xs] (first (keep-indexed (fn [j x] (when (= x "5") [i j])) xs))) players)) On Wednesday, December 7, 2016 at 5:32:10 PM UTC+1, Rickesh Bedia wrote: > > If I have

[ANN] Book "The Clojure Standard Library - Annotated Reference"

2016-12-07 Thread Renzo Borgatti
Hi all, I'm very happy to announce the early access of a new book: "Clojure Standard Library - Annotated Reference" by Manning. Although it's a reference of the roughly 700+ functions (and macros) coming out of the box with the Clojure jar file, it is not designed to read as a boring list. Thi

Re: Java memory model & stateful tranducers

2016-12-07 Thread Léo Noel
> > And then I think it is the responsibility of the transducing context to > lock appropriately to ensure visibility (if needed). Totally agree, that's why volatile instead of unsynchronized in transducer sounds like belt and suspenders to me. On Wednesday, December 7, 2016 at 7:00:09 PM UT

Re: [ANN] Book "The Clojure Standard Library - Annotated Reference"

2016-12-07 Thread Alex Miller
This is a cool idea so thanks for working on it. I was going to buy this (as I buy most of the Clojure books that come out) but $48 for an unfinished ebook put me off so I didn't. I totally get why a physical book of this length would be that much (because paper is expensive right now), but I d

Re: [ANN] Book "The Clojure Standard Library - Annotated Reference"

2016-12-07 Thread Ryan Fowler
I love the idea. ​A gotchas section of some sort could be useful. For instance, a detail about `case` to consider mentioning is that Java Constants don't work as tests. ryans-mbp:~% cat test.clj (let [incoming-character Character/LINE_SEPARATOR] (println "case w/ constant" (case inco

Re: [ANN] Book "The Clojure Standard Library - Annotated Reference"

2016-12-07 Thread Alex Miller
This is a good gotcha. From Clojure's perspective this is just referencing a Java field (which could be mutable and NOT a constant). Maybe it would be possible to reflectively determine that this field is actually a constant and make it work, not sure. The number one special case I see people a

Re: RIP Anthony Grimes (Raynes)

2016-12-07 Thread Ken Restivo
Many people who have been here a while know what a bright, talented, and promising young programmer he was, and of his impressive list of contributions to the Clojure community. He seemed relentlessly curious, and worked professionally in Clojure, Haskell, NodeJS, CoffeeScript, Python, and last

Re: [ANN] Book "The Clojure Standard Library - Annotated Reference"

2016-12-07 Thread Torsten Uhlmann
Thanks for working on this! Back in the day I had a "Java Developers Almanac" for Java 1.4 and it helped getting around the lesser used API parts, or discovering functionality I hadn't used before. Alex Miller schrieb am Do., 8. Dez. 2016 um 04:13 Uhr: > This is a good gotcha. From Clojure's p