« first day (690 days earlier)      last day (4254 days later) » 

7:00 PM
What about it?
 
Yeah, what's the matter?
 
Oh... linked to the answer
 
A mod once did PHP?
 
> How can I check if a number $num is negative?
/\ this
Look at it
 
Oh. Wellllll
 
7:01 PM
LOOK AT IT!
 
@LuchianGrigore It's PHP, man.
 
That's true, there could be some setting in php.ini that screws up comparison...
What am I talking about... there probably is
 
I heard <?php is UB.
 
I heard everything is UB in PHP...
 
Hi, why am I allowed to use the 'pair' data type without specifically including the <utility> header?
 
7:03 PM
@EtiennedeMartel Wtf? The behavior is very well defined as "whatever the Zend engine chooses to do" :P
 
@jrand You're lucky.
 
@jrand you're including it indirectly
 
@LuchianGrigore Web -2.0: powered by PHP!
 
If you're looking for a quick laugh, go to the reversal badge & check out the questions
 
7:04 PM
g++ with -Wall ... no other headers included
except <iostream>
 
@jrand ah, there you go :P
@jrand can you still use it if you remove iostream?
 
@LuchianGrigore The actually funny part is the deleted answer ^^
 
@LuchianGrigore No.
 
I think everyone here can vouch that me being pissed involves being a lot nastier
 
@jrand which means....???
 
7:06 PM
0
Q: FTP live streaming for iPhone

ravitejreddygi want to prepare an iPhone app.A live stream will be coming for a moving camera(assume as a portable webcam) and i need to stream that live video to iPhone using FTP(assume we dont have internet in that area). guys i need this urgently. any sort of help is appreciated.

Erm.
Read that. Carefully.
 
@LuchianGrigore No conclusions can be drawn.
 
I’m getting high of the O2.
 
@jrand I'll give you a hint
 
> assume we dont have internet in that area
2
lolwot
 
7:07 PM
Also, streaming over FTP seems weird.
 
@LuchianGrigore iostream includes utility header?
 
@DeadMG Snarky comment launched.
 
@DeadMG Frequently nastier than that even when seemingly in a good mood.
 
Xeo
@jrand Or where-ever pair is defined.
 
@DeadMG Also, I'm tempted to flag your answer as "not an answer".
 
7:07 PM
@jrand in your implementation, yes.
 
@JerryCoffin Having people ask questions in here tends to end the relatively good mood.
 
@DeadMG lol your answer. :D
 
I mean, is it so hard to find the giant "ASK" button?
 
Guys, you can get data from LANs without the Internet.
 
