« first day (1035 days earlier)      last day (3928 days later) » 

7:02 PM
... Uh oh
Guys.
I... I really think I need a Singleton.
 
no, you really don't.
 
No you dont
 
@ThePhD No.
 
Nah
 
Uh i love how he is being attention whore again
 
7:03 PM
@ThePhD Go ahead.
 
But the Reflection database... that's... essentially a global cache of all types, isn't it?
 
And we are falling for it, again
 
I have to be able to access it from anywhere.
 
Then just make it global.
 
@ThePhD No. Why would I want that? If I happen to be reflecting on more than one program at once, why would they share type information?
pass a fuckin' reference.
 
7:04 PM
He probably would solve that with a bit of thinking
But its nicer that way because you respond in person and he is in the center of the drama
 
@DeadMG ... I didn't think about multiple programs.
 
I am disgusted
 
@ThePhD The entire purpose of the Singleton is to forbid multiple uses. If you don't know why multiple uses should be forbidden then you definitely don't have any kind of excuse or reason to use one.
 
@BartekBanachewicz ever made a platformer?
 
Came to tell ya my head aint hurting anymore after the shitload of pilla i took
 
7:05 PM
@BartekBanachewicz I prefer drama queens to racists, personally.
 
@Pawnguy7 nah, i dont recall myself making one. Should i?
@DeadMG i have nothing against people of other race
 
@DeadMG Well, since it was going to be global to the assembly and I figured I'd only need one, I thought a Singleton would actually work well for this case.
 
But since I could be reflecting multiple libraries or programs, that doesn't really hold water anymore I guess.
 
I FOUND IT
I FOUND THE BUG
 
7:07 PM
yay I think I just built boost with mingw
 
Good job
 
@ThePhD Plus, offhand, I can't think of a useful key type you could use.
 
@CatPlusPlus congratz !!!
 
@A.H. Your skill in typing b2 is amazing.
 
@CatPlusPlus What? There's only one?
 
7:07 PM
@CatPlusPlus 'Grats
 
@MartinJames YES
newUserSubscription.ValidFrom = lastSubscription != null ? lastSubscription.ValidTo : DateTime.Now;
Cool assumption
 
@CatPlusPlus Thank you , was touch and go for a while but I finally managed
 
@CatPlusPlus What.
 
Well, umm.. tentative congratulations...
 
@CatPlusPlus So it's either valid from the last subscription's end-date, or right now?
That seems... pretty awkward.
 
7:09 PM
@CatPlusPlus you'd be amazed with the amount of problems people here can spawn. We're like a walking and living instant worst-case scenario.
 
That'd be valid if last subscription was always expiring on the period before the current one.
But right now it can be expired in 2012 and it'll happily give you one month in 2012.
My life is a worst-case scenario.
3
 
@MartinJames it's just used to construct exception messages, they don't have a huge effect.
 
@CatPlusPlus So a check to see if the lastSubscription's ValidTo is already passed should be in that check as well, then?
 
Ah.
 
7:11 PM
I already fixed that code elsewhere, but COPY PASTE IS VERY GOOD METHOD OF PROGRAMMING GUYS GUYS GUYSU GSUDsdAJFSD FAKSUD Fzvsc z
 
@DeadMG A key type for each program / assembly?
 
@CatPlusPlus wth is this null ? its NULL or nullptr
 
It's null.
 
.NET has Assembly.FullyQualifiedName and all that stuff.
 
C# doesn't have bazillion nulls.
 
7:11 PM
@BartekBanachewicz I have no preference. I had some ideas for some, but I doubt I am capable. I really should finish like a Snake first or something.
 
@A.H. nullptr? in C#?
 
@CatPlusPlus I want a tool that scans my code for repeated lines and tells me to move that to a function.
 
@MooingDuck They exist.
 
@CatPlusPlus good languages have lots of nulls
 
@Pawnguy7 we could write a platformer if you want :p
 
7:12 PM
But the result wouldn't be very useful for me.
Because everything is shit and I know it.
 
@BartekBanachewicz By we, you mean, you'd write it and he'd ask questions? :P
 
I was going to say that...
 
@ThePhD FullName?
 
@Borgleader thatt's what is happening anyway, no? :)
 
@BartekBanachewicz a 'platformer' ?
 
7:13 PM
@sehe Er, yeah. FullName, not FullyQualifiedName
 
