« first day (447 days earlier)      last day (4500 days later) » 

3:00 PM
@sehe Readonly means you can't alter the reference or what it contains after the point of initialization (the definition as a part of the declaring statement in the class, or the constructor method of the class). This I still consider immutable, because a constant without the opportunity to initialize is useless.
 
@Potatoswatter It's an approach very much like the one I took to solve it but mine had the added complication of testing for a function in a namespace. So, I already have a solution, but thanks anyway :)
@sbi You keep posting ads! You're nothing but a grumpy old spammer!
 
@sbi Do you mean fiction within fiction, or people discussing topics within fiction. I'm not a fan of the latter.
 
sbi
@RMartinhoFernandes Yeah, but I advertise only real good stuff!
 
That's what they all say.
 
@RMartinhoFernandes Yeah… I think the main difference is the using namespace directive. Anyway, snooze and lose :vP
 
Xeo
3:02 PM
@sbi According to my spam folder, that's what everyone does, apparently.
 
sbi
@RMartinhoFernandes But I say the truth!
 
Xeo
@sbi You're kinda entering a recursion.
 
Can you use nullptr or new in a free-standing environment?
 
@rubenvb Yes.
 
sbi
@Xaade In the TN series, there's ways to enter the world of fiction, move around there, interact with the characters, changing the facts, changing books, etc. Then some villain from the fiction world finds a way to enter the real word, and starts to wreak havoc there. So in the real world they start to set up a spec ops team to prevent the change of literature, and the escaping of chars from their books... It's hilarious, and incredible great.
 
3:04 PM
nullptr itself is a keyword.
 
@RMartinhoFernandes but nullptr_t is of type std::nullptr_t, which sorta implies a Standard library being present.
 
sbi
@Xeo That would be good if I wouldn't be telling the truth. However, I do just that, and therefore your accusation is wrong.
 
@rubenvb It's in the part of the library that must exist.
And even if it wasn't you could just typedef decltype(nullptr) nullptr_t; which, btw, is exactly how it is defined.
 
ah... I see. 17.6.1.3.
 
@rubenvb it's the other way around. typedef std::nullptr_t decltype(nullptr) basically. So nullptr is just a null pointer, and doesn't depend on the standard library
 
3:06 PM
@rubenvb As I mentioned in my answer, std::nullptr_t is only defined to be a typedef to decltype(nullptr)
 
but the standard library type nullptr_t is defined in terms of nullptr
 
Wow, isn't it nice that we all had that memorized?
 
wonderfully upside-down logic
 
I guess my alternative Standard library will not qualify as a freestanding implementation.
 
@jalf You got the typedef syntax the other way around.
@rubenvb Why not?
 
3:07 PM
once and if it's finished
I don't plan on providing any C headers
 
@RMartinhoFernandes oops yeah. Was just to show the idea anyway
 
and I hope all my headers will not include any C muck.
 
Not even <cstddef>?
 
Only the implementation of said functions/classes will use the underlying C headers.
 
A standard library without that is a bit... well, weird.
 
3:07 PM
The C headers are a totally integral part of C++!
And once you do the C headers, you need some basic POSIX to fill the gaps
 
bool types are integral too, but that doesn't mean they should be
 
Then implement the optional parts of POSIX.
 
@RMartinhoFernandes I would like class to mean final class by default, and then have a base class for non-final classes.
 
@Potatoswatter that's not available everywhere (like Windows)
 
3:08 PM
or just don't go anywhere near POSIX, ever, and let your consumers implement it if they want it
 
@FredOverflow Let's start lobbying!
At least C# got the methods part right.
 
I'll use POSIX, but in the implementation only, on platforms where it makes sense
 
No, you should provide your own complete POSIX as a header library.
 
I don't see the need for toupper and std::toupper etc...
where one single toupper will suffice
 
Btw, you can define size_t and ptrdiff_t in a similar manner: typedef decltype(sizeof(0)) size_t; typedef decltype((char*)0-(char*)0) ptrdiff_t;.
 
3:10 PM
or a bunch of ugly printf's that are all differently declared with and without underscores
ugh
@RMartinhoFernandes that is nice stuff <copies>
 
@DeadMG some_boolean++ traditionally meant some_boolean = true but now it's deprecated.
 
