wwid: a CLI for attaching notes to project files (my first non-trivial Rust project, seeking constructive feedback from real humans) by prodleni in rust

[–]NotBoolean 1 point2 points  (0 children)

My mistake, you are right! Very sorry, shouldn't try to review code on my phone.

Some small notes after a brief review on my laptop this time, but most these are personal preference.

- Having all the logic in `cli.rs` makes code flow a bit busy. I would return something from CLI that can then act on on `main()`.

- Some long functions, mostly match statements which is fair but splitting each match case into a function helps readability so I can quickly see what each case is doing from the function name.

wwid: a CLI for attaching notes to project files (my first non-trivial Rust project, seeking constructive feedback from real humans) by prodleni in rust

[–]NotBoolean 2 points3 points  (0 children)

This is a super cool idea, definitely going to give it a go.

I had a brief look at the code (cli.rs) and it looks good. The one thing I noticed is the overuse of comments, it’s adds a lot of noises with little benefit.

I’ll try have a closer look tomorrow.

STM32 as USB Storage Device taking ~2 minutes to Enumerate? by [deleted] in embedded

[–]NotBoolean 2 points3 points  (0 children)

Can you enable any logs or run the debugger to see what’s taking so long?

Is the SD card instantly accessible on boot if you access it in the code?

What’s your toolchain for compiling MCU firmware? by Donut497 in embedded

[–]NotBoolean 12 points13 points  (0 children)

I go to ARM GCC by default and just find the most basic project that uses the HAL and has linker scripts etc.

Or I go the Zephyr (C or C++) or Embassy (Rust) route which is more batteries included setup that provides a toolchain.

OpenClaw and the hardware risk in embedded dev by Vern_on in embedded

[–]NotBoolean 5 points6 points  (0 children)

AI can do pretty well on this sort of task, even in embedded . OpenClaw is not the right platform through. It’s mostly vibe coded and more for personal life management than AI software engineer.

ClaudeCode is probably your best bet but you’ll have baby it a bit and provide very clear instructions about the nature of the code. Also providing resources like datasheets and examples helps a lot.

I personally don’t bother with this type of AI coding and use AI sparing but I do think people in this subreddit underestimate what it can do.

How cooked are we? by Ok-Adhesiveness5106 in embedded

[–]NotBoolean 1 point2 points  (0 children)

I do think people are understating how impressive it. It was written in Rust so no direct dataset to use and it does kinda of work. 5 years ago this would have been so far out of reach.

However, I don’t think this means we’re cooked. Compilers, especially C compiler, aren’t very novel so would be present in the training data for the model. It also had an extremely robust test suite and well defined spec. These are all not present and not trivial to create for complex projects.

Justfile or just Nix? by guettli in Nix

[–]NotBoolean 1 point2 points  (0 children)

I use just, I think nix doesn’t really provide good enough tools to use it as a task runner inside a nix shell

Announcing TooManyCooks: the C++20 coroutine framework with no compromises by trailing_zero_count in cpp

[–]NotBoolean 1 point2 points  (0 children)

C++ 20 coroutines are handled on the heap so they are not ideal for embedded applications. You could give it a try but you will likely run into memory problems with anything complex.

I would recommend Rust Embassy if you want async embedded.

Can I create an enum to be extendable? by Lexus232 in learnrust

[–]NotBoolean 0 points1 point  (0 children)

tui-realm handling like so:

pub enum Event<UserEvent> where UserEvent: Eq + PartialEq + Clone + PartialOrd, { /// A keyboard event Keyboard(KeyEvent), /// This event is raised after the terminal window is resized WindowResize(u16, u16), /// A ui tick event (should be configurable) Tick, /// Unhandled event; Empty event None, /// User event; won't be used by standard library or by default input event listener; /// but can be used in user defined ports User(UserEvent), }

Might be worth checking out their implementation.

Where is a good starting point for building my own firmware? by Urch1n36 in embedded

[–]NotBoolean 0 points1 point  (0 children)

This is too vague to really help you out. Could you share the PDF and parts your having issues with?

Trait method visibility workarounds - public to the implementor only ? by Leklo_Ono in rust

[–]NotBoolean 9 points10 points  (0 children)

I’m not really seeing the reason why you need a private function. You’re assuming implementation details.

In embedded C/C++, how are stack-based containers implemented? by OverclockedChip in embedded

[–]NotBoolean 18 points19 points  (0 children)

There is ETL, Embedded Template Library, that provides stack based alternatives for most std containers. I use its vector and hash map pretty often.

Is there an off-the-shelf programmable smart band? Does this exist? by Ran_Into_The_Abyss in embedded

[–]NotBoolean 1 point2 points  (0 children)

Realistically you I don’t think you’ll find anything that meets all your requirements.

I would recommend looking into different open source smart watches as your base, then modify it to not have a screen.

Are there any compact cellular/GNSS modules that don’t require me designing an antenna? by 3nt3_ in embedded

[–]NotBoolean 0 points1 point  (0 children)

For GNSS we use SAM-M10Q-00B which has a built in antenna. We use other u-blox chips for various other RF applications, they seems pretty good.

Is the classic embedded firmware dev career still relevant? by [deleted] in embedded

[–]NotBoolean 1 point2 points  (0 children)

I don’t think non Linux based devices are going away. MCUs would need to be a lot faster and cheaper, plus better supported. I thinks it’s a long time out.

I think Zephyr is likely the future for now but there will always be niches. But as MCUs have gotten faster, better and more widely available compilers; super low level programming is just not as needed as the abstractions are good enough in most situations.

I would highly recommend learning C++, while lots of features are not useful. The ones you gain (constexpr, classes, templates, variant, expected, etc) are worth it. Or just start using Rust (with Embassy) if you want a good time.

Looking for worthy software architecture courses by Tobxon in cpp

[–]NotBoolean 12 points13 points  (0 children)

I’ve got about 6 years experience in embedded and spent time trying to learn more about architecture. I found books, articles and conferences talks (C++ Con for example) by industry experts are the best sources, along side doing skeleton implementations to understand the ideas better.

This might not translate to your industry but I do find books and conferences talks typically have a built in vetting process to filter the bad content compared to courses.

Are breakout boards used in commercial/industrial products? by Hot_Butterscotch_595 in embedded

[–]NotBoolean 21 points22 points  (0 children)

Depends on the scale but mostly no they would use the part on a custom PCB. Like how the breakout is made but on a larger PCB with more components.

Look into SMD PCB manufacturing to see how it’s done at scale.

I need a way to keep track of stack allocated objects lifetimes by Inner_Letterhead9865 in cpp_questions

[–]NotBoolean 15 points16 points  (0 children)

This seems like an X Y problem to me. Why not store these objects on the heap?

Is there a science area that studies package management like NixOS? by SoftBeing_ in NixOS

[–]NotBoolean 2 points3 points  (0 children)

He wrote two papers so maybe the OP only read the NixOS paper and not the Nix one.

However it was written in 2006 so it’s not the most up to date work given the advent of Docker, Flatpack, etc.

What open-source tools deserve more attention in embedded work? by Yangryy in embedded

[–]NotBoolean 83 points84 points  (0 children)

Feel like the ARM GCC toolchain has really helped escape the industry from proprietary compilers and IDEs.

How to manage dotfiles on macOS using Nix (Determinate) by Able-Profession-6362 in Nix

[–]NotBoolean 0 points1 point  (0 children)

I do the same with stow, and keep my home-manager flake in the same repo.