« first day (510 days earlier)      last day (4424 days later) » 

10:00 PM
Less verbosity. Everyone knows the type of std::free, why do I have to spell it out?
 
@LucDanton Aren't you supposed to pass something non-null to last argument?
 
@CatPlusPlus Yeah I'm wondering about that. The int* status or something, right?
 
@RMartinhoFernandes Not need, just as 'sauce' to avoid having to type clunkyness like unique_ptr<char[], void (*)(void*)>
 
@LucDanton decltype(+std::free)
 
@JohannesSchaublitb That's still spelling it out.
 
10:01 PM
@sehe FWIW, I don't expect the standard make_unique to have anything like @Luc's deleter named parameter in it.
 
@RMartinhoFernandes sadly, no
 
Those are here for clarity. Should work without. Probably.
Obviously the order of parameter is fixed then, as usual.
 
@LucDanton Yeah.
 
why did i write a "+" in that decltype(+std::free) !?
 
Because you suck at C++.
 
10:03 PM
@CatPlusPlus I wonder how I ended up with that code, IIRC that's an error that ends in a segfault. Probably going to bury that demangling code in a branch though.
 
would it work with decltype(std::free) !?
 
@JohannesSchaublitb guess: yes? Why would it need to be a function pointer?
 
Ah, I notice that I correctly use __cxa_demangle it elsewhere in my code. That's sad.
 
@sehe because references are not function object types!?
how will it work?
 
@RMartinhoFernandes anyways, when you're done with the scepsis, the point was related to Konrads latest crusade against pointers in C++
@JohannesSchaublitb keep forgetting template args don't decay in the same way as function args
 
10:05 PM
We all do crusades against pointers in C++.
 
What's "scepsis"? (I mean, besides a city in Asia Minor Σκέψις)
 
They don't work.
 
@RMartinhoFernandes All of it :) Man, I got you and three others tumbling all over me for posting that. Some even IN ALL CAPS
 
Come on, you can't blame everyone for not understanding you. You have to blame the messenger here.
 
10:07 PM
It's Friday evening.
Brains no work.
 
@howard said in that question "Some implementations of std::tuple use recursive inheritance. But the good ones don't. ;-)"
can you please explain that?
 
@RMartinhoFernandes No I don't. I'm not saying I don't take blame, but you should not forget that the first responder 'sets the tune' for the others. You guys were echoing each other a lot. A bit of patience would have helped. I might even have answered.
 
i don't have any clue as to why it is not good to use recursive inheritance
 
@JohannesSchaublitb Template recursion limits?
 
10:09 PM
@JohannesSchaublitb they're in the reverse order as expected in memory?
 
you have 1000 types in your tuple?
 
Andrei talked about it at GN, something about layout.
 
Whatever, I'm taking up the 7DRL challenge. Been wanting some interesting project to write some Haskell. Now, let's shop for UI libs.
 
is it because the tuple is not standard layout anymore or something?
 
10:09 PM
@RMartinhoFernandes I thought you can't just go and write something. :P
 
@CatPlusPlus Erm, I'm gonna make it up as I code.
 
Always the bestest approach. I do that, too.
 
Does ncurses handle input too?
 
Oh. My. God.
0
Q: Get memory buffer with c++

AcidI have C++ application which press Print Screen button. How i can get memory buffer in c++ i want to use it in GetBitmap Is there any function GetMethod() or something like that?

 
10:11 PM
In a primitive, console-only way. Though PDCurses can even report mouse events under Windows, AFAIR.
 
@JohannesSchaublitb std::tuple<int, short, char, char> will be in memory as char, char, short, int resulting in confusion, and 4 bytes padding more than would be if you didn't use recursion
 
@JohannesSchaublitb How can you implement tuple without recursive inheritance?
 
@CatPlusPlus That's what I need.
@sehe -1, too localized, close tab.
 
@RMartinhoFernandes the windows version does, and I don't recall a comment saying it was pdcurses specific
 
0
Q: Why is it not good to use inheritance for std::tuple implementations?

