« first day (643 days earlier)      last day (4304 days later) » 

12:00 AM
@JerryCoffin turns out, in Java cal.get(Calendar.MONTH+1) compiles and interprets as cal.get(Calendar.WEEK_OF_YEAR).
 
@R.MartinhoFernandes didn't mean to whine, but I'll shut up until I read it. UB issues are something I need to understand better anyway.
 
@MooingDuck Hah.
Yeah, because those are int constants and not proper enums.
 
@MooingDuck uh, lolwot?
 
@MooingDuck Hm...one of the few nice tings about Java was having strong enums, but apparently they didn't use them here.
 
"backward compatibility"
 
12:01 AM
@JerryCoffin If they did, they would have a less sucky date API. They could never let that happen.
 
    class MainWindow
        : public NonCopyable
        , public SelfDestroyingObject
        , public WithRestrictedAllocation
    {
    CPP_DECLARE_IS_NONCOPYABLE( MainWindow );
    CPP_DECLARE_IS_DYNAMICALLY_ALLOCATED( MainWindow );
^ y no language support?
 
@R.MartinhoFernandes Apparently so.
 
Also, enums came with Java 5, and Calendar was on 1.4
 
Bertrand Meyer argued too strongly against enums
Remember, despite claims, Java is just early Eiffel with C syntax
 
@R.MartinhoFernandes Yeah, why wait to get the language right before you wrote a billion lines of crappy code so you can never really fix it?
 
12:03 AM
Or, like a shadow, not the Real Thing(TM)
 
@JerryCoffin Never stopped them.
 
@Cheersandhth.-Alf What's the macros?
 
They do the boiler-plate code that would be much nicer to have language support for
 
Java has been annoyingly slow to develop, and decisions like not fixing the enum thing make it even worse.
 
@Cheersandhth.-Alf Why NonCopyable public?
 
12:05 AM
@Cheersandhth.-Alf I can't really agree -- it collects its screw-ups from many sources, not just Eiffel (if it was just Eiffel with C syntax, at least it would support DbC reasonably well).
 
which is what, specifically?
 
(Or any of the others.)
 
you can privately inherit from a non-copyable base and achieve non-copyability just fine.
 
#define CPP_DECLARE_IS_NONASSIGNABLE( clazz )               \
    private:                                                \
        clazz& operator=( clazz const& ) CPP_IS_DELETED

namespace progrock{ namespace cpp{

    class NonAssignable
    {
    CPP_DECLARE_IS_NONASSIGNABLE( NonAssignable );
    public:
        NonAssignable() {}
    };
 
don't need anything else
well, those are quite unnecessary
 
12:06 AM
@R.MartinhoFernandes why not? i think public as a default access choice is OK.
 
simply having a base class which cannot be assigned or constructed will trivially destroy the compiler implementations of those operators.
 
@Cheersandhth.-Alf To me, it basically boils down to: would you ever want to do NonCopyable& x = someMainWindow;?
 
@DeadMG yes, you can, but then visual c++ will protest at every opportunity. so do both. <g>
 
what exactly do you mean?
 
We have three prime user moderators in the first 100 pages of 'most active' SO Chat Users:
811: 811                                 Shog9 ♦
105971: 105971                           Anna Lear ♦
419: 419                                 Kev ♦
 
12:07 AM
@R.MartinhoFernandes no, but there's no harm in that, surely?
 
@DeadMG I think he means that'll work, but then you'll get warnings.
 
"protest" is not really specific
 
@Cheersandhth.-Alf Well, I think there's less harm in making them private.
 
@sehe Any they're all mods! HA... it's a conspiracy.
 
how else does a compiler protest?
 
12:08 AM
@Mysticial Notice I filtered for mods there
 
@sehe I fail...
 
@Mysticial "We have three prime user moderators" "and they're all mods"! What a surprise.
 
shuddup
 
@R.MartinhoFernandes hm. maybe i need to think about this.
 
*conspiracy by @sehe.... hehe
 
12:09 AM
@JerryCoffin Just disable that specific warning?
 
@Mysticial There are actually exactly 150 non-moderator prime-number-users in that same sample :)
 
sehe, you're having way too much fun with that
 
anyway, in next C++ standard i want support for these concepts
 
Okay then... to keep @sehe busy. How about users that are 1 away from a prime number?
 
12:10 AM
!
 
@Mysticial I don't care
 
@Cheersandhth.-Alf I thought this was about some MSVC idiosyncrasy?
 
aww
 
Because in GCC, inheriting from a private base just works.
 
no, it is about current language requiring boiler-plate code everywhere. it's -- very annoying! and time-wasting
 
12:11 AM
it doesn't in vc?
 
@Cheersandhth.-Alf Yes, I agree there's still too much boilerplate. But not in this particular case.
 
Alf, what even is, exactly, your problem with the existing inherit from base problem?
 
What is exactly is boiler-plate code? Code patterns used over and over again? And why is it bad?
 
@DeadMG Well, consider the self destroying object. It needs to be dynamically allocated. The simplest way to ensure that is a protected destructor. You can't inherit the access of a destructor. Today.
For example.
 
@Mysticial Primality Report, full disclosure: pastebin.com/2VqBv0mF
 
12:13 AM
Boilerplate is a fictional robot which would have existed in the Victorian era and early 20th century. It was created in 2000 by Portland, Oregon artist Paul Guinan. Originally intended for comics, the character became known via a faux-historical website created by Guinan, and has since appeared in other media. Development Boilerplate was originally featured on a website created by Paul Guinan in 2000. The Boilerplate site details the history of a remarkable robot built in the late 19th century, and features photoshopped "archival images" in which Boilerplate (actually a 12-inch articul...
:P
@JimNorton It's large pieces of code you need to write the same everywhere to do small tasks.
 
self-destroying object is always a bad idea.
 
Ell
boiler plate code is code that does something the language wouod do if it supported it?
 
In this case, it's to make the object non-copyable. (Because of Microsoft's compiler, it seems)
 
@JimNorton it's annoying stuff that you have to repeat in every class or whatever
 
Thanks guys, got it...
 
12:15 AM
@DeadMG are you unaware of gui programming, financial app domains, etc.? most objects there are self destroying. you can think it's bad, but even then you have to relate to it
 
for GUI hierarchies, the parent owns the children.
 
Xeo
50k/260k... yay...
 
as for financial, I've never actually seen any code from there, so I can't comment.
 
DeadMG doesn't have to relate to anything he doesn't damn well want to. He's a badass. :P
 
@Xeo Is that a USB external HDD?
 
Xeo
12:16 AM
yes
 
ouch
 
@Ell Boiler plate is code that serves no practical purpose but is otherwise required
 
@Xeo 2 TB drive over USB2?
 
Xeo
:D
 
Oh, it often serves practical puposes
 
12:16 AM
oh god...
 
@DeadMG That's VERY bad. That means that after the user closes a window, you're still holding on to a zombie object in the code. Then you're into the Microsoft solution that in no time.
 
Xeo
Atleast it doesn't copy...
 
Geez, at least get an external SATA HDD enclosure.. :-)
 
not at all.
 
@keith.layne But minimal ones.
 
12:17 AM
oh yes
 
when the user requests to close the window, I destroy it
it's just that simple.
 
summing up, you're trolling and/or uninformed.
 
Xeo
oh well, afk walking the dog since I have time
 
alf and DeadMG are arguing? I'm outta here
2
 
@Xeo in the middle of the night?
 
12:18 AM
@MooingDuck hehe.
 
@Mysticial hey, he's got time
 
@Cheersandhth.-Alf It's easy to write a class which does not have this problem.
 
Xeo
later
 
cya
 
cya Xea
Xeo
 
12:19 AM
@Cheersandhth.-Alf Alf, you are awesome.
 
@Cheersandhth.-Alf ideone.com/ivYjJ
after all, what if the user requests a close and I wish to instead pop up a dialog asking them to save their work or something like that?
that's no business of the Window class but I still have to deal with it
so it's only normal that you must handle the window close request event outside the Window class.
 
stillalive? Dude, that's the worst case style ever.
Well, not ever. I guess ALLCAPSNOSEPARATORS would be worse.
 
eh
it's a throwaway
the point is, I have neither zombie objects nor a self-destroying Window class.
 
@DeadMG well, the stillalive boolean variable indicates that at some point you have a zombie object. otherwise it's meaningless. but you maintained that you avoided that: a self-contradiction.
 
@DeadMG Yes, just try to scale that up to a real running application and either you become famous or you will end up doing what everyone else does...
 
12:22 AM
@Cheersandhth.-Alf Not really. The Window object destroys the OS window when it is destroyed. It is still valid after stillalive becomes false.
stillalive merely indicates to prevent it's destruction.
 
"OS window". that's funny.
 
@keith.layne he means an API level window, for API = (Windows API, GTKmm, whatever)
 
I know
it just shows how he thinks is all
 
Ell
man I really want an ice lolly. but It will be my 4th today and I will have to sneak downstairs. arghh what to do what to do!
 
room topic changed to Lounge<C++>: We'll never get a refund for that lost topic. [c++] [c++11] [c++-faq]
 
12:25 AM
lol
 
Ell
somebody tell me what to do. get one or not?
 
i think instead of a boolean stillalive, the callback could just move a label that implements the event loop -- like, move it to after the loop. he he
 
Ell
brb
 
move a label?
 
12:27 AM
Prime user highlights: (Feel free to star. This is IMPORTANT STUFF)
 
also, it would be nice if c++ had the "come from" in addition to "go to"
 
@Cheersandhth.-Alf You could, in fact, do something similar, if you have balls :P
 
@sehe Xaade is an asshole?
 
@DeadMG std::move(label)
 
@sehe I see you fixed your unicode problem
 
12:28 AM
I guess I missed that.
 
@R.MartinhoFernandes :) you're quick
 
