« first day (269 days earlier)      last day (4661 days later) » 

3:00 PM
but if I don't have variable definitions as expressions
how can I do if(ptr = dynamic_cast(...))
 
You add a special production for that.
 
special-case then?
yes
 
Real languages don't have statements and everything is an expression anyway!
 
C++ is not a real language?
 
mru
3:03 PM
rehi
 
Don't you have yacc or something?
Wait, you're on Windows, right?
Ugh.
 
I will get to that when I'm feeling more confident about it
ok
 
If it were me, I would like to feed the grammar to a parser generator to find out ambiguities early on.
 
string literals, and catches, I have added
still need to add variadics, exception specs, enums
lambdas, default arguments
 
You're going to reuse C++'s lambda syntax?
I find it a tad verbose.
 
3:05 PM
mmm
I don't see what I'd replace it with
 
What's function-call?
 
@DeadMG just a question, you making this for fun or have a purpose in mind?
 
@Kerrek: I'm pretty damn sure that I completely cut function-call
 
Hah. Should be function-call-expression.
 
\x, y => return x + y; \x, y => { statements... }
 
3:07 PM
@Collecter: If I don't hit implementation snags, then it's going to become a new language
 
Line 45 ff
 
@LucDanton A mix of Haskell and C#, nice.
 
oh, the cast expressions
 
Hey, why does type-base allow arbitrary expressions? That sounds a bit big.
 
But I like \x, y => x + y (no return required).
 
3:07 PM
@MartinhoFernandes Only thing less verbose that I know of would be lisp.
 
@Kerrek: Because it's in my language semantics to do so. Put simply.
 
@MartinhoFernandes But this language has statements!
 
The return in lambdas is my main gripe against C++ syntax.
 
I don't mind it because the bodies of lambdas are consistent with the bodies of functions.
 
I can stand the quirky brackets all mixed together, but the mandatory return...
 
3:09 PM
@DeadMG Pretty cool. Good, well not luck, programming is the opposite of luck, so good logic to you.
 
There is something to be said for consistency.
 
of course, semantically, it doesn't make much sense to say 1 >> 2 i = 5;, but you might say something like, std::vector<type> types = GetMahTypes(); types[1 >> 2] i = 5;
 
@Collecter "Good logic to you" sounds cool. Mind if I steal that without attribution?
 
Maybe a more restricted type of expression, like a type-expression, would guard against runaway constructions?
 
@MartinhoFernandes go ahead. This is the internet, it would happen anyway
 
3:11 PM
@DeadMG What's the semantics of that last statement?
 
@Kerrek: How so? You can put types in containers, you can put them in variables, you can return them from functions
 
I think I get it.
 
@LucDanton: Well, the types variable is constructed and the look-up is done at compile-time
I guess that actually, I could do something like that
because most expressions that do not eventually invoke user-defined functions cannot return types
 
Right now you can say things like const (int i + double j) *
 
no, you can't, because I cut variable definitions being expressions
but if you had UDTs i and j, then you could have overloaded operator+ to return a type, in which case that would be valid
what the hell you'd be doing, doing that, I don't know
but that's your problem
 
3:14 PM
Ah, note that the C string literal regex you stole does not take into account escapes with more than two characters.
Maybe it works anyway though. Lemme think.
 
I'll go back and replace it later
you know, syntactically, variadics could actually be quite simple
 
You just add a '...' thingy.
 
yeah
 
And you can ensure only the last argument is variadic in the grammar.
 
except I changed mine to be, instead of T... args, to be T args...
yeah, except I permit multiple variadic arguments in my syntax
semantics, too
 
3:17 PM
How will that work?
 
named parameters
 
Oh, nice.
f(int x..., int y...){} f(x = 1, x = 2, y = 3, y = 4);?
 
std::set<std::string, SomeAllocator, SomeComparator>(
    allocator = ...
   comparator = ...
);
there's a post on my blog about it
no, more like
f(int x..., int y...) {} f(x = 1, 2, 3, y = 4, 5, 6)
 
