« first day (397 days earlier)      last day (4566 days later) » 

10:02 PM
I feel like there must be programmer comedians, but I can't find any.
 
Jesus, there is a lot of people in this room
@TonyTheLion Same here :( I want to see a chiropractor. I think I am squeezing a nerve somewhere
 
> IEnterpriseAuthenticationProviderFactoryManagementFactory
 
@Maxpm Thank god for self-descriptive interfaces. Gone are the days of cryptic usr, tmp and bin.
 
POSIX names can be worse.
 
creat?
 
10:18 PM
In networking a protocol is like a set of rules, or it gives meaning to how a message can be sent, right? So I can choose to have no protocol in my application layer. Or I can use an existing one or choose to make my own protocol?
For example I can just write a letter from top to down with no structure. Or I could put some structure and add my address on the top right hand corner and all that crap... Something like that?
 
@LewsTherin How tantalizingly vague...
If "networking" means IP, then yes, you can send a raw IP packet.
(It would probably be discarded by any half-decent router.)
 
"No protocol" is a protocol, too.
 
@KerrekSB What's vague about what I said? I'm asking what is a protocol for example in the application layer. And I'm using an example of a letter.
@CatPlusPlus How, it doesn't follow a particular guideline?
 
@LewsTherin Everything. What does "network" mean? My uncle in Sicily has a network, and he charges a premium for having packets delivered.
(But he doesn't ask questions, so that might be better than any half-decent router.)
 
@KerrekSB Fine, you can ignore the question.
 
10:32 PM
Hahaha, boost::locale::as::spellout is brilliant!
std::cout.imbue( boost::locale::generator().generate("he_IL.UTF-8"));
std::cout << boost::locale::as::spellout << 12 << std::endl;
// prints שתים עשרה
 
@KerrekSB Was that a euphemism?
 
std::cout.imbue( boost::locale::generator().generate("de_CH.UTF-8"));
std::cout << boost::locale::as::spellout << 2875 << std::endl;
// prints zwei­tausend­acht­hundert­fünf­und­siebzig
(With soft hyphens!)
@Maxpm That was genuine heart-felt amazement
 
MY EYES.
 
What would happen if you tried to encrypt ONE bit?
 
Could you try swedish as well?
 
10:35 PM
@KianMayne ...Uh.
 
@KianMayne Nobody would be able to read it but you
 
Or is that not implemented?
 
@ManofOneWay What's the locale for that?
 
Would it stay the same?
 
sv_SE
 
10:35 PM
Would it change
 
I guess
 
Who knows...
:D
 
I'm absolutely impressed by the soft hypen. It doesn't show here, but it's there: zwei-tausend-...
std::cout.imbue( boost::locale::generator().generate("sv_SE.UTF-8"));
std::cout << boost::locale::as::spellout << 10196 << std::endl;
// prints: tio­tusen ett­hundra­nittio­sex
 
Correct =)
 
:-)
 
10:39 PM
don't know about the space in between though
 
What can't one do with locales....
@ManofOneWay It's also soft. Not sure how to best paste this. It might be there in the pastage, copy it out and examine in hex
Hm, no, it didn't survive the pasting
 
I don't get the boost::locale::generator().generate(). So generator() returns an object with a generate() member? What's the point of that?
 
Here, I ran it through an online HTML encoder: "tio&#173;tusen ett&#173;hundra&#173;nittio&#173;sex"
Ugh, markdown doesn't support HTML
 
Sex again.
Not supporting HTML is like the whole point of Markdown.
 
@CatPlusPlus No, a random number. Jeez, you wouldn't last through Baby's First Latin class without getting kicked out :-)
@CatPlusPlus Wait -- you weren't in this room a minute ago. Do you have some sort of script that alerts you to... action?
@Maxpm It's a factory class of course :-)
Boost is the poor man's Java, as we all know.
2
 
10:43 PM
@KerrekSB *Twitch*
 
I was here all along.
 
The locale factory solves the problem of completely unstandardized locale names.
 
I'm just writing Java and paying attention every so often.
 
He's becoming one of them.
 
