Joesph
Trust me I have been through all of this Indian shit(I am one)
Joesph
The curiosity to learn,the curiosity to do things, the curiosity to make something
Joesph
This is study once you pin point your goal all is left is learning
Joesph
Tell me anyone in college told you about gnu tools,de,Linux kernel?
Joesph
The answer is no
Joesph
And I do know about the things and I don't follow indian college shit I am way more beyond what they are teaching me at college I am just there for degree but I got knowledge more than that
Joesph
Rest info @K11M1
klimi
Greatings traveller
Anonymous
The answer is no
Don't be so sure :)
I've had a class on Operating Systems which covered basics of Linux, Windows
I know a master's program that covers how Linux works, Linux kernel, etc as one of classes
Joesph
Joesph
Linux kernel?
Joesph
These are the things I learned when I was 12
Anonymous
Joesph
Mateo
The answer is accept the truth
To be a respectable person you need to know when to be arrogant and when to be humble, you aren't going anywhere being arrogant here
Joesph
So yes let me be arrogant
Joesph
int 0×80
🅼🅴🅳
Hi programmers
Noble Friend
Hi. Welcome
Anonymous
Hii
Foxner
Hi. Is it possible to push to and pop from the call stack directly in C++?
Mar!o
Use inline assembly
...
Use inline assembly
why would you do this? there are no to little cases where this makes sense for problem above
Mar!o
Because you can push and pop to the callstack directly using asm thats what he wanted
Mar!o
But its not the best solution okay...
...
this is correct, but if you push / pop something you want to accomplish something, eg. calling a function
...
and in 99% of the cases, no compiler will generate a crazy custom calling convention where this is necesarry
Mar!o
Yep thats right. But still sometimes asm has its uses especially with naked functions for drivers etc..
Ибраги́м
Tom missed ur messages, got purged.
Tom
Sorry, I'll add this part. And U could find something useful for making connections on https://github.com/an-tao/drogon/wiki/08.1-DataBase-DbClient
Anonymous
Please
klimi
hm?
Ak
👍
Tom
In drogon, all connections are managed in DbClient, you can think of DbClient object as a connection pool.
Ибраги́м
Tom
you could set password in the connInfo argument.
Ибраги́м
It's common design methodology
Ибраги́м
One Client, multiple conn.
Tom
Or create the DbClient in configuration file, see https://github.com/an-tao/drogon/wiki/10-Configuration-file#db_clients
Ибраги́м
Ибраги́м
Ибраги́м
pass='' or password=''
Tom
auto clientPtr = DbClient::newPgClient(
"host=127.0.0.1 port=5432 dbname=postgres user=postgres password=xxx", 1);
Ибраги́м
shite, passwd ?
Tom
This is an non-blocking method.
Tom
This means that it cannot be used immediately after creation.
Tom
It takes some time to create the connection to database.
Ибраги́м
Shit, u are right.
Tom
and if you use the Sync method of it, please use try-catch
Ибраги́м
std::this_thread::sleep_for(3s);
try
{
auto result = sql->execSqlSync("SELECT * FROM log"); // Block until we get the result or catch the exception;
Ибраги́м
Tom
yes
Ибраги́м
U shall be judged for this!
Tom
almost all methods in drogon are non-blocking.
Tom
Yes, this is a good idea, but when DbClient is created at the beginning of the application and used throughout its lifecycle, the callback is not very necessary.
Ибраги́м
Ибраги́м
Ибраги́м
But the interface is quite strange compared to http etc.
Tom
Thanks, I'll think about this.
Ибраги́м
Thanks, I'll think about this.
If I have time, I will help look into the lib more.
It's been a while I've seen a quite usable C++ net lib like this with great performance and fast compilation times.
Tom
Tom
👍
Tom
I will try to be online in the future.
Foxner
Use inline assembly
I'd like to write a function that stores the frame of the calling function, then "returns" from both the current and the calling function, so that I can later enter the "calling" function at the same position and load the stored frame onto the stack. That way I could easily create generator functions that I'd mainly use for coroutines. Is assembly the only way to implement that? I was hoping for a more portable solution.
Angelo
if the condition in the if statement is true it means it's egual to 0 ?
I'm confused, If I call a function like strcmp(string a,string b) and use put it in an if statement, if the strings match means that function will return 0 and so it's true, but for the if a condition is true when it's unequal to 0, why it's confusing?
So the proper way to do it is if(!strcmp(a,b))
Pavel
Angelo
yeah but, strcmp returns 0 when the strings matches but the if works contrary
Pavel
strcmp returns 0 for equal strings, yes?
then if (strcmp(str1, str2)) {...} else {...} should go to the else block if str1 and str2 are equal.
Pavel
do you experience a different behavior?