Fork me on GitHub
#clojure-europe
<
2021-04-16
>
dharrigan06:04:53

Good Morning!

simongray07:04:27

So I managed to wrap that beastly Javascript library in reagent, turning a 10+ year old static timeline widget into a reactive one that I can load data into dynamically. Now the issue is that it relies on the developer manually marking sections of the timeline to be magnified at different levels in order to reduce the concentration of events at different points. I am thinking that I could make a little algorithm that is able to determine that automatically, right? Maybe by setting a limit on the events per time unit and then magnifying at points on the timeline where the limit is exceeded. And perhaps using that CLJC interval library that just popped up in #announcements recently?

pez08:04:14

Way cool! Can you post some screenshots/gifs to make it a bit clearer what the challenge is about?

pez08:04:28

Morning everybody!

thomas08:04:28

TGIF!!!!!!

borkdude08:04:38

Bonan matenon

borkdude08:04:09

I read it, nice positive read (instead of all those rants on Reddit, nice for a change)

simongray08:04:45

@pez here is an example using predefined zones for one time band. The time band morphs when panning back and forth, representing the same length in pixels used for days as minutes or seconds in those zones to better encompass the pile of events occurring in a very short time.

simongray08:04:15

I want to make an algorithm that takes a series of events and figures out where to put those zones.

simongray09:04:59

and it gets a little more complicated by the fact that the overview band should probably also be stretched in a similar manner even though it uses different time units, so the proportions are not comparable.

pez09:04:53

Still not completely following, but it looks super smooth and awesome. 👏

🙏 3
simongray09:04:09

haha, guess it’s not that obvious… basically, there’s a whole bunch of events all occurring within minutes or seconds of each other, but many of the other events occur days or weeks before or after this concentration of events. How do you represent that on a timeline? You can do it linearly on a scale using something like seconds as the main unit of time, but that will result in many events events being separated by an incredible distance on the timeline since the time series spans weeks. Another option is to use weeks as the unit of time, but that results in events getting piled in those hot spots where there is a new event every minute or second. So the solution of this ancient widget library is to predefine hot spots and stretch the time band at those places. What I wanna do is calculate those zones dynamically.

pez07:04:35

Oh, missed this. Now I get it. 😃

slipset10:04:17

For no specific reason, I started thinking about Calva today, and I believe https://github.com/BetterThanTomorrow/calva/issues/64#issuecomment-433293059 was my first interaction with Calva. It’s come quite a bit further. Thank you @pez!

❤️ 6
calva 3
borkdude10:04:03

Calva rocks!

dominicm10:04:23

morning 😄

pez10:04:34

Wow, that’s wonderful, @slipset. You know you are forever part of Calva history since you saved my sanity with your awesome mentoring when I was struggling at the very deep end of the water. ❤️

pez10:04:16

That was one weird issue, btw. One of many. It’s funny how sometimes many hours go into super boring stuff like that, with zero results, and sometimes just one or two hours can deliver tons of value to the users. Old as I am in the game, it still amazes me.

❤️ 12
borkdude10:04:49

@pez You mean like, the space issue with powershell/cmd.exe? :)

🎯 3