A platform game (or platformer) is a video game which involves using an avatar to jump between suspended platforms, over obstacles, or both to advance the game. These challenges are known as jumping puzzles. The player controls the jumps to avoid letting the avatar fall from platforms or miss necessary jumps. The most common unifying element of games of this genre is the jump button. Jumping, in this genre, may include swinging from extendable arms, as in Ristar or Bionic Commando, or bouncing from springboards or trampolines, as in Alpha Waves. These mechanics, even in the context of o...
 
But I don't know what the equivalent of that would be in C++.
 
@A.H. something like mario, just with moar lazors
 
I just copy-pasted the code I fixed where the bug still exists
This is sad.
 
@BartekBanachewicz thats a better explanation than wikipedia's
 
7:14 PM
Nailed it.
 
Does mario correspond directly to the platformer?
 
I think so
 
TESTING
 
It has jumping :D and obstacles.
 
Platformers usually involve a lot of jumping, and well... platforms
 
7:15 PM
Hrm. Speaking of that, is there word on the next 3D installment?
 
@CatPlusPlus, hahah you need to code thinking that If your software fails, your chair will be ejected like from a jet xD that helps focus
 
hmm, MFC is throwing a FileNotFound exception from somewhere, but when I get the error message it tells me "Unable to write the file %s on %s was not found.", which I find confusing.
 
What identifies a process / dynamic link library in C++ ?
 
System handle?
PID?
I don't think you can do that reliably for arbitrary shit.
 
@ThePhD AFAIK C++ doesn't have a standard type for Process / dll
 
7:17 PM
My system has a handle so I can carry it easily.
 
@ThePhD what do you mean?
 
@ThePhD C++ doesn't have, it's upd to the OS
 
@thephd also real men call them shared libraries
 
like, when you do a fork in linux, you get just an integer (int)
thats the PID
 
@MooingDuck Well, Reflection information seems like something that would benefit from being program-global (e.g., global to the entire program). But as @DeadMG said earlier, you may want to load reflection information from different programs at run-time. So I can't just have a single "ReflectionDatabase Reflection;" sitting out in a global somewhere; I need a way to get the "right" reflection database for what someone is looking into.
 
7:20 PM
> Your account is valid till 20.09.2013
YAY
IT WORKS
 
@CatPlusPlus \o/ Woo!
 
@CatPlusPlus *ONE TESTCASE WORKS
 
WTB achievable programming goal for nub programmer
 
@Borgleader Halpz me reflect moar things!
 
@Borgleader guess a number between 1 and 100
 
7:22 PM
You know what?
 
@Borgleader weather forecast tool
 
He said achievable.
There's infinite number of numbers between 1 and 100.
 
for file data manipulation, which is better C, C# or C++?
 
Fuck it. If someone wants to load a runtime reflection database from some other assembly,
they can amange that shit themselves.
ReflectionDatabase Reflection; PROBLEM = SOLVED.
 
There won't be any reflection database from some other assembly.
 
7:23 PM
Depends on the data. I think all the thre are god @NokImchen
I've found C very confy to do binary data manipulations, but that's just me I think
 
@AdriánPérez i want to perform arithmetic coding, so what language is the best for fast calculation of really huge numbers?
 
@MooingDuck I said nub not retard :P
 
I need 10 minutes of break and 5 litres of alcohol.
 
@NokImchen Not remotely enough detail for any sort of answer, either here, or on SO. If you post that on SO, you will suck in downvotes like puppy's stomach in reverse.
 
@NokImchen ruby
 
7:25 PM
@NokImchen Java
 
calculation of really huge numbers... that's more of a CPU/algorithm problem than about a language choosing one
 
Bash scripts
 
don't worry about it
you could do it in LOLCode if you want xD (just joking xD)
 
@AdriánPérez you are correct in theory. In practice calculation of large numbers is where many implementations of languages differ the most.
 
@A.H. java? :| is java good enough for making a file compression software using arithmetic coding? :|
 
7:28 PM
@NokImchen yeah why not
 
@Borgleader write a function that prompts for user input until they enter a line containing a number between 1 and 100, and prints an error at EOF or if the stream goes into a bad state (not fail state). Turns out that's harder than it sounds :D
 
@Borgleader prolog parser
 
I guess you're right @MooingDuck, but I though about the fast part of the question. May be there are implementations of basic arithmetic functions that are very slow.
 
