zwegner | 4 years ago | on: Leveraging SIMD: Splitting CSV Files at 3Gb/S
zwegner's comments
zwegner | 4 years ago | on: Leveraging SIMD: Splitting CSV Files at 3Gb/S
> In our tests, going byte to byte for more iterations to keep the alignment when hitting the "else case" performed worse than making the unaligned loads, but as you say "just use CLMUL" (as all loads will be aligned) :D
I was talking about using bitwise operations with the quote/escape/newline masks already computed (like in the blog post I linked), rather than a byte-by-byte loop. But yeah, CLMUL is better anyways :)
zwegner | 4 years ago | on: Leveraging SIMD: Splitting CSV Files at 3Gb/S
Discussion: https://news.ycombinator.com/item?id=29439403
The article mentions in an addendum (and BeeOnRope also pointed it out in the HN thread) a nice CLMUL trick for dealing with quotes originally discovered by Geoff Langdale. That should work here for a nice speedup.
But without the CLMUL trick, I'd guess that the unaligned loads that generally occur after a vector containing both quotes and newlines in this version (the "else" case on lines 34-40) would hamper the performance somewhat, since it would eat up twice as much L1 cache bandwidth. I'd suggest dealing with the masks using bitwise operations in a loop, and letting i stay divisible by 16. Or just use CLMUL :)
zwegner | 4 years ago | on: Chess.com vs. Lichess
I should probably know this, since I "discovered" PEXT bitboards, but I got out of computer chess before I got BMI-capable hardware, and so I never actually implemented them :)
zwegner | 4 years ago | on: Log4Shell Log4j vulnerability (CVE-2021-44228) – cheat-sheet reference guide
Right, I would certainly include that in "user data" though. I was mainly responding to the idea that using two logging libraries is strictly worse than one: when log4j is only used for logging safe data, and another library elsewhere, this is better than using log4j everywhere.
zwegner | 4 years ago | on: Log4Shell Log4j vulnerability (CVE-2021-44228) – cheat-sheet reference guide
zwegner | 4 years ago | on: Zelda 64 has been fully decompiled
zwegner | 4 years ago | on: Acquisition of chess knowledge in AlphaZero
zwegner | 4 years ago | on: The Making of Donkey Kong 64 (2019)
Super Mario 64, OTOH, holds up remarkably well: the controls flow so much faster and easier. It just feels natural to move around, with much less frustration. The camera is the biggest negative there, but that's a tough problem to solve for 3D open-world platformers, so I cut them some slack.
zwegner | 4 years ago | on: Bespoke Synth 1.0 – open-source software modular synthesizer
I didn't touch too much on the specifics in my post, but there are lots of little design oddities I ran into when doing relatively simple tasks. Like creating a multiplexer for messages: the [switch] object has an "empty" channel for input 0 (and regular inputs are 1-indexed), so you'll often need an extra +1 object for the control input. And the inputs of [switch] have no memory, so every time the control changes, you need to send a bang to resend the message in the now-active channel. Or say you want to multiplex signals. That uses the [selector~] object (why not [switch~]?), and has the same +1 issue as [switch]. But what if you want a short crossfade when switching inputs to avoid harsh transients? "Good luck" is all I'll say here.
I'm not generally trying to do anything super-complicated with Max. I have indeed used the C extension API when it makes sense (building a wavetable synth), and it was OK. I still contend that the main visual programming environment is not very good, for programmers and non-programmers alike.
...anyways, all that said, Scheme For Max looks really cool :)
zwegner | 4 years ago | on: Bespoke Synth 1.0 – open-source software modular synthesizer
zwegner | 4 years ago | on: Bespoke Synth 1.0 – open-source software modular synthesizer
The JS support is really weird. It's only JS 1.6 (from 2005), and had weird glitches (like loading two instances of the same device causing the first device to stop working), and I couldn't get the timing tighter than about 30ms. Ideally you could write code that runs at audio rate.
There's also "gen", which is a Max-specific scripting language that is presumably real-time suitable through a JIT. Unfortunately you need a separate Max license to use it, even the full Ableton Live Suite doesn't give you gen support. You can sorta hack around and use it by manually editing the .maxpat files (which are almost JSON), copying from a device that uses gen, but there are lots of weird glitches going this route.
A list of a few annoying things about M4L:
* Documentation is pretty sparse and/or low quality, and weirdly split into two (help and references).
* All variables are global across devices by default, local (device-specific) variables need the prefix "---", which is barely documented
* Tons of annoying UX issues, like entering an invalid value in the inspector just reverts to the old value. You can't enter an empty string for parameter values, that reverts too (you need to enter a literal ""). Certain functionality is only available depending on whether the device is "locked", so you have to lock/unlock the view all the time if you're working with e.g. subpatchers
* Abstraction is quite annoying to do. There's three different types of patches, and it's not really clear what the difference is between them. Creating subpatches and then duplicating them creates two different subpatches--changes in one are not shared with others.
* ...and a ton of other things. I have a big text document of these gripes I was intending to turn into a blog post, but haven't gotten around to it.
Maybe I'm wrong and there's better ways to do some of these things, but overall my experience learning M4L was pretty bad. If it wasn't the only way to do certain advanced things in Ableton, I'd never touch it again.
zwegner | 4 years ago | on: Ask HN: How do I reliably prevent autoplay in Firefox 91?
zwegner | 4 years ago | on: Ask HN: How do I reliably prevent autoplay in Firefox 91?
Incidentally, I browse Twitter while logged in, but the autoplay settings are "per-browser", and Firefox's anti-fingerprinting mode makes Twitter think you're using a new browser on each visit, and thus keeps autoplaying all the time without the above setting. Pretty irritating.
zwegner | 4 years ago | on: Facebook still ‘secretly’ tracks your iPhone
zwegner | 5 years ago | on: From Vim to Emacs in fourteen days (2015)
zwegner | 5 years ago | on: Open source projects should run office hours
zwegner | 5 years ago | on: Open source projects should run office hours
zwegner | 5 years ago | on: Siliconpr0n: High Resolution Chip Maps
There's a ton of gorgeous high resolution die shots of (mostly) modern chips, all in the public domain.
zwegner | 5 years ago | on: Is this Mahler? This sounds like Mahler
And also, thanks for that example. Clearly I don't know CSV well enough--are quotes in fields that don't start with a quote not special?