« first day (871 days earlier)      last day (4086 days later) » 

12:00 AM
@Telkitty You haz a windows phone?
 
user142019
If I were nominated for mod election, my statement would be "Why not Zoidberg?"
 
Funny thing I've noticed, it seems people are more inclined to mention their age when they're younger.
 
@Zoidberg go nominate yourself
 
In the election it seems only the people 16 and younger even bothered mentioning their age.
 
user142019
@MooingDuck nominations are over.
 
user142019
12:04 AM
Next time. :D
 
@Zoidberg cheat
 
user142019
I'd be a terrible mod.
 
user142019
But yeah, Stack Exchange needs a new mod pack.
 
Nah, I can't do it.
 
Xeo
hrhr
also, lol Robot making a CW answer just to get your gold C++11 badge. :P
 
12:07 AM
@Xeo I made it CW because it's just a quote of myself and a link.
But it is the answer, and the question is not a dupe.
 
@Zoidberg well, obviously. We want you nominated. We don't want you to win.
 
and if you talk about me being unhealthy and dying i will roll my fat body onto your face while you are sleeping and kill you.
That Twitter account is a fucking gold mine.
 
user142019
lol
 
@EtiennedeMartel right
 
user142019
Many religions worship Me but only one does so correctly. The others are in procedural error, and thus all of their members will go to hell.
 
user142019
12:08 AM
That bastard.
 
0
A: Using boost::spirit to parse multiple types of single value

seheThis is a fun exercise. Of course, everything depends on the input grammar, which you conveniently fail to specify. However, let's for the sake of demonstration assume a literals grammar (very) loosely based on C++ literals, we could come up with the following to parse decimal (signed) integral...

^ Think I'm overdoing it ?
 
user142019
When this song is over, ga ik slapen.
 
add <!-- language: cpp --> or the C++ tag? :|
 
@Xeo How is CW related to that?
 
it looks weird without syntax highlighting tbh
 
12:09 AM
@Zoidberg Ah, it's not a quine :(
 
user142019
@sehe it's hello world!
 
@Zoidberg Are you listening to that 10hour non-stop pancakes song?
 
user142019
@sehe no.
 
Xeo
@R.MartinhoFernandes Nvm it, I was just kidding, since you seem to want that C++11 gold pretty badly.
 
"non-stop pancakes song"?
Do I want to know?
 
user142019
12:10 AM
I'm listening to Stirb nicht vor mir by Rammstein.
 
@Xeo My answering rate says otherwise, btw. :P
 
I'm listening to Beat It by Michael Jackson..
 
@MooingDuck [Star wars] - "Let the Zoidberg win!"
 
@Rapptz You know, I'd never have noticed the missing syntax highlighting. I'm just that hardcore
 
I'm one of those people that needs syntax highlighting.
Makes it easier to read
 
12:11 AM
@Xeo Actually, I've been contemplatinng getting bronze .
 
Xeo
@R.MartinhoFernandes Yeah, I see you've been making advances in that direction.
 
But that tag is boring.
 
Xeo
Who'd have thunk
 
And much PHP.
 
Xeo
Anyways, sleepy time.
 
user142019
12:13 AM
Haskell haz thunk.
 
user142019
@Xeo Goodbye and sleep well.
 
@Xeo Hmm, I'm on the same timezone. That reminds of something...
 
