HackerLangs
トップ新着トレンドコメント過去質問紹介求人

leeoniya

no profile record

コメント

leeoniya
·先月·議論
so, Your Attention is All They Need?
leeoniya
·2 か月前·議論
or was it Windows hiding file extensions by default and you downloaded a .mp3.exe file?
leeoniya
·2 か月前·議論
surprised not to see http://phpsadness.com/ here
leeoniya
·2 か月前·議論
the term "Americans" always bothered me, though it's commonly used to refer to US
leeoniya
·2 か月前·議論
> "no no, it has full test coverage"

i don't have enough fingers (and toes) to count how many times i've demonstrated that "100% coverage" is almost universally bullshit.
leeoniya
·2 か月前·議論
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.
leeoniya
·3 か月前·議論
Levenshtein distance is often a poor way to fuzzy match or rank. i suspect that in js, even the trie approach would incur significant GC/alloc thrashing or cost of building a huge trie index.

i tried fuzzy matching using a cleverly-assembled regexp approach which works surprisingly well: https://github.com/leeoniya/uFuzzy
leeoniya
·3 か月前·議論
> Sen. Sheldon Whitehouse

ok, i was confused for a minute.

> And, given that the gas breaks down relatively quickly, this would have been one of the fastest ways to reduce global warming.

s/quickly/slowly?
leeoniya
·3 か月前·議論
> for a 2–3% performance gain

this is highly workload-dependent. there are plenty of APIs that are multiple-factor faster and 10x more memory efficient due to native implementation.
leeoniya
·3 か月前·議論
ack, see my reply to sibling comment: https://news.ycombinator.com/item?id=47572206
leeoniya
·3 か月前·議論
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".
leeoniya
·3 か月前·議論
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.
leeoniya
·3 か月前·議論
tried just doing a concat of the 100k sentences with line breaks, it wasnt much faster, ~1880ms.
leeoniya
·3 か月前·議論
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.
leeoniya
·3 か月前·議論
correct, it was meant for estimating row height for virtualizing a 100k row table with a latin-ish LTR charset (no emoji handling, etc). its scope is much narrower. still, the difference in perf is significant, which i have found to be true in general of AI-generated geenfield code.
leeoniya
·3 か月前·議論
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.
leeoniya
·4 か月前·議論
just throw another few on the pile:

https://mastodon.social/@azureshit
leeoniya
·5 か月前·議論
the good ones would usually follow up with, "how much detail do you _really_ want ;D"
leeoniya
·5 か月前·議論
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
leeoniya
·6 か月前·議論
hey!

> But regarding sampling, if it's a line chart, you can sample adaptively by checking whether the next point makes a meaningfully visible difference measured in pixels compared to its neighbours.

uPlot basically does this (see sibling comment), so hopefully that's some validation for you :)