« first day (445 days earlier)      last day (4496 days later) » 

10:00 PM
@RMartinhoFernandes It wouldn't be hard for the standard to say that execution resumes right after where the object-being-destructed would have normally been destructed. That should be doable via a jump from stack-unwinding code to normal-execution code.
 
A perhaps useful gotw...
 
@MooingDuck But then you don't want to stop unwinding!
{
    foo a, b, c;
    throw blah(); // again, b stops unwinding
    c.frob();
} // a was just leaked
 
gah code is hard
 
@RMartinhoFernandes the place in the "normal" code flow right after b's destructor should be the begining of a's destructor. It's no longer doing the exception-stack-unwinding code, but in normal code-flow-destruction code
 
10:03 PM
@MooingDuck Ah, so all you want is the ability to swallow an exception from a destructor?
 
@RMartinhoFernandes yes. Normal use-case would be to handle it or replace it.
 
Ell
@StackedCrooked how can this be? pirating is just illegal! Simple!
 
@Ell Apparently it is now also a religion.
Simple!
 
@MooingDuck Ok. You got me confused with the "stop stack unwinding" part :)
There's no way to encapsulate exception handlers in a way that doesn't require an explicit catch. Yeah, that's annoying.
 
I'm currently fond of Command oriented interfaces. Combined with decorators they enable me to create a hookable API. I love hooking.
 
10:07 PM
@StackedCrooked Do you fish?
 
@RMartinhoFernandes Not really that kind of hooking.
 
But fishing is cool. You should try it.
 
I've never tried it.
Seems a little pointless to me.
But that could probably be said of any fun activity.
Like skiing. Why go up if you're immediately going down again?
 
@StackedCrooked Looks Javaish.
 
10:11 PM
@CatPlusPlus I've implemented something similar at work in Java. I liked it because I could hook.
I think I would use a similar design in C++.
 
Classes for commands, really?
 
Ell
to me its stupid
 
Yes, really!
 
Ell
not what classes are fore
 
And separate executor. Maybe you've got command manager and factory, too, eh?
 
10:13 PM
It's good for making a C++ API over a RPC protocol. Each RPC call can be considered an entity, so why not use a class per call?
 
I don't understand half of it, but it seems like some dudes made a beam of light not exist/not detectable for 40 picoseconds.
 
@CatPlusPlus No, I didn't do the separate executer and crap.
 
@StackedCrooked What about functions?
 
How is each RPC call an entity?
 
AbstractCommandManagerFactorySingletonGetInstanceCommand.new().exec()
 
10:14 PM
I think it's overthinking and overdesigning.
 
If you want to do stuff like this, then use a more dynamic language, not pour silly boilerplate all over the code.
 
@CatPlusPlus It's an entity. I don't know what to say.
 
Ell
@Maxpm I agree
 
> One of the primary ones is the ability to easily add common behavior to commands by decorating the command executor.
Lambdas can provide similar functionality, no?
 
Also, the result is not returned by the invoke method, but by callbacks that must be provided by the caller. This way it's easy to support async.
@RMartinhoFernandes Yes, they do.
 
10:16 PM
Asynchrony is easier to implement with async and await :P
 
Ell
begin() end()
 
What about it?
 
I hate the decorator pattern. I had to use it today to work around Java's lack of multiple-inheritance.
 
Well, what did you expect.
You don't program in Java, you workaround in Java.
 
Java is the programming language of scaffold building.
 
10:19 PM
> Code isn’t that hard to start to learn – one outsourcing firm takes people with no training and makes them full-time Java programmers in 3 months.
 
^ This is a Java project.
A mountain of underlying abstractions and patterns for a little bit of application.
And monkeys.
 
Hmm, where does that "and it is suck" come from?
 
It wasn't even to solve some huge architectural problem, either. That's what pisses me off.
It should be simple.
 
No. This is a Java project.
 
IMO, there's basically two advantages Java has over C++:

1. It's harder to shoot yourself in the foot.
2. Java questions get you a lot of rep on SO. It's the second biggest tag...
 
10:22 PM
@EtiennedeMartel google doesn't know
 
@EtiennedeMartel Some bad English in a post one day.
 
@Mysticial C# has both of those advantages, and has a much smaller suckiness coefficient than Java.
 
@MooingDuck It's a local meme.
 
@RMartinhoFernandes we need to teach google
 
