5 ms·
If I'm not allowed to toot my own horn, I think for controls, you probably should not start with choosing a programming language, the first step is learning con
by YuechenLi 22d ago
If I'm not allowed to toot my own horn, I think for controls, you probably should not start with choosing a programming language, the first step is learning control theory and automata theory, you kinda have to understand feedback control/PID/steady state/jitter/hysteresis and the like. Python has never had great control libraries to begin with as far as I can remember (my info could be a bit outdated though), so the paid option is still Matlab/Simulink as it is their last niche really.
Embedded firmware, probably C/C++/Rust. Not the answer you want to hear, but these are the languages for bare metal applications. Of course, if you are just using an Arduino/Pi, just use their SDK for their hardware on whichever language they support.
Those two fields are just not very friendly towards beginners in general.
- Waterluvian 22d agoYeah! Like when helping teens set up PID controllers for their CAN-bussed robot, it was very much a "we've got a lot of example working Java code with a PID Controller library already. So we're using that." The language itself is so inconsequential at the early stage, that you really just pick whatever gets in your way the least.
- rmunn 22d agoPlease do toot your own horn. I assume you're referring to https://github.com/yuechen-li-dev/oct https://github.com/yuechen-li-dev/oct — tell us why it's good.
- YuechenLi 22d agoSure, short list: - Easier to write than Python other than the simplest script, almost no way to write bad code and have it compile, reads like pseudocode most of the time - Compiles into Go binary, runs at Go speed, compiles at Go speed - Trivial to wrap any Go library via LLMs, so any Go library is also an Oct library. - Can metaprogram existing Go codebases, so it doesn't really replace Go, just supplements it - Easy concurrency/parallelism - SI units as types - Can be used as build script for C/C++ in place of CMake - Einstein tensor notation - Builtin GPU acceleration via Vulkan It was designed as a teaching language for academics to stop writing bad code, but now I just get LLMs to do research/science for me with it for fun.