« first day (783 days earlier)      last day (4164 days later) » 

4:00 PM
It gives the compiler freedom to behave as it wishes, including launching NetHack, or producing whatever executable it deems appropriate, without any regard for anything else in the program. Why anyone would want that to happen, I have no idea. — R. Martinho Fernandes 1 min ago
 
looks like "throw #AV"
 
however it could work if SomeType copy ctor doesn't copy anything
could be a runtime is_empty check
 
@Zoidberg'-- I'll ask you in a few weeks
 
@TonyTheLion Is that trying to copy from *(ptr 0) ?
 
4:12 PM
@R.MartinhoFernandes I don't have issues. D:
 
@CaptainGiraffe it's dereferencing a null pointer, basically
by first casting it to 0 and then dereferencing it
so UB
 
Oh, by the way guys. Personally, if you have both Win7 and Win8, would you keep Win8 on your dev machine or revert to Win7?
 
user1182183
lolwut my video was uploaded 2 days ago and got almost 100k views
 
-3
A: C++: *((SomeType*) 0 )?

DraxThat could basically be a null reference hack. Allowing you for example to give default value to references. void my_super_function(const int & i_ref = *((int *) 0)) { } Using that rational you could extend the idea to create null instances. int i = *((int *) 0); The idea is to have an ...

hahahahaha "null instances"
That is new.
The whole "null references" bullshit is one thing, but "null instances" is just plain comedy gold.
 
I was gonna add a comment to that.
But then it got locked.
> Not to be a dick, but I've personally tried this once, thinking that references were just pointers with cool syntax. It was a horrible idea, and at the end of the day, I don't work on that program anymore.
But now I can't add it. :c
 
4:18 PM
@R.MartinhoFernandes How about a void instance? :)
 
@TonyTheLion There's UB and then there's intentional UB supplied by the same people that gave the world sillystring.
 
wtf
oh, I kept getting parseerror everytime I tried to post here
I don't know what it needs to parse, but hey
 
Refresh or login.
 
Hm.
 
I can get parse errors on my GET requests too. Is it my browser? (maybe just me)
 
4:20 PM
I don't know how to solve Mercurial conflicts...
I'm not sure if its telling me it has errors with the main branch of ogonek, or internally with my own stuff.
 
@ThePhD You pull from the source repo again and fix them locally.
 
@Zoidberg'-- github replied, they said I shall just click the 'follow' button on their profile page. :/
Fast but not with much effort.
 
@ThePhD There is no conflict.
 
@R.MartinhoFernandes Reminds me of that asshole who kept arguing with everyone that it was perfectly valid to dereference a null pointer in order to create a "null reference".
 
s/pointer"/reference"/
 
4:22 PM
@EtiennedeMartel I'm going to use that as the optimal null value. *(0) right?
 
some people are just completely batshit stupid
 
@TonyTheLion There fixed it I think
 
@R.MartinhoFernandes My head exploded.
 
@TonyTheLion Batshit is nitrogen rich and useful.
 
4:23 PM
@R.MartinhoFernandes Who's source? Yours or mine?
I keep enacting a pull on mine and it keeps telling me there's nothing to do.
'Merging with a working directory ancestor has no results.' Hm.
Maybe I need to pull it into a fresh directory.
 
@R.MartinhoFernandes Repent and reboot
@TonyTheLion I can bend a conflict with my mind
 
@ThePhD Mine. I doubt you managed to get conflicts with your own fork.
I have made changes to it in the meantime, and you need to pull those and fix the conflicts.
 
looks another boring and lonely weekend ahead
I think I'm gonna weep all weekend
 
@TonyTheLion But you're the King. Just like, order some Lion Girls or something.
 
4:31 PM
lulz
no girls where I am
 
Oh.
Well, there's always video games and alcohol if there's no Let'sTalkAboutOurFeelings people around.
 
@TonyTheLion You live in Sausagefestford?
 
yes, bf3 it will be
@R.MartinhoFernandes I live old & ugly people festford
 
@TonyTheLion You could move, ya know.
 
erm no
not until I drive
 
4:33 PM
Then stop whining.
 
shush
I can whine if I want
 
user1182183
 
That's what you're looking like right now.
 
lol
no.
 
But with a mane.
 
4:36 PM
hahah
 
@TonyTheLion Anyway, old and ugly people can still be nice to hang around. Exhibit A: the ape.
3
:P
 