I don't see how decorator can emulate multiple inheritance. Decorator seems more like a way to replace a long vertical inheritance line.
 
10:23 PM
It's indigenous meme.
 
@EtiennedeMartel I never learned C#. But I was forced to learn Java in high school...
 
There's nothing to learn in Java.
 
@Mysticial Try C#. C# 3 or later, that is. It's great.
 
C# is to Java like C++ is to C.
 
10:24 PM
 
Now that I determined that I have no chance of passing this test, let's do something fun instead.
 
More like this.
 
@StackedCrooked In my case, it had to do with checking whether certain moves were valid or invalid for given chess pieces.
 
@CatPlusPlus Wut? Tests in early january?
 
I figured that queens share functionality with bishops and rooks, movement-wise.
 
10:25 PM
Yeah.
 
@EtiennedeMartel That's how it's done in the civilized world.
 
Fortunately there's always a second try.
 
@CatPlusPlus Tests for what?
 
@Maxpm Ah, so a queen is both a bishop and a rook?
 
There were some tests back in December, too. And small ones in November.
 
10:26 PM
@CatPlusPlus I know that reasoning all too well.
 
@Maxpm I see a chain of responsibility pattern here.
 
From the January tests so far, I've passed 0/2.
 
@RMartinhoFernandes Well, no. A queen's movement pattern is both that of a bishop and that of a rook.
 
@RMartinhoFernandes :D
 
@CatPlusPlus Woo, perfect score.
 
10:27 PM
And it's not even exam session yet.
 
A king is a queen and is a slow.
 
Queen wouldn't have directly derived from Bishop and Rook, because then you could do things like Rook rook = new Queen();.
 
@StackedCrooked So if a king could move like a queen, how much longer do you think a typical chess game would be?
 
In Factor, you could create union class for bishops and rooks, and implement generic move-piece on that.
 
@Mysticial -700%
 
10:28 PM
@Mysticial There would be even more draws.
 
And queens, I guess.
Factor has neat OO system.
 
Chess is a game of draws apparently.
 
Methods are decoupled from classes.
 
Chess is not as strange as tic-tac-toe.
 
@CatPlusPlus Like Go?
 
10:30 PM
class Horse : public IsAHorse {};
You know, cleanly separating interfaces :D
 
@StackedCrooked No shit, Sherlock.
 
Yeah, but Factor has more goodies, like predicate classes.
 
struct Horse : Amazing { Taste lick() { return raisins; } };
4
 
@CatPlusPlus Its OO system certainly sounds interesting. What kind of language is it, besides?
 
struct Bisshop : GAY {};
3
 
10:31 PM
@RMartinhoFernandes Damn, beat me to it.
 
You can define a class for all integers greater than 42, and it'll JustWork(TM).
 
@StackedCrooked So what?
 
@EtiennedeMartel So GAY!
 
@Maxpm Concatenative, stack-based.
 
@StackedCrooked I don't get it. Who's Bisschop?
 
10:33 PM
@RMartinhoFernandes Dammit. That's dutch.
 
@StackedCrooked Still not English.
 
And now it's still wrong. Aargs.
 
Also, Bishop was not gay: he was an android.
 
His diagonal trot is gay.
 
Sure seems wonderful.
 
10:34 PM
As in, not straight.
 
I still don't get it.
It's not a curve.
 
Never mind then.
 
@StackedCrooked Oh. That sucked.
 
The chess piece that doesn't move straight is the horse.
 