You see, C++ was OK in terms of thinking about locales, but it never bothered to demand that any locales actually exist.
 
10:44 PM
@KerrekSB A factory that... Solves a problem...? I don't get it.
 
@Maxpm Good man :P
 
@Maxpm I wouldn't have believed it ten minutes ago
But now I'm looking at scandinavian number words and can't stop <s>laughing :-)</s> appreciating factories!
 
I'm running out of time, I'm starting to regret not doing this crap earlier.
 
@CatPlusPlus Spent your whole day waiting for a Java app to load?
 
What are you doing?
 
10:45 PM
I can't pull an all-nighter again. :/
 
Can't you just throw an exception?
 
@CatPlusPlus Oh, you thought it would be that easy? Because Java is supposed to be easy right? :D
 
Especially that I need to be awake for Friday evening drunk Counter-Strike.
 
@CatPlusPlus What are you writing?
 
And get up at 7:30 for classes, I guess.
CG assignment.
Affine transformations of vector and raster images.
 
10:47 PM
Jesus, and you left that till the 7th (or 11th) hr? You crazy dude :P
 
Meh, I already have the vector part done, and the raster is only harder because of interpolation.
The worst part is stupid Java and even worse, Swing.
 
@CatPlusPlus I haven't done anything that complicated. But what I have done so far hasn't given me serious headaches
 
Why are we required to do an UI, I'll never know.
 
@CatPlusPlus HCI
 
Java graphics are just plain painful.
 
10:50 PM
I'm converting to Islam.
Thanks to @calendar=islamic-civil, of course.
 
Yeah, HCI, the most important thing in a Computer Graphics course.
The entire GUI is just a set of buttons that load data from files, anyway.
 
Local time is: ٢٢ ذو الحجة، ١٤٣٢ ١٠:٥١:٣٥ م
Local time is: ١٧ نوفمبر
 
11:16 PM
Does anyone know C? Some help needed here.
Question is whether you can implement int f(int, int); with int f(const int, const int) { ... }
 
@KerrekSB I always thought that was legal in C
but I can't quote chapter and verse
 
@awoodland Thank you, a good link, though it doesn't mention having a different declaration from implementation.
 
BufferedReader.close raises IOException.
I need to ask.
WHAT IDIOT HAS DESIGNED THIS FUCKING CRAP.
SERIOUSLY.
 
@CatPlusPlus Again with the redundant chatter.
You already said "Argh, Java" a hundred years ago
 
I need to vent.
 
11:23 PM
Nothing could make this statement any more poignant.
 
Seriously, how the fuck am I supposed to manage files here.
To add to hilarity, IOException is checked.
 
What's a checked exception?
 
@KerrekSB a few SO questions too - stackoverflow.com/questions/117293/…
 
Yet another stupid Java design decision.
 
Is it only C++ programmers that complain of Java's crap designs?
But what is a Checked exception?
 
11:26 PM
No, all sane programmers do.
An exception you're forced to handle somewhere.
 
@KerrekSB - point 14 of: gotw.ca/gotw/006.htm
 
Or add throws into the signature.
Into every method that doesn't handle it.
 
Oh yes, I get that. So something like void main() throws IOException
 
But seriously, WHY close() THROWS ANYTHING.
 
@CatPlusPlus But that doesn't leave many: You either know PHP, C#, Java and JavaScript, in which case you probably think that Java is hip and cool, or you know Haskell, Lisp and Python and you just say, "what's Java"?
 
11:28 PM
If you'd think Java is cool, you wouldn't be using C#.
 
@awoodland Hm, the GotW doesn't deal with separate declaration and definition. But Christopher in the comment already found the relevant part in the C++ standard.
It's another of those subtle differences :-)
 
@CatPlusPlus lol
 
@KerrekSB isn't the different definition/declaration the bonus part of the answer in point 14?
 
@awoodland Hmm, I can't see it just now...
 
