HNHacker News
TopNewBestAskShowJobs

jamesmunns

1,186 karma · joined September 26, 2016

james@onevariable.com
submissionscomments
jamesmunns··on Rust is not a good C replacement (2019)
https://github.com/mozilla/application-services/blob/master/...

They include debug info in release builds in their configuration.

If you run `strip` on the resulting binary, it will likely drop to like 5 MB.

jamesmunns··on New Lenovo ThinkPad Range with Ryzen 4000 and 4000 Pro Mobile
The workaround for this is that you can now get external USB batteries that support PD, and most Lenovos use USB with PD for their main charging cable, which means you can carry around a device that can charge your laptop on the go.

It's not as slick as the "swap batteries, now you're fully charged", but on the other side, the USB batteries can charged without the laptop, and you can pick the size you're willing to carry around.

jamesmunns··on What is the difference between concurrency and parallelism?
It's a little overly succinct, but I've heard:

Parallelism is for many things working at the same time. Concurrency is for many things waiting at the same time.

jamesmunns··on So long rust, why I built ZZ
The async on embedded work was mostly sponsored by Ferrous (dedicating Jonas and Jorge’s time to work on the bulk of it), but I know they both put a significant amount of personal effort into that work as well.
jamesmunns··on “C is how the computer works” is a dangerous mindset for C programmers
C was a successor to B/BCPL.

https://en.wikipedia.org/wiki/B_(programming_language)

jamesmunns··on Oxidize 1K: A Remote Rust Conference
Hey all, we just announced Oxidize 1K: A remote lightning conference for Embedded Rust.

Because the situation with COVID-19 is causing issues with conferences and events around the world, we wanted to provide a chance for folks to interact from home. Oxidize 1K isn't replacing the main Oxidize Conference, but we're trying out new things, just in case!

We've also opened our CFP[0] if you'd like to submit a talk, it'll be open until 8AM CET on Monday!

Happy to answer any questions :)

[0]: https://cfp.oxidizeconf.com/events/oxidize-1k/

jamesmunns··on Ask HN: Anybody running serious Rust web application in production?
The Atlas Weekend music festival in Ukraine gave a pretty good write up here: https://www.reddit.com/r/rust/comments/8xdsx5/rust_actixweb_...

Edit: they followed up this year as well, still using Rust: https://www.reddit.com/r/rust/comments/cdg5b4/rust_in_the_on...

NPM also has a white paper on their choice to move parts of their Backend Services to Rust as well.

jamesmunns··on Sealed Rust: A plan to bring Rust to safety critical software domains
We've definitely reached out to the Core team (a few weeks ago), and are in the process of reaching out to larger parts of the project.

Cryptography is certainly an interesting target - they certainly could benefit from the specification of the language, despite not being legally required similar to the other domains listed here.

jamesmunns··on Sealed Rust: A plan to bring Rust to safety critical software domains
Hey, James from Ferrous here, we'd love to chat if you're interested in this now, or a couple projects from now!

Feel free to reach out at sealed-rust at ferrous-systems.com!

jamesmunns··on The Embedded Rust Book
Hey, my company has this. We do consulting and training for embedded rust, and our material is open source.

Check out https://github.com/ferrous-systems/embedded-trainings/blob/m...

jamesmunns··on OxidizeConf Speakers Announced
Hey all,

OxidizeConf[0] is the first conference focused on Embedded Rust, and we've just announced our (almost complete) speaker list! The conference will be April 26th-29th in Berlin, and it would be great to see you all there!

[0]: https://oxidizeconf.com

jamesmunns··on Ask HN: What are nice, drama-free and informative IRC channels?
Also #rust-embedded if you are into embedded dev
jamesmunns··on Writing an OS in Rust: Introduction to Paging
Hey, I saw that links to the Embedded Working Group[0], TockOS[1], and others have been posted already, and those are great places to start!

My company, Ferrous Systems[2], is also focused on embedded systems development in Rust, and we are already helping companies both with embedded linux and bare-metal/RTOS projects in Rust.

We're also running a conference in Berlin on April 26th-29th called OxidizeConf[3] if you are interested in learning more about what is already going on in the Embedded Rust world :)

[0]: https://github.com/rust-embedded/wg

[1]: https://www.tockos.org/

[2]: https://ferrous-systems.com

[3]: https://oxidizeconf.com

jamesmunns··on Rust Analyzer in 2018 and 2019
This sounds like a use for the everybody-loops compiler flag: https://github.com/rust-lang/rust/pull/19964
jamesmunns··on Rust Analyzer in 2018 and 2019
Hey! This is a post by matklad [1], one of the members of the Ferrous Systems [2] team. The Rust Analyzer project [3] is an experimental compiler front-end, designed to power things like code completion, syntax error reporting, and other things that are necessary when building IDE support. Let us know if you have any questions!

[1]: https://github.com/matklad

[2]: https://ferrous-systems.com

[3]: https://github.com/rust-analyzer/rust-analyzer

jamesmunns··on Rust 2018 is here, but what is it?
Hey! Feel free to check out what we have going on at https://github.com/rust-embedded/wg, and our docs with getting started guides at https://docs.rust-embedded.org!
jamesmunns··on Teensy 3.1 bare metal: Writing a USB driver (2014)
Hey,

Author of the first link above. The Teensy3 crate was some of my first embedded work, I was working with SimonSapin (author of the 4th link) at RustFest to get something working. That library wraps some of the Teensyduino code using bindgen, which gives you the ability to write application code using Rust.

