« first day (366 days earlier)      last day (4568 days later) » 

8:00 PM
How, oral hygiene almost took half me an hour.
 
@JohannesSchaublitb I once 'solved' such a confusion by adding an ellipsis to a lambda expression parameter list. Although in a somewhat different situation.
 
you mean in the [...] es ?
ah you mean (T ...t, ...)
yeah that is another GCC parser problem
 
@FredOverflow I have my first dental appointment in 5+ years. I'm a little scared lol :)
 
Yes, with just (T... t) GCC complains all packs are not expanded.
Or it might have been (T... t......) even I'm not sure.
 
8:02 PM
@StackedCrooked Do you suffer from pain?
 
Occasionally it hurts a little in my lower front teeth. I fear there's a crack that could split my tooth if not taken care of.
 
@FredOverflow What was the other half of you doing during that hour?
 
@RMartinhoFernandes: "almost took half me an hour" - how you can tell C/C++ programmers: they seem to think that "volatile const unsigned me" is roughly equivalent to "volatile unsigned int const me", and so the English should probably allow that too.
 
@RMartinhoFernandes lol
 
8:10 PM
13
Q: constant arrays

FredOverflowThis is a good old C array: int a[10]; And this is a good old C array that is const: const int b[10]; In C++, there seem to be two ways to define std::arrays that are const: std::array<const int, 10> c; const std::array<int, 10> d; Are these two definitions equivalent? If so,...

I don't think there is a difference between c and d...
 
#define me this
 
> since a static array is always allocated on the stack
wut?
 
Proceed to spread confusion.
 
I did not notice this piece of art yet!
 
8:11 PM
@FredOverflow: well....... "fuck arrays" ?
 
@sehe Fuck arrays, love std::arrays!
 
today I left the lamp on when I left my flat and the window open -.-
 
+1
 
when I returned in the evening I noticed. but then there were flies in the room
 
And now you have insects in your room? :)
 
8:12 PM
i guess they will fieeep tonight :(
 
Well, how about sleeping in a different room?
 
i have only one room xD
 
@JohannesSchaublitb So your flat is a Singleton? :)
 
it's not a singleton
 
I sometimes use something like this instead of an array:
template<typename T, unsigned n>
struct Array {
    enum {
        length = n
    };
    T data[n];
};
 
8:14 PM
it's a normal object composed out of many compounded objects. including one Room
 
What do you guys think about freelancing while in education?
 
but also one ToiletRoom . but I can'T sleep there :)
 
@JohannesSchaublitb: you tried?!
 
@FredOverflow he says " In the first case, you must define the contents of the array when you declare it" but in the second case you must do so too
@sehe lol.
 
Wtf - password complexity restrictions.
 
8:15 PM
no. and I don't want to try and fail
@FredOverflow BTW nice quiz
 
@JohannesSchaublitb: perhaps you can try leaving the light on in your toilet room and the door slightly opened...
I'll not propose any more graphic methods of luring the flies into your bathroom :)
 
@KianMayne I'm working and studying. It's rather tiresome.
 
ohh
lol sehe
 
Kill insects with FIRE.
 
@StackedCrooked The size is part of the type anyway, why do you store it again?
 
8:18 PM
@CatPlusPlus But I want money to buy things
@CatPlusPlus and the studying part is easy
 
The only things I'm buying are food and games on Steam.
 
@JohannesSchaublitb What quiz?
 
@FredOverflow ur std::array one
 
@KianMayne: and you want to procrastinate and discuss freelancing. Or password complexity restrictions. :_)
 
@FredOverflow That's not storage.
 
8:20 PM
@KianMayne I have a lot of boring courses, which are as tiring to focus on as deadlines are.
 
Ah okay. But I honestly don't know the answer, so it somehow doesn't feel like a quiz to me.
 
That's an enumerator.
 
@sehe I'm not procrastinating!
 
Okay, but why? So you can pass them around easier via templates?
 
But I wouldn't go freelancing.
 
8:20 PM
procrastination is only for girls
 
It involves dealing with clients directly.
 
@JohannesSchaublitb How do you figure?
 
And clients are stupid and annoying.
2
 
real men don't
 
> Why do girls wear make-up and perfume? Cause they're ugly, and they stink.
(from last South Park episode)
 
8:22 PM
lol
 