@MartinJames That's a misattribution. It's [the musical "Hair"] - "Let the Zoidberg in!"`
 
Xeo
G'night and stuff
 
@R.MartinhoFernandes "That is not the language you are looking for"
 
user142019
12:14 AM
Oh now I'm listening to Morgenstern and I didn't even notice the transition.
 
Hello
 
posted on March 04, 2013 by Andy Rich

Hi, I’m Andy Rich, a QA on the C++ team.  Earlier this week, the C++ team released the C++ REST SDK (codename “Casablanca”) on CodePlex (http://casablanca.codeplex.com).  This blog post will walk you through using the C++ REST SDK to connect your Windows Store apps to Windows Live services.  This example demonstrates how to grab information about the user’

 
user142019
Hello master
 
Most of the questions there are RTFM, really.
 
Worms remain to be hilarious when played hotseat
 
user142019
12:15 AM
Worms are tasty.
 
Also rum is pretty good
 
user142019
 
user142019
Worms. <3
 
It's a secret!
Also, yes you thought I was overdoing it, apparently :)
 
user142019
Dammit sehe.
 
12:17 AM
once my buddies and I played SC2 where each player had to take a shot/drink before each game. Started out like normal guys playing SC2, dissolved into hilarious. Final game, one guy attempted to zergling rush the other player, forgot it was a novice map. Luckily, his opponent attempted to rush mutalisks.
 
user142019
Now I demand want pancakes.
 
Man, text(Container&&) is quite tricky.
 
@R.MartinhoFernandes yes
 
@Zoidberg Wut?
 
user142019
@R.MartinhoFernandes Why not iterators?
 
12:17 AM
@Zoidberg Oh aha
 
user142019
32 secs ago, by Zoidberg
Now I demand want pancakes.
 
user142019
Dut.
 
user142019
@sehe I agree.
 
@Zoidberg Because since my class is a container wrapper, I think it's nice to have the option of simply sticking a pre-existing container in it.
 
0
Q: Naming convention for methods with a single boolean argument

eyecarverI have a method with a single boolean argument. I can't decide what to call it: reportSuccess(boolean success) reportResult(boolean success) or use an enumeration for the argument, like reportResult(ResultEnum result) or use two methods reportSuccess() and reportFailure() What i...

 
12:18 AM
But the trouble is that I need to validate before moving.
 
user142019
@sehe Especially when the language has decent syntax for it and you don't have to deal with a billion callbacks (as is the case with Node.js :< without IcedCoffeeScript).
 
@Zoidberg Asynch IO is fun
 
Xeo
@Rapptz Oh how nice named bool switches would be~
 
Is it morning already?
 
user142019
@R.MartinhoFernandes Nein!
 
12:19 AM
I usually do the two methods thing.
 
Asynch I/O is overratted
 
Xeo
Shaddup, you know how "going to sleep" in the Lounge works
 
@R.MartinhoFernandes How so? Do you see a bright light at the horizon?
 
Xeo
Also, what if it is? :P
 
It's not morning
 
12:20 AM
6 mins ago, by Xeo
Anyways, sleepy time.
 
I'm still up
 
@Xeo I would need to go to work.
 
@MartinJames who ratted over asynch IO?
 
user142019
$ ssh @R.MartinhoFernandes
$ su
# shutdown now
 
Xeo
12:20 AM
@R.MartinhoFernandes Well then, better run - because trains won't get you there right now.
 
@Xeo Busses replace the U-Bahn at night.
 
Xeo
Well, no, wait. I think the M trains and night busses might.
 
I actually got lost using them busses once.
:/
It actually felt great, because it was the first time I ever used German on the street.
 
user142019
Dammit. Attack failed.
 
Xeo
@R.MartinhoFernandes Yeah, I've been... despoiled (?) from the poor public transport here...
 
12:22 AM
lol
 
@sehe Oh fuck. I'm more pissed than 'ratted' Jock McSalughtered, winner of the 2012 'Mr. Fucked' competitiion.
 
Xeo
I mean, for example on Sundays .. earliest busses around here? 9am. FUCK OFF.
 
Meh, I'll go with // TODO: this is wrong for now.
@Xeo lol
 
user142019
I will now go into sleep mode.
 
user142019
Goodbye.
 
Xeo
12:23 AM
Also, every half-hour only on weekend.
Night
This is just so bad in comparision to Berlin...
 
-3
Q: C++ involving modulo, true and false values, if statements

Jossie CalderonIs there anything I'm missing? also, I am not including return(0);. I have not used it because I don't think I need it. What exactly does it do? Won't it return false? #include "stdafx.h" #include <iostream> /* Write a function called IsEven() that returns true if an integer passed to it ...

 
Xeo
@R.MartinhoFernandes // TODO: Write actual code
 
@Rapptz -3 already?
 
I didn't downvote it, but yeah
 
@Xeo Yeah, Berlin's awesome.
Damn city's growing on me.
 
12:24 AM
Needs 1 more close vote
 
Xeo
Anyways, 1:25 o'clock seems to be a good time to actually hit the sack. See y'all later.
 
night
 
@MartinJames Are you sure he won that year? I thought it was McSlaughtered
 
text(Container&& storage, Validation) Hmmm. Can't really move unless everything is valid.
That's annoying as heck.
 
@R.MartinhoFernandes Never been to Berlin. If ther is ever a lounge pissup, I want it to be there.
 
12:26 AM
@R.MartinhoFernandes how so? Would you be mutating storage as a part of Validation?
 
@R.MartinhoFernandes Actually, you cannot move.
 
@EtiennedeMartel Why not?
 
@EtiennedeMartel Only if you know you're not going to invoke Validation again
 
@sehe One validation strategy is to replace invalid data with U+FFFD, another is to discard it.
 
Come to think of it, the only issue is if Validation throws.
 
12:28 AM
This might be a stupid question, but what is the smallest set of types a language must support in order to fully utilize the capabilities of an x86 CPU ?
 
@EtiennedeMartel Nah, that one is easy: I make a separate overload for it, and it does a validation pass before moving.
 
@R.MartinhoFernandes Oh. That's... unfortunate. You might have to come up with an ugly 'copy on validate' optimization if the profiler were to tell you this is a problem
@Borgleader huh
@Borgleader I suppose: the native word size
 
I don't want to decode the source and reencode it. I may need to add more capabilities to encoding forms for this to work :/
 
@Borgleader That's complex, 'cos 8-bit supported, but slow re. 32-bit.
 
@sehe Well I mean... I look at the list of types in C++ and it sort of looks like there is some redundancy there... Like afaik longs and ints are the same size.
 
12:30 AM
For now, fuck it, no moves, unless throw_validation_error or skip_validation.
 
@Borgleader that's called abstraction. Even C called that one right
 
@Borgleader Not everywhere.
 
@Borgleader So yeah, I can see how you'd want to use the <cstdint> types everywhere, and you can. But you wouldn't want to 'toss' types out, just because they wouldn't fit nicely with a particular microprocessor architecture
 
I'm just trying to see which native types I should support
 
@Borgleader None. Abstraction. There is no need to include "native" units on your language level
Much like, there is no need to include registers in your language. Your language could be a pure stack machine. The implementation might generate instructions that use registers on an intel *86 arch
 
12:34 AM
So you're saying I should decide on the types I want to provide and then map those to native types?
 
@Borgleader Absolutely. What's the goal of this language?
 
Ease of use? But I don't want to limit the possibilities of those using it.
 
Personal nightmare - Win32 code written by ex-assembler developer. Twat tried to save every byte despite 2/4 Gb addreess space. I try to enhance it, fuckin' 256 overflow fuckin' everywhere.
 
If it's raw performance then you better design for good mappability to your target CPU/GPU/whatNotU
@Borgleader Oh god. Priorities. Pick one. Strike a balance. Decide
 
@Borgleader I've been considering making types like int0:4294967295, and making users typedef. Then provide int as a typedef for int0:4294967295 (or, the valid range for signed rather) for x86 (or similar) systems. But then users can have whatever range of int they want.
 
12:37 AM
Explicitly sized types are much better.
 
Then if users want specific ranges, they can do that, or they can use the built-in typedefs for whatever is "optimal" on the system.
@R.MartinhoFernandes referring to me?
 
So far I was thinking of providing: bool, char, int, float, double, string (not sure how i'll deal with unicode yet)
 
@Borgleader no short or long double or long long equivalents?
 
@Borgleader Missing byte
 
@Borgleader rename char to byte.
 
12:41 AM
> #define BYEBYE 666
@Zoidberg I sense anger in you
 
But you need char o.O
 
you need quadruple too you know, for Quadruple-precision.
 
@Borgleader no, you need byte.
@Borgleader tip: only C and C++ have char as an 8 bit integer AFAIK, because it turns out that's a bad idea.
 
typedef unsigned char byte;
 
@MooingDuck TIL long doubles exist. As for long itself I had always been under the impression it was redundant with int so I sort of forgot to consider it.
 
12:42 AM
@Borgleader I didn't say long, I said long long.
 
@Borgleader 8bit, 16bit, 32bit, 64bit.
 
you also need int128_t
for real men
 
@Rapptz Yeah - in every C/C++ I've written.
 
or just provide int0:4294967295 and figure it out.
 
12:43 AM
@MooingDuck aka byte, short, int/long, long long?
 
@MartinJames mmm. i'd make that typedef unsigned char byte if I had to have the typedef
 
@Borgleader I like fixed point as well.
 
EncodingForm::encode(EncodingForm::decode(storage, Validation{}), skip_validation) Writing this kinda hurts, but it's the simplest thing that works...
 
arbitrary precision! Rationals! Complex literals! XML literals!
 
@Borgleader according to visual studio those would be the associations.
 
12:44 AM
@sehe fixed.
 
@sehe char has a sign??
 
yeah
 
@sehe hey, x86 has fixed point operations at least :(
 
@MartinJames implementation defined, IYAM
 
@MartinJames sometimes
 
12:45 AM
@MartinJames char doesn't necessarily denote characters, it's sometimes useful to use it for small integers too
 
I think most do make it signed though.
 
@MartinJames char, unsigned char, and signed char are three distinct types, where char behaves like unsigned char, but may or may not be signed.
 
Oh, the world just got stranger..
 
ITT @MartinJames found out that he didn't know what that typedef, he included in every C++ he ever wrote, actually meant
 
@PLPiper so... byte.
 
12:45 AM
@PLPiper I don't think it's useful for numbers. Fine for denoting raw bytes.
 
room topic changed to Lounge<C++>: Breaking: The world just got stranger [c++] [c++11] [c++-faq] [no-helpdesk] [unsigned-char]
 
^lol
 
Fuckit - it worked.
 
> In New Zealand, people viewing adult websites -- it's unclear whether these are honeypot sites, or malware that notices the site being viewed -- get a pop-up message claiming it's from the NZ Police and demanding payment of an instant fine for viewing illegal pornography.
^ Well, have you ever/ splendid targeting
 
@MartinJames even stranger, even if char is signed, you can treat char and unsigned char like raw buffers for copying data to/from and other goodies, but not signed char.
 
12:49 AM
@MooingDuck , @R.MartinhoFernandes That's why I prefer the concept of "byte" rather than "char" it's really the only way I use it (char) directly
 
That's seriously messed up. Sounds like C++ alright
 
Ohh FFS, You want me to go back and screw up my code that works, or what? If I was sober, I would give afuck :)
 
@MartinJames as long as you weren't putting raw data into an array of signed char, you're fine.
 
Coding while drunk is always preferable. Especially in C++.
 
@PLPiper "Balmer Peak"
 
12:52 AM
I only do documentation while pissed.
Well, that and Lounge, obviously..
 
Hey can someone tell me how to test if all the lines in a FILE have been read, what will it return to fgets()?
 
@MooingDuck Lol I hadn't seen that =P
 
WHOA
Zoidberg completed something?!
I missed history?? D:
 
@ThePhD Hello world.
 
@Vlad "If the end-of-file is encountered while attempting to read a character, the eof indicator is set (feof). If this happens before any characters could be read, the pointer returned is a null pointer (and the contents of str remain unchanged)."
 
12:53 AM
I saw that on starboard, but thought I read it wrong.
 
Oh.
That's not really an accomplishment. D:
 
@MartinJames Nah, you read it right. He completed Hello world.
 
..but it segfaulted on exit?
 
That's what Zoidberg made
not me
 
12:55 AM
Well then should I test for fgets = NULL? Because that doesn't seem to work, it always reaches for the empty line. Or should I test for feof?
 
Test for the feof indicator
 
hey everyone, for SIMD stuff - is there any portable (C) way to make sure a structure on the stack is 16-byte aligned?
 
what is happening
 
@Vlad "If the end-of-file is encountered while attempting to read a character, the eof indicator is set (feof). If this happens before any characters could be read, the pointer returned is a null pointer (and the contents of str remain unchanged)."
@nightcracker there is in C++, I don't know about C.
 
@nightcracker Just new/malloc it already..
 
12:56 AM
@MartinJames: no thank you - stack please
 
:8067915 alignas(16) type variable;
 
@R.MartinhoFernandes linked article says alignas expects a type. O.o
 
Or std::aligned_storage<Size, Alignment>::type variable; if you want a raw buffer.
@MooingDuck Tis wrong :P
It accepts a valid alignment too.
 
@R.MartinhoFernandes C11, not C++11
 
12:59 AM
Oh.
 
K, thanks guys
 
@MooingDuck Why is that a bad idea?
 
@MooingDuck I know, he asked "how would you do it in C++".
 
@MooingDuck, ok thanks the feof check works fine. But if no characters can be read, I don't understand why testing for NULL didn't work. I don't think I understand this line of code properly, because I have used it in loops before and it always works. (Not using a loop now)
if (fgets(rawdata, 100, fp) != NULL);
 
However, I doubt alignas in C is very portable.
 
1:00 AM
@Borgleader because in no good context does a character fit in a char.
 
ASCII does
 
@Vlad it read data, so it didn't return null.
@Borgleader pft. and nobody should be using ascii anymore.
 
utf8?
 
@Borgleader Seriously, you live in Canada. Where É tienne lives.
 
@Rapptz code unit, not character.
 
1:01 AM
@R.MartinhoFernandes He said in no context. I was being an ass and found him one where it does. :P
 
@R.MartinhoFernandes because we didn't know how to do it in C11
 
@Vlad the method is designed to return an eof indicator afaik, perhaps in the loop if you read one past the eof it returns NULL? Not sure about that though.
 
@R.MartinhoFernandes as far as I can find, alignas in C only accepts types O.o
 
0
Q: Float and double output

utsPlease explain the output for different cases #include<stdio.h> int main() { float a=5.9; //a=0.9 if(a==5.9) printf("Equal"); else if(a<5.9) printf("Less than"); else printf("Greater than"); return 0; } When a is 5.9 the output is "Greater than"...When...

^^ AHHHHHHHHHHHHHHH
 
@Borgleader I said no good context for that reason.
 
1:03 AM
Oh I missed the good part
 
@R.MartinhoFernandes:

#if __GNUC__ || __IBMC__ || __IBMCPP__ || 0x5110 <= __SUNPRO_C
# define alignas(a) __attribute__ ((__aligned__ (a)))
#elif _MSC_VER >= 1300
# define alignas(a) __declspec (align (a))
#endif
 
Yeah, that's similar to what I used when GCC did not support it.
 
@PlPiper well wouldn't that sabotage my input? If i'm using strtok, that extra loop iteration shouldn't work properly? But I have never encountered any problems until now.
 
@R.MartinhoFernandes k, I found a doc on C11 that uses a number there. should be portable
 
So I guess char's size should vary depending on uh... the encoding used? or maybe I could just go unicode all the time.
 
1:04 AM
(Except I had some template magic to support both integers and types; that was a bit messy)
 
@Mysticial I voted to close as NARQ :D
 
@Borgleader now byte is still useful for 8 bits.
 
@Borgleader There's no reason to have the encoding leak anywhere. (Encodings are serialization formats)
 
@Rapptz It's actually an issue with float literals vs. double literals.
 
It's still the same FP crap. Voted close 'cos dup/dup/dup/dup/dup/dup/dup/dup/dup
 
1:06 AM
@Mysticial yeah that's why I always add f at the end
 
What I'm having trouble wrapping my head around is... if I provide string as a basic type. How am I going to handle these multiple encodings.
 
Don't.
Treat encodings as the serialization formats they are.
 
-1
A: Float and double output

Eric JohnsonFloating point numbers are inherently imprecise. For a quick introduction, you can read up a bit here. http://floating-point-gui.de/errors/comparison/ For some suggestions on effective comparison strategies, see this post. Most effective way for float and double comparison

^^ haha
 
@R.MartinhoFernandes Could you not have a string descendant that hasn an 'encoding' emum?
 
@R.MartinhoFernandes Well if I have string litterals in the code I'm going to have to handle it at some point, or maybe I don't get your point.
:8068022 C# has built-in string type and I find that to be very convenient.
 
1:09 AM
@Borgleader You should only need to care about encodings when you put strings out of your program, or when you get strings into it.
@Borgleader Yeah, and it leaks the encoding into your code :/
 
@Borgleader So we're ignoring all the places C# had to change/replace/redesign because they had a builtin string type?
 
I'm not aware they had to.
So, built-in string type -> bad idea.
 
@Borgleader String.Length() can no longer return the number of characters in the string
 
0
A: Float and double output

Dave LowerreWhen comparing floating-point numbers it is best to avoid '=='. This because some values cannot be correctly stored without some loss of precision. So it is better to say: if( fabs(a-5.9) < .0001 ) { // 'EQUAL' or at least near enough! } I know this takes more to compute, but it will ...

^^ And another one...
geez...
 
@Borgleader String.Chars[3] might not be a character (even if it's in bounds)
 
1:11 AM
Because of unicode?
 
@Borgleader I would not necessarily say that.
 
@Borgleader because they made it with UCS2 encoding, and then had to switch to UTF16.
 
FFs, I hate this unicode shit. It would be easier to nuke the Chinese/Koreans.
 
@Borgleader mostly because System::Char might not be a character in UTF16.
 
Obviously your only sane solution is to not support characters or strings at all.
 
@Rapptz at least, not in a way that you can't change/extend later.
 
@MooingDuck What?
 
@Rapptz That's a pretty shitty solution
 
Just don't leak irrelevant stuff into the interface.
 
Hey hey now. It's a beautiful solution.
 
1:14 AM
I.e. make "what encoding is string?" a nonsensical question.
 
@R.MartinhoFernandes to be fair, they didn't know they were. They did the same thing with wchar_t that you did with char32_t.
 
@MooingDuck In .NET? Oh, they did.
 
@R.MartinhoFernandes well, at least for Java. Dunno about .Net.
frick I'm late gotta go home bye
 
Surrogates were invented in Unicode 2.0, 1996.
Only Windows and Java get a free pass on that one.
.NET had no excuse for fucking up.
@Borgleader IOW, do as Python 3 does.
 
Does this look right?
  class node {
    public:
      node(std::unique_ptr<node>&& c1, std::unique_ptr<node>&& c2);
      node* child1();
      node* child2();
    private:
      // Children
      std::unique_ptr<node> c1, c2;
  };
 
1:18 AM
god
why does SIMD have every conceivable operation, but not something as simple as a bitwise rotate
 
@Pubby Is that a node in a tree?
 
@R.MartinhoFernandes It is binary tree node
 
Take the unique_ptrs by value.
 
@R.MartinhoFernandes why?
 
Now, lemme see if I bookmarked that discussion with the duck about unique_ptr for linked lists...
 
1:20 AM
I might have been a participant in that discussion
I suppose normal pointers will be fine
 
I thought you couldn't take std::unique_ptr by value?
 
92
A: How do I pass a unique_ptr argument to a constructor or a function?

Nicol BolasHere are the possible ways to take a unique pointer as an argument, as well as their associated meaning. By Value Base(std::unique_ptr<Base> n) : next(std::move(n)) {} In order for the user to call this, they must do one of the following: Base newBase(std::move(nextBase)); Base fromT...

 
Don't they only permit std::move semantics?
 
@ThePhD Of course you can.
Ugh, chat search sucks.
 
@R.MartinhoFernandes Thanks I'll watch that
 
1:22 AM
Actually, maybe I should have a pointer to a pair? I don't want to allow only 1 child.
@R.MartinhoFernandes That's helpful, thanks.
 
Well, the main issue with having unique_ptrs in the nodes is that you can easily get stack overflows on destruction.
It's a pity can't find the discussion easily :/
It had a lot more interesting ideas, and the realisation that that model of ownership is not the right one.
 
@MartinJames Personally I'd just stick with UTF-8 for everything. Have a look at the article "The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets (No Excuses!)" -joelonsoftware.com/articles/Unicode.html
 
I recall it depending on the order that unique_ptr deletes or something
the reset and release stuff
 
@R.MartinhoFernandes Who was it with? I can try to help
 
@Rapptz MooingDuck, and maybe the puppy too.
 
1:26 AM
brb have to eat
and no never mind, that wasn't it
doubt it was
 
I don't see myself there much.
 
@R.MartinhoFernandes This is the one I found: chat.stackoverflow.com/transcript/message/6288654#6288654
 
"Klingon is not unicode, I can explain why later." LOL
 
This one where the duck started not disagreeing with me:

unique_ptr in linked list nodes isn't great

Dec 15 '12 at 1:34, 12 minutes total – 21 messages, 2 users, 0 stars

Bookmarked 23 secs ago by R. Martinho Fernandes

 
I think this is what I'll settle on:
  struct node {
      rect const bounding_box;
      std::unique_ptr<std::pair<node, node> > const children;
  };
 
1:32 AM
@Pubby haha, that's from when I still believed it as a good idea.
 
My tree is pretty much immutable structure-wise so I think unique_ptr works
 
Nov 19 '12 at 19:14, by R. Martinho Fernandes
head = std::move(head->next) is how I'd erase the first node. (that said, I am not happy with linked list nodes with unique_ptr)
 
@R.MartinhoFernandes Heh, yeah. Are they okay for immutable lists nodes though?
 
@Pubby If you don't write destructors, you can get stack overflows (not as problematic on small balanced lists). If you write destructors, it maybe a tad tricky.
I am not entirely sure how I'd go about that.
 
When do the stack overflows occur? When it's doubly linked?
 
1:36 AM
@Pubby The root node owns the nodes at L1. So it destroys them when it dies. However, those own the nodes at L2. And those own the nodes at L3...
You get recursive destructor calls down until the bottom of the tree, and the the nodes are destroyed bottom-up.
It's a worse problem in a linked-list, though.
 
Oh, I see
 
A balanced tree can be very low.
 
I need to stop associating stack overflows with infinite recursion
I suppose large recursion causes them too!
 
Yeah.
A linked list with say, 100 nodes, could easily do it.
 
@DeadMG When you worked with shaders, what was your file nomenclature?
I.E., what did you name include files, how did you name your vertex/pixel shader files, etc.
 
r m
1:42 AM
anybody familiar with debug object naming for d3d11?
 
1:57 AM
42
 
they updated the bitbucket dashboard again
 

« first day (871 days earlier)      last day (4086 days later) »