« first day (810 days earlier)      last day (4154 days later) » 

10:00 PM
Say the people devouring ISO specs
 
^ this.
 
hi
 
Hiiiiiiiiyo.
Bleh.
I can't draw to save my life.
 
Well you're still alive soo.... KEEP DRAWING
 
If a robber said "I will kill everyone in this bank if I don't get a pretty picture", and I was the one given the pencil, everyone would die a horrible death. =[
 
10:04 PM
 
@ThePhD Poke his eye with the pencil.
 
@R.MartinhoFernandes "ISN'T THIS PENCIL SO PRETTY?!" <-- What I would say while getting shot jabbing a pencil in his eye.
 
Welp, back to the drawing board.
 
Did you make the pencil disappear? xD
 
10:11 PM
Yep.
And now I'm using a PAINTBRUUSH
 
^ Slightly misleading?
The heap is a "part" of the process?
 
Erm, why not?
 
@StackedCrooked I don't think it's misleading as much as it's missing details (e.g. on Windows a process can allocate multiple heaps), but presumably it's supposed to be an introduction
 
The title is "process memory layout". And this is supposed to have 4 parts. It makes me think of chuck of memory dedicated to this process which is divided into 4 areas.
 
@StackedCrooked Well, with virtual memory the OS can manage the memory however the hell it wants.
 
10:15 PM
@StackedCrooked That's what it is...
 
I guess you're assuming the segments are contiguous, based on the description?
 
I'm not assuming that because I know they aren't.
However, I find that the writing makes it seem so.
 
@StackedCrooked That's what I meant ("based on the description")
 
Heap and stack are hardly "segments" in any meaning.
 
Indeed.
 
10:17 PM
Be it executable format segments or x86 segments or whatever.
 
Ah, well :P
 
It did say "logically divided", which is probably what the author uses to mean that the process can be logically divided up this way but physically can be laid out in some other fashion.
 
(Except stack in case of x86, and not except stack in case of x64.)
 
user142019
I have a bug in my code that cannot happen.
 
user142019
The object is fine until I pass a pointer to it to a function.
 
user142019
10:17 PM
Then it is corrupted.
 
user142019
WTF XD
 
Also growing and shinking of the stack doesn't fit my mental model. I see it rather as a block of contiguous memory with a fixed size and a stack pointer to indicate current usage.
 
@Zoidberg'-- Says every developer in existence.
@StackedCrooked That to me is the bigger issue than the whole "segments" explanation
 
good lord I had forgotten how much of a clusterfuck eclipse's menu system is
 
The stack is finite. The description seems to imply that they can grow as long as the system has memory for it, which is not what happens.
@Collin good lord I had forgotten how much of a clusterfuck eclipse 's menu system is FTFY.
 
10:19 PM
@StackedCrooked Stack can be growing; actually, it is dead simple to implement it using unmapped guard page on the OS side.
 
@Collin ...and having ruined your own day, you decided you needed to remind us and ruin our days too?
 
@JerryCoffin >.>
 
I see stack as a progress bar rather than a physical stack (as in pile objects on top of each other).
 
@Griwes I thought the guard pages were just to detect stack overflows?
 
@Insilico ...yes, but they can also be used to make it growing.
Like, at first allocate like, 4 frames (16 KiB).
Limit the stack to X frames.
 
10:21 PM
@JerryCoffin Trying to uninstall an annoying plugin: Help -> About Eclipse -> Installation Details -> Installed Software
 
@Griwes I think Raymond Chen wrote an article about that technique, and how one Windows API function used it.
 
And just allocate frames on demand.
 
But they stopped using it because people kept thinking it was a security vulnerability.
 
@Insilico Dunno, it's the design I'm probably going to use when I finally get to implement something that is worth calling virtual memory manager in my slowly-going OS project :P
 
10:23 PM
Almost anything that tries to tell you about the logical layout of a process is fundamentally wrong. It really comes down to this: it's a block of address space, and for the most part, it's up to the process itself to determine how that gets broken up, used, viewed, etc.
@Insilico Jeffrey Richter wrote quite a bit about it a long time ago as well.
 
Can the process decide to put most the text section somewhere else?
 
@Insilico Yeah. Sparse allocations. One of those great ideas that are possible thanks to paging.
 
user142019
@sehe lolzorz
 
> You might think that a Nietzsche doll is a strange thing to own, but Nietzsche himself once said, "The irrationality of a thing is no argument against its existence." We like to think he had this doll in mind when he said it.
 
10:32 PM
@StackedCrooked depends on how you do the escaping
@R.MartinhoFernandes Wow. I may want one. One day.
 
@sehe I had a bug there, which is fixed now.
 
@StackedCrooked link?
 
Anyone remember what is the indices builtin in GCC?
I can't find that in the transcript :(
 
I am generating massively big index packs (in the thousands) and it makes compilation dead slow :( I want to see if the builtin is any faster.
Nevermind, found it.
 
10:36 PM
@sehe And in a state of confusion I did this today but reverted it later :)
 
Oct 10 '12 at 15:36, by R. Martinho Fernandes
Btw, _Build_index_tuple/_Index_tuple (or __make_tuple_indices/__tuple_indices in clang) are nice.
 
@StackedCrooked where do you do the reverse? It would be interesting how you handle the case where the original text contained the literal \t (two chars)
 
@sehe Here at line 44. This is the encoding part done by the server.
The JavaScript code does the decoding.
 
@StackedCrooked Aha. So ... you don't protect existing \t --> these will get erronously decoded on the client. Also, why is this asymmetric? I'd expect both to be done on the server. (Hide implementation detail, prevent tampering)
 
Wait. Those are not builtins.
 
10:40 PM
So, yeah, I can see 2 issues with this: data corruption and leaking an implementation detail (security?)
 
@sehe The existing \t are changed to \\t. And at the client the reverse is done.
 
@StackedCrooked Why don't I see it. Also, the order in which substitution is done is crucial then. Lemme recheck
 
@sehe The client only decodes the data received from the server.
The paste is served with this command:
out.write(File.read("Archive/#{loc}/main.cpp").gsub(/\t/, "\\t") + "\t" + File.read("Archive/#{loc}/output").gsub(/\t/, "\\t"))
Shorter: a.gsub(/\t/, "\\t") + "\t" + b.gsub(/\t/, "\\t"))
I don't take as much pride in JavaScript and Ruby programming and this tends to negatively affect code quality.
 
