« first day (940 days earlier)      last day (4011 days later) » 

2:00 PM
doing that :-)
 
Xeo
@rubenvb yes, but the derived class dictates the vtable - but I think the robot is on about an upper bound for the baseclass pointer
 
Soooo. You can convert R(C::*)(A...) to any S(D::*)(B...) even if S(D::*)(B...) is of the just-an-offset-variety by making it an index into a huge table!
It's not supposed to be usable anyway, so you can mess it up however you please.
And there's Hell++ for you :P
 
Xeo
@R.MartinhoFernandes lol
 
Now that I solved the problem for Hell++, I wonder how actual implementations do it...
 
Xeo
haha
Ask a question
 
2:03 PM
Will have to be later. I have to leave for an appointment soon.
 
user142019
I think I'll do overloading on arity like Erlang.
 
@R.MartinhoFernandes you accidentally a word
 
user142019
@TonyTheLion you accidentally
 
streambuf: This template is designed as base virtual class for all stream buffer classes that handle narrow characters (of type char).
 
@TonyTheLion Two, actually.
 
2:07 PM
@ScottW
dammit markdown
screw you
 
user142019
@ScottW .
 
there
 
@rubenvb wont std::basic_iostream be a better solution ?
 
You know someone is doing something wrong somewhere when you're forced to insert sleep() calls in your keyboard input handling code...
#ihatebrowsers
 
@Darkyen yeah, sure. Something in the stream library will give you what you need. In your case I wouldn't go lower than ifstream
 
2:09 PM
@rubenvb i cant use filestreams :-)
 
Xeo
@jalf wat
 
the data is not garunteed to be coming from a file, infact its coming from an open socket via javascript[ node.js ], which pipes the buffer to the ffmpeg transcoding interface. The stream is supposed to handle data for processing and seeking if possible. Maybe i got it wrong though :-)
 
@Darkyen then istream it is. Oh, and Java?
 
My batch file still will not work :\
 
:-)
 
2:11 PM
@Xeo When I receive a keyboard event, I am going to have to wait N milliseconds to see what the next keyboard event is (if one arrives within that time limit), before I know how to handle it.
 
Xeo
huh
And you use sleep for that?
 
Well, no, strictly speaking, setTimeout (it's javascript)
 
huh Java.
GTFO
:P
 
@jalf dude
 
ok, in other news, my ubuntu got its revenge from the grave
 
user142019
2:13 PM
> Derived pointers only pose a hasard to copying collections.
 
lol
 
user142019
Is this an actual word or is it a typo?
 
I had to put a new Ethernet card (now I have 3), I cut my finger in process
 
@jalf in javascript you can assign eventlisteners document.addEventListener('keydown',function(e){ /* do something */ });
 
also, everything crashed, including the overlord
 
2:14 PM
ps move to js room for more
 
@rightfold hazard is the word. hasard is the typo.
 
@Darkyen ever heard about C++ lambdas?
 
@BartekBanachewicz no
well heard yes, but used no
 
@Darkyen document.addEventListener("keydown", [](event e){ /*do something;*/});
that's valid C++.
 
@Darkyen: that's sad.
 
2:15 PM
you kidding me :o
wow!
 
@sehe Nooooooo
 
thats AWESOME :D
 
welcome in 2013
 
@EtiennedeMartel you heartless bastard.
 
C++11 ?
 
2:16 PM
lol 0x11
 
no, C++11
 
@rubenvb My heart is a lump of coal.
 
@Darkyen C++11. C++0x is so 2010.
 
C++0x was the draft.
New draft is called C++1y
 
Now it's C++1y
Then it'll be C++2z
 
2:16 PM
sorry mixed them off exitement :]
 
@rubenvb C++3z FTFY
 
C++14 and C++17
 
Then who knows, the world might just end.
 
@Darkyen Yes. How do you think I get the keyboard events in the first place? :)
 
you showed me something that makes me feel i have been blinded completely since forever :D
 
2:17 PM
The problem is, once I've gotten that event, it.... gets messy
 
@jalf Up your ass?
 
