HNHacker News
TopNewBestAskShowJobs

jamesmunns

1,186 karma · joined September 26, 2016

james@onevariable.com
submissionscomments
jamesmunns··on Why Rust helps even if you have to use a lot of `unsafe`
For what it's worth: references in Rust (both `&` and `&mut`) are just pointers with stronger static (compile time only) analysis. They have zero runtime impact vs raw pointers.

Even heap allocations like `Box` are still just pointers, that have destructors that run when they fall out of scope, but access is just a pointer dereference, the same as you could do with unsafe.

jamesmunns··on Bypassing Readout Protection in Nordic Semiconductor Microcontrollers
Aw, it's a shame this is an older post, I was wondering if there was a published attack for the relatively newer nRF52. The nRF52 is already a little long in the tooth (there's an nRF53 available, and nRF54 now/soon), but the nRF52 is still what I see most in the field today.
jamesmunns··on Putting out the hardware dumpster fire
This is something I'm also working on, but using off the shelf hardware for now and working on the OS first[0]. I'm going for something lower spec and portable for now, mostly because there are a fair number of relatively well documented RISC-V processors these days (the single core, 1 GHz C906 CPU inside the SoC probably technically counts as open source!), where it seems feasible to write drivers. I'm not sure it would be a wonderful "full desktop" solution (it's close to the original Pi Zero in terms of performance), but I hope to target larger chips as the OS gets more mature. The i.MX8 they mention in the research paper is actually one of the ones I've considered, it's also used by the MNT Reform (definitely worth a look if you haven't seen it before, and are designing your own larger scale computer!), and the Librem 5 (which I got after many years of waiting, and don't have a ton of use for right now).

I actually would like to eventually play around with treating all the "hardware bits" inside of the computer, like the wifi chip, graphics card, etc., more like a distributed system than black boxes, but this generally comes down to writing a lot of the firmware myself (luckily this is a hobby/research project, so "non viable" solutions are still on the table).

The more immediate goal for me is something portable, and comparable to a palm pilot/blackberry in terms of performance and capabilities. The current hardware will likely have an ESP32C3 for wifi (32-bit RISC-V), the main D1 CPU (64-bit RISC-V), and an RP2040 (32-bit Arm Cortex-M) for keyboard and IO, so I'll be able to test out some of my "network of tiny computers that make one small computer" ideas.

[0]: https://onevariable.com/blog/mnemos-moment-1/

jamesmunns··on Rust hello world app for Windows 95, cross-compiled from Linux, no MSVC
MSVC is the default compiler backend for Rust on windows. You can also switch to use GCC tho: https://rust-lang.github.io/rustup/installation/windows.html
jamesmunns··on GitHub Copilot emits GPL code
This is interesting, but many permissive licenses still require attribution at the project or file level.

If Codeium doesn't produce these when producing "verbatim enough" snippets, how is this actually better, besides avoiding a GPL boogeyman?