In computer programming, COMEFROM (or COME FROM) is an obscure control flow structure used in some programming languages, originally as a joke. COMEFROM is roughly the opposite of GOTO in that it can take the execution state from any arbitrary point in code to a COMEFROM statement. The point in code where the state transfer happens is usually given as a parameter to COMEFROM. Whether the transfer happens before or after the instruction at the specified transfer point depends on the language used. Depending on the language used, multiple COMEFROMs referencing the same departure point may be...
 
@keith.layne No I didn't actually. Just did some manual touch ups. I used curl + vim exclusively.
 
kinda a waste compared to the simple boolean, but still.
 
@DeadMG Oh crap, what?
 
12:29 AM
well, he talked about moving a label
so I decided to get creative :P
 
Damn. Borked the layout on edit. Retrying:
 
@sehe I just meant the diamonds show up now :)
 
Right, "creative".
 
well I did create something, so I was being creative.
the fact that it was of little value is tangental to the fact that I created it.
 
Ok, text segmentation, here I come.
 
12:31 AM
Prime user highlights:

 Moderators:

419: 419                  Kev ♦
105971: 105971            Anna Lear ♦
811: 811                  Shog9 ♦

 Known (In good standing):

944687: 944687            Desmond Hume
707111: 707111            minitech
119963: 119963            Jefromi

 Unknown (Interesting names):