@DeadMG Now why would that be? (Sorry, just couldn't resist).
 
7:08 PM
@EtiennedeMartel Well, you're just trying to piss me off, so go ahead. I don't really care.
 
I see.. thanks!
 
@R.MartinhoFernandes well, yes
 
@R.MartinhoFernandes I don't believe that iPhone supports that.
 
@DeadMG You can connect to any IP. If you're connected on a Wi-Fi, it works.
 
@DeadMG Wi-Fi?
 
Xeo
7:09 PM
@DeadMG It sure supports connecting to a WLAN without internet access.
 
This is not rocket science, man.
 
well, that's just "We have internet but over a different medium of connection"
 
@DeadMG I'm not trying to piss you off. But that should have been a comment.
 
Should be a comment, but fuck it. Have an upvote. — daknøk 1 min ago
 
@DeadMG Oh, there you go redefining words again :P The Internet is a global system. (or a prize in some parts of the web).
 
7:10 PM
Oh no somebody said “fuck” i must stop him now by flagging comment so he gets suspended.
 
@EtiennedeMartel Really? Because you know I really value my privacy, and it's my observation that you only make reference to my real name when attempting to piss me off.
 
Aaaand it’s gone. T_T
Immature assholes on SO.
 
Seriously? Flagging is going on?
 
@Chimera On SO proper, my comment got removed for no reason.
 
7:11 PM
@R.MartinhoFernandes Right. But if he's trying to connect to a server connected by WiFi, why would it matter if he didn't have Interwebs?
 
@EtiennedeMartel That is a bit over the line, man.
 
@daknøk Link?
 
Oh. Yeah, indeed.
 
1 min ago, by daknøk
Should be a comment, but fuck it. Have an upvote. — daknøk 1 min ago
 
@DeadMG I have no idea. I was a bit baffled by the "streaming over FTP" part.
 
7:11 PM
@R.MartinhoFernandes Can you bin that?
 
Dear Stack Overflow, if you are scared of the word “fuck”, why don’t you just fucking block comments that contain the word “fuck”? I mean, it would spare so much time.
3
 
I'm gone for five minutes and it's like civil war has broken out here
 
@EtiennedeMartel I'll let the puppy decide. I don't know if singling it out into the bin helps.
 
@DeadMG my answer's doing better :P
 
Xeo
1 message moved to bin
 
7:12 PM
@LuchianGrigore Don't really mind :P
 
Sorry about that, @DeadMG.
 
I accept.
 
Omg, that has become an epic thread.
 
s/became/become/
 
Seriously, just close the question as NARQ already.
 
7:13 PM
@daknøk s/that has/I
 
> guys i need this urgently. any sort of help is appreciated.
 
@R.MartinhoFernandes Yeah. I honestly didn't really notice that after the whole "Trying to stream without Interwebs" thing.
 
Damn it! I was just adding my own answer!
 
@Chimera what's wrong, don't know HTML? JS?
 
7:18 PM
@Chimera What, Inb4 the close?
 
@LuchianGrigore I was attempting to add an answer to the iPhone no internet question when it got closed.
@DeadMG yes
 
@Chimera I got that. My question still stands :P
 
@LuchianGrigore What? I'm not following you.
I was pointing at that @LuchianGrigore had the right answer, but to be sure that the SwallowServer for iPhone was installed. And that it could be found on github.
 
@Chimera you can still add an answer after the question closes. There's no server-side check (at least for the first minutes). Just enable the button...
 
@daknøk Because it would simply end up with people writing "f_ck" instead? Word filters are stupid and a broken solution from the start.
 
7:20 PM
Then just accept it.
 
@LuchianGrigore Lol ok......
 
If you get offended just because somebody said “fuck it”, you don’t deserve access to the Internet anyway…
 
@daknøk Fucking right you are sir!
 
@LuchianGrigore Obviously he needs this: tools.ietf.org/rfc/rfc1149.txt
2
 
In computer networking, IP over Avian Carriers (IPoAC) is a proposal to carry Internet Protocol (IP) traffic by birds such as homing pigeons. IP over Avian Carriers was initially described in RFC 1149, a Request for Comments (RFC) issued by the Internet Engineering Task Force (IETF) written by D. Waitzman and released on 1 April 1990. It is one of several April Fools' Day RFCs. Waitzman described an improvement of his protocol in RFC 2549, IP over Avian Carriers with Quality of Service (1 April 1999). Later, in RFC 6214 released on 1 April 2011, and 13 years after the introduction of IPv...
@EtiennedeMartel also, I disagree with "low throughput"
 
7:22 PM
Flying hard drives on a plane has more bandwidth that sending the data over the Atlantic.
 
Really? How many hard drives/capacity would it take?
 
wrong post...
 
@LucDanton A Boeing 747 from San Francisco to London has a bandwidth of 222 Mbps or something (and it's a near perfect bandwidth, with a very low packet loss rate :P).
 
@LuchianGrigore nice
 
7:26 PM
@R.MartinhoFernandes If you fill it to the brim (do planes have brims?) with memory?
 
> Never underestimate the bandwidth of a station wagon full of tapes hurtling down the highway.
 
@Chimera I don't abuse it, but if I spend 10-15 minutes on an answer I'd hate to let it go to waste....
 
@LucDanton Oh wait, I got that wrong. That's the bandwidth for a 1TB drive aboard a Boeing 747.
I don't have the math for a full one.
 
Xeo
@Xeo: It was meant somewhat tongue-in-cheek. I do appreciate the finesse of the solution. I was just amused at how big a solution the deceptively simple desire to initialize X had precipitated :-) — Kerrek SB 1 min ago
 
When I first thought of integrating, I thought you meant calculus.
 
Xeo
7:28 PM
Wasn't C++ all about deceptively simple things?
 
Kinda disappointed
 
sorry all, disturb you. I just wanna ask this question codereview.stackexchange.com/users/16224/engineering2008
anybody can help me to solve it?
 
@EtiennedeMartel could still be an internet.
 
@engineering2008 you linked to your profile lol
 
Wrong place to ask, I'd say.
 
7:29 PM
I/O is all about being deceptively simple, isn't it?
 
@engineering2008 let the people on codereview help you. You obviously like them better...
 
ouh oke, thanks for you suggestion
:)
 
