HNHacker News
TopNewBestAskShowJobs

zxcvgm

784 karma · joined April 3, 2012

occasional thoughts and project write-ups at irq5.io
submissionscomments
zxcvgm··on Why the Gov.uk Design System team changed the input type for numbers (2020)
The article shows an example of a credit card field being a "number". Having made several online purchases, I realized I'm now frustrated by a CC number field that doesn't allow any spaces or dashes, or doesn't format it visually this way for you. They should just allow dashes/spaces then strip it using JS or at the backend.

There is a reason that the number printed on the credit card is grouped into 4 digits, and I believe that it makes human parsing easier. When I submit the form and it says "invalid card number", trying to figure out which digit I mistyped into the form while scanning that long string of digits with my eyes, gazing at the card and back at the screen is just stupid.

zxcvgm··on The 0.5 MB of nothing in all Apple Music files (2020)
I think I was trying to get my entire music collection to fit onto my iPod, which at that time only had 10GB of space.

And also, I love to optimize things, so it made no sense to me why squeezing 1-2 more words in the track title would inflate the file size by 4KB. As a teenager, I probably had more time on my hands back then.

zxcvgm··on The 0.5 MB of nothing in all Apple Music files (2020)
Just like the author, I too am quite particular about empty space in my MP3 files.

When I was ripping my CD collection, I religiously tagged the MP3 files with ID3v1. Later on, I had some tracks whose titles were just a tad longer than 30 chars so I had to use ID3v2 for those and I noticed the file size grew by _a lot_.

Frustrated by this, I opened them in a hex editor and learnt that ID3v1 was a fixed format of 128 bytes, but v2 was variable. I also found out that the software had added a 4KB zero-byte padding to the v2 tag, which was "necessary" because the tag is now at the front of the file, and this padding allows more tag data to be added easily later on.

I tried various ID3 tagging software at that time and all of them added a padding. So I learned about the tag format and wrote a tagger myself that didn't add any padding. It was a great learning experience, and I managed to shave those useless zero bytes from my MP3s.

zxcvgm··on Open-source online SVG path editor
Thanks for posting this! It's an absolute godsend for creating small vector icons.

As an example, I was looking at various popular sites for how they implement the "hamburger menu" icon, and it turns out that YouTube has a really compact one:

    M21,6H3V5h18V6z M21,11H3v1h18V11z M21,17H3v1h18V17z
When I tried implementing my own in something like Inkscape, it always uses floats for coordinates, no matter how hard I tried to coax it into a fixed grid or using integer values. With that problem alone, you will never be able to get a compact path.

This editor is perfect for doing this.

zxcvgm··on Raspberry Pi Zero 2 W
The processors on the Pis aren't really optimized for low power, and they aren't strictly ARM. These Broadcom chips have a VideoCore that starts up first, which then brings up the ARM cores (geerling goes into greater detail here [0]). I don't think there was any kind of work done to properly suspend both cores for sleep modes.

If you're looking for low power ARMs, maybe other boards may fit the bill better.

[0] https://www.youtube.com/watch?v=DHwL1_afSn8

zxcvgm··on The next generation of AirPods
Seems like PodSwap have figured out how to replace the batteries without butchering them. (I’m not affiliated nor used them.)

https://www.thepodswap.com/

zxcvgm··on What’s Destroying My Yard? Pest Detection with Raspberry Pi
This reminds me of Matthias Wandel, who also loves using the Raspberry Pi camera to monitor everything, including rodents [0], shooting squirrels [1], and keeping a heater aimed at him [2].

[0] https://www.youtube.com/watch?v=dytn2LypY_c

[1] https://www.youtube.com/watch?v=y9OcHxiUNMA

[2] https://www.youtube.com/watch?v=6kK3xF1REHo

zxcvgm··on Monkey Island PC-speaker music player
I had the same idea! Except that I wanted to do it for Xenon 2 Megablast. It was a DOS game I grew up with and loved the intro music, so much that I wanted to play it outside the computer.

You can run it in the browser here to listen to the intro music: https://archive.org/details/msdos_Xenon_2_-_Megablast_1990

Thanks for posting this! I'll refer to it when I finally get around to making it.

zxcvgm··on NodeMCU ESP32-C3 WiFi and BLE IoT boards show up for about $4
I believe that's a wakeup triggered using the RTC timer, which is still available in the C3.
zxcvgm··on NodeMCU ESP32-C3 WiFi and BLE IoT boards show up for about $4
From the datasheet, it looks like the C3 doesn't have the Ultra Low Power (ULP) co-processor. This co-processor was there on previous ESP32s and allowed you to run code for sensor monitoring or other basic tasks while the main CPU was stopped, consuming ~150µA. It can then wake the main CPU if certain conditions were met. Wonder why it was removed, and if this would prevent the C3 from being used in these kinds of low-power applications.

Datasheet: https://www.espressif.com/sites/default/files/documentation/...

zxcvgm··on AirTag Teardown Part One: Yeah, This Tracks
Disappointed that this teardown was more of a teaser without any PCB photos. Here are some YouTube videos that feature a better look at the PCB of the AirTag:

