Renan
Compilation steps of (some) modern programming languages: High level code » C code » Assembly » Binary
Pavel
Compilation steps of (some) modern programming languages: High level code » C code » Assembly » Binary
Assembly is the extra step here. But that can be a good idea for some newly created language to cross compile into C/C++ because C/C++ compilers are damn good at optimizations. Wonder how many languages actually do that.
Renan
Compilation steps of (some) modern programming languages: High level code » C code » Assembly » Binary
So, that is why they say: If you can not code it in assembly then it can not be coded. 🤔
Renan
So, that is why they say: If you can not code it in assembly then it can not be coded. 🤔
Then why people are not coding modern applications using just assembly language then?! 🤔 There are some valid reasons: 1. Not portable. Write once, rewrite forever. 2. Development time. As an example, writing a simple mathematical equation in a high level language takes some seconds, doing the same in assembly you will take minutes. 3. Bug prone. The slightest detail you get wrong and your code will not run as intended, it will assemble fine though. And these are just a few (valid) reasons most people are not writing modern applications purely in assembly language nowadays. 🙂
olli
why not mov ? writing to memory to read from it again seems inefficient. the isa seems inconsistent as well... add seems to use registers where as div provided the value to be divided (?)
su
Mark Hi
Anonymous
Hi guy's
Anonymous
Pls I have a question
Dima
read the rules first
Anonymous
Pls where are them
Anonymous
@dima Hy
Anonymous
Any programmer here working on a project?
Alex
why its output is 1 2 3
That means the local auto variable "sum" uses the same stack location for every each loop. The initial value of "sum" can be any random number in a normal system.
Alex
Or the sum is compiled as a register (after optimization, most likely)
olli
why its output is 1 2 3
Undefined behavior, could be whatever, please compile with warnings enabled
olli
This depends on the architecture, anyway you usually provide the register you divide by not the one to be divided Also when it comes to constants, you can move them to registers while you have them
olli
That was a wild guess, hence the initial (?) because you specified the dividend
Anonymous
I am having some errors in my C code... In graphics.h, I first initialized the graphics and then tried this function: initwindow(100, 100, "Hello World"); But this gave an error of graphics.h dont have a function initwindow?
Anonymous
Then how do I make graphics??
Anonymous
Any other library??
V01D
Any other library??
OpenGL (SDL), Vulkan, etc
V01D
Note that SDL is based off of OpenGL, and tailored towards 2D game development.
ɴꙩᴍᴀᴅ
ncurses
Vlad
ncurses
ncurses is for terminal gfx
Vlad
SDL or SFML is a lot more robust in that regard
V01D
SDL or SFML is a lot more robust in that regard
SFML is looked down upon because of the terrible community
Francisco
SFML is looked down upon because of the terrible community
I disagree. The discord channel is super friendly
kartik
Anyone using vscode
kartik
Any one using visual studio code
V01D
Me, why?
kartik
Any one using visual studio code
Need to help to setup on windows 10
kartik
Getting erro
kartik
During execution
kartik
Anyone help here
V01D
During execution
Need the error details
V01D
Did you download vs code for 32 or 64 bit / does it comply with your architecture
kartik
Any one via screen sharing
kartik
Any one via screen sharing
Ping me if you help me for setup visual studio for c
V01D
Any one via screen sharing
Share errors via pastebin or similar server
kartik
Let me paste
V01D
Ping me if you help me for setup visual studio for c
You just have to install a plugin for C support
kartik
Getch error
V01D
Getch error
I need some more context
V01D
What were you doing when this occured
Harsha [M]
You just have to install a plugin for C support
Do you know why vs stucks even on high end laptops
V01D
Do you know why vs stucks even on high end laptops
Nope, cuz I used vscode since ever and it worked like a charm
Harsh
Even works fine on my 2GB 1.86GHz dual core
kartik
Okay
Marián
class, abstract class, interface, enum… what is some kind of „term“ that groups all these words? I’ve got it on my tongue but can’t hella remember, i need it to name my variable properly 😄
Marián
naaaah
Marián
it’s not object, blueprint, datastructure…i have different word in the back of my mind
Marián
not a C++ question xd sry for that
Anonymous
Read about what macros are in the internet
Anonymous
So?
Anonymous
Macros are not callable
Anonymous
They are not called that way
Anonymous
I call them "shit code"
Anonymous
Read C++ core guidelines' section about macros
Alex
cause in the place Macro is called we get simple substitution Macro body(instead of actual call like function)
Anonymous
Read C++ core guidelines' section about macros
Oh there's no section about macros
Anonymous
I don't think that read outdated literature is good for you education
Anonymous
Using macros to write inline function considered bad practice even in C since C11
Harsh
Inline substitution they mean maybe?
Harsh
Not like vars ofcourse
Anonymous
You already git an answer https://t.me/programminginc/327403
Harsh
You already git an answer https://t.me/programminginc/327403
Just to clear my doubt, Then inline functions are also not good?
Anonymous
Using macros is a bad practice for making inline functions