« first day (356 days earlier)      last day (4585 days later) » 

12:00 AM
@Maxpm Really? I've always thought some of it is quite Math intensive - but not in a classical way; as in trying to work out a top heavy fraction -> mixed number calculator: people can do it in their heads quite fast and easily, but for a computer the actual code is like (if x = numerator of fraction y= denominator, a = mixed number, b = numerator of mixed number, c = denominator of mixed number) a=(x-(x%y)/y), b=x%y, c=y
 
but elegant I mean a semantically cohesive one
Kian you would be a good candidate for my computer => math course
 
@CaptainGiraffe Basically, I pull an XML feed from a server with version, md5 hash, and download url in it, parse it, compare the versions of the program and the update, if newer; download it, then work out MD5 compared with the one in the feed, if they match, run it and update, deleting the updater on the next run, if the hashes don't match, then ask the user if they want to retry the download
I added a little "state" var so I could pull that from the updater thread and give the user a commentary on what's going on
@CaptainGiraffe What does it entail? :)
 
really http + you?
 
@CaptainGiraffe What do you mean?
 
roy fielding has a very applicable paper for you
you dont need to reinvent the wheel
 
12:07 AM
@CaptainGiraffe I know but all the solutions I found just seemed over complicated and I would prefer to have full control of code I know well
 
@CaptainGiraffe No - C#
 
kk , to me it seems like you are reimplementing the http protocol
any bpel or any other struts you need to pull?
 
@CaptainGiraffe Ohh nonono, I'm using the WebRequests & Responses in the System.Net namespace reimplementing http would be crazy
 
A good understanding of http would help you immensly
 
12:15 AM
@CaptainGiraffe Why?
 
You said I added a little "state"
If you knew what happened in the communication
 
@CaptainGiraffe Ah, by that I meant a state of the updater as a whole e.g. Loading, connecting to the server, downloading, verifying, done
 
Yep no objections there
Still no respect for the http protocol
 
 
1 hour later…
1:40 AM
@FredOverflow LEGO NXT-G was my first programming experience, if that counts for anything.
 
1:55 AM
 
2:13 AM
anyone here use netbeans? it's acting odd :(
i went to create a c++ application and i hit finish and it does nothing and it's as if i never clicked it
which is odd, because i had created a sample one from the built in samples and everything was fine
and now i tried the same thing and it also won't create it
 
what does ssh have to do with some remote drive thing? :P
 
i've already uninstalled and reinstalled
 
@cHao Exactly.
 
anyone have any ideas as to what can be wrong?
 
I haven't the slightest clue.
 
2:20 AM
wtf
and now it works
move along
nothing to see here
 
Well okay then.
 
2:37 AM
Do you believe there is a difference between skills and talents?
 
3:02 AM
yes, at least connotationally. usually i use "talent" when i mean either something that you do so well that you make it look easy, or it actually is easy for you. a skill is something you're good at, whether you had to work hard at it or not
 
@cHao I like that definition.
 
 
3 hours later…
7:04 AM
Just browse through this author's list of published books: amazon.com/Steve-Holzner/e/B000APQL44/…
The guy is an expert in everything.
 
7:17 AM
22
Q: Please remove the s/!/?/ title filter from Metaǃ

TimIf I write a post with a title ending in an exclamation mark, it gets replaced with a question mark. That makes sense for Stack Overflow, but less so for MSO, since posts here are not necessarily questions. Please disable that filter for the metas, or at least don't apply it on the second try.

This must be the silliest feature in here.
 
> I recommend using '‼' U+203C DOUBLE EXCLAMATION MARK instead‼ The more, the merrier‼‼‼‼
I feel totally safe around that comment.
 
That's a well known work isn't it?
 
Only 80 bucks.
 