The problem with modern C++, is that despite all the additions, it still can't beat the expressiveness of pure C.
 
@Darkyen that should be a lesson of not bashing languages you don't know
 
The C++ Standards committee ran out of letters. We will now end the World by throwing an unhandled exception.
 
@ereOn we all know you are trolling
 
2:17 PM
@ereOn You're good.
 
@ereOn 10/10
 
@R.MartinhoFernandes Too obvious. I knew it.
 
:9383289 he is doing it again
 
Tek
So what's the latest and greatest book to read up on writing maintainable C++ code?
 
@BartekBanachewicz if i dont bash how will i learn :-)
@jalf u got a jsfiddle ?
 
@Tek The C Programming Language by K&R.
 
Wait, I might have made a mistake.
 
2623
Q: The Definitive C++ Book Guide and List

grepsedawkThis question attempts to collect the few pearls among the dozens of bad C++ books that are released every year. Unlike many other programming languages, which are often picked up on the go from tutorials found on the Internet, few are able to quickly pick up C++ without studying a good C++ book...

 
@Darkyen when I get a keydown event, I need to be able to determine if I'm going to get a keypress as well. Sometimes you do, sometimes you don't, depending on which modifiers are down, and which browser you're using as well as which key is being pressed
 
@Darkyen by, uh, learning, which is usually reading stuff before you write dumb things?
 
2:19 PM
The only sane way to determine that is by waiting a few milliseconds after receiving the keydown, and seeing if the keypress arrives
 
@BartekBanachewicz Hey, I didn't expect MLP to be that good. Maybe I'll get surprised. And if it sucks, let's just hope it's non canon.
 
@jalf ~sane~
 
@BartekBanachewicz Compared to all the alternatives
 
@jalf does that even work on touch screens?
 
Nothing works on touch screens.
 
2:20 PM
which include delicious stuff such as hardcoding a table of each possible keyboard layout, as well as a full hardcoded listing of the precise behavior of every browser
 
@EtiennedeMartel the dating/high school musical thingy is making me wanna puke. MLP was about friendship, but this is just targetting original MLP fangirls aging up, and that DOESN'T scale into the male 20+ year old community
 
@jalf OH GOD MAKE IT STOP
 
@rubenvb How are you going to send keyboard events from a touch screen? :)
 
@jalf on screen keyboard.
 
@BartekBanachewicz We'll see. See this comment.
 
2:20 PM
@jalf OSK
 
Duh.
 
@rubenvb That should work, yes. :)
 
because technically, there is no "key down"
 
it would still send appropriate keyboard events to the browser
 
@BartekBanachewicz What you watching now?
 
2:21 PM
@R.MartinhoFernandes stop being cat
@R.MartinhoFernandes MLP is going to expand their market to girls in early teens by converting mlp characters into real people.
 
@R.MartinhoFernandes exactly. So compared to that, waiting 5 ms before handling an event is a very sane approach ;)
 
@jalf is js really that retarded it can't get a keypress for the letter 'e'?
 
@rubenvb No, you can get a keypress for the letter 'e' just fine
 
@jalf put it on js fiddle
 
It only gets tricky at stuff like ctrl+'e', or é
 
2:22 PM
why on earth would u like to check for press o_O after down
 
or ctrl-alt-2
 
@EtiennedeMartel the hope is amazing, but still uh, I can't help but to fear it
 
@jalf Aren't those handled by the OS/browser?
 
@Darkyen because how else do you determine which character has been entered? :)
@rubenvb Depends on what you mean by "handled" :)
 
wait a second!
 
2:23 PM
as in ctrl-alt-e shows up as € here.
 
@thecosh is it a puppy?
 
so I suppose the OS handles the combo to produce the right character.
 
@Darkyen nah, I don't have a single cohesive sample. Lots of small test cases and a ton of notes, but nothing coherent yet :)
 
@BartekBanachewicz It's still the same writers.
 
@rubenvb There are different layers of stuff.
 
2:23 PM
@jalf intresting
 
