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

11:00 PM
@melak47 I code at work. But I have the same 24" screen and a docking station there
 
user142019
I code in the train.
 
user142019
What else should I do in the train.
 
@BartekBanachewicz Right, so workstations suck because you can't put them in a bag, and tablets suck because they can't do what laptops can. I wonder why it's hard to understand why people would buy laptops.
 
Sleep
 
user142019
Train is boring as fuck without an editor.
 
Ell
11:00 PM
I have a google nexus. Just use it for games really and browsing
 
@DomagojPandža Shit. Nobody ever told me I had an ex. Did you just blow your cover, Mr. Timetraveller?
 
Ell
And Skype
 
user142019
Skype was good.
 
user142019
And now it's bad (at best).
 
@BartekBanachewicz Okay, how 'bout this: they're awesome compared to a KayPro.
 
Ell
11:00 PM
Why is it bad now?
 
@Zoidberg lol
 
Xeo
@Zoidberg Read books. Watch movies on your tablet. :D
 
@BartekBanachewicz well, I'm at uni a lot. and at friends places, doing assignments and crap. it helps to have a computer with me
 
Xeo
Or any portable DVD player that has a USB port, really.
 
user142019
@Ell well, for example: no simultaneous screen sharing, which was always possible in older versions.
 
11:01 PM
@R.MartinhoFernandes That would imply most people need the laptop most of the time. I think it's rarely the case; they are just looking for a compromise
 
@BartekBanachewicz So you already know the answer! Amazing.
 
@JerryCoffin I used to go some place where they had one of these "portables" :) To play. And make secretly obscene images in GWBASIC (10 SCREEN 12...)
 
@JerryCoffin hahaa
 
@sehe The temporal prime directive prevents me from answering your inquiry.
 
That's also where I learned English by the way. I think I was 8 years
 
user142019
11:02 PM
I learned English by watching TV.
 
@R.MartinhoFernandes then again, if you have more money than an average user and are willing to spend it on your hw, buying a workstation and a tablet is perfectly justified imo
 
Ell
@zoid whaat they removed features? Did they put them in pro or something?
 
@BartekBanachewicz That still doesn't cover all use cases, so whatever. (like you said, you can't put a workstation on bag)
 
@Zoidberg I haven't learned English yet, but plan to soon.
 
user142019
@Ell Do I know. They should've left them.
 
11:03 PM
@R.MartinhoFernandes just as laptop doesn't cover all tablet use cases.
 
@DomagojPandža Yet, I'm starting to see your sudden vanishing in a whole different light.
 
user142019
@JerryCoffin stop lying.
 
@BartekBanachewicz but what are these elusive tablet use cases, and who uses them?!
 
@BartekBanachewicz A true fact, but completely irrelevant to the question "why do people buy laptops?".
 
11:04 PM
@StackedCrooked Lol
 
@R.MartinhoFernandes you win.
@melak47 I do. And these include mostly usage when not by my desk (where I have my workstation, remember)
 
user142019
Hmm, pi in Haskell as an infinite list of Chars.
 
@melak47 Angry Birds
 
Xeo
@StackedCrooked @Mysticial should have done that. Much more compressible, would've saved a ton of disk space.
 
@Zoidberg Useless
 
user142019
11:04 PM
No.
 
user142019
It's a fun exorcist (stupid word).
 
@BartekBanachewicz yeah, but what do you do on it? solve sudokus, crosswords, read the news?
 
@Xeo run-length encoding would be quite effective :)
 
@Zoidberg I think even thecosh gets that one right.
 
Xeo
@StackedCrooked Especially since you got 10 different digits at most. :)
 
11:05 PM
@StackedCrooked And after that, keep only the lengths, since they are in order anyway.
 
@melak47 read the news, chat on lounge, read books/pdfs/manuals, surf the web a lot, read mail, twitter, use facebook. mostly.
 
user142019
@R.MartinhoFernandes There. Fixed.
 
@Zoidberg I'm shocked, shocked I tell you, at the implication.
 
@R.MartinhoFernandes Nice.
 
user142019
11:06 PM
I'm not!
 
user142019
:D
 
is there a way to get the std::type_info of the currently thrown exception when caught by catch(...)?
 
