« first day (375 days earlier)      last day (4576 days later) » 

user784668
5:00 PM
@sbi: what if someone asked for a bad book?
 
sbi
@bamboon Do you? Well, I think it tells a lot about you whether you were born 10, 20, 50 or 100 years ago.
 
evening nubs
 
what matters is what you say and do
 
Hopefully, it will go unnoticed what with only 6 points and all the other good info before it.
 
sbi
@Fanael Then all his books would fit. That was a question about good books, though.
 
5:02 PM
I don't see anything fun in birthdays.
 
Presents!
Oh wait... I never get anything decent.
 
no, birthdays only remind you that you're one year closer to death
 
Birthdays depress me.
0
Q: How do I make an easy-to-update makefile?

MaxpmMy makefile looks something like this: FOO_OBJECT_FILES := $(OBJDIR)/Foo.cpp.o BAR_OBJECT_FILES := $(OBJDIR)/Bar.cpp.o $(OBJDIR)Bar.c.o ALL_OBJECT_FILES := $(FOO_OBJECT_FILES) $(BAR_OBJECT_FILES) $(BINDIR)/Foo.a: $(FOO_OBJECT_FILES) # Rules for making a static library out of Foo's object fi...

 
I find them mostly irrelevant
 
@Maxpm Make it self-modifying!
 
5:03 PM
unless people give you cake
 
Ew, oneboxing doesn't even try to format code.
@RMartinhoFernandes Oh God.
 
how would you pass on whether an operation was to add or subtract? Just make an enum I guess?
 
Skynet will be born not in the Network, but in makefiles.
3
 