@rubenvb sure, for those keys, the browser (assuming it's not one of the broken ones) would send keydown for CTRL, keydown for ALT, keydown for E, adn then keypress for €
 
@R.MartinhoFernandes oh I see. Layers and stuff.
 
and then keyup for E, ALT and CTRL respectively
 
Usually you would expect an API that produces scan codes (keyup/keydown) and another that produces characters (keypress).
 
@jalf OK. And what do you need all that info for?
 
2:24 PM
@EtiennedeMartel okay. I wanted to say how the target is different, but then I've realized that the original target of MLP was also different. Embrace the future!
 
@rubenvb Sending it to a VNC server :)
And the VNC protocol is almost as fucked up as your average web browser
 
You want VNC through a browser?
 
@jalf why cant you use e.keyIdentifier ?
 
because the VNC protocol does not have the distinction that @R.MartinhoFernandes mentions. It only has keyup/keydown
 
@BartekBanachewicz Hey, it'll probably suck, but that doesn't mean I can't torrent the shit out of it and get an entertaining hour and a half out of it.
 
2:26 PM
@Darkyen because it gives me some kind of scancode-alike. Not the actual character
 
@jalf was that to me ?
@jalf it gives you a unicode representation iirc
 
@Darkyen nah, just a continuation of my previous comment
 
jalf is slow on chat.
 
@Darkyen It does not. :) (It gives you a scancode formatted as if it were unicode. If I press my Ø key, I get scancode 0xde, and keyIdentifier==U+00DE)
 
And wants VNC through a browser.
 
2:27 PM
ah i confused -_- if not
lemme nail this for u :-)
 
@jalf use ogonek to normalize it.
bother the robot.
 
@rubenvb yup
 
Xeo
> Game engine micro-optimization situation
I want to shoot someone
Right now
 
Xeo
With an RPG
 
2:28 PM
@rubenvb No! Check my chat profile.
 
> The interior of Amazon’s giant fulfilment centre is the size of nine football pitches.
holy crap
 
@Xeo Wise choice of words.
 
that's large
 
@R.MartinhoFernandes lol I know about that.
 
@TonyTheLion A gridiron, or an actual football pitch?
 
2:29 PM
@rubenvb (1) in Javascript? (2) ogonek is not ready for use, and (3) it's not normalization that's the problem, but the fact that the code it gives me is a scancode :(
 
> Bring alcohol, a jaded perspective, and a reckless disregard for copyright law. We'll MST3K this thing into the ground.
/cc @BartekBanachewicz
 
@jalf Why is that a problem?
 
lol
 
@CatPlusPlus because it doesn't tell me which character was entered :)
 
2:29 PM
What do you need that for?
 
@jalf doesn't VNC push that to the OS on the other end?
 
You're doing VNC client or something as far as I can see
 
ie not the character but the keypresses?
 
@BartekBanachewicz Mystery Science Theater 3000. A "riff" (live humorous commentary of crap films) show with the slogan "It's just a show; I should really just relax."
 
2:30 PM
@rubenvb Nah, because the server doesn't know which keyboard layout the client is using
@CatPlusPlus yup
 
@jalf it should.
or not.
 
Then you just need to forward the keystrokes, not interpret them
 
I'm not sure.
 
@rubenvb Tell that to the geniuses at RealVNC who invented the protocol. :) (It doesn't)
 
hmm
 
2:31 PM
So I need to interpret the keystrokes client-side
 
@TonyTheLion Anyway, I went to check and a gridiron isn't that different from a football pitch in terms of size.
 
@jalf Have you asked the VNC people how to best handle this?
 
@CatPlusPlus Because the client is expected to do it according to the VNC protocol. :)
 
@rubenvb the VNC people living in the TCP village?
 
2:32 PM
@rubenvb I've checked the VNC specification, and used wireshark to check what other clients do
trust me, there are no easy solutions.
 
@R.MartinhoFernandes ah right
 
@jalf but maybe there is a Better Way(tm) that we and you don't know about.
 
And note that so far, I haven't even gotten into all the browser bugs!
And boy, there are a lot of those
 
@jalf Like Java
 
@R.MartinhoFernandes lol, a puppy or the puppy?
 
