« first day (377 days earlier)      last day (4554 days later) » 

6:10 AM
Belgian ISP squeezes torrent traffic.
Google Translate is quite cool.
 
@Maxpm GUI design doesn't require artistic talent IMO. Good UI design is based on certain principles similar to how API design is designed on certain principles.
 
I hate room-owners... :(
 
sbi
@IntermediateHacker That's mutual, I assure you.
 
@sbi don't take it personally. I just hate them bec i'm not one myself.
just like I hate moderators...
 
6:18 AM
Cool, apparently I'm also a room owner.
 
sbi
@IntermediateHacker Don't take it personal. I just hate you because you're not one of us.
@StackedCrooked You have been for months.
 
dammit. I better delete my comment...
 
sbi
@IntermediateHacker Too late.
 
damn.. time's up.
 
sbi
@IntermediateHacker Yeah, I said so.
 
6:23 AM
the wrath of the room-owners has been unleashed... God save me. :(
 
Sep 1 at 23:34, by R. Martinho Fernandes
q is my second favourite vim feature.
@RMartinhoFernandes What is your favorite then?
Is it "."?
 
I never get tired of geeky humour. :)
I don't get this one:
what does a tap have to do with a null pointer?
@sbi do u get this joke?
 
sbi
@IntermediateHacker No, I fail.
 
what in the world does a tap have to do with a null pointer???
 
sbi
OH: "vi is an editor with two modes: one which destroys your input and the other which beeps at you.
 
6:36 AM
damn i'm retiring... :(
why did f*** get two stars?
9 hours ago, by DeadMG
fuck
I'm starring it too. :D
 
@sbi Yeah, vi sucks. vim is awesome, though :P
@StackedCrooked Yes, it's .
 
@sbi Hey, that twitter feed's icon is from an old Macintosh Pascal compiler from the 80's! Kewl.
 
sbi
> I am a finite state machine that uses Macs to turn caffeine into bugs. - Rich Siegel
@Potatoswatter Fits.
 
Oh, bbedit developer... he probably worked on its IDE, which is probably the granddaddy of all IDE's.
Nope, according to company bio, he is too young for that.
Blah, I've got the preprocessor blues... I've spent days optimizing my string class and it's still slow, and I just realized that "xyz"bitand is two preprocessing tokens.
 
 
2 hours later…
sbi
8:39 AM
This (PDF) is a very interesting study comparing C, C++, Java, and four scripting languages. (The interesting charts start at page 12, if you want to skip the preliminaries.)
- No unambiguous differences in program reliability between the language groups were observed.
- The typical memory consumption of a script program is about twice that of a C or C++ program. For Java it is another factor of two higher.
- For the initialization phase of the phonecode program (reading the 1 MB dictionary file and creating the 70k-entry internal data structure), the C and C++ programs have a strong run time advantage of about factor 3 to 4 compared to Java and about 5 to 10 compared to the script languages.
Very interesting conclusions. Note that this study was done in the year 2000.
 
so java uses more memory than a scripting language? :)
cute
 
sbi
@jalf Yeah, according to this study, Java takes as long to write as C and C++, needs four times as much memory, and runs several times slower. What's even more, it's worse than the scripting languages in all of these categories.
Really, given that, why would you want to program in Java?
 
Wasn't Java still interpreted back then though? And as I recall, it had a pretty awful garbage collector too. Might come out a bit better today
but yeah, given the choice between a scripting language and java, I can't imagine why I'd voluntarily work with Java
Java is a four-letter word
 
@sbi In 2000.
 
sbi
@LucDanton That is true. I failed to consider the past tense in my statement.
OTOH, the other languages have improved, too, since then.
But, yeah, Java might have started out exceptionally bad.
 
8:50 AM
But Java had a lot more space for improvement!
I just got back from the grocers', btw.
 
@RMartinhoFernandes What was his opinion on the subject?
 
Morning
what have I missed
 
Hi All,
anybody having idea, how can i implement simple video chatting between 2 clients on internet?
I do have idea of BSD socket programming
 
