Surge.rs
im really confused if that was an insult or not
...
god bless you
Surge.rs
that also just, doesnt make me want to answer your question :P
Ilya
anyone know why make strips debug symbols despite compiling with -ggdb flag?
This flag is only defining the type of debug info to generate. The instruction to generate it is -g, it must be stated separately. And on the link phase you can still remove the debug info by mentioning -s flag, despite the fact it has been generated earlier. So check all this and you'll be fine
Surge.rs
Surge.rs
Check -s.
im using make, and someone is helping me correct it. going to try that first and get back to ya
Avinash
Probably you have floating point arithmetics miracles there, like falling into NaN or infinity. You'll need to check. Why do you use volatile-s their, btw ?
Quite strange... I don't expect floating point problems on changing "<" to "<=" Further.. I tried to debug the program and created a breakpoint at the entry of that function. the program reaches the breakpoint, stops momentarily and dies without any error. I think, multithreading might be creating problem, but... can't find something reasonable.
Avinash
That's cpu specific
You're saying if compiled on one windows machine, it won't work on other ????
Surge.rs
Surge.rs
the issue with the makefile was fixed btw, just got rid of redundancy and compiled with debug flag for everything
Spirit
sha256sum( date in seconds since epoch + nanoseconds * current cpu speed )
Spirit
y would this b bad for random data
Pavel
y would this b bad for random data
Depends how you get these numbers, where you call it and what you're using it for. A bit of reading: http://www.pcg-random.org/posts/cpp-seeding-surprises.html
Pavel
Spirit
If you using it instead a RNG then it's bad
well was thinking i could generate entropy with this
Pavel
well was thinking i could generate entropy with this
This still depends on how/where/why. This can work actually, but you need to test it and compare distributions with some other RNG, at least.
Anonymous
I want to become a coder
Anonymous
But I can't know anything. Anybody help me
Anonymous
From basic to learn
Anonymous
Is any one here
Anonymous
codecamp
Anonymous
From where I learn it
Anonymous
In hindi
klimi
*sigh*
Harsh
From where I learn it
Try Google searching man. YouTube programming tutorials in Hindi. But learn English before programming languages :)
Talula
I really don't understand something, all the higher education in India is in English, so why Indians can't speak proper English?
Maksim
What is embedded software in English?
Sorry, chats in English about embed
Spirit
*sigh*
huehue
klimi
huehue
Huehue lemonbar
Anonymous
Is any one here
Udemy for your help
Karl
Hi guys, how can I make this t shirt using for loop? https://pastebin.com/cZFZNHjh
Karl
This should be the sample run
void
Hewwo Can anyone explain what is the benefit of fixed-size array on stack versus dynamic size memory block (array) in heap? Except possible compiler optimizations * There are no any performance differences: in both cases the cpu just accesses memory; memory consuming isn't heavily different
qwert
memory on stack is already on stack, no dynamic alloc
qwert
I looked some lectures, and one said that changing small vector to array in hot spot made program run 40-70% faster, but this are rare cases
void
Not actually In the case of allocating memory on stack we just need to reduce current stack pointer register, with heap we need to use system calls I wouldn't call it benefit Is there any other benefit?
qwert
any benefits could be measured, i will not assume any, having not so much experience
void
I looked some lectures, and one said that changing small vector to array in hot spot made program run 40-70% faster, but this are rare cases
And I'm talking only about these two cases, not vector: int *heap = malloc(N bytes); int stack[N elements];
Dima
talk about custom allocators
Anonymous
not always
Almost always
void
Allocating memory on a heap costs more than on a stack
That isn't the benefit, that I wanted to know :D I already noticed the stack pointer
Dima
Almost always
you can allocate a big heap and use chucks of it later
Dima
Элвин
Hi
Элвин
I creat a txt file and get information from this file with ifstream . I write in the txt file name of people and their length. I want compare their lenght or choose the bigger one . How can i do ?
Элвин
Help please
klimi
you write the code
Элвин
you write the code
I dont know how can i write code for find the bigger one
Anonymous
Can someone ask a question outside C/C++?
klimi
#ot chat exists for this purpose
Surge.rs
That was fun to watch unfold
数学の恋人
scanf("%d", &g->N); Is this thing ok to do in C?
Surge.rs
scanf("%d", &g->N); Is this thing ok to do in C?
The points to operator is used to dereference and access something. You dont need the address of operator and would just be g->N
pks
Do you know the algorithm for random number generation or can you make one
数学の恋人
g is struct
Surge.rs
But is it struct pointer
数学の恋人
yes
Surge.rs
Oh I'm dumb, is that resolving to the address of N?
Surge.rs
If so then that should be fine
olli
Not actually In the case of allocating memory on stack we just need to reduce current stack pointer register, with heap we need to use system calls I wouldn't call it benefit Is there any other benefit?
Why is this not a benefit? It's hard to predict how much time this system call consumes, hence dynamic allocation are not allowed on safe systems. Additionally heap pages are more likely to be paged out and you might need to synchronize access to heap memory since it's a global resource. Also, you can't leak memory on the stack