« first day (692 days earlier)      last day (4482 days later) » 

20:00
if you're suggesting that I store the opposite of my booleans in the bitset I still won't have both :::none and ::all
So many withheld emotions hidden behind a facade of cluelessness.
I should be a freakin poet.
lemme give u a hint: some people like flip out totally when they hear words like negation, complement and inversion
Pun intended?
so you suggest I make 2 calls to flip() and 1 to ::none just to check this
20:04
lol
Don't forget rule #1.
well, u know, c++ has an, uh, operator for this kinda thing. what was it again
starts with an N?
are you talking about operator~ ??
20:06
@lezebulon yep. you thought i was jus' hand waving, yes?
N as in Not :(
srsly I don't get what you are all getting at, anything that I could do with the STL would still be more complex than a function that would just check if every word in the bitset is ~0
What makes you think a library must be orthogonal?
@lezebulon if worried about performance, measure
or, inspect the assembly code
you might be surprised
hopefully
so you think that
set.flip();
set.none();
set.flip();
would be optimized to just checking for 11111111 in each word?
20:10
was that where we ended above, do you think?
what I don't understand is why it's not part of the standard, given that it's easy to implement (as easy as ::none() )
anyway, in addition to more sane code following the advice you've been given, there are umpteen other roads to Rome
for example, you can check for equality with the all-bits-set set
there's absolutely no shortage of ways to do this
@lezebulon that doesn't "check" anything
@MooingDuck why?
@lezebulon (~set).none()?
@lezebulon because there's not really a good reason to need to see if they're all set.
20:17
hey guys, its a good practice don't call exit() if fopen() fails? assuming not further references to the file handle
@nEAnnam there's a lot of negatives in that sentence, you might want to try again.
@nEAnnam Uh, calling fopen is a good practice?
@DeadMG in C, sure.
@MooingDuck whut, there's as much as a reason as to check if none are set
20:18
@nEAnnam hey guys is it a good practice to call exit() if fopen() succeeds?
@Chimera Not C lounge.
@lezebulon true enough
@DeadMG Thanks for clearing that up... however we don't just discuss C++ as you well know.
true
C++11 apparently adds bitset::all anyway
20:20
@Chimera "lounge" gives us an excuse to ban C++ questions, "C++" gives us an excuse to ban everything that's not a C++ question.
7
Q: When do temporary parameter values go out of scope?

James Johnstonint LegacyFunction(const char *s) { // do something with s, like print it to standard output // this function does NOT retain any pointer to s after it returns. return strlen(s); } std::string ModernFunction() { // do something that returns a string return "Hello"; } LegacyF...

please vote to close as duplicate
@lezebulon thank god, because without that built in I'd have no idea how to do it myself. :-)
no talking allowe
but what I also know is that we don't serve up answers for any old random questions that come in
@lezebulon pastie.org/4681895 is the C++11 standard's class declaration
20:21
@Chimera (~set).none()
@DeadMG of course "we" don't. But some do. :-)
@MooingDuck Like corporate profits.
Oh wait, that's something else.
only The Lion can ask annoying questions in here :P
@MooingDuck yep that would do it.
wtf is sleep sort?
20:23
@TonyTheLion Lol, isn't the term "annoying" general subjective in many cases?
^ Note that while all is present in C++11, it wasn't there in C++98 (and C++03), they jus' plain forgot it!
@Chimera it's very subjective, but having been here for like 2 years or so, I know what constitutes annoying in this room.
So glad it's Friday.
20:24
@bamboon it's a new, innovative sort that appears to be O(1), but realistically simply hides the complexity behind OS calls. (so complexity depends on underlying OS implementation)
@TonyTheLion I guess my point is that not everybody will agree on what is annoying... and nobody should force his/her definition of annoying on other people..... But I generally get your point... some things we all agree are annoying.
D:
GDB isn't set up to see into std::array
D:
@Drise std::array is just a struct, how could GDB not see it
20:26
@MooingDuck When I say GDB I mean Qt Creator can't see it
you are now aware that sleep sorts runs in O(n) which is better than most sorting algorithm
damn BBC, y u so goddamn stupid
@Chimera yes
"AMAGAD GAY COUPLE LEAVES EASTENDERS"
@lezebulon no, no it doesn't. It merely pretends to
20:26
@MooingDuck thanks for the links, seriously lol
@DeadMG I AMAGAD that sounds gay
well, I guess that if you stopped reporting the news differently depending on if they're gay or not, equality might actually improve
sleep sort is hilarious
window <4 items> vector<Cell>
*('std::array<Point, 4ul>'*)0x884d50 <not accessible> array<Point, 4ul>
@Drise I don't know what's wrong with QT Creator then, because std::array is just a POD.
@MooingDuck it spans n processes right?
20:27
@DeadMG I fell asleep reading about it :)
@lezebulon yes (effectively)
threads would work just as well
@MooingDuck so ins't the complexity in O(n)?
@lezebulon what is the complexity of the OS managing N threads? (hint: it's not O(1))
@MooingDuck For T scheduling interrupts, too.
20:29
@DeadMG I think it's a rather cool idea.. :-)
use a threadpool
that limits the overhead of thread creation
@TonyTheLion OS still has to juggle the N sleep event thingies.
@MooingDuck is it lower than log(n) ? or higher??
however, thread scheduling and shit
@lezebulon It takes O(maximum value) time.
20:29
@lezebulon depends on OS implementation. Might be log(n), or might be n^3
sleep sort would probably not be great on Unix pthreads as threads are still just processes.
Not lightweight at all
@R.MartinhoFernandes not necessarily. EG, sort N 0s on a really old computer to see the problem
@Chimera Uh, that's not true.
@Chimera come again?
20:30
Woah
@MooingDuck I'm not sure it's a valid complexity
I think that the earliest Unix implementations did that but hasn't been true for donkey's years
since when does ifstream take string objects as a filename?
@lezebulon what isn't valid? N^3?
ifstream infile(fileName);
20:30
@Drise C++11 (a year ago)
This shouldn't work last I knew
@Drise Since C++11.
Sweet!
@MooingDuck sorry wrong quote, I mean to quote " O(maximum value) "
20:31
@lezebulon Any function is valid.
The point is that on UNIX, processes are lightweight. Fork is 'instant'. But also: threads are not 'just' processes
@sehe Hmm, I will have to look up what lead me to my original statement.....
@Drise I actually couldn't care less: I'll still add .c_str() out of habit, and for documentation value: filename still can't contain NUL charactters on any POSIX filesystem
@Chimera Old info :)
20:33
@sehe I've been coding with containers again, mind is essentially mush. No comprehend.
@R.MartinhoFernandes O(solve halting problem).
Stupid Java socket addresses don't accept 2130706433 as the localhost address.
@sehe But some implementations of pthreads probably still do it the 'old' way... that was my original point.
@DeadMG f(x) = solve halting problem is not a function.
infile.ignore(std::streamsize<ifstream>::max, '\n');
This is wrong.
20:34
@Chimera True enough. Some perverse platforms do worse stuff: you know all about that because it's in your line of work :)
What is the right stream size max?
@R.MartinhoFernandes Is not a function computable on a Turing Machine.
How many peer reviews do tag wiki edits need?
@DeadMG "solve halting problem" is not a value.
@sehe Well my comment went directly to the efficiency of the sleep sort.
On different platforms.
20:35
@Drise after a getline, 1 is usually the value you want there.
@Chimera Relevant platforms have a benefit. Though, you're right: it was about sleep sort anyways
@MooingDuck I need it before the getline.
@Drise uh, INT_MAX? LONGLONG_MAX? I dunno.
@MooingDuck Plink. Plink.
@Drise pickypicky
20:37
@Drise It's supposed to be std::numeric_limits<std::streamsize>::max()
@DeadMG Ah, thanks.
@R.MartinhoFernandes OK. Then O(complexity of(solving halting problem on non-Turing Machine))
@DeadMG what's wrong with LONGLONG_MAX? Should truncate to whatever works
@MooingDuck For one, because MSVC uses int, not long long.
@DeadMG so? It'd convert
20:38
for two, why you use a disgusting macro instead of numeric_limits?
@DeadMG saving my valuable keystrokes. I might need them later
u meen, "folks!"
for three, why the hell would I ever, ever, ever want a conversion instead of exactly the thing I want?
@JohannesSchaub-litb Y'ALL
So much better, and it's gender neutral
20:39
@DeadMG religious girlfriend?
@Drise And not at all culturally biased
@Cheersandhth.-Alf Zing
@Cheersandhth.-Alf Nope.
Never too late.
Well, maybe a little
guys, pleeassse!
ask a question about std::identity!
20:42
:)
@JohannesSchaub-litb what's that?
@Cheersandhth.-Alf GEE GEE
is that "gotta go"?
@JohannesSchaub-litb is that equal to 0?
@TonyTheLion His hands appear to be sprouting from his shoulders.
@Cheersandhth.-Alf "good game" = "that's it. no point in continuing this."
20:44
@DeadMG I didn't make this, I stole it and reposted it! I take no responsibility
@TonyTheLion NO
std::identity is equal to itself!
ah thx
@DeadMg sorry if it was not funny
@JohannesSchaub-litb lol
what's a good subreddit?
@Cheersandhth.-Alf What.
20:48
^ The first 5 hits for google image search "gee gee"
r/gonewild
I have a subreddit that I don't use as much as I should
lol
@Rapptz which is?
alright mumblers
@TonyTheLion I was bored and wanted to learn CSS so I made /r/learningcpp
>Reddit
>good
>choose one
20:49
hey what stupid person is flagging here
@Rapptz oh lol
Alright, who flagged this?
No flags please. The girls are pretty.
@Cheersandhth.-Alf Have a guess.
stop the flagging please these chicks are hot
and no guys are working anyway at this time at night
20:49
oh
I've never flagged a single thing here
Asian girls :)
@JohannesSchaub-litb in the US they are :P
I love Asian women. Why would they be flagged?
@TonyTheLion shhhht!
20:50
lol
@JohannesSchaub-litb Not everybody is in your timezone... I am working, but I didn't flag it.
@JohannesSchaub-litb I'm still at work.
no, you're chatting :P
There isn't even any nudity or sexually suggestive poses
stop. don't tell them you're still working. they will stop posting hot chicks
20:51
What is truly flag worthy?
Your mom.
lmao
@Chimera Spam? Like.. referral links and shit.. if that ever happens.
20:52
wow!
We like moms, I did yours last night. Is that flag worthy?
If I was butthurt offended.
@Rapptz But nobody here really gets butthurt
no flag wars please
here
20:54
@Chimera Someone did. "grr girls I'm so angry"
I'm bored
someone flagged the girls? seriously? They're wearing clothes and everything!
Wonder what would happen if I changed my name/avatar to DeadMG's for a day.
@MooingDuck i think, at office hours photo of pretty girls could be distractive. so maybe person who flagged is working in some other time zone. i didn't think of that
@Cheersandhth.-Alf pft, being at work is not a reason to flag.
even then, just close the window for a few minutes, and the picture will have moved off the screen
20:57
I avoid keeping on my screen, but flagging? (I'm at work)
@MooingDuck That would be sweet!
@Chimera (why's DeadMG so helpful today?)
@MooingDuck but are you working :P
@MooingDuck LOL!
@TonyTheLion ...I'm on a lunch break
20:58
@MooingDuck he's moving in with his parents soon
maybe that's got something to do with it
@TonyTheLion poor kid
:(
Why is no one on Mumble?
lmao
Someone replied to me with an answer rather than comment
0
A: Website that allows me to properly run C++ code that uses cin?

Sam K.NO Rappptz it doesn't do the cin function !!! look : This is supposed o be a game where you enter a word then the letter change places and you need to fing out the word the code is correct but the website doesnt read the cin right ! http://ideone.com/0PmDX

@Rapptz he mad
wow incredibly long output
21:07
@MooingDuck WTF, I'm helpful?
@Rapptz he doesn't ahve enough rep to comment :(
Oh damn I forgot about that
can you used excel to create a zelda-like game
@lezebulon ...yes. But don't
that's a pretty good challenge
I could make a nice console game once I port excel on PS3
21:11
Hm.. need 90 rep in 3 hours
@lezebulon no, no it's not
@MooingDuck why?
@lezebulon excel is not designed for games, don't try it
@lezebulon it's like trying to build a working sewer system with legos. It can be done, but it's a terrible idea.
result: runtime error time: 1.23s memory: 5312 kB signal: 25 (SIGXFSZ)
o.o
bored
21:14
So ideone can read system() calls?
because his ideone link is still filled with errors for me
stderr:
sh: title: command not found
sh: color: command not found
sh: cls: command not found
sh: cls: command not found
@Rapptz ctrl+f5?
@Rapptz do you see the word "error" on the page somewhere besides "runtime error"?
@DeadMG What's happening?
@DeadMG no, but I am
@MooingDuck nope
@ManofOneWay I'm talking to Tony about how ugly he is
21:15
@Rapptz when why do you say it's filled with errors? It obviously executed the system calls
@DeadMG On mumble?
deleted my comment then
yep
@DeadMG I'll join you in a while if you're still there
@Rapptz I'd be happier with your answer if you also explained how to use the cin/input, and also why his program is behaving strangely (lack of error checking on input)
21:19
@DeadMG lol
@Rapptz or I can put that in if you don't mind and are lazy
@MooingDuck stdin is supposed to be one per line but I've never used ideone like that for games
@Rapptz "stdin is supposed to be one per line"? what? Nonsense.
@MooingDuck That's what it says on the site.
@Rapptz really? where? That's wrong :D
21:24
Seems I don't see it anymore, so my bad.
Why is he including fstream
Is there an ABI issue when dealing with import libraries? For example if a DLL was built in msvc 2005 can I use the import lib in msvc 2012 and it works?
@mantler I dunno, but has anyone ever gone so far as even to need more to do look more like?
@lezebulon I'm sorry, feeling a bit tired. What did you mean by that sentence?
@mantler He's trolling you. I'd ignore it
@mantler but srsly, I think it's not guaranteed to work
21:33
@Rapptz ok. Thanks for clarifying.
@lezebulon with static libs and shared libs it doesn't work (not guarenteed to anyway unless it is C-api). Just wondering if an import library would work.
@MooingDuck Thanks for the translation by the way.
What about in gcc?
@Rapptz translation?
Will an import lib generate by 3.4 work with 4.7?
@mantler ok I dunno about import library
21:35
Haha
@MooingDuck You edited his question.
@lezebulon I'm uncertain too.
@mantler yes, it should be compiled with the same compiler as best as is possible.
@Rapptz oh that
@Rapptz I had to run the program and try several inputs to figure out what he was saying :(
I just put it in google translate
I didn't know what the string function was doing though
@MooingDuck Ok.
21:37
@Rapptz shuffles the letters randomly
Why doesn't he pass it by reference rather than value
@Rapptz that would mean he'd lose the origional unshuffled string. He doesn't want that.
@MooingDuck So you have to guess for the original unshuffled string?
...that you just entered
@Rapptz first you input the answer, and then it shuffles the letters and shows you the shuffled string, then you have to guess the first word you entered :D
@lezebulon right
21:39
what kind of game is that lmao
that's a pretty good game if you're 95
2
@lezebulon lmao my sides oh my
I've never used system() calls
wait what the hell
return main();
I've never seen that before
@Rapptz ahahhaa
I was trying to find the infinite loop at the end of the game, but couldn't find it
@Rapptz it's formally undefined behavior if main is the global namespace main
21:47
@Cheersandhth.-Alf it is
@Rapptz <--- now you know why
ok. yes that main is very special. can't be called, can have different signatures, does have a default function result. very special.
@lezebulon “You’ve got to be kidding me. I’ve been further even more decided to use even go need to do look more as anyone can. Can you really be far even as decided half as much to use go wish for that? My guess is that when one really been far even as decided once to use even go want, it is then that he has really been far even as decided to use even go want to do look more like. It’s just common sense.”
5
u wot m8
@MooingDuck rofl
21:51
@lezebulon english please
@sehe looks like "you won't mate"
@sehe it's british english
Ell
Ell
Yeah "you what?"
@Rapptz there ya go
21:52
@MooingDuck He won't mate anyone soon
@BartekBanachewicz is that a SO ripoff or is there an actual purpose there??
@lezebulon i think it's a ripoff
@lezebulon oh wow, that's blatant
@BartekBanachewicz Report it on meta
@MooingDuck It's beyond obvious. Look at the medals.
@Drise you really think so?
21:54
It's uglier than SO
@BartekBanachewicz Of course.
@Drise what would meta do? They know there's clones.
They even have very similar badges lol
@Rapptz I don't think they're exactly the same, because some people have absurd numbers
Their top user has more gold medals than Jon Skeet.
@MooingDuck Just add it to the list. But it looks like they are pulling SO Q&a's
21:57
Second highest rep on their site has 507 golds, Jon Skeet has 142
I like how they set the bar low.
Their gold medal for views is 300 views
Ell
Ell
Isnt there an open source s.e. website engine thing?
If Apple can sue Samsung for infringing on their "rectangular device with rounded corners", SO could surely sue them. I mean, it's practically the exact same thing.
Other than Skeet, person on SO with most golds seems to have 26. Meanwhile they have several users with hundreds of golds
Wow these answers are so bad lockergnome.net/questions/148656/…
21:58
@Drise apple trademarked that, SO didn't trademark this stuff AFAIK
What makes .com any simpler than .net or .org? They're all three letter endings.
What are the rules of this site?

Please see our rules page.
What are the membership roles

Please see our membership roles page.
Oh, really useful FAQ
lmao

« first day (692 days earlier)      last day (4482 days later) »