@TonyTheLion Pass one or minus one and multiply?
Oct 20 at 0:08, by R. Martinho Fernandes
(Though it could be made scarier: make that a recursive, self-modifying Makefile, and you've got yourself a Makefile with a sanity breaking potential that rivals that of an Old One.)
 
@TonyTheLion What do you mean?
Ooh, how do you quote?
 
5:04 PM
You just paste the link.
 
@TonyTheLion I inherited personally
 
Oh, that's convenient.
What a nice question.
 
user784668
@RMartinhoFernandes: +1 for * {-,+}1.
 
user784668
@Maxpm: it's wonderful!
 
I need to stop watching Futurama
 
5:06 PM
No, you don't.
 
yes, I do
 
Didn't you finish that already?
 
I have to have part of my final year project in soon, but I didn't attend the lectures because of the registration wtfs
just today, actually
 
yeah, but I missed the movies
 
5:08 PM
Sigh.
 
it's confusing because sometimes they're listed in production order, and sometimes in air order
so you think you have 6 seasons and it's all good, and then you notice that they don't quite match, etc etc
 
@DeadMG You need to find better pirates.
 
meh, it's all good
by "it's all good" what I mean is "I wasted nearly a week of utterly crucial time and fell behind on just about everything imaginable, even compared to how behind I was before."
 
(My ex-roommate kept complaining about pirates not taking care about those details. He even had a list of pirates he deemed "trustworthy" or something.)
 
also, I made myself totally sick
again
 
5:11 PM
You ate junk food again?
 
it's hard, I live within like five minutes of a massive supermarket
and it's difficult to eat yoghurt all day every day for the eleventh month in a row
 
There's nothing else you can eat?
What about normal food, like rice, or meat, or fish, or vegetables, or whatever rocks your boat?
 
eh
not really
eggs
i guess
 
That's not really much.
 
the trouble with normal food is that it includes lots of things
so when it makes me sick, how could I possibly narrow down what the cause is?
at least with junk, I know I'm eating too much of the stuff
 
5:16 PM
Right.
 
the fundamental problem is that I'm bored out of my tiny little skull
I had an algorithms analysis lecture and it consisted of solving equations like "n^3 + n^2 > n^3"
 
and "What's smaller, log(n) or log(log(n))?"
 
I wish I was bored with stuff like that
 
I don;t
 
5:23 PM
So you'd rather be struggling with stuff like that?
 
at least it wouldn't drive me to stuff myself with food that makes me sick just for fun
 
How can you not be bored with stuff like that.
 
@DeadMG I never get sick, I do that all the time...
@CatPlusPlus bored with?
 
Once you learn to compare and solve equations, doing it manually is silly and a waste of time. We have computers for a reason.
 
To make calculations that help humanity progress.
 
5:25 PM
@DeadMG Well 2+2= 5 for very large values of 2.
 
lol
 
Solve quadratic equations for greater good!
 
so anyways
I'm mighty bored
 
What happened to WideC?
 
@CatPlusPlus There are quite a few statements (predictions in the 1984 sense) made in Farenheit 451 that would disagree with you.
 
5:27 PM
well
I realized that it would take a billion decades to implement
 
@CaptainGiraffe Eh?
 
That's a lot of decades!
 
well, comparative to something like C++, it would probably be a cakewalk
but for a one-man team
 
sbi
@CatPlusPlus Although we should probably measure it in billennia, rather than decades. As in "ten billenia."
 
5:29 PM
@CatPlusPlus Let me expand. 451 is about censorship, the 451 degree firemen burn all the books they can find. In the end they have each all memorized one important book.
 
@CaptainGiraffe Thanks for spoiling it.
 
Not the firemen, but the firemen survivors
 
Some people here do read.
 
@CaptainGiraffe Okay. So?
 
also I need to work on my complaint to the University
 
5:30 PM
@RMartinhoFernandes Sry, It's still a very good read, and they differ quite a lot between editions.
 
sbi
@RMartinhoFernandes It's still a good book to read if you can ignore that its age is showing.
I want to scare programmers for Halloween. How do I dress up as shared global mutable state?
 
@sbi I'm good at that :)
@sbi He means a singleton?
 
0
Q: Enforcing method order in a python module

shadowlandWhat is the most pythonic way to deal with a module in which methods must be called in a certain order? As an example, I have an XML configuration that must be read before doing anything else because the configuration affects behavior. The parse_config() must be called first with the config f...

 
sbi
@RMartinhoFernandes If you can bear reading Heinlein or Lem, 451 is an good read.
 
@CatPlusPlus "So?", well just a contrast to "we have computers for a reason"
 
5:32 PM
@CaptainGiraffe I don't see how that's related to doing tedious equation solving.
 
@CatPlusPlus "enforcing method order" sounds like a terribly misguided idea.
 
we do
it's pretty damn hard to censor digital information
the stuff replicates like a virus
 
@CatPlusPlus Well I do. Please take it one more step.
 
sbi
@RMartinhoFernandes A singleton is a "shared global mutable state wrapped in a pattern". That's worse, even!
 
once somethings on the Internet it's never getting off
 
5:32 PM
@RMartinhoFernandes It is.
It's a separate init method in disguise.
Only working on a global state.
 
@DeadMG like wikileaks!!!
 
@CaptainGiraffe No, I really don't get the connection.
 
OMG stop saying "global state"!
You're scaring me.
 
Don't read between lines when there's nothing there.
 
@sbi Unfortunately, dressing like that would not scare every programmer.
I think not even the majority.
 
sbi
5:34 PM
@RMartinhoFernandes Global state! Global state! Global state! Global state! Global state! Global state! Global state! Global state! Global state! Global state! Global state! Global state! Global state! Global state! Global state! Global state! Global state! Global state! Global state! Global state! Global state! Global state! Global state! Global state! Global state! Global state! Global state! Global state! Global state! Global state! Global state! Global state! Global state! Global state! Global state!
 
You could dress like OpenGL 1.1.
 
Avra Kadavra everyone :)
 
@RMartinhoFernandes You're just not at my stage of disappointment with the global world mechanics.
 
@sbi Wow, you really hate me.
 
sbi
@RMartinhoFernandes As a robot you should be able to endure some scare. :)
 
