« first day (1125 days earlier)      last day (4049 days later) » 

00:00
@kritzikratzi If the code looks like shit, you won't be able to easily find out what it does.
Dammit, 10G is hard to achieve. Requires ~900000 packets of 1500 bytes per second.
you're assuming that i understood it in the first place
I need a guru.
Which means bugs are more likely to slip by.
00:00
can't talk to incompetent people
can't
ponies
@kritzikratzi Oh, right, you're a troll.
go figure
@R.MartinhoFernandes I need a new troll-o-meter.
Mine is broken.
00:01
@StackedCrooked Are you sure the hardware can actually do 10G? I've seen a fair amount that's officially 10G hardware, but I'm pretty sure couldn't hit more than 6 Gig/sec or so.
Ahahahaahahahahhahaahha
You're messing up the brony economy.
Good
Also what the fuck is that font
The MLP:FIM font.
Can I get some help with my issue? I seem to have resolved my original issue, but I'm new to C++ STL arrays
00:03
@theintellects The STL doesn't have arrays.
@JerryCoffin We're testing with Napatech and Intel cards. Napatech can do 10G UDP but due to some latency issues TCP tends to be horribly slow on that one. The Intel 10G card requires a special driver (PF_Ring) in order to achieve the full potential. I currently get around 1400G on that card (without P_FRing). In my own test framework I have a virtual network where I can get 10G with UDP, and about 8G with TCP. (My early results were better, but invalid, because I used move semantics...)
no broken no no no question no
@EtiennedeMartel I mean std:array in C++ 11
@CatPlusPlus CALM DOWN CAT.
00:04
@theintellects The STL is a 1994 SGI lib.
@CatPlusPlus SNAP OUT OF IT.
Xeo
Xeo
@EtiennedeMartel Oh please
@Xeo Hihihihihi.
Come on, someone has to be an obnoxious pedant while Tomalak is away.
Xeo
Xeo
Okay, ^W in the ofTutorial tab... and time to flee to bed.
@EtiennedeMartel Too many incompetent people in one day drains your sanity away!
Can someone please help me? I'm not sure what's going wrong with the way I'm initializing my 2D array to false
00:06
@CatPlusPlus Your SAN meter is so small.
I'm doing:
for (auto arrayOuter : m_Floor){
for (auto element : arrayOuter){
element = false;
}
}
I still have to write some code today
no dont
@theintellects First, read this. It'll shed some light on why you're having trouble finding help here.
Xeo
Xeo
@theintellects auto v makes a copy. auto& creates a reference.
And with that, good night
hint: you ain't writing JAVA
00:07
Xeo in shining armor.
oh...sorry
Xeo
Xeo
People need to start thinking about what they're writing
auto isn't the magical "be what I want" type-inference
People need to start thinking
Xeo
Xeo
It also has rules
and feelings
and you're hurting its feelings by abusing and not trying to understand it
(I should really sleep now)
@StackedCrooked Is the bottleneck in TCP primarily the initial handshake?
@Xeo I think so--you're starting to sound like me! :-)
00:09
@JerryCoffin It can be, depending how shit your protocol is.
@MartinJames Read the history--we're talking about his specific case here.
@JerryCoffin Not really. TCP requires me to keep a list of all segments I've sent but which have not yet been acked. This requires extra an extra copy and lots of bookkeeping. (Then there's also congestion avoidance (SACK and NewReno) and other stuff. It's quite complicated.)
user1804599
My god.
@JerryCoffin TBH I don't know where the bottleneck is. The cost of sending a segment seems to be spread out evenly across all layers.
However, 10G should be possible on today's machines. It's simply me that sucks.
00:15
@StackedCrooked Right--but those un-acked segments shouldn't normally require any copying. You need to prepare the segment before transmission, and just keep it available until it's acked. And yes, I know it can be quite complex (though what I've worked with is a slightly different area--RSVP/MPLS).
user1804599
@StackedCrooked run the code in kernel space.
Parts of our code do. (But not my code.)
I don't think that's necessary though.
@StackedCrooked I guess that's not surprising--from what you've posted here, you've been working on it long enough it would probably be at least a little surprising if there were a single, obvious bottleneck left.
I'm certain there are a few obvious things that I'm currently overlooking.
@StackedCrooked Mostly a question of how often you're doing mode switches. If you're doing it ever packet, the overhead could be pretty significant. If you're preparing dozens or hundreds of packets, then doing a single switch to send them to the hardware, probably not so much.
00:20
I have a few ideas on how to make it more bursty.
But I don't have 100% freedom in the design.
But I'll keep pressing :)
@StackedCrooked Have fun (but not too much...)
Quick question... is it possible to use `<<` to concantenate a string? I have multiple strings I'm wanting to combine together:

string test;
test << "Hello" << "World";
@JerryCoffin :D
I know about += but I believe that can only be done with two strings at a time
@JerryCoffin The un-acked segments should never require any copying.
00:23
I'm looking for more
Well.
@KronoS You can do that with a stringstream, then get the string from it.
Why not string += a + b + c + d...?
I thought they had operator+ anyway.
@Pawnguy7 Oh... didn't realize I could do that :)
Not sure if you can.
00:24
@Pawnguy7 They do, but it only works with actual string objects. somestring += "hello" + "world"; won't work because it'll try to add two pointers (to "hello" and "world').
somestring += string("hello") + "world"; is fine though.
congestion avoidance is one of the most interesting projects I've ever worked on. It's strangely addictive.
@JerryCoffin That's correct however my first concantenated string is an actual string obj
@JerryCoffin true. In any other combination though it would work (a string and a c-string).
@Pawnguy7 it worked perfectly. Thanks!
Wasn't there a... one of the operator"" things for this?
Alternatively, in theory you could always go like
00:26
I'm Adnams-Broadside ratted.
string = (((string + a) + b) + c);
@StackedCrooked how could you have sent the rest of the segment without the first one been acked in TCP
@User17 'Cos TCP windows.
I need t o sleep.
@KronoS You have to ensure that in any addition, at least one of the operands is a string object. You could also write a variadic function template that would let you concatenate an arbitrary number of either string objects or C-style strings (literals or variables) if you wanted to.
@MartinJames huh? Am I ignorant at something?
00:30
@User17 Not sure - maybe it's me. I'm a little 'tired and emotional'.
@JerryCoffin In all cases that I'm using this, I have at least one string object. Thanks for the clarification though.
@User17 TCP allows a window of unacked segments. Almost always at least 3, and (especially with faster transmission) usually more. You basically want enough to cover the transmission latency, so (for example) if the ping time from source to dest is, say, 20 ms, then you want a window that allows at least a little over 20 ms worth of packets to be un-ACKed at any given time.
Noo more posts tonite - slaughtered.
tired or drunk? :p
j/k
@Pawnguy7 You can certainly use a UDL to minimize the syntactic overhead in getting from string literal to string object.
00:32
Ah. That was what it was called.
And all this time I was wondering what a UDL was.
@JerryCoffin but I thought order is important for TCP so always wait for ack before next transmission?
@Pawnguy7 user-define literal.
@JerryCoffin I got that, yes :D
@User17 No -- that would impose a massive speed penalty for wide-area use. For example, consider that same transmission path with a 20 ms ping time. A single segment is a maximum of ~1500 bytes, so you'd transmit 1500 bytes, wait 20 ms, then 1500 more bytes. Even assuming data transmission itself was instant, that would limit you to 50 segments/second * 1500 bytes/segment = 75'000 bytes per second.
How do you get the next value in a range based for loop before the next loop?
00:39
@JerryCoffin that's why games use UDP instead?
@theintellects Every time I have encountered such a situation, I looped manually, so if you find something let me know
Games use UDP to be able to drop packets instead of stalling
@User17 No -- because that's not how TCP works in real life. In real life, it allows a window of un-ACKed segments to improve bandwidth. UDP does reduce latency though. First, it doesn't require TCP's notorious three-way handshake to set up a connection. Second, for lots of game things, re-transmission isn't that useful anyway. There's more than that, but you get the idea.
TCP really likes to send packets in order and try until it can do that!
@User17 I should probably add: to maintain order, TCP requires that the stack support storage of up to N packets (where N is the window size) on both ends of the connection. If a packet is received out of order, it gets saved until all preceding packets are received, then passes the packets through to the application in order. On the sending side, each packet gets saved for possible re-transmission until an ACK is received for it.
00:47
I kind of want to try networking, but I am yet to find a good way to test such things.
@Pawnguy7 For initial testing, a virtual connection inside the same computer can work pretty well. Not too good for some types of stress testing though, since it'll normally deliver all packets nearly instantly, in order, no drops, etc.
Well yes.
Just for... learning purposes.
Simple chat/server kind of deal.
I never figured out the virtual part though.
What do you use for such things?
@Pawnguy7 Not a lot to figure out. The virtual machine will just be a machine with some name, and you'll use (for example) gethostbyname to find its address, just like you would any other host name. Working code will typically communicate with a virtual machine or a real remote machine without any modification (except to the string you pass it as the host name, obviously).
@Pawnguy7 Take your choice of virtual machine stuff. From this viewpoint, I see no practical difference between them. You'll probably care more about other things like how they manage snapshots, features supported inside a host, etc.
I am curious what you mean for host name here. I am not familiar with it.
?
@Pawnguy7 The name of the computer -- e.g., chat.stackoverflow.com or www.google.com.
01:02
stacked-crooked ~ # hostname
stacked-crooked
Domain name?
I love you guys so much.
@Pawnguy7 More or less, yes. You pass that name to gethostbyname, and it does a DNS lookup (or gets something from the DNS cache), and returns its numeric address. The code then connects to that numeric address.
@Jefffrey You seem to be mistaking us with Scott.
01:04
@Pawnguy7 why don't you read up about the subject first?
and then come with Qs?
I know what a domain name is.
@Jefffrey your medication is peaking right now?
My only question was, more or less.
How to have, or simulate, two ips on one machine.
@StackedCrooked you got me :<
Which, unless it is a VM option, do not have names.
01:07
Basically your network card must pretend to be a switch. This would allow for multiple MAC addresses.
There are other ways though.
@Pawnguy7 Install VM software and it handles the rest. In the configuration for a virtual machine, you just say what name you want it to have, and the VM software handles it. As far as your code cares, it's just a name. Talking to it is no different tom talking to google.com, apple.com, microsoft.com, etc.
You might hard-code a name (or even a numeric IP address) into a few of your first attempts, just to keep things simple, but for most code you'll want to keep the host name externally, such as in a config file of some sort (or passed on the command line, etc.)
@BartekBanachewicz are you a networking aficionado as well as in graphics situations?
01:47
My son would like me to tweet this joke he made up: Q: What do you call a pig from 65,000,000 years ago? A: Jurassic Pork.
I laughed more than I wish to admit
Sounds old.
Like.. one of those "dad jokes"
@Rapptz example?
What is the... base of these?
I cannot quite state one.
They're all incredibly lame.
01:56
That works.
But they can get a chuckle or a groan, depends.
Antijokes?
Nah it's different.
Antijokes are supposed to be unfunny
I would think incredibly lame jokes would be unfunny.
01:59
You've never laughed at a lame joke?
I don't know. Apparently I don't run into these things.
I think I have done one of those actually.
@Borgleader Yet, they're much funnier than most other jokes.
02:17
Apparently people on Reddit are better at making jokes than me.
There's an Anti-anti-joke subreddit.
@Pawnguy7 Most people on Reddit are jokes.
5
> A bar walks into a man... No it doesn't, you stupid cunt.
So Lounge is making a framework?
Lounge is not good at making things.
02:27
@StackedCrooked Yeah, @rightfold is like slim shady, he's in all of us
@Rapptz lol
I guess SO's postgresql expert_count is not as big as most other languages.
So, I thought I saw someone in the Lounge disparaging the use of for loops (I may be misremembering). Is the idea that for_each should be used with a lambda for iterating over an STD:: container?
You can use range for
for(T&& x : y) { /* something */ }
but constructions like for(int i = 0; i < arbitrary_number; i++) { /* do stuff */ } are discouraged in modern C++?
Well it depends on the use case of course, if you need the iterating variable for things you don't have a choice
02:40
or for(container<T>::iterator itr = my_container.begin(); itr != my_container.end(); itr++) { /* do stuff using itr */ }
I believe this talk covers the subject well
@caps my answer depends on the length of do stuff, if its short enough i would use for_each, otherwise i would use ranged for loop
@Borgleader but never the construction I posted? why? I suppose the answer is in the podcast you linked?
@caps some say that, and I've heard few say the other way, but I think most of us use regular and ranged-based for. I virtually never use std::for_each
@Borgleader boost has a numeric_range thingy
@caps unless again you have a reason to. because otherwise its more verbose and notice that end() will be called on each iteration, so the range based for and for_each would be slightly faster too
@Borgleader end() is trivial in every container I can think of
02:44
@Borgleader Can't the compiler optimize itself for that scenario?
I suppose it's never sure if you're going to "move the goal-posts" for end()
@caps I'm pretty sure it can't.
@Borgleader Lately I've been defining container<T>::iterator end = my_container.end(); and using my_itr != end to bypass exactly that
no good if end() might change in my loop, but usually that's not the case
@Borgleader it can sometimes if it can tell that the container is never altered
@MooingDuck That's why I said slightly, I doubt it would make much of a difference, but it's still there. My main point was for(itr, itr != end...) is more verbose to look at
Fail youtube.
I chose a higher resolution.
02:47
@caps if end() doesn't change, you probably want ranged-based-for
"an error has occured."
@caps Basically you should try to use whichever version makes the code as clear as possible, that means either using range base for, or for_each depending on which you think will be clearest and if you have a reason to not use either of these, then fall back to a regular for.
for(auto&& i : v) { .. }
Gah, I can't wait until I can use C++11.
I keep reading about cool features (that are apparently the standard for modern C++) and seeing they have been available "since C++11"
like shared_ptr
or, apparently, range-based-for
@caps shared_ptr was in C++03 extensions fyi
02:50
There are not many use cases for shared_ptr
boost and tr1
unique_ptr is more common AFAIK
it's probably in your compiler
@MooingDuck Yes, I do have access to Boost 1.39.
sigh Windows update: lightning fast from 0% higher, stops for about a minute at 100%.
02:51
I'm happy about that.
@caps it's in Visual Studio since like 2005
@MooingDuck Heh, It wasn't in Builder 2009. :p
@Borgleader I find it very useful when used with weak_ptr.
It's in XE4 though.
XE4 doesn't have a 32-bit compiler for C++11.
If you want to do C++11 in XE4 you have to do 64-bit.
@MarkGarcia What use cases do you have for shared_ptr/weak_ptr?
02:53
Unfortunately, we're not ready to move our code base to 64-bit yet. It may be a while, actually, since the documentation says the 64-bit compiler can't compile .bpis, and I'm not sure whether or not we can get by without those.
@caps "C++Builder 2009 was released in August 2008, with the most notable improvements being full Unicode support throughout VCL and RTL, early adoption of the C++0x standard"...
@Borgleader RAII-style removal of event handlers. Class returns a shared_ptr lifetime handle and keeps a weak_ptr. Whenever the event is triggered, it checks if weak_ptr.lock() is still valid and calls the handler. Else, automatically unregisters it. In that way, I don't have to explicitly unregister the handler.
@MooingDuck I was referring to having boost libraries integrated.
@caps I was referring to the fact it probably would have had a shared_ptr other than boosts.
@MarkGarcia Oh, that's neat. I'll keep that in mind.
Let me write that down in a notebook somewhere
@caps I meant that shared_ptr were in a C++ draft in 2005 (TR1), and standardized in 2007, way before C++0x.
@Borgleader There might be some quirks when multithreading, a virtual method handler, and destructors are mixed. Though that would also be true for other scenarios.
@MooingDuck Okay. I don't really know what I'm talking about, just what my references appear to tell me, which is shaded by my own inexperience/ignorance.
yeah, it wasn't part of the C++ standard library until '11, it was a different standard library (tr1)
same with hashmaps and array<T, int> and a few others. en.wikipedia.org/wiki/C++_Technical_Report_1
so what is tr1? nevermind, reading the wiki you posted
03:02
test Can someone ping this message
@Rapptz Sorry, but no. Your message was not received.
Yay. Speakers work now.
@caps std::tr1::hashmap<std::string, std::string>. It's also the name of the 1st Technical Report that proposed said additions.
@MooingDuck unordered_map
03:03
@caps It officially stands for "technical report 1" (a misnomer, since there was another "TR1" that preceded it). It's basically a set of library extensions, nearly all of which were incorporated into C++11.
@Rapptz not in tr1
@MooingDuck Yeah it was.
It even says so in your link.
@Rapptz wait, wtf Visual Studio. You lied to me
visual studio calls it hashmap :(
@MooingDuck Yes, it is. Quite a few compilers had previously had something named hash_map, but they differed enough that the committee decided it was better to avoid that name.
@MooingDuck Nearly every compiler had a hash_map (VC++, g++, etc.) VC++'s implementation of TR1 has unordered_map (I've used it).
unordered_map isn't a standard type?
03:07
@Pawnguy7 it is now
@Pawnguy7 Not until C++11.
it's not a type
or well, depends on your definition of a type I guess. In a strict sense it is.
Something I can create that gets highlighted :D
A label of sorts.
it isn't then
Well.
03:08
@Rapptz also depends on your definition of "standard"
It has data and functions, correct?
@Pawnguy7 ....yes?
yes
So... it is a class?
@Pawnguy7 ...yes?
03:09
Seems a type to me.
What is your definition?
not sure why Rapptz said it isn't, unless he's referring to the fact it's a template.
@Borgleader Also, I've discovered that pattern because I've been frustrated by std::function's lack of equality operator, and having to use RTTI to make one.
in which case he's technically correct
when he said standard type I thought he meant a fundamental type, like int et al.
@Rapptz ah
03:11
isnt that a basic type?
@Borgleader fundamental type according to the standard
By standard, I mean, not a compiler extension.
Like apparently std::exception("string") is.
your types arent compiler extensions either
theyre user defined types
03:12
@Pawnguy7 It's a class template. Has to be instantiated over some type to become a "type" in the C++ sense of the word.
@Pawnguy7 yeah std::exception doesn't have a constructor that accepts a string
@Borgleader I wasn't aware I stated they were.
I'm confused why the standard doesn't provide and operator== for std::function...
@Borgleader Note that "user defined types" includes things that are in the standard library such as std::string.
@MarkGarcia when would you use that?
03:13
@MarkGarcia it's not immediately obvious why it's desired
@Pawnguy7 Could be useful for a collection of them.
Some kind of event system?
@Pawnguy7 Specifically that.
TIL Doxygen can allow for custom commands
looks useful
@MarkGarcia For most collections that require any sort of comparison, you need operator<, not ==.
03:15
std::unoredered_map<std::function<void()>, int> f; // invalid
If you find duplicate functions, what do you do?
Oh.
You just cannot store them?
@JerryCoffin Just a sequence like std::vector. Using std::find to find the specific function.
@Pawnguy7 can't use them as a key since they're not comparable
@JerryCoffin You are correct yet again, my mistake
@MarkGarcia makes sense
03:16
@MarkGarcia In that case, it's not for the collection, but for the algorithm. (Yes, feeling anal tonight :-).
I find it clumsy having to use std::map<std::string, std::function> to identify those functions.
Oh wait, vector::erase does not use objects, only std::find does.
@MarkGarcia std::map doesn't need op==
@Borgleader I didn't see where you made any mistake -- just added a tidbit that I thought might not be obvious.
Well I did forget to mention it, my message seemed to suggest it was only non std:: types
03:18
Dumb question.. is there an easy way to make gifs?
Might it work (albiet being undefined behavior) to define operator==?
@Rapptz I heard something about gifcicle.
Never used it though.
I just want to record my screen for like, 3 seconds and make it a gif
@Rapptz What I meant is that I want to have some kind of register/unregister event/function system. Unregistering means finding that specific function. Thus requires operator== for sequence containers or a key type for associative ones so that I could find that specific function and erase it.
Hrm.
@MarkGarcia std::vector<std::string, std::function> :/
03:19
@MooingDuck wot
@MooingDuck Eh?
@MooingDuck You meant std::pair<std::string, std::function>?
@MarkGarcia er, vector<pair<string,function>> yes
If you find a way to make said gif's, I am curious though.
Better yet, std::map<std::string, std::function>.
But
4 mins ago, by Mark Garcia
I find it clumsy having to use std::map<std::string, std::function> to identify those functions.
I found this. Looks neat.
03:22
@MarkGarcia when/why do the events get unregistered
> It’s free, with no advertising or spyware!
@Rapptz Photoshop frame by frame! :P
I feel sad when I see this.
Seen it four times thus far.
@Pawnguy7 Why?
It implies that it is the exception.
03:23
@Pawnguy7 Well...
Well yes.
So does anyone know of other programs that can make gifs easier?
@MooingDuck Event handlers, that is. The reason is structured lifetimes, where event emitter's lifetime is longer than the event handler.
But if you were trying to get people to download malware.
Wouldn't you be saying exactly that?
Why the fuck does FF keeping going into 100% CPU if I leave it on long enough?
03:24
@MarkGarcia give the event handler a object that contains an iterator, when the handler is destroyed, the destructor removes the event from the emitter via the iterator
@ScottW I read that as adobe.
I found this cockos.com/licecap but I keep reading it as Cock OS
What's cockos supposed to be anyway if not Cock OS?
@Pawnguy7 I suppose so.
@MooingDuck That's a good solution, but kind of dangerous because of iterator invalidation. But I've already had a (IMO) better solution.
okay I'm going to use Cock OS GIF Maker
looks good
03:26
@ScottW Thanks. (Been lurking here for a few weeks now)
It is like... circular logic.
You would say it because that.
But what if you don't say it because you assume people will assume that?
But it really is...
@Rapptz expertsexchange.com
Oh, they've finally put a dash on it. experts-exchange.com
@MarkGarcia lolol
> Hell, it's about time.
03:41
wow, Log Horizon is turning out to be a really good anime
@EtiennedeMartel I require sudo permissions. That way I can sudo without sudo.
@MarkGarcia Damn. And here I was going to recommend it to a friend who needs some surgery...
@EtiennedeMartel isn't $_GET that really insecure function that will evaluate code passed to it?
@caps no, unless you pass it to exec
expert exchange still exists? they should have died from embarrassment after SO came along.
@caps It's not a function, it's an array that gets filled with whatever is in the query string.
03:45
@StackedCrooked Should have happened long before that!
> Originally, Experts-Exchange could be reached by visiting expertsexchange.com, but this domain was later abandoned because it was felt that it could be too easily misinterpreted to read as "Expert Sex Change".[5]
lol
It is a bit annoying that Stackoverflow kind of killed iphonedevsdk.com though
I like that site and its people
I think SO got a lot of sponsorship from microsoft and google
@User17 People who develop for Apple products deserve no better. (Yes, I'm joking--probably).
I remember when I joined google & microsoft developer program, a link to SO was attached. I could have remembered it wrong of course

« first day (1125 days earlier)      last day (4049 days later) »