1364309: 1364309          Ray Cheng
717341: 717341            Lukas Knuth
572059: 572059            Linus (NOTE: might move to next section)

 Known (assholes):

1414697: 1414697          jaffa           (I knew it!)
4
 
I think Xaade is pretty cool. Just don't get him going about how global warming is a liberal conspiracy. He's a Texan, I think.
 
Am I the only one that thinks that looks awwwwful on the starboard?
 
Ell
I didn't know ninja was an asshole
 
@keith.layne I put him on the list based on my memories of him last year. He used to troll a bit too hard for my taste. That said, I wasn't used to much back then :)
 
@sehe I meant, I remember him (haven't seen in in a while though), and I don't remember him as an asshole.
 
12:32 AM
no, just Leonardo, he's a prima donna
 
@R.MartinhoFernandes i agree
 
Ell
stage one of the mission is complete. I have th ice lolly. now I.need to open it without making a noise
 
@R.MartinhoFernandes Fixed it, a bit - as far as possible
 
the prime : prime part is a bit redundant...
 
No, it's not.
 
12:34 AM
your mom said it was
 
Your mom is redundant.
 
You guys should learn to recognize a joke. Obviously, Linus should have moved with the assholes if I meant that :)
 
my mutha's a saint! don't you talk about her!
 
Your mom is the patron saint of fats.
 
Ell
lol
 
12:35 AM
I'm guessing that didn't translate well...you mean the actual fat cells or lipids or something?
 
@sehe Should eliminate "moderators" as a section, and move them to the other sections -- Anna to "good standing", "shog9" to "assholes", not sure about Kev.
3
 
@keith.layne You can have the full list - so the prime factors aren't so redundant: Primality of SO chat users - first 100 pages of 'Most Active' users (2000 users)
 
Ell
argh why is plastic so loud!
 
@JerryCoffin I'm not doing a taxonomy of them.
@R.MartinhoFernandes Domino or Waller?
 
12:37 AM
@sehe would be sweet if you could do a SELECT * FROM USERS WHERE PRIME(ID);
I'm clearly a SQL magician.
 
I'm twice a prime!
@keith.layne You can. Just write the PRIME function.
 
smartass.
 
I'm being serious.
I lack the SQiLls for it, otherwise I could show you.
 
Ell
anyone used PostgreSQL before?
 
