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

3:06 AM
Oh hey, Qt 5.0 is out
 
3:21 AM
@sehe Uh, yeah I had to use declspec(dllexport/dllimport) to get rid of it. I would have thought the mutex would be available without the need for an export, but... Shrug. Maybe it's got some base class of itself that is templated? I dunno.
 
cpx
Oh. End of the world date changed to 23 Dec 2012 on Sunday.
 
Sweet deal.
 
@CatPlusPlus Anything noteworthy in the new version?
@cpx If you take into account leap years we already passed it
 
4:04 AM
[22:43:31] <xarticspartanx> hey so can someone help me keylog this kid
[22:43:37] <xarticspartanx> or just do it for me
[22:44:32] <xarticspartanx> (*some ip*) theres ip
 
Tell him to find the geoIP by calling him and checking the packets
So easy, anyone can do it
 
rofl
he left right after dumping the ip
 
anyone mind helping me on a C question about sscanf?
im trying to read in a size_t var but have no clue what to use as the specifier, i tried using %z along with some other combinations but no luck
 
@Need4Sleep size_t is usually a typedef for unsigned int, so, probably %u.
 
4:11 AM
@EtiennedeMartel thanks! that worked
 
@Need4Sleep Just a reminder: in C or C++, something working isn't a very good sign that it's the proper way.
It might seem to work, but if you invoke undefined behavior, then maybe it's only working by chance.
 
@EtiennedeMartel: Did you hear about Gameloft's xmas party?
 
@Borgleader Yep. A bunch of people at Ludia are former Gameloft employees. Let's say they were not impressed.
 
I read a lot of conflicting news article about this. At first it seemed like they were invited, and then I read that they weren't... not sure if they're covering their asses or if the second version is truth
 
Considering how incredibly moronic the upper management of Gameloft is, I think it's safe to assume they were invited.
 
4:25 AM
I see I see
So the company you work for... they make games too?
 
Yes
 
@CatPlusPlus @R.MartinhoFernandes We should play some Borderlands 2 sometimes. Just sayin'.
 
Oh I see
Nice place to work at?
 
Cool cool.
Stupid me decides to make a UI library, stupid me realizes later that I'll need to work with threads T_T
I'm a dumbass.
 
4:41 AM
Hey I'm making a UI library too
What are you using as a backend?
 
By making I really should say I'll attempt to make one. Emphasis on attempt (cuz yknow I'm a nub).
Currently reading "Programming Windows - Fifth Edition"
I want to see if I can possibly emulate the view first model of WPF
without resorting to C++/CX
 
Hey, any of you guys know of any good articles talking about creating and parsing a scripting language
 
Wait.. So it's Windows only?
 
What I'm trying to do is already way over my head. Cross-platform would be... I don't even have a word for that.
 
Wait, how are you doing it if it's over your head.
 
4:50 AM
Did you miss my "emphasis on attempt" from earlier?
Besides you never get better at something if you only do easy things.
 
It's okay, mine is only an attempt too.
Problem is I keep rewriting it, lol.
 
Then it's partially in your grasp but, some things are escaping you.
 
No, nearly all of it escapes me :P
 
Have you made any elements yet?
 
What are you trying to make exacty?
 
4:55 AM
A UI library
Sounds self-explanatory to me.
 
@Rapptz No, I'm reading the book to get a grasp of the Windows API first. I have an idea of what I want to make but I have no idea how. I've tried to wrap the window creation process in a class before but it never turned out right because I had no fucking clue what I was doing.
 
Ah you're doing raw windows API
 
Yeah =/
 
Oh god thats icky
I had a big enough pain trying to get textboxes implemented in C# XNA
I don't even want to think about using the raw api for UI development.
 
It's a joke in C#/WPF
Especially once you get the whole MVVM pattern
 
4:58 AM
MVVM?
 
Is WPF easier than WinForms? :P
 
You can't use WPF or Forms in XNA
or at least not in the XNA window
 
Why did I get pinged in this Hello World room
twice
 
IDK, you are in it though
 
I wonder how that happened
 
4:59 AM
lol, jeet is trying to get you to help me with my annoying questions XD
 
