« first day (851 days earlier)      last day (4099 days later) » 

3:00 PM
@Xeo Now, how does one find out about such a thing? It is good news indeed, because I had maybe 2 or 3 answers that didn't include all test program code in the answer. I hated that the answers had gone 'incomplete'. I might revisit those to fix it now
 
Xeo
@sehe I clicked an LWS link, and noticed it was an old-style link (the long ones).
 
(and it worked, presumably)
 
Xeo
aye
 
user1357851
@MartinJames that's why I said based on UBuntu, knowing most here are useless in writing drivers
 
user1357851
We can add features
 
user1357851
3:08 PM
adding a few would not be too much of a harass, we just need to learn to write embedded C
 
user1357851
Like each adding a new driver or two, we can it SOC++OS
 
user1357851
duel booting (SOC++OS & IOS or Android)
 
Xeo
@thang it depends: it prevents NRVO if the constructor has side-effects; it does not prevent NRVO otherwise (as-if rule). Whether the compiler will still do NRVO is a different question. — R. Martinho Fernandes 22 secs ago
Erm, robot, isn't that wrong?
If you write return std::move(local_var);, you explicitly inhibit NRVO.
Also, didn't you just recently explain that to someone in a comment?
 
@Xeo So what. As-if rule wins over everything.
If there are no side-effects from the move ctor, how can you tell the difference?
 
Xeo
Meh
 
3:14 PM
I don't think any mainstream compiler will do it though.
 
Ell
I don't understand in c# why you need break when it errors if you don't have it
 
user142019
Fallthroughs are allowed for empty cases.
 
user142019
But yeah, I don’t understand it either.
 
user142019
Compiler could insert a break; after every non-empty case.
 
Ell
3:15 PM
empty cases? so when it does nothing?
 
user142019
Maybe to prevent C and C++ programmers from being confused. :P
 
@Zoidberg And get the crap you get in C?
 
user142019
case 0:
case 1:
case 2: foo();
 
@Ell "when it errors if you don't have it" answers "why you need break" IYAM
 
user142019
@R.MartinhoFernandes huh?
 
3:16 PM
Oh, wait, I get it.
 
user142019
:P
 
Requiem For Duff's Device, op. posthumus in C#
 
It's so you have an explicit jump statement on all.
 
Thx. You know, they happen about 3x a week
 
3:19 PM
Oh, once again, someone that will be shocked to learn std::move is an identity function.
Sigh.
Dammit, the API I'm using will be deprecated in the next SDK version.
Ok, I'm leaving.
 
@R.MartinhoFernandes Viel Spaß!
 
@R.MartinhoFernandes Plenty of time
 
Ell
aww dayum I've been writing in degrees when everything is radians
is stuff written in terms of pi? so in c# when you do Math.Sin(1.0), is that 1 radian? or 1pi radians?
meh ignore me
not that you weren't already :3
 
It's 1 radian, why would it be pi
 
Ell
because else you have to keep writing pi everywhere for logical things. idk
like 180 is pi instead of 1.0
I dont know :P
 
3:26 PM
@Ell pi = 4*atan(1) IIRC
@Ell inb4 tau tauday.com
 
user142019
> If you write a race, you go straight to undefined behavior land. Have a nice stay.
 
user142019
lol
 
@sehe ...and there, boys and girls, is your vocabulary lesson on what "tilting at windmills" means.
 
@JerryCoffin xD
 
3:32 PM
@sehe is this yet more 'tau better than pi' crap?
 
Aahahhahaha it's 55 minutes
 
@thecoshman nope.
It's the same old "tau is better than pi" crap!
 
@CatPlusPlus ah, nice, an hour till home time
 
Tau better, then pi dead
 
Wait, who the hell cares, it's a fucking number
 
3:35 PM
@Collin ...and thus my "tilting at windmills" comment.
 
I suppose so :-P
 
Numbers are very important to some people
 
Pi is important to everyone.
Wait. I meant _tau_ :)
 
Xeo
Can we get the last close vote here pl0x?
 
@JerryCoffin o_0 still don't know what that means :P
 
3:36 PM
Tilting at windmills is an English idiom which means attacking imaginary enemies. The word “tilt”, in this context, comes from jousting. The phrase is sometimes used to describe confrontations where adversaries are incorrectly perceived, or to courses of action that are based on misinterpreted or misapplied heroic, romantic, or idealistic justifications. Etymology The phrase derives from an episode in the novel Don Quixote by Miguel de Cervantes. In the novel, Don Quixote fights windmills that he imagines to be giants. Quixote sees the windmill blades as the giant's arms, for ins...
 
