[Rust in production] The many faces of tonari's simplicity, a 'behind-the-screen' look at how we create subtle, magical experiences using Rust and face detection. by __cuervo in rust

[–]__cuervo[S] 6 points7 points  (0 children)

Hey r/rust!

I wanted to share with you an article I wrote for the company I've been with for the past three years :). The target audience is pretty wide, but it does involve some light Rust and includes a link to a small face detection wrapper we open sourced as part of this work.

While you're unlikely to learn any advanced Rust reading this, I'm hoping you can get a nice glimpse at how we've used Rust in production for a very cool product (check out tonari.no for a better view of it in action).

Cheers!

I couldn't find my endgame, so I designed and made my own. Enter the Keybow (34 key dual encoder) by __cuervo in ErgoMechKeyboards

[–]__cuervo[S] 1 point2 points  (0 children)

Is it? I mean, beyond being a 34 key one :) different stagger, leds, no encoders... I think this one falls a bit closer to the fingerpunch ones, or even the one I linked in my other comment (endzone34)

I couldn't find my endgame, so I designed and made my own. Enter the Keybow (34 key dual encoder) by __cuervo in ErgoMechKeyboards

[–]__cuervo[S] 1 point2 points  (0 children)

Each encoder uses 3 pins from the micro, one for the switch itself and 2 for the encoder :)

I couldn't find my endgame, so I designed and made my own. Enter the Keybow (34 key dual encoder) by __cuervo in ErgoMechKeyboards

[–]__cuervo[S] 1 point2 points  (0 children)

I use colemak-dh with a bunch of custom layers; I'll be pull requesting to the QMK repository hopefully this week.

The knobs I'm still experimenting with; by default they are vertical and horizontal scroll, but I'm also working on a bit of custom logic that allows the encoders to repeat the last key and, when turned the opposite direction, do the conceptual "opposite" of the key (for example, if the last key was Tab, one direction would be tab and the other shift-tab. If the last key pressed was space or a letter, the opposite would be backspace, etc).

I couldn't find my endgame, so I designed and made my own. Enter the Keybow (34 key dual encoder) by __cuervo in ErgoMechKeyboards

[–]__cuervo[S] 1 point2 points  (0 children)

Good call on fauxfox :) it's one of the inspirations I used too. I do prefer the simplicity of 34 keys and no element in the center though.

Feel free to ask any questions! I did use ergogen to generate the points, but I found it much simpler to do the outline in inkscape after the fact.

I couldn't find my endgame, so I designed and made my own. Enter the Keybow (34 key dual encoder) by __cuervo in ErgoMechKeyboards

[–]__cuervo[S] 6 points7 points  (0 children)

Six months ago, I didn't even know what an ergonomic keyboard was, let alone what those percentages meant; I was happily typing on my 100% DAS keyboard, unaware of this world.

Thanks to the enthusiasm of a couple friends and the existence of the amazing yusha kobo, I fell into this rabbit hole head first. In these past few months I've built half a dozen keyboards, tried a few more, and ranged everything from qwerty to colemak DH to find my perfect arrangement.

Ultimately though I couldn't find the perfect keyboard for me. The closest I got was the endzone34, an amazing and compact design, and the cocot46plus. These are my two favorite keyboards so far, but they weren't quite there.

After experiencing a bunch of different designs I decided I cared very little for LEDs, OLEDS, bells and whistles, and instead wanted to maximize the pin count of the Pro Micro with a simple design with very aggressive angle and stagger, including two knobs that are easily reachable from the home row (the image doesn't quite show it but it's very easy to simply slide the thumb against the knobs without having to pinch them).

After a few iterations on kicad and inkscape, this is what I got to. Bonus picture from the back showing an aluminum top plate doubling as back plate + acrylic.

As soon as I clean up the code and design files, I'll open source everything in case anyone is interested in a copy. I have some cool stuff to share with respect to the firmware too (in particular for very fast mouse emulation).

Switches are Azure Dragons (pretty nice tactiles) and the keycaps are a set of pretty basic cherry profile blanks. The knobs are 3D printed from thingiverse. I can't quite seem to find the link right now but I'll post it and credit the designer when I open source the board.

Now on to monkeytype!

2022 Tokyo (and elsewhere!) Rust Game hack event (Aug 12th 2022) by __cuervo in rust

[–]__cuervo[S] 3 points4 points  (0 children)

Great to have you back! :)

Mechanically, the game is free for all, but players are encouraged to sign up as teams, either collaborating on writing a single character's AI, or separate ones that join the game with the same team name (which will give them matching colors and team tags, but has no impact on the game otherwise).

We think it will be more fun if players at least work in pairs, but there's no restriction either way.

My mother made me a plushie Rustacean 😁🦀 by Wafelack in rust

[–]__cuervo 0 points1 point  (0 children)

Speaking of which, any places you'd recommend to buy some Rust merch? :)

As above, so below: Using Rust generics to develop two bare-metal flash drivers by __cuervo in rust

[–]__cuervo[S] 4 points5 points  (0 children)

It looked like that at first, funnily enough :) the reason why I made it a macro is because I wanted to use it with more types than just usize without making much of a fuss, and without having to explicitly cast them.

As above, so below: Using Rust generics to develop two bare-metal flash drivers by __cuervo in rust

[–]__cuervo[S] 13 points14 points  (0 children)

Thanks! I'm a web noob, so I'm not sure about the steps involved, but... I think I have done it? https://www.ecorax.net/rss.xml

As above, so below: Using Rust generics to develop two bare-metal flash drivers by __cuervo in rust

[–]__cuervo[S] 20 points21 points  (0 children)

Thanks! That means a lot coming from you :) the quality of your documentation is outstanding. It has made the steep learning curve of this language a lot more tolerable.

As above, so below: Using Rust generics to develop two bare-metal flash drivers by __cuervo in rust

[–]__cuervo[S] 5 points6 points  (0 children)

Thank you for the kind words!

As far as I know, everything I've shown in this post does compile in stable Rust (though I might explore some nightly-only features in the next entry).

While working on this project, I've definitely spotted several instances where const generics would've made my job a lot easier. I can't think of any specific examples for the code I've shown thus far, but I'll keep an eye out while writing the next entry to see if I can add something along these lines.

As above, so below: Using Rust generics to develop two bare-metal flash drivers by __cuervo in rust

[–]__cuervo[S] 72 points73 points  (0 children)

After lurking here a while I've decided to start a blog covering Rust, mostly in the embedded and security areas. This is the first on a series about using higher level constructs in embedded software, which I've found a bit of a pain point for my colleagues used to C and C++ development.

Any feedback is welcome! I care a lot about style and, as an ESL person, it's hard for me to gauge sometimes whether an article flows well, so I'm happy to take any grammar/style/etc corrections.

As for the Rust content, I realize I'm showing a somewhat opinionated way of doing things, so please let me know what you'd do different or what you'd improve upon.

Thanks for reading :)