@KerrekSB if that's correct that you can't change const-ness between declaration and definition then that makes int main(const int argc, ... illegal
 
11:36 PM
0
Q: Added operator overloads to compare two different objects. Now can't check for null

XaadeC# I'm trying to compare two different objects (I'm only comparing identical subfields). But I have another place where there's a check against null. Now I have a problem, it falls through to comparing the two different objects, and that blows up because it's not expecting null. I tried to put a ...

 
@Christoph: Thanks for digging up the quotes from standards!
I've added a disclaimer to the answer saying that this is not condoned in C.
@awoodland main in C++ is different from C, too
 
@KerrekSB the only difference I know of there is that you can't recursively call main in C++
but you can in C
 
C++ says that main mustn't be overloaded, and must return int. Is that the same in C?
(Minus the overloading, I guess.)
C++ also leaves everything else up to the implementation, but says that every implementation must at least accept int(int,char**) and int().
 
@KerrekSB yeah that's the same, it's specified as int main(void) or int main(int argc, char *argv[]) with a note about typedefs and char **argv being fine also
 
@awoodland Ah - but can it be anything else? In C++ a platform may accept any main function (as long as it returns int).
 
11:42 PM
@KerrekSB really? I thought C++ it was int argc, char **argv (or compatible) or nothing
 
No, not "or nothing". At least those two, but any others are also OK
I.e. the platform may offer any number of signatures and you still have a well-defined, hosted program.
 
@KerrekSB but presumably you can't read the value of anything else
 
I think Linux actually makes use of this and offers int(int, char**, char** env).
@awoodland Why not? Yes, you can do anything you like. The semantics of the arguments is also free, with some restrictions.
I.e. if you have multiple arguments and the first two are (int, char**), then they have to behave in the usual way, I think.
 
I thought you meant it should happily call int main(int argc, char **argv, bool randomextrathing)
 
@awoodland Not quite. It's up to your platform whether it provides such an entry point.
But if it does, then the standard says that your program text is valid.
 
11:45 PM
I really wish google hadn't butchered Deja News
 
Or rather, in the eyes of the standard, this is a valid program, and it is up to your platform whether it'll work.
Not sure if C has similar freedom.
Maybe @Christoph knows.
 
@KerrekSB it looked like an XOR between nothing and int, char** when I glanced at it earlier
 
in C, hosted implementations must accept int main(void) and int main(int, char *[]) and any implementation-defined additional prototypes (eg int(int, char**, char** env). (they must be documented, as any implementation-defined details)
 
@Christoph Ah, right. Same as in C++ then.
 
in freestanding implementations, anything goes (eg the startup function need not be called main)
 
11:47 PM
@Christoph Naturally :-)
I guess free-standing programs have a totally different view of the standard... you don't get any library, I suppose
probably all the signal stuff doesn't apply, either
@Christoph: How did you ultimately implement the void*/char* hash function?
 
@KerrekSB: yes, signals are out - only things like float.h, limits.h, stddef.h (ie things which in a way only document architecture details, but need no extensive runtime) are necessary for conforming freestanding implementations
@KerrekSB well, I added a line unsigned char *bytes = ...
 
@Christoph Makes sense...
:1901036 C++ finally cleaned up this void* malarkey. In C++, byte streams are always char*. Thank god.
Nothing else makes sense, too. If you want to copy an amount of bytes, you have to take the addresses as char*s. The void* in C is heavily abused in that sense...
That said, the name char is also a massive misnomer that will have people confused to the end of days. :-)
 
@Christoph - so why doesn't gcc with -Wall -Wextra -ansi -pedtantic even warn about const being different on a parameter at declaration vs definition? My experience in the past was that -ansi -pedantic was pretty damn good.
 
@awoodland Haha, my thoughts, too, but I thought I'd get slapped if I use an implementation as proof :-)
 
@KerrekSB I can't find a bug report for it
and I'm sure someone would have reported it as such
 
11:58 PM
@awoodland: clang 2.9 doesn't warn as well; however, a lot of UB doesn't require a warning message, and -pedantic only cares about messages required by the standard...
also, keep in mind that the C standard assumes no information passing between seperate translation units, so it can't mandate a warning in the general case
 

« first day (397 days earlier)      last day (4566 days later) »