HN user

leeoniya

9,710 karma

"All problems in computer science can be solved by another level of abstraction...except for the problem of too many levels of abstraction."

L6 @ Grafana

https://github.com/leeoniya

leeoniya_at_gmail

Posts70
Comments2,730
View on HN
github.com 6d ago

Show HN: easy-tz – A fast, 10KB, dependency-free getTimeZonesAt(timestamp)

leeoniya
2pts0
github.com 1y ago

Show HN: uWrap.js – A faster and more accurate text wrapping util in < 2KB

leeoniya
121pts21
github.com 2y ago

Show HN: uDSV.js – A faster CSV parser

leeoniya
67pts23
news.ycombinator.com 3y ago

Ask HN: DIY baby cams/monitor(s) with privacy?

leeoniya
12pts17
notmart.org 3y ago

For KDE Plasma 5.27 we did a big refactor on how the screens are managed

leeoniya
4pts2
github.com 3y ago

Show HN: uFuzzy.js – A tiny, efficient fuzzy search that doesn't suck

leeoniya
251pts82
github.com 4y ago

An unscientific benchmark of SQLite vs. the file system (btrfs)

leeoniya
113pts67
observablehq.com 4y ago

Comma-Separated Tree

leeoniya
12pts0
leeoniya.github.io 5y ago

Stacked Area Charts: Just Don't

leeoniya
1pts0
news.ycombinator.com 5y ago

Tell HN: Facebook has removed “Sponsored” from desktop ads in your feed

leeoniya
4pts0
leeoniya.github.io 5y ago

μPlot v1.1 – now with log scales support

leeoniya
112pts15
marijnhaverbeke.nl 6y ago

CodeMirror 6 Enters Beta

leeoniya
2pts1
leeoniya.github.io 6y ago

Show HN: Plotting 3 years of hourly data in 150ms

leeoniya
785pts102
news.ycombinator.com 6y ago

Show HN: uPlot.js v1.0 – A fast, small chart for time series, OHLC and bars

leeoniya
5pts1
news.ycombinator.com 6y ago

Ask HN: USB-C Connector Mechanical Durability?

leeoniya
5pts5
m.youtube.com 6y ago

Albert Michelson's Harmonic Analyzer (2014) [video]

leeoniya
39pts4
github.com 6y ago

Chrome 80 Is 30% Slower Than Chrome 75

leeoniya
282pts158
m.youtube.com 6y ago

Albert Michelson's Harmonic Analyzer (2014) [video]

leeoniya
9pts0
news.ycombinator.com 6y ago

Ask HN: Show Me a Fast React/Vue/Angular Site

leeoniya
19pts9
en.wikipedia.org 6y ago

Monty Hall Problem

leeoniya
122pts251
github.com 6y ago

Show HN: uPlot.js – An exceptionally fast, tiny time series chart

leeoniya
260pts81
www.techrepublic.com 6y ago

Google moves closer to letting Chrome web apps edit your files

leeoniya
19pts10
dreamerbuilds.com 7y ago

Molecular Constellation

leeoniya
1pts0
github.com 7y ago

Show HN: DropCSS – A simple, thorough and fast unused-CSS cleaner

leeoniya
134pts25
reindernijhoff.net 7y ago

Wolfenstein: Ray Tracing on Using WebGL1

leeoniya
235pts27
www.windy.com 8y ago

Live Hurricane Irma Wind Map

leeoniya
4pts0
www.newyorker.com 8y ago

Utopian for Beginners (2012)

leeoniya
1pts0
www.dwolla.com 9y ago

Dwolla to cripple Personal account features

leeoniya
2pts0
github.com 9y ago

WebRender2 Lands in Servo

leeoniya
158pts27
www.redox-os.org 9y ago

The Internet on Redox

leeoniya
22pts5

if you want to do image diffing, use https://github.com/dmtrKovalenko/odiff

however, if you have SVGs already, compare those without rasterizing them first, then if that fails rasterize & odiff the baseline and new on-demand. this way you dont waste a ton of space storing a bunch of binary [possibly evolving] pngs in git.

no disagreement. i never claimed uWrap did anything more than it does. it was not meant for typography/text-layout but for line count estimation. it never needed to be perfect, and i did not claim equivalence to pretext. however, for the use case of virtualization of data tables -- a use case pretext is also targeted at -- and in the common case of latin alphabets, right now pretext is significantly slower. i hope that it can become faster despite its much more thorough support for "rest of the owl".