5:35 PM
@RMartinhoFernandes I'm pretty sure sbi is joking
I snickered a little at least.
 
I am the greetest!
 
No one greets more than you?
 
I excessively greet for no raisin
 
@CaptainGiraffe Don't worry, I wasn't seriously thinking that either.
 
can I as question :)
 
5:37 PM
No you can't dress as a question.
 
@sbi Isn't that just showing up alone. (Singleton=)
 
*ask :p
 
@legion u can not has question
 
user34537
Do Singleton make you wet your bed?
 
Is there a cat pic of that?
 
user34537
5:37 PM
Singleton are my nightmare
 
@acidzombie24 No much worse
 
I will ask it anyway :)
 
I could never get why people are asking whether they can ask a question.
 
user34537
A sure fire way to make me angry is someone mentioning singletons without saying its horrible wrong etc.
 
user34537
My peeve is when they say its a good idea or that it has a use
 
5:39 PM
singletons!
they're the greetest!
they greet every method
 
Singles FTW!!!
 
Mingletons! Fingletons!
 
Since std::vector is supposed to be contiguous and if I get its iterator like std::vector<whatever*>::iterator it = m_vect.begin(), and then if I get a pointer to the holding member of it like whatever* test = *it; why i cant move trough elements with test++;
 
Well, you can.
 
Well the this pointer is also a singleton, albeit in a very limited scope. I think modularity needs to get some credit here =)
 
5:40 PM
(In fact the iterator is probably just a pointer in a release build.)
 
But you shouldn't.
 
i just tested. and it does work :x
 
Use iterators.
 
@CaptainGiraffe A singleton is a class.
 
no, no, you're all blind morons
 
5:41 PM
What?
 
user34537
Has anyone found a use of setjmp?
 
NO U.
 
:0
 
whatever* test = *it; yields the pointer
as in
 
@acidzombie24 Faking exceptions in C.
 
5:41 PM
if it was a pointer to an array, then incrementing test would iterate through that array
 
@DeadMG No, it doesn't.
 
@acidzombie24 It's UB-inducing in C++.
 
It gives a reference.
 
the vector is a vector of pointers
 
Oh, dammit.
 
5:42 PM
You should use iterators anyway.
 
@RMartinhoFernandes no for sure not?
 
you cannot iterate through the vector with test as it was defined above
 
user34537
@RMartinhoFernandes I dont think i would ever fake an exception in C with setjmp. What else do you got
 
We're all blind morons.
 
yes
 
5:42 PM
I didn't say it's good!
 
you would need whatever** test = &*it;
 
You did!
 
OK thanks. I just wanted to know why, because it looked like a good idea ;o
 
@CaptainGiraffe Yes, it's a class that can't have more than one instance, and provides a global point of access to that instance.
this is not that.
 
Pointers are not a good idea, unless proven otherwise.
 
5:43 PM
well
I merely wanted to prove that you're all blind morons my good friends!
 
@RMartinhoFernandes Ahh, there we go. Please describe the difference to a this pointer.
 
xD
 
now that my work is done, I'm going to go and make myself sick again
 
@CaptainGiraffe The this pointer is not a class.
 
@CaptainGiraffe It's not even remotely global?
 
5:44 PM
@DeadMG Yes my argument is about locality
 
singletons are global. this is local. therefore, this is most assuredly not a singleton.
 
user34537
I wonder when the next good programming language will come. Like... one that doesnt suck
 
Keep wishing.
 
user34537
@DeadMG lol
 
Or use Haskell.
 
5:45 PM
when I finally get around to making it
that's when
 
It is a very newlyfounded argument so I might be wrong. So why limit yourself to application scope, surely software should be reusable
 
it's incredible power, flexibility, and safety will crush your puny mind
 
@StackedCrooked D&E is a very interesting book. You can read it front to back, or just skip to the chapters that you find particularly interesting. It works both as a train book and as a bed book. Definitely worth the money.
 
In the context of a one class app, this is a singleton.
 
5:46 PM
no
 
