Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
planede
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
53 ms
·
631.
▲
by
planede
4y ago
Interesting. It looks like it just doesn't allow narrowing types of class members and globals, sidestepping this whole issue. I like the Dart approach here. Users of the language can always bind a local variable to the thing you want a
632.
▲
by
planede
4y ago
> The type system could just "look" for those mutations That's a very big "just". Typescript and mypy don't look through function call boundaries, doing so would open a lot of problems, I believe. > or th
633.
▲
by
planede
4y ago
> If you pass a comparator function which just compares two integers the obvious way, it gets much slower. So one of std::sort's biggest advantages is actually not that it uses templates, but that it's specialized for the commo
634.
▲
by
planede
4y ago
And a typescript limitation? https://www.typescriptlang.org/play?#code/MYGwhgzhAEDC0G8BQ1...
635.
▲
by
planede
4y ago
> When people stand or sit on gas lift chairs, they can generate an EMI spike which is picked up on the video cables, causing a loss of sync. What is the mechanism here?
636.
▲
by
planede
4y ago
> The only thing that can be done is to change it. You can also dampen the resonance, to limit its response at the resonance frequency.
637.
▲
by
planede
4y ago
I recently set up autossh + tmux for this. I don't use mosh, because I use X forwarding to share the clipboard with my remote session, and mosh does not support X forwarding.
638.
▲
by
planede
4y ago
This is the first time I saw "keyword arguments" in fopen's mode argument. I'm not a fan. https://www.ibm.com/docs/en/zos/2.4.0?topic=functions-fopen-...
639.
▲
by
planede
4y ago
Reminds me of this old video of a pneumatic contraption as an "alarm clock" https://www.youtube.com/watch?v=kQ-l5PlDa-k
640.
▲
by
planede
4y ago
> The new approach makes sense to me, Fedora is the upstream to RHEL, RHEL is the upstream to CentOS. What are you talking about? The outrage was about ditching CentOS 8, and introducing CentOS stream, which is upstream to RHEL.
641.
▲
by
planede
4y ago
> Even very popular and reputedly performant data structure implementations like absl::flat_hash_map are pretty easy to beat for specific use cases. In this specific case, it's easy to beat because it incurs a cost of at least 2 cac
642.
▲
by
planede
4y ago
inlining only goes so far. You won't get full of qsort to be inlined, and if it's not inlined, it needs to be at least cloned to be on par with std::sort, so the comparator function could get const-propagated. AFAIK out of the maj
643.
▲
by
planede
4y ago
Interestingly C++ makes this UB. > Otherwise, flowing off the end of a function other than main or a coroutine ([dcl.fct.def.coroutine]) results in undefined behavior. https://timsong-cpp.github.io/cppwp/n4868/s
644.
▲
by
planede
4y ago
You can corrupt the stack without VLAs just fine. What else?
645.
▲
by
planede
4y ago
C++ doesn't allow accessing other function arguments in a default argument, is in some sense the VLA trick is more powerful.
646.
▲
by
planede
4y ago
What's wrong with VLAs is their syntax. It really shouldn't use the same syntax as regular C arrays, otherwise they would be fine, maybe with a scary enough keyword. They are more generic than alloca too, alloca being scoped to th
647.
▲
by
planede
4y ago
I wonder if these models performed better if they were trained on an other language.
648.
▲
by
planede
4y ago
The difference between Bayesian and frequentist statistics is that they answer different questions. People are often more interested in the questions that Bayesian statistics answer, and so they often misinterpret frequentist results to als
649.
▲
by
planede
4y ago
So this is mostly about __subclasshook__. How does this interact with mypy type checking? There must be some tension there too. edit: I guess I found my answer [1]. That's kind of expected, but it's still ugly. https://
650.
▲
by
planede
4y ago
Some games allow adding motion blur, but it still doesn't get close to the experience of a higher frame rate. I think the problem is actually the opposite. In real life if you follow a moving object with your eyes then you expect its i
651.
▲
by
planede
4y ago
My naive understanding is that some of it is because if you follow an object on the screen with your eyes, it gets motion blurred on your retina as it stays still for ~1/30 s on the screen while your eyeball moves. It is possible to im
652.
▲
by
planede
4y ago
Tracks could be handled by having an official reading when entering and leaving the track, then make the difference deductible from your "miles tax". Similar stuff for entering and leaving the country. Not sure how I would approac
653.
▲
by
planede
4y ago
> To track per-mile-tax you’re going to have either government gps tracking in real-time or cameras tracking your ever my movement. Alternatively, the government will track and then likely limit power consumption for your cars. Maybe I&#
654.
▲
by
planede
4y ago
Uh, couldn't disagree more. I just discourage the use of pull itself, but having it and defaulting to rebase is quite invasive.
655.
▲
by
planede
4y ago
Right, but make sure that all externalities are properly payed by fuel/road/vehicle taxes, so individual incentives are not distorted by not having to pay those.
656.
▲
by
planede
4y ago
I think a lot of people trivialize XML parsing here. Given how many dedicated libraries screwed up JSON parsing, which should be much easier, I have very little faith in people getting XML parsing right in-house.
657.
▲
by
planede
4y ago
> pulling in a third party library wasn't a viable option How? I would violently object for implementing an in-house XML parser as opposed to just finding a way to include libxml2. It's under the MIT license, so I doubt that wa
658.
▲
by
planede
4y ago
What do you use to evaluate XSLT to perceive it as "super performant"? I had the misfortune to deal with XSLT and I failed to perceive it as fast. In fact we had a lot of performance issues with XSLT processing. I wouldn't de
659.
▲
by
planede
4y ago
While that's true, the PDEP/PEXT numbers are a bit on the extreme side on AMD early generations. On Zen1 and Zen2 these instructions have latency and rthroughput of 18 and 19 clock cycles respectively. On Zen3 it's a perfec
660.
▲
by
planede
4y ago
Just be aware that even though these instructions are supported on pre-zen3 AMD, they are pretty much emulated and not very fast. Otherwise I agree that these are awesome, I know a fast Hilbert-curve implementation using those.
More ›