Johannes Schaub - litbIn this question, Howard Hinnant said Some implementations of std::tuple use recursive inheritance. But the good ones don't. ;-) Can someone please shed some light on that?

 
10:12 PM
@StackedCrooked recursive members
 
@StackedCrooked ^^
 
@CatPlusPlus Yeah, but I need something that has Haskell bindings available.
 
@MooingDuck You mean that the tuple has one member of type std::pair<T, Tuple<U...> >
Rough idea.
 
@StackedCrooked you don't actually need a pair there, but that's the heart of it
 
Ok, that's what I meant.
That seems indeed better than recursive inheritance.
 
10:14 PM
@MooingDuck Your answer doesn't sound like a strong enough argument. What about std::tuple<char, char, short, int>?
 
can you expand template packs as members? I never thought to try...
 
No, you can't.
 
@RMartinhoFernandes it's still in the reverse order that one would expect, even if that doesn't add padding
 
@MooingDuck The layout is invisible to the user.
 
@RMartinhoFernandes I recall him mentioning it specifically in the talk even so.
 
10:16 PM
get<0> gives a char, no matter how it is implementated.
 
Is there any way to benchmark parallel scalability using more cores than I have?
Like simulate 8 and 16 cores?
 
Probably a stupid question, but is it possible to specialize on number of template arguments and use something like template<typename A, typename B, typename C> struct tuple<A, B, C> { A a; B b; C c; }; etc..
 
Yes.
Assuming you meant struct tuple<A,B,C>.
 
@RMartinhoFernandes too bloddy ignorant seems to be missing from the bullet list
 
Yeah.
 
10:18 PM
@Pubby What'd you want to get from it?
 
@Pubby Benchmarks on an emulator?
Hmm.
 
I wanna see how linear it is. Like this: upload.wikimedia.org/wikipedia/commons/e/ea/AmdahlsLaw.svg
 
I doubt you can measure reliable speedup on emulated hardware.
 
@CatPlusPlus I bet you could as long as you scale the results properly
 
10:20 PM
Eh, seems dubious.
 
@Pubby if you have quad core: 1, 2, and 4 should measure fine. For 8 threads, divide the time by 2 for comparison, For 16 threads divide time by 4... It should be approximate.
 
cabal: Error: some packages failed to install:
hscurses-1.4.1.0 depends on old-time-1.0.0.7 which failed to install.
old-time-1.0.0.7 failed while downloading the package. The exception was:
user error (openTCPConnection: host lookup failure for "hackage.haskell.org")
FRAK.
Oh, it was just a hiccup.
 
Perhaps it's sufficient to check on your current machine that a higher number of threads doesn't slow down the program much.
 
@MooingDuck But I don't know the parallel portion
I think I will ask on SO
 
@MooingDuck am I correct in that you say that std::tuple<int, short, char, char> is laid out bad in the inheritance scheme? But what about std::tuple<char, char, short, int>, the reverse, which you say would result in optimal layout when using the inheritance scheme, if i interpret what you say correctly?
@MooingDuck what method is the better implementation of std::tuple?
 
10:24 PM
I believe it's possible to have the implementation reorder the tuple type arguments in order to maximize packing. If I remember well this was mentioned in Alexandrescu's talk on variadic templates.
 
Btw, Andrei's GN slides are up, (and as a PDF, not PPTX like Bjarne's), so you can check them out.
 
@JohannesSchaublitb the first would take 12 bytes, the second only 8 bytes. (and is Optimal)
 
@MooingDuck But that depends on the tuple not on the implementation.
 
@JohannesSchaublitb as for "better" I can only suggest that the memory layout is more intuitive
 
@RMartinhoFernandes i don't care about his slides. if they go down, my question will become worthless
 
10:25 PM
@RMartinhoFernandes perfect! where?
 
@RMartinhoFernandes but thanks for noting that
 
Haha, cc1plus crashed.
 
@MooingDuck i don't understand why it is the recursive inheritance thing that is bad, and not the order of the types given to tuple that is bad
 
MinGW is so bad.
 