@thecoshman Why Am I Not Surprised
 
@Xeo Hey, they changed wording
It's "marked as duplicate" not "closed as exact duplicate"
 
Xeo
@CatPlusPlus That's for when it's still in the process of being closed.
Oh wait, nvm
 
No, it's closed
 
Xeo
Yeah, they changed a bunch of stuff wrt closing questions
 
3:38 PM
@sehe you don't expect me to know every idiom known to man?
 
"It wasn't turning into a movement!" That's because it's a goddammed number
Why am I watching this?
 
do I want to proceed?...I don't think so, but it would be nice to know who's asking ._.
 
It's a total pispiracy
@melak47 Java update
There's an URL scrub
 
@melak47 sure, go for it
 
I broke it :(
 
3:40 PM
I thought i'd finally killed that stupid auto updater
 
@CatPlusPlus I think the idea is for it to seem more "friendly", avoiding saying "hey, you screwed up", and replacing it with...a more circumlocutory way of saying "hey you screwed up".
 
You like picking the most uncommon words possible
@melak47 Yes, that's a great idea
 
@melak47 No, you do not want to proceed -- proceeding will download (or update) the Java virus onto your machine.
 
user1357851
Was another piece of cake ... literally
 
@thecoshman indeed, I don't
 
3:44 PM
Just started looking at Kotlin, JetBrain's new JVM language.
 
@Telkitty Damn that was horrendous
 
@EtiennedeMartel Kot literally means excrement in German :)
 
user1357851
the best part is that you can cut it up & eat it >_<
 
@melak47 Well, they're Czech.
 
@sehe well, put away the Mystery Machine Shaggy, case solved!
 
Ell
3:46 PM
can I make bracket matching more obvious in VS?
 
@thecoshman Now there's an idiom I had never seen.
 
user142019
LOL
 
@sehe never mind
 
@Ell change them colors
 
@Ell fire works?
 
@JerryCoffin "With that" - I'll await the reference. Meanwhile: it looks like a remake of AiWL
 
@sehe Yes, it's base don AiWL. You have to watch until just about the end of the reference to make sense.
 
user1357851
Oh never thought Alice was 'tripping' in wonderland
 
Stupid Ruby and their lack of modules
Tracking shit in a large codebase is literally needle in the fucking haystack thing
 
3:54 PM
@JerryCoffin Pretty creepy
 
> Elvis operator
 
yeah I've seen that before
 
user142019
static T elvis(Func<T> f) {
    try {
        return f();
    } catch (NullReferenceException) {
        return default(T);
    }
}
 
user142019
:P
 
As always the answer to null problems is monads and Maybe
 
Xeo
3:58 PM
Hm... "null" should be threaded along a computation without you having to do shit, kinda like monads.
@CatPlusPlus I blame my slow internet here at work.
 
@Telkitty Well, sure seems like the author must have been, anyway (but pills that make you smaller and larger, see cats appearing and disappearing, etc. -- sounds pretty acid-ish to me).
 
@Xeo :P
 
user142019
Calling a method on null in Java should be UB.
 
Xeo
But then Java would be unsafe!!!
 
user142019
Also everything nullable is ridiculous.
 
4:00 PM
@Zoidberg And that buys you what
 
user142019
Also in C#.
 
@Zoidberg That's safecall, at best. Elvis specifies the 'alternative'
 
user142019
(Except for value types, but who cares.)
 
But seriously what does UB buy you over NPE
It's still a bug, but now you don't know you have it?
 
user142019
4:01 PM
It punishes Java programmers.
 
user1357851
@JerryCoffin magic mushrooms existed long time ago. Wonder how much did the grimm brothers eat >_<
 
user142019
Which is always a good thing™.
 
@Telkitty Probably around 200kCal per day
 
@CatPlusPlus Yeah, FC3 has some nice bits.
 
@CatPlusPlus well. that's awkward. so artsy. so little added.
@EtiennedeMartel Aha. FC
 
4:03 PM
@sehe Far Cry 3, not Fecal Construct 3.
 
user1357851
@sehe 200kCal a day, they must have been looking like this:
 
user1357851
 
@Telkitty Those too (and yes, AiWL predates LSD by quite a while, but).
 