A single toupper is sufficient? Heresy! You need at least one for C locales and one for C++ locales.
 
And one for other locales.
 
you don't need C locales
 
@RMartinhoFernandes You mean non-virtual by default? Yeah, that's very nice.
 
3:11 PM
actually, you just don't need C anything
also, preferably you would make a significant improvement in the C++ Standard library's design, especially in iostreams and ranges
 
@FredOverflow If only they went all the way and made the same to classes...
 
and Unicode support
 
@RMartinhoFernandes Is pointer arithmetic on the null pointer well-defined?
@RMartinhoFernandes A man can dream...
 
@FredOverflow It's an unevaluated context.
 
oh right
It's an e-type-uated context :)
 
3:12 PM
@RMartinhoFernandes pretty sure the size_t one isn't strictly speaking correct
 
@FredOverflow The plus and minus operators are not required to be defined for std::nullptr_t as far as I can tell, but neither does the Standard seem to forbid them. Seems to be UB.
 
@jalf The standard says the type of a sizeof expression is size_t.
 
ah true
/me tired, not thinking too clearly
 
Xeo
@Potatoswatter Not nullptr, but null pointer as in (char*)0
 
I think you should replace sizeof(0) with sizeof(1/0) to cause more potential confusion.
 
3:14 PM
lol
 
Oh. But NULL may be 0 or 0L but not (void*)0 according to the non-normative footnote.
 
Xeo
@Potatoswatter Who is talking about NULL anyways?
 
Because (void*)0 is not implicitly convertible to any pointer type.
 
So you can add something to NULL but the resulting expression will not convert to pointer type.
 
#define NULL (42^42)
 
3:15 PM
@FredOverflow How about sizeof(throw std::logical_error(), 0)?
 
@DeadMG Requires an #include. That pollutes, and the point was to avoid that.
 
so is the ptrdiff_t one correct or not?
 
:2297888 Oh, so you cannot use voids as operands of comma?
 
I'm pretty sure that sizeof(yo mama) doesn't compute.
6
 
3:16 PM
yo mama isn't even valid syntax.
 
@rubenvb The result of pointer difference is ptrdiff_t. I can get you the section number if you want.
@FredOverflow #define yo
 
@RMartinhoFernandes that's fine thanks:)
 
Xeo
@FredOverflow #defines will handle that
 
Don't be so fast in claiming something isn't valid C++ syntax.
You can shoehorn a lot in.
 
the _t suffixes are bothering me :(
 
3:17 PM
@RMartinhoFernandes class yo {};
 
I can't typedef a nullptr type named nullptr
 
Nope. nullptr is reserved.
 
do I really need a nullptr type?
 
Xeo
@rubenvb That would get... pretty confusing
 
@rubenvb It's useful for overloading.
 
3:18 PM
or is the keyword sufficient for everything?
 
Xeo
@rubenvb Yes, how else would you overload for nullptr without resorting to decltype(nullptr)?
 
ah yes
maybe decltype(nullptr) is nice enough
hah
 
Xeo
Just provide it, where's the problem? :s
 
Sometimes I feel like typedefing my own local nullptr_t just to avoid including <cstddef>.
 
Xeo
Or name it nullpointer
typedef decltype(nullptr) nullpointer;
 
3:19 PM
But then I realize I'm just being silly.
 
@RMartinhoFernandes What about size_t?
 
Ah, you fixed it.
 
@Xeo my code is going to be so friggin' weird once it's finished.
 
@Potatoswatter It crossed my mind as well :)
 
@Xeo you mean nullptr_t?
 
Xeo
3:20 PM
@RMartinhoFernandes What I think and type seem to be different things
And what I think that I type too
 
<cstddef> is huge
 
It's really just a couple lines worth.
But it tends to have a lot of #ifs.
 
mostly just #include <stddef.h>
 
@Potatoswatter ugh, well yeah, that's the "pretty huge"
 
Xeo
@Potatoswatter It's not required to do that though
 
3:23 PM
@rubenvb Look for rune_t. I think that's in <stddef.h>.
 
@RMartinhoFernandes sounds like an Apple-ism
 
rune_t is GCC libstdc++, so it should be the same in Linux.
 
Cat's research indicated it's for Plan9.
 
it's not in MinGW libstdc++
 