:P
I'm gonno go pub tonight and hang there
I think
 
@R.MartinhoFernandes Yeah, but you wouldn't sleep with him.
 
@EtiennedeMartel He's not my type.
 
@R.MartinhoFernandes How old are you, btw?
 
4:40 PM
@R.MartinhoFernandes I figured as much.
But, wait, @sbi is ugly?
 
@FredOverflow 9355 days.
 
I mean, I guess it's to be expected from a gorilla, but still.
 
25 years
 
WTF? why g++ doesn't compile this code - ideone.com/dMXjw1 ? (VC++ does)
 
4:42 PM
@TonyTheLion Then it appears my stalking is still efficient.
 
Because it tries to make a copy.
 
@EtiennedeMartel You stalk the Robot?!
 
@R.MartinhoFernandes but auto_ptr is copyable
 
@Abyx But not from temporaries.
 
@TonyTheLion Everyone does.
 
4:43 PM
erm no, not me
I have no need to
 
@EtiennedeMartel It's on my profile page.
 
That's because you got too much angst in your heart.
 
@R.MartinhoFernandes Wow, you're quite the young whippersnapper :)
 
@R.MartinhoFernandes (Sssshhh)
 
@EtiennedeMartel wut?
 
a heart, great
 
It's cool.
Love and shit.
 
right
 
@Benny: You appear to not know what dafuq UB is. The compiler does not need to reject code that produces UB, nor does it need to warn or anything else. It can simply do whatever the fuck it wants to. — DeadMG 4 mins ago
Typical puppy ruining a so far corteous conversation.
Oh, nuked already.
 
@R.MartinhoFernandes ah... there is auto_ptr(auto_ptr&) but not auto_ptr(const auto_ptr&)
 
4:46 PM
@R.MartinhoFernandes he specializes therein.
 
@R.MartinhoFernandes Okay, branch is updated and I think I merged all conflicts successfully. Let me know if there's anything else I should be doing (aside from fixing the way I write my commit messages. :P)
 
@R.MartinhoFernandes He's like a walking heap of negativity.
3
 
Cat is worse, imho
4
 
@EtiennedeMartel I prefer hash tables, myself.
 
I think I'm gonna have to write that in caps and bold: NIHILISM IS NOT COOL.
There, said it.
 
4:47 PM
@ThePhD I will only have a closer look at the code during the weekend, but so far looks acceptable.
 
Oh my god look at me I'm contributing to a team project I FEEL AMAZING.
 
Quick question.
 
who starred every fuckin' thing?
 
dammit. it seems I should use unique_ptr instead of auto_ptr
 
Anyone running a non-English version of Windows?
 
4:48 PM
@DeadMG A combination of lions and cool people.
 
@R.MartinhoFernandes yep
 
(Or another OS, might work too)
 
@Abyx auto_ptr is the shitty, gimped, "We tried to hack in move semantics in C++03 and miserably failed and then Standardised our miserable failure" class
unique_ptr is the real deal
 
@Abyx Can you test something for me? Open charmap, and see if the character names are in English or translated.
 
@R.MartinhoFernandes they are in English
 