Xeo
@Telkitty Wat.
 
4:05 PM
@CatPlusPlus Also, that last part? Could have been said by you.
 
Xeo
You know how a normal adult human needs ~2000kCal / day?
 
AiWL?
 
user1357851
@Xeo 2000 cal
 
@TonyTheLion Alice in Wonderland
 
user1357851
not 2000k cal
 
4:05 PM
oh right
 
Xeo
@Telkitty No, kCal.
My bottle of ice tea here has 74 kcal per 250ml
 
@Telkitty When dieticians and such use "calorie" (i.e., when talking about "calories" in food), they mean "kCal" (i.e., 1000 of what a physicist would call a "calorie").
 
@EtiennedeMartel I know right, my favourite quote ever
 
@CatPlusPlus Although that does mean you're mad.
 
Xeo
@EtiennedeMartel Surprise where?
 
4:07 PM
We all are
 
Yeah.
I used to say that to write software, you had to be crazy in some way.
 
@EtiennedeMartel If you weren't made, you'd be the only one on earth -- and that would drive you completely insane.
 
"made"?
(I know what you meant, but you might want to fix that typo)
 
@EtiennedeMartel too late. Oh well.
 
Anyhow, reminds me of that quote in I, Robot (that film with Will Smith that only share the name of that Asimov book).
> Does thinking you're the last sane man on the face of the Earth make you crazy?
Craziness is in the eye of the beholder, after all.
 
4:15 PM
@EtiennedeMartel I assumed Fedora Core
 
@sehe Ah. Well, no. Unless Fedora allows you to hunt tigers with bows, drive recklessly in the jungle and stab people with funny accents in the throat.
 
@EtiennedeMartel It does. Much like any other major linux distribution :)
 
@EtiennedeMartel They are pretty bleeding edge, so it's sorta like that
 
user142019
I just ate boring and tasteless food.
 
Ell
why?
 
4:22 PM
welcome to my life
 
oy
 
ho
fi
fy
 
What kind of benefits do you imagine the conversion of a PHP script to C++ could deliver? The script does not rely on databases or any php-useful functionality. Rather, it is performing a large number of computations and conditionals, with one specific loop iterating 32 million times to perform it's task.
 
user142019
None.
 
user142019
4:24 PM
PHP to anything is terrible.
 
user142019
Because PHP is terrible.
 
@onassar Probably speed, but give it a shot
 
user142019
Completely rewrite it from scratch instead.
 
@Zoidberg That's the plan.
I don't know c++ very well though, so I wanted to gauge other opinions to see if it would be worth the time.
 
user142019
Also profile first.
 
4:25 PM
this ^
 
user142019
And if it’s a problem, optimize.
 
By conversion, I mean rewrite.
Profile the php script?
 
conversion != rewrite
 
user142019
Also, just rewrite your entire app in C++.
 
user142019
It’s better than PHP.
 
user142019
4:26 PM
@onassar of course.
 
It's not an app, just one script.
 
heck, you might try python first
 
user142019
How else will you know what the bottleneck is (if there even is one)?
 
"php-useful functionality"
:lol:
 
user142019
Maybe you need to optimize only a small part of the loop.
 
user142019
4:26 PM
Instead of everything.
 
I know which part of the script is causing the slowness.
It is one function
 
The basic benefit of rewriting PHP things to not PHP is that they won't be in PHP any more
 
nested loops
for string comparison
 
user142019
Are you calling a function in the loop?
 
inline it?
 
4:27 PM
inline PHP?
 
user142019
Because function calls in PHP are slower than a snail on Teflon.
 
Also you ~know~ when you profile, not guess
 
@Zoidberg two function calls within the loops
 
user142019
What part of the loop takes most time?
 
4:29 PM
The JIT optimizer doesn't take care of that? Good lord
 
Ahahaha JIT
Also congratulations you just made a screenshot of the code on the Internet
 
user142019
I highly doubt PHP has a JIT.
 
You should now print it, take a photo of it, print that, scan it and then share it with us
Also we don't care about PHP why are we talking about PHP jesus
 
@CatPlusPlus JIT is cool.
When in doubt, JIT it.
 
@CatPlusPlus if you're not interesting in helping I understand
 
4:30 PM
@EtiennedeMartel PHP implementation has no optimiser
JIT or otherwise
 
@onassar The cat just likes being grumpy
@CatPlusPlus That's depressing
 
