Paulo
Also, UFMG university in Brazil has a nice laboratory on compilers, maybe they have a good C++ course and other
I'll look into this, maybe I can found more articles about this kind of topic. this page has a lot of good information and it is helping me a lot. https://www.linkedin.com/company/meeting-cpp/
Danya🔥
And open courses of MIT and other top universities on operating systems, computer science and computer architecture
Danya🔥
I thought MIT ended his C++ course.
It doesn't make much sense to learn only C++, there are other topics that are as important
Paulo
Yes, I understand you, my problem is understand when standard library data structures use move semantics.
GOPA
C++ Move Semantics - The Complete Guide (2022) (Nicolai M. Josuttis)
GOPA
The section 3 is what you should look into in this book
Adeyemo
void deleteLast() { if (length == 0) { cout << "Nothing to delete" << endl; return; }; Node *temp = tail; cout << "deleting the node: " << temp->value << endl; if (length == 1) { head = nullptr; tail = nullptr; } else { temp->prev = tail; tail->next = nullptr; cout << tail->value; } delete temp; length--; }
Adeyemo
Please what is wrong with my delete last method from a doubly linked list
Adeyemo
I got it already thanks
Kanhhaaaaaaaa
I have a dos box application
Dima
wtf lmao
Kanhhaaaaaaaa
F
Wht
Kanhhaaaaaaaa
Dos box application link
Kanhhaaaaaaaa
Application of c language in PC
Kanhhaaaaaaaa
Hlw
Kanhhaaaaaaaa
🙄
MᏫᎻᎯᎷᎷᎬᎠ
I want to deepen my understanding of the type_traits library and the types requirements thing cppreference is good but it's too verbose(being a reference after all) I want to understand why and when to use those components inside the library and the reasoning and logical thinking behind deciding that my foo() should accept only std::is_X_v and alike I'm kinda familiar with the library and how many of its components are implemented(compiler built-in functions, specialisation tricks ..etc) but I feel like I'm missing the practical side Anyway to accomplish that?
\Device\NUL
I thought DOS is dead bruh
\Device\NUL
Plus there's no use to learn DOS assembly
imminent
x86 is still used today
\Device\NUL
x86 is still used today
DOS is 16 bit, not 32 bit
\Device\NUL
Even i386 will be dropped later, x86-64 is the newest
\Device\NUL
There's no segmentation on x64 and also its calling convention is different with x86
\Device\NUL
I highly doubt DOS assembly used nowdays, ancient OS and arch
\Device\NUL
sure it's used :)
Give me the use case then
akaWolf
Give me the use case then
github.com/akaWolf/LostVikings
\Device\NUL
github.com/akaWolf/LostVikings
Well then, how it can be applicable to modern OS and arch?
akaWolf
Well then, how it can be applicable to modern OS and arch?
you can write in a DOS assembly under modern OS if you want :)
\Device\NUL
you can write in a DOS assembly under modern OS if you want :)
I said how it can be useful under modern OS
akaWolf
I said how it can be useful under modern OS
well, one use case I give you - reversing legacy soft
\Device\NUL
akaWolf
Do DOS malware still exist nowdays?
I don't know, I'm reversing the game
\Device\NUL
I don't know, I'm reversing the game
Sorry if I'm rude but have you learn about modern OS assembly like Linux or Windows ?
\Device\NUL
legacy mode will eventually die later
\Device\NUL
Even DOS ABI like Pascal or Watcom isn't used either, now every Windows program use x64 Calling ABI. No more thousands of calling convention
akaWolf
legacy mode will eventually die later
almost, but not for such geeks like me
imminent
Even i386 will be dropped later, x86-64 is the newest
so what the assembly is still valid, and a decent way to learn it
imminent
you still can apply the same principles
\Device\NUL
so what the assembly is still valid, and a decent way to learn it
Anything but don't learn ancient cpu arch or ancient os
\Device\NUL
you still can apply the same principles
Even they're having same concepts the implementation could be differs
imminent
oh no, addressing is a bit different
\Device\NUL
Thankfully no more segmentation on x64
...
Anything but don't learn ancient cpu arch or ancient os
i'd rather teach a beginner 6502 assembly than someone proficient in x86-64 SSE/AVX extensions
imminent
Thankfully no more segmentation on x64
https://en.m.wikipedia.org/wiki/Win32_Thread_Information_Block
\Device\NUL
From my opinion, I learned assembly not to only understand how do computer works. But also applicable on real world
\Device\NUL
imminent
what
imminent
can you rewrite that sentence please?
\Device\NUL
can you rewrite that sentence please?
https://wiki.osdev.org/Segmentation this one
\Device\NUL
general purpose segment is still used today on modern os, stack canary on linux and TEB segment on Windows
\Device\NUL
https://www.andrea-allievi.com/blog/x64-memory-segmentation-is-the-game-over/
imminent
my point is that it's still there, but it works different
...
Which is?
If someone is interested in how a CPU works, you actually should start with something simple. 6502 is perfectly valid for doing that, so is any other hypothetical machine that helps you learn transferrable knowledge. x86-64 is such a clusterfuck of an architecture that it's basically impossible to teach a beginner how to get the most basic stuff done in a decent amount of time without leaving out important details. (and this would still be leaving out performance considerations, which are imo the most important reason one can have to write assembly.)
Manav
There's not much complexity when it comes to concepts. Just a lot of information imo
Manav
If i have to ask, I can't grasp what exactly makes it impossible to teach.
...
I have no experience in teaching but couldn't you use risc-v for processor architecture, things like pipelining etc. And could still teach x86_64 to a beginner. At least the instructions, the operand forms, the calling conventions, etc.
I wouldn't use any specific architecture for stuff like pipelining, but rather explain the general concept, once someone understands this, move to the architecture specific details. Your second point is exactly what i meant by "leaving out important details". (You're basically just doing the same thing, teaching the semantics of the most basic instructions & how they're used. But you're basically leaving out all the ugly parts that distinguish x86-64 from anything reasonable) imo Calling conventions aren't something you should explicitly teach when teaching assembly, let your students look at generated code and let them find the patterns that emerge from calling conventions themselves, if you've done a good enough job at teaching before, they will figure it out on their own.
Manav
So I still do not get what's impossible. Also what is wrong about removing complexity first then adding it later when teaching? How is it different from teaching them 6052 first?
...
So I still do not get what's impossible. Also what is wrong about removing complexity first then adding it later when teaching? How is it different from teaching them 6052 first?
>How is it different from teaching them 6052 first? You're prepared to be able to answer all questions in a simple fashion.
Manav
Take the operand forms as an example, how is that impossible to teach in x86_64?
\Device\NUL
I choose x86-64 because that's applicable and used and nowdays