4:49 PM
Thanks.
Though that was not the answer I wanted :(
It seems that no list of character names exists in a language other than English anywhere :(
 
@R.MartinhoFernandes screenshot - gyazo.com/53bfd1cafa036b2772959e95596bb6ab
 
Anyway, party time now. Bye.
 
user784668
@Abyx You should, unless you want to produce crap code.
 
meh... auto_ptr could use mutable for it's pointer
 
user784668
@Abyx auto_ptr could cease to be.
 
user784668
4:53 PM
Why didn't they remove it from C++11?
 
@Fanael Backward compatibility.
It's deprecated now, which means they could remove it any minute!
But they probably won't.
 
user784668
@EtiennedeMartel If your code is shit in the first place, you deserve to have it broken.
 
@Fanael So, wait, using something that was good back in 2003 means your code is shit?
 
user784668
@EtiennedeMartel Except it wasn't good back then. auto_ptr was broken all the time.
 
@Fanael What was the alternative without move semantics?
 
4:57 PM
@R.MartinhoFernandes do they have official names in any other language?
@EtiennedeMartel value_ptr? can be emulated kinda with a vector of size 1
 
@MooingDuck That's not always a possibility.
@Fanael I think you're forgetting that hindsight is 20/20.
 
@Abyx That would be even worse than it is now.
@EtiennedeMartel Not always. Check out, say, Java, and D.
 
@EtiennedeMartel no, even in C++03 we knew auto_ptr was broken. It was just better than raw pointers usually.
 
@DeadMG yep, but it's exactly what I want
 
@Abyx it's only what you think you want
 
4:58 PM
@Abyx Why not just use unique_ptr like a sane person
 
user784668
@DeadMG Because he wants his code to break?
 
well... actually I realized that I don't need any *_ptr, bcoz I can use swap
g++4.7> ‘std::stringstream’ has no member named ‘swap’
What. The. Fuck?!
 
@Abyx it's probably a nonmember function
 
it should have swap, dammit, "since C++11", dammit
 
using std::swap;
swap(lhs, rhs);
if that doesn't compile then you're hosed
 
5:03 PM
FUUU~~~ swap(x,y) doesn't work either
 
@EtiennedeMartel yep, but not in g++
 
Aaah.
That explains it.
 
Why hello friends
 
Well, you could always swap the stream buffers.
 
5:07 PM
fuck g++, I didn't want to support it from beginning, VC+++ ftw.
 
@Abyx Why do you want to swap stringstreams?
 
@FredOverflow it's sort of "move semantics"
 
user784668
@Abyx VC+++? Is that a new version of Hell++?
 
@Fanael if Hell++ would exist, all kittens would be dead
It seems it works in VC++, at least
 
hey, does anyone know iOS development???
 
5:17 PM
@Abyx You don't need a class for that, you need a function. template<class Ts..> CompilerError make_error(Ts... Vs) {std::stringstream ss; ss << Vs...; return CompilerError(ss.str()); } //I probably got the variadics wrong
 
alias<char[]> { '\0', (void(ss << Vs), '\0')... }
Don't ask.
 
@LucDanton what the...
 
@EliteGamer In the C++ chatroom? Srsly?!
 
yes, there is no one in the others
 
@EliteGamer that doesn't make this a good place to ask questions
@LucDanton I really want to ask
 
5:21 PM
it has C in fron of it?! ha ha
 
@EliteGamer well, Javascript has an S, try asking them
 
@MooingDuck If it helps you can make it so EXPAND( ss << Vs ) 'works'.
 
ha, ok...no! I was just wondering if anyone knew something about it
 
@EliteGamer Please read the newbie hints linked to on the top of the starboard.
 
Xeo
@LucDanton <3
 
5:25 PM
@LucDanton why the alias? What is the alias?
 
Xeo
@MooingDuck template<class T> using Alias = T;
It's needed because C++ grammar doesn't allow char[]{ ... } to create a temporary array
 
@MooingDuck well... maybe. actually I don't need even a function, I can use constructor
 
@Xeo so name it
char r[] {...} works
 
Xeo
The idea is to not name it to not have to deal with warnings
Also, sometimes you just need temporary arrays.
 
Alright. While trying to find workarounds for all of the other why's, I figured out the reasoning for all of them. Neat trick.
 
Xeo
5:29 PM
Also know the reason we need an array at all? :)
 
btw, there is a bug with {} and side-effects
 
Xeo
Where?
 
@Xeo yeah, figured that out
 
@Xeo Yeah, why can't we use class black_hole { template<typename Ignored> constexpr black_hole(Ignored const&...) {} }; again?
 
Xeo
@LucDanton That's another way, if you do black_hole{...}.
 
5:31 PM
@LucDanton tried to make an expand function, but it wont evaluate the bits in order. I guess it'll have to be a macro.
 
Xeo
:6591758 Eeeet, wrong.
 
On the other hand the constructor is private there.
 
@LucDanton won't evaluate the parameters in order
 
Xeo
I assumed that was a typo.
@MooingDuck Will.
 
user784668
@Xeo Right, didn't notice it's a constructor.
 
5:32 PM
Maybe that was what triggered that GCC warning.
 
Xeo
braced-init-list syntax always evaluates left-to-right, even if it results in a constructor call.
 
@Xeo not in g++ and VC++
 
Xeo
@Abyx That's not my problem. :D
 
@Xeo ah, mine was a function call, not an initlist
 
Xeo
@MooingDuck Yeah, that doesn't work.
Well, it "works", but not if you rely on order of side-effects.
 
5:35 PM
@LucDanton unused parameter warning when I make it variadic
 
Xeo
Did you name the parameter? :P
 
@Xeo yes
 template<typename ...Ts>
 evaluate(Ts&&...Vs) {}
main.cpp:7:6: warning: unused parameter ‘Vs#0’ [-Wunused-parameter]
main.cpp:7:6: warning: unused parameter ‘Vs#1’ [-Wunused-parameter]
 
Xeo
Well there's your problem.
Of course it's going to warn.
 
@Xeo has to be empty to remain constexpr
 
Xeo
Then just remove the name?
 
Ts&&... Vs __attribute__((unused))
 
Xeo
Blame GCC. :3
 
:v
@EtiennedeMartel Sure it is
 
Xeo
@StackedCrooked "Go back" button does nothing if you open Coliru from a link :s
 
Don't use history.go
The button is in the browser, you don't have to duplicate it
 
5:42 PM
Yesterday boss sent "We have run into some issues when using tracy for Java app. I would like you to look into the issue." We finally got more details: "I was seeing it crash the JVM"
sometimes I hate people
 
WHAT DO YOU MEAN "IT DOESN'T WORK" IS NOT A VALID DESCRIPTION
 
"tracy" is in this case, some sort of logging framework I've never actually seen or used. Should be an interesting day.
 
Replace it with log4j or something
It should be fairly mechanical
 
@CatPlusPlus that's what the other dev wants, but 99% of our code uses tracy, so we have to put it back. (It's got a whole bunch of settings integrated with our software)
 