@engineering2008 Mistaking your profile for a question sounds like the sort of thing you need other expertise to solve -- a psychologist might be a better choice.
 
@engineering2008 kidding... but srsly, this is the C++ lounge
 
Also this is the C++ room. Not the Matlab room.
 
7:30 PM
@JerryCoffin that was uncalled for :))
 
@Xeo Hah, that's funny. I went over how I implemented my own version of checking that a type is stream extractable and I simply decided that they would use a constructor taking std::istream&. So no SFINAE and the solution is somewhat compact.
 
@LucDanton A Boeing 747 has a total cargo capacity of 161.5 cubic metres. That's a lot of hard drives :P
 
@LuchianGrigore I'll admit it: I'm evil.
 
@R.MartinhoFernandes It is! Wouldn't have expected just the one 1TB drive to be competitive already though.
 
@R.MartinhoFernandes @LucDanton that's got nothing on (kinda NSFW) makeuseof.com/tech-fun/…
 
Xeo
7:32 PM
@LucDanton Yeah, pondered about that too in one answer I think. Lemme dig it up.
 
@R.MartinhoFernandes Another interesting tidbit: a friend of mine showed that in the long term, the price of mass storage has been nearly constant at $250US per pound. Most of what we've changed is the number of bits per pound.
@LucDanton Considering the number of laptops on a typical 747, its being competitive isn't just potential either.
@LuchianGrigore But basically mistaken, because that's mostly a lot of duplicates of the same information.
 
@JerryCoffin well, that's like saying the drives would be duplicates of the same information (1s and 0s)
Not really the same...
 
