Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
dahart
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
49 ms
·
901.
▲
by
dahart
2y ago
> I think you're putting far too much trust into "I haven't seen" and not considering the fact that there is more to see. No, I was being cheeky. The fact that recursion can always be transformed into iteration has
902.
▲
by
dahart
2y ago
Tail recursion is iteration, it’s not true recursion. I said it in my first and second and fourth comments in this thread. If you didn’t notice it or you think that tail recursion is the point of this thread, it’s because you’re misundersta
903.
▲
by
dahart
2y ago
I used something close to this to implement a whiteboard marker with texture and transparency. If your browser supports WebGL, feel free to try https://limnu.com/d/new.html (BTW It’s a multi-player whiteboard you can s
904.
▲
by
dahart
2y ago
No, you’re misunderstanding the scale and making assumptions. It’s widely reported and well known that water bottles polluting the ocean is coming from consumer goods - the volume of plastic trash in the ocean is far far bigger than the ent
905.
▲
by
dahart
2y ago
I think you’re misunderstanding my points. I already said (more than once) tail recursion doesn’t count - it is implemented as iteration, and factorial is trivial to do without recursion, it just doesn’t help you make a good case. The 10GB
906.
▲
by
dahart
2y ago
Straws aren’t the big problem, single-use bottles are.
907.
▲
by
dahart
2y ago
Nobody’s saying eliminate plastic completely, you don’t need to defend medical uses. Healthcare is maybe ~3% of plastic use (based on very quick googling). I’m sure healthcare plastic use can be reduced, but let’s first go after the 50% of
908.
▲
by
dahart
2y ago
I went deep sea fishing in Mexico a few years back, and the number of water bottles floating out in the ocean was very alarming. That’s not fishing industry waste, it’s definitely consumer plastics, and it was the only visible waste.
909.
▲
by
dahart
2y ago
> recycling plastics is not cost effective This is a specious claim with an unjustified goal. Municipal waste management is not expected to be “cost effective”. We don’t need to recycle because it’s profitable, we need to recycle to redu
910.
▲
by
dahart
2y ago
If a function calls itself exactly once, it’s a trivial recursion. Same is true if it calls itself exactly four times. If the entire problem can be reasonably inlined or “unrolled”, it’s trivial. Having to use fixed bounds and a small amoun
911.
▲
by
dahart
2y ago
Correct NASA’s first rule isn’t absolute, it says “avoid”, but they do have a hard rule that loop (recursion) bounds must have fixed bounds, which still rules out most non-trivial recursion. > How so? Stack + function call recursion is a
912.
▲
by
dahart
2y ago
Yep. I don’t use NASA’s rules though, it was just an example. Like most of graphics research, flood fill is an algorithm you won’t ever see in a safety critical environment like the space shuttle. And for better or worse, heap allocation is
913.
▲
by
dahart
2y ago
Recursion is great for CS education, but recursion should be rarely/never used in production code. Tail call recursion is one exception to that - I see it in production code occasionally. But tail call recursion is limited to cases of
914.
▲
by
dahart
2y ago
For some reason, I was pleasantly surprised it wasn’t 50%, but you’re right this is mainly a fine for Apple and a nice payday for the legal team. Someone has to do the work and I’m sure it’s a lot of work, but I’m also sure they’re highly
915.
▲
by
dahart
2y ago
That comment makes untrue claims and cites no sources. The claim about multi-million dollar jackpot winners is a viral meme that keeps making the rounds despite the people with the actual stats repeatedly trying to debunk it. It is not true
916.
▲
by
dahart
2y ago
> Check out what happens to lottery winners I have looked into this and found out that lottery winners are fine, that the viral meme about two thirds of them going bankrupt is not true. https://www.nefe.org/news/2018
917.
▲
by
dahart
2y ago
Ah very nice, I was close with using max error - 0.05051 is the same number I got. Pretty sure 0x7ef311c2 came up for me at least a few times as I was fiddling with parameters. Is this using minimum good bits as the deciding criteria, or is
918.
▲
by
dahart
2y ago
Not sure I understand your number 0x7eb504f3 - does it require using the 1.385 factor? Is it possible there is a typo in the number? That value doesn’t make sense to me. I’m measuring error here as the absolute value of relative error, e.g.
919.
▲
by
dahart
2y ago
EDIT: after double-checking my work, I realized I have a better bound on maximum error, but not a better average error. So, the magic number depends on the goal or metric, but mean relative error seems reasonable. Leaving my original commen
920.
▲
by
dahart
2y ago
Wild! Would that actually work in the long run? It could cause you a lot of trouble, I’m sure, but it seems like if you have any legal documentation, a lawyer would easily fix it. And it seems like it’s probably illegal to try to remove som
921.
▲
by
dahart
2y ago
Yes of course there’s a more graceful approach. You can use an actual divide instruction or routine instead of the bit-casting subtraction trick. It’s not about interfaces. The point is that a single subtract is simpler math, and (probably)
922.
▲
by
dahart
2y ago
LLMs are already good at summarizing the claims - patents all explain why they’re novel - so it would be a waste to ask them, especially if you reserve half the LLMs in your set for this question. Asking why a patent is not novel is a great
923.
▲
by
dahart
2y ago
It’s been more than a decade since I worked in games, but for my entire games career, any and all use of C++ exceptions was strictly disallowed due to other horror stories. I was still bit in a very similar way by someone’s C++ copy constru
924.
▲
by
dahart
2y ago
And it’s always reliably optimized out in release builds, I assume?
925.
▲
by
dahart
2y ago
This code is technically UB in C++, right? [1] Has anyone run into a case where it actually didn’t work? Just curious. I’ve often assumed that if C++ compilers didn’t compile this code, all hell would break loose. It might be nice to start
926.
▲
by
dahart
2y ago
Depends on what you mean by ‘cheaper’. Multiplies are still more gates. The adds are slower due to longer dependency chains, not because they cost more gates.
927.
▲
by
dahart
2y ago
Very telling that you didn’t address a single one of my questions… Pls see Chesterton’s Fence. If you think borders serve no good purpose and that nobody is happy about them, it’s because you’re ignorant about borders and haven’t bothered t
928.
▲
by
dahart
2y ago
Hehehe. Smh. It’s also what is said to people who think the earth is flat. Some people just have beliefs that are ignorant of the things they can’t see. It seems like you just did compare borders to slavery, to complement your bogus compari
929.
▲
by
dahart
2y ago
You are on a soapbox challenging the status quo of every country on earth and I’m not, so you automatically have the higher burden of argument. I’m not defending the status quo, I only jumped in to help people who were making obviously inco
930.
▲
by
dahart
2y ago
Hehe, maybe review some of the huge swath of border checkpoint refusal videos on YouTube before making such an assumption. Some people get away with it, and some do not. Refusing to show ID might be justification for detainment or arrest. A
More ›