In Plan9 a "rune" is a UCS-2 character.
@rubenvb I can see it from here.
Line 293.
 
3:25 PM
I just grep -r "rune_t" .ed my mingw64/include/C++ folder
no result
 
@rubenvb probably not in the C++ part, no
Apple left libstdc++'s international support dangling, so it's really teh suck if you're not on Linux.
 
@Potatoswatter grepping everything in my mingw64 directory now
ah yes, its in lib/gcc/4.6.3/include/stddef.h. WTF
I guess I have like five stddef.h
seriously
 
> The /Za switch breaks VC++'s own standard library; VC++'s own developers recommend to not use it. – ildjarn 21 mins ago
Sounds very Microsoft-ish.
 
it's even in MinGW stddef.h
 
The switch to disable MS extensions also breaks standard conformance. Awesome.
You can't have your cake, and you can't eat it either.
 
3:27 PM
is intptr_t ever necessary at all?
 
It's optional.
But if you want to ever use pointers as integers, it's the way to go.
 
so I will never need to convert a pointer to an integer value? Probably will have to for maps and stuff
 
Xeo
@RMartinhoFernandes It's not true. I'm compiling with /Za for quite some time now.
 
Like say, hashing them.
 
no, you don't need to do that for maps
 
3:29 PM
@DeadMG I'm listening.
 
uh
 
There's a std::hash<void*> though.
 
hello all
 
std::map<T*, T*> even, works just fine
 
yes, but if I were to write my own, I'd need it?
 
Xeo
3:30 PM
Wtf. I can't seem to disable C4345 warning oO
 
@rubenvb I don't think that it's required, no.
 
is there any way to typdef intptr_t through decltype?
 
then I'm not going to use it
KISS ftw!
maybe that would be a good name for the namespace and library
 
You'd need to #if on the bitness of the platform (and forget crazy stuffs).
 
3:32 PM
@rubenvb What is intptr_t?
 
Xeo
@rubenvb template list of integer sizes and switch over that with sizeof(void*)
 
@RMartinhoFernandes You're wrong- you can.
all you need is an integral type where that sizeof == sizeof(void*)
 
@DeadMG That's not done with decltype :P
That's done with a type list.
 
POSIX stuff: Integer types capable of holding object pointers

The following type designates a signed integer type with the property that any valid pointer to void can be converted to this type, then converted back to a pointer to void, and the result will compare equal to the original pointer: intptr_t
 
it's a metafunction that produces the type
 
3:33 PM
@RMartinhoFernandes well, think outside the box if you will.
 
same thing
 
@rubenvb You can find code to iterate over a list of types in the transcript from this morning.
You just need to adapt the criteria used to pick yours.
 
@RMartinhoFernandes I got the Stacked_crooked playground stuff from yesterday
 
Or that.
Right, it's not from this morning, it's from yesterday afternoon.
Damn.
 
besides, technically, you could do typedef decltype(typename signed<sizeof(void*)>::type) intptr_t
 
3:36 PM
But you'll need detail namespaces or something.
 
that has decltype init
 
sbi
@RMartinhoFernandes Didn't you sleep last night? I think you were still online when I went to bed, and you were already online when I got up.
 
@sbi whistles
@DeadMG Ok. You win.
 
@sbi I've noticed that pattern with a few people here.
 
@DeadMG is that the signed template from the type list size selector MTP thingie?
 
3:37 PM
yes
 
great
 
sbi
@StackedCrooked Yeah, me, too, but the robot used to be one who rises early.
 
also, I'm trying to decide how to fix my code whilst refactoring as little as possible
 
@sbi That was when I had to go to work :)
 
@sbi In any case, it seems to gain him many starred messages.
@sbi I think that's already a long time ago.
 
sbi
3:41 PM
@StackedCrooked That's only been a few months! That's the blink of an eye in my age.
 
dam you groove shark!
 
here's a question
 
Y U NO BUFFER SONGS THAT WILL PLAY NEXT, BEFORE THEY START PLAYING!
 
no, wait, never mind
 
@DeadMG that's a statement :P
 
3:42 PM
Iran is preparing to launch a national internet. online.wsj.com/article/…
 
I had a problem and then I solved it
 