@Rapptz Easier I can't say I haven't done any WinForms but I have done Java Swing for a class and the WPF MVVM model is imho way cleaner.
 
What is the MVVM model?
 
@Borgleader Yeah WinForms are ugly in C++/C#
@redcodefinal What did you need help with?
 
rachel53461.wordpress.com/2011/05/08/simplemvvmexample <-- Simplest/Clearest example I've found on the MVVM pattern/model
 
I needed someone to point me in the right direction on parsing and creating scripting lanugages
I need to make some dynamic content that can be put into XML files.
@Borgleader ahh, let me take a gander
 
5:01 AM
Why do you want to create scripting languages?
I think you're better off using an existing popular one, like Lua.
 
I can't in C#
At least I dont think I can
 
@redcodefinal Won't help you with XNA though, I was putting that up for @Rapptz in case he was interested.
 
@Borgleader but, it's nice to know these things
@Rapptz So I have an XML parser that grabs data in XML files to put into objects in a game
However, some data has to be created with simple mathmatics
 
16
Q: Is there any Lua API that works with C# for PC & XBox 360 Development?

alFadorI am reading a book on Game Development in which they show you how to make scripts for your game in Lua. They program Lua and use it from C++, but I was wondering if there is a library or API to use Lua from C#: specifically from XNA to develop games for PC and XBox 360?

 
For example, an object might need to be centered to the screen, and the screen could be dynamic
Oh that's fancy/
 
5:04 AM
I think the questions and answers are saying "you're better off not using one"
 
I would agree but, I feel like there could be a smart way to do it that I am missing.
I thought I might as well do some ground work on it for when i implement actors into my engine.
Hmm IronPython looks promising
But I'm not sure if it will suit my needs :/
I don't think there is much I can do for this
I think giving up the scripting idea might be smart
 
5:38 AM
I <3 John Carmack
If I see him one day, whatever t-shirt I'm wearing, I'll ask him to sign it
That guy is a BAWS
Well @R.MartinhoFernandes got one of his blog posts referenced by Scott Meyers
we have a lot of cool people here
 
5:52 AM
@Xeo I just happen to do a reinstall of my OS from scratch. The mouse always kept working. So I guess it's not that bad.
 
6:25 AM
970
A: Transatlantic ping faster than sending a pixel to the screen?

John CarmackThe time to send a packet to a remote host is half the time reported by ping, which measures a round trip time. The display I was measuring was a Sony HMZ-T1 head mounted display connected to a PC. To measure display latency, I have a small program that sits in a spin loop polling a game contro...

how did i end up there
 
Transmission running hidden with web server enabled. Connect with the transmission-remote-gui which is a front-end that happens to resembles the uTorrent interface which I preferred. (I stopped using uTorrent because of high CPU usage when idle.)
 
 
2 hours later…
8:41 AM
^ Something doesn't look right...
 
he he
it means, wizards will use smart pointers wherever possible
yes, that's what it has to mean
 
Xcode truly is a weird IDE. I can't make no sense of it at all.
If I bring up the project settings then I can't figure how to go back to the source code.
 
8:58 AM
uh oh
 
9:11 AM
Ah no, it's one of the most popular.
 