It's corrupting, alright. I entered std::cout << "Just\t\\t\tchecking\n"; -- izzamahpoint
 
There's also the fact that the editor changes tabs to spaces.
lol
 
10:45 PM
@StackedCrooked irrelevant
 
Hmm, @Luc had told me they were not builtins before. Where the heck did I get the idea that they were.
 
@sehe Where is it corruped? In the top source panel or the bottom output panel?
 
I want builtin index generators :(
 
@R.MartinhoFernandes I think, maybe, because clang has them?
 
Nope, not builtins there either.
 
10:46 PM
@sehe I understand your point now.
 
@StackedCrooked Both
 
And I am not sure if clang's implementation is as good as GCC's.
 
@StackedCrooked :) classical escaping conundrum: you need to avoid 'legitimate', non-escaped occurrences of \t
@R.MartinhoFernandes mkay - I'll trust you on that
 
GCC used to have the implementation that I have seen on libc++, but they changed it to a more performant one.
 
-3
Q: Proper way to inherit with c++ (public inheritance including indirect inheritance)

user1544624I am working on small c++ program as an exercise on public inheritance which consists in creating multiple classes with each one inheriting from the previous one (public inheritance). Basically this is the the layout: class point class circle (inherits from point) class cylinder (inherits from c...

What a great exercise! ...nope.
 
10:49 PM
@sehe That's my bug then. I escape TAB, but not "\t" .
 
user142019
0
Q: Using macros to generate a class at compile time

jlanisdevIs it possible to construct the class below using macros? struct ModelName { public: typedef std::string type; static type get( const GameObject* obj ) { return obj->getAttribute< type >( MODEL_NAME ); } }; In other words, I would like to generate the above co...

 
user142019
Chanceless.
 
So then TAB => "\t" and original "\t" are mixed.
Dammit.
 
user142019
Five people suggesting templates.
 
user142019
Add more comments!
 
10:50 PM
Is there a general escaping algorithm?
 
@Zoidberg'-- lol
 
@StackedCrooked Bust the door and get out.
 
@StackedCrooked Seriously, just use base64 or something?
 
0
A: Using macros to generate a class at compile time

GManNickGSure: #define DEFINE_ATTRIBUTE(classname, attributeName, attributeType) \ struct classname \ { \ typedef attributeType type; \ ...

Damn :(
 
user142019
lol @ all those comments. Priceless.
 
10:52 PM
@sehe I'm clinging on to the idea that wget should return the plain text.
 
Templates would be nice, but your keyboard would have to support the '<' and '>' characters... — sehe 1 min ago
 
> error: template instantiation depth exceeds maximum of 900 (use -ftemplate-depth= to increase the maximum) instantiating 'struct wheels::make_indices<124>'
 
@StackedCrooked Nothing contradicts that, right. Perhaps, you could just use something illegal or unlikely as a separator. Such as: \n#pragma wholly fuck this is a hidden delimiter!
 
user142019
@sehe what about it?
 
@Zoidberg'-- I suck no longer
 
10:54 PM
I was defeated :(
 
user142019
@sehe oh miscopy lol
 
@R.MartinhoFernandes You can just 'up' the limit, right
@Zoidberg'-- Happens too often to me
 
@sehe That would be admitting defeat.
I need even more efficient index generation.
 
user142019
@sehe noob
 
Time to multiply by adding.
Or something like that.
 
10:55 PM
@R.MartinhoFernandes I smell a divide-and-conquer algorithm, cutting the task in factors of 2
@R.MartinhoFernandes Prezoisely
 
B+sizeof...(A)... looks weird.
3
 
user142019
lol
 
What's the second expansion for?
 
Also, I have a feeling GCC will barf on it.
@AndreiTita There is only one expansion there.
The first ellipsis is part of sizeof..., the "length of pack operator"
 
@R.MartinhoFernandes Mhm, correct. Then what's the expansion for?
 
11:03 PM
@chris I addressed the issue of trigraphs for < and > and excessive keyboard wear at this related question: stackoverflow.com/questions/12314737/…sehe 4 secs ago
 
And ... is for B, right?
 
@AndreiTita B is a pack.
@Griwes Yes.
It is for rebasing a series of indices.
 
@R.MartinhoFernandes I see now, thanks.
 
A little side note: No macros are there at compile time. — G. Kayaalp 5 mins ago
 
I take two sequences, like { 0, 1, 2 } and { 0, 1, 2 }, and put them together rebasing the second so I get { 0, 1, 2, 3, 4, 5 }.
 
11:04 PM
Good one.
 
@R.MartinhoFernandes That's the indecisiveness operator, it's a notion taken from quantum computing (very nice when implementing the dining philosophers problem)
 
#define templateFor(T) template<class T>
Oh gawd.
 
@R.MartinhoFernandes That old one. I loved that one
 
user142019
Man.
 
Woman.
 
user142019
11:07 PM
I wish Erlang had Ruby-like string array literals.
 
user142019
Like %w{foo bar baz}.
 
user142019
Instead of ["foo", "bar", "baz"].
 
I wish you had ketchup flavoured crisps
 
user142019
Me too.
 
@Zoidberg'-- That's actually inherited from perl (qw#foo bar baz# or qw(foo bar baz) etc)
 
user142019
11:09 PM
Ah whatever. :P I wish Erlang had it.
 
Btw, I feel like I should share this trick for making macros that allow (well, require) the user to put semicolons after uses of it: leave static_assert(true, "") at the end of the macro definition. Works on pretty much any scope, is harmless, clean, self-contained, and does not allow any other token after it.
 
@Zoidberg'-- I was almost going to mention it the other day
 
> (The missing semicolon is normal; it forces/allows the use of a semicolon after the macro.)
This reminded me.
 
@R.MartinhoFernandes why not the classical do { /*block*/ } while(false)?
 
@sehe Try doing that in class scope.
 
11:10 PM
@R.MartinhoFernandes I hate how BOOST macros generally don't force this. Which invites a whole slew of compiler warnings when you do add the ; when it's redundant
@R.MartinhoFernandes Ah. That way
 
@sehe Exactly, that's the motivation.
 
Sorry guys :( I wasn't thinking this through. — jlanisdev 2 mins ago
^ capitulation received
 
:D
 
@EtiennedeMartel SimCity 2020?
 
11:15 PM
@sehe SimCity. You know, the next one. Because numbers are so last decade.
 
Was a joke...
 
Fuck yeah pastebin.com/iFXZjGP7 (see compilation time at end)
 
@R.MartinhoFernandes Scott Meyers compiled it?
 
11:27 PM
Whoa you compile with -Werror
 
user142019
I am eating a sausage roll with a rookworst in it.
 
Though.. I fix warnings too.
 
@Borgleader Hm. Reminds me of that part in Extra Credits' review of Spec Ops: The Line, where they essentially explained that the publishers feel like they have to include multiplayer in every game because otherwise reviewers will pan it.
(Cue the reviewers panning Spec Ops' multiplayer)
 
[rmf@persephone sandbox]$ time g++ -std=c++11 -Wall -Wextra -pedantic -Werror -ftemplate-depth=2000 old-indices.cpp

real    0m1.394s
user    0m1.288s
sys     0m0.088s
[rmf@persephone sandbox]$
 
-Werror is a little bit too counter-productive for my tastes. I fix all warnings but I often prefer to leave them in while they point to unfinished code.
 
11:30 PM
@R.MartinhoFernandes Persephone is Scott Meyers' dog's name IIRC.
 
Ooops, tis buggy.
@Borgleader I name all my machines after females from Greek mythology.
 
Nevermind that. You are essentially saying the same thing.
 
@R.MartinhoFernandes Huh... I name all my machines with names starting with A (Asgard, Albion, Adjutant, Ajunta-Pall)
 
No, tis not buggy.
 
@Borgleader Me too!
 
11:33 PM
WTF GCC. I left a trailing comma in the expected type and it complains that the static assertion failed...
 
@EtiennedeMartel Well in a lot of cases it does add some value when done right.
It also lowers the amount of used sales because people hold on to the game to play multiplayer.
 
@Borgleader It also takes away resources from the single player mode.
Many times, I see games that lack polish with a multiplayer experience that feels tacked on, and I wonder "Why did they?"
 
Ok, tested and it works with non-powers of two too.
 
@EtiennedeMartel Not necessarily. It's possible they planned it from the get go with multiplayer in mind.
 
Don't add multiplayer if it's not going to be good.
For something like Tomb Raider? What about BioShock?
 
11:35 PM
Bioshock 2 was bad all around.
 
@Borgleader Yes, but the single player could have used more polish.
 
Oh sure
I'm just saying it's not necessarily the case everytime.
 
@Borgleader Hell, BioShock was bad all around.
 
And sure, Bioware pulled it off with Mass Effect 3 (but that's probably because the multiplayer was done in Montreal).
@DeadMG Tsss, you're just bitter because it wasn't as hard as SS2.
 
@EtiennedeMartel The MP for TR is also done in MTL
:PPPPPPP
 
11:38 PM
@Borgleader OH SHIT
 
Read the article
 
@EtiennedeMartel SS2 is not hard.
 
Never mind then.
It's gonna rock your socks.
 
@EtiennedeMartel Pff. I'm bitter that it sucked, and the ridiculously low difficulty was just one aspect.
 
user142019
Ruby on Fails
2
 
11:47 PM
^ Ruby
 
Impossible for me to spell everything right in this
 
And this is why I dislike the stock exchange
 
s/stock/stack/
:P
 
lololololol
 
int n = -2; unsigned u = n; why no warning?
 
11:53 PM
Because that is well-defined.
assert(u == UINT_MAX-1);
 
... that's not a good reason not to give a warning.
Expecially since I get one if I try to initialize from a negative constant.
 
MSVC sucks?
 
Tried it on Coliru too, although I dunno what warning level it uses.
 
AFAIK everything.
Gives no warning without either version.
 
That one doesn't give a warning when initializing from a constant either.
Yeah.
 
11:57 PM
At least consistent behaviour makes sense.
 
hmmm
maybe tomorrow I can actually get back to doing things
 

« first day (810 days earlier)      last day (4154 days later) »