It's not a class.
 
possessive apostrophe
 
Singleton is a name of a specific pattern.
 
A global is not a singleton.
 
it's a perfectly valid apostrophe, you blind moron
ahem
I should really find something else to replace that
 
5:47 PM
@acidzombie24 Bjarne has a comment on that on the lines "If nobody thinks your language sucks, it is not useful"
 
@DeadMG Can you do that?
 
@acidzombie24 Does C suck?
 
@RMartinhoFernandes What would be the difference in an agnostic fashion? please
 
@CaptainGiraffe A singleton is a class. A global is an object.
It's a category error to say a certain object is a singleton.
 
@RMartinhoFernandes Well a Class.pleaseGiveMeTheGlobal():Global
 
5:49 PM
Just because there is only one instance of it, it doesn't make it a singleton.
 
If you reinvent the definition behind singleton, the name becomes useless.
 
@RMartinhoFernandes Yes indeed I can
 
What makes it a singleton is that you go to great lengths to prevent the creation of other instances.
 
What other caveats are there?
I'm fairly confident the OS does not create duplicates of global app data unnecessarily.
 
user34537
@Captain thats a funny line. Why did he say that? Or when? I am going to google that
 
5:52 PM
@acidzombie24 Ok, If you dont find it I can try. I'm pretty sure its on his home page
 
user34537
@RMartinhoFernandes: If your preventing another instance you are in fact doing something wrong
 
room topic changed to Lounge<C++>: Days without Singleton incidence: 0 [c++] [c++11] [c++-faq]
 
Thanks Fred, I can exhale now =)
 
Inciden*t*.
 
As long as we are discussing super important topics: should I have a space between the int and the star in a pointer-to-int?
 
sbi
5:53 PM
@CatPlusPlus But a pointer pointing into an array is an iterator!
 
room topic changed to Lounge<C++>: Days without Singleton incidents: 0 [c++] [c++11] [c++-faq]
 
Singleton (in room topic) -> some kind of C++ tonic?
 
user34537
@Captain: I googled "it is not useful" +language "Bjarne Stroustrup" with no luck
 
int* star; everthing else is just plaing wrong in C++!!!!!
 
sbi
@FredOverflow You are boring. Booooooooooooooooooooooooooooring.
 
5:54 PM
@sbi Because I corrected myself?
 
user34537
@FredOverflow aww, the other topic was better
 
@acidzombie24 Try from here www2.research.att.com/~bs/
 
sbi
@FredOverflow Because this tagline if booooooooooooooooooooooooooooring.
 
that's even too much boring :D
 
sbi
room topic changed to Lounge<C++>: std::make_love() [c++] [c++11] [c++-faq]
 
5:55 PM
@sbi cool topic :D
 
come on at least show std::generate some love
 
sbi
22 hours ago, by Cat Plus Plus
std::make_love.
Not my idea.
 
user34537
@Captain my google fu shows nothing
 
std::generate( room.begin(), room.end(), love() );
 
@sbi but setting it on room topic was your atleast , i'd love to see std::make_love in next version of gcc
 
5:57 PM
@acidzombie24 Might be under the FAQ or it might be an interview.
 
sbi
@CaptainGiraffe I'm afraid that would count as an orgy for the meta police. And we don't want this place raided by them.
 
std::generate( room.begin(), room.end(), liberté_fraternite_egalité() );
of course I missed the unicode e on fraternité
not french so I might be corrected
 
sbi
:1752418 Thank you.
 
What's that?
 
sbi
6:01 PM
@RMartinhoFernandes An animated gif.
 
lol , many went afraid
 
sbi
@MrAnubis Posting animated gifs here is mean.
Actually, this should be written somewhere in the newbie hints. Anyone?
 
Oh, I get it now. It's the Harry Potter BBEG.
 
@sbi why?
 
sbi
6:04 PM
@MrAnubis Because it flickers over everyone's monitor until we've managed to move it up far enough.
 
:D , that's right
 