9:03 AM
@abhinav I think your idea of "simple" differs a bit from mine
In my world, video chat is fairly complicated to implement
 
@jalf yeah I bet
maybe if you were using Java
 
@jalf yes i do agree. Assume if i can do it on LAN, where i can implement everything in the application, listening on a specific port. But I am not sure how to do
 
sbi
@StackedCrooked That made me wipe my monitor.
 
you need to interface with the user's webcam to retrieve an image, you need to have a strong understanding of video compression, figure out how to stream it efficiently, how to compress and encode the image data with dynamically variable bitrates to handle different connection speeds. Then you need a reliable and performant network protocol to transmit the data. Wrap it all up in a client application and give it some nice UI, and you've got video chatting
 
sbi
@TonyTheLion Sex, drugs, and Java bashing.
 
9:06 AM
@jalf yeah I bet
 
sbi
@jalf That smells like several dozen man years.
 
alternatively, you find an SDK for skype or MSN or something which already implements everything you need, and then you write a different-looking frontend
 
@sbi ohhhhh.... exciting
 
@jalf for msn or skype we will have to use their login. which i do not prefer as of now. Further, capturing data etc etc(all teh local machine processing stuff) is fairly doable. My concern is how two clients will communicate over web. On LAN i can bind my application to a port and receive all data. How to do similar thing on web
 
You bind your application to a port and receive all data.
 
9:11 AM
@RMartinhoFernandes we do not have a static ip on the WAN. moreover if we are behind the router, we have Local IP only which external world wouldn't know
 
Either I'm misunderstanding, or you want the benefits of a login (central server that maps current IP <-> login) without a login.
 
@abhinav so you discover the ip. Either you have a central server, like skype or msn do, where users log in, and then the server knows their ips and can help negotiate connections
or the users will have to know the ips they want to connect to
exactly like on a LAN, really. You ned to know who you're talking to for any kind of networking
 
From what I understand accept() is like connect() expect accept() doesn't bind the serverside socket to a particular endpoint?
BSD sockets btw..
 
@LewsTherin didnt get you
 
9:27 AM
@abhinav In the client side you can bind a socket to create a connection with an endpoint. What I don't understand is why we always have to pass in the address structure. For example
ugh looking for the api
int connect(int sockfd, const struct sockaddr *serv_addr, socklen_t addrlen);
 
@StackedCrooked They sell you a bitrate at a certain price. Then they give you something less and demand the agreed price. It's pure swindle, but somehow those criminals are not punished.
 
Around here ISPs always put clauses about limiting traffic to maintain quality of service for everyone, or something.
So they may be assholes, but not criminals.
You get what you paid for.
 
Ok I didn't find what I was looking for
But when you connect a socket, it binds the client socket to a server endpoint
So the server to respond to a client must connect, and I guess it uses accept
 
9:43 AM
IIRC server-side listen is used, not connect.
 
@LewsTherin 'connect' api is OK. If you can ping the other machine, you can connect as well but Assume following
client1----HomeRouter1---||||Internet||||----HomeRouter2----client2
Now Client 1 and Client 2 don't know each others IP, being on different nets. So essentially they dont have an IP which can be used as server.
So, how msn/skype etc work.. i can think of a webserver piping 2 server sockets for two clients.
 
BSD sockts
 
@abhinav That's exactly how they work. There's a central server negotiating the connections.
 
@LewsTherin My manpage says the typical flow for a server is socket, bind, listen, accept. No connect.
 
@RMartinhoFernandes And how do they implement this functionality? Do the google/skype/msn/etc keep some process running specifically for that like 'httpd' on their webserver?
 
9:48 AM
Well, yeah, something like that.
 
@LucDanton
CONNECT(2) BSD System Calls Manual CONNECT(2)

NAME
connect -- initiate a connection on a socket

SYNOPSIS
#include <sys/types.h>
#include <sys/socket.h>

int
connect(int socket, const struct sockaddr *address,
socklen_t address_len);
 
connect is for "clients".
 
@abhinav My message was about how there is no connect in the workflow for servers according to my manpage. Not that I don't have a manpage for connect. Or maybe I misunderstood.
 
