HNHacker News
TopNewBestAskShowJobs

banachtarski

2,796 karma · joined July 16, 2012

programming for ~20 years and counting. math background. generalist with some emphasis on machine learning, graphics, physics simulation, compilers, and server technology. I dabble in electronics and FPGAs.
submissionscomments
banachtarski··on Asm-dom, a minimal WebAssembly virtual DOM to build C++ SPA
I called you out specifically because you cited "billions of DOM operations per second." Since I work at or near the assembly level often, I found this a bit hard to believe. The query you just sent would also be cached for the same reason. You haven't mutated any state! But at least now I know the initial claim as it stands is complete bogus as suspected and I can move on with my day.
banachtarski··on NPM Is Joining GitHub
I installed Windows Subsystem for Linux 2 on an older machine just now. The MSFT of today is definitely a far cry from the MSFT of yesteryear. Such a thing would have been unheard of 15 years ago.
banachtarski··on Asm-dom, a minimal WebAssembly virtual DOM to build C++ SPA
So that's your DOM operation... You literally are just accessing the same memory over and over again and because of the super-pipelined nature of CPUs, the fetch itself ends up being pipelined.
banachtarski··on Asm-dom, a minimal WebAssembly virtual DOM to build C++ SPA
> DOM operations, in JavaScript, on Firefox already occur at near assembly speed at billions of operations per second

Call me skeptical

banachtarski··on Google's ambitious push into gaming is floundering
Let’s not kid ourselves. Stadia aside, Improbable is obviously a vaporware company woefully out of their league with an absurd valuation from equally uninformed investors from softbank’s utter failure of a fund.
banachtarski··on GDC 2020 has been postponed
ITT: you

You do realize that a crowded convention with a lot of talks, parties, and meetings is a different thing altogether right? Also, that every action to curb reasons to travel helps and is appreciated?

banachtarski··on A hybrid thread / fiber task scheduler written in C++ 11
C++11 is so 2011...
banachtarski··on Siggraph2019 Geometric Algebra (2019) [video]
Highly recommended. Absolutely eye opening talk and set of resources.
banachtarski··on Let's remove quaternions from every 3D engine (2018)
There are a number of problems with your assessment in modern day engine design I think.

First, because of IK, we cannot control orientations exactly. Newer techniques like motion matching/IK can generate new orientations on-the-fly, depending on what a character is doing and the character's environment. Gimbal lock matters for camera movement as well. Looking up with Euler angles is a great way to induce a seizure if not done correctly.

Second, the "wild rotations" you mention has a very simple solution employed by every engine I've worked with. Basically, you just constrain the real part to be positive which fixes your interpolation on one half of the Lie-manifold which ensures the arc taken is as short as possible.

banachtarski··on Projective Geometric Algebra Done Right
I disagree with the author's post and will be writing a response
banachtarski··on Understanding Bash (2018)
The article is wrong though. For error codes, 0 being a success value is the CONVENTION. A non-zero code is an error. This isn't about "programming languages."
banachtarski··on Mozilla lays off 70
Honestly calling BS.

Just writing a javascript runtime alone isn't just a "handful of engineers." WebGL stack? WebRTC? Layout engine/compositor? Notifications? You're kidding me, there is no small team in the world that could ship a browser stack end to end.

banachtarski··on iOS 13 app tracking alert has dramatically cut location data flow to ad industry
Yes but in practice, users never do, and when they do a reset, fingerprinting employed by most (all?) ad exchanges can make the association without issue.
banachtarski··on Coding Interview Problems with Detailed Solutions, Test Cases, Program Analysis
It feels really easy? Or am I misunderstanding the algorithm/question?
banachtarski··on Coding Interview Problems with Detailed Solutions, Test Cases, Program Analysis
Everyone always says this, but the fact remains that it is a filter in the sense that not everyone can learn it, or retain it. People always complain that the techniques requested in an interview are not required for the job. I see it in a different sense. The jobs they ultimately qualify for do not require such skills.
banachtarski··on Reasons to Learn Redux as a JavaScript Developer
I subscribe to a different philosophy. The whole point of an abstraction is to encourage good behavior. This is how abstractions are able to be leveraged across large teams and organizations to good effect. Abstractions that do the opposite are, in fact, to blame.

"Good interfaces are easy to use properly, and hard to use improperly" should be the bread-and-butter mantra of any library author, and Redux violates this repeatedly.

banachtarski··on Reasons to Learn Redux as a JavaScript Developer
2.4 kB minified isn't "tiny" but sure, blame the user.
banachtarski··on Reasons to Learn Redux as a JavaScript Developer
> it’s just a thing that lets you read and update a plain javascript object that different parts of your app can access

Doesn't require a library, let alone an ecosystem of libraries.

