« first day (946 days earlier)      last day (4003 days later) » 

2:00 PM
lol
sarcasm failure imminent
 
user142019
You need mutability but the less the better.
 
even when you're serious
 
@rubenvb Call it ==D, and version it as 1==D, 2==D etc. Make sure to release often.
 
user142019
8==D
 
user142019
Whoops!
 
user142019
2:02 PM
Women prefer to program in D.
 
Silly question: Is it possible to use __attribute__s on lambdas? I wanna try a noinline.
 
user142019
Y u no [[]].
 
How would +operator+ work? That would be a cool construct.
 
user142019
@rubenvb Ambiguously.
 
user142019
Or a specialization of x + y + z.
 
2:04 PM
@rightfold because __attribute__ is better.
 
@Pubby Only one way to find out!
 
@rightfold but spaces.
 
@LucDanton Ask Danton! (I tried it already and it didn't work. But then again, half the time I use attributes on normal functions they don't work)
 
Ell
functional programming definately works
 
user142019
@rubenvb are insignificant in C++.
 
Ell
2:08 PM
just not when you go all haskell :3
 
@Pubby Um, works fine here I think? I'm not wont to using attributes though.
 
@rightfold who said I was talking c++?
 
What attribute do you want, and what do you want to apply it to?
 
This is what I tried and fucked up:
auto foo = []() {
    std::cout << "hi pal";
} __attribute__((noinline));
 
Oh right, noinline.
 
2:10 PM
It's just for debugging uses. Seemed useful.
 
auto foo = []() __attribute__((noinline)) { /* body */ };
Imagine you're writing a member function inline; I'm pretty sure that's the syntax.
 
Well, it compiles! Didn't think to try it there.
 
That is, you're applying the attribute to operator(), not the closure object.
Otherwise, you'd go auto __attribute__((blarg)) foo = /* lambda */;. I think.
 
Hm, ok. Thanks.
 
Should I summon an admin person to delete this question of mine?
 
2:12 PM
@undefinedbehaviour you should be able to delete your own question.
 
@undefinedbehaviour If you got some good answers, then no.
 
user142019
@undefinedbehaviour No.
 
@rubenvb No. Not if there are answers.
 
user142019
It has answers.
 
user142019
It shouldn't be deleted if there are good, upvoted answers.
 
2:13 PM
@undefinedbehaviour Why do you want to delete it?
 
Then what do I do about the negative votes that keep on coming in? Obviously it's poor quality if there are only negative votes coming in...
 
user142019
user image
2
 
@undefinedbehaviour Brush them off and move on
 
Weep and be sad. Do not jump off of cliffs.
 
I asked that question to be helpful, but it seems others think it's not particularly helpful.
 
2:15 PM
Don't ask questions to be helpful.
Ask questions to be helped.
 
They're the same.
 
No.
 
A question that isn't helpful will soon get closed because it's too localized.
 
The first implies you think other people will find it useful.
I say ask a question if you need to know something.
 
@undefinedbehaviour That question was asked a month ago. I doubt it'll get closed.
 
2:16 PM
I'm not concerned about it getting closed.
 
Helpful stuff gets closed all the time. SO is silly.
 
@rubenvb A question that isn't useful to other people is a poor question for SO.
 
@undefinedbehaviour You assume you know what others find useful.
You think about things too much.
I asked a ton of specific-to-me questions, and got great and helpful answers.
All my FSM questions from around 2 years ago.
I threw that beast out the window.
It didn't fly far.
 
@rubenvb I find my answers by reading. The only time I need to ask a question is when others clearly don't get the point. In that case, the question was a response to a debate that I couldn't be bothered having over and over again.
 
You should stop using C. It clearly messes up your brain.
 
2:20 PM
lol
 
I don't actually use it that often.
It's somewhat cumbersome.
 
Understatement of the year.
 
C is a language that makes it easy to find an undefined behaviour and hard to find a way around it.
 
user142019
Use Haskell or Go.
 
@rightfold Go is a sucky recomendation.
4
 
2:23 PM
@rightfold You and your fucking Go.
 
user142019
No, Go is great.
 
Yes. I don't like Go.
 
@rightfold Go isn't usable cross-platform.
 
user142019
Haskell and Go are my favorite languages.
 
I prefer VB. ;)
 
user142019
2:24 PM
Go works on Linux and OS X. Hence, it's cross-platform.
 
@rubenvb Is that really an argument against it? Last time I checked, it wasn't 2005.
 
@EtiennedeMartel I find that a very decent argument yes.
Imagine: "Hey look, cool code. Try it out." "I can't, your stupid compiler doesn't work on my PC".
 
Ell
@rightfold windows?
 
user142019
If it works on more than one platform, it's cross-platform.
 
user142019
And two is more than one so.
 
Ell
2:25 PM
-.-
 