I know. I'm just still hurt from your blatant attack on my mom :P
 
Ell
12:39 AM
why does it bother people when yo say stuff about their mom?
 
SQiLls is a stretch though
 
@Ell A little (very little). Wasn't particularly impressed (but then, SQL rarely does).
 
@keith.layne Yeah, I thought so too.
 
Ell
@jerrycoffin can fields contain Instances odfm other tables? oop style?
of*
 
Instances?
That's not how relational databases work.
 
12:42 AM
DB is a singleton. For instance.
 
Ell
I know I thought PostgreSQL was different?
it is a hierarchical db?
 
SQL is pretty much for relational dbs. period.
and it's in the name. Just sayin'.
 
Ell
structured query language?
 
@keith.layne dont think it is
 
@Ell Not that I noticed. It does allow you to define a column as an array that holds an arbitrary number of values, which is a little like it being another table (but you usually only use it for a fairly small number of items).
 
12:45 AM
@MooingDuck SQL is in the name of PostgreSQL.
 
really?
 
@Ell No, not hierarchical. Definitely relational in basic orientation.
 
Ell
hmm never mind then
I guess ill just use xml.
 
12:46 AM
I guess I can imagine using sql for a different type of db, but I'm not sure that makes sense to me.
 
Ell
haha I kid, I kid
 
xml is teh shizzle, yo
 
now my Java Calendar item seems to have lost timezone information. This programming thing is hard.
 
Oh I forgot to show these: guess who tops the chart of users with >= 9 prime factors (sorting from lowest user id onwards)?
 
@MooingDuck Nooooooooo.
@MooingDuck Use JodaTime. (I know you can't now, but it's an automated reaction, can't avoid it)
 
12:49 AM
Ok spoiler:
22656: 2 2 2 2 2 2 2 3 59            Jon Skeet
154112: 2 2 2 2 2 2 2 2 2 7 43       Simon Sarris
252000: 2 2 2 2 2 3 3 5 5 5 7        FredOverflow
271616: 2 2 2 2 2 2 2 2 1061         Joshua Ulrich
338432: 2 2 2 2 2 2 2 2 2 661        rg89
383744: 2 2 2 2 2 2 2 2 1499         Radu
383904: 2 2 2 2 2 3 3 31 43          Roko C. Buljan
457812: 2 2 3 3 3 3 3 3 157          nil
467968: 2 2 2 2 2 2 2 2 2 2 457      Neil
501696: 2 2 2 2 2 2 3 3 13 67        blackbelt
511488: 2 2 2 2 2 2 2 2 2 3 3 3 37   bikey77
 
@sehe what happened to Dharmavir?
 
Obviously, Jon Skeet is the only one who manages 9 prime factors in a 5-digit number
 
lol
 
@MooingDuck Mmm Looks like I pasted the names a little bit too much to the left.
 
@sehe I've never seen a "paste" that could do that.
 
12:51 AM
Yup: 1024000: 2 2 2 2 2 2 2 2 2 2 2 2 2 5 5 5
@MooingDuck Meet vim, the awesomest of editors.
 
@sehe and part time operating system
 
@MooingDuck Your confusing it with Emacs now
 
@MooingDuck No, that's emacs.
 
@MooingDuck Unlike emacs, which is a ful-time OS.
 
er, right. whoops. I have vim :(
so much fial
 
12:52 AM
"fial", yeah.
 
know what? I'm going home. I can't take that much fail
 
@MooingDuck Yeah. Take your fial with you
 
fialure is temporary, remember that.
 
@keith.layne Don't return a reference to a fialure then
 
12:54 AM
@MooingDuck you've inspired a new(?) meme
psyduck goes well with it
@R.MartinhoFernandes I can't imagine what is in that picture.
 
It's a shipment of fial.
 
it looks like king kong sitting on a decrepit fire truck
 
There, I fixed it. Darn Dharmavir. Excessive use of prime factors. What a show off
http://pastebin.com/b2P7rAiq
 
what (roughly) is the highest user ID now?
 
Ell
over 9000
 
12:59 AM
@R.MartinhoFernandes Doesn't make you very special though:
398: 2 199                                    Tarks
6782: 2 3391                                  Alnitak
43786: 2 21893                                Nicholas
46642: 2 23321                                R. Martinho Fernandes
60682: 2 30341                                David Stratton
67258: 2 33629                                ThePower
88558: 2 44279                                Lucero
97082: 2 48541                                Fujiy
127606: 2 63803                               Jarede
 
Twice a prime is the best primality.
 

« first day (643 days earlier)      last day (4304 days later) »