@RMartinhoFernandes I am not sure of webserver related stuff. But if I write some executable or daemmon, will webserver let it run? no security issues?
@LucDanton the server need not connect :)
 
@abhinav I've said that twice already. What are you trying to say?
 
9:52 AM
What you need is not a webserver (i.e. a server that serves webpages), it's a server specifically designed for your clients.
 
Or thrice, even.
 
You design (or use something off-the-self) some protocol to tell the server "Hi, I'm Joe, I'm waiting for connections at 222.222.222.222:1234".
 
@RMartinhoFernandes so publishing a webserver of our own is the only option it seems. Am i right
 
And "Hi, I'm Annie, I'm looking for Joe, can you tell me where he is?"
 
@LucDanton ^^
 
9:54 AM
Then the server tells Annie that Joe is at 222.222.222.222:1234, and Annie can now connect directly to Joe.
 
ok
@RMartinhoFernandes thank you
 
Ugh, I got disconnected
You guys don't understand what I'm saying. When a client creates a socket, it binds it to a destination address by calling connect and passing in the structure
But when a server listens, it piles the requests on a queue. When it calls accept, it removes the first one, and binds the address of the client to a new socket. Hence a connection takes place
 
Right, so what's the problem?
 
So is connect not similar to accept?
 
No.
connect requests a connection.
accept accepts a request.
 
10:04 AM
I know, I didn't say accept and connect are the same thing... just that they have a similar concept. They both bind to a destination address?
 
You bind to local addresses.
 
That's for a server binding to a local address. But to bind to a destination address, connect and accept the concept is similar
connect takes the address of the server.
accept takes the address of the client
Well except it fills it in for us
 
accept returns the address.
Going to do some dishwashing now. @sbi, you're there?
 
How do you mean? It returns a descriptor...
Oh, right.
 
sbi
@RMartinhoFernandes Yep. Do you want me to line out the steps now or later?
 
10:09 AM
@sbi Nice, I'll be back in a few minutes and you can explain it then.
 
@RMartinhoFernandes He is ignoring me lol ;)
 
@LewsTherin Who's ignoring you?
@sbi Ok, I'm ready.
 
@RMartinhoFernandes @sbi is
 
I think I've got all the ingredients except for ground meat, as there's no butchery nearby and I didn't feel like driving :)
 
sbi
@RMartinhoFernandes Give me a minute, I never did a dry run of this. I mustn't skip a step.
@RMartinhoFernandes Ah, Ok, so it's a mushroom tomato sauce only. Fine. (Here you can buy ground meat in the supermarket, BTW.)
 
10:17 AM
There's no supermarket in a 20-minute walk radius :) I don't live in the city.
 
sbi
@RMartinhoFernandes Where did you buy the mushrooms?
 
A local grocery.
 
hello
 
sbi
@RMartinhoFernandes Ah, Ok., they do not have meat, I presume. Well, I think I have it, I only need to remove the onions and the meat before I paste it here. Originally I made it easier for you who doesn't have that gut feeling necessary to cook everything at once in one pot, knowing when to put in what so it will all be done at the same time. But since we're now down to mainly the mushrooms, this is a lot simpler.
Just a word about the amounts: Do it any way you like, this is easy to vary. As an orientation, start out with 250ml tomato paste (single concentrate, adapt for higher concentrations) and 250ml sweet cream. (That makes a lot of sauce for a single person, but I don't get smaller amounts of cream here, and this freezes wonderfully, sparing you the trouble of shopping and cooking on a rainy day.) With mushrooms (and meat), it's the more the merrier. :)
Start by cutting the mushrooms into slices. If they are big, half them, lay them on the cut plane, and slice them.
 
Oh, I bought sliced mushrooms. I figured I wouldn't be using them whole.
 
sbi
10:28 AM
@RMartinhoFernandes LOL! You lazy pig!
Fry the mushrooms in a dry pan. Really, I'm not joking, a dry pan. No oil. That is easier with one of those new-fangled coated pans, but well-worn iron pan does just as well. (I have an iron one.) Make the pan hot enough, and they won't stick.
While you do this, start boiling the salted water for the noodles. (For noodles, using more water is always easier than using less.)
 