@rubenvb Don't confuse implementation and specification.
 
@undefinedbehaviour I saw your other question about xor swaps. It seems like xor would be slower than assignment nowadays.
 
Ell
I hate the pedantry in this room.
8
 
user142019
Also, Go does work on Windows.
 
And Cross-platform is at least 3 big ones, like Windows Linux, Mac OS X.
 
user142019
2:25 PM
Not sure about its standard library though.
 
@rightfold show me.
oh lol
 
user142019
 
user142019
Windows is listed under sysreqs.
 
@Pubby I know that. I was struggling to come up with an opener. It seems like a premature optimisation, though...
 
user142019
GCC also has a Go implementation IIRC.
 
2:26 PM
@Ell Oh you.
 
@rightfold no shit huh.
@rightfold that's the one that doesn't work.
I'll check it out.
 
user142019
Time to leave my bed and take a shower.
 
it's 5 days old though.
I bet it's brokenness is astounding.
 
Cross-platform is an implementation feature, @rubenvb.
 
user142019
Go 1.1 was just released.
 
2:28 PM
@undefinedbehaviour that's why I edited in "usable"
 
@rightfold C99 was released 14 years ago. That's a difference of 87.9!
 
user142019
C99 is obsolete.
 
user142019
There is C and C++.
 
Right, C11.
Implemented in what compilers now?
 
C99 doesn't even exist. There is only C89.
 
user142019
2:29 PM
clang implements it partially.
 
user142019
It supports _Static_assert and _Noreturn.
 
user142019
:lol:
 
I can't see why _Static_assert would be remotely useful in C code
99% of the time I use it I'm using templates
 
user142019
_Static_asserting offsetofs when working with assembly and structs. :P
 
does go have some sort of exceptions?
 
user142019
2:30 PM
panic/defer/recover
 
I mean something I could maybe use to implement some sort of exception handling?
 
I hate exceptions.
 
user142019
Yes, panic/defer/recover.
 
@undefinedbehaviour I hate exception haters.
 
Ell
@undefinedbehaviour why?
 
2:31 PM
I prefer assertions.
 
@undefinedbehaviour because that's exactly the same huh?
 
Ell
If anyone is good at maths, help me do this if you have time: imgur.com/inIZAWC
 
@rubenvb They're useful for essentially the same.
 
Ell
@undefinedbehaviour What?
Assertions are not error handling
 
user142019
@Ell s/maths/geometry/
 
2:32 PM
@Ell They tend to be the source of mass abuse.
 
user142019
Can you recover from exceptions? Yes.
 
user142019
Can you recover from assertions? No.
 
@Ell No, they're not. Exceptions shouldn't be, either.
 
user142019
Do exceptions work in release mode? Yes.
 
Ell
@undefinedbehaviour What? That is the whole point of exceptions!
 
user142019
2:33 PM
Do assertions work in release mode? No.
 
Assertions are old crap
 
Ell
To raise errors and then to handle them
 
they don't solve any problem
 
Ell
what is the point in not being able to handle an error.
 
user142019
Assertions are for people who suck at types.
 
2:33 PM
@Ell Why not handle them before the exception occurs?
 
@kbok error handling doesn't either
 
Ell
@undefinedbehaviour Maybe you can't handle it?
 
I have a hierarchy. I need to traverse it and apply some function to each traversed element. QUESTION: how to name such a function (template parameter)?
 
Ell
Or maybe you want to de-couple file handling errors
 
@Ell When can't you handle it?
 
Ell
2:34 PM
from code which does non file-related things
 
@Pubby Yes, it does solve the issue of "handling an error"
 
user142019
@Riga f
 
@Riga F
 
too short as life
 
@kbok Well then assertions solve the problem of making assertions without checking them
@Riga stephan
 
user142019
2:35 PM
F and f are well-known and used names for function types and functions in generic context.
 
Ell
@undefinedbehaviour Okay, so let's say you're writing a library which does work with files. A library user supplies you with an invalid filepath - what do you do?
 
How to name it in a way to inform reader that this function applies to every object?
 
@Pubby You mean assumptions?
 
user142019
function_that_applies_to_every_object
 
Ell
@Riga well what is the function called?
 
2:36 PM
lol
 
Ell
applicator :P
 
Just name it Function.
 
@kbok assertions are stronger than assumptions
 
user142019
Seriously if you have a function template<typename F> traverse(Tree tree, F f) then only a fool wouldn't understand what f means.
 
(sorry @Ell for my pedantry)
 
Ell
2:37 PM
@Pubby haha no problem :P
 
@Ell I check the failbit after attempting to open the file.
 
Thank you guys! I'll stick to F then.
 
Ell
@undefinedbehaviour So you've found the error, aren't you going to handle it in your library function?
 
The amount of default gravatars in this room is too damn high
 
@Pubby What? There's no assume()
 
