I know lisp/scheme, and wanna use Guile and common lisp to extend programs. Now i'm deciding what to learn for the low-level, well performing base of programs (mostly graphics related programs, like video/image tools).
C is probably the most mature bet, but seems like it might be a bit outdated. C++ seems like the most used but it looks like it's a mess. I don't know anything about rust. Assembly seems unnecessary, and Fortran looks cool but is a dino.
What should i learn for a low-level language?
C is the only option
It's the lowest-level portable language
Common Lisp. It's low level enough, if you need it lower level build better hardware that runs on Lisp.
>for a low-level language?
68k assembler.
i already do common lisp with sbcl, but i dunno how it'd work in terms of portability and if it would be acceptable in performance compated to C. The extension part would be with sbcl or scheme either way
Learn C (one of the simpler languages to learn; will help get you into the mindset of systems programming), then Rust (adds a lot of abstraction over the things C does; could be used by itself for a lot but is quite young; helps you form a mental model of how to manage resources), then C++ (essentially a more mature version of Rust, with more feature bloat; can use knowledge learned from previous two to help you write better code; can use the knowledge from Rust to help yourself understand the design of C++ and its idioms).
C won't take you too long, Rust will take some getting used to before you become proficient, and C++ is a deep rabbithole that takes a lifetime to fully understand, not that that should discourage you.
Feel free to learn assembly if you wanna dig into how the compilers actually work.
Fortran is a meme.
>being this uninformed
OH NO NO NO NO NO NO NO NO
asm.
All languages higher than assembly are high level languages.
I would recommend Forth. Forth is a dead simple language that has been implemented on pretty much every architecture in existence. If it has not, then it is very simple to write a interpreter yourself.
Forth is also just as powerful as Lisp, and may be extended into as high-level language as you desire.
In all honesty, I do not see any reason to not use Forth for everything.
all languages higher than machine code are high level languages
All languages higher than physics are high level languages
Forth
all languages are high level, the mind cannot comprehend the true complexity of the universe
I find modern Fortran a really comfy language. I recommend it.
It really depends on the libraries you want to use. C libraries? Use C. C++ libraries? Use C++.
Using C++ with C libraries always feels a bit weird.
There's also some Lisp dialects which compile to C and which are said to have very natural interoperability with C libraries and such. Might be worth a look. Carp comes to mind (not sure about maturity at this point) and Chez Scheme, I think.
Usually, C is way easier to talk to than C++.
Using C libs in C++ only feels weird because C is a very old language and it shows. When it comes to compiling you just include extern "C" and it all works.
>portable
ASM is platform-specific, Forth is less of a single language and more of a design pattern for making a BIOS
>not fabricating an ASIC for every hello world you make
Hey, whatever language keeps you motivated is the right one. For me I just like C and C++. So I learned C and some of C++. I don't know many C++ features but i'm not interested, just wanted to know enough to use most C++ libraries. For doing quick scripts I use bash or python depending on how much I need it to be portable to windows.
based
First, good work learning lisp.
Second, C or C++ would be fine. Once you know one, you know a lot about the other, though personally I'd pick C because C++ can get messy.
Just learn C. Why haven't you learned it already?
>ASM is platform-specific
Not with macros it isn't...
Arm7 ASM and then C.
Learn C because it's still relevant and it won't go away any time soon.
Learn Rust because it has a great ecosystem and much more advanced features.
I wouldn't recommend learning C++ unless you really want a C++ job. The C++ standards are getting more and more complex and convoluted and you have to learn about each recent C++ standard (C++03, C++11, C++14, C++17) because every project is on whatever standard the authors decided to use when they started it. The C++ ABI is a complete mess. If two pieces of code are compiled by different compilers or compiler version or with different standards (or other uncountable options that you will only learn after bashing you head against link errors) they will likely not be linkable or cause crashes. The best way to avoid problems is to compile everything with the same compiler and the same options. Good luck dealing with the build system of whatever library you want to use. Most are pretty sane tho. Btw, Rust doesn't support dynamic linking and there is only one compiler so I have no idea how it will turn out.
Common Lisp + CFFI
LLVM IR obviously
C is still the undisputed king for low level programming. Every platform has a C compiler and a C ABI.
C++ is fine for low level stuff still, since you can basically treat it as C with classes and some niceties like vector.
Rust is gaining traction and will probably be more common to see system level code written in it ad it gains inertia.
>Rust is gaining traction and will probably be more common to see system level code written in it ad it gains inertia.
Its a matter of fact. I've been around long enough to remember everyone saying C++ would never be used for low level code. 5 years later it started happening. Same shit with people sating python would never replace perl for automation tasks, but yet again here we are.
As languages get popular they get used more, rust targets and facilitates low level development even if it is in a burgeoning state right now.
>Rust is gaining traction and will probably be more common to see system level code written in it ad it gains inertia.
Windows will never be written in Rust, if they were ever rewrite windows from c++ to some other language it would probably be in their own language. There will be of course new operating systems written on Rust and eventually drivers for current operating systems written in Rust. But I doubt Rust will ever reach the level of deployment C or C++ code has.