Do you put the mushrooms in from the start, or only when it gets hot?
 
sbi
@RMartinhoFernandes Heat the pan first.
 
sbi
@RMartinho: I would fry onions and garlic then. I know you will skip the onions, but I don't know whether you like garlic. I do them after the mushrooms (putting the mushrooms on a plate for the moment) since they are fried in oil, while I use a dry pan for the mushrooms. I would also fry the meat at the same time (salting it in the pan), but you don't have that either.
 
Garlic's fine.
But I'm out of gas. I'll be back in a while.
Damn.
 
sbi
10:35 AM
You have a new bottle available?
Oh, you might want to sprinkle the mushrooms with a bit of salt (and maybe a little pepper) when they are almost done. That I forgot.
Just ping me when you are ready. I'll be coding until then.
 
@sbi No, but I just bought one down the street. I'm heating the pan now.
 
sbi
@RMartinhoFernandes Ok, I'll just paste the oncoming steps all at once, so you have an overview, but I can still walk you through it, if you need assistance.
Fry the mushrooms in the dry pan.
While the mushrooms fry, do whatever you want to do with the garlic. I prefer it in very thin slices, others just put it through a garlic press. Put some salt (and maybe some pepper) over the mushrooms a while before they are done.
Fry the garlic on little heat in very little oil. When it is getting dark (you don't want it black and crisp), put the mushrooms back in, and add the tomato paste. It should then be too thick to be considered a sauce, hard to stir. Add sweet cream until it becomes a real sauce. (Mine's always quite thick, but we like it that way.)
 
10:50 AM
Good, thanks.
 
sbi
@RMartinhoFernandes You do know how to make the noodles, I suppose?
 
@sbi Drop them in boiling water and wait?
 
sbi
@RMartinhoFernandes Yeah. (Salted water.)
 
If I have a comparison operator ==, should it:
A) compare the address of the class with the address of the incoming class?
B) compare the contents of the class to the contents of the incoming class?
or C) do something else?
 
@SSight3: yes
 
sbi
10:56 AM
@SSight3 No. Users can do this themselves, no need for calling your operator.
 
@Patrick Mathematician's answer.
 
sbi
@Patrick I suppose that was meant funny? ("Should I do A), B), or C)?" "Yes.")
 
@SSight3 :)
@sbi Yes.. trouble is SO figured I answered the last one..
 
sbi
@SSight3 Yes, you need to compare the content, since this is what (in a well-encapsulated type) is not directly accessible to the users.
 
definitely do B
 
10:58 AM
Excellent.
 
sbi
@DeadMG Do B or not do B? SCNR.
 
@sbi Yeah, this answer makes sense in my mind. Address comparison is easier than content comparison.
 
sbi
@Patrick Yeah, mentioning @someone will always highlight their that someone's message.
 
@SSight3 Be vary of deep comparison though. Comparing a resource that resides on a network share can be difficult
 
@sbi Olive oil is fine, right?
 
sbi
11:01 AM
@RMartinhoFernandes It's what I always use.
 
@Patrick Probably out of my depth. Although... now you mention it, I was about to describe my class operation and have just realised there is a hideous flaw with it.
 
@RMartinhoFernandes When I cook I usually use a nob of butter :P (reference youtube.com/…)
 
The code::blocks abbreviation tool is sweet stuff when you use it correctly
 
sbi
@SSight3 Nothing for finding flaws in your design or code like trying to describe to someone else why it should work.
 
@sbi It only ever comes up when I describe someone something. Never when I think it through. I was going to say I had a list class that isn't a true list, just works as a shortcut copy... one problem... it retains Size and Iter as hardcopy duplicates. Whoops.
 
sbi
11:07 AM
@SSight3 This even has a name:
Rubber duck debugging, Rubber Ducking, or the Rubber Duckie Test is an informal term used in software engineering to refer to a method of debugging code. The name is a reference to an apocryphal story in which an unnamed expert programmer would keep a rubber duck by his desk at all times, and debug his code by forcing himself to explain it, line-by-line, to the duck. The process is to meticulously explain code to an inanimate object, such as a rubber duck. It is expected that when the programmer comes across a piece of code that is incorrect, they will realize this Similar terms *Cardb...
 
