HNHacker News
TopNewBestAskShowJobs

spieglt

249 karma · joined July 31, 2017

https://github.com/spieglt

theron@spiegl.dev

submissionscomments
spieglt··on New fuzzing tool finds USB bugs in Linux, Windows, macOS, and FreeBSD
But overall the two situations aren't nearly equivalent. Writing C, you're constantly at risk of making these mistakes. Writing Rust, you can keep the vast majority of your code safe and more closely examine the smaller unsafe area for memory errors. (In driver development, you may have to use more "unsafe" than for application development, but this doesn't negate the benefits. Also the compiler output is much more helpful.)
spieglt··on Ask HN: What's your quarantine side project?
I am working on a Linux program that will show you the files opened/read/written by another process (and its child processes/threads). I wanted to be able to run an installer and see exactly what files it creates. Or when LibreOffice magically loads a font that seems to not be on my system, I want to know where it got it from. Basically a stripped-down version of strace that only tracks certain syscalls and aims to be more user-friendly.
spieglt··on Nestur: NES Emulator in Rust
Thanks! Mapper 1 is since done as well as battery-backed RAM support, and I'll be implementing mappers 2-4 in the next couple days. I just read your blog post and the audio section caught my eye: I went through the exact same struggles with trying to queue 44,100Hz to SDL, including trying to implement dynamic sampling, but it was never quite right and I got quite frustrated with it. So eventually I took another pass at using the callback method instead, which I thought wasn't possible as you can't exfiltrate a reference to the struct that you give the audio device, but I got it to work this time with an Arc<Mutex<Vec<u8>>> and it's wayyy better.

The APU sends all of its samples to a staging buffer, then between video frames, the Mutex for the SDL buffer is locked and the staging buffer is emptied into it. The SDL callback also locks the Mutex 60 times per second, takes evenly spaced samples from the raw data, and truncates what it consumed if it had more than it needed. Now the audio keeps perfect pace with the emulator, whether it slows to 58 FPS or goes too fast, and there's no popping and clicking. If you're curious, here are the relevant spots in the code now:

https://github.com/spieglt/nestur/blob/master/src/audio.rs https://github.com/spieglt/nestur/blob/e49921541d493b3616352...

I just beat the first Zelda dungeon last night, saving the file afterwards, and it was indeed really satisfying.

spieglt··on Nestur: NES Emulator in Rust
Hi Steve, thanks for all you do for Rust!
spieglt··on Nestur: NES Emulator in Rust
> I'll bet you a nickel something screwy is going on with the JMP Indirect logic.

You've lost a nickel! It was a problem with my signed-offset branch function where a bad cast was allowing 0x80 (-128) to overflow. It was really fun trying to troubleshoot by hooking certain memory accesses and subroutines, but what wound up fixing it was investigating the crash of Blargg's `instr_test-v5/rom_singles/11-stack.nes`. Thank you for your help!

spieglt··on Nestur: NES Emulator in Rust
Yeah, I'm going to fix that. I thought I'd tried `u8 as i8` and it hadn't worked, but I guess not.
spieglt··on Nestur: NES Emulator in Rust
Actually a nod to https://adventuretime.fandom.com/wiki/Neptr
spieglt··on Local-first software: you own your data, in spite of the cloud
If you want an easy way to make a file (or .zip of files) more private before storing it in the cloud for backup/availability purposes, please check out Cloaker: github.com/spieglt/cloaker. It's simple, password-based, drag-and-drop file encryption.
spieglt··on Nine-year-old child to graduate university
Just read this today: https://medium.com/cantors-paradise/the-unparalleled-genius-...
spieglt··on Auto-Antonyms
"Cheap" is another one that bothered me as a kid. It means both "of low quality considering its price" and "of low price considering its quality."
spieglt··on Anxious tech workers are going to therapy
For when you need to get your photos off of FB: https://github.com/spieglt/fb-photos. Hopefully makes it easier to get "Photos of me" which they don't include in your data export.
spieglt··on Thoughts on Rust bloat
It's also good for crypto, image processing, logging, file compression, and other commonly useful things. Go does have an emphasis on network services but is not limited to that.

"a stdlib accommodating all of its usecases would be as comically huge as Python's, with all the problems that come from that."

That's a straw man. I don't want a stdlib like Python's, I want one like Go's.

spieglt··on Thoughts on Rust bloat
If Rust had a standard library like Go's I'd love it even more.
spieglt··on Man as a Rationalist Animal (2017)
Yep, that's actually the last three lines I quoted from chapter 17 in a different translation.
spieglt··on Man as a Rationalist Animal (2017)
I really like the Daodejing on this topic.

Chapter 17:

The greatest of rulers is but a shadowy presence;

Next is the ruler who is loved and praised;

Next is the one who is feared;

Next is the one who is reviled.

Those lacking in trust are not trusted.

However, [the greatest rulers] are cautious and honor words.

When their task is done and work complete,

Their people all say, "This is just how we are."

Chapter 29:

Those who would gain the world and do something with it, I see that they will fail.

For the world is a spiritual vessel and one cannot put it to use.

Those who use it ruin it.

Those who grab hold of it lose it.

[...]

(Phillip J. Ivanhoe translation)

spieglt··on DeleteFB: Selenium script to delete all of your Facebook wall posts
Heh, your blog post about that was the inspiration for mine, thanks.
spieglt··on DeleteFB: Selenium script to delete all of your Facebook wall posts
I wrote a similar tool in Node a while back that can delete by year and category:

https://github.com/spieglt/fb-delete

And one to download all "Photos of you", which Facebook doesn't include when downloading your data:

https://github.com/spieglt/fb-photos

spieglt··on Python for Reverse Engineering 1: ELF Binaries
Well, I guess alignment doesn't say anything about how large of a block is allocated.... And this is the clearest source I can find, which says 32 bytes. https://prog21.dadgum.com/179.html
spieglt··on Python for Reverse Engineering 1: ELF Binaries
https://www.gnu.org/software/libc/manual/html_node/Aligned-M...

"The address of a block returned by malloc or realloc in GNU systems is always a multiple of eight (or sixteen on 64-bit systems)."

I was about to say, "what if they're on a 32-bit system and so were only allocated one 8-byte block?" but then realized that since they'd requested 9 bytes, they'd be given two 8-byte blocks, or one 16-byte block on a 64-bit system. Is that right?

spieglt··on Firefox Send: Free encrypted file transfer service
This runs the web server on a computer, but allows two-way file transfer from phones: https://github.com/claudiodangelis/qr-filetransfer
spieglt··on Firefox Send: Free encrypted file transfer service
Check out https://github.com/claudiodangelis/qr-filetransfer for computers and phones on the same LAN.

Works great, and I'm planning on integrating that functionality into my project which transfers files between laptops using only wireless cards, no LAN required. https://github.com/spieglt/flyingcarpet

spieglt··on Mark Zuckerberg Promised a Clear History Tool Almost a Year Ago
I made one: github.com/spieglt/fb-delete
spieglt··on South Koreans lock themselves up to escape prison of daily life
Also look into Christian monasteries near you. I'm not Christian but spent a silent weekend at a Cistercian monastery and it was amazing. They suggest a donation but there's no charge. Only have to schedule a month or two in advance.
spieglt··on Ask HN: What is your comfort book?
The Zhuangzi
spieglt··on NirSoft Freeware (2008)
Love this site. Helped me often in my first career as a sysadmin and made me want to write freeware.
spieglt··on Show HN: Transfer files to mobile device by scanning a QR code from the terminal
Great project! I'm working on one that's somewhat related, it's basically cross-platform AirDrop (though only for laptops). Seems like mine could really benefit from a method of getting files to phones like this, and yours could benefit from not needing a wireless network like Flying Carpet. http://github.com/spieglt/flyingcarpet
spieglt··on Turning a side project into an open-source project
Thanks! Any specific subreddit recommendations besides r/golang?
spieglt··on Turning a side project into an open-source project
Please help me! I'm trying but I've gotten next to 0 feedback so far. If you have two laptops will you test it and let me know what your experience was?
spieglt··on Turning a side project into an open-source project
I was just worrying last night that I've released my side project too early, so glad to hear someone encouraging imperfect-but-usable releases. If anyone has advice on finding users, testers, and contributors besides posting on Show HN, please let me know.

https://github.com/spieglt/flyingcarpet

spieglt··on Show HN: Flying Carpet – encrypted file transfer via ad-hoc WiFi, no AP required
If you've ever been frustrated that you couldn't move a file over 2GB from Windows to Mac with a flash drive, or couldn't set up a file share because you didn't have WiFi, or find it stupid that we push files up to Dropbox or Drive just to move them 5 feet between laptops, this program is for you. It is encrypted file transfer that goes straight from wireless chip to wireless chip, over ad-hoc WiFi (or Wi-Fi Direct when necessary). Written mostly in Go.

I posted this a few months ago when it was just a command line tool, but it now has a GUI and is much more stable. Linux support still forthcoming. Please give it a try and let me know what you think. Thanks!

← PreviousPage 2 of 3Next →