Overall, the Teensy 3.1/3.2 family wasn't great for developing Rust, as they don't have debugger (SWD, similar to JTAG) lines available, meaning you have to use the serial bootloader, and rely on a serial port for all debugging. I believe the newer version of the board expose SWD lines now, so it's not a problem.

Let me know if you have any questions :)

Definitely check out the embedded WG[1], and the new Rust homepage[2]

[1]: https://github.com/rust-embedded/wg [2]: http://beta.rust-lang.org/what/embedded

jamesmunns··on Writing an OS in Rust: Hardware Interrupts
Hey, member of the embedded wg here.

Originally, our first push was to get Cortex M bare metal microcontrollers as a "Tier 1" stable target for the 2018 edition of Rust.

Over the last couple months, we've been expanding, and have subteams for a bunch of different topics, including chip support, drivers, documentation, tooling, etc. We're mostly focused on helping other people who are getting started with embedded rust, as well as give feedback to the compiler teams, etc.

It would be interesting to hear more about your porting attempt, we also have a blog - https://rust-embedded.github.io/blog/ - if you'd like to share it as a blog post.

As Steve mentioned, https://github.com/rust-embedded/wg is our main coordination repo, and has links to most of the stuff we're actively working on.

jamesmunns··on Why Rust's Zero Cost Abstractions Are Perfect for Embedded Systems
Hey! This is a talk I gave at RustConf 2018. You can find the slides here: https://ferrous-systems.github.io/rustconf-james-2018

Happy to answer any questions about the talk, or embedded systems in Rust in general.

jamesmunns··on What the f*** is the edge?
https://chrome.google.com/webstore/detail/cloud-to-butt-plus... if you haven't seen it before :)
jamesmunns··on Sadly, I must say goodbye to Leaf, my programming language
Wow, I was not expecting this, but "Empire" was the name of the game I have been looking for for a few years. I even asked on Reddit about a year ago (https://www.reddit.com/r/tipofmytongue/comments/6wq2t1/tomtg...), but without any luck.

I played empire (in the classic text mode) together with my dad probably more than 20 years ago.

Thank you for the game (I have lots of fond memories playing this with my dad), and for reminding me what the name was!

jamesmunns··on JavaScript to Rust and Back Again: A Wasm-Bindgen Tale
Wait, who was that?
jamesmunns··on Building Tiny Rust Binaries for Embedded Linux
Hey ajross,

I originally included the output of `size` for each step, but I thought it made the text output too large. However in this case, the actual size of binary on "disk" is important, as we were trying to fit this binary on a small embedded linux device, so if we had shipped all of that debuginfo, it would have taken up useful space on the device (which has a total storage size of 8MB).

Regarding UPX, yup, not Rust specific at all, but still relevant when talking about producing tiny binaries.

Re: the allocator, steveklabnik wrote a good response, though I would add that just because something isn't written in Rust, doesn't mean it can't still be well tested, performant code. Why rewrite it in Rust if you don't have to? :)

Anyway thanks for reading and thanks for the feedback!

jamesmunns··on Building Tiny Rust Binaries for Embedded Linux
Hey all, I was able to attend the Rust All Hands this year, and this is a write up of a cool project I worked on there. Let me know if you have any questions!
jamesmunns··on Got 15 minutes and want to learn Git?
I spent 10 minutes trying to break it. Some shell-ish commands are provided and work sometimes (ls, echo, cat), but not all the time. I probably should just look at the source to figure out if there is just some js object acting like a shell, but I was secretly hoping they really were so bold as to set it up to trigger a lambda, or start a docker image with each saved state.
jamesmunns··on Show HN: JournalJerk – In 2017, keep a journal—or else
Hey Colin,

I really like the idea of this! I have a couple questions:

* Do you support any sort of formatting for the contents of the book? e.g. Markdown, LateX, ? Or is it all "subject": $email_title, "text": $email_body?

* Do you have any estimate on how much text fits in a 5x8 book? Does your printing service scale the width of the book based on contents? Aka, if I wrote "walked dog, ate food", every day, would I get a pamphlet? Is there some kind of upper limit?

* Do I have to buy all my cheat days up front? It seems like you could charge "absolutions", maybe even at the end, maybe something like $0.50 for non-prepaid days? It might help people throw good money after bad :)

Thanks for sharing!

jamesmunns··on Rust is more than safety
Hey Jon,

Not Steve here, but I was wondering if you were being sarcastic here:

> Make rust playful.

Why am I asking if you're being sarcastic?

> Make a game framework

http://www.piston.rs/

> Make it build on a mobile device

https://www.bignerdranch.com/blog/building-an-ios-app-in-rus...

> Make it build on a Pi... without diarrhea

    curl https://sh.rustup.rs -sSf | sh
> Make it build for the Arduino

(An ARM based Arduino, AVR [which powers the original Arduinos] support is being worked on now)

https://github.com/jamesmunns/teensy3-rs

> Cross compile it to Javascript

https://blog.rust-lang.org/2016/12/22/Rust-1.14.html

jamesmunns··on Teeth May Reveal a Multi-Day Biological Clock
> The term circadian comes from the Latin circa, meaning "around" (or "approximately"), and diēm, meaning "day".

From wikipedia: https://en.wikipedia.org/wiki/Circadian_rhythm

jamesmunns··on 2016 Rust Commercial User Survey Results
For me (also ~1000 lines of rust in production), the tooling and packaging was a huge winner. Having docs (with a doc generator), a test framework, a package manager, and a helpful [cross] compiler all put together, along with blazing speed and amazing reliability at runtime is an amazing combo.
← PreviousPage 5 of 5