@JohannesSchaublitb: how do we know Kian isn't a girl? After all, of the 5 answers given, one was about a facebook like button. Just saying.
 
what's girly about a FB like button
 
@JohannesSchaublitb: facebook?
 
why is facebook girly
lol
 
Aw. My colleague was wrong earlier today. Nerds don't have humor :) I'll let him know.
Still don't know what temporarily made him err on the other side :)
 
8:25 PM
@sehe Johannes isn't exactly the typical nerd template. He's more like the local template nerd around here.
 
@FredOverflow Yeah, but substitution failure is not an error, so I'll let it stand
 
I say you're an error!
 
You're an exception!
 
why am I not the typical nerd template
 
Because you have no sense of humor?
 
8:27 PM
Shute. Caught in the act. Actually, I'm probably c++2x compliant, but don't tell
@JohannesSchaublitb: eliza? Is that you?
 
Ooooh, find some hot girls and let them catch me
 
do nerds have sense of humor?
 
yes
 
ohh
im sorry
 
Definitely an Eliza bot :)
 
8:28 PM
im not Eliza. I'm litb :(
 
Which stands for "eLIza The Bot"!
 
Wow, that was an improbable success
 
no eLITe Boy
 
@JohannesSchaublitb LITtle Boy?
 
Ok, garbage collection time! Chat fragmentation level dangerously high.
 
Your weapon of choice? (Don't. Mention. The. War)
 
I can make it segfault
 
I have no idea what's happening here.
 
also you may be interested in FAN products of litb
 
@JohannesSchaublitb Who is Fat Man? @sbi?
 
8:34 PM
I'm sure you can. I have read Feynman on both Los Alomos security and hist investigation of the space shuttle Challenger accident.
 
Goddamn Apple
 
@FredOverflow dunno
 
How am I supposed tO browse porn on my phone?
 
@FredOverflow Man?? Mr.Ape :)
 
@DeadMG Isn't there ASCII porn?
 
8:35 PM
@sehe I'm not a girl - there; it's settled
 
@DeadMG Let's get you started: (.)Y(.)
 
@KianMayne I fear we will have to do double checked looking.
lol
 
@DeadMG you without GF also?:D
 
@JohannesSchaublitb :|
 
having a girlfriend has nothing to do with browsing porn
 
8:36 PM
@JohannesSchaublitb but one without GF has to :D
 
@JohannesSchaublitb: as long as you don't commit a race condition there (it's all to easy to forget to compare and exchange (!!!!))?
 
@sehe if you fix the subject then I can double look
 
@JohannesSchaublitb: Yes it does. It means that you'll have to share bandwidth.
 
8:38 PM
btw what is memlock in C ?
 
@JohannesSchaublitb: either for girl porn or facebook. You decide what's worse.
 
mlock locks an address range into RAM, so it won't be swapped out.
 
lol
not facebook but faceschluck
 
@CatPlusPlus is it in C++ also?
 
It's a POSIX function, not a standard one in either C or C++.
 
8:42 PM
aah , thanks
 
Windows has VirtualProtect for that.
 
what's that
 
@CatPlusPlus: wasn't it VirtualLock? msdn.microsoft.com/en-us/library/windows/desktop/…
@JohannesSchaublitb: not what you think
 
hmm
what did I think
 
@sehe Could be.
 
8:44 PM
Eliza: stop it
 
that appears to be the same as memlock
 
9:02 PM
Evening
What's the C++ equivalence of C's fprintf(stderr, "Error") ?
 
std::cerr << "Error";
why? you must have other hobbies than printing "Error" late night :)
 
Thanks,
I'm creating a project in C++ and I'm trying keep to the C++ standard rather than C
 
<grin/> test driven development? design the error message first :)
2
 
well not really,
if(!glCreateProgram)
{
    std::cerr << "OpenGL 2.0 is not supported" << std::endl;
    exit(1);
}
 
That will compile and never appear to fail :)
The C++ standard way of doing things sort-of implies that you will use glCreateProgram() if you want the function called, !glCreateProgram will just be true only when the address of the function is equivalent to the null pointer (void*)0
Incidentally, things were no different in ANSI C (except for null pointers being less formally defined back then)
 
9:11 PM
"This function returns 0 if an error occurs creating the program object."
Isn't this enough you mean?
 
@ManofOneWay: nope. The function returns it only when called. You failed to call the function (you just evaluated the function pointer in boolean context)
Hint: watch the (missing) parentheses
 