I get that there have been fewer (if any? I'm not aware of any) MIT/Apache2.0/MPL2.0 license violations that have gone to court than GPL violations, but this still feels like an "address the symptoms" and not "address the cause" difference.

jamesmunns··on Switching from C++ to Rust
For what it's worth, the entire esp32 family is officially supported in Rust by espressif themselves [1], and the stm32 family is probably one of the most widely used cortex-m families in embedded Rust as well[2].

[1]: https://github.com/esp-rs

[2]: https://github.com/stm32-rs

jamesmunns··on I Made a Wemos D1 Mini Dev Board
KiCad is a really excellent tool, usable for a pretty wide set of use cases, even professionally if you don't need a specific tool like antenna design or complex high speed trace matching.

All of the low and high code board houses will support either kicads project formats directly, or kicad supports standard Gerber format export.

jamesmunns··on The Lapdock Kit
Another confirmation of this. I ordered a Librem 5 at the end of 2019, and have not gotten any meaningful update on it.

I (now) know someone who ordered earlier than that, who has been trying for years to get a refund for his device.

jamesmunns··on Rust: A Unique Perspective (2019)
Yep, we have `fence` for runtime+compile time barriers, and `compiler_fence` for compile time barriers. They take the same Ordering enum as atomics.
jamesmunns··on Taking over a Dead IoT Company
The generic name for these panels are "HUB75", based on the interface they use for driving them. I can confirm, these are $10-15/ea in small quantities on sites like Aliexpress. But you're likely right, they were probably buying retail from Adafruit.
jamesmunns··on In the Stacks
This was a beautiful story, but was it fiction? I can't find the song named in the article, nor the "King Ozy" producer they are talking about.

Edit, the author, Robin Sloan, is a fiction writer. That's... a little disappointing, but still it was a wonderful story.

jamesmunns··on New Zealand bans young people from buying cigarettes for life
"there hasn't been a significant effort to re-ban it wholesale at a state or federal level"?

At least in the context of the original parent comment ("doing perfectly fine since prohibition")

jamesmunns··on Bun 0.3
Congrats on the release!

Were there any organizational or policy changes after the "9 month grind" [0] tweet? Or is this still the policy of the bun/oven org?

[0]: https://news.ycombinator.com/item?id=32584211

jamesmunns··on 100 Gbps achieved from space to Earth
For those curious, I went and looked it up, and the one way (not round trip!) light travel time to the moon is about 1.3 seconds, and one way light travel time to mars is 3-22 minutes or so, depending on how far they are at the time.

So maaaaaybe you could have a really painful conversation with someone the moon, but not Mars.

edit: This is WITHOUT any latency introduced by the link/protocol, or if you have to then route the message from one side of the earth to the other, just time-of-flight distance calculations, so the absolute minimum possible latency.

jamesmunns··on The ATtiny 2-Series
fwiw: cortex-m parts would be pretty conclusively referred to as 32-bit parts (due to the 32-bit address space/pointers as well as 32-bits being the native word size of the platform).

Other 32 and 64 bit platforms support some kind of "compressed instruction" support, for example 32-bit ARMv7 microprocessors (think early android phones, original raspberry pi, etc.) also support the 16-bit Thumbv2 instruction mode, though thumbv2 support was removed in AArch64/ARMv8.

This is contrasted with a "true" 16-bit platform like msp430, which has 16-bit pointers and native 16-bit words.

RISC-V also has an optional compressed instruction set for both 32- and 64-bit platforms as well.

jamesmunns··on The ATtiny 2-Series
stm32g0 parts (for example the stm32g030) can often be in the <$1 range, or <$0.50 at decent quantities. I think there is even an stm32c0 line planned at a lower price point.

There are likely lower cost parts, but the REALLY cheap 32 bit parts are moving to RISC-V, see WCH's recent releases.

Edit: as a specific example, the STM32G030F6P6TR is available at $0.74 for one, or $0.45/ea at qty 1000 over on JLCPCB's part list:

https://jlcpcb.com/partdetail/Stmicroelectronics-STM32G030F6...

I put some of these on a very recent project.

jamesmunns··on Making all your integers positive with zigzag encoding
Author of postcard here, I don't remember exactly where I got my bit twiddling example from, lemme see if I have notes from that.

postcard's zigzag encoding matches phoboslab's psuedocode.

Edit, not totally sure, but this wiki page rings a bell, and is probably where I got my impl from: https://en.wikipedia.org/wiki/Variable-length_quantity#Zigza...

Edit 2: I also explain why I do this (it compresses better) in my wire format specification: https://postcard.jamesmunns.com/wire-format.html#signed-inte...

jamesmunns··on Ask HN: Where are the simple Git GUIs?
I learned git on tortoise git. It's definitely a good and simple option if you're on windows.
jamesmunns··on Compiler Errors for Humans (2015)
Both Rust (via 'cargo fix') and Clang (via `clang-tidy -fix` have ways of doing this, I don't think I've seen someone offer this automatically/interactively though.

I don't think I've ever used them, but I've ABSOLUTELY used suggested fixes from LSP/rust-analyzer tools, which fit much more into my typical workflow. For things like match statements in Rust (which need to be exhaustive), I now have muscle memory to just write an empty match statement, and trigger the first LSP/r-a suggestion, which fills the match block with placeholder items.

I guess I see LSP as my "compiler in interactive mode" interface (even if that isn't EXACTLY true).

jamesmunns··on Systems Engineering, or "why james gets paid"
What would you like to know? I'm sort of writing as I go here, from scratch. You have to start somewhere.

The problem is "good vs bad" is a little domain specific. I can show something that works for embedded, but it won't be perfect for some other domain.

jamesmunns··on Systems Engineering, or "why james gets paid"
Author here!

Definitely started as a software engineer, but in a safety critical field (avionics), at a company/team that in my opinion has an incredible "systems culture" (Garmin Avionics). During onboarding, we were taught WHY we needed to do so many things for the safety critical process.

After leaving safety critical, and going to much more start-uppy companies, and realizing that SE knowledge was not widespread, and how to put the "easy but good bits" in place quickly, is pretty much how I ended up where I am.

jamesmunns··on Systems Engineering, or "why james gets paid"
Hi, I am James, and I do in fact get paid. That being said: I do this as a consultant, and my official job title has never been "system engineer" (usually some flavor of software engineer).
jamesmunns··on Systems Engineering, or "why james gets paid"
Systems of people are systems too :)

You might like my follow up, where I touch on this: https://cohost.org/jamesmunns/post/178752-systems-engineerin...

I have a lot more to say about how ignoring the people aspect of things is wrong for a lot of reasons.

jamesmunns··on Systems Engineering, or "why james gets paid"
I'm continuing to write on my cohost page! I haven't answered this yet, but plan to in the future. Also happy to take any direct questions here, or by email (it's in my profile)
jamesmunns··on Systems Engineering, or "why james gets paid"
Hey, author here :)

Requirements changing are a reality. In safety critical fields, these changes are noticed by using traceability tools.

I haven't written this far yet: but you should have a process for changing things like system requirements. It should be discussed, reviewed, and approved by the relevant teams. The "downstream" documents, like software or hardware reqs, should be updated as well.

Hard to fit all the details in a single summary, but happy to answer questions

jamesmunns··on Stop overcomplicating it: A simple guidebook to upping your management game
I'm guessing: "Senior Individual Contributor".

It would be someone experienced, who is still responsible for technical contribution (writing code, planing architecture, etc.)

jamesmunns··on Twitter Appears to Be Down
Yeah, my third party messenger tool (beeper) threw that same error. I'm guessing something went wrong in a deploy. Hopefully they'll roll it back soon.

I can still view pages when logged out, but trying to log in on an incognito window also fails (I didn't look at the console tho)

jamesmunns··on Twitter Appears to Be Down
As of 00:00 CEST, twitter appears to be suffering some kind of outage [0], though this isn't yet shown on their status page.

* [0]: https://downdetector.co.uk/status/twitter/

* [1]: https://api.twitterstat.us/

jamesmunns··on Gairoscope: Injecting Data from Air-Gapped Computers to Nearby Gyroscopes
Pretty sure this is the same researcher that publishes a new way to theoretically exfiltrate data over every possible signal medium every 3-6mo.
jamesmunns··on Rust on Espressif chips – 15-07-2022
There is a specific dev kit which is used in training materials[0] (the training is paid, but the material is all online for free), but you can use Rust with any ESP32 (xtensa or risc-v based).

The main esp-rs github organization[1] is a good place to get started!

[0]: https://espressif-trainings.ferrous-systems.com/

[1]: https://github.com/esp-rs

← PreviousPage 3 of 5Next →