torusle | 10 days ago | on: Building a TB-303 from Scratch
torusle's comments
torusle | 1 month ago | on: Can Ozempic Cure Addiction?
torusle | 3 months ago | on: The state of Schleswig-Holstein is consistently relying on open source
They knew: If Linux makes it in Munich, it will likely spread over and they loose tons of contracts with other German states.
torusle | 3 months ago | on: Functional Quadtrees
Aren't Quadtrees covered by almost all basic data-structure books? It is the most simple form of taking the binary tree into the next (2D) dimension.
torusle | 4 months ago | on: Viagrid – PCB template for rapid PCB prototyping with factory-made vias [video]
For those who don't know: Vias are not only used to get an electrical connection from one side of the PCB to another.
You also need them to keep radiation in check and often to move heat away.
With this technique, good luck getting through EMC testing for anything but trivial circuits.
torusle | 1 year ago | on: RoboPianist: Dexterous Piano Playing with Deep Reinforcement Learning (2023)
this is really bad. It might be a breakthrough of what you are doing, but when I listen to the output all of the timing and phrasing is aweful.
torusle | 1 year ago | on: Reciprocal Approximation with 1 Subtraction
That was a thing back in the 90th..
I wonder how hard the performance hit from moving values between integer and float pipeline is nowadays.
Last time I looked into that was the Cortex-A8 (first I-Phone area). Doing that kind of trick costed around 26 cycles (back and forth) due to pipeline stalls back then.
torusle | 1 year ago | on: Show HN: A1 – Faster, Dynamic, More Reliable NFC Transactions
> 2. Mobile consumer hardware is sufficiently fast for the application > operations (eg. Cryptographic operations)
You are right here. It is possible to emulate a card using mobile phones. We've been able to shim/emulate any card for much longer.
The thing is: To connect to the payment system you need a certificate. And you simply don't get it unless you can prove that you have all kinds of security measures applied.
For android and apple, the actual payment stuff runs inside a isolated little micro-controller which has been certified and is temper proof/protected. This little thing is fortified so far that it will destruct itself when you try to open it up. There are alarm meshes, light sensors and much more inside the chip to detect any intrusion just to protect the certificate.
If you don't have that security, the payment providers will deny you their certificate, plain and simple.
You can build your own thing using card emulation via apps, but you will take all the risks.
How it works in practice is the following: These temper proof micro-controllers can run java-card code. You can write an applet for them, get it installed (if you have the key from apple/google - not easy). Then install it and you have a two-way communication: Your applet inside the secure world communicating with the payment world, and your ordinary mobile app showing things on the screen.
torusle | 1 year ago | on: Show HN: A1 – Faster, Dynamic, More Reliable NFC Transactions
1st: The message overhead during communication is not an issue. It is tiny compared to the time it takes for the credit card to do it's crypto thing.
2nd: This won't be adapted ever. There is simply way to much working infrastructure out there build on the APDU protocol. And there are so many companies and stakeholders involved that doing any change will take years. If they start aligning on a change, it would be something that makes a difference, not something that safes time in the order of 5 to 20 milliseconds. per payment.
torusle | 1 year ago | on: A good day to trie-hard: saving compute 1% at a time
Last time I checked, CRC32 worked surprisingly well as a hash.
torusle | 1 year ago | on: Things I learned while writing an x86 emulator (2023)
BSWAP EAX converts from little endian to big endian and vice versa. It was a 32 bit instruction to begin with.
However, we have the 0x66 prefix that switches between 16 and 32 bit mode. If you apply that to BSWAP EAX undefined funky things happen.
On some CPU architectures (Intel vs. AMD) the prefix was just ignored. On others it did something that I call an "inner swap". E.g. in your four bytes that are stored in EAX byte 1 and 2 are swapped.
0x11223344 became 0x11332244.torusle | 1 year ago | on: Own Constant Folder in C/C++
Sure you can mess up your performance by picking bad compiler options, but most of the time you are fine with just default optimizations enabled and let it do it's thing. No need to understand the black magic behind it.
This is only really necessary if you want to squeeze the last bit of performance out of a piece of code. And honestly, how often dies this occur in day to day coding unless you write a video or audio codec?
torusle | 1 year ago | on: How much of a genius-level move was binary space partitioning in Doom? (2019)
And every graphic programmer worth it's salt had a copy of "Computer Graphics - Principles and Practice" on the desk and followed whatever came out of the "Graphics Gems" series.
We knew about BSP, Octrees and all that stuff. It was common knowledge.
torusle | 1 year ago | on: Fast linked lists
A common way to implement these is to have an array of messages, sized for the worst case scenario and use this as the message pool.
You keep the unused messages in a single linked "free-list", and keep the used messages in a double linked queue or fifo structure.
That way you get O(1) allocation, de-allocation, enqueue and dequeue operations for your message queue.
Another example for this paradigm are job queues. You might have several actuators or sensors connected to a single interface and want to talk to them. The high level "business" logic enqueues such jobs and an interrupt driven logic works on these jobs in the background, aka interrupts.
And because you only move some pointers around for each of these operations it is perfectly fine to do so in interrupt handlers.
What you really want to avoid is to move kilobytes of data around. That quickly leads to missing other interrupts in time.
torusle | 1 year ago | on: Fast linked lists
I beg to disagree.
In kernels, drivers, and embedded systems they are very common.
torusle | 1 year ago | on: The Myth of Loss: Bitboys
Around 2006 I had some automotive entertainment system from NEC on my table which had one of the Bitboys GPU chips on it. Wrote some vector graphics API for it.
It wasn't bad honestly. It supported OpenGL/ES 1.0 I only had to contact them twice for driver bugs. They resolved that within a few days.
torusle | 2 years ago | on: Ultra-white ceramic cools buildings with high reflectivity
torusle | 2 years ago | on: The Netwide Assembler (NASM)
torusle | 2 years ago | on: MS-DOS v1.25 and v2.0 is now open-source (2014)
There have been mixed memory models and you could go crazy with near and far to break out of the limits of the easy memory models.
Most of the time it was just a mater of picking a suitable memory model for your code and forget about near/far though. Not so different than today.
torusle | 2 years ago | on: MS-DOS v1.25 and v2.0 is now open-source (2014)
I browsed a little through the code, and found that sort.com used self-modified to change the sorting order:
; note! jae is patched to a jbe if file is to be sorted in reverse!
;
CODE_PATCH LABEL BYTE
JAE INNER_SORT_LOOP
I committed similar crimes in the 90th as well, but that was just me as a teenager programming stupid games in asm for fun and giggles. Not for commercial software.
However!
As soon as you cabled all together their imperfections added up and they started to groove like nothing that has been heard before.