[1] https://www.youtube.com/watch?v=63dJ5ytz37w

[2] https://www.youtube.com/watch?v=N1-iKyVyLfU

[3] https://www.youtube.com/watch?v=LeytpQcUHSw

Only video [1] went all the way and removed the PCB from the plastic case, revealing what seems to be an NFC antenna facing the plastic dome. Unfortunately, they struggled with removing the plastic carrier and broke the board in two.

zxcvgm··on Apple Introduces AirTag
I too, found the anti-stalking features might hinder the use of AirTags for locating intentionally stolen items: (1) it has a removable battery, and also (2) "someone can tap [the tag] with their iPhone or NFC-capable device and instructions will guide them to disable the unknown AirTag".

The anti-stalking feature also seems to contradict its privacy features:

> Bluetooth signal identifiers transmitted by AirTag rotate frequently to prevent unwanted location tracking.

But also, in the next sentence:

> iOS devices can also detect an AirTag that isn’t with its owner, and notify the user if an unknown AirTag is seen to be traveling with them from place to place over time.

If an AirTag is supposed to be "anonymous", then how can a user be informed that this tag has been seen with them over an extended period? This would mean that there is a way to identify a particular AirTag in the first place.

zxcvgm··on Show HN: Web app that blows water out of your phone's speakers (warning: loud)
If you're wondering how effective this is, the Slow Mo Guys has filmed it working in slow motion: https://www.youtube.com/watch?v=EIEwy8rPik4
zxcvgm··on The Nintendo Switch uses my open source code
I was happy when I found out that my code was used in products by large companies like Disney and Hasselblad, but yet also ashamed because it was the cause of some of their product vulnerabilities and painted their product in a bad light:

- https://www.zdnet.com/article/circle-with-disney-web-filter-...

- https://threatpost.com/popular-circle-with-disney-parental-c...

The code in question was a primitive mDNS announcement library written in C, which I licensed under the 3-clause BSD license.

zxcvgm··on Odroid-HC4 is a $65 2-bay network attached storage device
Interesting device! There's more details linked in the CNX Soft post [1], in particular, a thread on ODROID.com showing benchmarks [2]. The two disks are connected to the CPU via the ASM1061 SATA to PCIe x1 controller, meaning it can't fully handle max throughput from 2 SSDs, but I guess spinning drives should be fine.

[1]: https://www.cnx-software.com/2020/10/20/odroid-hc4-low-cost-...

[2]: https://forum.odroid.com/viewtopic.php?f=29&t=40609

zxcvgm··on What happened to Firefox Send?
To be honest, I think some form of abuse was bound to happen. Your files are encrypted client-side with JavaScript before uploading, so to the server it's just an opaque blob.

Out of curiosity, I did some technical analysis¹ of how your files were being encrypted to see if they were really secure and as a side-effect, also wrote a Go client for it.

An interesting property I did discover about the way the encryption keys are derived is that the scheme allows you to delegate an oblivious third-party to download the blob for you, without actually revealing the file contents to them.

¹ https://irq5.io/2019/05/14/data-encryption-on-firefox-send/

zxcvgm··on Pi-KVM: easy and cheap DIY KVM over IP with mouse, virtual drive, VNC and IPMI
According to the blog post, TinyPilot also uses µStreamer (from this Pi-KVM project) to achieve its low latency. The initial revision of TInyPilot couldn't get low enough latency using the HDMI over IP extender otherwise.

https://github.com/pikvm/ustreamer

zxcvgm··on On Liberating My Smartwatch from Cloud Services
> A bunch of my paddling friends recommended I try Strava. [...]

> The bad news is as I tried to create an account on Strava, all sorts of warning bells went off. The website is full of dark patterns, and when I clicked to deny Strava access to my health-related data, I was met with this tricky series dialog boxes

I noticed that most apps on the App Store all seem to want you to create an account. I get that that's how they primarily operate but I'm put off by it.

This might be a controversial opinion but I like that my runs with my Apple Watch are recorded in iOS on-device, without needing to use any of these third-party apps. And if you still want to share or even backup your runs, you can use apps like HealthFit¹ or RunGap² to export FIT files that contain GPS points and heart rate data, or export them directly via API to the service you want. If you _really_ want to DIY, you can write some scripts that extract them from the SQLite files in your iOS backups. But by default, everything is local only and you have the choice to do whatever you want with the data.

[1] https://apps.apple.com/us/app/healthfit/id1202650514

[2] https://www.rungap.com/

zxcvgm··on Apple Lightning
looks like the DSLogic: https://www.dreamsourcelab.com/product/dslogic-series/
zxcvgm··on Make educated wireless router/AP upgrade decisions
This is a really helpful guide to understand wireless networking. For in-depth reviews, I like to check out SmallNetBuilder [0] as they feature thorough tests and sometimes teardown of the wireless routers. Most "reviews" these days are pretty much just regurgitating the marketing spiel from manufacturers, which really doesn't help much.

Recently, I also stumbled upon a Chinese site [1] which does similar teardowns, but only in Chinese.

[0] https://www.smallnetbuilder.com/

[1] https://www.acwifi.net/category/information

