Re: [ANN] com.dean.interval-tree

2021-04-06 Thread Paulus Esterhazy
Very cool, thanks for sharing! This looks like it would be perfect for Advent of Code puzzles. Out of curiosity, what are real-life problems that benefit from the use of an interval map? On Tue, Apr 6, 2021 at 2:04 PM danle...@gmail.com wrote: > > > https://github.com/dco-dev/interval-tree > >

Re: Releasing scope-capture, a library for easing REPL-based debugging

2017-10-08 Thread Paulus Esterhazy
This looks great, thanks for publishing this, Val! On Sun, Oct 8, 2017 at 9:09 AM, Val Waeselynck wrote: > Hi, I'm happy to release a tiny Clojure/Script library called scope-capture. > > https://github.com/alvalval/scope-capture > > Loosely speaking, scope-capture

Re: "GC overhead limit exceeded": Deceptive message?

2017-08-08 Thread Paulus Esterhazy
For background on "holding onto the head of a sequence" type problems, see https://stuartsierra.com/2015/04/26/clojure-donts-concat and https://stackoverflow.com/questions/15994316/clojure-head-retention On Tue, Aug 8, 2017 at 6:19 PM, Nathan Smutz wrote: > The one thing I'm

Re: potential bug with pr-str+print

2017-05-02 Thread Paulus Esterhazy
Looks like a bug to me. ClojureScript doesn't seem to have this problem. On Tue, May 2, 2017 at 7:50 AM, Jenny Finkel wrote: > Hello! > > I think I may have found a bug in clojure. When pr-str is called from within > print, it doesn't produce a read-string-able string. Here

Re: Diffing clojure data structures faster

2016-10-14 Thread Paulus Esterhazy
Great work, Dan! I think adding a way to diff standard clojure data structures efficiently would open up very interesting possibilities. Two examples: - log changes in reagent's state-atom (clojurescript) - build a simple durable "database" atom (persistent across process restarts) using a

Re: Multiple key-value pairs in assoc-in (old issue)

2016-08-18 Thread Paulus Esterhazy
Just this week I have wished for an extended version of `assoc-in` more than once. The reason is convenience, e.g. in the context of a ring middleware: (assoc-in response [:headers "Location"] "/homepage" [:session :user-id] user-id) Extending `assoc-in` would also achieve parity with

Re: ClojureScript and React-native?

2016-05-29 Thread Paulus Esterhazy
Also give boot-react-native a try (https://github.com/mjmeintjes/boot-react-native). It's a admittedly bit rough to get started, but when set up offers a powerful interactive working environment. On Sun, May 29, 2016 at 4:12 PM, Mark Stang wrote: > Well, Re-natal seems to

Re: Processing an array

2016-04-24 Thread Paulus Esterhazy
Here's how I would do it: ``` (defn to-timed-events [events] (->> events (reduce (fn [[acc-events acc-time] {:keys [duration], :as event}] [(conj acc-events (assoc event :time acc-time)) (+ acc-time duration)]) [[] 0]) first)) ```