@AdriánPérez I meant language implementations
 
7:49 PM
I thought Google Play had a payment sandbox now. NOPE
 
8:00 PM
Um, dumb question.
How do you set the compiler for SCons?
 
@Rapptz dumb answer.
 
SCons docs kinda suck
I think it's env['CXX'] = 'compiler'
 
I prefer cmake e.e
 
I despise CMake
 
I bet not so much as I despise Eclipse :@
why a so rich featured ide has to freeze so many times! u.u
 
8:13 PM
hello all
I don't understand this part of an answer: "Resources are by definition not copyable"
but I thought I can copy memory by using std::memcpy. can someone please clarify what definition makes resources noncopyable?
 
Context?
 
12
A: Is the introduction of rvalue references actually useful?

Kerrek SBIf you need one single argument why rvalue references are essential, it's unique_ptr. It's the archetype of resource managing SBRM classes. Resources are by definition not copyable, but the managers should be movable An owning container of heterogeneous, related objects is straight-forward to im...

 
Hmm....
 
@AdriánPérez i thought I did read it last year
why doesn't File f("/foobar.txt"); File g = f; copy the file?
surely the resource "file" is copy able, right?
 
8:22 PM
what is the scope of it?
 
didn't know files have a notion of scope
do you mean access rights and user/group bits?
i would say they inherit from the other file
just like the copy operation operates normally
 
that is in the same scope, sequentially you mean, then I don't know.
I don't think that goes about that :/
 
@JohannesSchaub-litb the file itself is copied?
 
lol
it would appear not everybody knows you yet :(
@A.H. ....
 
@sehe thats what he meant right?
 
8:28 PM
@A.H. yes. the resource is copied
not the handle
 
@JohannesSchaub-litb A mutex is a resource. I'd say you can generalise "resource" to mean "not data". A file context is not data per se, though its contents are; if you had the contents on their own, e.g. in a string, then you could copy them.
 
@LightnessRacesinOrbit so it depends on the type of resource
 
Copying a file is not the same as copying an access to a file
 
a resource is hence not "noncopyable by definition". but "may be noncopyable by definition"
 
no, read what I'm saying!
 
8:30 PM
@JohannesSchaub-litb actually according to cppreference the copy constructor and operators are deleted
 
@LightnessRacesinOrbit so you mean you cannot copy "/home/foo", because that context is unique and copying it would overwrite the source file?
i guess i don't really know what you mean by "file context"
 
I htink he is mixing the concept of copying the file, operating on the file system with copying that object :/ I can't make sense of it otherwise
 
@LightnessRacesinOrbit are you saying that you cannot copy an object? but only its value?
because, every object has an identity. and what is commonly called "copy" for objects actually leads two different object identities
i guess that is comparable to the file/file-contents problem?
 
user1804599
Anyone need a virgin?
 
Can't believe that this line has 4 possible parses
T(f)() && noexcept(T());
 
user1804599
8:37 PM
@sehe It is entirely flat.
 
most of them are illformed but they are grammatically valid
 
user1804599
It's perfectly flat.
 
user1804599
Hence the edges; the Earth is round.
 
@JohannesSchaub-litb Will you ever stop wasting your time on C++orner C++ases? :)
 
user1804599
KORNer cases.
 
8:42 PM
Noooooo
 
@FredOverflow on C++asses?
and C++boners or what did you want to write
 
@JohannesSchaub-litb srsly? Just remove the + signs...
 
@FredOverflow ohh now I see! thanks!
lol i was kidding :)
 
@not-rightfold Someone finally signed up on github ;)
 
user1804599
@FredOverflow C#! Yay!
 
8:46 PM
@FredOverflow it's like a pill for me. anytime I find another corner case, it's like a new dose of med
 
@not-rightfold Yay? Not two days ago you said C# was terrible
 
user1804599
Better than Java. :|
 
@not-rightfold Isn't it a bit sad that I need three levels of indentation (namespace, class, main) before I can actually do something? :)
 
user1804599
@FredOverflow I followed you. :P
 
user1804599
@FredOverflow Namespace isn't needed.
 
8:47 PM
@not-rightfold Does that mean you get notified for every push? :)
 
user1804599
@FredOverflow No, but it does appear on github.com in a list.
 