@StackedCrooked Bahahah! :D +starz.
 
Xeo
@MooingDuck std::current_exception()->type() or so, I think?
 
@JerryCoffin How did you know he was implying you are a heir to the Sultan's throne?
 
11:07 PM
@R.MartinhoFernandes Now how do I implement this minimally in C++?
 
@StackedCrooked equal_range might be of help, I think.
 
Xeo
@StackedCrooked Go through string, count stuff, if new character, write new length.
 
user142019
@Xeo std::exception_ptr is implementation-defined type.
 
@Zoidberg It's useless for all intents and purposes
 
Is there any way to generate a gcc makefile (automatically) from an msvc solution?
 
11:08 PM
for (auto i : pi) just looks so pretteh.
 
user142019
@MooingDuck what do you want to do with it?
 
@Borgleader There's a project out there that does it.
 
@Xeo Aw, so stateful :(
 
@Zoidberg print the name of the type to a log :/
 
I could make Visual GCC spit out all the compiler arguments into one g++ ResponseFile...
... Meh. :effort:
 
user142019
11:09 PM
@MooingDuck You can catch the ultimate base class for your exception hierarchy instead, if you have that.
 
g++ has no response files
 
Xeo
@Zoidberg Oh wait, yeah, doesn't have type(), I remember Andrei complaining about that.
 
@sehe Sultan's throne?
 
user142019
(Usually std::exception.)
 
@ThePhD That means full rebuilds all the time?
 
11:10 PM
I dunno. Maybe g++ would do some pruning of redundant commands.
 
@Zoidberg I already catch that, I just wanted a backup plan for when some moron types throw "ERROR"; or something.
 
Xeo
@StackedCrooked huh, how could you possibly not be stateful in some way?
 
@JerryCoffin How did you know it?
 
user142019
@MooingDuck ah.
 
11:10 PM
@sehe I don't think I did.
 
g++ always compiles all the arguments
 
@JerryCoffin Oh, then, why where you shocked :| ...
 
@ThePhD code.google.com/p/make-it-so Damnit it doesnt support V2012 :(
 
user142019
@MooingDuck the type of that is quite pointless anyway, isn't it?
 
I'd be pissed if GCC did not compile what I told it to compile.
 
user142019
11:11 PM
I'd just log "unknown exception type".
 
@Xeo Dunno. Yours is a good suggestion actually.
 
@Zoidberg as a developer, if you see that in the log, how do you address it?
 
@Borgleader Wellll, good luck. :D
 
@sehe I'm shocked that anybody could imply that I could be anything less than completely truthful.
 
@JerryCoffin What?
 
11:12 PM
He missed by 1.
That was for sehe.
 
user142019
@MooingDuck how do you address "int thrown" or "char* thrown" with no further information whatsoever?
 
@MooingDuck First, by coming to Lounge and complaining about how some stupid moron thought that was a good idea.
 
@JerryCoffin Misdirected reply :) /cc @Borg
@ThePhD Thanks for correcting !
 
Sorry 'bout that.
 
Then, by throwing your arms up in the air, and kneeling in despair.
 
11:12 PM
@Zoidberg no, how do address something unknown thrown. You don't know the type nor location.
 
Ell
Can you get stacktracd from exception?,
 
Oct 15 '12 at 0:55, by sehe
plink plink. I can read without attention deficit crutch :)
 
user142019
C++ exceptions y u no stack trace.
 
@Ell not by default
@Zoidberg srsly
 
11:13 PM
@JerryCoffin (... Sherlock)
 
@Zoidberg You can use StackWalker for MSVC, and there's some libraries for GCC.
I think they go out the window though in Release mode.
 
Xeo
@Zoidberg Because there is no stack in C++'s mind.
 
oh, you know what would be cool? operator throw. Runs when an instance is thrown.
 
@MooingDuck That's a good idea.
Why didn't the standards committee think of it? D:
 
user142019
@Xeo Well make virtual char const* stack_trace() const noexcept implementation-defined.
 
11:13 PM
and have it grab stack trace info at that time
 
@MooingDuck Yeah. Completely safe. No reason to worry. At all. It'll be almost as good as Java!
 
user142019
(Any non-moronic stack-based implementation would implement it right and others can just do whatever they want.)
 