Yeah, terser's better.
 
I need comma for that
 
3:19 PM
You're keeping the comma operator?
 
no
 
That would interfere with this syntax, so that's good.
 
but right now, my function call grammar is just '(' expression, expression, etc ')'
now, whilst I could get away with calling 2, 3 expressions, x=1 is most definitely not an expression right now
 
It is an assignment-expression.
 
May I recommend another syntax element to help? f(x: 1, 2, 3, y: 4, 5, 6)
 
3:21 PM
man's got a point
I keep forgetting that
nah
I'd prefer to keep = here, it's more familiar
 
What about conflicts with assignment?
int x; f(x = 1,2,3, y = 4,5,6)?
 
well, it is an assignment expression, so the parser won't have to know
 
Do you have plan for record (struct) syntax? T { x_member = ..., y_member = ... }?
 
semantically, I think I'll just prioritize function arguments
@Luc: I already have that
in fact, technically, I don't have either structs or classes, they're just called type
 
(I recommended : because I'd like : to be used there as well)
i.e. remove = from everything that is not an assignment
 
3:23 PM
oh, as in, something like std::pair<int, int> { first = 1, second = 2 }?
 
Yes
 
but passing arguments is an assignment
 
So how do you access 3 in f(x = 1, 2, 3);?
 
err
 
int x; f(x = x = 1,2,3, y = 4,5,6) gets weird.
 
3:24 PM
x3?
 
well, strictly speaking, it's a construction, but I find them close enough
 
assignment as in int x, y; x = y; not as in copy initialization int x = y;
I want to make = exclusive to that precisely to avoid the ambiguity
 
well, if I really wanted to go for construction, I'd go for f( x(1,2,3), y(4,5,6) )
 
I only use copy initialization in if conditions, and even then, there's probably a less confusing way to write it.
 
@DeadMG I usually made lexer do it.
 
3:25 PM
@Xaade: Right now, I'm storing the types as something like std::vector, so anything you can do with that
 
I'm with Luc on this. I prefer a different syntax for named arguments.
 
@DeadMG So every object is a vector..... scary
 
no
in variadic templates, then the parameter pack is a std::vector<type>
 
Reusing either = or constructor syntax gets confusing.
 
oh..... that's actually !scary..... or "wonderful"(TM)
 
3:27 PM
Since types are variables, you can't do colour colour;, right?
 
Perhaps if you want familiarity you can use := for not-quite-assignment i.e. initialization and named argument passing
I think some people react strongly to this though.
 
That's Pascal's assignment! I missed that.
 
however, I would like to add that f(x=1,2,3,y=4,5,6) would be confusing because = denotes your list and you wouldn't see that at a glance.
 
honestly? I was quite close to cutting int i = 0; anyway
and just having int i(0); as the only option
 
And Go's, too.
I like named parameters with =. :(
 
3:28 PM
@Xaade: Normally, you would list different variadic arguments on different lines
 
Oh..... I love int i(0);
 
oh, except there's no semicolons currently
so it would be just int i(0)
 
ZOMG.....
 
Force of habit, you know.
 
Semicolons are silly, anyway.
 
3:29 PM
I'll code in your language any day!!!
 
No semicolons in the grammar or the dirty trick of e.g. Go?
 
It's like what C++ could be
 
well, at the moment, there just are none
I might have to add them in later if ambiguities show up
 
Does that mean that newline is the codeline separator?
 
@LucDanton Way worse: the crappy trick of JavaScript.
 
3:30 PM
right now, I just don't have any whitespace anywhere or separators
like Lua
 
Well Lua does have ; in the grammar.
Like Go, the trick is in the toolchain.
 
JavaScript has only crappy tricks. </hate>
 
so..... what does this mean
if (condition) x = 1 y = 1

Does y = 1 belong to the construct or not?
 
sure, but it's totally optional and there's no dirty tricks involved
 
(dirty was in jest btw)
 
3:31 PM
I don't know much about Go so go ahead and call it dirty :P
 
Go forth, and make it dirty.
 
lol
 
Make it dirty!!! Alter it without processing the field.
 
The 'dirty' trick is that ; is required by the grammar but a separate tool sprinkle your code with it.
 
lol
if you can have a tool know when to insert them, then surely your parse code could just not need it
 
3:33 PM
Or
 
Do the hardcore layout-sensitive grammar, Haskell style.
 
no
Haskell's grammar is quite disgusting
 
I love the way you skip processing the fields after you touch them.... it makes the code so dirty!
 
It's cute, if you don't use braces and semicolons.
 
Which you can!
 
3:34 PM
If you're mad.
Mad.
2
 
@DeadMG In this instance I believe it's line sensitive. Lua on the other hand tries to 'make it work'.
 
But only in do-notation.
 
well
 
@CatPlusPlus must have finally watched 300.
 
Lua has a very simple grammar to begin with
 
3:35 PM
I think you can use them anywhere where layout is required.
 
so I'm not sure if I can pull off that kind of trick
 
This is Sparta baby!!!!
 
@DeadMG That's probably a huge factor, yes.
 
If you will parse them.... they will use them.
 
my grammar is definitely more complex than C's
whether or not it's context-sensitive is another question
 
3:37 PM
It isn't LL(1) that's for sure :( Damn if-elses.
 
Context-sensitive grammars are witchcraft and should be burned.
 
well
the trouble is that types can now be expressions, which could be fun
 
Half an hour till the end, and my productivity is zero.
 
but I don't think it will be ambiguous
because you always have to have an identifier
unless it's just a type, in which case it's hard to be ambiguous when only one thing can be there
 
Does that mean that identifiers cannot share a name with types ?
 
3:42 PM
yes
 
I like me some auto tuple = std::make_tuple(...);
 
because identifiers can also refer to types
you can do
type MahFavouriteTypeEvar = type {
    int i;
}
 
A semicolon!
 
note to self: type definitions are not optional if there's no initialization expression
lol
habit
 
We're going to hit 1000000th message soon.
 
3:45 PM
enums
I think I will cut enums
maybe
oh, forward
I forgot forward
 
Enums are nice, if spiced a little.
 
Where's tha massage count?
Oh.... thar it iz!
 
I have an userscript that shows the ID, other than that, permalink.
 
hello yall
what's new?
 
3:52 PM
1000000 do want.
 
AMAGAD ONLY 40 TO GO
NOW ONLY 39!!!
 
Now....
 
repeat ad 38
 
We have to be the one to own 1000000
 
3:53 PM
yes
 
We need to keep an eye out for the enemy.
 
Start spamming when we get close
3
 
we have to star it :)
 
we are close and we are spamming, let's face it
 
3:53 PM
We should all type..... 1000000
 
randomn ess
 
Spam spam, wonderful spam.
 
oh noes
 
spam spam spam spam :)
 
I am going to get something to eat, after posting the
 
3:53 PM
Lol.
 
How close are we?
 
is it 100,000 or 1,000,000?
 
1,000,000
 
We're so going to get banned.
1000000.
 
9 to go
 
3:54 PM
for what?
 
lets get it done
 
1,000,001 message!!!!!
 
spamming the chat obvs
 
3:54 PM
1000000th, baby.
10
 
i know
 
noob
 
booooo
 
Haha, GOT.
 
Hurry @Cat.... edit it
 
3:54 PM
awww man, I got the 999,999th
 
Achievement unlocked.
 
star fest :)
 