7:38 AM
So the program segfaults, I'm going to run it in the debugger right?
How odd, it doesn't seem to segfault.
Then for whatever reason I decide to do unrelated stuff.
At some point I notice the fan whirring and I figure it's dumb to let the program run when it's doesn't appear to be doing anything.
So I interrupt and print a backtrace.
Whoops, 770 frames deep and my system is thrashing.
 
7:55 AM
Anyone know any good signal/connection library?
boost.signals2 takes so long to compile
I've gotten tired of it.
 
8:38 AM
> "Standards and Practices" are simply conglomerations of tribal knowledge found to be useful in the majority of cases. Like school, they are a good base to use as a jumping-off point but they often don't live up to the requirements outside of their least common denominator domains. - The Architect
 
8:51 AM
@IntermediateHacker Poco has events and notifications
 
9:05 AM
Boost.Format is slow!
Or something.
 
It is.
 
9:36 AM
@KianMayne what if the update fails? Can you end up with a half-installed non-working program? And how do you handle permissions? (since your program will likely be in program files where processes do not normally have write access).
@RMartinhoFernandes what's karma?
 
It's an offshoot of Boost.Qi Boost.Spirit focused on formatting.
As you can see Spirit has a Qi and a Karma subcomponent.
I didn't notice there's a Lex too now.
Better summary: Boost.Spirit is an "LL parser framework represents parsers directly as EBNF grammars in inlined C++."
Karma is part of that framework and is more concerned with the opposite of parsing, i.e. going from code to output.
 
10:03 AM
@RMartinhoFernandes the "you might also be interested in" links on that book of random numbers are genius
"Red Bull Music Academy"
I can only think of one way to associate random numbers with a music academy and it's not a compliment...
 
0
Q: Using Bridge Pattern and Abstract Factory

user320632While building an understanding of the Bridge Pattern, I came up with the following example to explain Bridge //File: Car.h class Car { enum CarType { Ferrari = 0, Mercedes }; class CarImpl; public: virtual void info(){ //empty } protected: CarImpl *m_impl; }; //File: CityCar....

 
Oh noes, the SportsCar example!
 
10:21 AM
My favorite is the Cow inherits Animal example.
Where the Cow says 'moo' polymorphically.
 
room topic changed to Lounge<C++>: Where the Cow says 'moo' polymorphically [c++] [c++11] [c++-faq]
 
@StackedCrooked what does the Animal say?
 
@AlfPSteinbach It says: "Error: Should not come here!"
 
"Animal Sound Here" in high-pitched voice.
 
I often find that pure virtual functions require a dummy implementation in order to fix linker errors. Is this normal or am I doing something wrong?
 
10:33 AM
The updater thread executes the new installer, and the installer requests the higher privileges. As for the failed update, I don't know, I might just leave it as it is and if there is a sudden power loss, let them deal with it by uninstalling and reinstalling from the download page.
I know that's not exactly great, but my other option would be to write an update monitor service, and seeing as this is a prototype, I've decided not to bother for this version
 
@StackedCrooked Sounds like something wrong.
 
@RMartinhoFernandes Whenever I see graphs like that I always end up looking at them upside down and thinking the biggest one is the better one
 
A werewolf is a polymorphic wolf.
9
 
@KianMayne my point was just that the reason people say auto-updaters are difficult is that the requirements usually include correctness (including atomicity in the face of failure). ;)
 
@jalf Ahh, sounds like a challenge...I'll build the service
But not until I've done the rest of the program
 
11:15 AM
Woo, I'm all over the starboard today.
Pretty quiet today.
Where's everyone?
I'm bored. Entertain me.
 
I'm quiet because I'm slacking hard and I will keep on slacking.
 
it is usual for learner as he learns by some computer language , he looses interest in learning that?
i am loosing my interest day by day lol
 
Er, not everyone finds every topic as fascinating.
 
In the language itself, or in using the language?
I've had fun learning the ropes of some language but without a project to use and learn more I never got beyond the basics.
 
@LucDanton learning deep parts of it and using it
 