banachtarski··on Reasons to Learn Redux as a JavaScript Developer
Right see, this is what all redux proponents advocate. Every redux project I see is chock-ful of "extras" to make redux workable, and this changes from season to season. If this isn't an architectural smell, I don't know what is.
banachtarski··on Reasons to Learn Redux as a JavaScript Developer
Anecdotally, Redux was absolutely awful to work with. Want a project chockful of middleware to make it passably usable? Use Redux. With all due respect to the Redux team, I simply don't think Redux scales in large applications. The "defaults" are insanely unproductive and encourage developers to cram tons of state in some global pile of state-soup just to claw back conveniences they lost. Monadic transformers and pure state transitions - great ideas in principle, carried way too far here in an ecosystem where the rest of the language and libraries rely on and use mutable state. Not to mention the lost performance, bloat for code that would be considerably shorter, and more disadvantages.

No thanks Redux, no thanks :/

banachtarski··on Measuring mutexes, spinlocks and how bad the Linux scheduler is
You're getting some incomplete answers to your question. Both a mutex and a spinlock is used to guarantee that a set of instructions are only invoked by a single thread of computation at once (with some variation; some mutex types permit multiple readers for example).

The difference is actually in the implementation of the mutual exclusion. A mutex is generally a system call which often starts as a spin lock before the system call is invoked (which is an assembly routine that changes the process privilege level and cedes control to the host operating system). A spinlock literally "spins" in a loop until an atomic flag or semaphore indicates that it can enter the protected region. When it does, it atomically sets the flag so that it has exclusive access. Because a spinlock does not interact directly with the OS scheduler, it needs a pause instruction or yield syscall at some point in its loop (or every few interations). Failure to do so introduces pathological scheduling problems as outlined in the article.

Spinlocks are sometimes used because it is believed that the odds of a collision are very low, and the cost of a syscall is perceived as being high to the developer. However, it's something that should only be used if you know what you're doing, and its behavior is subject to not only the OS, but also the hardware you run on.

banachtarski··on Measuring mutexes, spinlocks and how bad the Linux scheduler is
> Why isn't the conclusion to just ...

Sigh. From the article itself:

> I hope to have convinced you to avoid spinlocks, even for very short sections. Spinlocks are only a benefit if you really really care about the fast path and are certain that the lock will essentially always be free to take. On my computer the fast path on a spinlock is roughly 7ns and on a mutex it’s roughly 14ns, so both of those numbers are very fast. But when spinlocks go bad, the scheduler can be really confused, at least on Linux.

banachtarski··on Measuring mutexes, spinlocks and how bad the Linux scheduler is
You don't even need to read in between the lines. He literally states that in his conclusion...
banachtarski··on Too Much Crypto [pdf]
This is great though. The speedups advertised for using the recommended number of rounds is important (2x or more in some cases). While you don't want to be the guy "who picked it wrong," picking some arbitrarily high number isn't right either, and going about it scientifically as in the paper is the right way to go.
banachtarski··on 7GUIs: A GUI Programming Benchmark (2018)
I think the tests as given are rather incomplete. The tests cover data flow and input to varying degrees of complexity but completely avoid the easy or difficulty of producing the layout in question (responsiveness, resizing, alignment, etc) in addition to performance when the layout needs to be computed or updated. Coming up with a minimal API that covers the needs of a modern UI is extremely difficult, and when you add more advanced controls (beziers, transitions/animations, etc) things get even dicier.
banachtarski··on Implementing WebGPU in Gecko
As someone who has written in every shader dialect and also dealt with bytecode for all the major consoles, I think SPIR-V is really awesome tbh...

The thing is, a text format is the worst format for interoperability between consoles, desktop and web. Having something like SPIR-V is more akin to LLVM for programming languages. LLVM doesn't preclude the existence of C, C++, etc, but it strictly benefits the ecosystem (which now includes Rust, Haskell, etc). In the same way, I see SPIR-V having the same potential as the interchange format for all the major IHVs.

banachtarski··on Implementing WebGPU in Gecko
No absolutely not (although compute shaders will be a thing).

WebGL1 : DirectX9 :: WebGPU : DirectX12

Or

WebGL1 : OpenGLES1 :: WebGPU : Vulkan

banachtarski··on Can Programming Be Liberated from the von Neumann Style? (1977) [pdf]
Sorry but this goes in the bucket of all-to-common backseat programming comments I find all too often on HN. Sounds pretty, has a lot of "ideas" but is absolute hogwash.

If you've programmed an FPGA, or done any sort of analog circuitry, you'll know that what you propose is FAR WORSE than the current status quo.

banachtarski··on IBM Stops Server Side Swift Framework Development
My point is that React on web is already faster than React Native today (and it feels perfectly natural, in fact, better). The entire point of going to React Native in the first place was ostensibly for responsiveness/performance, and given that it gives neither, I don't see what purpose React developers have to switch (except that it gives the illusion of "speed").
banachtarski··on IBM Stops Server Side Swift Framework Development
Frankly, it's awful. Measuring performance apples to apples, React Native is nearly strictly slower than a web application on mobile. As PWAs gain feature parity, I think there will be little to no point to React Native. Because of a lack of JIT capabilities, React Native JS just can't run nearly as fast as React on the web for example. That, coupled with bad architecture. Too much is deferred - you have deferred batching in react, followed by more deferred batching to create native layouts. This results in poor responsiveness. For toy applications you may not notice, but the architecture simply doesn't scale.
← PreviousPage 7 of 34Next →