i'm not yet on github
what are the benefits over using your local harddisk?
 
user1804599
My Gear compiler is on there.
 
@not-rightfold I doubt you'll see anything interesting there in the foreseeable future.
 
i can remember the sourceforge times... you needed to apply for getting a project. is it easier with github?
 
user1804599
8:48 PM
@FredOverflow lol
 
@JohannesSchaub-litb version control, backup, working with multiple people on the same codebase...
 
user1804599
@JohannesSchaub-litb GitHub is free for everyone.
 
@FredOverflow it is public and without fee right? how can they make it without fee? wouldn't they become poor?
 
user1804599
Create account, create repo, push.
 
how do they manage their income?
they sell our stuff?
 
user1804599
8:49 PM
Private repositories cost money.
 
> Die Trägerfirma GitHub, Inc. besteht seit 2007 und hat ihren Sitz in San Francisco.[1] Der Dienst hat drei Millionen Nutzer (Stand Januar 2013).[2] Im Juli 2012 erhielt Github eine Investition von 100 Millionen US-Dollar vom Risikokapitalgeber Andreessen Horowitz.[3]
 
i guess noone is using private repositories
 
user1804599
Also GitHub Enterprise.
 
hmm
i shall put my pet projects there
 
8:50 PM
@FredOverflow I think you might be calling for it, again...
 
with all the corner cases tests :D
 
@sehe wat
 
@JohannesSchaub-litb insta-clone
 
user1804599
 
@JohannesSchaub-litb And you cannot copy every object.
It doesn't make sense to copy a stream, for example, which is a conceptual flow of data and not a container of data. It is an instance of a mechanism, not of data.
 
8:52 PM
@FredOverflow seems to me that der Schaub is in a particularly trolly mood tonight?
 
but i can copy initialize a stream haha
 
switch (phenomenon)
{
    case corner: johannes(4, help);
}
 
You can have another instance of the mechanism, by creating a new stream, but this is not the same as copying an existing instance, which requires data to copy.
So, yes, I'd say C++ copy semantics copy values, not objects.
@JohannesSchaub-litb You can?
 
@LightnessRacesinOrbit copy semantics = value semantics?
 
std::ostream os = std::ostream(nullptr);
@LightnessRacesinOrbit looks like it works
 
8:54 PM
> But you cannot copy-initialize into the same stream again -Zen
 
error: 'basic_ostream<char; _Traits = char_traits<char>, _Traits>::basic_ostream()' is protected
Nope.
@FredOverflow I suppose.
 
@JohannesSchaub-litb it shouldn't
@JohannesSchaub-litb what compiler?
 
@LightnessRacesinOrbit NOOOOO
 
Xeo
@JohannesSchaub-litb boo, copy-initialization uses move ctors :P
 
lookup, i fixed
 
8:55 PM
@JohannesSchaub-litb don't tell me you used MSVC as the Oracle there. ?.
 
 error: use of deleted function 'ostream::basic_ostream(const ostream&)'
Nope.
 
huh. doesn't the stream have move ctors?
 
@LightnessRacesinOrbit I think he's right actually, it ought to compile
 
@MooingDuck Why?
 
@LightnessRacesinOrbit what compiler?
@LightnessRacesinOrbit move constructor?
 
8:56 PM
So, now you're talking about moves? I thought you were trying to prove that you could copy a stream.
 
Xeo
Move ctor is protected of basic_ostream
 
@LightnessRacesinOrbit i have always been thinking about them!
 
Xeo
@LightnessRacesinOrbit copy-initialization
 
3 mins ago, by Johannes Schaub - litb
but i can copy initialize a stream haha
 
@LightnessRacesinOrbit I thought so too, but his code does otherwise
@Xeo interesting
 
8:56 PM
How is it copy-initialization if you're moving, not copying?
 
Xeo
That's what it's called
 
