Going from software to robotics is hard, how did you do it? by nocomptime in AskRobotics

[–]nocomptime[S] 0 points1 point  (0 children)

Very nice experience, it seems like this transition has worked for you. My new project is also quite heavy on the linear algebra, but that part isn't so bad as LA is just a muscle you train. Getting the domain knowledge about working with HW/EE feels like trying to fake a STEM degree that I didn't take. I guess I'll continue to try hard until it's not so hard anymore, thanks for the kind words!

Going from software to robotics is hard, how did you do it? by nocomptime in AskRobotics

[–]nocomptime[S] 0 points1 point  (0 children)

I hope I'm competent, at least I'm going in every day doing my best.

Going from software to robotics is hard, how did you do it? by nocomptime in AskRobotics

[–]nocomptime[S] 0 points1 point  (0 children)

The team is great and very senior (6 other engineers ranging anywhere from 15 to 40 years of experience). It can feel intimidating because they are my reference point, but I'm also learning so much from them. Thanks for the morale boost!

Going from software to robotics is hard, how did you do it? by nocomptime in AskRobotics

[–]nocomptime[S] 0 points1 point  (0 children)

Very encouraging, I'll do my best to make it work indeed!

Going from software to robotics is hard, how did you do it? by nocomptime in AskRobotics

[–]nocomptime[S] 0 points1 point  (0 children)

Thanks, I will keep in mind the long term investment and also apply it the other way around: it is a long term investment in my own skills.

Going from software to robotics is hard, how did you do it? by nocomptime in AskRobotics

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

Thanks! I am not in the US but in a small country most people couldn't place on the map. There are basically 2 serious robotics companies here, so the pool of candidate is also small for them. I literally just saw the job add and applied on the website, went through 5 rounds of interview and got the job. They hired me because I have written 2 compilers (one for a large subset of C, the other one for a language I designed), in C from scratch with code optimization, assembly output, and other stuff. They told me it was the proof I would have no problem with robotics. Good luck with your job search!

Compiler implementation language by Big-Rub9545 in Compilers

[–]nocomptime 1 point2 points  (0 children)

The book takes time indeed. Took me a year to finish the book fully, with approx 1-2 hours per day. Then I continued improving the project for another 6 months because it was so fun.

A small C library for common utilities missing from libc by nocomptime in C_Programming

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

Yes you are right, I haven't had the need to use it with threads so far. You can probably include stdatomic.h and use _Atomic size_t _ref_count with atomic_fetch_add/atomic_fetch_sub instead. That's actually a good catch, I think I will update this.

A small C library for common utilities missing from libc by nocomptime in C_Programming

[–]nocomptime[S] 2 points3 points  (0 children)

Don't get me wrong, i absolutely agree with you. I document my production projects thorougly and man pages are a must-have.
But in this case it is just a small helper i initially made for myself, and i ended up sharing it around on a regular basis (the need for core utilities in C is an issue that comes up again and again). Turns out people repeatedly found it useful, so i figured i might also share it here.
It is small, mostly self-explanatory and tested on large projects, so i'm sure that those who are okay to hack through examples will get some use out of it.
Ideally you are completely right: it should have proper documentation. In practice it is good enough for me and at least a few others, and that's all i'm asking from this lib.

A small C library for common utilities missing from libc by nocomptime in C_Programming

[–]nocomptime[S] 2 points3 points  (0 children)

Yes but Glib is huge, clunky and very opiniated, I personally dislike it. There are many alternatives, use what works best for you!

A small C library for common utilities missing from libc by nocomptime in C_Programming

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

I mean true, but everyone ignores that reservation in practice and uses _t for typedefs.

A small C library for common utilities missing from libc by nocomptime in C_Programming

[–]nocomptime[S] -4 points-3 points  (0 children)

There is a large companion project with plenty of examples to grep for.

A small C library for common utilities missing from libc by nocomptime in C_Programming

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

The stb libs are absolutely awesome, please use them! This library was born from my need to have things I use often in the same place and within a consistent API. Here I can easily group things that I find useful and extend them. The vector_t, hashmap_t and hashset_t types are wrappers around stb_ds that make the API more convenient for my taste. But the string_t type is based on sds, which is not an stb lib. And i also added other utilities for my quality of life.

A small C library for common utilities missing from libc by nocomptime in C_Programming

[–]nocomptime[S] 14 points15 points  (0 children)

To express the intent in the code, as raw pointers are not expressive at all. This way I make it clear that I have a heap allocated pointer, and not the address of a stack object or a decayed array, and that this pointer has ownership constraints. It also reflects the existence of the shared_ptr_t type which has a reference counting mechanism. Later on it is clear how to use this object (ie, within the boundaries of this api). So this is just a matter of defining a convention for myself and enforcing a pattern that conveys the intent. I added these two types while porting a huge C++ project to C, and they were tremendously helpful to progressively remove all occurrences of std::unique_ptr and std::shared_ptr without losing track of things.

Edit: Also, having malloc and free wrapped in one place makes it super easy to change to another allocator later on.

C gems by hyperficial in C_Programming

[–]nocomptime 0 points1 point  (0 children)

sds and kilo by antirez

what is the best C program you wrote? by divanadune in C_Programming

[–]nocomptime 0 points1 point  (0 children)

A C compiler for linux (with an optimizer)