Dima
because in the c++ nobodyy cares about python
Dima
Anonymous
Thats like saying you don't need maths in chemistry.
Dima
I can do all that in cxx
Dima
I just dislike python, its horrible syntax and runtime stuff
Dima
anyways
Dima
this is
Dima
#ot
klimi
No
Dima
No
Weaboo
Talula
No
I wanna go to Japan...
MᏫᎻᎯᎷᎷᎬᎠ
Same
What's so special about Japan?
Dima
everything
Dima
#ot pls
MᏫᎻᎯᎷᎷᎬᎠ
Anonymous
thanks..
Dima
welcome
Victor
"undefined behavior" itself is a well-defined term
Dima
^
Roxifλsz 🇱🇹
"undefined behavior" itself is a well-defined term
Quite interesting that such a well defined term refers to the lack of definition
Roxifλsz 🇱🇹
Dima
S.
I don’t like linguists much, nor grammar lawyers 😂
Dima
Some might say that it's @StrangerThanTruth
is it lame advertisement or what ( ͡° ͜ʖ ͡°)
Dima
gg
Dima
subscribed
Sid Sun
It's just something I post some intriguing thoughts
Sid Sun
subscribed
Ooh, nice; thanks 😁
Luis José
Hello guys, I want your opinion to optimize a C code for a small ram microcontroller : I'm receiving commands via UART (strings) that start different functions, I do the comparations with various if statement and strcmp in the main, but when some other function is called I have to check wich command it was again, I think It could be a waste of time compare the string again, or not? What do you think about setting a int flag on the main when the string is compared, and then use that flag as indicator? Another idea I saw is to do switch cases with only the first char of the string (on the auxiliar function ) but I feel insecure about that 🤔 so what do you think?
MᏫᎻᎯᎷᎷᎬᎠ
Wait a minute
MᏫᎻᎯᎷᎷᎬᎠ
#cppbook
MᏫᎻᎯᎷᎷᎬᎠ
Whaa!!
Dima
MᏫᎻᎯᎷᎷᎬᎠ
So I'm right xD
Dima
it’s the secret now ( ͡° ͜ʖ ͡°)
Manas
Hi
Manas
Buddies hope so you all are fine
Luis José
Any minimum sample code? It could help us better understand your requirements I guess.
char en1 [] = "fast"; char en2 [] = "slow"; char wk [] = "wakeup"; void ADC_ready(void) { // here i have to know what command it was executed // this is a special function that will automatic trigger by hardware // it will enter here every 58.8uS as required by my final purpose } void main(void) { set_tris_b(0b01111111); setup_port_a( AN0_AN1_AN3 ); setup_adc(ADC_CLOCK_DIV_32); set_adc_channel( 0 ); delay_us(20); setup_timer_1( T1_INTERNAL | T1_DIV_BY_2 ); setup_ccp2( CCP_COMPARE_RESET_TIMER ); CCP_2=147; enable_interrupts( INT_AD ); enable_interrupts( GLOBAL ); while (TRUE) { menu(); } } void menu() { char input_str[10]; gets(input_str); if (!strcmp(input_str,wk)) { printf("OK"); gets(input_str); if (!strcmp(input_str,en1)) fast(); if (!strcmp(input_str,en2)) slow(); } }
BinaryByter
if you dont need a lot of it, just use a switch on the first char
BinaryByter
switch is fast
BinaryByter
very fast
MᏫᎻᎯᎷᎷᎬᎠ
it’s the secret now ( ͡° ͜ʖ ͡°)
Arrgh I'ma download every book here It's all on you :P
Anonymous
/notes
Anonymous
#freeprogrammingbooks
Luis José
if you dont need a lot of it, just use a switch on the first char
I see , then, should i keep the if statements and strcmp on the menu() ? to be congruent in general
Luis José
it feels weird doing different kind of comparasions in differents functions for the same command
Narendra
django what is that link?
Nice project for safe driving
BinaryByter
I see , then, should i keep the if statements and strcmp on the menu() ? to be congruent in general
Depends on what you want, but dont go for "congruency" for stuff that is unrelated
BinaryByter
+ here you can gain perf
Jrks
/rules
Nicola
Hi guys, I must buy a new notebook but I don't know which is the better between i5 8250u and ryzen 5 2500u?
Anonymous
Move that to OT please
Nicola
OK thanks
Anonymous
Hello guys! Is there anyone can help me to compile one source code on armeabi, armeabiv7 and x86 formats? I am unable to do it via Linux.
Anonymous
.so output
Anonymous
for using on Android Studio as a library
Mat
I read an output
Mat
What are you trying to achieve?
Mat
Oh, runtime
Anonymous
WTF?
Dima
what?
Gabriel
Wtf
Mat
Pastebin or similar, thanks
Mat
Pinned message should have something
Roxifλsz 🇱🇹
Hmmm
Dima
I heard of a pose called 69
Prometheus
Dima
That’s a myth
you like 42?
Prometheus
you like 42?
I like nothing. Pretty much just tolerate things.
Dima
I like nothing. Pretty much just tolerate things.
must be the pure energy concentrated inside
Dima
nofap all time