user142019
Also you didn’t answer my question.
 
@CatPlusPlus Actually, PHP does have an optimizer, but you have to pay for it.
 
user142019
Where is the bottleneck exactly?
 
@EtiennedeMartel Well yes
Totally legit business model~
 
4:31 PM
Zend actually does provide a very slow PHP implementation in order to drive the sales of their optimizer.
 
@Zoidberg I'm not sure. I'll give logging another go
 
user142019
"The loop" is not specific enough.
 
Zend is just incompetent
 
Yes. Also Israelis.
 
user142019
Zend is meh.
 
4:32 PM
At least to me, "optimum PHP" sounds like "dry water".
 
There is absolutely no link between the two previous statements.
 
Maybe there's a bit of marketing malice in it, but it's mostly incompetence
 
user142019
It's more evil than Oracle.
 
@Zoidberg I don't think that's possible.
 
I need to store what command line argument were given t the program. is there any function in boost::program_options ? or I need to loop through argv and reconstruct by myself ?
 
4:32 PM
@Zoidberg thanks for your help. I'll go back and log and see where the bottle neck lies.
 
argv is the thing
already
 
user142019
@onassar pro tip: don't use PHP.
 
user142019
Use Haskell instead.
 
user142019
It's way better, also for web apps.
 
user142019
Just like C++.
 
user142019
4:33 PM
But even better.
 
@onassar The bottle neck is PHP.
@Zoidberg Stop it with your damn Haskell.
 
@CatPlusPlus Ya But if there is any std::string boost::program_options::recunstruct() I don't want to do it by myself
:D
 
It's a plan to make the guy throw himself off the nearest bridge.
 
Haskell is wonderfulest
 
user142019
@EtiennedeMartel LESS PHP PROGRAMMERS!
 
4:34 PM
@CatPlusPlus You too, stop it.
 
WHOA
 
@Zoidberg We can cure them.
 
THERE'S A CTP2 ?!
Findfindfindfind
 
@ThePhD old news dude :p
 
std::vector<std::string> args;
std::copy(argv, argv + argc, std::back_inserter(args));
 
user142019
4:35 PM
@EtiennedeMartel That's also a possibility, but :effort:.
 
Xeo
@ThePhD No.
 
@EtiennedeMartel I'm interested in popularising Haskell so~
 
@ThePhD Not of the C++ features.
 
@melak47 Why u no tell me? D:
Oh.
 
@ThePhD because it's not worth talking about
 
4:36 PM
My hopes, dashed upon the rocks of VS's money pile. ;~;
 
@Collin std::vector<std::string> args(argv, argv + argc);
 
@EtiennedeMartel oh yeah forgot about that constructor
 
user142019
@CatPlusPlus BUT IT'S SO 31337!!!!111
 
@CatPlusPlus then write something in it.
 
@Abyx But :effort:
 
user142019
4:40 PM
If there is a giant struct-o-bools.
 
user142019
Is the compiler allowed to optimize said bools to bitfields?
 
user142019
struct foo { bool a, b, c, d, e, f, g, h; }; sizeof(foo) == 1 /* lol */;
 
Why does it matter?
 
@EtiennedeMartel isn't it argv+(argc-1) ?
 
user142019
@EtiennedeMartel Just wondering.
 
4:42 PM
@NeelBasu No, because when you define a range, the end is always 1 past the "real" end.
 
@Zoidberg No
 
@NeelBasu no, the second should point one past the end
 
user142019
Okay. :P
 
@Collin Yaright. I forgot
 
@Zoidberg You were about to micro-optimize something, weren't you?
Bad lobster.
 
user142019
4:42 PM
No.
 
user142019
I was just wondering.
 
You can't make a pointer or reference to a bit
 
@NeelBasu All that -1 +1 nonsense is why the folks who came up with starting at 0, end is one past were way smarter than the fools who designed MATLAB
 
user142019
I’m not even writing anything right now.
 
user142019
@CatPlusPlus heh good point. :P
 
4:43 PM
@Zoidberg No.
each object has to have an individual address
so unless they can prove that you never perform any kind of pointer anything with it, then it can't be packed.
 
@Zoidberg Weird. I'm sure you can think of a new project to start.
 
user142019
Proxies. xD
 
and it's probably a bad optimization anyway, lots of RMW (actually probably would violate lots of stuff in the C++11 memory model) to save a few bits of memory
 
If I was working on an MMORPG, I would be using Erlang for the server.
 
