HNHacker News
TopNewBestAskShowJobs

a1k0n

1,974 karma · joined March 9, 2007

the obfuscated C donut guy.

https://www.a1k0n.net/

submissionscomments
a1k0n··on Matrix Calculus
Would be nice if there was a "symmetric matrix" variable type, so it could simplify Ax + A'x to 2Ax if A is symmetric.
a1k0n··on Spotify’s Discover Weekly: How machine learning finds new music
I also wanted to nitpick this part of the article -- the neural network isn't determining the audio features; these are all hand-engineered features developed by The Echo Nest.

The neural network is trained to mimic collaborative filtering vectors from raw audio. It's a separate model from time signature, key, mode, tempo, loudness, etc.

a1k0n··on Examining a vintage RAM chip, I find a counterfeit with a different die inside
Don't forget the red box, which you could make by replacing the 3.579545 MHz crystal powering the chip that the OP reverse engineered with a 6.5536MHz one, and then the top row and bottom column tones become 1700 / 2200Hz to simulate the pay phone nickel / dime / quarter tones.
a1k0n··on Show HN: Sleeping Beauty, a 7-day roguelike game
standard rogue/nethack movement keys work: y/u/n/b go diagonally.
a1k0n··on The web sucks if you have a slow connection
If they wanted to use a geosynchronous satellite from the ISS, it would be occluded by the earth half of the time and the other half of the time they'd have to track it with a satellite dish over the course of the 45 minutes (out of every 1.5 hours) they have access to it.

of course the same is true of ground stations... I'm not actually sure how they do it but they probably don't need as high-gain of an antenna to reach them.

a1k0n··on CPU emulator in web browser (Arm/Mips/X86/Sparc)
The x86 example is particularly cute:

    xadd  eax, edx
    loop  -3
implements the Fibonacci series in two machine instructions (notice eax and edx have 514229, 832040 in them after you run the example, the 29th and 30th Fibonacci numbers). I first saw that in a book a friend got me for christmas; a hard copy of this site: https://www.xorpd.net/pages/xchg_rax/snip_00.html
a1k0n··on 303 if you please (2009)
Well, in your case you're using the webkit exponentialRampToValueAtTime or whatever it's called, so you could just recompute the envelope (it's an exponential sweep... actually it's sort of double-exponential, which is another thing I need to fix in mine) and issue new filter sweeps every time the knobs move, right? you could set it based on when the envelope was triggered in the past and it should work fine.

edit: nevermind, I thought you could specify a startTime in addition to endTime but you can't. so you'd have to use audioContext.currentTime to figure out where the sweep should be now, ramp to there, and exponential sweep down to the final value at the end time.