class foo : big_nasty_template { void foo() { big_nasty_template::foo(); }
 
10:35 PM
Well. I'm sorry to have disappointed you.
 
@RMartinhoFernandes Heterosexual people are commonly referred to as "straight".
 
how can I do that without typing big_nasty_template twice?
 
@EtiennedeMartel Yes, but the gay piece is the horse, not the bishop.
 
@RMartinhoFernandes The fabulous horse.
 
10:37 PM
@RMartinhoFernandes was that in alien?
 
The android in Alien was named Ash. (Sorry for spoiling)
 
@Eloff typedef it: class foo : big_nasty_template { typename big_nasty_template parent; foo() parent(){ } void bar() {parent::bar();}
 
The movie Hackers is so painfully hollywood, but I can't look away...
 
10:39 PM
An android that looks exactly like Bishop also appears at the end of Alien 3, but it's not Bishop.
 
@MooingDuck can I also replace foo : big_nasty_template with foo : parent ?
 
And there's Call in Alien Resurrection.
One android in each.
Let's see if there's one in Prometheus.
 
@Eloff not unless you know all the template parameters before foo. Otherwise it must be twice minimum.
 
@MooingDuck thanks
 
user142019
Good evening.
 
10:43 PM
Greetings, human.
 
It's root... Slash... Period... Workspace... Slash... Period... Garbage...
 
Fuck everything about everything.
 
user142019
Human?
 
@CatPlusPlus What?
 
user142019
I'm a human?
 
10:44 PM
I'm mad at world.
For being so fucking disappointing and boring.
 
Go to sleep.
 
user142019
emo
 
@CatPlusPlus Yeah, we know.
 
I have to be on that test, even if I'll hand over empty sheet.
 
user142019
@CatPlusPlus try C++! It will better your life.
 
10:45 PM
Otherwise I won't get the second try.
 
@CatPlusPlus What is the test about?
 
Logic.
Formal logic.
 
user142019
Sounds fun.
 
@Maxpm Yes, because all the modern hacker does today is push a button and hide behind a prepubescent identity.
 
Oh. I remember taking a logic course once. It was painful, but I managed to get out of there with a C+.
 
10:46 PM
I hate it when people ask, "Are you ready for the test?" That's the point: I don't know. It's a test. It tests my readiness.
 
Unless you know the answers beforehand.
 
@Xaade I'm not sure I'd call sexual predators hackers.
 
@Maxpm I'm always ready for a test.
Am I the only one that enjoyed logic class?
 
I don't even know why I'm going for that degree.
 
I feel left out.
 
10:47 PM
@Xaade The modern hacker abuses the fact that many programmers forget about the whole "never trust user input" rule.
 
@Maxpm Good point. Tests don't test knowledge or skill. They test readiness. I could blaze through homework and fail a test. But education totally prepares people for the work place.
 
@RMartinhoFernandes I enjoyed it. The exams, not so much.
 
@EtiennedeMartel Not so many forget about it.
Most don't even know about it.
 
And then you can include every file on the webserver.
 
Really the workplace is simply, how fast can I recover (daily) the knowledge I need to do a task, and how I can improve how well I accomplish the task.
Both are meta-work.
 
@Xaade And how I can collaborate with others to that end.
 
If you want someone that can check off boxes, then you're hiring for a government position.
 
@Xaade No, that requires special abilities. Like teleportation to Mars.
 
Why would you want to teleport to Mars, anyway.
 
10:51 PM
Ask Obama.
 
@CatPlusPlus To show off that you can do it. :)
 
And the lack of a suitable atmosphere is probably not healthy.
 
@CatPlusPlus Oh, it was to sign some alliance with the animals there.
 
@Xaade You are so worldly.
 
10:51 PM
@EtiennedeMartel I just find it funny when I see transcripts of a person claiming to be a 12 year old girl, heckling a hack target, then going on about how great of a hacker they are, then finding a screenshot of a DDOS program that has an input for an IP, and a big red button.
@StackedCrooked Does not compute!?
 
@Xaade You just described lulzsec.
 
Heh.
 
@EtiennedeMartel or anon
All the tools for hacking targets have pretty much gotten static, because cyber-security is a hoax.
 
@CatPlusPlus "to “acclimate Martian humanoids and animals to their presence” in order to secure the U.S.-Martian alliance."
 
@StackedCrooked May you please explain that?
 
10:55 PM
There are dictionaries you know.
 
If we go to Mars, it's for the Prothean ruins there.
 
> Sophisticated, versed in the ways of the world.
 
@EtiennedeMartel Apparently you haven't watched enough "Ancient Aliens". There's nothing saying that "life" is limited to the requirements that life on earth has.
 
@Xaade I was talking about humans. We wouldn't fare well on Mars.
 
@Xaade You mean "Ancient Astronauts"?
Also, I believe Obama is indeed limited to the requirements that life on earth has.
 
10:56 PM
Stargate is documentary.
2
 
@StackedCrooked Oh, it has a negative connotation where I live. It means greedy, materialistic, shallow.
 
@Xaade wait what? Where do you live?
 
@CatPlusPlus Live feed from an alternate universe.
 
Whoops. @TheObserver reported that NBA player Baron Davis has a "herniated dick." Why we need editors: http://journ.us/xp3aKV
 
Is reinterpret_cast supposed to be able to cast an integral type to an enum type?
 
10:58 PM
@MooingDuck Sorry, I can't make either definition fit to the remark I made.
 
@SethCarnegie No.
 
@SethCarnegie reinterpret_cast only works with pointer types, IIRC.
 
@SethCarnegie No. All conversions must involve a pointer or reference; or be from a type to itself.
 
Oh, it works with references too?
 
10:59 PM
Dum dum.
 
The more you know.
 
Ah ok, I thought it did whatever static_cast did and more
 
@SethCarnegie no, it is completely different. static_cast does conversions, doesn't it? reinterpret_cast doesn't.
 
The standard calls them conversions anyway.
 
@Xaade Cue zeppelins.
 
11:00 PM
Gotta love Microsoft for typedefing unsigned int as UINT_PTR
 
@SethCarnegie What? No stars?
 
@SethCarnegie UINT_PTR That should make it clear for everyone.
 
I have a question. Why the heck is "Reinterpret cast" under "Postfix expressions" in the standard?
 
@RMartinhoFernandes what stars?
 
@SethCarnegie unsigned int* or unsigned int?
 
11:01 PM
@RMartinhoFernandes unsigned int
 
unsigned int* is PUINT_PTR
 
That's awful.
Gosh what?
 
It's not even a pointer.
How does that make sense.
 
Does reinterpret casting break strict-aliasing? Or is it under the "implementation-defined" category?
 
11:02 PM
It makes Microsoft Sense©®™
 
@Mysticial Yes, you can break strict aliasing with it.
 
@CatPlusPlus My life is ruined, bastard.
 
#if defined(_WIN64)
 typedef unsigned __int64 UINT_PTR;
#else
 typedef unsigned int UINT_PTR;
#endif
 
Fiddling around with bootloaders. Wish me luck.
 
Seems to be meant as an unsigned representation of a pointer object.
 
11:03 PM
@RMartinhoFernandes ah, ok
 
@StackedCrooked Oh, I see. That is meant to be like std::uintptr_t.
 
@RMartinhoFernandes yeah
 
@Mysticial It breaks according to GCC's warnings.
 
@RMartinhoFernandes also in the category of aweful, why does cdecl.ridiculousfish.com seem to think ptr is a keyword is some sort.
 
@Mysticial I think "reinterpret" gives it away :D
Reminds me of small-buffer optimization.
 
11:11 PM
Silly mutable strings.
 
@StackedCrooked except the Ruby code doesn't appear to have a way to tell if it's SBO or heap-allocated
 
It's an implementation detail.
 
That's what they all say.
 
@Maxpm you mean like this: gist.github.com/8f8881ffa3db7eb5a6c4
 
@sehe I'll take a look at that later, if you don't mind. I need to get my computer booting.
 
11:23 PM
I almost made the movetables statically generated. But I though better of it and made them statically initialized from 'first principles' (i.e. movement vectors related to 'movement axis'. A piece posesses axes and has 'jump' (singlestep) or 'ray' nature)
@Maxpm no hurry. It is not full source. Also quite old. It just shows you I had the same generalization thought applied there. If you wonder what matrix chess is and what 3D pieces are supposed to do, see matrixchess.eu (not mine!!)
 
I think a Go engine would be interesting.
 
@sehe why 3d v 2d? And what do the elemnts of vector represent?
 
3d vs 2d seems a little unfair.
 
3d/2d: see the linked site
Elements of the vector represent offsets (file,rank,board) of movement. So, `(1,0,0)` for rooks; it gets permuted so the same movement is allowed in all directions (1,0,0),(0,1,0),(0,0,1) and it gets mirrored/inverted too.
That way, a bishop moves like (1,1,0) and inversions/permutations take care of all the symmetric movements
And, obviously, a queen uses a superposition of the movetables for rooks + bishops
It is a toy thing. A collegue of mine knew tha author of Matrix Chess (see link), and I reverse engineered the internet-play protocol, implemented my own game engine as an April Fools' prank: matrixchess.game-host.org/index.html
 
How about 3D chess? It's pretty easy to extend the movements of all the pieces to 3D except for maybe pawns. I suppose the enpassant rule would get a little hazy...
 
11:39 PM
@Mysticial: it's what I implemented. I followed the rules as documented here
 
@sehe oh cool...
 
@Mysticial Enpassant isn't hazy. The castling options are funky though. The castling happens on the diagonal if available.
@Mysticial You can try it for free with my prank implementation. I hacked the executable to not require a license (only 4 people ever got one, I think, and no one paid for it, I'm sure). You can hack the registry to point it at my lousy C++ CGI implementation.
Reverse engineering is an addictive hobby there :)
 
damn... that looks complicated... :)
 
