Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
senfiaj
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
20 ms
·
301.
▲
by
senfiaj
2y ago
My speculation is also that with iterators the array size might be somewhat less predictable, because you might not know when the iterator finishes. For example by doing .filter().map(). So there is no way to precisely know how much memory
302.
▲
by
senfiaj
2y ago
Interesting, I did some testing, just opened the task manager and run this js code in the browser without opening dev tools in order to see how the browser will behave when I don't prevent any optimizations. Then I commented withArrayT
303.
▲
by
senfiaj
2y ago
> My own hypothesis: any serious JS engine is going to recognise the [a, b] = [b, a] This. As the author of this blog I actually run a benchmark, the loop body was only doing swap, I remember the penalty was around ~2%. But yeah, if it&#
304.
▲
by
senfiaj
2y ago
I'm am the author of this blog. As for speed, you are probably right, I was mainly talking about wasting memory for temporary arrays, not the speed, it's unlikely that iterators are faster. But I'm curious, how large arrays d
305.
▲
A simple bouncing ball game
(waspdev.com)
1 points
by
senfiaj
2y ago
|
0 comments
306.
▲
You probably don't need to bundle the resources for your website
(waspdev.com)
1 points
by
senfiaj
2y ago
|
0 comments
307.
▲
Is it possible to create a new browser from scratch?
(waspdev.com)
3 points
by
senfiaj
2y ago
|
0 comments
308.
▲
by
senfiaj
2y ago
Same toughs. It's irreplaceable when working with arbitrary sized integers. Even if it's used on 1-2% of websites, it's still a significant usage. Surely, it won't be used as commonly a regular floating point number.
309.
▲
by
senfiaj
2y ago
bigint cannot be replaced by regular number when working with arbitrarily large whole numbers. With regular numbers you will lose precision out of the range [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER]. If you try to implement such fu
310.
▲
by
senfiaj
2y ago
Yep. Even if it is used on the 1% of websites it's still a usage. Sure, I don't expect it to be used as commonly as a regular number.
311.
▲
by
senfiaj
3y ago
Why did it upset? Machines are just tools. Is using something beyond a pen and a paper considered a cheating. There are some problems where the easiest way is to just to use brute force. The God's number (the maximum moves to solve the
312.
▲
by
senfiaj
3y ago
Today it's not nearly as bad as it was before. I personally have very few reasons to use jQuery. Maybe it's somewhat shorter code and supports some cool pseudoselectors (IMHO, they are often bad patterns) but for me it's ofte
313.
▲
by
senfiaj
3y ago
In my opinion selecting something based on it's layout is oftentimes a dangerous pattern, you are basically tying the UI layout with the logic. People can overuse these cool selectors. I've personally worked on a website where the
314.
▲
by
senfiaj
3y ago
Bard can now accept images, and it's quite decent in recognizing the overall picture, not so good in the details. It can also recognize text.
315.
▲
by
senfiaj
3y ago
This doesn't mean you should look for a trouble and not prevent potential problems with better coordination / planning and carefully weighting the pros / cons of a particular decision. Merge conflicts and huge refactorings ca
316.
▲
by
senfiaj
3y ago
Yap, the merge issue is one of the worst nightmares for developers.
317.
▲
by
senfiaj
3y ago
Maybe there is a middle ground, such as creating "v2" (or whatsoever) folder with the newest changes where you can easily switch between the old and the new functionality.