10:26 PM
FRAK hscurses doesn't build.
How can you put up a package that doesn't build?
 
I think I won't get this codebase to build ever again.
It just outright crashes.
Not even an ICE report.
 
RE report?
or an S-Bahn report
 
Btw, @MooingDuck what Andrei talked about was about the implementation reordering the parameter pack to get optimal layout. That doesn't preclude the use of recursive inheritance for the actual implementation in the optimal order.
 
Haha, it's stack overflow.
 
@JohannesSchaublitb And enforce it with a generic static assert to ensure that sizeof(tuple<A, B, C>) == sizeof(A) + sizeof(B) + sizeof(C)
 
10:28 PM
@RMartinhoFernandes that's what I'm thinking about right now
why not just reorder it automatically?
 
@StackedCrooked That's silly. Forbids padding, forces disalignment, etc.
 
@RMartinhoFernandes Isn't that what we wanted?
 
Forces disalignment?
 
@StackedCrooked No, we wanted to minimize it.
 
10:29 PM
we want minimal padding
 
Padding is good.
 
@CatPlusPlus Yes, but it must be minimal.
 
@StackedCrooked struct { char c; int i; }; without padding nets you an int that is not properly aligned.
@StackedCrooked Minimal != 0.
 
for an union, the padding value is < 0
lol
 
@RMartinhoFernandes Ok but I think it's possible to static assert that the padding is minimal.
 
10:31 PM
i think that is going to be difficult but possible using alignof and sizeof
 
Not trivial, though.
 
Just build Matlab into g++.
 
lol
Ok, screw hscurses.
Let's check this vty thing.
 
You don't really need fancy UI, you really just need input.
 
I need a means to place stuff in known positions on screen.
 
10:34 PM
X's -geometry parameter
 
Generate 80x25 grid every frame. Roguelikes are allowed to have 0.001 FPS.
 
@RMartinhoFernandes oh right. rewriting answer... :/
 
It can even be pure.
Just send 'clear' escape code before drawing and poof.
 
@CatPlusPlus Is that portable?
 
10:35 PM
is clang on windows faster than gcc on windows?
 
On Windows you'd have to use FillConsole thing.
 
Argh, pain.
 
Or just draw 25 empty lines.
 
Ok, I'm going with that approach.
(I was going to say "for now", but then I remembered I only have 168 hours)
 
10:39 PM
@JohannesSchaublitb alright, I rewrote the answer with the info that R. Martinho Fernandes kindly helped me find
 
> The most frequently used parts of this ANSI command set are exposed with a platform independent interface by this module. Every function exported comes in three flavours: Vanilla (...), Chocolate (...), Strawberry (...)
Awesome!
 
ANSI neapolitan?
 
@CatPlusPlus "poof" is another word for "gay person"
 
Not really, no.
 
10:44 PM
"poofter" is the word you're thinking of, perhaps?
 
oh, well, that's not the real google
 
it's considered offensive, however
 
lol, "real" google.
 
@Shog9 oh rly?
 
10:46 PM
@TonyTheLion Of course - all authoritative sources have domains ending in ".com"
 
OK
I reinstalled Windows - again - and Visual Studio still won't install
 
@RMartinhoFernandes I'm not falling for that trick. Again.
 