@LightnessRacesinOrbit poor wording in teh spec :(
 
Xeo
T a = init; is copy-initialization, T a(init); is direct-initialization
vOv
 
Cue a White Knight song
 
Xeo
8:57 PM
@MooingDuck Only derived streams have a public move ctor
 
@Xeo interesting
 
/me sips his fruit likör
 
I called it
 
Xeo
Because it doesn't make sense to do eg std::ostream os = get_derived_stream_rvalue();
 
So they forgot to rename "copy-initialization". Doesn't change the fact that you're not copying anything. You cannot copy streams.
 
Xeo
8:58 PM
Nobody said that
 
Pssst he might know
 
Xeo
he only said he can copy-initialize a stream
 
no. i said I can copy initialize them
he has a point
i forgot the dash
 
Germans
 
8:59 PM
@JohannesSchaub-litb I was wondering how important that would be when I first noticed. I decided it was unimportant
 
Xeo
Jawohl!
 
Is "copy-initialize" standardese, or just "copy-initialization"?
 
@FredOverflow now that is nitpicky
 
@FredOverflow actually, I am not sure
 
@sehe When litb pretends to be a newb, I choose to humour him, because it makes me feel superior.
5
 
9:00 PM
17 mins ago, by FredOverflow
@JohannesSchaub-litb Will you ever stop wasting your time on C++orner C++ases? :)
 
i think the spec uses instead of "if we can copy initialize A from B" the phrase "if we can implicitly convert B to A"
 
@LightnessRacesinOrbit who knew
 
@sehe He did. Since several years ago. :)
 
Pssst I might know
 
9:02 PM
Exactly
I'm off to bed
 
i know his subtle tricks
night bud
 
Well, litb is the only guy who's pedantier (hihi) than Tomalak.
 
not true :(
noone can beat him srsly
 
Both members are active all the time — alkedr 1 hour ago
yikes
litb is cleverer. I'm not convinced that makes him more of a pedant.
Also I've never seen him say awesome things like "Plenty of people use unions for this sole reason and they are all wrong"
 
9:15 PM
nooo i'm in no way cleverer!!!
 
Pedantes
 
Is there a way, in C++03, to specialize a template if a type is a subclass of another type?
(Like, "if x subclass of y, take this specialization instead")
 
I hold that there is no good use-case for union, as boost::variant replaces it 100% and can be implemented without it.
 
(I know there's a trick in C++11 with is_base_of, but we're stuck with C++03 support at work, so...)
 
The only good use-case for union is breaking C++ guarantees.
Which is not a good use-case.
Fuck untagged unions.
 
9:19 PM
@EtiennedeMartel template class?
 
@MooingDuck Template function.
 
conditional?
 
@EtiennedeMartel SFINAE
 
Hmm, it could work with some custom made is_convertible.
(It's the "is subclass of" that's blocking me, not the specialization itself)
 
we are using boost::variant and it slows donw our compilation
i guess that's because of c++03 usage
 
9:24 PM
C++11 did not make core unions useful.
 
@EtiennedeMartel boost::is_base_of works with C++03
 
@CatPlusPlus sure it did. you can put arbitrary classes in it now
 
It's still untagged and unsafe.
 
@JohannesSchaub-litb untagged. stilll needs tags
 
The arbitrary classes thing was a tiny problem compared to that.
Woo, reindexing Solr now with progress bar.
Update totally worth it.
@ThePhD btw what do you want to talk about
 
9:39 PM
@CatPlusPlus Essentially the only real use-case for unions is compiling existing code that's not worth updating to work some other way.
 
or for teaching purposes
 
@Telkitty猫咪咪 No.
 
cc1plus.exe: error: unrecognized command line option "-std=c++11"
wot.
 
@Rapptz what compiler?
 
g++ 4.8.1
 
9:51 PM
http://www.emerson.emory.edu/services/gcc/html/Function_Attributes.html: An alternative way to declare that a function does not return, which works in the current version [of GCC] and in some older versions, is as follows:

typedef void voidfn ();
volatile voidfn fatal;
O.o I can't figure out how that works
 
it says the function is volatile
 
@JohannesSchaub-litb and that was a magic flag to say fatal doesn't return?
 
@Rapptz weird. can you show me the full command ?
 
through a bit of fucking around, it's using g++ 4.5.2 (which I don't even remember having in this computer)
 
Leave my unions alone! I've been a paid-up member for decades. Fuck memcpy and reinterpret_ cast.
Also, Worthington Red Shield is excellent!
 
9:58 PM
0
Q: C++ Is it correct to call class member variables "attributes"?

user2672807Can someone please disambiguate class attributes and methods for C++? I was under the impression that attribute means any member variable, and method means any member function. Thanks

 
by the name looked like a wine @MartinJames
 
someone got a test question wrong ;)
 

« first day (1035 days earlier)      last day (3928 days later) »