glCreateProgram doesn't have to be a function.
 
@CatPlusPlus Educated guess: opengl.org/sdk/docs/man/xhtml/glCreateProgram.xml. But hat tip for trying to be more dense than I was going on :)
 
On Windows you have to make a pointer and get the address yourself.
Since the ABI is frozen at GL1.1.
That said, you probably should be using GLEW or something like that.
 
That's what I'm using
 
9:16 PM
@CatPlusPlus: did you see the code snippet? There wasn't a question about the function call. I just noticed the parens were missing and thought I'd point it out anyway
 
@sehe Thank you for that :)
 
Good point about API versions, though. I haven't used openGL near Windows before
 
hai all
what's new?
 
But the snippet is valid given PFNGLCREATEPROGRAMPROC glCreateProgram = someGetProcAddr("glCreateProgramARB"); or something like that bit earlier. Don't remember the details.
 
@CatPlusPlus, @ManofOneWay +1 for that. I can see where that comes from. The context was missing, and I didn't have the WIN/GL experience. I humbly suggest that the code might be correct, depending on the prior code :)
 
9:26 PM
In GLEW, it'll definitely be a pointer filled in runtime, but the version check is probably done better as if (!GLEW_VERSION_2_0) { ... }.
 
@TonyTheLion: that's.... new
 
Can different object file formats be mixed in a shared/dynamic library?
 
@sehe it's old :P
it's funny
 
I'm off! Cheers folks
 
9:33 PM
@Maxpm Curiosity or a surprise discovery? Sounds extremely odd to me.
 
hi
Can someone explain something to me?
 
probably, assuming chat works
 
The networking layer apparently assigns ip address or address to a segment
hence it becomes a packet, right? But how does the network layer know the address?
 
@sehe See you
 
Or is making a connection, following a different sent of rules?
 
9:40 PM
the network layer defines ip addresses, so it by definition has to know them. as for associating a given ip to a given network device...that's what arp is for
 
@CatPlusPlus Why is it that if(!GLEW_VERSION_3_1) fails when I have built the latest glew 1.7.0 which should support 4.2?
 
This tests whether your GPU/driver supports 3.1.
 
Ah okey
thanks
 
@cHao I don't understand...does it assign to the segment the ip address of the local computer? Or the ip address of the destination?
 
@LewsTherin To use the network layer you usually work with a socket. A socket is defined/created by its endpoint, ip-addr and port, as well as your port for communication. Wikipedia has a fair description en.wikipedia.org/wiki/Port_numbers
 
9:43 PM
@LewsTherin both
 
@cHao But how does it know the ip address of the destination? Does it make it up?
 
it looks it up
 
Any connection is made first and foremost by the ip address. If you don't know the ip addr you can't communicate (not counting multicast =)
 
@CatPlusPlus have you coded anything c00l in opengl?
 
9:45 PM
But if the ip address is looked up, that means it uses the OSI at least once for a connection?
 
I'm trying to, but I don't have the time.
 
OSI is a theoretical model.
 
@LewsTherin OSI is a model to model the layers of the network stack
each layer is used when you send something across a network
 
Internetworking is quite misaligned for OSI.
 
9:46 PM
Yeah, but what I mean is does it follow the protocol when making a connection?
or TCP/IP
 
at each layer the packet is wrapped with more metadata
 
What protocol?
 
@CatPlusPlus That's usually the problem :(
 
@TonyTheLion Yes, I know that. But what I mean is when is the client aware of the ip address.
 
there's many protocols, it depends on what application you're using
 
9:47 PM
yes, it does. only there's generally no "connection" aspect
 
It is kinda hard to describe htpp/tcp/ip/ethernet using the OSI model.
 
the network layer knows nothing about connections
 
The layering still applies though
 
@LewsTherin at layer 3 it becomes aware of the IP address
 
it's just shuffling packets around
 
9:47 PM
layer 2 is MAC
 
There's TCP/IP model for a reason.
 
@TonyTheLion Or for us computer guys the ethernet/hardware layer.
 
you should really read up on it to understand it
 
@TonyTheLion It doesn't make sense...how would it become aware? Unless the server sent an acknowledgement
 
it's not something to explain in a sentence on a chat
 
9:48 PM
@TonyTheLion I've been doing that and watching videos sigh
 
