James Logan
Scientific computing in rust and python, firmware in rust, and the occasional circuit board design & testing. Propulsion engineer in a previous life.
- Reposted by James LoganMany of the #rust floating-point math functions have a note: "The precision of this function is non-deterministic. This means it varies by platform, Rust version, and can even differ within the same execution from one invocation to the next." When would results vary between invocations? #rustlang
- Reposted by James Logan> Texas Instruments in advanced talks to buy Silicon Laboratories We march ever closer to the "silicon vendor singularity" www.reuters.com/technology/t...
- Reposted by James Logan...horrifying message without context, thank you
- Reposted by James Logan🦀 WhatsApp adopts Rust for media security > Rust version showed performance and runtime memory usage advantages over the C++ > We anticipate accelerating adoption of Rust over the coming years engineering.fb.com/2026/01/27/s... #rustlang #whatsapp
- Reposted by James LoganHere is what I've been doing this past week: git.olaren.dev/Olaren/mapto... A little python program that generates poster for cities! You might have seen stuff like this around lately, but I modified it to put an emphasis on rail infrastructure :3
- Reposted by James Logan⚡️Using a Cheap USB Logic Analyzer for Embedded Rust Debugging - A beginner-friendly post on logic analyzers (Rust is a small part of the post). > Focuses on understanding samples, capture duration, and reading waveforms with PulseView. blog.implrust.com/posts/2026/0... #rustlang #embedded
- Reposted by James LoganFirst Scientific Computing in Rust monthly newsletter of 2026 is out. Enjoy! scientificcomputing.rs/monthly/2026...
- Reposted by James LoganWe are excited to announce that we can successfully use Rust's standard library from the GPU. This has never been done before. www.vectorware.com/blog/rust-st... Supporting Rust's standard library enables existing Rust code to work on the GPU and makes GPU programming feel normal.
- InterpN is now 100% statically-analyzable and about 30% faster by eliminating the need for recursive methods. In addition to a nice speedup, this change shrinks the repo by about 45%, removing about 2600 lines of code!
- The library is available as a Rust crate and Python library at: * Github: github.com/jlogan03/int... * crates.io: crates.io/crates/interpn * PyPI: pypi.org/project/inte...
- Reposted by James Logancargo-semver-checks is growing faster than ever: - 7 new releases, from v0.39 to v0.45 - 122 new lints, more than double last year's count - 4x reduction in lint execution time — some lints became up to 10x faster - across 26 (!!) rustdoc format versions predr.ag/blog/cargo-s...
- The `interpn` library for Rust and Python has the fastest interpolation algorithms I'm aware of - up to 250x faster than Scipy - and today it got faster! After years of focusing on single-thread performance, I finally called it good gave it more cores - and the parallel speedup is nearly linear!
- If you need fast interpolation, give it a look on the package repos ~ * crates.io/crates/interpn * pypi.org/project/inte... ...and check out the writeup at jlogan.dev/blog/2025/11... !
- Reposted by James LoganSemVer is tricky in all languages. But in #rustlang it's easier than ever before! By the end of 2024, cargo-semver-checks' capabilities were growing exponentially: 30 -> 57 -> 120 lints. We now end 2025 with 242 lints — 122 new lints were merged this calendar year 🎉 The exponential continues!
- Reposted by James LoganI've been wanting to try and start brain dumping some thoughts on (embedded) rust, how I approach problems, write HAL/device drivers, tools I use, etc. But, I'm terrible at starting to write unless I have specific questions to answer. So: ask me anything re: embedded/rust/hardware!
- Reposted by James LoganDay 18: Function with fast & slow paths. Inline = code bloat. Don't inline = slow fast path. Can't have both—or can you? The compiler finds a surprising way out of this dilemma. xania.org/202512/18-pa... youtu.be/STZb5K5sPDs #AoCO2025
- Reposted by James LoganAny rust friends have some good resources / insights into doing input fuzzing?
- Reposted by James LoganChip was written in Spade HDL (spade-lang.org), which transpiles down to SystemVerilog. That's then fed into a LibreLane build process that turns the verilog into transistors. All open source!
- The first batch of Rust-powered Deimos DAQs are ready to deliver for beta testing tomorrow! Time to see what real people make of them! Meanwhile, I'll be writing up Python bindings for the control program to bring the barrier to entry as far down as possible.
- This is a major milestone in transparency and performance. Up to 5kHz roundtrip control with scientific-grade accuracy, adaptive filtering, and 100% open-source! Check it out for more info! * www.crowdsupply.com/deimos-contr... * deimoscontrols.com/products/#de... * github.com/deimoscontro...
- Reposted by James LoganIf you've ever used Rust, you've felt jyn's positive influence — even if you never realized it. I hope my token of recognition is just the start of jyn's invaluable work getting the funding it deserves. Folks, can we get jyn some more funding? RT 🙏 github.com/sponsors/jyn...
- Reposted by James LoganIt's Friday night, which means it's time to write some cursed Rust. This time, I got rustc to accept some code that I think should have errored out! github.com/rust-lang/ru...
- Reposted by James LoganIf you look in the mirror and say "no semver breaking changes this release" three times, @predr.ag will appear behind you
- Reposted by James Logan“lazy use of unwrap blew up a process and took out the internet” bzzt. wrong. judicious use of unwrap blew up a process instead of allowing an Extremely Named CVE to happen and spraying your bank account credentials all over the public internet
- Reposted by James LoganNovember issue of the Scientific Computing in Rust newsletter is out and available [here](scientificcomputing.rs/monthly/2025...). Crate of the month is [InterpN](crates.io/crates/interpn) by @ponderingpothos.bsky.social Enjoy!
- InterpN is Scientific Computing in Rust's crate of the month, and featured in This Week in Rust! Check out the writeup to see how it pulls off an up to 200x speedup over SciPy's already-quite-good interpolation methods! Available via Python bindings and as a (no_std!) Rust crate. jlogan.dev/blog/
- Reposted by James LoganI might have to borrow this. It's incredibly fitting, given that my GitHub username is obi1kenobi, and I maintain cargo-semver-checks github.com/obi1kenobi/c...
- Reposted by James LoganScipy is a phenomenal library. It's not every day that one can beat its performance by 1-2 orders of magnitude. Today is that day, though! Must-read post if you care about any of: - high performance Rust - numerical methods - how Rust can make Python faster
- Take a look under the hood of the state of the art in grid interpolation in Rust and Python! Come for the compile-time loop unrolling, stay for the profile-guided optimization! jlogan.dev/blog/2025/11...
- Take a look under the hood of the state of the art in grid interpolation in Rust and Python! Come for the compile-time loop unrolling, stay for the profile-guided optimization! jlogan.dev/blog/2025/11...
- Looking forward to putting all our heads together to share learnings and hunt for the most impactful next steps for #RustLang in science and engineering!
- Announcing our Scientific Computing track at #RustNYC Unconf 2025! Join Helmut Carter and James Logan to explore scientific computing in #RustLang. Discuss interoperability, accessibility, best practices, and community. Share experiences and ideas to shape the field. Waitlist: rust.nyc/unconf
- Reposted by James LoganNew Rust horror beyond human comprehension discovered: *it matters which working directory you use to compile Rust* 🦀😱 ``` cd the-dir cargo check # works fine cd .. && cargo check --manifest-path ./the-dir/Cargo.toml # explodes ``` or vice versa.
- Reposted by James LoganPCB Design Blocks just got merged into @kicad.org nightly, they can be linked together with Schematic Design Blocks. It's shaping up to be another great release! forum.kicad.info/t/post-v9-ne...
- Reposted by James Logan“Dare to want nice things and work together to build them” Bravo, @predr.ag
- Reposted by James LoganTwo people to GitHub sponsor if you use Rust: @predr.ag and David Lattimore (Wild linker). They are doing great and hard work! Amazing talks at @rustforgeconf.com
- Reposted by James LoganI'm unreasonably excited about the upcoming cargo-semver-checks release: this month we put some points into "make it a joy to use and build." - 3x faster at scanning very large crates - its `cargo test` now takes 1min not 6-7min - we gracefully handled a massive change in the rustdoc JSON format
- #ScientificComputingInRust 2025's last day was today! If you missed my talk about Deimos and data acquisition in Rust, you can find the recording here: youtu.be/_pWZRICQgsg
- Reposted by James Logan#GlasgowInterfaceExplorer is now available at Mouser!
- Reposted by James LoganExcited for day 1 of #RustWeek! So many good talks coming up 🤩 If you like cargo-semver-checks (and especially if you fund it on GitHub Sponsors!), find me in the hallway — I have something for you 👀
- Reposted by James Logansome people will tell you that you can't capture a docstring in a macro_rules! macro, because the meta fragment captures the entire attribute and you can't destructure it. those people are all cowards. play.rust-lang.org?version=stab...
- Reposted by James LoganI don't know who else needs to hear this, but if you find yourself caught in a conspiracy between rustfmt and rustc, `#[cfg_attr(any(), rustfmt::skip)]` may be your way out. HT @steffahn.bsky.social! users.rust-lang.org/t/rustfmt-sk...
- #caturday watching Flow with the cats - and they really do watch it! Pretty neat to see a cat this interested in a movie with a plot!
- Some fairly straightforward performance improvements to interpn (docs.rs/interpn) yesterday yielded a 2-6x speedup for lower-dimensional methods. This brings it to parity with even the specialized-dimensionality version of the fortan incumbent!
- Reposted by James Loganit took a month, but i've reverse engineered this IBM MCGA gate array chip. 17,000 transistors. 768 gates. over 1200 nets.
- Reposted by James Logan🔥 eval-macro - lets you write inline Rust code that gets evaluated at compile time to generate Rust code - Combines the power of procedural macros with the ease of `macro_rules!` Crate: docs.rs/eval-macro/l... Discussion: www.reddit.com/r/rust/s/Wsa... #rustlang
- Reposted by James LoganPS. I love that a couple of "Springer Didn't Graduate" books made using @christianp.mathstodon.xyz.ap.brid.gy's generator (somethingorotherwhatever.com/didnt-gradua...) show up mixed in with the real books when you Google "springer graduate texts"
- "The Scientist and Engineer's Guide to DSP" is a solid read - refreshingly grounded and without an ounce of the usual performative obfuscation. Highly recommend dspguide.com/pdfbook.htm
- Reposted by James LoganC-style strings in Rust should come with a disclaimer: "This string has been handled in a facility that also processes uninitialized memory."
- Reposted by James Logan10x RPGA Feathers in stock over on @tindie.com get them while they last! (US Only unfortunately) www.tindie.com/products/347...
- Reposted by James LoganNeed a feature to help you make the move? Even if we don't have it yet, a single seat is usually more than enough to fund most development efforts over here
- Reposted by James LoganI put together a list of all the booths at Embedded World that are showcasing Rust, in case anyone going wants a list of folks to visit and chat with! Let me know if you know any companies I missed. onevariable.com/blog/ew25-gu...
- Reposted by James LoganI gave a day 1 closing keynote at DistrictCon yesterday. Surprisingly, it was a security talk about memory safety. Slides are here: docs.google.com/presentation...
- Reposted by James Logan“RP2040 has now been certified to run at a system clock of 200Mhz when using a regulator voltage of at least 1.15 volts.” github.com/raspberrypi/...
- Reposted by James Logan***whispers*** did you know I work with engineering organizations that spend more in a single year, on a tool they can't even agree on whether they LIKE and only use intermittently, than your lab raises for five years of sustained "fixing asthma" or whatever the hell miracle you're doing these days
- Reposted by James LoganNXP managed to make an MCU with 3 different ISAs. ARM, Xtensa and RISC-V lol
- Reposted by James LoganWe’re building a new static type checker for Python, from scratch, in Rust. From a technical perspective, it’s probably our most ambitious project yet. We’re about 800 PRs deep!
- Reposted by James LoganOne of the tedious aspects of modeling SDFs with raw shader code is adjusting the position of objects, so I'm adding transform gizmos into my tool They write changes directly to the shader on disk, so I don't need an external object hierarchy tdhooper.github.io/offline-shad...
- Firmware done, PCB schematic and layout done - one more good scrub and it's off to fabrication with the first production candidate!
- Allllmost there - just have to stitch together the interface between the base module and the analog frontend, and give one more DRC scrub -
- Just a few more power nets, and it'll be ready for the board house!
- So, grafana does this every time it updates plots ( clogs up the network as well even for queries to a local db instance which I've resolved-ish by using a unix socket ). Anyone know of a dashboard alternative that is aware of the concept of a time series and can cache appropriately?
- Trying out the new #rust 1.84 const offering in an attempt to initialize a static buffer at compile time. Any compiler folk know why this errors even though everything is available in const? play.rust-lang.org/?version=stable&mod…
- Reposted by James Loganwhy Rust is the greatest programming language of all time, in one screenshot
- Reposted by James LoganRandomly found these cool 3D printable probes by for the Omnifixo that use a jumper-wire as probing needle. Especially the version with the 5 cent coins as weight works great! Might have to make a version with pogo pins :) Awesome work, IsTim! makerworld.com/en/models/51...
- Because the PWM inputs on timer peripherals work by counting the period of the incoming signal, if the incoming signal is too slow, the counter will reset before seeing the value, and then measure an essentially random number on a later cycle. A 3-point median filter on the counter clamps this to 0:
- Now without the PWM getting stuck at low frequency due to buffering input value -
- My STM32's counter input is a 16-bit register, and is likely to increment past 65536 regularly. One is an encoder that may go negative in terms of real count. The chip doesn't have 64-bit atomics, so I ended up with two i32 outputs rather than one i64, which will be combined application-side
- Sure enough, the encoder is able to go negative as well! Testing with a signal generator for now, but will bodge an actual encoder on to it before shipping the next rev (the original design didn't include an encoder, so the pin isn't broken-out)
- Each the encoder and pulse counter are sampled (along with the ADCs) at 40kHz to make sure that any possible wrapping events are captured, and the quality of the output signal is not affected by the user's choice of data reporting rate.
- Next step is to add a 3-point median filter on the frequency inputs in order to reject the random values of frequency that can be observed when the input signal is lower than the minimum frequency (maximum period) that the timer can represent
- 'flaw' now includes filter initialization! After a bit of linear algebra mapped into minimal for-loops for bare metal, the internal state can now be set consistent with steady-state response to a given input github.com/jlogan03/flaw/relea…
- This means a newly-constructed filter no longer needs to wait to settle naturally if there is already an estimate available, for example, when updating a filter on-the-fly
- Speaking of #RustLang #SignalProcessing , bare-metal support is also coming to @miguelraz.bsky.social 's Sav-Gol FIR filter library: github.com/miguelraz/staged-sg…
- Reposted by James LoganRules for Interrupt Safety: 1. Always Keep Interrupts Vectored in a Safe direction 2. Treat All Interrupts as Though They are Enabled 3. Keep Your Event Sources Disabled Until You are Ready to Handle Them 4. Always Be Sure of Your Vector Target and What’s Beyond It
- Reposted by James Logansystems programming is so cool
- TIL that the hardware float and DSP extensions aren't enabled by default in #rustlang for arm-none-eabihf targets unless the target CPU is specified - the different cortex-m4,m7(f) options don't necessarily support these, so this is correct, but flew under my radar doc.rust-lang.org/nightly/rust...
- In related news, my STM32H7 boards are showing significantly improved cycle timing margin now that they can bundle more integer ops and aren't doing float ops in software 🤦
- Reposted by James LoganDamn dude, Solidworks really is just DRM with a CAD program attached. That was worse than Fusion. I guess I'm a #freecad evangelist now. Not what I had on my bingo card for 2025
- I have replaced the last mutex with atomics and my lööps are officially deadlock-free
- Reposted by James Logan1/6 🧵 I'm building what might be the smallest #opensource #spectrometer with an easy to use UI! I call it a pocket spectrometer. Combining #M5StickC (~$20) with AS7341 sensor (~$16). My goal? A complete spectrometer that is barely larger than a sample cuvette itself.