sbi
I am using AdBlock+, and never see any of those flickering ads. I also don't have a TV. So I'm not used to such intrusion and it makes me mad as hell.
 
You can hit Escape to stop GIFs.
AFAIR, anyway.
 
That's not a GIF!
 
Yup, Escape works.
 
6:06 PM
@CatPlusPlus 0_o , it really works
 
sbi
@CatPlusPlus Did your Esc just replace Martinho's gif with "Blah"? :)
 
lol
 
sbi
Forgot the smiley.
 
@DeadMG Possessive personal pronouns, serving as either noun-equivalents or adjective-equivalents, do not use an apostrophe, even when they end in s. The complete list of those ending in the letter s or the corresponding sound /s/ or /z/ but not taking an apostrophe is ours, yours, his, hers, its, theirs, and whose. (From Wikipedia ).
 
6:08 PM
@StackedCrooked Ha! Thank you!
Grammar nazi wins.
 
It's a horrible rule imo.
 
Every rule is.
 
Except for rule 34.
 
The rule of thumbs is not a horrible rule.
 
@StackedCrooked That one is horrible as well.
 
sbi
6:11 PM
@CatPlusPlus No.
 
Rule 34 is by definition a horrible one.
 
Just think of the horrible things it implies.
 
sbi
Anyway, I'm outta here now. See you!
 
@RMartinhoFernandes Occasionally it is :)
 
6:14 PM
Evening
 
My
Is it cruel to introduce the arrow --> <-- operators for 4% of the score to an introductory c++ exam? =)
 
Oh, come on!
FWIW, I use --> and <-- as real operators (not as combos) on my Haskell pointfree library.
 
the question was along the lines, what does the arrow do? while ( i --> 10 )
 
// Would you consider this an abuse of RAII?
void generate_document(std::ostream & ostr)
{
    HTMLTag html(ostr, "html");
    HTMLTag body(ostr, "body");
    HTMLTag h1(ostr, "h1", "Hello World!");
} // closing tags are generated on scope exit
 
@RMartinhoFernandes Well in Haskell expression evaluation comes easy, for me it does not.
 
user34537
6:19 PM
@StackedCrooked: Looks like a good item (TM) to me
 
Good item?
 
@StackedCrooked I've seen similar abuse with using blocks in C#.
 
user34537
idea* whoops
 
@StackedCrooked No but I dont see the RAII in it.
 
@RMartinhoFernandes So you consider it to be abusive.
 
6:20 PM
Do you really need the tags to be closed in the case of exceptions?
 
user34537
Why not HtmlTag(ostr)("html")("body").("h1", "Hello World");
 
Aaaaaaaaah, the destructor doing </h1> in reverse order? that would be abuse.
 
user34537
oops ignore that stray .
 
Plus, wouldn't that make for possibly throwing destructors?
os << "</h1>" is not non-throwing.
 
@RMartinhoFernandes That's the point I'm trying to get to.
 
user34537
6:22 PM
@StackedCrooked: Is this a real thing or are we talking for fun?
 
It's tempting to use RAII for flow control. But it's problematic if the destructors could throw.
 
Of course, you can use try {/*...*/} catch(...) {} on it, but...
 
@acidzombie24 It's not a real thing. But I have a few real things in the back of my head that are analogous.
 
user34537
havent you heard. destructors should not throw and cant in C++11 (last sentence is a lie)
 
@RMartinhoFernandes Indeed, but then you are suppressing exceptions.
 
6:23 PM
Tell us about those instead =)
 
user34537
@StackedCrooked How do you feel about my method? HtmlTag(ostr)("html")("body")("h1", "Hello World");
 
Please bobince already had his heart attack
 
That would be nice, but I'm trying to make a point about a more general concept.
 
quoting every poet on the planet; and Tony the Pony
 
user34537
6:25 PM
ok but why that style and not this? ;)
 
@StackedCrooked Yes what is the general concept
?
 