11:25 AM
It's usual if it's Java.
 
its nothing that i don't like making projects etc , even made some , but it's just i am loosing
 
Ah well, even after periods of relative uninterest I always eventually come back to writing code, which means using some language. So in the large scheme of things I keep learning languages, just not in any particular order.
 
Find a language that's more fun, then.
In a different paradigm, maybe.
 
I love watching movies these days rather than programming ( i am scared of my this behavior )
 
Scared? Why? Are you watching horror movies?
If it comforts you, I've spent the last few weeks watching movies too and doing very little coding.
 
11:30 AM
nah scared (not in strict sense) because i am loosing interest
 
Do you have friends that like coding too?
 
no one in my local
only on SO
 
do what you find interesting. Nothing else makes any sense. If programming bores you, then don't do it. If you want to program, and find the things you're currently working on to be boring, then come up with something less boring to program. :)
And if you feel like just watching movies, then go and watch a movie.
 
hey guys
the university found my PROLOG coursework
I got 90%
now I passed the second year, and enough to carry on my Master's too
 
@DeadMG Nice work! Well done man
 
11:40 AM
@DeadMG congrats professor :)
 
I mean, 90%, wtf
 
@DeadMG "found"? Had they lost it?
 
yes
they entered the mark for the wrong student
so I got a 0, and failed the module
but actually, the error was corrected, and now I'll pass that module quite easily
 
And the other guy flunked?
 
@DeadMG isn't that good?
 
11:42 AM
no, he just didn't need to resit it
that's why the tutor said it was dumb that the system hadn't caught the error
because the other guy wasn't even sitting
 
@DeadMG How did you pull that off? :D
 
He cheated.
 
hey
I'm a Genius™
 
@LucDanton it's been long time learning c++ for me , and I never switched to another languages , could be possible reason
 
He pestered the university staff so much they gave him 90% just to shut him up.
 
11:45 AM
wrote a prolog program to work out what the correct answers to the test were :)
 
@jalf Then a 90% well deserved ;)
 
that's exactly the kind of thing prolog was designed for!
 
I now have to write Java for "Computer Graphics" course.
 
@CatPlusPlus ew
 
11:45 AM
Pretty much.
 
My "Computer Graphics" course was sensible.
 
I'm trying to figure out how to use GridBagLayout.
 
that's like a... bag of grids?
 
More fitting name would be ScumBagLayout.
 
:)
I like the layout managers from XUL.
 
11:46 AM
@jalf It's a layout for a bag of grids.
@CatPlusPlus Make a singleton factory.
 
Why are all examples fucking applets.
 
Maybe you are browsing porn sites and didn't notice.
 
Yes, Java code is my favourite brand of porn.
 
by the way
 
Rule 34.
Maybe I shouldn't have said that.
 
11:49 AM
here's another Tale of Rofl™ from the Book of DeadMG™
got an email from StackOverflow claiming I was one of it's top users ever
 
@DeadMG Are you getting into the god/prophet business?
 
yeah
 
No, he's just gone corporate.
 
@DeadMG Your profile says "top 0.26% overall".
 
javax.swing.BorderFactory.
;_;
 
11:52 AM
lol
 
@CatPlusPlus Be happy that it's a single pattern and not a pattern orgy.
 
I've added borders and there's still no sign of my components anywhere.
Ah, of course.
Why would you make possible to add things only to the layout.
No, they also have to be added manually to the parent container.
That's more enterprisey probably.
 
That makes no sense.
 
Now to figure out how to tell the bloody thing to use the entire window, not 10x10px area in the middle of it.
My rambling or the API?
 
EntireWindowBridgeAdapter?
 
11:56 AM
Because I can agree with both.
There's size, there's minimum size, there's preferred size, and I never know which one is actually being used this time.
And, of course, setSize has (int, int) overload while the rest only has (Dimension).
Makes sense.
 