Xeo
@Zoidberg But there is no stack.
 
@Xeo At the point of throwing, there is
 
@sehe Actually, throwing in Java does not set the stack trace.
 
11:14 PM
@Xeo why do you say that? Because the spec doesn't use that particular word?
 
5
Q: Why can I "fake" the stack trace of an exception in Java?

R. Martinho FernandesIf I run the following test, it fails: public class CrazyExceptions { private Exception exception; @Before public void setUp(){ exception = new Exception(); } @Test public void stackTraceMentionsTheLocationWhereTheExceptionWasThrown(){ String thisMethod ...

 
@sehe I fail to see the Java connection, does Java have a special thrown thing?
 
@R.MartinhoFernandes I wasn't referring to that. I meant general "bad idea wise". I mean, unless there is a guaranteed safe language/library feature you can use to get the stack trace
@MooingDuck The connection was that J*** is a bad idea :(
 
Xeo
std::array<size_t, 10> counts{};
unsigned cur = 0;
pi | adjacent_filtered([&](char a, char b){
  if(a == b){ ++counts[cur]; return false; }
  else { ++counts[++cur]; return true; };
});
 
@R.MartinhoFernandes +1, not a fan of Java, but still interesting!
 
11:16 PM
In .NET throwing always sets the stack trace, so it never lies and always refers to the point of throwing.
 
Xeo
@StackedCrooked ^ might also work.
Well, if you materialise it.
 
In Java, the stack trace refers to the point of construction.
vOv
 
We need to take everyone in this chat room and put them on a standards Committee.
 
Xeo
@sehe From a language POV
 
@Xeo I just checked, C++ spec has the word "stack" all over the place
 
user142019
11:17 PM
std::stack :P
 
(Actually, you can cheat make the stack trace lie in .NET, but that uses implementation specific magicks)
 
Xeo
@MooingDuck Because, as far as I'm aware, the language does not have the notion of a "stack", even.
 
@Xeo Nice :D
 
@Xeo ignoring all the parts about unwinding the stack, and the stack being unwound to particular points?
 
@Xeo #include <stack> :D
 
11:18 PM
@Xeo You mean a sequence of the scopes of the functions that were called?
 
std::stack unwinding
 
Yes, it has.
 
user142019
Even if it doesn't mention the call stack anywhere, there could still be such an implementation-defined function and then some footnote with suggested behavior (similar to the parameter that random_device::random_device takes).
 
@ThePhD A lot of us are involved with that crap, just a little bit indirectly. We nag them into obedience.
 
It's what is used to define stack unwinding.
 
11:19 PM
§ 15 talks about the function stack a bit
 
It's called "the path from a try block to the point where an exception is thrown"
 
Mmm.
 
Which is exactly what people want!
 
C++ has paths!
 
To victory?
 
Xeo
11:20 PM
@R.MartinhoFernandes Hmm... then I have been missing that. Alright, TIL.
 
@Xeo Seriously, how would you define stack unwinding without inadvertedly defining a "call stack".
 
Mmm. How I miss you, using namespace.
How I miss you indeed...
 
user142019
abusing namespace std;
 
Even if it didn't use the word stack, it describes a stack in different words (i.e., functions are handled on a last-in, first-out basis).
 
Exactly.
It doesn't need the word, but it needs the notion.
It's fundamental to the way the abstract machine works.
 
11:23 PM
There is no notion of stack as a special memory area stack
 
Xeo
@R.MartinhoFernandes "All automatic objects that were constructed from the moment a try-block was entered, until the exception was thrown, are destroyed, in reverse order of construction." -- is what I'd naively say, anyways.
 
I don't always create a stack trace, but when I do, I make sure it is spawned when it is absolutely not needed.
 
user142019
 
@CatPlusPlus I've almost got most of the project ready to be snap-converted to CPP style dll.
 
user142019
> Abstract
 
11:23 PM
@CatPlusPlus Yeah, but that's not what the duck wanted. He wanted a list of function names.
 
Xeo
Also, it's way past midnight, I need sleep. G'night.
 
user142019
Goodbye.
 
Compile times should hopefully drop into the floor at that point.
 
@R.MartinhoFernandes I'm just replying to "there is no notion of stack in language" but too lazy to link
 
"Uw werk online maken en delen
Bestanden vanaf uw computer uploaden: Het is eenvoudig om mee aan de slag te gaan. En nog gratis ook!
Overal toegang: Uw documenten op elke computer of smartphone bewerken en bekijken.
Uw werk delen: Dankzij realtime samenwerking wordt het werk sneller gedaan." You foreign fuck :P
 
user142019
11:24 PM
@DomagojPandža lolwot
 
user142019
Oh Google Docs.
 
@Xeo *automatic objects that were not already destroyed
 
Xeo
@MooingDuck Yeah, I kinda implied that.
 
Yay, there's a new Kotoura-san.
 
Xeo
@StackedCrooked Ahh, why would you do that! I need to sleep!
 
11:26 PM
:)
 
I'm kinda irked. catch(...) {std::cerr << "caught " << typeid(???).name << '\n'; throw;}
 
I need to sleep as well, lol.
 
user142019
@MooingDuck typeid(*std::current_exception())? :L
 
@Zoidberg exception_ptr::operator* doesn't exist.
 
@MooingDuck boost::diagnostic_information
 
user142019
11:27 PM
@MooingDuck Maybe it works if you are lucky!
 
And don't use catch (...) but catch (const std::exception&)
 
@Zoidberg In Hell++, it prints "FUCK OFF"
 
@CatPlusPlus already got that, this is the emergency/backup./
 
user142019
(Alternatively, you can go the non-portable UB way and fiddle with the internals of the exception handling mechanism.)
 
You can't do anything in catch (...) so it's better to let it crash
 
11:28 PM
@R.MartinhoFernandes In Hell++, typeid(any expression).name() yields "FUCK OFF".
 
user142019
Use ptrace on the same program.
 
Because that's a horrible bug in code when you can't catch via std::exception
 
@CatPlusPlus knowing the type would be nice for debugging said crash.
 
@DeadMG Nah. That would be too reliable.
 
@MooingDuck It shouldn't ever happen
 
user142019
11:28 PM
@MooingDuck ohlol :P
 
And you can trace to the throw point
 
@R.MartinhoFernandes Maximizes collisions.
 
catch (...) will actually catch stuff like segfaults in MSVC with some settings
Don't use it
 
EWwwwwwwwwwwwwwwwwwwwwwwwwwww
 
@CatPlusPlus that's where emergency/backup comes in. It should be impossible.
 
user142019
11:29 PM
lol
 
@MooingDuck Your backup is crash handler
 
user142019
catch (...) {
     log this shit;
     throw; // :L
}
 
catch (...) won't help you with anything
 
@CatPlusPlus it could if it could LOG THE TYPE IT CAUGHT before termination.
 
You can't
 
user142019
11:30 PM
Anyway, you are going to log it and then what? Ignore it further?
 
Is what I'm saying
 
@CatPlusPlus I'm aware, that's why I'm irked.
 
Which part of "you can't do anything in catch (...)" is hard
 
user142019
(Because that's quite pointless since you cannot debug in release mode.)
 
@Zoidberg Look at the logs and find the bug.
 
11:30 PM
@Zoidberg then I'm going to fire up my debugger and figure out where that object was thrown from.
 
user142019
(And in debug mode you just use a debugger instead of the logs.)
 
@CatPlusPlus the part where you're wrong. You can't handle it.
 
Then let it crash and use a crash handler that produces a dump you can trace back to throw point jesus
You can't do anything meaningful
 
Ell
Woah simmer down
 
user142019
If you need catch (...), you're doomed.
 
11:32 PM
@CatPlusPlus wasn't that something like __catch?
 
@sehe That too, but that's SEH specifically
 
user142019
SEHE *
 
In some cases catch (...) catches SEH exceptions too
Except it can't do anything with them because it's retarded
I have no idea why throw even lets you throw anything that's not derived from std::exception but that's different issue
 
Ell
Can you continue execution after sigseiv?
 
Xeo
Btw, do you guys know any good talks about distributed systems?
 
11:34 PM
@seh That too, but that's SEHE specifically
 
@Ell You can but the state is indeterminate at that point
 
@Xeo tell me when you found one please
 
@Ell Yes. It's stupid though, since there's nothing you can rely on anymore.
 
It is always reassuring when a woman called Brittney from Apple Developer Support answers the phone.
 
So it's safest to just create a dump context and delegate to external crash handler
 
user142019
11:34 PM
int main(int argc, char const* argv[]) {
    try { return real_main(); } catch (...) {
        execv(argv[0], argv);
    }
}
 
@Zoidberg Old
2
A: How to catch absolutely all exceptions / errors

seheSee Vectored Exception Handling This is part of windows SEH (Structured Exception Handling) and IIRC here is precious few errors that you could not at least be notified of in such a case. You will probably want to write any handling code directly to the native WIN32 API (in unsafe/unmanaged co...

@DomagojPandža What makes it so?
 
@CatPlusPlus I think that's where I got stuck. I'm not aware of having any crash handler or anything that produces dumps.
 
@R.MartinhoFernandes lol
 
user142019
Embed LLDB and watch for all exceptions.
 
@sehe Probably because a certain pop star tainted the name beyond repair. :(
 
Xeo
11:36 PM
@R.MartinhoFernandes What you did there, I see it.
 
user142019
I always do throw 42; when I'm too lazy to create a new exception type because clang lacks inheriting ctors God dammit fuck you clang.
 
Clang is wild.
 
Just throw std::runtime_error
 
@DomagojPandža Oh. Completely rational.
I think explicit 3-D pornography- with erect penises poking at the viewer- has no place in political TV campaign ads. Or does it?
^ What's that about, Robot?
 
11:38 PM
@sehe I know, right? :D
@sehe Now who's irrational? ^_^
 
@DomagojPandža I'm posting a tweet. That's not irrational. At least, it builds on a shared perception of reality
 
Ahahah, I've missed you, sehe. :D
 
user142019
// Occasionally I just write a fat big ugly macro.
#define DEF_RUNTIME_ERROR(T, B) \
    class T : public B { \
    public: \
        T(char const* m) : B(m) { } \
        T(std::string const& m) : B(m) { } \
    }

// :3
 
@DomagojPandža Same here :D
 
@CatPlusPlus neat
 
11:40 PM
@Zoidberg Use Boost exception...
@sehe I don't think it has context.
 
waaaiiit. I just had a terrible idea.
2
 
@R.MartinhoFernandes Ah. Carry on
 
@MooingDuck It's not about political ads, is it?
 
user142019
@R.MartinhoFernandes that idea sounds terribl
 
user142019
y good!
 
11:42 PM
@MooingDuck It's not terrible unless you share it
 
template<class T> void function(const T& data) {
    try { throw data;}
    catch(int) {do_int_stuff();} //in-function-type-specific-code  D:
    catch(float) {do_float_stuff();}
    catch(std::string) {do_string_stuff();}
}
 
user142019
Descriptive name.
 
Ok, I'm going to bed.
 
@MooingDuck Static iffy!
 
@sehe sortof, yes
 
11:43 PM
I'll leave you with a great one by Nein:
Seen optimistically, falling sick while alone is great practice for dying alone.
 
Static Very Iffy
 
@MooingDuck ...what am I looking at
 
Code. s/data/tantrum/g helps
 
template<class T> void function(const T& data) {
    if (T == int) {do_int_stuff();} //in-function-type-specific-code  D:
    else if (T == float) {do_float_stuff();}
    else if (T == std::string) {do_string_stuff();}
}
@melak47 ^
 
@StackedCrooked lol
 
11:45 PM
TIL @Mysticial keeps a chat alert for the use of the word "PI"
2
 
Xeo
@sehe It's in the starboard..
 
@sehe lol no. I got a ping.
 
Xeo
Also, I pinged him back then
 
@R.MartinhoFernandes Dying in the company of your loved ones is greatly exagerrated. I am not sure that I wish to twitch and suffer while everyone looks at me with pity and disbelief. Crying doesn't help either.
 
Xeo
@MooingDuck From a positive POV, it's be easy to take care of all fundamental C++ types, since there's not that much. :D
 
11:46 PM
But that's just me. :$
 
user142019
for (auto i : pi)
{
    std::cout << i;
}
 
@Xeo generally you only expect a handful of types.
 
user142019
@StackedCrooked pi is an std::string ಠ_ಠ
 
@MooingDuck You could have just specialized, you know.
 
> Any Time You See a Headline Like ... "Vaccinated Children Five Times More Prone to Disease Than Unvaccinated Children" -NaturalNews.com ...
> ... You Should Read It As ... "Vaccinated Children Five Times More Prone to Disease Than Unvaccinated Children AND ALSO WI-FI IS CAUSING WORMS TO GROW IN YOUR BRAIN" -Hobo talking to his pet rat on the subway Read more
 
11:47 PM
@DeadMG could have yes. That'd be the sane thing to do.Breaks up program flow though.
 
user142019
Even comparing type_infos is better than this shit. :P
 
@Xeo I'm thinking catch(std::forward_iterator_tag) and catch(std::random_access_tag)...
@Zoidberg oh yeah, that's a much better idea in hindsight.
 
@DomagojPandža I don't think it's about having them right there when it happens. I think it's about having someone that cares, not merely physically present. You can die in a hospital in the middle of doctors and nurses and patients, and still die alone.
 
@MooingDuck not just in hindsight
 
user142019
Pro tip: just overload.
 
11:49 PM
I'm already overloaded.
 
Language Design Tip: don't include overload resolution in your language. It's a time suck from which there is no escape
 
user142019
Hmm, TIR: C++ has pattern matching.
 
Xeo
Template (partial) specialization?
 
user142019
Sort of.
 
user142019
Yes. :P
 
11:50 PM
@Zoidberg That's not pattern matching. At least, not until you can can at least template catch blocks
 
user142019
@sehe irrelephant.
 
@Xeo Ok, that'd be somewhat more sane
 
@R.MartinhoFernandes Good point, that's true. I saw my grandfather die a couple of years ago, it was practically expected and we were all there. Not cool. Way too awkward for me. Probably the reason for my view on the matter.
Death is never as graceful or heroic as they portray it in movies. Or books. Or holy books. Or whatever. ^_^
 
Xeo
Also, fuck it, sleep.
 
@DomagojPandža Eek. That's not ... nice. I visited my grandma. It turned out she died about two hours after I left. (inb4 jokes about causality). That was kinda nice. Well, as far as these things get nice
 
11:52 PM
@DomagojPandža depends on the kind of movies you watch :p
 
Zing
 
user142019
@Xeo Goodbye for the second time in an hour.
 
user142019
@sehe Dans
 
@Xeo you'll be back :p
 
Stop that. That's a baaaaad song
Tomorrow, at least
 
user142019
11:53 PM
@sehe Unless death.
 
user142019
(Of either person in question, his Internet connection or computer, or any combination of these.)
 
@sehe Quite preferable to walk away in time. Doesn't make it easier, but at least you don't get stuck with unwanted images. My second least favorite to find about death is when I wake up and someone's sitting on my bed with that look in their eyes, ready to say: "We need to talk."
But fortunately, the latter is just a bad childhood memory.
 
Damn. Reminds me a bit. Oh wait, not about death in my instance
 
I think my uncle managed to do it about right: last summer there was a big family reunion for his 90th birthday party. Then, about a week later he had a massive heart attack as he was walking down the hallway. The doctors are pretty sure he never had any clue of anything happening at all -- was almost certainly dead before he hit the floor.
 
@JerryCoffin That's the best way to die. Or in your sleep. It would make me happy to know that my loved ones saw I didn't suffer or something.
 
user142019
11:57 PM
I'm in love!
 
Still kroepoek?
 
user142019
JA
 
@DomagojPandža I always like the old joke: I want to die peacefully in my sleep -- not screaming terror like all his passengers.
 
@Zoidberg Mutual?
 
user142019
How can I tell?
 
11:59 PM
do they stick to your tongue and mouth and crap and try to not get swallowed?
 
Mmm. Usually, there is a point at which it becomes obvious
 
@melak47 "and crap" - eww
 
user142019
I'll see her again soon; hopefully this weekend.
 
@JerryCoffin Hahah, good old bus drivers. :D
 
11:59 PM
Right on time
 
I introduced one of our devs to SO chat today. hehe
 
user142019
But she's sleeping right now so can't ask. :<
 
Ohai there, king of the jungle!
 

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