@few people here: hey! :D
could some one explain why a parameter can't be static? (mycode)[http://pastebin.com/wfv5GpG2] :)
darn i mix up markdown [], () every time! :( !! what the!!!
 
9:52 AM
@StackedCrooked What is answer?
(too lazy to think)
 
Good morning everyone
 
Hello friend
 
@Pubby I have not completely worked out myself yet.
It's not too hard though.
 
I assume just calling init in constructor and fini in destructor isn't the answer?
 
maybe a scopeguard which calls fini?
 
9:56 AM
@Pubby lol, maybe
Actually, I think that's just it.
This is probably right.. Kind of embarrasing.
 
@StackedCrooked This is what I was thinking:
template<typename T>
struct parappa_the_wrappa : public T {
    template<typename... A>
    parappa_the_wrappa(A&&... a)
    : T(std::forward<A>(a)...) {
        this->init();
    }
    ~parappa_the_wrappa() {
        this->fini();
    }
};
 
Yeah, that would work if you are always the one that gets to call new on the object.
I forgot to specify that the pointer is newed by the crap library that you are working with. And it leaves init, fini and delete for you.
This is not really a fictional story..
 
new with a fini member. How nice!
 
The problem with my solution posted above that if the init fails, then the fini should not be called.
But my solution always called fini.
Which is probably wrong.
 
What? It doesn't look like it would call fini if init threw.
Unless it's using error codes or something.
 
10:05 AM
@Pubby It would. init is called in the construction. At that time the shared_ptr that owns the pointer is fully created. So if init throws then the shared_ptr's destructor will be called.
 
@StackedCrooked But the shared_ptr doesn't call fini from what I see.
It calls ~Legacy which has empty body
 
It does in the lambda that I passed as a second argument. Just to be sure we are looking at this code right?
@Pubby No it calls the deleter function.
 
@StackedCrooked Oh, I was looking at this: stacked-crooked.com/view?id=11d01fabbf84431831d9ac12b05fb741
Now I see
 
@Pubby That one is actually correct. I'm pretty sure now.
 
I agree
 
10:09 AM
Hm, I should check with the code I checked in at work. The situation was slightly more complicated there.
Because the destructor of Legacy is actually private. But there is a friend class.
lol
The whole mess is entirely my doing.
 
10:29 AM
1
Q: Network computation

Karim AghaI'm pretty sure that someone has already thought about it and researched it extensively, but I'm having trouble finding any materials or even keywords to look for, for the idea that I was thinking about recently. I thought about this concept, where in distributed systems, actual computation and ...

Any ideas?
 
@KarimAgha You are trying to use the router logic to implement a CPU?
That would be rather slow don't you think?
Ah, I see what you mean now.
You want each router to perform some computation on the packet, so that by the time it arrives the computation is complete.
 
Or at least some pre-computation has been done, which will decrease the workload on the actual machines.
Interesting idea.
 
Perhaps you can try to work out a proof of concept using a simulation.
However, routing is what routers should do. Tacking on extra responsibilities feels wrong. Perhaps a intercepting device can be used.
The computing device is a man in the middle.
Perhaps they could manipulate the IP data as well in order to make the route longer so that more computation gets done on the wire.
 
10:44 AM
Well... yes and no.
if these packets had a standardized, very minimal instructions set
with special extensions
and routers would factor their support for these special extensions in their routing process
 
That's not gonna happen.
That severly breaks the single responsibility principle.
 
i.e. "I'm seeing a router that has instructions that would be faster on a vector processor. I don't support that and it would take me 200ms to complete this operation, but if I would route it to X, it would take 30ms to get there and 20ms to process
"
 
If this were programming then the solution would be to split of the extra functionality using the decorator pattern.
 
StackedCrooked, that's correct if you're thinking in the imperative paradigm
but think about it..
you have youtbe
*youtube
that starts decoding the video you see on the screen on it's way from the server
rather than on your computer
or
 
The bottleneck is always the network, never the client CPU.
 
10:48 AM
so that by the time it gets to your browser, it's already partially computed.
Javascript that starts executing on it's way from the server
 
@KarimAgha and what did this gain you?
 
multiple things:
the simplest and most straightforward answer: offloading servers and clients
 
other than ISPs have to upgrade every single router, adding a lot of complexity to them, in order to shave of 0.01 millisecond off your local computer's processing time
 
but if routers would factor in their capabilities and packet instructions in the routing decision process
you are guaranteed to always use the best possible hardware for the job
 
But you are assuming that a router would be able to execute these instructions faster than the server or the client
 
10:49 AM
Once the song reaches my computers it was already at 5 seconds. I missed the beginning.
 
even if you don't physically own it or have access to it
jalf
 
which basically makes no sense
 
I'm not.
 
You are putting extra load on the weakest link in the chain.
 
@StackedCrooked, why at 5 seconds?
 
10:50 AM
@KarimAgha What do I know.
 
what if the weekest link in the chain realized that it's weak and it would execute only 3 instructions of every packet?
that's 3 instructions per hoop for a network packet
sending a simple GET request to SO is about 20-30 packets
(without downloading extra js, css, etc..)
 
@KarimAgha so you just added an enormous amount of complexity to every router on the internet, in order for a packet to have, roughly 100 instructions computed in transit?
 
if each of these packets carried instructions as well
 
100 instructions can be done in less than a microsecond on a mainstream CPU
 
@jaf
now multiply that number by the number of packets that leave your network card every minute
 
10:52 AM
you can't afford to add latency to the network traffic, because if you do that, that affects the client's experience adversely. You also can't afford to add significant load to the routers, because they are really f'ing busy already, what with basically running the internet. So they won't be able to do much more than those ~3 instructions
 
you start to get a significant number of ycles
*cycles
 
@KarimAgha no you don't. Because look at the number of packets that leave the router every minute
Now, unless every router on the internet is upgraded to a teraflop CPU, they won't be able to do that
 
yes, exactly.. look at the number of packets that hit your network card in a minute
including the ones that don't get bubbled up to user mode
 
Also decoding video data means decompression which increases the data.
 
You are moving the load from the place where we can afford to do it (say, the client CPU) to the one place where we absolutely cannot (the network routers)
 
10:54 AM
and multiply that by 3 instructions
@jalf, I think you have wrong assumptions
 
@KarimAgha and now, for every packet, the client CPU has to go "ok, so how many instructions were executed before it got here? Right, so I should jump to.... here before starting execution"
 
because if a router truly cannot afford giving 3 cycles, then it would just forward it
 
which would pretty much eliminate these savings
 
and maybe the next router will have that extra cycles to spare
@jalf, that's what the instruction pointer is for.
 
@KarimAgha and maybe it wouldn't. Once again, these routers have a lot of packets to serve. Far more than the client computer sees.
 
10:55 AM
just like in a classical frame
 
@KarimAgha um
 
each instruction would read the IP, execute the instruction and increment the IP
until IP == end
 
in a classical stack frame, you can make assumptions like, say "the previous instructions loaded this value into a register"
 
Set up a simulated network and work out your idea. And after you've seen that it works, then come try to convince us. (With a demonstration, of course.)
 
You can't just jump to an arbitrary instruction and start executing
 
10:56 AM
@StackedCrooked - I'm not trying to convince you :)
 
"the router loaded a value from the data packet into a register. Now I'm going to continue work by reading from that register"
 
I'm looking for existing research in this area
@jalf, you can perform computation without registers.
 
@KarimAgha yes, but then you have to hit memory, which is much slower, and I thought the idea with this was to speed things up
 
but the memory is already there - embedded in the packet
your packet is the only working memory that you have
 
@KarimAgha and that makes it free to access?
 
10:58 AM
no
 
It would work better if the routers did encoding. For example if you send a text stream that is supposed to arrive as a zip stream at the destination. But you can't make it faster than the client CPU.
 
that's why I have there data slots
"read data slot 1, increment it by 5, multiply by 8 and store at slot 5"
 
Before you go too much further with this idea of yours, try taking a look at the rough numbers. Look at how many packets internet routers typically process per second. Look at how complex and expensive these routers already are. Look at how many gigaflops a CPU on the router would have to be able to carry out in order to execute even one extra instruction for every packet. Then look at how many gigaflops your desktop CPU can do. Or your GPU.
@KarimAgha Changing the name of something doesn't really affect its performance
You still get data in from the network card, it ends up in RAM, and from there, both instructions and data have to be read by the CPU in order to be executed
 
This reminds me a little of NAT. NAT is not something that routers do. There are separate NAT devices that intercept the traffic.
 
@jalf, I dissagree with some of what you're saying here. but let's assume that it's correct for a second...
the way networking works, is that lots of computers will get packets not addressed to them and discard them based on it's headers.
i.e. "Packet sent to MAC address A, My address is B, I won't even bubble this event to user mode"
but if that packet had 3 cycles from every computer it hits
 
11:02 AM
@KarimAgha er...
 
that an unbeleviable amount of computational power for free
but think more..
 
where to start?
 
ISPs would be advertising their networks like "100 MB/s and XX GFlops"
rather than "100 MB/s"
that would be in their interest to add more powerfull routers because the will automatically give computational resources to every subscriber
where to start?
 
for that to work, the packet has to be routed via those computers, instead of being discarded. So your NAT router sends a packet out onto your LAN where computers A, B, C and D see it, and because it was addressed to D, A, B and C discard it and A processes the one it sees
 
I think the starting point is to develop a minimal instructions set
and a state machine that has no registers
 
11:04 AM
now, with your scheme, the router would have to send it to A, which does some processing and sends it to B, which does some processing and sends it to C, which does some processing and sends it to D
 
it does not have to be implemented in hardware
a software emulator would be ok
 
the additional latency introduced by that far far outweighs any gains you could get from each of them doing a few instructions on the fly
 
no, it really wouldn't
 
I can receive up to 3.5MB/s on my twister-pair Internet line. And my computer can handle that easily since it has a 100 Mbps connection. I don't need no router helping me.
 
a software emulator would be so horrifically slow
 
11:05 AM
@DeadMG, as a dev platform it's more than ok.
 
-1
Q: Access violation reading location 0xcdcdcdcd - VS 2010 win7

SoulReaperI'm doing C++ after a long time and there are some things troubling my mind. I found similar questions here but none of them solves my problem. So, what's the deal? I have SomeClass*** world; which presents matrix of pointers to SomeClass objects. Latter, in constructor, when I try to initia...

 
@jalf Isn't there an encryption mechanism that works like that?
 
*** ;_;
 
@jalf are you sure? :)
look at Google Fiber
 
