« first day (1858 days earlier)      last day (1781 days later) » 

1:53 AM
@Stargateur user-space... on the kernel side it sucks a little bit more :|
 
 
1 hour later…
3:10 AM
@Kamiccolo well... windows :p
 
 
2 hours later…
5:10 AM
Hello everyone. I am trying to get alexa on raspberry pi 3b+ play music from youtube. I am using sox and pulseaudio for that. But sox cannot play mp4 files if downloaded as binaries (in docs they say it supports mp4 with optional ffmpeg library). So I think I need to compile it with ffmpeg support. I need some help doing that, please.
 
5:30 AM
"But sox cannot play mp4 files if downloaded as binaries"
do you realize what you said ?
 
 
6 hours later…
11:30 AM
@Stargateur I have even less trust on that :}
@ReFruity sox is only for audio manipulation.
and to extract audio from video files You will need something like ffmpeg or/and avconv
 
 
1 hour later…
12:51 PM
@Stargateur I mean when you download already compiled sox, it cannot play mp4 files
@Kamiccolo No, I already have mp4 extracted file somewhere in the web, I have url, the only thing I need is for sox to play it.
 
sox is not for video.
and mp4 is a container mainly for video.
Technically, it should work only with some additional ffmpeg library hooked on and shit. For that You'll have to dig out it deeper. Particular flags and shit.
 
 
1 hour later…
2:28 PM
halloc meine Freunde
 
 
1 hour later…
3:29 PM
helloc @VioAriton; // :}
 
3:53 PM
what will be output of follwoing program
#include<stdio.h>
int main ()
{
int i = 4, z = 12 ;
if ( i = 5 || z > 50 )
printf ( "\nDean of students affairs" ) ;
else
printf ( "\nDosa" ) ;
}
Priority of > is higher than || and = , why || get preference
 
@user143252 is it? o_0
 
plz run at ur end and confirm
 
@Kamiccolo hey what's poppin
@user143252 you might wanna change = to ==
 
but mcq is given in book as it is
 
well apparently i = 5 evaluates to true
TIL
 
4:03 PM
> "The == (equal to) and != (not equal to) operators are analogous to the relational operators except for their lower precedence."
 
apparently ( i = 5 || 0 ) evaluates to true yet ( 0 || i = 5 ) gives the lvalue error
oh nvm it puts parentheses around ( i = ( 5 || 0 ) ) and this won't work ( ( 0 || i ) = 5 )
 
> "4 Unlike the bitwise | operator, the || operator guarantees left-to-right evaluation; if the second operand is evaluated, there is a sequence point between the evaluations of the first and second operands. If the first operand compares unequal to 0, the second operand is not evaluated."
 
so ( i = 0 || 0 ) evaluates to false
@user143252 your if statement gets evaluated like this ( i = (5 || y > 50 ) ) so y > 50 is trivial bc of 5
 
4:20 PM
what i think if ( (i = 5 || z ) > 50 )
what you say
 
can't be because (i = 5 || z) returns either 1 or 0
and "Dean of students affairs" gets printed
 
i am looking for logical explanation why i am wrong
 
@VioAriton the heck is it supposed to do?
 
clearing my concept how this works
 
@Kamiccolo it just prints stuff
ok, what you don't understand?
 
4:26 PM
What exactly are You trying to do?
 
i want to understand how compiler solve it if ( i = 5 || z > 50 ) using associativity and precedence
set by step
as priority of > is higher than || and ! ,so this > get evaluated first like this if ( (i = 5 || z ) > 50 )
 
@user143252 but what meaning do You think it has?
 
i think i need to start again from basics
thanks for the help
 
@user143252 > doesn't have higher priority
does it say in the book that it does?
 
 
2 hours later…
Look there as this is the ultimate reference with few caveats that can only be experienced
See the notes
 
6:30 PM
@user143252 gcc evaluates your if statement as follows: if ( ( i = ( 5 || y > 20 ) ) )
it doesn't even add the else block in the final code since it can be evaluated at compile time
it basically assigns the value returned by ( 5 || y > 20 ) to the variable i, and then uses the value of i in the if condition
 

« first day (1858 days earlier)      last day (1781 days later) »