when a device has to send to a certain ip, it sends out an arp request that says "hey, which one of you is 192.168.1.1?" and the device that matches will reply "hey, that's me!"
 
@LewsTherin well, the machine knows it's own IP address, and it will request another machine's IP if it doesn't know. I don't remember the exact mechanism.
 
Ok, Lews, fair shot here. What do you think happens when your web browser connects to www.google.com. Include dns, ip, tcp, and http as you prefer.
 
yea it's the ARP mechanism
Address Resolution Protocol
 
arp is good for local stuff.
 
9:50 PM
it has a cache that keeps track of the IP - MAC table for the machines it has talked to on a LAN
 
@CaptainGiraffe I don't know I think the network layer sends a request to the server, which sends an acknowledgement including its ip address
 
your web browser starts the journey right?
 
@CaptainGiraffe Yes, it is the client.
 
@CaptainGiraffe arp is used all around. when the address isn't on the local subnet, the sender sends an arp request for the gateway's mac address
 
@cHao ARP works only on a LAN, AFAIK
 
9:52 PM
@LewsTherin First, it needs to know the ip adress for "google.com", thats DNS (talks to a dns server, it knows about).
 
> The Address Resolution Protocol is a request and reply protocol that runs encapsulated by the line protocol. It is communicated within the boundaries of a single network, never routed across internetwork nodes.
 
@CaptainGiraffe So before it makes a connection it needs to know the address...which means we supply it?
 
it's not a routeable protocol
 
Then it has the ip address, the web browser tells the network "stack" to call googles ip addr. The network stack creates a TCP package (a IP package in disguise) to send to google
 
@TonyTheLion of course. but even when you're sending to the internet, the sender does an arp request -- for the gateway. it then ships off the packet to the gateway the same way it'd ship it off to anyone on the lan
 
9:53 PM
@LewsTherin Yes we supply it.
 
that's why you have to know the gateway ip when manually configuring stuff
 
@cHao oh yea for sure.
 
TCP/IP It is surprisingly similar to postal mail.
 
@CaptainGiraffe How does it translate www.google.com to an ip address though?
 
sbi
In case you wonder what to read next.
 
9:54 PM
@LewsTherin that's what dns is for
 
right... ok I will have to read what this DNS does. But it answers some of my questions thanks
 
@LewsTherin Thats what DNS-services are for. You tell them a name they give you an address. Connect to a dns server and you can politely ask who is www.google.com and they will reply:
Server: 192.168.0.2
Address: 192.168.0.2#53

Non-authoritative answer:
www.google.com canonical name = www.l.google.com.
Name: www.l.google.com
Address: 173.194.32.51
Name: www.l.google.com
Address: 173.194.32.52
Name: www.l.google.com
Address: 173.194.32.48
Name: www.l.google.com
Address: 173.194.32.49
Name: www.l.google.com
Address: 173.194.32.50
 
but that must follow a model/protocol because we are receiving data.
we request for a connection and we receive data, then we send data..
 
What is this discussion really about?
 
How sockets are created initially =)
 
9:57 PM
DNS- Domain Name Server. It basically keeps a table of mappings of IP address vs URL and does the translation when given a Domain. Reverse DNS does the opposite. It has a hierarchy of DNS servers which will request it from the next server up in the hierarchy if it itself is not the authorative nameserver or does not have possession of the requested data.
 
DNS doesn't deal with URLs.
 
But if the dns is to return the ip address, returning the address or even requesting for the address must follow protocols
 
Well hostnames close enough =)
 
DNS is the protocol.
 
@CatPlusPlus well I couldn't remember the correct name.
 
9:58 PM
a protocol. Ugh, I have a big carbuncle in my armpit :(
 
UDP is the lower level protocol DNS operate on.
 
really? mmn, fair enough
 
IP is the lower level protocol UDP operates on.
 
@Lews, you really shouldn't
 
On the lower level there's physical stuff like Ethernet.
 
9:59 PM
@CaptainGiraffe shouldn't what?
 
On the lowest, cables or radio waves.
 
@CatPlusPlus Or avian carriers.
 
@LewsTherin Get the carbunkle(assuming thats a bad thing) in your armpit. The protocols are just a set of rules. You need tools to experience those rules first hand.
 
@TonyTheLion Except there's no such thing as "reverse DNS".
 

« first day (366 days earlier)      last day (4568 days later) »