« first day (982 days earlier)      last day (3956 days later) » 

10:00 PM
@refp why not just a compiler flag 'nested-comments'
 
@Rapptz think harder..
 
Idiot reporting for duty :)
 
@thecoshman because compiler flags are work of the devil
 
@refp Or you could tell me a use case as I can't come up with one.
 
@Xeo @Bartek What do you think of my iomanipulator 'take' on that wretched question:
0
A: Is there any way to output the actual array in c++

not-seheInspired by the answers of Juachopanza and Raxon (?) I decided to do a real IO manipulator, which leads to a syntax like: const char* arr[] = { "hello", "bye" }; std::cout << "Woot, I can has " << print(arr) << " and even " << print(std::vector<int> { 1,2,3,42 }, ":") << "!\n"; Note ...

 
10:01 PM
@Rapptz wrap a /* comment */ in another one, /* another /* comment */ */
 
/*
void my_function(int var /*=0*/);
//ran into this one at work
*/
 
@refp Yes but why.
 
Ell
@mooingduck but then D tried to be a new language
 
@MooingDuck I run into that all the time
 
@Ell such a thing would be a new language.
 
10:02 PM
@MooingDuck Ah. Can't say I feel the need to make a new comment syntax just for that.
 
@Rapptz can't fix the existing one, that would break compatability
 
@Rapptz but why, what?
 
@refp Your example was pretty shitty. I already knew what /+ +/ did from context, you repeating it doesn't present a use case.
 
Ell
Well, its goal wasn't to fix c++ was it?
 
@Rapptz what.. the fcuk?
 
10:04 PM
Hi all, i recently purchased, accelerated c++ to study nearer the end of the summer,
 
Ell
I guess everyone's idea of a fixed c++ is different
 
@Rapptz what I wrote is the "only" use case, nested comments are just that.. nested <pause> comments.
 
@Ell they fixed a lot of things, but the problem was, nobody liked it
 
@refp Exactly, but when will you run into nested comments is what I meant by "use case" which someone (aka not you) managed to understand and provide.
 
@Rapptz What don't you understand?
 
10:05 PM
I hope @Rapptz is trolling..
 
Hi all, i recently purchased, accelerated c++ to study nearer the end of the summer, since then i heard some bad things about c++, infact a teaching assistant at uni, has adviced against learning it all together,
So am writing this to ask you guys what do you think, is c++ too powerfull bare in mind i am working through k&R atm
 
@LightnessRacesinOrbit I didn't quite get when someone will run into the need of nested comments enough to warrant whole new syntax for it.
 
@Babbleshack ...? C++ is "too powerful"? Also, K&R isn't C++..., Also, K&R is ooooold...
 
I see one presented but it's kinda dull; at least it's a little bit understandable.
 
@Rapptz Okay, whether it's worth a new language feature is debatable, but I think the use cases are fairly obvious.
 
10:06 PM
also C++ is like dicks.
 
@Babbleshack depends what you want to do
 
@Babbleshack That was a very long sentence.
 
@Babbleshack C++ is awesome
 
@LightnessRacesinOrbit Eh, I've only seen one thus far.
 
@Rapptz *the use case is fairly obvious.
 
10:07 PM
@MooingDuck by too powerfull it was described to me as being 'overpowered' making it difficult to do anything, as a metaphor a computer can do everything or it can be specialised.
@MooingDuck and i know K&R is C
 
@Rapptz Temporary commenting-out of large blocks of code, writing usage examples (including comment blocks) inside documenting comments... that's about it
 
@LightnessRacesinOrbit sorry there were some comma's xD
 
@Rapptz When you consider that comments themselves only really have one use case, it's not necessarily a bad thing that there are only one or two for this new syntax.
@Babbleshack They were misplaced, Skippy!
 
@Babbleshack ah. It's a little harder to start than some other languages, but not much so IMO.
 
As far as I know, neither /+ nor +/ are currently ever valid in C++11 at all, so I'd say yes to the new syntax. On the other hand, the committee doesn't like to change the CPP.
 
10:09 PM
@LightnessRacesinOrbit get over it....
@MooingDuck fair, well i got the book so i may aswell learn it perhaps ill ask arround some more
 
@LightnessRacesinOrbit I see your point. TBH if I was commenting out huge blocks I would just highlight it and press "Ctrl + /" to comment out the chunk with // and Ctrl + / to uncomment it for whatever reason.
 
@Rapptz (a) That's horrible; (b) an IDE feature does not let the language off the hook
 