@RMartinhoFernandes "Iran is preparing to launch..." OH SWEET JESSUS! "... national internet" of thank the lord, I think I need some new pants though
 
@thecoshman Yeah, "thank the lord" for you, because you're not there.
 
@RMartinhoFernandes They must be inheriting North Korea's old servers.
 
yeah, NK can't afford the electricity to run them anymore
 
3:44 PM
This will lead to confusion between the Ayatollah and Kim Il Sung.
 
@DeadMG They have workers hamsters!
 
what's a good naming convention for implementation details. I'm planning on using underscores and shit (as I'm sidestepping the Standard library), but I'm confused with typedef sizeof(0) size; struct __something{ typedef char __type }; __something::__type ??type;
 
sbi
@RMartinhoFernandes Yeah, I read about that earlier. Pretty similar to what Belorusia just did.
 
@sbi Half the world seems bent on playing these games.
 
@RMartinhoFernandes Hamsters are good eating!
 
3:48 PM
@DeadMG I do find it strange that a dictatorship can't afford things
 
sbi
@RMartinhoFernandes The German news magazine Der Spiegel had an article about that on their website where they said that all dictators in the world look with increasing suspicion at the Internet. I think they are all scared by what happened in large parts of Arabia last year.
 
@thecoshman Why? They're hideously inefficient.
 
These guys must know their history, and that they're doomed to lose…
 
censorship isn't free, you have to pay for it
 
@sbi Dictators and copyright holders.
 
3:49 PM
... effectively, slave labour
 
and if your populace is too busy rioting against your control, they won't be working productively
 
The only regime that successfully enforced ignorance was the Khmer Rouge. Plenty have tried over the centuries.
 
@thecoshman You have to pay for that too.
People won't be slaves without someone enslaving them.
 
you have to pay for enforcement
 
how can I turn typeof(u"") into char16_t? So discard the pointer thing. A &?
 
3:49 PM
and food
 
ps sorry for starting a politics talk, I should know better then to talk about such things online
 
@rubenvb std::remove_pointer.
 
sbi
@thecoshman While the dictators might be able to pay for anything, that doesn't mean a thing when too little is produced.
Despite what the banks might want us to think, all the money is only worth what the world produces.
 
@RMartinhoFernandes without std::!!
 
if you enslave people to build giant statues of yourself, then they're not feeding themselves
 
3:50 PM
@rubenvb Write remove_pointer.
 
sbi
@RMartinhoFernandes Yeah, pretty damn similar, these two.
 
I think...
 
so you have to feed them, or they'll die and they won't make your statue
 
@rubenvb Or maybe decltype(u""[0]) (not sure if it gets you a reference or a value)
 
3:50 PM
I may have finally fixed this issue!
 
or how about just decltype(*u"")?
 
sbi
@RMartinhoFernandes std::remove_reference? :)
 
@sbi Sadly I can't read that article :(
 
sbi
@RMartinhoFernandes I could understand if you couldn't understand it, but reading shouldn't be a problem. It's Latin letters, after all. :b
 
@sbi Not all latin letters are pronounced the same in every language.
Plus you have some fancy "s" (the one that looks like a B and doesn't have a capital form, whatever it's called) thing.
 
3:54 PM
Eszett!
 
Right, that.
 
sbi
@RMartinhoFernandes Just mentally replace "ß" by "sz". It's a ligature of these two, actually. (Hence &szlig;.)
 
How do I add an include dir in CMake? CMake documentation sucks ass
 
Also es for 's', zett for 'z'.
 
> Make sucks ass
fixed
 
3:56 PM
CMake isn't make.
It generates VS project files too.
It's a build system for build systems.
 
Well, I need to add an include directory nonetheless.
 
sbi
@rubenvb CMake is a case where I thought that the documentation sucks — until I had to actually work with the thing. Since then I believe that the documentation is as good as it can get, given what it has to describe.
 
@sbi That's a ... colorful wording.
 
sbi
@rubenvb The only colorful word I used was borrowed from your message mine refers to.
 
3:58 PM
@sbi colorful isn't the correct word, I couldn't come up with a better one
I meant "spot on"
but I couldn't say " that's a spot on wording". That sounds shitty
 
It looks black without any spots on my screen.
 
ugh
 

« first day (447 days earlier)      last day (4500 days later) »