The Poco library has a TempFile class. It creates a tempfile that has its lifetime defined by scope.
@CaptainGiraffe Whether it is abusive to use RAII for flow control.
 
@StackedCrooked That makes sense, a temporary file is an OS resource.
 
@RMartinhoFernandes agreed
@StackedCrooked I'm confident we can we have a solution for you in the general case
 
How about a scoped object that sends a notification on destruction. It could be used to implement a progress monitor when executing a set of functions. (Create a scoped object at the beginning of each function.)
 
6:28 PM
Notification on destruction is a difficult thing.
The notified party should presumably have a reference to the notifier
And no not within RAII without ad hoc sequences
You need to implement pre ~ and stuff like that.
 
Actually, that's relating to my hooking question. Bjarne's answer to hooking is creating a proxy object that implements operator-> and allocate a scope object there. This allows you to define a "before" and an "after" action.
However, the "after" action is not really form a resource cleanup.
 
Very different question bu ok
 
The execute around idiom.
 
This is very much moving away from the RAII idiom.
 
Yep, that's an alternative when using something like the decorator pattern. So the conclusion is that RAII should not be used for implementing the execute-around-idiom?
 
6:33 PM
You really need it for Bjarne's approach.
 
Not familiar with the "execute around" pattern/idiom, but yeah. execute around should not be described as an idiom IMO.
 
0
Q: Is it abusive implement the "execute-around" idiom with RAII?

StackedCrookedShould RAII only be used for resource cleanup? Or can I use it to implement the business logic? A while ago I asked about Function hooking in C++. It turns out that Bjarne addressed this problem and the solution he proposes is to create a proxy object that implements operator-> and allocates...

 
Oh, FWIW, even if I consider it an abuse, it doesn't mean I wouldn't use it myself :)
 
RAII is specifically about resources, but ctors and dtors are not RAII.
 
user34537
@Captain are you talking about "sucks" and "useful" i dont see him saying that
 
6:44 PM
RAII is using ctors and dtors for specific thing. Your example is doing the same, but for something else, so it's neither RAII nor abusive.
 
@acidzombie24 That was probably in an interview I can't find even with my extraterrestrial google-fu.
the sentiment is there though
 
user34537
ah ha
 
user34537
@StackedCrooked btw i dont like how you specify ostr multiple times in your html tag example
 
@CatPlusPlus +1 by responding =)
 
It's pseudo code. I don't care.
 
6:48 PM
TortoiseSVN is so resource-heavy.
 
@StackedCrooked why are you so disappointed?
 
user34537
ok cause my way you just store the ostr once, have a stack then everytime () is called you add the tag into the stack. When it cleans up it just pops the stack and closes the tags and worry less about throwing
 
@CatPlusPlus I wish there was a mount ~/my_sources/ to a cvs
 
Tell me about it.
 
user34537
@CatPlusPlus i guess your forced to use svn?
btw does git and mercurial have a important feature the other doesnt have? I assume not
 
6:51 PM
When I work on Windows I checkout my code on a chunk of RAM that was mounted as a drive. This improves performance significantly. I just need to make sure that I commit frequently :)
It not only affects Tortoise, but also code indexing, compilation and linking speed.
 
@acidzombie24 Offline work.
 
user34537
@RMartinhoFernandes AFAIK git and M both support offline work...
 
@acidzombie24 Right, that's what I was saying.
 
user34537
ok i just want to know whats missing :p
 
My bad, I already do that.
 
6:53 PM
Oh you meant to compare git to hg, and not git/hg to svn?
 
user34537
cause i tell ppl both are solid and have no real differences lol
 
user34537
lol not to svn...
 
user34537
@StackedCrooked: How do you do that? mount a drive as ram?
 
user34537
i have a spare gb i might want to use >: -)
 
6:54 PM
So I'm not doing work with 100 people, but just with myself. Is git Hg better for me?
 
user34537
@StackedCrooked: How do you mount ram as a drive?
 

« first day (375 days earlier)      last day (4576 days later) »