hi, do you think c++ is a good choice in to do list managment program creation? :)
 
Ah, todo list.
I wasn't sure what this says.
Depends on what you're trying to do. Situation with UIs in C++ is, well, not perfect.
 
11:46 PM
you know, You can add tasks, add comments to them, set yourself (or others) deadlines when this needs to be done and so on
 
Especially if you don't know the language.
 
prety new to C++ but already felt the UI beeing prety complicated, was working on android mostly before that
 
@EimantasKasperiūnas I think there's about a billion tools that already do that.
@EimantasKasperiūnas There's no standard UI package in C++. Which framework are you using?
 
so far i use visual c++, and use windows form application
it's powered by .NET I think
 
@EimantasKasperiūnas so, C++/CLI?
 
11:49 PM
If you plan on using .NET, switch to C#.
 
@EtiennedeMartel debatable, I like C++, which can call C#'s stuff with Visual C++
 
well about having already tools like this, this is kinda educational work, but the whole idea of program is not only simple to do list
 
@MooingDuck It's clunky at best. If you really want to do .NET, use C#. C++/CLI is essentially a "glue" language.
 
@EtiennedeMartel I haven't done enough with it to feel the glue much. It feels like CLI is an extension of C++ definitely though. Maybe unwanted, but doesn't feel like glue.
@EimantasKasperiūnas I'm heavily biased toward C++, use C#
 
