HNHacker News
TopNewBestAskShowJobs

becurious

148 karma · joined October 16, 2020

submissionscomments
becurious··on Filtering a vector with SIMD instructions (AVX-2 and AVX-512)
Why do the 255-bitmask? You’re going to look it up in a table anyway. I’m pretty sure I’ve implemented the compact operation before in AVX-256 and not needed a massive table and I don’t think you need a gather either but that was at a previous job. You can do a lot with the PEXT / PDEP in combination with multiplies to make masks.
becurious··on What they don't teach you about sockets
You also have to remember that the WinSock API had to be implemented on cooperatively multitasked Windows 3.x. So some of the weirdness is due to that - async socket IO had to work in that environment.

There’s some story I heard at Build or another conference about them implementing sockets on Windows NT. I think maybe it was Larry Osterman who had to implement them. His boss told him to do it without another ***ing driver and tried but couldn’t do it. So the driver implementing sockets was AFD.SYS

I think that’s well behaved with respect to WriteFile, ReadFile etc. One thing they did get right is using sockets with IO completion ports. That was a great design.

becurious··on How fast can a 6502 transfer memory?
You could change the stack pointer to the top of the area of memory you wanted to fill and then use PUSH to fill at I think 11 clock cycles per two bytes. It was faster than unrolled LDI or LD (HL),A followed by INC HL. It would be filling memory in the wrong direction for a Rainbow processor but you could use it for repeating patterns. I think I did a checkerboard pattern that would shift every frame and it was pretty smooth.
becurious··on Implementing a Transputer system using RasPi Pico and RAM expansion
Worked with a transputer based embedded system for a life sciences instrument. Checking if code was running was fun. You’d send the messages for poke and peek and check if the poke worked. If it did the program wasn’t loaded so you would send it over the transputer network. If it was the program would return a different value for peek.

Later when PCs with an ISA bus became less common we developed a USB interface to the device. Still needed to source the C011 transceiver chips but we got those free issue from the instrument manufacturer.

becurious··on Stabilization of gamma sulfur enables 4000 cycle Li-S batteries [pdf]
Ammonia is currently produced from methane.
becurious··on ZX Spectrum at 40: a look back
That and ED B0 are burned in my mind forever.
becurious··on AirPods don't “just work”
My original AirPods started to not charge reliably. It was corrosion from the sweat from running. I now have a pair of AirPods Pro which are supposed to be sweat resistant but I’m skeptical. If I do a long run in the summer there’s a lot of sweat.
becurious··on Ask HN: How were video games from the 90s so efficient?
No XML Parsers. Limited i18n / l10n support in the OS. File formats that were serialized structs. Limited art (I remember looking at the time zone map in the resources of some Win 9X DLL and it was a palettized bitmap. The palette index for the selected time zone would be set to the highlight colors and the others to the unselected color). Less diversity in hardware meant simpler and fewer drivers, or just writing directly to video memory. Caring about the working set of programs because on a cooperatively multitasked system like Windows 3.1 with 4MB of RAM if you’re lucky it counts.
becurious··on The FDA wants you to be able to buy a hearing aid without a prescription
I stopped wearing my Oticon Opn S hearing aid when running because they don’t seem happy with sweat on a long run. That and wind noise can still be an issue. Also only having hearing loss in one ear means that they’re not really good for streaming audio but I do love being able to take phone calls with my hearing aid.

I’m ok with the cost since it’s effectively half for me and really $3K six or seven years would be fine considering the quality of life improvement. Being in large group meetings with multiple teams discussing project planning could be painful for me. And it helps with your relationship. When there’s a background noise source like road noise or AC or a running faucet your brain will fill in based on the frequencies it can hear and you will hear completely different words.

becurious··on Word-Aligned Bloom Filters
If you had many lookups to do, then an approach with a coroutine that issues a prefetch instruction then yields to other lookups while the data is fetched in memory might be effective.

Similar to this: http://www.vldb.org/pvldb/vol11/p1702-jonathan.pdf

becurious··on Sir Clive Sinclair has died
Wanting to do my own 3D graphics after playing Elite was a strong motivator. I figured out all the rotation maths just by drawing triangles on paper and figuring out what the angles were and therefore the formulas. You might be able to find fragments of graphics math in library books and then photocopy it - I remember reading about hidden surface removal by calculating the normals to the faces and their direction to the viewer. I know I had a rotating cube written in BASIC at some point. I don’t remember learning the cross product in school until A levels though!

My dad took the day off work to take me to the PC show at Earls Court in I think 1988. I spent my hard earned paper round money on the assembler and it massively improved my productivity.

I figured out how to do multiplies and divides on the Z80 while doing my paper round. In retrospect it was just long division but it wasn’t obvious to me at the time!

There were lots of other little math tricks that having a slow processor taught you. If you tried to draw circles by calculating sine and cosine it was too slow. Instead you rotated each point by a fixed angle and then used reflections to use that to plot eight points at a time.

All this stuff is still super useful. I drop down to look at the disassembly of x64 code all the time. Large code bases don’t scare me. You have source code! I had to disassemble games and ROMs to figure out how they worked - printing out fragments and then annotating them. The disassembler took 5KB of space so you’d have to load it in at different addresses to get at all the code.

becurious··on Sir Clive Sinclair has died
There were many 3rd party add-on keyboards for the 16K/48K Spectrum. I got the Saga 1 Emperor keyboard the Christmas after I got my 48K. You opened the case of the Spectrum, removed the ribbon connectors from the board and then attached the new keyboard and screwed the bottom plus board to it.

There was some magical feeling back then that I think is hard to capture now. The manuals were really good for teaching you - I learned sine and cosine from the diagrams in the manual years before we covered them in maths. The memory layout and system variables were documented, as were all the Z80 opcodes. The first time I used LDIR to transfer data to screen from off screen memory was magical.

You really could master the whole machine and I feel that the limitations actually helped. I would spend summers writing large assembly language programs. Before I had an assembler (HiSoft DevPac) I would hand assemble programs by writing them out on paper and then figuring out the opcodes and calculate the jump relative offsets.

becurious··on Tinnitus Treatment from Neuromod
No, there is CE marking for medical devices in the EU which means it has achieved conformity for the Medical Devices directive. Generally equivalent to FDA regulation.
← PreviousPage 3 of 3