i don't have a mac to test this with currently, so hopefully it's not the price but a matter of adding a Safari-specific adjustement :)

internally it still uses the Canvas measureText() API, so there's nothing fundamentally that should differ unless Safari has broken measureText, which tbh, would not be out of character for that browser.

it is not clear from the API/docs how i would use prepare() once on one text and then use layout() for completely different text.

i think the intended purpose is that your text is maybe large but static and your layout just changes quickly. this is not the case for figuring out the height of 100k rows of different texts in a table, for example.

i wrote something similar for this purpose, but much simpler and in 2kb, without AI, about a year ago.

uWrap.js: https://news.ycombinator.com/item?id=43583478. it did not reach 11k stars overnight, tho :D

for ASCII text, mine finishes in 80ms, while pretext takes 2200ms. i haven't yet checked pretext for accuracy (how closely it matches the browser), but will test tonight - i expect it will do well.

let's see how close pretext can get to 80ms (or better) without adopting the same tricks.

https://github.com/chenglou/pretext/issues/18

there are already significant perf improvement PRs open right now, including one done using autoresearch.

i used something like this in unstructured technical interviews all the time.

"you type a phrase into google search, you press enter, get some results. tell me, in technical detail, what happened in that chain of actions"

the diversity of replies is fascinating, you learn a lot about a "full stack" candidate this way.

Feynman's classic "Why?" chain: https://www.youtube.com/watch?v=36GT2zI8lVA

uPlot maintainer here. this looks interesting, i'll do a deeper dive soon :)

some notes from a very brief look at the 1M demo:

- sampling has a risk of eliminating important peaks, uPlot does not do it, so for apples-to-apples perf comparison you have to turn that off. see https://github.com/leeoniya/uPlot/pull/1025 for more details on the drawbacks of LTTB

- when doing nothing / idle, there is significant cpu being used, while canvas-based solutions will use zero cpu when the chart is not actively being updated (with new data or scale limits). i think this can probably be resolved in the WebGPU case with some additional code that pauses the updates.

- creating multiple charts on the same page with GL (e.g. dashboard) has historically been limited by the fact that Chrome is capped at 16 active GL contexts that can be acquired simultaneously. Plotly finally worked around this by using https://github.com/greggman/virtual-webgl

data: [[0, 1], [1, 3], [2, 2]]

this data format, unfortunately, necessitates the allocation of millions of tiny arrays. i would suggest switching to a columnar data layout.

uPlot has a 2M datapoint demo here, if interested: https://leeoniya.github.io/uPlot/bench/uPlot-10M.html

If I ever felt I was too old to have kids I’d probably have no choice but to kill myself

sperm quantity and quality decreases with age. studies exist that suggest higher risk of autism when father's age >= 45.

you're not too old, but you should probably test & freeze some good sperm before you might actually be too old by the time you find the right person. this way you won't ever feel like you're too old to have kids. then the question becomes more of "how long and in what manner will my remaining health allow me to enjoy them"

Did we choose the age at which we would have children? What does it mean to choose?

we planned to have a kid by our early thirties. she specifically wanted one by 30. we were both healthy, financially stable with solid careers.

then came multiple miscarriages, 10 years of background/foreground stress, and IVF. now we finally have two healthy ones. i think daily about those 10 years we've lost to spend with our kids while still younger and able to do activities that i still enjoy like snowboarding, mountain biking, etc. thankfully i'll still be able to do some of it, but man, it has been rough. my awesome father-in-law died of cancer 9mo before his grandson's birth; the only thing he ever knew were our ongoing struggles :(

something else that happens is that all your same-aged friends with kids...they have different lives now. you can't talk to them about the same child struggles / tips in real time, the kids don't go to school together or know the same people; they're a generation apart. it becomes an isolating event when the delay is long enough.

despite all that, when i think of where i was financially then and now (and what i did in those 10 years to get from there to here that would not have happened otherwise), and that if i had a kid 10 years ago it would be a different [probably worse] kid instead of the adorable 2.5yo that runs to me each morning now, i feel a lot better.

my advice would not necessarily be to start earlier, but if you've decided to procreate and are consciously deferring it until the "right" time, just expect the really, really unexpected.