Ask me about Firefox! Or IE! Or Safari! or, if need something to do for the rest of the week, ask about Opera!
 
RDP is better anyway
 
@R.MartinhoFernandes what would be worse?
 
I think you chose the wrong tools for the job. Or someone else did.
 
@rubenvb naw. Trust me. I understand the problem fairly well by now. I know exactly what needs to be sent to the server, and I know what I'm getting from the client, and I know how they can approximately be mapped against each others with only a small loss of data ;)
 
2:34 PM
whistles
 
@R.MartinhoFernandes it does not require any feeding... though I see no reason why you would not be able to give it food.
@R.MartinhoFernandes :P
 
Is this a voluntary project or are you forced at gunpoint to do this
 
@rubenvb The nice thing about VNC is that (1) we already use VNC, so server-side we're pretty much home free, and (2) there's already a browser implementation of the VNC protocol (which we're using), and I'm just working on a patch to fix some of the issues with it
 
@thecoshman Btw, did you get an estimated delivery date?
 
@CatPlusPlus They are holding his family hostage I bet.
 
2:36 PM
@CatPlusPlus gunpoint, I guess. It's for work
 
(I'd go with the gun)
 
@jalf do you play banjo?
 
@R.MartinhoFernandes not yet got shipping confirmation, but I would expect it to be with you before this week is out.
 
I'm too silly today.
 
@R.MartinhoFernandes citation needed
@R.MartinhoFernandes I take that to be the
 
2:37 PM
but really, given the choice between (a) fix the input handling for the existing browser-based VNC client *as well as possible, or (b) rewrite our server applications and write a browser-based client completely from scratch, to use another protocol, I think what I'm doing now is the path of least resistance :)
 
@thecoshman Ah, cool, because I gave you an address that is close to my expected whereabouts on Friday.
 
@R.MartinhoFernandes I do not. :)
 
god damn it (╯°□°)╯︵ ┻━┻ someone was whistling the angry birds song, now it's stuck in my head
@R.MartinhoFernandes what do you mean? like a friends house?
 
@jalf Aww, that's a pity :\ I will have to look for a banjo-playing penguin elsewhere.
@thecoshman No, it's a Packstation. A big box with a screen and a card reader where I can pick up packages 24/7.
 
@R.MartinhoFernandes I wanted to play banjo quite a lot, but after I got a hold on one after 5 minutes I knew it's just not it and went back to guitar
 
2:39 PM
@R.MartinhoFernandes oh... like a post office box? ¬_¬ I realise trying to compare it to that is probably futile.
 
@thecoshman Google it
 
@TonyTheLion obviously
 
Packstation is a service run by DHL Parcel Germany, a business unit of Deutsche Post's Mail division, in Germany. It provides automated booths for self-service collection of parcels and oversize letters as well as self-service dispatch of parcels 24 hours a day, seven days a week. Packstation started as a pilot project in 2001 and was quickly expanded. In November 2011 there were 2500 Packstation machines in Germany. Only ordinary parcels and letters delivered by Deutsche Post can be delivered to Packstations. Moreover, Deutsche Post allows its subsidiary DHL Express Germany to insert a li...
 
@R.MartinhoFernandes I so wouldn't trust that
 
@CatPlusPlus but you're the Cat
 
2:40 PM
@R.MartinhoFernandes Technology! Here we have to get fucked in the ass with a shovel to get our package.
 
0
A: look for a API/function which is like assert() without abort in C

rubenvbThis is called an exception, and it is a construct that is available in languages like C++ with an optimized implementation. In C, you'd need to hack around with goto, setjmp, longjmp, which would basically be a bad version of C++ exceptions. See e.g. http://en.cppreference.com/w/cpp/language/e...

 
@CatPlusPlus would you trust giving me your own address to send something to more?
 
2:42 PM
@TonyTheLion I think you failed to pick up on the
 
@thecoshman Kinda of an evolved one. I don't have my own box; I can send stuff to any of the zillions that exist all over the city. Then I get a code by SMS and use that and my card to pick it up any time. It's basically awesome (thanks @bamboon!)
 
I will gladly accept all the downboats for that answer.
 
@CatPlusPlus I guess you are home all the time, then.
 
@R.MartinhoFernandes yeah sounds great
 
Is it me, or does @CatPlusPlus' blatant disregard for proper punctuation makes whatever he says even funnier?
 
2:44 PM
You can call the delivery company and arrange the time
 
Like he only talks in run-on sentences.
 
@CatPlusPlus hmm... but what to send you... I don't think there is anything in the world quite as bitter as you.
 
@CatPlusPlus lol, how quaint.
 
@EtiennedeMartel rambles is more truthful
 
@rubenvb Indeed.
 
2:44 PM
@CatPlusPlus oh sure, 'any time you like, as long as you like the hours whilst you are at work'
 
It also has the added benefit of not having to share my actual address.
 
@EtiennedeMartel they are more like sleep-on sentences
 
@thecoshman You're using crappy delivery companies or work very weird hours
 
@EtiennedeMartel yes, it makes it funnier.
 
@R.MartinhoFernandes it also makes wiring the bomb harder it erm... an interesting subject for non natives who do not have such a system
 
2:46 PM
Guys, you could get packages delivered at work.
 
@EtiennedeMartel That's the idea
 
@CatPlusPlus Or he suddenly moved to Canada.
 
@CatPlusPlus I do not chose who is used to deliver my pacakges
 
Because that's the norm here.
 
@TonyTheLion or have a stay at home SO :D
 
2:46 PM
Last Friday I worked from home to sign for a delivery that day.
 
And yeah you can just redirect the delivery if you really can't align the hours
 
@jalf you figured something yet ?
 
Mainly because it was too large to get delivered at work
 
@Darkyen I thought you were going to help him.
 
@CatPlusPlus I don't have to align anything. I can pick stuff up at 4AM if I want...
 
2:47 PM
@rubenvb i am asking cause i had a minor emergency here so hadda run
and dunno how much time i took :-)
anyways on it now
 
