I used to program exclusively in C. Now I program primarily in C++. Your videos make me wax nostalgic about my past. I miss the purity and simplicity of C! Great videos.
@kayakMike10003 жыл бұрын
C seems pure because it is so much more simple, I am sure your C++ code is pure also.
@marcosfons3 жыл бұрын
I was always in doubt about how it was done, but I had never really researched it. What a nice video to watch, thank you
@JacobSorber3 жыл бұрын
Glad you enjoyed it!
@fburton83 жыл бұрын
Back in the day (late 1970s) I knew most of the VT52 and VT100 escape codes off by heart when I wrote a 'visual' text editor for use on our PDP-11 terminals. Better than using TECO and later EDT for writing code anyway.
@kayakMike10003 жыл бұрын
Damn dude, you're a fantastic software engineer.
@nomadic-insomniac3 жыл бұрын
Awesome , I've been coding in C for a couple of years now and I still learn something new whenever I visit your channel. Keep up the good work. Stay safe.
@JacobSorber3 жыл бұрын
Thanks! Hopefully, we'll keep learning new things together.
@massimilianogilli11643 жыл бұрын
mind doing a video on event-driven model?
@joseortiz_io3 жыл бұрын
I would love to see this as well!
@JacobSorber3 жыл бұрын
Yeah, it's been on my list for a while. For some reason, some ideas take more fiddling than others. It'll show up one of these weeks.
@joseortiz_io3 жыл бұрын
@@JacobSorber Yeah I'd definitely love to see this. I've been working on a microservice architecture and one issue I'm dealing with is implementing CQRS for updating views. And that requires an event-driven model. I thought about using gRPC for that but I'd like to know all other options
@butchdean3 жыл бұрын
This was one of your most excellent videos ever! Progress bars have been making me feel lacking for years! haha. Thank you!
@JacobSorber3 жыл бұрын
You're welcome!
@vitacell13 жыл бұрын
I love C, and your videos about it.
@JacobSorber3 жыл бұрын
Thanks. Glad you're enjoying them.
@Arnau_0_02 жыл бұрын
I had a lot of problems understanding ESC characters but you made it all clear to me. Thanks!!
@redcrafterlppa3033 жыл бұрын
I was recently making some terminal related lerning libraries and moving the cursor using ansi was something I was overcomplicating. This video really helped me understanding ansi better.
@stackoverflow21553 жыл бұрын
I really like your tutorials. They cover C, and how people can use it well.
@oblivionronin Жыл бұрын
I started to research this after i saw the output of docker build, tought it was so cool, like how do i get this into my program ?! I knew it wasnt curses, glad to see its fairly simple. Great video, thanks !
@zedespook3 жыл бұрын
Can you do a video about #pragma once vs. header guards?
@edenr19883 жыл бұрын
Thanks a lot! couldn't find a better explanation anywhere else than in your video! 👍
@JacobSorber3 жыл бұрын
You're welcome! Glad it helped.
@praenubilus19803 жыл бұрын
Please make more videos like this one
@gaganb3 жыл бұрын
A video about namespaces would be great to see!
@TheKelor3 жыл бұрын
This was *exactly* what I was searching for :o really ty :D
@JacobSorber3 жыл бұрын
Welcome. Glad I could help.
@ahmadj10643 жыл бұрын
Hey jacob, really really love your stuff. Can you make a video on strings in general in c? I have a hard time with strings and would really like a video on string manipulation
@JacobSorber3 жыл бұрын
Yeah, probably. Are there specific things about strings that are messing you up?
@mah4i3 жыл бұрын
While i was watching this video ,i noticed that most of icons in KZbin page changed from almost 1 minute ago. well, that's weird. Also love your videos man , i like people who respect C :D
@JacobSorber3 жыл бұрын
Thanks. Not sure what was happening with the icons, but I'm glad you're enjoying the videos.
@abdus-salam3 жыл бұрын
can you help to understand by example of old fashion terminal dashboard with dynamically updating values?. i.e gpsd do
@oj00243 жыл бұрын
Can you link some ANSI control sequence documentation? Whenever I need to use them, I end up using some random site that has like three to four escape sequences, which is really annoying. Is there a reference with an exhaustive list of all the standard ones?
@JacobSorber3 жыл бұрын
I typically use the wikipedia page (en.wikipedia.org/wiki/ANSI_escape_code). It also has links to more official docs down at the bottom.
@ukaszdrukaa83263 жыл бұрын
The xterm documentation is one of the de facto standards for terminal escape sequences; you can search for "xterm sequences" and you'll find it, granted it's lengthy and technical. It's also worth mentioning that not all terminals support all sequences, and that's why the terminfo library (that ncurses uses) exists. You can use it to see if the terminal supports a sequence and if not, then you can avoid using it. (terminals can really get upset when they receive broken or unknown escape sequences) Aaand I'll also allow myself to shill Notcurses. It's an awesome terminal graphics library, more powerful and modern than ncurses is.
@JohnHollowell3 жыл бұрын
Now I know what all the cryptic stuff in my shell prompt variable (PS1) means and why they give me different colors and text formats, thanks!
@agustinranieri3 жыл бұрын
Love your videos! How about making a selection menu?
@JacobSorber3 жыл бұрын
Yeah, we could do that. I'll add it to the list.
@udhayakumar82593 жыл бұрын
Hi ,jacob can you explain fcntl- (fille control in unix ) record locking features in Unix
@JacobSorber3 жыл бұрын
I'll add it to the list, and see what I can do in a future video. Thanks.
@udhayakumar82593 жыл бұрын
@@JacobSorber thank you jacob awesome.
@EpiKaoZ2 жыл бұрын
Why you didnt need to use mutexes? isnt It unsafe to access progress from diferent threads?
@thebigmacd Жыл бұрын
None of the threads are writing to the same memory location, so there is no conflict.
@storkmobile74323 жыл бұрын
Jacob, Nice videos to watch and to learn c from a profession. May I ask for a reqest. Maybe one step behind mulity threading, MPI (message pasing interface, executing parallel programs on different computers. I'm interested in how to use it in practice. Thanks Ben
@JacobSorber3 жыл бұрын
An MPI tutorial could be fun. I'll see what I can do. Thanks.
@Cwmwd243 жыл бұрын
Why not use "\e" for the ESC character?
@benjaminshinar95093 жыл бұрын
really cool! how does the format know you meant \033 and not null terminator ('\0') followed by 33 without spaces? great video as usual, I'm always learnning new things.
@JacobSorber3 жыл бұрын
Thanks. Octal escape sequences have 1-3 digits (octits), and the sequence ends when you either run into a non digit or you finish with 3 digits. So, "\0003" would be NULL character followed by '3' and \03 would be the character with value 3.
@Scotty-vs4lf Жыл бұрын
@@JacobSorber what if u used hex instead of octal
@guifes103 жыл бұрын
Is this supposed to work on a windows terminal as well? or just unix?
@therealchonk3 жыл бұрын
Can't you just use '\b' for backspace?
@JacobSorber3 жыл бұрын
Good point. Yes, you can. I was just looking through the CSI docs and so I ended up using that one.
@edgarbonet12 жыл бұрын
Indeed. For the record, when you hit the backspace key on a terminal operating in canonical mode, the terminal driver echoes "\b \b", meaning: move back one cell, overwrite with a space, move back again.
@airbus57173 жыл бұрын
can u make a video recommending other Yt channels that produce C content
@pro-nav3 жыл бұрын
So you are saying I can make ASCII games for a terminal without using windows.h? Excellent, right when I needed it.
@b4ttlemast0r2 жыл бұрын
the arrowhead overwrites the initial [ too
@winter09123 жыл бұрын
Just wanna point out that in real world you have to use some synchronization mechanism (mutexes / atomic variables) while updating and reading progress, otherwise it's data race, so undefined behaviour
@winter09123 жыл бұрын
Well, it of cource depends on the architecture, for example not synchronizing it on x86 is *probably* ok, you won't see half-updated int. But you should always pay attention to this kind of details.
@XenoTravis3 жыл бұрын
Why do people say avoid using sleep functions? I can't ever seem to find a good answer or alternative. I imagine it isn't that big of a deal with modern computing
@JacobSorber3 жыл бұрын
First off, you always want to be careful with this sort of advice. Such a broad recommendation is bound to be wrong at least some of the time. That said, there are a bunch of different reasons someone might say that. In embedded systems, we avoid *some* sleep functions (like __delay_cycles on the MSP430s) because they can keep the CPU active and may not properly utilize low power modes. Others do, and...so, no worries. Depending on what you're trying to do, sleep functions are often a bit clunky. They are often uninterpretable. They aren't guaranteed to wait for the amount of time you asked them to. So, you often have more efficient and responsive ways to wait for things - like condition variables, mutexes, timers, events, etc. For the example in this video, I didn't really care about any of that. I just didn't want to be constantly burning CPU cycles.
@XenoTravis3 жыл бұрын
@@JacobSorber well now I got some investigation to do! Thanks for the info!
@Victor_Marius2 жыл бұрын
@@JacobSorber i think on arduino, using the delay functions it doesn't work well with some timing libs (for alarms, timeouts and intervals) and maybe another thing is that you can not use it on interrupts.
@Victor_Marius2 жыл бұрын
Does it work in windows? I tried these escape sequences in CMD (but in python) and \033[5F doesn't appear to work. I used \033[5A instead.
@Starwort2 жыл бұрын
cmd and powershell do not support ANSI natively afaik, but Windows Terminal does, or you can use the colorama library to polyfill it (colorama.init() sets up your terminal to use ANSI, and the library also contains some shortcuts)
@Victor_Marius2 жыл бұрын
@@Starwort I'm pretty sure I used colorama.init in CMD and there are some escape sequences that don't work even though they are on the Microsoft developer website
@Starwort2 жыл бұрын
@@Victor_Marius weird; were you using the colorama tools or ANSI escapes directly? If the latter, you may have messed up the parameters to init?
@v3spirit3 жыл бұрын
multiple progress in the bars terminal?
@kodref3 жыл бұрын
ESC CSI NUMTHREADS PREVIOUSLINE
@sonymusicproducer87118 ай бұрын
😘
@lifesoftserv3 жыл бұрын
Really like your channel. Would like to see your thoughts on a build system, if you are interested in looking it is called "qo" and it is on github from andlabs/qo . Thanks and keep up the good work :)