@KarimAgha What about it? It has good bandwidth, but it doesn't change the speed of light
 
11:06 AM
in Seattle, where I live, 1 Gb/s internet is rollng out in 2013
it does not, but you will have to spend that time anyway
 
You know why CPUs are so small? It's because if they were any bigger, it would be impossible for data to traverse them fast enough. Larger distances end up slowing you down
 
either on your machine processing instructions
or on routers
 
My CPU can process countless instructions in the time it takes a photon to cross the street
 
think about it: with 1 GB/s network, the speed between the CPU and the RAM is only 6 times faster!
6 - 12 times faster!
"My CPU can process countless instructions in the time it takes a photon to cross the street" I think that it's not accurate
 
No...
@KarimAgha it is
 
11:08 AM
Maybe the wires should be made as strings of little cpus.
 
Watch this
 
if you'd measure the distance a light signal has to go through in a processor to perform the simplest instruction, I think that it would be a couple of blocks :)
 
Now, there is a difference between latency and bandwidth. Google offers 1GB/s network, but they do not offer a zero-latency network
 
of course
nor a processor offers a zero-latency processing
 
At 3ghz, a CPU can execute three instructions in a nanosecond. In that video, Grace Hopper is holding a nanosecond. Cut that in three, and you have the length of an instruction
 