@R.MartinhoFernandes alignment errors can be serious bugs :/
 
I'm old fashioned and like deliveries with confirmations and stuff
 
Btw, @Xeo, they keep the packages there for seven business days.
 
@TonyTheLion that's one big dildo :O
 
Xeo
2:48 PM
So same as the Kiosk here.
 
Seriously, fuck .NET 1.0-era non generic collections in the ass.
 
@R.MartinhoFernandes then it gets sent back to sender?
 
Fuck 'em with great prejudice.
Fuck 'em with every sharp object you can find.
 
@R.MartinhoFernandes once again, it's not a bomb
 
@Darkyen lol.
4
Q: Type of `this` in static member function?

user1131467In C++ 5.1.1.3 [expr.prim.general] it says: The type and value category [of this] are defined within a static member function. What does this mean? How is it relevant?

 
2:49 PM
@EtiennedeMartel Allow me to refer you to the Java Sucks! room... :-)
 
@TonyTheLion Nearest post office.
 
@JerryCoffin Hey, it's .NET.
A more appropriate room would be ".NET used to suck!"
 
@R.MartinhoFernandes ah k
 
@EtiennedeMartel ...and the difference between .NET 1.0 and Java would be?
 
@JerryCoffin well, name for one thing :P
 
2:50 PM
@JerryCoffin .NET 1.0 is no longer supported by Microsoft, while Java is still supported by Oracle.
 
So, I'd say, good business decisions.
 
@R.MartinhoFernandes hi tony
 
@EtiennedeMartel But Oracle no longer supports anything older that Java 6, if memory serves. There was a bit of a hoopla about them handing maintenance of the older versions over to Red Hat a while back any way.
 
2:52 PM
How are the two linked examples not in violation of the requirement that this shall not appear within the declaration of a static member function? — user1131467 35 secs ago
 
@jalf try the theta on this jsfiddle.net/29VJf
 
@JerryCoffin Java 6 still sucks.
 
dammit he deleted his answer
he may still be right
 

« first day (940 days earlier)      last day (4011 days later) »