2:39 PM
@Ell This doesn't seem like an example of an error that you can't handle without exceptions.
 
Well there is but that's irrelevant
 
@Ell I can give you a hint, although I don't know if it will lead you to a helpful answer (also I'm assuming (b) is what you're after).
 
@Ell my gut tells me the radial lines of the circle perpendicular to the outer lines make an angle of 2pi/3
 
Ell
@undefinedbehaviour You can't handle the error can you? You want the error to be handle somewhere else, correct? You don't want the error to be silently ignored, correct?
 
@Ell Of course you can.
 
Ell
2:40 PM
@LucDanton Yeah b is what I'm after. It's something to do with the fact the circle is touching the radii of the sector?
 
@Ell Yes.
 
Ell
@undefinedbehaviour How? How do you know what the library user wants to do?
 
@Ell I wouldn't use that design mechanism, by the way.
 
Ell
@undefinedbehaviour What would you do?
 
metadiscussion on error handling.
seriously not constructive.
 
Ell
2:41 PM
Maybe the length of a segment. Hmm
 
@Ell I'd design the library to accept IoStream instances, instead. That way, the library user can pass in cin...
 
Ell
@undefinedbehaviour okay, so let's say the pass in an invalid iostream
 
@Ell my gut is right
 
@Ell ... the undefined behaviour kind, or the "failbit is set" kind?
 
Ell
@undefinedbehaviour let's go with failbit
 
2:43 PM
@undefinedbehaviour you said you used assertions instead of exceptions, and now you're trying to prove there are other error handling constructs than exceptions.
 
@Ell Either way, I design my class to the specification.
@rubenvb No. This isn't an area I'd use exceptions for.
@Ell If my class has to handle failbit, I handle that according to the specification.
 
Ell
@undefinedbehaviour I don't understand what you mean
 
@undefinedbehaviour I never said that.
 
@Ell Otherwise, I ignore it and let any exceptions thrown continue to the application.
 
I was right. Not constructive.
Is there a way to close a discussion like this?
 
Ell
2:45 PM
Yeah
BOOOBS!
 
@rubenvb an owner could just bin all of it
 
@ell I've got a solution to your problem
in the form of hints
and simple math
want to hear it?
 
Ell
Yes please :)
 
take half of the picture.
 
Ell
Right
 
2:47 PM
Put the top angle on the left, which is now only pi/6
 
Ell
right
 
draw the inset circle with radius r
draw the line perpendicular to the slanted line and through the center of the circle.
The triangle there has angles pi/6, pi/2 and alpha.
 
Ell
Ahh
 
alpha is easy.
 
Ell
cos angles in a triangle are pi
 
2:48 PM
Now write the length of that perpendicular line in terms of all the rest.
I'll give you the start formula if you want it.
Pythagoras and a cosine projection.
and then a quadratic equation to solve.
 
Ell
ahh right
thank you :D
 
You're welcome.
 
Ell
Now I must get back to the rest of the paper :P thank you, much appreciated:)
bye for now!
 
I take cheques and Paypal.
And wire transfer.
Go sucks
2
let's implement this shit: return -1.
Fools.
 
@rubenvb What other error handling constructs might there be?
"Gee. I don't know... Logic?"
 
2:53 PM
@undefinedbehaviour error code returns (typical C), global error state, object state (iostreams), and tons-of-other-things-I-don't-even-know-myself-but-I'm-sure-exist-somewhere.
 
@rubenvb Have you ever heard of signals? They're stupid, too.
 
@undefinedbehaviour oh yes, signals and messages.
Exceptions have the advvantage of optimized implementations.
Like virtual functions.
Something you could do in C, but WHY?
 
@rubenvb Intercepting exceptions has the advantage of being even more optimal.
 
wtf is "intercepting exceptions"?
Why am I even talking about this?
 
@rubenvb Let's assume you add two int values together, and the result causes an exception to be raised.
 
2:56 PM
@undefinedbehaviour that's a hardware exception. I hate those.
I was talking about C++ exceptions. Obviously.
 
@rubenvb Doesn't it raise a C++ exception?
 
adding two ints should never raise an exception.
 
Bose AE1 headphones, are they good?
 
@undefinedbehaviour No.
 
@rubenvb Then I've read the C++ standard wrong...
 
2:58 PM
@undefinedbehaviour yes you have.
 
@Crowz You do know Bose is an acronym for "Buy Other Sound Equipment" right? :P
 
Oh, and don't read the C++ standard as a manual.
 
Might I recommend not starting with the Standard?
 
@Borgleader awh :( so they're not good?
 
It's more of an arcane encyclopedia that gloriously fails at its purpose.
 
2:59 PM
@Crowz I'm just jking I have no idea
 
@rubenvb No it doesn't.
 

« first day (946 days earlier)      last day (4003 days later) »