C++/CLI downright sucks. It's only good for integrating existing C++ code with .NET apps.
Even MS admits that much.
 
11:52 PM
@CatPlusPlus I would do that with plesure, but at my programming school they teach C++ so I'm prety much obliged to work with it :P
 
C++/CLI is not C++.
 
@MooingDuck The main problem is that C++/CLI actually feel like a new language instead of an extension.
 
It's based on C++, but it's not the same language.
 
@CatPlusPlus that's what wiki says, and I'll bow to wiki.
 
If you want to write it in C++, you can't use .NET.
 
11:54 PM
Hi. Is these two are always equal if(i==NULL) && if(!i) ?
 
@EtiennedeMartel it seems the glue sticks out when you write a C++/CLI class, which I never did in hindsight
@utdemir no, depends on the type of i.
 
Depends on what i is.
 
is a pointer
 
@utdemir Then yes
 
should be p maybe :)
thank you
 
11:54 PM
Stop stealing my sentences!
 
@CatPlusPlus moo
 
not sure what is C++/CLI not so much familiar with all that terminology, what i use is:
http://www.youtube.com/watch?v=pgfHvxVKOhY&feature=related
 
That's C#.
 
@EimantasKasperiūnas if you type a ^ and it's not an xor, then you're using CLI
 
Also, does an IDE really need a video tutorial?
 
11:56 PM
oh sorry, looks same in c++ even havent spoted that, let me find another example
 
There's no hope.
 
well thats the same just in c++
 
@EimantasKasperiūnas The syntax is similar, but everything else is different. Much different.
 
@EimantasKasperiūnas yeah, but we can tell by the icon in the project window on the side :P
@EtiennedeMartel not the window editing GUI. It's exactly the same. That's what was in the video
 
11:57 PM
@CatPlusPlus yes. I never figured out XCode and abandoned it eventually.
 
@MooingDuck Yeah, well, that's a matter of the framework being used.
 
already had headache when i had to take text from textbox
 
@CatPlusPlus also every IDE is a PITA when trying to create a project with existing sources that I've seen.
 
and send it to mysql server
 
@EimantasKasperiūnas can you show us the declaration for main? nevermind, gui...
@EimantasKasperiūnas can you show us a line of code?
 
11:58 PM
1 sec
main function witch calls form1
int main(array<System::String ^> ^args)
{
// Enabling Windows XP visual effects before any controls are created
Application::EnableVisualStyles();
Application::SetCompatibleTextRenderingDefault(false);

// Create the main window and run it
Application::Run(gcnew Form1());
return 0;
}
 
That's C++/CLI
 
Yeah, that's a pretty standard WinForms main.
 

« first day (445 days earlier)      last day (4496 days later) »