Oh yes, tell the duckie your life story on how it works.
Well, when coders talk to themselves about STD, zombies, parents killing children... I am sure someone out there thinks it's all insane.
Or to a rubber duck. Imagine that: You see duckie, the parents must kill their children or else they will turn into zombies...
 
@SSight3 The rubber ducks hear all the stories..
 
@Patrick Must think we are all... quackers.
 
lol
 
The abbreviation tool in code::blocks is sweet though. Seriously. I will keep adding practical abbreviations until I can write my code in the merest of ctrl + J presses. Lets me rotate through public/protected/private on a mere button press.
 
11:19 AM
@sbi Ok, I've got everything rolling now. Noodles in the water, and all the sauce ingredients on the pan. :)
 
sbi
@RMartinhoFernandes Great!
 
Cook++
 
You know, it actually tastes nice. Something I'm cooking.
 
@SSight3: That's what the C stands for in the channel ;)
 
@Patrick if Lounge is a template object that takes an invalid incrementing type of C, where's it's template definition?
 
11:24 AM
@sbi Ok, should I have the noodles with the pot covered or not?
(Maybe a little late to ask now, but well...)
 
while(!Boiling);
PotCover = false;
Sorry should be:

PotCover = true;
while(!Boiling);
PotCover = false;
 
sbi
@RMartinhoFernandes Sorry, I was away for a moment. It doesn't matter. It's harder to keep the water boiling, but not boiling over, with the lid closed, so just leave it open.
 
Ah, so I made the right choice :)
 
You may wish to replace the blocking while loop with a poll event process that handles the exceptions of burning, burnt, fire, power outages, ninja attacks, scold burns and the all too infamous lemon-got-in-the-papercut incident.
 
sbi
"The object-oriented version of spaghetti code is, of course, 'lasagna code'. Too many layers." - Roberto Waltman.
:)
 
11:33 AM
Oh hey, there's a one-in-a-million chance that I'll be writing a C++ book for Microsoft Press :o
 
What does that mean?
That you won't do it, or that there's a possibility that you will do it?
A book on what, btw?
 
that Diego from the VC++ team emailed me asking if he could pass my name to the MS Press people as candidates for writing some new C++ books
 
sbi
@RMartinhoFernandes C++. (It's a programming language.)
 
that's all I know so far
 
@sbi C++ is a broad topic!
 
sbi
11:35 AM
@RMartinhoFernandes You go and watch over your noodles! :D
 
so it depends on them actually wanting to trust me with anything whatsoever, and me wanting to do it, and finding the time to do it, and a dozen other things
 
@sbi With the noodles I don't need to wait until all the water boils out, right?
I can just take them out when they look and taste ready, right?
 
sbi
@RMartinhoFernandes Noodles cook as long as is written on the package. Roughly.
@RMartinhoFernandes You take them out when they feel right, preferably in your mouth.
 
Oh right, the package again! hides in a hole.
 
@RMartinhoFernandes a good rule of thumb, whatever you're cooking, is that it's done when it looks and tastes ready
 
sbi
11:39 AM
@jalf How do you boil an egg according to that rule? :)
 
@sbi I don't, but I can certainly use it to answer the question "is the egg done yet?"
it just limits your options for recovering if the answer turns out to be "no"
 
Ok, it's done. Now excuse while I'll be having lunch :)
 
sbi
@jalf :)
 
@sbi: google "eggperfect timer" - that makes you see when the eggs are ready
 
11:56 AM
I am invincible now!
Well, maybe not. But I feel great.
@sbi Thanks again! Here's my part: stackoverflow.com/questions/3568166/…
:)
 
sbi
@RMartinhoFernandes What?
 
My part of the deal.
We had a deal, remember?
 
sbi
@RMartinhoFernandes Oh. Well. Erm. I wasn't all that serious about that, you know. :-/
 
sbi
Thank you anyway.
 