user142019
Me too.
 
user142019
4:45 PM
Or Haskell.
 
Let's write an MMOR-aahahah right
 
Well, the main thing about Erlang is that you get free scaling.
(Almost)
@CatPlusPlus I have plans for a multiplayer game, but it wouldn't be "massive".
 
user142019
Erlang is wonderful even if it were only for the way you design your programs.
 
Still, Erlang for the server could be interesting.
 
@EtiennedeMartel I wanna learn how to do multiplayer too
But that's after I learn how to make an actual game first. :D
 
4:47 PM
@ThePhD Okay, tip #1: you'll need sockets at one point.
 
q_q sockets
 
A teacher of mine once said: any multiplayer app is actually a chat with a weird looking client.
 
Multiplayer is about figuring out how to synchronise state with minimal latency
 
boost::algorithm::join(std::list<std::string>(argv, argv+argc), " ")
 
user142019
Haskell has great non-blocking I/O.
 
4:48 PM
:)
 
@NeelBasu You know this is not the original command line
 
@CatPlusPlus If you got a deterministic simulation, then you can pretty much only synchronise the state changes.
 
user142019
Assuming a modern version of GHC. :P
 
@CatPlusPlus why ?
 
4:48 PM
^^ Why would people do that?
 
doesn't erlang has big latency?
 
"He lived a very full life," <-- Yes, I'm sure he was full quite often
 
@CatPlusPlus anything missing ?
 
@Mysticial Because they don't care about their health?
 
@NeelBasu quotes.
 
user142019
4:50 PM
@Abyx Erlang terms are immutable so everything can be passed by reference to anywhere without problems. And that's not very slow.
 
user142019
Or do you mean over multiple nodes?
 
user142019
Since that would require serialization and networking. :P
 
@Mysticial They're not even pretending like they're healthy.
It's not as if they're hiding diabolocal unhealthiness in their fod.
It's up front: our food will kill you if you eat too much of it.
But people do it anyways.
 
@Abyx Ya That I am missing. Then whats the PROPER way ?
 
@Zoidberg I mean latency. time between one player moves and other see he's moving
 
4:51 PM
Do I need system specific call ?
with. current application pid ?
 
user142019
@Abyx depends on how you design your program.
 
user142019
And how many relevant nodes you have and how they communicate.
 
user142019
Erlang is made for telecommunication.
 
@NeelBasu I doubt you can recover the original command line precisely (with any certainty), but you want to at least quote any argument that contains a space.
 
@Zoidberg ...and not for MMO games, I guess
 
Xeo
4:55 PM
Hm. Is there an offline version of haskell.org? :D
 
user142019
@Abyx Well, you have to send lots of data between users.
 
user142019
@Xeo waybackmachine
 
@JerryCoffin But is checking each argv item for space and requoting them the only way ?
 
user142019
Also, Haskell wiki runs on MediaWiki which has export feature.
 
quick question. is it a thing in C++ to start some variable names with i?
 
user142019
4:56 PM
Loop counters are often i. Just because. If you use i for loop counters then people know what it means.
 
@NeelBasu You could probably get away with just quoting every argument, regardless of whether it contains any spaces.
@kush Yes -- came to C++ from mathematics via Fortran.
 
@JerryCoffin user can always argue, "Its NOT original"
 
It's hard to spell words that start with i without starting them with i
 
@CatPlusPlus but icolor, ifinish, and igage?
 
auto i = 1; ii = 2; iii = 3;
 
4:57 PM
@kush in what context?
 
user142019
@kush context.
 
@kush iPhone, iPad, etc ..
 
I am pretty sure this code is older than the iPod
 
@NeelBasu Yup -- but essentially anything short of actually retrieving the original command line leaves you open to that.
 
user142019
That's pretty old.
 
user142019
4:58 PM
Better rewrite it.
 
Probably in someone's style guide somewhere "internal" maybe?
 
if it's old, probably it's Hungarian notation
 
@Zoidberg I hope you were joking but I need to do exactly that.
@Abyx so i is supposed to mean integer?
 
user142019
You say it's from before C++03.
 
@kush could be.
 
4:59 PM
@kush yep.
 
That does make sense
 
user142019
That must be awful C++ code.
 
@Zoidberg I can barely read. I couldn't tell one way or the other.
 
Xeo
@Zoidberg Where?
 

« first day (851 days earlier)      last day (4099 days later) »