Xeo
I just noticed that struct X{ X(std::string){} }; X f(){ std::string s; return s; } will not cause an automatic move of s :(
 
Indeedy.
Make it return { std::move(s) }; if you're worried that in the future you might rewrite std::move(s) to just s.
 
@LuchianGrigore Yes, but there's virtually nothing unique to an individual spermatozoa. Any son of mine is still going to be human, not a frog (and as I recall, even the difference between human and frog is only something like 1% at the DNA level). Hmm...maybe that's what she meant about "...you're not a prince at all!"
 
7:39 PM
If the constructor is explicit, well that's more annoying.
 
@Xeo Wut, rly?
i thought that automatic move applied to any local variable.
 
Xeo
@DeadMG automatic move is only applied when the variable is eligible for copy elision
and copy elision is only applied if the function return type is the same (cv-unqalified) as the local variable in question
 
huh
that's le suck.
by the way
why does the Standard define so many restrictions on copy ellision?
 
Because C++.
 
I'd have thought they'd be fine with it occurring every'fuckin'where
 
Xeo
7:46 PM
@DeadMG I'd rather ask why it defines that automatic move only happens when copy elision may be applied..
It makes no fucking sense.
U f(){ X x; x.y = ...; return x.y; /* no move */}
 
probably to avoid duplicating the rules
y'know, DRY and such.
 
Xeo
"If return expression refers to name of automatic object or subobject thereof, move"
 
"If return expression refers to any object of automatic storage duration due to be destructed upon exit of function, then move."
 
Xeo
Err, the "due to be blabla" is redundant, isn't it?
"automatic storage duration" already implies that
 
void f() { std::string x; auto lam = [&] { return x; }; }
 
Xeo
7:49 PM
ehm
 
codeslapped
 
Xeo
and no, "refers to any object of ..." doesn't work. X f(X& x){ return x; } void g(){ X x; f(x); } would move the x in g through f
 
Puppy
 
no, because you'd be moving the reference, not the object.
@ManofOneWay woof
 
Good puppy
 
7:52 PM
@DeadMG I believe you'd want to write that as: "If the return expression refers to an xvalue..."
 
@JerryCoffin Isn't the whole point of automatic move that the expression can refer to an lvalue?
I mean, xvalues are moved anyway, aren't they?
 
Xeo
@JerryCoffin at that point, it isn't an xvalue yet.
 
They are.
 
@DeadMG Have you found any job yet?
 
> In return for your skills my client is looking at paying in the region of £25 - 35k plus pension, private medical, flexible work hours, an anus scheme.
uhm.
 
7:54 PM
an anus scheme? that doesn't sound good...
 
Would you let anyone scheme with your anus?
 
I like to keep my anus firmly to myself.
 
Keep it tight.
 
So... they're guaranteeing you won't get butt-raped?
 
@ManofOneWay No.
 
Xeo
7:55 PM
 
@Xeo You explicitly std::move'd it. That's kinda defeating the point of, like, automatic move.
 
Xeo
Yeah, but the arguing point was, moving a reference is the same as moving the object it refers to, obviously.
 
hm
I forgot that I changed that point in Wide- references are actual objects there
instead of not-really-objects
 
@DeadMG Get some soap on a rope.
 
Xeo
@DeadMG aka const-pointers?
 
7:58 PM
@Xeo Right. But under that same point, destructing a reference is the same as destructing the object it refers to, and therefore in your example, the argument reference is not due for destruction, making it ineligible for move under my definition.
@Xeo non-rebindable, still- and rvalue/lvalue references?
 
Xeo
@DeadMG err, no?
{X x; {X& xr = x;} /* x still lives */}
@DeadMG Damn, pointers can't do that.
 
@Xeo That being my point. You can't destruct a reference any more than you can move it.
 
Xeo
Hm, gotcha.
But still, it's just silly that they only allow move when copy elision may be used anyways.
 
yes, indeed it is
 
Xeo
And that just reminds me, my const int initialization answer relies on automatic move into a boost::optional, which won't happen as I just discovered.
 
8:02 PM
there's a std::optional now?
 
Xeo
Can you see how much I wish there was?
 
yep
 
Xeo
Ugh, I thought the binomial heap guy was back: stackoverflow.com/questions/12288921/…
 
8:20 PM
naw
that's a way better question
plus he makes new smurfs from scratch- he won't have 1300 rep sockpuppets lying around
 
Xeo
Owch, semicolon-after-loop-head strikes again
That thing is a serious pro argument for putting the opening brace on the same line as the loop head
 
I always do for(...) {\n shit; \n }
you know
apparently, 5,000 poor suckers have viewed my profile
 
Xeo
me too
 
that's actually 2 for every answer I've posted
a lot more than I thought
 
Xeo
2.5 for me
 
8:25 PM
Well, there's a summer party organized by my employer next week, and we only got 3 free drinks. After that we have to pay. What a bunch of cheapskates.
 
lol
 
Xeo
@EtiennedeMartel "one 2l bottle, please"
 
@Xeo Nah, that basically gives you 3 beers and/or lady drinks.
(And beers have a volume of 341 mL here)
How am I supposed to make bad decisions with only 3 beers?
 
gee, I dunno
you could just intentionally make bad decisions
 
It's so much easier with alcohol.
 
8:28 PM
"Hey, tomorrow, I'll spend all day coding a PHP to Java compiler in Malbolge!"
 
Because then they seem like excellent decisions.
 
Xeo
Yay, free upvotes. Now if only I hadn't already reached repcap...
 
I updated my C++ tutorials.
 
@DeadMG You have C++ tutorials?
 
I figure if it works out, I'll collect them all into a book and claim myself as author, then put that on my resume :P
I could call it "Dead Simple C++"
anyways, this is only like, the second revision, so feel free to point out any embarassing gaffes
 
Xeo
8:33 PM
Revision 2: navigation still sucks
 
Inorite
the actual pages are generated by Markdownpad from Markdown, so I don't have a particularly large amount of control over them
 
Markdown sucks? Well, that's new.
 
it's a lot better than what I had before :P
 
Xeo
Man, I'm listening to the new Billy Talent album up and down
so awesome
 
Is Haml any good?
 
8:36 PM
never heard of it
 
Although it's essentially a template language for RoR, so I wonder if it's useful in non-RoR contexts.
 
eh
web something
 
The Web. A wonderful place.
Filled with PHP.
 
Did anyone mention that this probably DOES NOT WORK in Vista? No? I wonder why. Anyway, it's an environment specific answer that only addresses a "trick" that nobody uses (at least, I haven't ever used it to run a program in about 20 years of Windows programming, but I have used it two or three times to obtain the path of a file). @MohamedAhmedNabil: this was about the worst possible selection of a "solution". It's simply not. — Cheers and hth. - Alf 1 min ago
^ Alf says.
 