@CatPlusPlus Congratulations!
 
1,000,000 Star Wars!!!!!!!!!!
 
3:57 PM
I think we're the only one aware of the epic event that just happened.
No wonder people prefer our room to the others.
 
room topic changed to Lounge<C++>: Where we are proud to own the 1000000th message :)
 
That message made my profile link
 
@CatPlusPlus lol yes
 
That should be a badge....
 
room topic changed to Lounge<C++>: There are no pros here. We have pitchforks and torches and we're not afraid to use them.
2
 
3:59 PM
I know, right.
 
the other topic was way more interesting
 
in Chat feedback, Oct 8 '10 at 9:37, by Feeds
All feedback welcome!
 
oh damn you @DeadMG :(
 
First message evar up thar
 
I don't have a pitchfork
 
4:00 PM
How can you not have a pitchfork.
 
what would I need it for?
 
pitching forks!
 
Pros.
Obviously.
 
lol
pros? I'm confused, I obviously missed the conversation about that
you talked about monads in here? wow
 
Does anyone have MSVC2010 and would like to check whether the improved pretty-printer works? I added those tuple type macros that should allow tuples to work in MSVC despite the absence of variadic templates.
 
4:06 PM
that would be effort
and I'm eating
 
what you eating?
 
kittens
 
oh gosh
 
puppies eat kittens eat pink mice.
 
I get a tiny little duckling, and I stuff it with dead kittens, and then I put the whole thing in an adorable panda cub
I call it a Panducken
 
4:07 PM
lol :P
 
@DeadMG it ends up looking like this
 
is that you?
lol
 
Ugh.... no.... not me.... I'm not that weird
 
hahhaha
 
It's amazing what black can do....
 
4:11 PM
@Xaade rapidly backsteps after accidentally posting a picture of himself
 
4:21 PM
www.myspace.com/irobert
That's what I look like
 
why are you on myspace?
 
It's a remnant....
 
damn
I missed the 1M
 
Is no one on myspace?
 
4:38 PM
myspace is old
and mostly for musicians etc
 
sbi
@Xaade Last time I looked, there were several people on myspace.
 
hello @sbi, how are you>
 
sbi
@TonyTheTiger I am relaxed.
 
@sbi oh nice :)
 
