« first day (1246 days earlier)      last day (3928 days later) » 

00:03
Hm. I have a dumb question about program constraints. If I'm in a const member function foo(), I can't call a non-const member function bar(42) even though bar() never modifies the object when called with argument 42. On the other hand, if I'm in a noexcept function fizz(), I can call a non-noexcept function buzz(42), because buzz() will never throw when invoked with argument 42. What's a good way of justifying this asymmetry?
dyp
dyp
@AndyProwl IIRC Meyers showed a technique to apply DRY to const/nonconst member functions like operator[], where he delegated and applied a const_cast.. so that's possible and sometimes useful. One would need some equivalent for exceptions..
Ugh const_cast
Yes I know it's possible to do that, but my question is not about complying with DRY nor about design of programs. It's more about language design
Also, it might be a silly question
But I find the asymmetry interesting and I'm wondering what considerations apply
dyp
dyp
I don't think it's silly. When writing some noexcept functions lately, my static analyzer warned me about some possible exceptions in functions that I've missed. Would've been nice when the compiler warned about them too (or raised an error). I think the asymmetry is in const_cast, for which there's no equivalent for noexcept. If there was, one could enforce calling only noexcept functions or functions marked with this equivalent of const_cast.
(it would have to applicable generally to expressions and in mem-initializers, though)
ah, I see what you mean
dyp
dyp
00:14
@AndyProwl Oh! There's been a proposal for a noexcept block.. that would've been the equivalent.. see akrzemi1.wordpress.com/2011/06/10/using-noexcept
@AndyProwl noexcept is broken and const is only somewhat broken.
also because every fucking function ever that is noexcept isn't marked noexcept because pre-noexcept code.
dyp
dyp
@AndyProwl The proposal that contained the noexcept-block: open-std.org/jtc1/sc22/wg21/docs/papers/2009/…
@dyp Yep, found it too
hmm
unique_ptr not working with incomplete types is sometimes a bitch.
@DeadMG So given no specifier, you would rather assume the function noexcept?
Ah
00:20
no, it's an unsolvable broken proposition.
I see what you mean
that's why the feature's not Standard.
the noexcept block would solve that
no, it wouldn't.
since you would only be able to call other functions that are marked noexcept- i.e., hardly anything, ever.
no, that's not how it would work AFAICT
if you're in a noexcept function and want to invoke a function that is not noexcept, you wrap the call in a noexcept block
dyp
dyp
00:25
@DeadMG "unique_ptr not working with incomplete types [..]" but you can use an incomplete type as a template parameter.. so the problem is the dtor of unique_ptr?
@dyp Yeah, it's inconvenient that way.
@DeadMG You can make it work by defining a destructor
@AndyProwl Ah yeah I didn't read the whole proposal, but you'd still have to wrap most function calls in a noexcept block, which would be rather arduous.
@Rapptz destructor, and I already did that, it's just irritating :P
oops
yeah dtor
dyp
dyp
@DeadMG True.. the whole implicitly-defined machinery won't work, and AFAIK you can't explicitly default out-of-line..
00:26
Both constructor and destructor, no?
(If I've understood the context)
@AndyProwl Nope just destructor.
@DeadMG Like, for a class X that holds a unique_ptr<T> as a data member, with T being forward-declared?
yep.
dyp
dyp
Actually, why isn't it possible to default an out-of-line definition of a function? Could be useful as well for separate compilation.
dyp
dyp
00:31
Oh, or is it possible?[dcl.fct.def.default] has some example of it..
One more note: A class constructor will reference the destructors of its members (for the case where an exception is thrown, those destructors need to be called). So while unique_ptr's destructor needs a complete type, it is not enough to have a user defined destructor in a class - it also needs a constructor. — Johannes Schaub - litb May 2 '12 at 19:43
@DeadMG Isn't this ^ implying a constructor is also needed?
only if unique_ptr's data members throw on destruction, which I'm pretty sure they don't.
and I'm also pretty sure that all of unique_ptr's constructors are noexcept.
dyp
dyp
@DeadMG Doesn't this also apply to the other data members of the class in which the unique_ptr is a data member?
Hello
they have nothing to do with the situation of unique_ptr itself.
dyp
dyp
00:34
I.e. the unique_ptr's dtor is used when another data member throws an exception on construction
@ScottW bbl?
hmm
I'm pretty sure it needs a constructor as well. But I'm going to make an experiment
yes, I suppose that's true.
dyp
dyp
Btw I read n3485 again and it seems possible the default the out-of-line definition of a special member function. => it's still not nice, but much less work than defining them yourself
00:36
I invoked litb
> 2>c:\code\wide\wide\semantic\analyzer.cpp(162): fatal error C1001: An internal error has occurred in the compiler.
fuuuu
@Jefffrey be back later
VS trying to prevent itself from becoming obsolete.
@Rapptz oh, right, thanks
00:41
@ScottW listened to more special herbs once I got home, currently at vols 5-6
I really can't find anything to dislike here, it works in the background for all I do lol
@Jefffrey: imposed by policy. tl;dr; inter-compilation unit order of static initialization is unspecified. — BCS 6 hours ago
I love it when tl;drs are longer than the text itself
dyp
dyp
Are there any HTML versions of the Standard / drafts? (I know of the latex sources and PDF documents, but HTML/XML?)
@Jefffrey The tl;dr is the tl;dr of the policy, not the preceding text.
no.
yeah, I know
I tend not to read carefully
dyp
dyp
I rephrase my question -- Is anyone interested in a HTML version? Something that could be copy&pasted directly into SO with proper formatting?
00:50
@dyp Most of them are here (in HTML)
why should we believe you now? :p
@Jefffrey No it isn't
@dyp Just use htlatex
@Rapptz what isn't?
have you clicked those html files?
dyp
dyp
@Jefffrey I could only find some proposals and editor's reports as htmls..
00:52
@dyp yeah, nevermind
because they don't output html files
dyp
dyp
@Rapptz Thanks, I'll try that. I already tried pandoc with... not really great results (even though there's a special pandoc branch in the github repo with some fixes)
just do a git clone and then use htlatex source/std.tex
dyp
dyp
(just not sure how all those custom macros can end up as proper html w/o the semantics/context)
λ git clone github.com/cplusplus/draft
Cloning into 'draft'...
remote: Reusing existing pack: 4413, done.
Receiving objects:  24% (1060/4413), 29.01 MiB | 1.51 MiB/s
this is huge
:v
dyp
dyp
00:55
@Rapptz IIRC mostly the included PDFs etc
well let me try it first
dyp
dyp
seems some styles are pdf specific, and htlatex is using dvi output per default..
what styles?
dyp
dyp
(probably the wrong word.. they're called packages, right?)
yes
they didn't make any packages though
dyp
dyp
00:59
usepackage pdftex... <- probably that one
hmm, shit.
every distribution I know of comes with pdftex
the interface offered by the constructor overload set and the constructor type are actually different.
dyp
dyp
yes, but the question is if htlatex can use it
01:01
you don't use TeX very much do you :v
dyp
dyp
well I hacked with it a bit lately.. just trying to get some useful html out of the latex sources
sup bitches
I can't sleep
welcome to the club
cockface :P
who changed the Lounge name back to Lounge<C++>??? What's wrong with you?
@DeadMG I feel welcome :)
I did have a 5hr nap earlier
I did
01:03
might explain
@Rapptz oh you
What to do is the question?
I'm in no mood to write code, really, or am I?
@dyp It's gonna take a little bit of hacking around
if you do array[globalVariableName++], does it increment that global variable, or only go to that index +1?
dyp
dyp
@Rapptz Yeah... seems like it. I removed the pdftex package and tried only to include the first chapter in std.tex, but there's still something wrong (maybe some macro call from pdftex now not getting properly resolved). Anyway, thanks for the hint. -- off now, bye
see ya
it's rather old though
01:22
I have eaten nothing all day
LUCKY YOU
I should get food
I'm starving so I might eat like 15 chicken wings
user3010322
My meal plan is now useless and I have to cook for myself.
user3010322
Bacon. Bacon for days.
user3010322
I've hatched an evil plan that involves me in a dress and pretending I'm gay.
user3010322
Absolutely nothing can go wrong!
01:42
@StoneyB: That's certainly your prerogative. On the other hand, I, as a native speaker of English, i.e. being from England, have a full understanding and appreciation of its power of sarcasm and so forth. — Lightness Races in Orbit 51 secs ago
trollololol etc
someday I'll learn how to actually into program
Qt Creator debugger sure is great.
:D
for someone who can't use gdb like me anyway
user3010322
02:05
Oh, I forgot to ask.
user3010322
Anyone wanna team up for the game jam?
I'm not even sure I will join, I'm a little bit late with studies for the exam on monday
user3010322
@Borgleader Are you jamming? And if so, want to team up? :D
I lol'd
damnit that "Noooo no no no my turn let's gooooooo!" bit is funny everytime I look at it
02:20
@AlexM. In my head they are dancing this in the last frame
<3
@Jefffrey I had Sonic the hedgehog in mind throughout the comic
in my head it makes sense for some reason
the new ones are good too, look at this:
because it would make sonic happy :(
@AlexM. lol
and I'm still awake
why???
@TonyTheLion to watch this I believe
@Jefffrey WTF is that???!
02:28
@TonyTheLion ask alex
he was the first to link a video to that channel
this is obviously from /v/
I deny everything
I never touched drugs
@Jefffrey this is one dumb comic.
02:32
Jesus christ google, if I want to link a comment on fucking youtube, I want you to point to it... not to the beginning of the page
Mac users tend to be dumb
@Jefffrey Be glad linking to a comment actually works
also XML default program is IE
I don't think it's ever been VS for as long as I've used it
VS rebinds that
@CatPlusPlus at least they add a "linked comment" tag on the comment FFS
it didn't for me!
guess I'm lucky
02:33
At least sometimes
MS installers are all kinds of bad
my tilemap is all sorts of buggy
the true game developer experience
03:15
no article?
also I just ate like a beast
too full
hi, I've positioned myself well as a Python expert, but now I need to learn C++. Will examining the CPython parts written in C++ help?
no
Read a book. The link is stickied --->
So, who wants to team up with me for the jam?
03:30
I don't want to write C++ that sucks. A lot of Python books suck. Won't it be the same for C++?
A lot of C++ books suck. That's why we keep that list of the good ones.
Yeah I did specifically mention the list here which is "peer reviewed"
@R.MartinhoFernandes Maybe me.
Speaking of peer reviewing...
> This book is an extended version of the material that constitutes Chapters 2-5 of The C++ Programming Language, 4th edition.
Who wrote this?
I've been working on this thing
@R.MartinhoFernandes lol no git blame eh
can't find who did it
03:35
lol wtf someone added the C tag to it.
iirc I removed it
oh it was TemplateRex
edit #77
Ah, @TemplateRex, it seems.
It's not extended in any way.
maybe his old link was
03:36
Unless by extended you mean extended with mistakes.
but it 404'd and I replaced it
I checked it and it is pretty much the same as TC++PL4, with the difference that TC++PL4 has been copyedited.
I don't really care for "learn Python the hard way" but if I was completely new to Python, I suppose slogging through it quickly would be a good first step. I see someone's working on a C++ sort of version of it. Any opinions?
@AaronHall Link?
03:39
it's probably shit
so maybe not
C doesn't really count.
what's the layer below Boost?
I didn't like Learn X the hard way
some sort of templates
03:39
huh
you lost me
Three letter acronym
still lost
std?
I would think I'd remember that one...
Any book that pretends C++ is like a different/expanded/slower/whatever C is garbage.
that doesn't seem right
ok, so not C
03:40
@AaronHall STL?
that seems right
oh right
I forgot people still use STL
Don't use it around certain people. They'll shoot you for it.
I was told to learn STL
tell them they're bad
03:42
by a guy who used to work with another guy I respect a whole lot and who he is going to partner with
btw speaking of STL, I was looking at JSON libraries I found one that said "Doesn't use Boost or STL" under minimal dependencies
The correct name is just "standard library".
I usually interpret this as "absolute garbage"
...
STL = standard library?
user3010322
stdlib
user3010322
03:42
SL
@AaronHall Yeah, that's what people mean when they use that, yes.
user3010322
Some people understand STL, others have a conniption.
Most of the books in the list cover it.
so when someone says "don't use boost or stl" what am I supposed to think?
The Standard Template Library (STL) is a software library for the C++ programming language that influenced many parts of the C++ Standard Library. It provides four components called algorithms, containers, functional, and iterators. The STL provides a ready-made set of common classes for C++, such as containers and associative arrays, that can be used with any built-in type and with any user-defined type that supports some elementary operations (such as copying and assignment). STL algorithms are independent of containers, which significantly reduces the complexity of the library. The...
03:44
cause I always see it and it confuses me a bit :v
how would you write something without the standard library?
it was me
I admit it
So what do you say?
can I buy it?
@Crow unnecessarily big
@ScottW Look at my subtract, baby.
Aaron Hall's are not all made alike. Some of us are washed-up R&B one-hit-wonders
03:46
taking back that lame joke eh Crowz
it was too lame even for me :(
But at least my name isn't Michael Bolton.
Oh your name is Crow now
makes Office Space allusion, hopes it goes over well
the game jam is tomorrow at 3 PM EST?
user3010322
03:49
@Rapptz For us East Coasters, yeah.
user3010322
I'm still wondering if anyone wants to team up, particularly @Borgleader.
user3010322
But he's probably busy. :(
user3010322
For the GameJam being tomorrow, the pin on the starboard isn't very indicative of that.
@Rapptz I won't be around when it starts, though.
user3010322
OOH
user3010322
03:51
TEAM UP WITH ME
user3010322
I'll teach you Furrovine and everything. :D:D:D
What happened?
user3010322
Memememememememe
iunno
no noobs allowed
I'm contemplating having a submodule with a submodule
I feel like it's a sure fire way for insanity
user3010322
Meeeeeeee pick meeeeeeeeeeeeeeeeeeeeeeeeee. ;~;
03:53
@R.MartinhoFernandes What language would you use btw?
user3010322
Oh well...
I like taking the opportunity to not do C++, but I'm ok with it.
@ThePhD I thought you weren't taking part.
user3010322
I was going to attempt to convince you to enter into my parallel Game Jam.
user3010322
With us as the only team (so far).
@R.MartinhoFernandes C++ isn't that bad :(
user3010322
03:55
@Rapptz Yeah, it's horrible. :b
@Rapptz No, I mean taking the opportunity to vary a little.
I got my action thing working smoothly
I'm pretty proud about it considering it took 2 days
hey could you not onebox amazon links please :v
prefix it with >
Sorry, first time
03:59
@AaronHall that is a reference book, not a book to learn the language
Didn't realize Amazon was so obnoxious. So that's by Bjarne and for 11, everyone like it?
I have the hardcover edition.
I use the Python docs religiously, and I still learn from them daily.
I tell people mostly to do the Python tutorial in the docs and then read the basics in the docs.
So maybe this one is right for me?
yeah but C++ isn't Python and you shouldn't go into the language thinking like that.
Also for docs I'd use en.cppreference.com/w/Main_Page
cool a deque
04:03
are.. those scapulae in the C++ Primer 5th ed book cover?
Oh.. that's supposed to be 11
damn you a&p
@R.MartinhoFernandes Still disgusting as ever
Compiler and OS. I'm just going to use GCC on Ubuntu Linux, any objections?
nop
nope, or no-op?
04:09
nope
So I wiki'd @Mysticial's branch prediction answer by rolling back a less-than-stellar edit
I'm not sure that rollbacks should be counted into auto-wiki, but it is what it is
remove the wiki
Yeah @Mysticial if you want the wiki gone let me know
@BoltClock it's pretty dumb that it does and I bet it has on it
lol wtf
9
Q: Have rollbacks not count towards community-wikiness

Nikana ReklawyksI think rollbacks shouldn't count towards posts becoming Community Wiki posts. If there is no change in content, the post was not generated by the community, but keeps being written by the original poster. If different users suggest and rollback edits, happen it twice and any single edit (e.g. t...

I'm going to have to report a bug
04:18
someone with 11k rep made that crappy edit?
@Rapptz Meh. 11k rep is nothing these days
hey man, I have like 8k
lmao
Did you farm any of it on easy bikeshed questions
04:21
I don't even have a bike.
Me neither
1
Q: Rollbacks should not count into auto-wiki

BoltClock's a UnicornSo I rolled back a poor edit on Mysticial's branch prediction answer and inadvertently turned it into a community wiki: Not a big deal, until I realize that my rollback should not have caused it to become a wiki. Apparently it's not supposed to and it was never supposed to, at least until now....

Find it weird that @Mysticial isn't here. He's usually on meta 24/7
4
Q: (x-y)/y vs (x/y)-1

SamizdatI'm trying to understand what is probably a fairly simple math concept, but this is escaping me for some reason. Why are the results of these two expressions equal? Thanks for any responses. $$\frac{x-y}{y}$$ $$\frac{x}{y}-1$$

Because (x-y)/y = x/y - y/y = x/y - 1...
this was on the hot question list
and the answer has 45 upvotes
04:31
Yeah
pretty amazing
Simple question simple answer
Questions that have multiple upvoted answers have a good chance of getting into hot questions too
is the OP massively downvoted or did they think the question was too dumb to be upvoted?
wish the 1k privilege was network-wide :(
The one time an answer of mine made it into hot questions
421
A: Can I use non existing CSS classes?

BoltClock"CSS class" is a misnomer; class is an attribute (or a property, in terms of scripting) that you assign to HTML elements. In other words, you declare classes in HTML, not CSS, so in your case the "target" class does in fact exist on those specific elements, and your markup is perfectly valid as i...

I've had two.
but both yielded < 100 upvotes
04:32
The question has just barely half the score of my answer. And I'd left a comment reminding people to vote on the question and not just the answers...
Apparently some people abstain from voting. At least I'm not alone lol
(I upvoted the question though)
To be fair
That math question
would have stumped like half of my classmates in secondary school
trufax
glad I'm not bad at math
@Boltclock yes please! Was out to dinner and didn't check until now.
Confirmed @Mysticial is still a rep whore
2
told ya
04:37
@BoltClock What else is new :P
> Mod Removes Wiki by BoltClock♦
:D:D:D
4
Q: Rollbacks are counting into auto-wiki when they shouldn't

BoltClock's a UnicornSo I rolled back a poor edit on Mysticial's branch prediction answer and inadvertently turned it into a community wiki: Not a big deal, until I realize that my rollback should not have caused it to become a wiki. Apparently it's not supposed to and it was never supposed to, at least until now....


« first day (1246 days earlier)      last day (3928 days later) »