Xeo
oho, the move ctor question is at the bottom of the hot questions list
 
8:39 PM
I've never used command line arguments.
 
@Rapptz Hm?
 
Well rarely, I did like once or twice but I always use int main()
@EtiennedeMartel Mohammed's question
 
@Rapptz i bet you have. if you have used windows you have probably double-clicked some file sometime to open it. if you have only used *nix then you have typed the arguments.
 
@Cheersandhth.-Alf I meant with int main(int argc, char** argv)
 
@Rapptz well it should never be used for portable non-toy code, since it doesn't support general filenames in Windows.
that's because by Windows convention the encoding is Windows ANSI, which is pretty limited, while the Holy Standard strongly suggests UTF-8.
 
8:47 PM
@Cheersandhth.-Alf That's not strictly true. An implementation could use GetCommandLineW, which IIRC returns the command line in UTF-16, and then convert to UTF-8.
not seen this one before
 
@DeadMG well that's not true. I mean your statement that mine isn't strictly true. The Windows convention is as I said. You're free to create your own implementation, and indeed that happened once when one of them Old Men from Bell Labs published an article assuming Unix-like argument expansion by the shell (was fixed by pointing out this could be done by rtl hook in Windows). But: it won't support portable code.
 
@Cheersandhth.-Alf Why not? Using UTF-8 seems like the easiest way to go for portability.
 
@DeadMG yes, but Microsoft has a lot of muscle as standard-setter for Microsoft Windows. i wonder why. oh
 
right.
but how does that make the code non-portable?
by definition, Windows-specific code is not portable anyway
 
Woa, Alf vs Dead. This is gonna take a while.
2
 
8:51 PM
if the hooking is internal, it is rtl specific, so will not necessarily work for non-ms rtl
 
working on multiple platforms and on the Microsoft RTL is about as portable as you're gonna get
 
and i can't think of any way to do that external to the program except by creating own compiler and rtl. and then the code will work one way with that, and another way with most other c++ implementations for Windows.
the easiest is to define a platform-agnostic interface for obtaining arguments with the platform's natural encoding
i.e. not use main arguments
 
except then you'd have to write every speck of code without knowing what encoding it uses
not a positive situation
 
oh, i think that's bestest
:-)
 
especially for those of us who have to deal with non-ANSI text
being most of us.
who really need Unicode.
here's an odd question- will 0 bind to an int&&?
 
8:57 PM
@DeadMG I don't think any literals bind to an int&&
 
according to GCC, it does.
 
0 itself is an rvalue expression. it must bind to an rvalue reference
 
true, but I'd expect a const in there.
I mean, it doesn't really make sense to write something like this
 
no but -- where is the c++11 wording (if any) about lifetime extension of rvalue references?
 
same as const T&
 
8:59 PM
@johannes get here asap!
 
Xeo
@MooingDuck Of course it will
 

« first day (690 days earlier)      last day (4254 days later) »