u/nocomptime

Going from software to robotics is hard, how did you do it?

Last year, I decided to quit my "traditional" software job in a big tech company where I had been working for 3 years on a C++ desktop app in the ML space. The job was quite heavy on the C++ side with lots of complicated software, and I had been promoted to senior team member after some time, but I wasn't learning much anymore and wanted a change. Not to mention, it was my first job after uni, and I wanted to explore other problems.

At the same time, a position opened for a software role in a robotics company in my area: a company with a solid reputation, known for it's high entry bar, and with a mission that quite resonated with me. I've never really been into robotics, I hadn't done any projects with sensors, motors, hardware, or embedded in general. I'm much more into user space and system tools software. But it looked like such an interesting challenge that I applied anyway, knowing well that my chances were slim. And yet, I actually got the job after a hell of an interview process. They liked my strong knowledge of C++ and ML, my ability to write assembly, my side projects and general problem solving skills, and decided to bet on the fact that I could pick up the robotics part on the job.

Now i've been there for a few months, and it has been HARD. In a span of weeks, I was introduced to ROS and HAL, embedded Linux, uart/spi/i2c/can, stm32 programming, logic analyzers, field tests, and a gazillion other stuff. It has been super interesting so far, but it is also kind of overwhelming? I'm pulling 10 to 12 hours of work a day, and I still can't yet follow up with deadlines. So far, I haven't delivered a single feature within the expected time frame (but I've delivered all of them, just significantly slower than planned). It's intense, exhilarating, crushing, and fascinating.

Some days, it feels like I can't keep up, that there is just too much to learn. I love it, but i'm also second-guessing my abilities. I feel like a complete junior again, spending tremendous effort to simply understand what's going on. Still, it has become easier, I'm more confident about the small parts I work on, but there is a long road ahead. Has anyone gone through a similar experience of getting into robotics "out of the blue" and basically learned it on the job? Do you think it is even a realistic thing to do?

All personal stories and advices welcome. I just want to get some feedback and hear about similar experiences.

reddit.com
u/nocomptime — 3 days ago

Link: https://github.com/romainducrocq/c-std

This is a small C library that wraps some widely used open-source utilities in a convenient macro-based API. I’ve built this helper over the last year or two while working on my C projects to make up for the absence of some common features in libc.

Basically, it is just a tiny collection of  libraries that I find useful, bundled with some of my own utilities, and unified into a single interface that contains:

* dynamic strings (based on antirez/sds);

* dynamic arrays, hashmaps and hashsets (based on nothings/stb_ds);

* macros for error handling;

* macros for managed pointers;

* filesystem operations (cxong/tinydir).

The wrapper code is in a single header file `c_std.h` which has less than 300 lines of macros and provides types such as string_t, vector_t, hashmap_t, hashset_t, etc. A good example of usage is this C parser that relies heavily on it.

(Note: I have patched the underlying libraries mentioned to (1) fit my needs and (2) support both C and C++ , so they are not exactly the versions you would find in the original repos.)

I’ve used this library quite extensively in my recent projects (on Linux, MacOS and FreeBSD) and it has been very handy, so I hope it will be useful to someone else. 

u/nocomptime — 17 days ago
▲ 27 r/C_Programming+1 crossposts

Link to planet-kilo: https://github.com/romainducrocq/planet-kilo

I ported Kilo, a small text editor originally written by antirez (the author of Redis), to my C-like programming language: planet!

planet is a programming language I developed over the past year, which is based on my C compiler - wheelcc. It is basically a clone of (a large subset of) C with a new syntax and improved semantics. It uses the m4 preprocessor, compiles programs to native x86_64 assembly and has runtime bindings for libc. The entire project (planet + wheelcc) is written from scratch in C and started as an implementation of Nora Sandler’s `Writing a C Compiler`.

The core compiler for planet is done, but it is not documented yet, so I’ll do another post in a few weeks to properly showcase the language itself when it is ready. For now, I mostly wanted to share my experiment with Kilo, but you are welcome to explore the full project: all the links are here and in the repo above.

My next milestone is to selfhost the compiler, and I can now do it in a text editor written in the target language!

(And lastly this is a recreational project, don’t take it too seriously and have fun.)

Edit: i embedded all the links in this post.

u/nocomptime — 24 days ago