But that's a different matter entirely.
@LightnessRacesinOrbit Uh, I know that for (b). Can't say I care about the opinion on (a) though.
 
What you'd usually do is #if 0 ... #endif, but that's minging
 
@LightnessRacesinOrbit hmm... could operator overloads not mess that up...
 
10:11 PM
if my editor highlighted #if 0 ... #endif as comments, I'd be more happy. but /+ and +/ looks like it encapsulates something, and I like that
@thecoshman I don't think so; / is binary; I suppose 4/+3.0
dammit
 
lol
 
/^ ... ^/ then!
 
well, i/++j + k++/z valid code
 
I'd be happy enough for C++16 CPP to actually change /* */ to work in a nested fashion. What code is that going to break, really?
 
@LightnessRacesinOrbit my editor highlights them. (not as comments, they're a different color)
 
10:13 PM
@Babbleshack never bear bare minds
 
@MooingDuck And the intervening text?
 
@not-sehe haha am not even sure how to read that
 
@LightnessRacesinOrbit 4^+3?
@LightnessRacesinOrbit yup, it's awesome
 
@Babbleshack The same was true when I read your "sentence" :)
 
@MooingDuck how could that be mistaken for a comment?
 
10:14 PM
no wait, got that backwards. he said /^ not `^+. My bad.
 
@not-sehe i have a good excuse though am just not about to go on about it on here,
 
@Babbleshack Accelerated C++ is a nice entry text. C++ is wonderful. Just be sure when not to use it. Like, you know, anything else
@Babbleshack You are being sucked by the cleaning lady, under the desk. No problem, we understand. [editorial]
 
@LightnessRacesinOrbit trying to think :P
 
@not-sehe only if, alright no worries, ill see whats what
 
@LightnessRacesinOrbit I can't figure out any code that would break quietly.
 
10:17 PM
@LightnessRacesinOrbit i/* /* */ */=j
boom! I think
 
@thecoshman that's a compiler error in C++03 and C++11.
 
@LightnessRacesinOrbit It'd be a good change actually.
 
@LightnessRacesinOrbit Why isn't /* */ nest-able in the first place? (Besides "because that's how C did it")
 
@Insilico that's how C did it
 
@MooingDuck true...
 
10:19 PM
33 secs ago, by In silico
@LightnessRacesinOrbit Why isn't /* */ nest-able in the first place? (Besides "because that's how C did it")
 
@thecoshman we don't care about breaking code that doesn't compile :D
 
Okay, so why didn't K&R make /* */ nest-able things?
 
because primitive compilers
and laziness
 
@Insilico too hard would be my guess.
 
explains why modifying a variable between sequence points is UB
 
10:20 PM
Would it actually be more work? Don't compilers already have to deal with matching things like braces? (I'm completely ignorant of compiler construction, so if that's a stupid question, I apologize)
 
@Insilico The preprocessor doesn't
 
@Insilico Think of it as a state machine. It's easy to see /* and change your state to "find closing */". Then you just discard characters until you reach that state, then go back to whatever it was you were doing.
 
though it does have nested #if #else #endif so it should STFU
 
@GManNickG Yeah, that's what I'm thinking. It's certainly not hard to implement (at least relative to the rest of the language)
 
So /* */ */ would be an error/incomplete comment right?
 
10:22 PM
@Rapptz yes
 
okay, just making sure
 
the only reason to prevent nesting /**/ comments is if you can think of a valid way to do something like i */ j
 
@Insilico Yeah. To support nesting, you keep parsing for other /*s and keep a count, finishing when it's back to zero. Not hard, but I program in 2013, I don't know how easy it was back then.
 
   T operator*/
   () {return *ptr;}
   //close, but not quite
 
@thecoshman / isn't an unary operator AFAICT, so I don't think I */ j could possibly be valid. Also, you can't overload novel operators in C++ anyway.
 
10:24 PM
@MooingDuck yeah.... no
 
operator*/ isn't valid anyway
Did you mean \ there?
 
@Rapptz wait, yes. :(
 
you also could try finding a valid way to chain */= but again, I don't think that can be done
 
@MooingDuck In that case, the compiler never sees the `` anyways, since the preprocessor uses it to 'join' the lines.
 
@not-sehe also a valid point
 
10:26 PM
`\`
 
hey all
 
@thecoshman I can't see it. /= is a binary operator, so there needs to be something that's not an operator on both sides (whatever the technical term for those two things are)
 
Ell
Hey
 
@MooingDuck Mmm. Wait. I think comment end takes precedence, so this is in fact an example that would yield valid code when the comment opener was deleted. Interesting enough!
 
I if you do something like i/**//jthat comment will go away leaving you with i/j
 
10:27 PM
1 message moved to bin
 
It's the notepad again
 
@Insilico it would have to be an lvalue (I think)
 
@not-sehe it's the wrong slash for the preprocessor bit, and even if it weren't, preprocessor would "consume" it.
 
@Rapptz You're just binning all help questions, now? Maybe I wanted to help with this one.
 
Ell
I have an Off topic question
 
10:28 PM
@LightnessRacesinOrbit that's been a long standing pseudo-rule
 
@MooingDuck I was assuming you had accidentally typed the wrong slash :/
 
@Insilico sizeof T*/j
 
@not-sehe if it has the "right" slash then you get a compiler error in C++03/11
 
@LightnessRacesinOrbit IMPOSSIBRU
@MooingDuck wokay
 
@LightnessRacesinOrbit ooooh
 
10:29 PM
@MooingDuck finish him
 
BOOM!
 
@LightnessRacesinOrbit Nah.
 
There we go folks, nested comments tried to make it, but got shot down :P
 
I bet this is how the committee discussion went
Oh well
 
@LightnessRacesinOrbit Ah.. the good ol' sizeof needs no parentheses operator.
 
10:31 PM
Would that alone break the nest-ability of /* */?
 
@LightnessRacesinOrbit yes
 
@Insilico If anything, it's just a weakness of /* */ in the first place
 
@LightnessRacesinOrbit You need parens for type here
 
Do any of you guys use sizeof without parentheses?
@milleniumbug No you don't.
 
10:32 PM
@Rapptz ?
 
i = /*/**/ sizeof T*/j
 
@milleniumbug It doesn't even need to be a type, no?
 
@milleniumbug Fuck you're right
 
nesting does not break that code, but it change the behviour, which is probably even worse
 
sizeof var works, but not sizeof type
 
10:33 PM
@milleniumbug Ooh. TIL.
Now.. that's just weird.
 
> [C++11: 5.3.3/1]: [..] The operand is either an expression, which is an unevaluated operand (Clause 5), or a parenthesized type-id. [..]
 
oh it's true
 
@Rapptz Me too
 
Oh wait that doesn't work.
I forget T* is a type. Dammit.
 
@Insilico haha
heh, maybe comments is why?
 
10:34 PM
Yeah I was thinking "OOOH what about sizeof i*/j wouldn't that work" then I realized how stupid that is.
 
Ell
Is drunk concent concent?
 
@Ell depends
for rape charges, doubtful
 
Ell
What on?
 
@Ell Controversial subject.
:P
 
Ell
Yeah, I know :P
 
10:37 PM
At least here in the US.
 
Ell
What are your opinions/
 
I don't think being drunk really matters muhc in the issue
 
I don't have one.
 
Ell
@thecoshman so drunk consent is consent?
 
@Ell How would you define "drunk"?
 
10:40 PM
@Ell if you are having to ask people if you have consent, you don't have consent
when in doubt leave it out
 
I don't think people go around asking "Do I have your consent to have sex with you?"
 
wait... how does this work out
int* i; int j;
// init these values
j/*i;
It looks like I started a comment... but I want to divide j by the value i points to...
 
Ell
Oh I'm just wondering about it, I'm not in the sotuation
@insilico that's a difficult one too. I guess altered behaviour
Even if its just lost inhibitions
 
@thecoshman That is parsed as a comment.
i.e., this program is ill-formed:
int main()
{
    int j = 5, *i = &j;

    return j/*i;
}
 
@Ell That's the problem. You may have lost inhibitions but might be still capable of making reasonably good decisions.
 
10:45 PM
any way, I'm off to bed
see you sexy people :D ¬_¬ and you not sexy people...
 
Ideally we would like to be able to assess the state of mind directly but that's not possible so we use something like BAC or something as a proxy.
 
Ell
BAC?
 
@Rapptz It also stands to reasons that you could conceivably know the person well enough before you actually fuck them. That way nobody wakes up in the morning and cries rape, and there's no arguments to the effect later.
 
@Ell Blood Alcohol Concentration
 
or blood alcohol content
 
user142019
10:55 PM
Bury all corpses.
 
Singletons everywhere...
Super base class for everything...
Fuck this engine..
 
user1182183
So it has holes...
 
user1182183
Pump it full!
 
UE4?
Game developers aren't known to be good programmers anyway.
 

« first day (982 days earlier)      last day (3956 days later) »