Re: [ANN] Eastwood, the Clojure lint tool, version 0.2.4 released

2017-05-24 Thread LaurentJ
Hi, If you dont mind, just use them all ;) https://github.com/itang/lein-checkall Le mardi 23 mai 2017 18:16:01 UTC+2, Travis Daudelin a écrit : > > Hi, thanks for posting this looks great! > > Is there any overlap in functionality between Eastwood and Kibit >

Re: [ANN] anomalies-tools 0.1.2

2018-03-11 Thread LaurentJ
Nice ! Definitely have to use those anomalies in my next project. Le samedi 10 mars 2018 21:18:56 UTC+1, alex a écrit : > > Anomalies-tools is a small Clojure utility library on top of > cognitect.anomalies (https://github.com/cognitect-labs/anomalies) which > provides some useful functions

Re: Proper way to write EDN file, after production bug

2018-03-30 Thread LaurentJ
I mean just print-dup and print-meta should be enough ! Le vendredi 30 mars 2018 14:31:04 UTC+2, LaurentJ a écrit : > > Yes we will set print-dup, print-meta, print-level and print-length to > have a properly formatted edn file. > > Le vendredi 30 mars 2018 05:55:50 UTC+2,

Re: Proper way to write EDN file, after production bug

2018-03-30 Thread LaurentJ
Yes we will set print-dup, print-meta, print-level and print-length to have a properly formatted edn file. Le vendredi 30 mars 2018 05:55:50 UTC+2, Didier a écrit : > > Ya, I'd write a wrapping fn, like ->edn which internally binds everything > to what it should be, maybe even declares some

Re: Proper way to write EDN file, after production bug

2018-03-29 Thread LaurentJ
] (prn (range 11))) > (0 1 2 3 4 5 6 7 8 9 10) > nil > user=> (prn (range 10)) > (0 1 2 3 4 ...) > > If you don't know how this works (or differs to lexical binding via let) > you can read up on vars here: > > https://clojure.org/reference/vars > > Hope

Proper way to write EDN file, after production bug

2018-03-29 Thread LaurentJ
Hello, A funny bug today, our pipeline was broken because of an EDN file with ellipsis in it. It appears that the file was generated from a Clojure env with *print-length* configured. So as many have asked, do we have a better way to write EDN file other than using prn ? For the moment what

Re: Blocking behavior of >!! ?

2019-05-20 Thread LaurentJ
You are not wrong. I think it was obvious for the author to consider that >!! will not block if there are waiting offers. You can see it in the code, if no buffer is set the write method will iterate over takers ready to consume the value.

Re: Blocking behavior of >!! ?

2019-05-20 Thread LaurentJ
...waiting -offers +takers Le lundi 20 mai 2019 18:30:36 UTC+2, LaurentJ a écrit : > > You are not wrong. > > I think it was obvious for the author to consider that >!! will not block > if there are waiting offers. > > You can see it in the code, if no buffer

Re: Pesky java interop bug with 0xFFFFFFF error in BuferredReader

2021-12-27 Thread LaurentJ
Hank, Your last version does not work because your `if` condition is wrong, your code stops on the first read ;) Laurent Le lundi 27 décembre 2021 à 21:34:05 UTC+1, hank@gmail.com a écrit : > Ooops my bad, there's a typo in '(.toString sb1)' which sould be 'sb'. > It doesn't change

Re: Pesky java interop bug with 0xFFFFFFF error in BuferredReader

2021-12-25 Thread LaurentJ
Hi, Your loop/recur usage is wrong, your error may be because your loop has no halting condition. https://clojure.org/reference/special_forms#loop https://clojuredocs.org/clojure.core/loop Regards Laurent Le samedi 25 décembre 2021 à 20:23:37 UTC+1, hank@gmail.com a écrit : > > Hello --

Re: Pesky java interop bug with 0xFFFFFFF error in BuferredReader

2021-12-26 Thread LaurentJ
C-3, LaurentJ wrote: > "Hi, > > Your loop/recur usage is wrong, your error may be because your loop has no > halting condition." > > Hi Laurent -- > I actually took inspiration from one of the sources you posted: > (import '(javax.sound.sampled AudioSystem Audi

Re: Pesky java interop bug with 0xFFFFFFF error in BuferredReader

2021-12-26 Thread LaurentJ
Hi Hank, That loop/recur is still wrong because `loop` set bindings to define names and gives initial values but `recur` does *not set bindings*, it just provides new values. So `recur` does not need a vector of bindings like `loop` The pattern is as follow: (loop [a-local-var

Re: Pesky java interop bug with 0xFFFFFFF error in BuferredReader

2021-12-26 Thread LaurentJ
Hank Your loop/recur in your pt5 function is still not good. Take the time to read the loop/recur documentation and to understand examples. A Clojure loop/recur is not really a loop like in other procedural languages. It is more akin to a new function call at the `loop` point with new args

Re: Pesky java interop bug with 0xFFFFFFF error in BuferredReader

2021-12-26 Thread LaurentJ
Hank, Just a message to give you the solution [spoiler alert] Don't read it, if you still want to search :) SPOILER SPOILER ;; ugly version using the fact that java objects are mutable in place (defn ugly-read-chars-one-by-one [reader] (let [sb (StringBuilder.)]