zxcvgm··on Understanding RAID: How performance scales from one disk to eight
> _One final warning about hardware RAID controllers: It's difficult to predict whether a hardware RAID array created under one controller will import successfully to a different model of controller later._

> _We find that with hardware RAID, it's frequently difficult to tell whether you're nuking your array or importing it safely. So in the event of a controller failure and replacement, you may end up sweating bullets, YOLOing, and hoping._

This was the main reason I decided to switch to Linux software RAID from a 3ware card years ago.

A thunderstorm caused a power trip and after powering the system back on, the 3ware controller lost its EEPROM contents that held the PCI vid/pid. Fortunately, it was just a RAID 1 mirror. We used dd to cut past the metadata header and managed to mount the ext2 filesystem.

Using software RAID, I’m confident that we can take the drives to another machine in a pinch and still be able to mount it without much hassle.

zxcvgm··on ReMarkable’s redesigned e-paper tablet is more powerful and more papery
I was looking for a device to serve as my paper replacement in 2018 and came across the ReMarkable 1 tablet. Shortly after, Apple had announced a new iPad 9.7", now with Pencil support. This put both devices in the same price bracket.

After reading an in-depth review from GoodEReader [1], I concluded that an iPad, although not with an ePaper display, could also function as a regular tablet with access to a ton of apps. This was something that the ReMarkable was not able to do. The ReMarkable tablet does allow you to have SSH access though, as noted by other comments here.

Just my 2c, if you are also looking at this for a paper replacement.

[1] https://goodereader.com/blog/electronic-readers/hands-on-rev...

zxcvgm··on Chuck Peddle Dies at 82; His $25 Chip Helped Start the PC Age
The Amp Hour podcast had Chuck Peddle as a guest a few years back. Definitely worth listening to. https://theamphour.com/241-an-interview-with-chuck-peddle-ch...
zxcvgm··on Lockout-Tagout
John Ward recently did a video on various lockout-tagout devices for electrical systems: https://youtu.be/3fMueAINzcI
zxcvgm··on Commas in big numbers everywhere: An OpenType adventure
This is fantastic for command line output and whatever that doesn’t natively support digit grouping. I have no idea how people live without enabling it.

I turn it on my Windows calculator, and I’m also happy that now programming languages like JavaScript, Python and recently Go allows using underscores in numeric literals for doing this in code to make it more readable.

zxcvgm··on Reverse engineering a custom CPU from a single program
I was following along OpenTechLab [0] as they tried to reverse engineer a real CPU used in HDMI repeaters. The instruction set was already partially reversed [1], but gaining code execution allowed a small stub to be written to infer more based on before & after register states.

[0] https://opentechlab.org.uk/

[1] https://github.com/v3l0c1r4pt0r/lkv-wiki/wiki/Instruction-Se...

zxcvgm··on Generate ASCII RFC-like header diagrams for your own custom protocols
If you prefer, you could also draw ASCII diagrams manually with asciiflow. I find this tool pretty handy from time to time.

http://asciiflow.com/

zxcvgm··on Google Unveils Titan Security Key, a Yubico-Like Phishing Resistant 2FA Device
FIDO2 is an improvement over the U2F standard, mainly with the ability to now perform password-less logins [1][2]. This had to do with a shortcoming in the U2F protocol and/or devices such that they didn't need to have much storage on these devices [3]. To address this, the new FIDO2 devices are now required to persist your username(s) for a particular site. The new CTAP2 protocol has also been extended to accommodate more sophisticated authenticators, like those crypto-currency wallets with a display.

If you are looking for devices, check out reviews of various devices by agl [4] and Brad Hill [5].

[1] https://www.yubico.com/2018/04/yubico-and-microsoft-introduc...

[2] https://fidoalliance.org/fido2/

[3] https://www.yubico.com/2014/11/yubicos-u2f-key-wrapping/

[4] https://www.imperialviolet.org/2017/10/08/securitykeytest.ht...

[5] https://github.com/hillbrad/U2FReviews

zxcvgm··on Hand Made Vacuum Tubes by Claude Paillard (2012) [video]
if you liked watching this, then maybe you'd also like these videos, which i watched some time ago:

making a miniature vacuum tube triode https://www.youtube.com/watch?v=dRI0ZLTP6_0

The Art of Making a Nixie Tube https://www.youtube.com/watch?v=wxL4ElboiuA

zxcvgm··on Breaking the Ledger Security Model
I have not seen any sources which explicitly state that FaceID doesn't work the same way as TouchID does, but perhaps it's the lack of specific details in the iOS Security Guide [0] that might have led to this assumption?

In fact, FaceID solely relies on the IR camera to do its work. You can cover the front-facing (normal) camera and your iPhone would still unlock successfully. Conversely, the newly touted Animoji feature does NOT rely on the IR camera at all, as evidenced in this iPhone X review [1] at 11:40. It may be the case that the OS don't have access to it.

[0] https://images.apple.com/business/docs/iOS_Security_Guide.pd...

[1] https://www.youtube.com/watch?v=9Ca8zWJOlFQ&t=700

← PreviousPage 2 of 4Next →