Python scripter learns C for the first time circa 2020 colorised
Learning C isnât very difficult, but since you come from python, I should pray for your sanity - especially because youâre learning strings!
I do C++; but afaik, C doesnât have inbuilt string datatypes. You need to use a character array - which isnât the smoothest thing to work with once youâve tasted python strings. (absolutely no pun intended )
But at least you chose THE classic book!
First edition as well! Purchased by my father in 1988. Printed in 1978
Was just about to start with Rust myself!
Rust. Oh you mean the video game right?
no, itâs a programming language
The first thing to realise is that C does not have strings. It has character arrays. Well, it actually does not even have arrays, it has pointers and a really cool pointer arithmetic, and some syntactic sugar to make them look like arrays.
So, once you figure out pointers, strings will be very simple to understand. Everything in C is very minimalist and simple1 once you understand it.
1Simple in the context of C means âelementaryâ, not necessarily âeasy to doâ. While you have plenty of useful functions in the standard library, itâs a good idea to write many of them from scratch while youâre learning, just so you have a solid understanding of what they do. Of course, in most use cases, the functions from the library will be better and more optimised.
No wonder youâre having hard time to figure it outâŚon Microsoft IDE
Come on man, on Linux you deserve better
P.S. The book is pure gold
IDEs run on soy. All you need is ed
, the standard text editor, and a C compiler. Most of UNIX was written that way.
This also has an added benefit of making your beard look majestic.
âBeard-care product companies hate him, see how this man grew the most majestic beard ever, using only UNIXâ
Thatâ s all, none of this btw I bla bla⌠with C you do
or donât do.
You @SuppaMan will benefit greatly the more that you grasp C.
Yes, all joking aside, C is the most useful programming language you can learn.
Hmm perhaps I might have to open my book of C myself then, before jumping in to Rust.
I bought it a while ago, in a bundle with other books, but never gave it much thought, and like @SuppaMan I just started with my Python booksâŚ
Rust is cool, a very modern language with a really strict compiler that prevents you from doing stupid things. The C compiler is quite the opposite, it lets you do anything, as long as it is syntactically valid. Want to make a memory leak that crashes any Linux computer? Trivially easy in C (in fact, so easy, youâll do it without realising )
Now, you may think this is a good or a bad thing, depending on your perspective. Itâs freedom that comes with responsibility.
In either case, however, C is a solid fundamental language to know. Itâs high level enough that it is comfy to write big programs in it, unlike assembler, but low level enough that you get direct access to memory. I might be biased in favour of C, because it was the first programming language I learnt, as a child. I find its minimalism to be quite beautiful.
Yo, VScode is fully open source, and freekin amazing.
Best text editor no doubt. Go away Atom.
Vim / emacs boys will be triggered
Oh gawd. F vim. I hate it.
There, I said it.
Spacemacs is pretty good though.
With that i agree, but to me anything that is not microsoft is better
Sublime text, EMACS whatever
I quite like vim, itâs my favourite terminal-based text editor. But when Iâm in the GUI, I really like Kate.
I donât care for emacs, though, too lispy.
But really, text editors are in abundance on Linux. There is something for everyone. If you canât find a text editor you like that runs on Linux, you are the problem, not the text editors.
I actually quite like micro.
basically nano with syntax highlightingâŚ
I use it on my raspberry pi and odroid sbcâs.
Canât get used to the vim keybindings.