What settings?
 
5:46 PM
@EtiennedeMartel That BitSquid thing sounds cool, but I haven't read teh code yet.
 
@Xeo So I'm pretty sure that's the reason I use temp arrays.
 
Xeo
Yeah, but I think they had a bug at one time where that was also evaluated in the wrong order or something.
 
@CatPlusPlus Tracy has settings that decide which tools should log, and how much logging, and what should be reported as an event to the OS, and a bunch of other random stuff.
 
Every logging framework has that
They also don't crash JVM
So there's that
 
@CatPlusPlus I doubt it's actually the framework crashing the JVM and more likely my coworker writing bad code.
 
5:49 PM
It must be JNI code or it's a JVM bug.
 
@CatPlusPlus I don't have a lot of faith in my coworkers, probably JNI
 
JNI?
 
I've seen the source of the JVM and boy, if it's bugged, I would not be surprised
 
@DeadMG I attached with a debugger once and it kept dereferencing null pointers everywhere.
 
Or you were debugging optimised version?
 
5:51 PM
@ThePhD Java Native Interface, for working with C-compatable code.
 
@MooingDuck How did it recover from that? try {} catch {} ?
 
Dereferencing nullptr (or any pointer to first 64kB of address space) is instant crash on Windows.
 
@MooingDuck Sounds... kinda like a nightmare.
 
It's not something that would make to release.
 
@ThePhD heck if I know
 
5:51 PM
what is the sense of using inline in class member functions?
 
@CatPlusPlus apperently not, they found a way
 
You were debugging optimised build and you're bad at it
More likely.
 
@CatPlusPlus I attached to the version of Java that was just on my system. WinXP32.
 
@bamboon This question reminds me of my own: I always thought inline meant that the code in that function was just plastered into whatever other code used it. Was that entirely wrong?
 
@ThePhD yes
 
5:52 PM
@CatPlusPlus it was definitely optimized, and I was using tools I've never used before. Possible.
 
inline keyword has little effect on actual inlining done by the compiler.
It's there to avoid ODR violations.
 
@ThePhD inline means "this function defined is in multiple cpp files".
 
Time to start using dots.
 
@CatPlusPlus Dots?
@MooingDuck Ah.
 
@ThePhD and the register keyword means nothing at all. (It used to mean you would never take the address of the variable, but now compilers ignore even that)
 
5:54 PM
... Uhm. Well then.
Two keywords I won't be using anytime soon then.
 
user784668
@ThePhD It is.
 
user784668
@MooingDuck It means something in a GCC extension.
 
:c I really wanna use Ogonek, but no matter how I try I can't figure out these things to work with MSVC, so as much as Ogonek looks and sounds and smells cool, I think I really just have to get back to rolling my own.
 
@ThePhD inline is useful, if misnamed.
 

« first day (783 days earlier)      last day (4164 days later) »