a1k0n··on 303 if you please (2009)
oh right, you wrote the other 303 web app! I was kinda mad because you stole my thunder while I was working on this one. :)
a1k0n··on 303 if you please (2009)
Some day, perhaps, but the code is MIT license and anyone is welcome to collaborate. (FWIW, @pcgregory turned my fasttracker 2 player into a full fledged tracker: https://wetracker.herokuapp.com/) I'm busy with other projects now; this is something I keep coming back to once in a while, and if I do it'll be to improve the fidelity before I make a pretty frontend...

It still needs accent emulation which is a bit of work, high pass output filter (it's bassier than a real 303 because there's some capacitors between the filter output and the amplifier I'm not emulating), the knob ranges / nonlinearities aren't quite right...

edit: And it also needs the square wave, which is super weird on the 303, as you're aware (yours has a sample for it I think)

a1k0n··on 303 if you please (2009)
Sounds like this: https://www.a1k0n.net/code/webkitsynth/

Basically, not at all like a 303 except in spirit

a1k0n··on 303 if you please (2009)
Huh. I wrote this code back in 2000 or so. Didnt realize someone had ripped it.

https://github.com/a1k0n/gsynth/blob/master/modules/tb303/tb...

It doesn't sound very much like a real tb303 whatsoever. I'm working on a JavaScript one based on an x0xb0x I built, but it has a long way to go.

https://www.a1k0n.net/code/x0x/

a1k0n··on Slack client for Commodore 64
Right. I thought it might be 5v tolerant on the RX pin but maybe not.. easy enough to just use a resistor and a diode to the 3.3v supply to level shift there, and the 3.3v TX should be fine for a 5v logic input.
a1k0n··on Slack client for Commodore 64
FWIW you probably don't need a USB serial port, or a RS232 converter at all; you could just pick the TTL serial signals off the commodore port and plug them into the TTL serial port on the Raspberry Pi 23- or 40-pin expansion slot (pins 8, 9, and 10 are TX, ground, and RX.). Remove the tty on /dev/ttyAMA0 from the init config and you can use /dev/ttyAMA0 as your built-in Pi serial port.
a1k0n··on Show HN: TB-303 Synth, Drum Machine and Sequencer in Web Audio
They're also impossible to keep in tune, sound wildly different with small changes in temperature, and have a really terrible signal to noise ratio.
a1k0n··on Show HN: TB-303 Synth, Drum Machine and Sequencer in Web Audio
The resonance appears to decrease with cutoff frequency because of high pass filtering in the feedback loop of the 303 filter... Higher frequencies have more feedback and thus more resonance.

The envmod knob also affects both the max and min cutoff values from the main envelope generator.. that part is tricky - the envmod and cutoff knobs are exponentially tapered, but the filter control circuit also contains an exponentiator so the sweep is sort of doubly exponential but its hard to tell the difference.

a1k0n··on NeuroEvolution – Flappy Bird
Yes. And the optimal policy is trivial given those inputs, as long as the aperture between pipes is larger than the "jump" height of the bird: if bird y + bird y velocity > bottom pipe y, jump. So finding that with a neural network or genetic algorithm is fairly silly.

If the aperture is smaller than the jump height, then you need to do something smart to time your jumps.

a1k0n··on Apple Says Goodbye to the Startup Chime with the New MacBook Pro
Sure enough, this is new with Sierra. El Capitan doesn't support it. Finally! I was tired of Seil/Karabiner/whatever else constantly updating itself and changing its name, just so I could remap caps lock to escape.
a1k0n··on Apple Says Goodbye to the Startup Chime with the New MacBook Pro
Escape isn't an option. Or at least it wasn't before... There's a third party tool called Karabiner which enables this.
a1k0n··on Arduboy – Open Source Card-Sized Gaming Board
It's sort of a shame this is built around an Atmega chip as opposed to an ARM Cortex M0 like in the Teensy. I guess it doesn't need much horsepower for a 128x64 monochrome display, but it wouldn't have been much more expensive to put a much more powerful CPU in it. E.g., if you want to maintain a framebuffer, there goes 40% of your RAM.
a1k0n··on What typing ^D does on Unix (2009)
A super easy way to see this is to type cat, and then type asdf and hit ^D. It immediately echoes back what you typed. Another ^D quits cat, because it gets a 0-byte read that time.
a1k0n··on This JPEG is also a webpage
You're right, there's no stripes on its face. I stand corrected.

Sadly, that was my most upvoted comment in ~9.5 years on this site.

a1k0n··on This JPEG is also a webpage
That's a chipmunk, not a squirrel.
a1k0n··on Bayesian Optimization for Collaborative Filtering with MLlib
So SigOpt was tuning rank (number of latent factors), number of iterations to run the algorithm (in my experience alternating least squares generally converges within 10-20 iterations, but there'd be no downside to running it longer unless it's overfitting), and the regularization strength.

What optimal parameters did it find for these?

a1k0n··on Building fast.com
I tried to use the Range header feature to resume downloads in an autoupdating app once, and it worked beautifully...for about 90% of users; the others had all kinds of weird issues thanks to transparent proxies and caches not handling the Range header correctly. This was years ago, but I'm not surprised they chose to be safer than sorry.
a1k0n··on Spawn your shell like it's the 90s again
Why Korn shell? Is there something special about the way it handles being run w/ a setuid bit?
a1k0n··on Httpoxy – A CGI application vulnerability
From the context it's obvious that 0x0 is right. AX must be 32 bits (or 64 bits) wide.

https://github.com/golang/go/blob/fad2bbdc6a686a20174d2e73cf...

a1k0n··on Happy 20th Birthday, Quake
320x200x256 colors was referred to as MCGA, but nobody actually had an an MCGA card.
a1k0n··on Scanning Live Ethereum Contracts for the “Unchecked-Send” Bug
Having to manually inspect the call stack depth as a best practice seems like a design flaw... why doesn't send() itself throw an exception? And does an exception roll back the entire contract or would it leave it half executed?
a1k0n··on AI produces realistic sounds that fool humans
They do both; there's a parametric synthesis module later on in the video. It doesn't work all that well for water.
a1k0n··on Practical Reverse Engineering Part 4 - Dumping the Flash
Or you could just lift the MOSI/MISO/SCK/CS pins off the board with an iron and tweezers and power it up normally. The pin pitch on this one is relatively big, shouldn't be too hard, definitely easier than removing.
← PreviousPage 2 of 11Next →