sbi
12:12 PM
Hey, yesterday and today (so far) I gained 120 rep without having provided any new answer. Being lazy I like that. :)
 
@sbi I've never recieved that much rep. in 2 days even with having provided answers. :(
 
sbi
Ugh. I have just found out that the reason my changes to the code weren't having the desired effects is that I was looking at the wrong executable. That had cost me the last 2hrs.
 
@IntermediateHacker You know, @sbi has 100x more answers than you have. That helps.
 
@RMartinhoFernandes that was uplifting...
 
sbi
@Martinho, over my troubles I had forgotten to ask you how your meal was. Was it Ok?
 
12:17 PM
20 mins ago, by R. Martinho Fernandes
I am invincible now!
Well, this is my reaction.
 
sbi
@RMartinhoFernandes Oh. That was about the food?
 
@RMartinhoFernandes Excellent, I guess you don't need a wife then :)
 
It wasn't the best meal I ever had, but being something I cooked, I was really happy.
 
@RMartinhoFernandes ha! u were wrong. @sbi doesn't have 100x more answers than me.... he has 100x + 45 more answers...
my answers = 14
 
12:18 PM
@sbi 's answers = 1445
:(
 
Yes, I know basic arithmetic.
 
sbi
@IntermediateHacker So it's 103.2 times as many. Your point being...?
 
@sbi my point is... i'm a waste of cyber-space... [ sigh . ]
 
Gosh, what a silly conclusion.
 
sbi
@RMartinhoFernandes Wow, and you can cook, too. You can now advertise for ladies to apply. :)
 
12:21 PM
Is there a way to change the position of the taskbar in Ubuntu? It is annoying me
 
@LewsTherin Go to "ask ubuntu"
 
@IntermediateHacker ok thanks. I looked everywhere but apparently you can't
 
"Young heterosexual man with knowledge of basic arithmetic and cooking seeks smart and not unpleasant to look at lady for love and other stuff."
 
@RMartinhoFernandes Only to look? tut
 
sbi
@RMartinhoFernandes You got your priorities all wrong. I can picture a lot of girls who are smart and pleasant to look at, but who could drive you nuts within 4 weeks.
 
12:25 PM
@IntermediateHacker Is it possible? I don't want to waste my time
 
:)
@sbi If she's driving me nuts then she isn't that smart!
 
wtf. I just wrote a facebook status 2 weeks ago which no one even looked at and my dad copied it to his account today, and he has received 19 comments and 127 likes...
 
You and your dad are friends on facebook? mmn
and lol
 
guess people don't look at the status, but the person who wrote it.
 
sbi
@IntermediateHacker Oh. Another indication that you are, what did you say?, "a waste of cyberspace", then. :)
 
12:28 PM
@LewsTherin Yeah.
@sbi don't quote my quotes! dammit.
 
sbi
@IntermediateHacker Honestly, if he gets his applauds by copying from his kids, I'm sorry for him. (He could have just commented favorable on your status instead, exposing you to his crowd, you know.)
@IntermediateHacker It wasn't your quote I was quoting, it was your statement. :)
@RMartinhoFernandes That depends on what her goals are. If you going nuts benefits her goals, she could still be smart.
 
@sbi women can usually find a way to profit from driving you nuts, can't they?
 
1:16 PM
@sbi Well, driving me nuts would conflict with the love part, no?
 
sbi
@RMartinhoFernandes There are many strange kinds of love in this world.
 
sbi
1:32 PM
2
Ouch!
 
@sbi: the comment made it much more fun :)
 
sbi
@Default I doubt the guy appreciates them.
 
the guy who picked up the crab and placed it by his nose?
 
haha
 
sbi
@Default I have seen no other in the video.
 
1:56 PM
Any tips, tricks or techniques for writing classes people?
 
That's way too vague a question.
 
now, I need to implement rotation of my tetrominos, each is made up of four squares. Anybody any idea what the best way is to implement rotation.
 
Just make a precomputed table.
 
of what?
 
Rotations?
 
1:59 PM
right, but how do I compute the rotations is more like the question
 

« first day (377 days earlier)      last day (4554 days later) »