11:10 AM
3
Q: Class member visibility in member function declaration signature

yuri kilochekWhy does this work: template <typename A> struct S { A a; template <typename B> auto f(B b) -> decltype(a.f(b)) { } }; But this does not (a and f swapped places): template <typename A> struct S { template <typename B> auto f(B b) ...

 
Heck, in each third of a nanosecond, a modern CPU can execute for instructions, so you can take that, and cut it into four
That is what you are competing against
 
@jalf Plus, that's per core.
 
@jalf, this is not accurate either. I assume that you're talking about cycles, not instructions.
 
@KarimAgha Most instructions occupy a CPU core for one cycle. And in that cycle, it can run not one, but four instructions
 
not to mention what a GPU can do
 
11:11 AM
but anywya.. your CPU has first to fetch those data from the network packet, to ram to it's L2, then L1 then process it
and it's not nanoseconds.
 
i downvoted the accepted answer because it just contains an irrelevant spec quote and a "you are doing something illegal... oh o you dont!". however an answer is not given
 
@KarimAgha and the other computers you route the data through wouldn't have to do that?
 
they would not.
because they need to read the packet anyway to read the destination address
to decide who's next in the path
 
@KarimAgha Yes, and that still takes just as long as i if you read the packet for any other reason
 
3
Q: Class member visibility in member function declaration signature

yuri kilochekWhy does this work: template <typename A> struct S { A a; template <typename B> auto f(B b) -> decltype(a.f(b)) { } }; But this does not (a and f swapped places): template <typename A> struct S { template <typename B> auto f(B b) ...

 
11:12 AM
so they already have these packets as close to the process as needed to interpret their values.
 
and you were talking about routing the packet through computers it wouldn't otherwise have been routed through
 
exactly.
to instead of reading that packet twice - once on the router then on the CPU to process it
you'd do it once - on the router
 
ok, you know what, go ahead and implement a prototype. I'm looking forward to your world-changing invention
 
routers
@jalf - haters' gonna hate! :D
 
but before you spend too much money developing prototype hardware, I highly suggest you try doing the math on this
 
11:14 AM
no hardware needed.
 
@KarimAgha No one is hating. We are just trying to explain the fundamental facts of this universe. The speed of light is not "hatin'"
 
a software emulator that would prove this concept is more than enough
 
It's just a limitation which pretty much shatters your idea
@KarimAgha Wht would the software emulator prove? That it is doable? Or that it is faster and more cost-efficient than what we do today?
 
jalf, but think about it. if we're now putting math into it:
 
Steam really wants all of my money. Now they offer a 50% discount on RPGMaker >.<
 
11:15 AM
packet -> router1 -> router2 -> router3 -> your machine
at each router, it will need to be read close enough in the memory hirarchy so that the processor can read it's values
so you're already doing that anyway.
right?
 
Now you are mixing two different things
 
what things?
 
Because the other thing you described was that the packet should be routed linearly through every machine on your network, instead of going directly to its destination
they would normally discard the packet because it wasn't for them, but instead, they should add a few computations, and pass it along
 
no. no. no.
 
That is what you said....
 
11:17 AM
now if you have a packet - what decides about the next hoop that it will go though?
 
16 mins ago, by Karim Agha
the way networking works, is that lots of computers will get packets not addressed to them and discard them based on it's headers.
Instead of discarding the packet, each computer should contribute a few instructions
 
no, if you had in that routing algorithm two possible candidate nodes qualified as suitable as the next hoop
and one of them had a vector processor and the other did not.
and your packet had instructions that would benefit from the vector processor
then it would pick the more suitable node as the next hoop
this is what I mean by that
in the destination's direction
so yes - there will be a slight slowdown and added latency, but it will greatly offload client's and server's computational needs
which means that theoretically an iPad could render things as quickly as a PC with some GTX690
if packets sent to that iPad would hit a router with a vector processor on their way
jalf, you seem like you don't believe in this idea strongly.
do you want to try something on github?
 
Oh, I see nice discussion
 
If anyone is interested in continuing this discussion or collaborating on a prototype please e-mail me
karim(dot)dev(at)gmail
open-source prototype
 
TLDR, @KarimAgha, you are trying to say you can send data over the network with similar latency to the CPU <-> GPU -> Screen? Good luck with that
 
11:25 AM
Bartek - now read what I wrote again
and show me where I wrote that.
 
Um, again. Did you just reinvent grid computing, reversed, then?
 
thanks for a constructive discussion :)
*the
 
you can edit your posts, you know. Anyway, link to your prototype when it's ready
 
People, can't you have a discussion without all this cynicism and looking down on whatever is not familiar?
 
No
 
11:30 AM
@ScottW I pinged him on twitter. He replied a few hours later :)
 
If I cd to a certain path in my shell I can press the TAB button to get path completions. Sometimes programs also react to the TAB nudge. How do they implement this?
 
@StackedCrooked there's a file somewhere in shell configuration
Or a folder, whatever. You can fill it with your completions
 
@StackedCrooked you mean how they implement prefix match?
 
I don't know what prefix match means.
 
@StackedCrooked /etc/bash-completion.d/your_script.sh
whatever. Hyperlinks don't like me recently
 
11:40 AM
Interesting.
I could probably abuse this.
 
@StackedCrooked -.^
Ya know, with great power comes great responsibility
now sudo make me a sandwich
 
Aye. It's in the mail!
 
11:55 AM
hmm
you know, it's really annoying when VS crashes when you're trying to use the debugger.
 
I've been in situations where the debugger made computer hang.
That was on a remote computer even.
So I had to ask IT to reboot it.
 

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