@sbi Morphine drip?
 
sbi
4:47 PM
@Xaade Vacation.
@TonyTheTiger So how was your vacation?
 
lol
@sbi it was very nice, though a tad too hot in the Californian oven for me :P
 
sbi
@TonyTheTiger Ah, sitting on the Canaries I can somewhat relate to that. It's not too hot here, but then I don't like heat, so 28°C is already a lot for me to tolerate.
 
@sbi yea I'm not so much a heat tolerant person either, though I think I managed quite well, considering it was 35+ degrees mostly
 
sbi
@TonyTheTiger I'd die.
 
@sbi ahah
 
5:00 PM
@TonyTheTiger So, how was your trip to hell?
 
Incomplete.
 
It can get up to 36C around here.
And beyond.
 
Here we get 15ºC rain in the morning, 30ºC in the afternoon.
 
Highest I've gone outside was during 39C
 
You were outside in?
Poor soul.
 
5:05 PM
outside among?
Highest I've gone outside was during 40C actually.
 
Good thing he wasn't outside out.
 
uh
I expect that most people are outside out
it's usually the default state, to have your outsides facing out
 
I am outside out, inside in. I hope I'm normal.
 
5:23 PM
That's what happens when you first send, and then read what you've wrote.
Oh well, I left my brain at work.
 
I'm never inside out..... sometimes I'm outside in though.
For example, this one time.... I was outside, in rain.
I've also been outside, in hot weather.
However, I've heard some people like to know they're inside, out of the rain.
 
5:57 PM
39
A: Explain C++ SFINAE to a Python Guy

Jerry CoffinWarning: this is a really long explanation, but hopefully it really explains not only what SFINAE does, but gives some idea of when and why you might use it. Okay, to explain this we probably need to back up and explain templates a bit. As we all know, Python uses what's commonly referred to as ...

I'd appreciate upvotes on my last two comments so they are immediately visible. Thanks.
 

« first day (269 days earlier)      last day (4661 days later) »