I think I might overuse the edit button. :(
 
@Shog9 You will. It's a matter of time.
 
10:48 PM
@Shog9 that means you've fallen in this trap already?
 
@TonyTheLion erm... Once or twice.
 
@Shog9 this room has it's dangers :P
I used to be immune to tropes, and then I got caught
 
I answered a question 35 minutes ago, it says I have 4 edits, but there were at least 3 hidden by the 5 minute window :( I also had some changes overwritten by a guy who corrected my spelling, which wouldn't have happened if I stopped changing my answer
 
I've never been the same since
 
Ha, there are other ncurses bindings, that actually compile.
 
10:51 PM
I can assert this to be truer than most anything ever said in this room: Spend some time with us, and we'll prove you don't know C++.
6
lol
 
@StackedCrooked can you post a picture of your tetris game?
 
@bamboon Ok, sec.
 
@TonyTheLion I spend forever and a day in this place and the only thing that gets proven is that I do know C++ :P
 
Wait, it doesn't compile. FRAK.
 
@TonyTheLion This has been pretty much true for SO and <insert thing I thought I knew here>
 
10:53 PM
@DeadMG didn't really expect you to admit to the fact you really have no clue :P
 
lol
 
hey
 
@Shog9 I know how you feel, but in the C++ tag it's the worst, the sheer pedantry is insane :P
 
whoa, my code got one iteration of long division! I've been trying to get that to work for months!
 
10:54 PM
my programs often compile, sometimes they link and, on occassion, they actually execute correctly!
 
Hello world, and what else?
 
segmentation fault
 
@StackedCrooked ok looks cool, thanks
 
@RMartinhoFernandes I've had several BASIC programs execute correctly first try. Like... 3
 
10:55 PM
hey, if I just moved my model's bones a little to the left and right so they no longer overlapped the model, then my 3D rendering code would execute perfectly correctly
 
Why don't you?
 
my code always works as I want it, after 27k tries
 
well, I need to fix the problem where it doesn't execute correctly if they are overlapping :P
 
hmm, after I posted a 5 paragraph answer, I really expected to have positive rep (for the day) within an hour.
 
4
A: Is this a useless use of `cat`?

Adam LissYes. You can accomplish the same thing, without creating a new process for cat, with: $ printf "<format specification string>" $(<source-file.txt)

see comments
 
10:57 PM
Always the embedded environment argument.
 
> If I am "pressed for cycles", most definitely I would not write that loop in bash!
lol
 
Embedded environments suck.
 
@MooingDuck "nïeve"?
That reads as "nee-eve".
 
@RMartinhoFernandes I haven't learned to spell since yesterday
 
@CatPlusPlus I've found them fun toys to play with at times
 
10:59 PM
But James fixed it, and you wrecked it back.
 
I'm programming DVB set-top boxes this semester, and debugging anything is boring, painful and mostly guessing.
Not to mention that the entire thing is completely useless.
 
Frak, I'm going back to GHC 7.0.
 
@RMartinhoFernandes you should hear me when I try to pronounce it. I doubt it's any better than my spelling
 
@CatPlusPlus yea, true that debugging is a lot of guesswork, nevertheless, I find it intriguing
 
I find it a waste of time.
I prefer environments where I can actually accomplish something in an hour.
And not do million guess-and-try-again cycles.
 
11:02 PM
@CatPlusPlus Don't write buggy code?
4 hours ago, by Cat Plus Plus
Debuggers are for people writing buggy code.
 
@RMartinhoFernandes Pretty much impossible with this thing.
The docs are scarce, and the implementation doesn't exactly conform to the spec.
And it's Java
 
Wait, what thing?
 
Set-top boxes. MHP.
 
Oh, I missed that message.
 
Useless TV shenanigans.
 
11:04 PM
> With the exception of the proprietary Mac OS X, FreeBSD is the most widely used BSD-derived operating system in terms of number of installed computers, and is the most widely used freely licensed, open-source BSD distribution, accounting for more than three-quarters of all installed systems running free, open-source BSD derivatives.
woah, I was clueless
had no idea that BSD variants were still so damn popular
 
@TonyTheLion No.
 
There isn't much BSD left in OSX, though.
 
FreeBSD is popular among BSD variants.
That doesn't mean it is popular in general.
It isn't.
 
well, yea what I meant
 
Non-OSX BSD-derivatives are practically non-existent on desktops.
 
11:05 PM
@CatPlusPlus But FreeBSD is the most popular of those!
 
> FreeBSD has been characterized as "the unknown giant among free operating systems"
lol
 
They're still used for servers, routers and such.
 
yea that's what it says
 
Not as much as Linux and Windows, but I think it might be the third.
 
didn't even know that OS X ever descended from BSD
 
11:06 PM
There are other BSD distributions about?
 
The most powerful routers are powered by BSD, AFAIR.
 
OpenBSD
 
OpenBSD and NetBSD.
 
well, my long division seems like it might maybe be working, but it only calculates ~3.5 bits per iteration. Lets see if I can resist the urge to optimize it before I validate that it returns right answers.
 
Is BSD any use on non-servers?
 
11:09 PM
15
Q: Let me opt out of viewing chat flags

MDMarraI'm not a moderator. I have ~22k rep on Server Fault. I am a regular in chat. Because chat allows all 10k+ users across the network to act on chat flags, I (and many other regulars in SF chat) see some...less mature...users from other chats flagging things that aren't actually offensive. I disa...

 
Solaris is descended from SysV, not BSD.
 
sorry was wrong
 
@MooingDuck Fast programs that output garbage!
 
@Pubby Well, it's bit similar to Linux user-space-wise, but less supported.
FreeBSD at least.
OpenBSD is pretty much designed for servers — it's the project that spawned OpenSSH.
 
@RMartinhoFernandes interesting. I looked forward to it so much it never occurred to be I might hate it.
@RMartinhoFernandes heh, I thought it was taking forever to run. Turns out it got the answer super close within 5 iterations of the loop, and then went into an infinite loop.
...though it should have triggered an assert....
awesome, my long division calculates the answer correct to 26 binary digits, but I have an invalid assumption somewhere causing it to go into an infinite loop sometimes.
You'd think after 26 digits your safe, but noooo
 
11:27 PM
argh
 
@DeadMG your turn to whine about code
 
I installed ALL THE UPDATES and stupid Visual Studio 2010 still won't install
 
@MooingDuck He wishes he could write code to whine about.
And once again, I need to check ln's man page...
Mwhahahaha. I win. That bitch compiled on 7.4.
Ok. I have ncurses. Now I have to start thinking about the game itself.
 
Ugh what do you guys do when you can not figure out a silly bug to save your life?
 
go smoke
 
11:34 PM
Sleep.
 
@DomX23 swear, go to bed, work some something else
 
eat myself sick
 
@DomX23 rewrite the entire function and see if it works (it doesn't)
 
your subconscious will still be working on it while you're not staring at the screen....it just won't be so obvious and frustrating
 
watch porn
 
11:35 PM
@RMartinhoFernandes why, why why do you have to say things like that? I hadn't lost the game in months, and that's the second time today.
 
:( Took an whole day off from looking at it and now I'm back at it and no luck
 
@je4d ERm.
I'm not talking about that game.
 
@je4d Wot?
 
It's silly.
 
how complicated is the code?
 
11:35 PM
The Game is a mental game where the objective is to avoid thinking about The Game itself. Thinking about The Game constitutes a loss, which, according to the rules of The Game, must be announced each time it occurs. It is impossible to win most versions of The Game; players can only attempt to avoid losing for as long as they possibly can. The Game has been variously described as pointless and infuriating, or as challenging and fun to play. Gameplay Rules There are three commonly reported rules to The Game: # Everyone in the world is playing The Game. (Sometimes narrowed to: "Everyb...
 
oh, that idiocy
subscribing to it is your own brainless fault
 
It's not very complicated at all which makes me feel even worse
 
@RMartinhoFernandes you beat me to it :P
 
heh
 
@DomX23 I had some code where if I used std::sort on a CArray, it crashed in release builds (not debug). After a week, I replaced the CArray with a std::vector and the problem went away. Never did figure out why.
 
11:36 PM
@je4d I linked to the disambiguation page. Not a big help.
 
@DomX23 too much to post on, say, ideone?
 
@RMartinhoFernandes ah, it disappeared before i read it
 
"The Game is played by millions worldwide, although in theory, the whole world is playing it.[1][2][3][4][5]" I like how that has 5 sources
 
second thing i do is bug someone who knows more than i do :)
 
It's utterly stupid.
 
11:38 PM
@MooingDuck Because CArray uses memcpy as the copy constructor and copy assignment operator.
 
For some reason a char is printing out blank rather than printing the char which it correctly does a few lines up... :(
 
@CatPlusPlus yup.. and yet it still amuses me, 5 years out of uni
 
CArray even offers an iterator interface?
 
@DeadMG that never occurred to me. Thanks! ...I now hate MFC!
 
@MooingDuck "However, one reported variation states that The Game ends when the Prime Minister of the United Kingdom announces on television that "The Game is up.""
Let's run for PM of UK to end this crap!
 
11:39 PM
in any case, CArray is so ludicrously unsafe that the only way to be safe with CArray is to never use it.
 
Good luck with that.
 
"If I'm elected, I promise to end the Game."
 
Oh, hey, I managed to link CRT statically with MSVC.
 
@RMartinhoFernandes I could imagine Borris Johnson putting that in his manifesto
 
11:40 PM
And it works!
 
@DeadMG that doesn't sound right...
 
Silly chat wouldn't let me repeat "And?".
 
@DomX23 post the code...maybe a fresh pair of eyes will help
 
11:41 PM
Silly chat wouldn't let me repeat "And?".
 
not here...post on ideone
 
Silly chat wouldn't let me repeat "And?".
 
lol
 
Silly chat wouldn't let me repeat "And?".
Silly chat wouldn't let me repeat "And?".
 
and?
 
11:41 PM
what is ideone
never used it before
 
A site where you paste code.
 
I win.
 
@CatPlusPlus The Duck won.
 
11:42 PM
Stop starring that.
@RMartinhoFernandes I posted clickable link first.
 
@RMartinhoFernandes only kinda, Cat's was the first that worked
 
Stop starring that!
 
anyway....post your code in the box, submit, then post the url here
bbiab
 
@DeadMG Internet question validates your claim, I now feel justified in hating MFC
 
No better authority than Internet.
 
11:46 PM
Encarta.
 
Ok, no one has interesting ideas for my roguelike?
 
It's a full CD.
 
@RMartinhoFernandes not good ones
 
@RMartinhoFernandes Are you creating a D&D character?
 
The roguelike is a sub-genre of role-playing video games, characterized by level randomization, permanent death, and turn-based movement. Most roguelikes feature ASCII graphics, with newer ones increasingly offering tile-based graphics. Games are typically dungeon crawls, with many monsters, items, and environmental features. Computer roguelikes usually employ the majority of the keyboard to facilitate interaction with items and the environment. The name of the genre comes from the 1980 game Rogue. Origin The roguelike genre takes its name from Rogue, a role-playing video game based o...
Arrgh, would they fix HTTPS?
 
11:47 PM
@RMartinhoFernandes Well, I had few, but I don't think they fit the timeframe.
Alternatively: zombie-style, but with lots of frogs.
 
I'm not sure what that means.
 
I think that's the most silly one.
 
there it is
 
Well, let's say, you have to descend into Frog Cave and get something that will save the world from being overrun by frogs.
 
@RMartinhoFernandes Is it a game with a story and all?
 
11:49 PM
@CatPlusPlus like a tank that flies
 
(I said it's silly.)
 
@StackedCrooked Story isn't that important. Plus it's to be made in 168 hours (seven days), so it can't have lots of story.
@CatPlusPlus That's silly.
 
To pimp the graphics you can use all those funny unicode symbols.
 
PILE OF POO.
 
11:50 PM
Ncurses has UTF-8 support!
 
Alright! :D
 
what is list->size() doing printing anything at all?
 
haha that did help
i found it
it was embarrassingly stupid
 
heh
<3 rubberducking
 
i made a call to the delete the list right after the first statement and I guess delete only removes the pointer to the first element in the list? since the rest of the characters were still printing
 
11:57 PM
yay I fixed Visual Studio
 
lol
Sure, like anyone will believe that.
 
turns out it was just a stupid permissions thing on my hard drive
apparently, when you're the fucking Administrator, and the only user account, there is shit you don't have permission to do
and when you reinstall Windows, then all your old files are marked as belonging to your old user account for some reason
it's a stupid system that breaks in a common use case
 

« first day (510 days earlier)      last day (4424 days later) »