Re: [ANN] data.avl 0.0.13 – fast sorted collections with O(log n) slices and nth

2015-12-09 Thread 'Jan-Paul Bultmann' via Clojure
Very awesome :D! Cheers, Jan > On 09 Dec 2015, at 10:39, Michał Marczyk wrote: > > Hi, > > I am pleased to announce the 0.0.13 release of data.avl, a Clojure > Contrib library providing highly performant drop-in replacements for > Clojure(Script)'s built-in sorted maps and sets with the follow

Re: Awesome Clojure Engineer Opportunity

2015-10-12 Thread 'Jan-Paul Bultmann' via Clojure
Hey Rameen, Cool, I didn’t know that Apple was using Clojure internally. Cheers, Jan > On 12 Oct 2015, at 22:00, Rameen Fattahi wrote: > > Hi Everyone, > > My name is Rameen and I'm looking for a passionate Clojure engineer for a > very confidential project at one of the biggest companies in

Re: rand-nth on empty collections

2015-09-30 Thread 'Jan-Paul Bultmann' via Clojure
Throwing an exception is probably the right thing to do if it's supposed to closely model the behavior of `nth`, but it wonder if it's the most usefull behavior in practice. I would guess that it introduces `not-empty` checks everywhere, instead of only for the cases where you want to be shure t

Re: Is this the good way to write get-percentage

2015-02-13 Thread Jan-Paul Bultmann
I really don't think that calculating percentages warrants a DSL. (I'm not even sure if percent warrants a function ;} ) `(round (percent ...)) (round-up (percent ...)) (round-down (percent ...))` Seems far more readable to me than having a function that does many things at once, be it higher

Re: Architectural doubts

2015-01-31 Thread Jan-Paul Bultmann
Why not stream frames directly into the datomic db as they fall out of gloss? This should be faster at query time anyhow due to indexes, and let's datomic handle the memory management. cheers Jan > On 31 Jan 2015, at 11:39, Milton Silva wrote: > > While using wireshark to analyse libpcap files

Re: if-not implementation

2015-01-22 Thread Jan-Paul Bultmann
Even with inlining the code is rather silly ;) [x] (if x false true) so you'd get, (if (if test false true) then else) Which relies a bit too much on the JVM's JIT for my taste :D I've always wondered what the reason for the original implementation is. Keep closer to the implementation

Re: DSL in RTL (Right to Left) languages.

2015-01-13 Thread Jan-Paul Bultmann
I would wrap everything in a tree walking macro that first reverses all lists and then starts evaluating other macros. I'd love to see an Arabic clojure file btw :D But non English source always makes me shudder a bit, one of the great things about programming is that everybody speaks English ;)

Re: Author a Book on Clojure - Packt Publishing

2014-12-22 Thread Jan-Paul Bultmann
Just my 50 cent. I was asked to do a technical review on a Clojure podcasts by packtpub once. The "storyboard" they send me consisted of a word file containing a huge table with text and source code. Why would anybody send a technical reviewer source code in a word document, yet alone in a tab

Re: If code is data why do we use text editors?

2014-11-14 Thread Jan-Paul Bultmann
Yeah this would be awesome, but sadly representing Clojure code as data is as hard as representing Java. All the reader macros make it a nightmare, and the closest thing you'll get is tools.analyzer AST nodes. Session is certainly a step in the right direction, and I wish more people would embr

Re: better way to group consecutive numbers in a vector?

2014-11-07 Thread Jan-Paul Bultmann
I think what you want is `partition-between` as implemented by amalloys useful lib (https://github.com/amalloy/useful/blob/develop/src/flatland/useful/seq.clj#L224 ). `(partition-between (fn [x y]

Re: Schrodinger's cat in clojure?

2014-10-11 Thread Jan-Paul Bultmann
ve > to worry about keeping large data structures in memory, etc. But in many > situations, those features aren't needed.) > > That's what I mean by "turning off laziness": Replacing every function that > returns a lazy sequence with its closest non-lazy

Re: Schrodinger's cat in clojure?

2014-10-11 Thread Jan-Paul Bultmann
iness on and off. (I am not suggesting that this should be done. No > doubt it would entail a lot of work, and performance tradeoffs. I'm quite > happy with Clojure as it is, despite anything negative I might say about > impacts of laziness in some circumstances.) > > On

Re: Schrodinger's cat in clojure?

2014-10-11 Thread Jan-Paul Bultmann
Transducers build up transformation steps, with new generic operations like single arg `map` and `filter`, and then apply these transformations to a collection using an evaluation function. This function decides if operations are done lazily, eagerly, or on a channel. Note that while this makes

Re: `as->` does not work with `recur`.

2014-10-05 Thread Jan-Paul Bultmann
, Oct 5, 2014 at 4:56 AM, Leon Grapenthin > wrote: > Thought: > > (defmacro as-> > [expr name & forms] > `(let [~name ~expr >~@(interleave (repeat name) (butlast forms))] >~(last forms))) > > > > > On Su

`as->` does not work with `recur`.

2014-10-04 Thread Jan-Paul Bultmann
Hey, I just noticed that while recur can be the last statement in most threading macros, it can't be used within an `as->` macro. user=> (macroexpand '(-> x (recur))) (recur x) user=> (macroexpand '(as-> x % (recur %))) (let* [% x % (recur %)] %) This means that a recur within a `as->`

Re: complex numbers in clojure

2014-08-16 Thread Jan-Paul Bultmann
I agree that Clojure could really use an imaginary number type. The best place to start with this might be `clojure.math.numeric-tower` because it already provides a `MathFunctions` protocol that defines a square root operation. Cheers Jan On 15 Aug 2014, at 19:54, Maik Schünemann wrote: > Hi