grrrr
I hate DYNDNS
and NAS servers
meh
 
There's no size on the layout, and changing the size of its parent apparently has no effect.
 
For the record, I mentioned porn 10 minutes ago.
Hi @Tony.
 
I thought he reacts on Haskell now?
 
@RMartinhoFernandes oh hai
 
12:00 PM
Nah, that'd be silly.
 
Going to go to a party now
Wooo
Bye
 
you mentioned pr0n?
 
@KianMayne Have fun!
@TonyTheLion Yes, it's actually starred now.
 
I'm going to work, and then we stay in work and have another LAN party.
 
12:02 PM
1 hour ago, by R. Martinho Fernandes
A werewolf is a polymorphic wolf.
???
 
It's a wolf with many forms.
 
i don't get it.
Oh i see now.
class control : object
{

public:
    control();
    virtual ~control();

    void show() { ::ShowWindow(_hwnd,SW_SHOW); }
    void hide() { ::ShowWindow(_hwnd,SW_HIDE); }

    void create();
    void destroy() { ::DestroyWindow(_hwnd); }

/*Ugly WinApi Code... Try To Ignore It. */
protected:
        HWND         _hwnd;
        const char*  _class;
        DWORD        _exStyle;
        const char*  _windowName;
        DWORD        _style;
        int          _x;
        int          _y;
        int          _width;
Is this good code?
or is it just crap, as usual?
 
Do you really need object base?
 
Hi help!!
 
@CatPlusPlus It handles all the signals and events.
 
12:07 PM
Apparently in Java function names and variables can be the same, obviously bad practice but how :S
 
And why do you have create and destroy, this is ctor/dtor's work.
 
I can't just accept it...and move on. Why does C++ not allow the same names for variables and functions?
 
@CatPlusPlus Oh, sorry. Thanks I'll correct it.
 
@LewsTherin Because of function pointers.
Besides, it's silly.
 
@LewsTherin class C { void operator()(void) {} }; C C; std::vector<C> v; v.push_back(C());
 
12:08 PM
I agree with @CatPlusPlus giving the same name to functions and variables is idiotic.
 
@Cat what is that? @IntermediateHacker I know
as I said bad practice but why...
does Java allow it @Benoit ?
 
don't know
 
What does that do
 
@LewsTherin You can use a function name to get a pointer to that function.
 
the code you posted
 
12:10 PM
@LewsTherin that code is invalid.
 
@CatPlusPlus oh why would anyone want to do that?
@Benoit so why did you post it? lol
 
@LewsTherin because of this:
typedef signal boost::signals2::signal<void (object&)>;

class object
{
public:
    signal create , destroy , command;
create.connect(myfunct)
 
Why wouldn't anyone want to do that?
 
is way better than create.connect(&myfunct)
 
I only know few silly languages where you can't pass functions around. And Java is one of them.
 
12:12 PM
@IntermediateHacker can you use another example? Simple perhaps, I can't read that
 
@CatPlusPlus Not to mention it doesn't support operator overloading.
 
That's a minor thing, really. It can be annoying but it's not the most annoying thing about Java.
 
?
Another example please :(
So because we can get the address of a function, the compiler doesn't know whether we want the address of a function or variable
 
sorry. can't find a good example
 
No problem, but is it because of that ^^
 
12:16 PM
yup.
 
Ok I can live with that then...thanks.
This function pointers stuff is it known as functors?
 
@LewsTherin never , ever use function pointers.
 
why? People use it in C or C++, I don't know how to use it anyways xD
 
they are hell to work with ... and to debug
use boost::function instead
 
I am not surprised.
 
12:18 PM
or std::function if using c++-11
 
ok thanks... I guess I have to learn all this sometime
I don't see the point of knowing where a function is in memory though
 
Pointer is just an implementation detail. The important thing is the possibility of an indirect call at the runtime.
 
just a baby moose :)
 
Swing apparently did not develop the notion of padding.
Why am I surprised.
 
I have to learn Swing as well,yikes, so tired
 
12:24 PM
10 years ago we had Steve Jobs, Bob Hope and Johnny Cash - Now we have no Jobs, no Hope and no Cash.
8
 
@TonyTheLion nice, lol
 
Aw, screw that. I don't have to do it for another month anyway.
 
sbi
procrastination is like masturbation.. it feels good while you are doing it. but in the end you are just fucking yourself
As always, Debbie has the answer to that.
 
12:27 PM
ha ha
 
@sbi And just this morning.
Weird.
 
Debbie is a seer
 
I thought she was just a bitch.
 
the irony
 
she is a hot bitch and a seer
 
sbi
12:38 PM
@RMartinhoFernandes Yeah. Surprisingly, I find it very often in her, that what she (or whoever is behind that account) says fits something in my day. I suppose it's because her sayings are often relevant. (I really don't like her flirtations with the porn-style image of women, though. But the rest of it is worth it, so far.)
 
@sbi I guess that's just the Bader-Meinhoff effect.
 
@sbi Just a picture of her is worth it lol
 
sbi
@RMartinhoFernandes ??
@LewsTherin ??
 
sbi
@RMartinhoFernandes What is the "Bader-Meinhoff effect"? Got a link?
 
12:41 PM
Arrggh, spelling seems off.
 
@sbi It's only tangentially related to the gang.
 
@Sbi I meant what I said lol
 
Oh, wait, turns out that thing is bullshit.
 
sbi
@RMartinhoFernandes Well, I found a link, and I think this indeed applies.
I wonder how it got its name, though.
Oh, and the name is "Baader", BTW.
 
I can't find any decent references anywhere.
There was at a time a wikipedia article that got deleted for that same reason: en.wikipedia.org/wiki/Wikipedia:Articles_for_deletion/…
 
sbi
12:46 PM
@LewsTherin There's her profile pic and two others, only one of which shows a human face. So I still have no idea what you refer to.
 
@sbi IIRC whoever named that one day heard of the Baader-Meinhof gang and later that day heard the name again.
 
@sbi what other faces does she have? I hate twitter can't use the thing
 
And there's a gazillion "Debbie Howard"s on the Internet.
 
sbi
@LucDanton Likely. BTW, this is a pretty good reference.
@LewsTherin I give up. I have again no idea what you are talking about.
 
@sbi what other faces?
 
12:49 PM
Oh gosh.
 
aww never mind
 
It's an eerie phenomenon when it happens but if I compare the number of times I learned of an obscure fact and didn't hear of it for some time to the number of times the phenomenon happened I figure it's more than fair.
 
@LucDanton Shh, keep your statistics away from this.
 
@LucDanton sure...
 
@RMartinhoFernandes I can now use R to display stuff!
 
12:51 PM
I envy you. I never made the final push to finally learn R.
 
it is like, first you hear about elderly person driving in wrong direction for 80 miles. then later in the day you hear about another one. then in the evening, yet a third one, all at very different places, but with the same last name. how unlikely is that? it's the Triply REpeated Name Coincindence Hit, or TRENCH.
 
Well, all you really need (after a tutorial or two) is the reference for the language so that you can a) load whatever data b) display it. The runtime/libraries do all the work, the language is really glue.
 
@AlfPSteinbach Maybe it was the same person, and they spent all day driving in the wrong direction.
@LucDanton Ah, ok. However, when I say "learn R", I really mean "learn stats and use R".
 
My knowledge of stats (which maps to 'what I care about') is a) make a fit b) correlate c) display population. And that's stretching the meaning of 'knowledge'.
For instance I couldn't tell you why a linear fit is worse than a least square fit or what kind of error is involved.
 
This message was rendered irrelevant.
 
12:59 PM
I've never needed to use R
 

« first day (356 days earlier)      last day (4585 days later) »