« first day (448 days earlier)      last day (4504 days later) » 

12:09 AM
makes sense to me
the Standard basically knows in advance that vector<bool> is just a blob of binary bitfields
it has no invariants, no higher meaning, just a bunch of bits
but if I say std::vector<std::string>, then WTF is that even supposed to be?
because what you're talking about is does { "aa", "bb" } hash to the same as { "bb", "aa" } and such things
 
@DeadMG They implimented operator< and operator== for the containers, I don't see how hash is all that different.
@DeadMG wait, yes I do, if it's standardized you can't customize it. Gotcha
 
I didn't think they had those operators except for ==
 
@MooingDuck You can always customize. All you need to do is change hash functions.
 
@DeadMG I could have sworn....
 
vector on MSDN mentions no comparison ops
 
12:17 AM
@DeadMG § 23.3.1 in the standard, msdn.microsoft.com/en-us/library/691s080z.aspx on MSDN
@DeadMG it's in the header, not the class, makes it trickier to find
 
ah
 
The general container requirements require a == b to work for containers a and b of the same type.
 
@RMartinhoFernandes so it seems silly to me that they didn't make (nearly) everything hashable then.
 
I would have left them undefined
 
@DeadMG why?
 
12:19 AM
because
let's say that I have vector<Matrix>
if I multiply together the matrices in order, I might get the same results for two vector<Matrix> even if they are, for example, different sizes
 
But equality compares sizes first.
 
exactly
that's the problem
 
"let's say I want to shoot my leg"
 
the point is that vector<T> has no meaning unless you know what T is and the context in which the object is being used
 
If you're not happy with the collisions in the standard implementation you can write your own.
@DeadMG Oh, I think I agree with that.
 
12:21 AM
so pretending that you know whether or not they're equal is silly
because you don't
 
I still can't wrap my head around the idea of a vector being a key.
 
me neither
 
Much less a container with actual structure.
 
@DeadMG I don't follow (of course). Why can't can simply be a boost::range_hash of the elements? You'd get different results as often as anything else.
 
@MooingDuck I just gave an example of why.
 
12:22 AM
@RMartinhoFernandes I've seen several questions asking for std::hash<std::pair<X,Y>>
 
if I use vector<Matrix> to represent a series of transformations, then they are equal and should be equal, and should compare equal and hash equal, if the final transformation matrix is equal
 
@MooingDuck I don't count pair as a container (and neither does the standard).
 
but that doesn't mean, at all, that they took the same route to get there
 
@DeadMG then use a custom hash.
@RMartinhoFernandes there's no hash for most of the types in the standard, including pair, container or no
 
yeah, I got that far
the point is that there is no meaningful default
 
12:24 AM
I think it's a good thing that there are no hashes for everything around.
I have experience from .NET and Java.
 
@DeadMG It has no more meaningful default than operator== and operator< do.
 
which also don't have meaningful defaults
 
Where people just stick the thingies in the Dictionary and the wonder why it's not working.
 
and IMO implementing (and requiring) them is a defect
 
@DeadMG and yet I use them all the time to compare the elements.
 
12:25 AM
that's not really at all relevant
 
operator== for containers is based on std::equal.
 
a meaningful default would be good in most situations
you've only said that they're good in some situations
 
@DeadMG I don't see how there's no meaningful default. It compares each of the elements. If you want something else, do something else.
 
or even just a couple of situations
RARGH
stop talking!
 
12:26 AM
go re-read what I just wrote!
 
@MooingDuck It doesn't work on unordered_maps btw.
 
just because it has a default behaviour doesn't mean it's a good default behaviour
 
@DeadMG doesn't seem fair to ask me to stop talking and then continue your side of the debate :P
 
you can resume talking when you've read and understood my point
right now I feel like I've said the same thing six times and not gotten anywhere
 
@DeadMG in all our conversations this happens, but I'm still unsure if you're a bad communicator, I'm a bad listener, or we just speak differently.
 
12:29 AM
or maybe there is just lag
it wouldn't be the first time that messages which appear in one order to one person appear at different orders, or not at all, to another
 
It could just be that the committee does not want to give the idea that everything is fine for a key.
 
so it could well be that you literally read a different thing to what I've written
 
And hash_combine should have been in.
 
@RMartinhoFernandes I could believe that they learned that from Java even if I don't know the details.
 
that would be hilarious
Java learns sweet fuck all from C++, and then C++ avoids Java's mistakes
 
12:33 AM
Anyway, if I find a map with vectors as keys in my code, it needs refactoring.
That vector thing needs a class.
(Yet I still need the ability to hash vectors, and that would have been easier had hash_combine been in)
 
this class will use operator>(C lhs, C rhs) { return lhs.v > rhs.v; }
 
What class?
 
@RMartinhoFernandes that (which will wrap vector, which was a key of map)
 
hi
 
I can't find operator< or operator> for vectors. Anyone mind giving me the paragraph number?
 
12:37 AM
@Hubrid (be careful with DeadMG, I made him mad)
 
"Beware of dog"
 
@RMartinhoFernandes § 23.3.1. in the header file, not the class.
 
@MooingDuck I was looking for the semantics :)
(It's also in 23.3.6 together with the class introduction)
 
@RMartinhoFernandes I closed the file a while ago. I don't recall seeing semantics. I can never find stuff though.
 
The description of the containers library is hard to navigate. This are strewn all over the place between "general requirements", "slightly more specific requirements", and "very specific requirements". It's annoying.
@MooingDuck You close the file?
Wow.
 
12:41 AM
fclose
 
Ah, found them. Table 98.
 
@RMartinhoFernandes I habitually close windows I think I won't need again soon. I'm always wrong but I can't stop
 
Yep, doesn't seem to work for unordered_maps either.
 
@RMartinhoFernandes what doesn't seem to work?
 
@MooingDuck operator== and operator<. They depend on order.
 
12:45 AM
@RMartinhoFernandes yeah. operator== compares all the elements in order. That should work for unordered_map.
 
@MooingDuck How come?
 
@RMartinhoFernandes wouldn't expect a operator< for a unordered_map though
 
It only works if you use the same object.
 
@RMartinhoFernandes operator== on unordered_maps?
 
If I build two unordered_maps from the same data, they may not iterate on the same order.
@MooingDuck Yes.
 
12:46 AM
I dislike semantic analysis
 
@RMartinhoFernandes you're right. I hadn't thought of that. The other containers (non-unordered) all have a well-defined order though.
 
So operator== for unordered_map is either not required, or pretty much has reference semantics.
Which is crap.
 
@RMartinhoFernandes what's the standard say?
 
I want to discover that it's not required.
 
what am I gonna do, start including the LLVM headers into my parser code?
 
12:47 AM
@RMartinhoFernandes I'm looking
 
@MooingDuck General container requirements say it's like a call to std::equal.
 
@RMartinhoFernandes it's totally there :( I agree that for unordered containers it definitely ought not be.
 
Wait, it's worse than reference semantics.
 
@RMartinhoFernandes yeah, it is
 
It's like reference semantics, but you can't even trust it to be have reference semantics.
Because you can build different maps from the same data, and they luckily end up comparing equal.
Ah found it!
> Unordered associative containers conform to the requirements for Containers (23.2), except that the expressions a == b and a != b have different semantics than for the other container types.
§23.2.5p2
 
12:51 AM
@RMartinhoFernandes where's the rest of it? :(
 
@MooingDuck Paragraph 11.
Like I expected, it's a mess.
And O(N^2).
 
"worst-case complexity remains O(N2), e.g., for a pathologically bad hash function"
that's worst case though. Average case should still be fast
 
It's certainly messier and slower than the others. It involves hashing a lot of things.
 
ok
 
std::hash(thing) {return 0;}
 
12:55 AM
if I use a memory arena, which I am, then PIMPL shouldn't be so bad
no wasteful new
 
lol
Also, they don't conform to the optional requirements in table 98, so no operator<.
 
@RMartinhoFernandes makes sense
 
Container requirements are crap. Every container just picks what they want to conform to.
 
@RMartinhoFernandes yes
 
There should be a list of real container requirements.
 
12:57 AM
@RMartinhoFernandes I would be happier if their interfaces were more similar, slow or not. Maybe tags to let you know which functions were slow. Iterators too.
 
so
Step 1: Clean up Bison code and refactor the Parser class and the AST listings
Step 2: Ditch Collater class and collate the AST directly
Step 3: Profit
he thinks
 
Sounds like a good plan, but it's missing a 2.5. ??? step.
 
lol
 
You can't jump directly to profit.
 
sure you can
Step 2.5: goto Profit;
 
1:00 AM
And then raptors.
 
aaargh, my innards
 
A raptor is eating your guts?
 
yes
yet somehow, I find the remaining strength to not punch the raptor in the face or poke out it's eyes, but to type about it in a random Interwebs chatroom
 
You could multitask.
 
true
but that's not very Manlyâ„¢
also, I appear to have accidentally cut my nested comments code
 
1:07 AM
It's not really that important.
 
meh
I lieked it
 
But it makes your lexer context-sensitive! (Is there even such a thing?)
 
actually, it only puts it in the realms of PDA
 
Yeah, you're right. Silly me. It's still a long way from being CS.
 
and I made it into the hardware stack as the stack of the PDA, so I think it'll run just fine
 
1:09 AM
Designing a language like that would truly be an achievement in fail.
 
return (MakeEquality(L'/') >> MakeEquality(L'*') >> *( !(MakeEquality(L'*') >> MakeEquality(L'/'))  >> (multi_line_comment() || opt) >> eps) >> eps >> eps)(begin, end);
no, wait, wrong place
fixed
 
looks like boost.spirit or xpressive, same unreadable thing
 
I can read it just fine
 
sure
 
Hm, D's arrays are quite rich. Enough learning. Eating corn now, and then reading Crichton.
 
1:12 AM
@FredOverflow What you're (going to be) reading?
 
"First a forward slash, then an asterisk, then whilst (not an asterisk and then a forward slash), {recognize possibly another multi line comment, and consume the next character}, then consume the two ending characters".
 
@RMartinhoFernandes Prey, the novel about nano-technology. I read it last year as paperback, now I have the (forgot the word... more expensive) edition. Way more fun to read.
 
@DeadMG You don't have a function that takes a string?
@FredOverflow Hardback.
 
@RMartinhoFernandes Wut?
@FredOverflow I liked Prey a lot
 
I learned recently that hardbacks cost the same as paperbacks to print. That annoys the hell out of me.
 
1:14 AM
@RMartinhoFernandes I think it's "Hardcover", isn't it?
 
@FredOverflow "Hardback" in English
paperback and hardback
 
lol
 
A hardcover, hardback or hardbound is a book bound with rigid protective covers (typically of cardboard covered with cloth, heavy paper, or sometimes leather). They may have flexible sewn spines which allow the book to lie flat on a surface when opened, although most modern commercial hardcover books have glued spines. Hardcover books are usually more expensive then their paperback counterparts. Hardcover books are often printed on acid-free paper, and are much more durable than paperbacks, which have flexible, easily damaged paper covers and glued spines. Hardcover books are also margi...
 
@DeadMG I'm a total Crichton fanboy. Read all his "techno thrillers" except the latest one which was published after his death.
 
@FredOverflow Also valid.
 
1:15 AM
@FredOverflow I read many, if not all of them, but I forgot many of them
he was publishing since before I was born, I think, and read most when I was a lot younger
 
@RMartinhoFernandes How can that be? It's bigger pages, bigger font, more pages...
@DeadMG Have you read Jurassic Park? It's so much better than the movie, especially the second one.
 
@FredOverflow Well, assuming all other things equal (not all hardbacks are bigger than the paperbacks).
 
I still like to watch the first movie, though :)
 
@DeadMG I mean return (MakeEquality(L"/*") >> *( !(MakeEquality(L"*/") >> (multi_line_comment() || opt) >> eps) >> eps >> eps)(begin, end);. I think it would be a bit more readable.
 
@RMartinhoFernandes Most paperbacks I own aren't really fun to read. You have to split the pages very hard to be able to read the entire line.
 
1:18 AM
Doesn't seem to match /*/**/*/. Is that intended?
 
you still have the supporting source code?
 
@FredOverflow Yeah, some are very annoying. But hardbacks are so much more expensive.
@DeadMG I have all your code here (well what you last pushed).
 
yes, I expect you do
 
@RMartinhoFernandes Not if they're old and used. I get them 2nd hand for 1 cent plus 3 Euro shipping at amazon. And for some reason I love used books!
 
well, it should match /*/**/*/
 
1:20 AM
@FredOverflow Ah, I see. Sadly, I can't live without my books looking new. It's not something I can fight :(
 
because the eps consumes the next token without checking it
the eps eats the second closing asterisk
 
@RMartinhoFernandes Oh, most of the times the books are just fine, maybe a little spot on the cover or something. Nothing to lose sleep over.
 
return (MakeEquality(L'/') >> MakeEquality(L'*') >> *( !(MakeEquality(L'*') >> MakeEquality(L'/'))  >> (multi_line_comment() || eps)) >> eps >> eps)(begin, end);
try that
 
The Andromeda Strain
The Terminal Man
Congo
Sphere
Jurassic Park
Lost World
Airframe
Timeline
Prey
State of Fear
Next
^ Crichton novels I've read so far
 
@DeadMG Oh, I seem to have fucked up the parentheses with my transformation.
 
1:23 AM
well, this specific code should go with a std::wstring::iterator
I use a const wchar_t* in my current iteration, which is obviously close enough
 
@DeadMG: Have you read the "Crichtonesque" novel by that Microsoft guy?
 
@FredOverflow No?
 
Zero Day by Mark Russinovich
If you like Crichton, you'll probably like that as well.
Anyway, back to bed it is :)
 
night
 
Good night.
 
1:28 AM
you know, I'm re-considering using my own recursive descent parser
Bison's ... incompatibilities ... with C++ are irritating
 
concurrent_queue doesn't have a clear()?
 
it would be easier and faster to maintain the code if I didn't have to reduce everything to a C API
yes it does
 
@DeadMG I'm sorry man, I still don't get it. I feel like if two sequenced containers(vector/list/map/etc) have elements that compare equal in the same order, the containers are "equal" for the general case. For unordered containers(unordered_set/etc), if each element in one is also in the other, they are "equal" for the general case. Although I admit operator< has no meaningful default.
 
there's a bug in concurrent_queue
 
@DeadMG Deja vu?
 
1:30 AM
actually, you must have missed it
 
@DeadMG Then why do you loop through to work around the bug?
 
because try_pop doesn't have the bug
 
Ah, the bug is in clear.
 
in my university machine, the bug doesn't exist
 
1:30 AM
only on my home machine
so I must have failed to update it correctly or somesuch like that
 
I gather you're going with "one module per file". Am I right?
 
I should really make a proper wrapper to guarantee success, but I don't expect to be needing the fix again
do you mean a C++ class or a WideC module?
 
no
that's what the Collater class is for
to glue them together
 
1:33 AM
but it's soon to be eliminated
 
You could just add one more node to the tree.
 
what do you mean?
 
Add "Modules" rule that is a sequence of "Module"
 
why would I do that?
 
1:35 AM
Avoids the need for collater?
 
no
the parser parses many files, in parallel
and modules may be introduced repeatedly within the same file, for example
the need for the collater is fundamental to the design
 
@Xeo Ah, you took the easy challenge. Do it in Java now.
 
the way I'm going to eliminate it is simply by doing it's work in-place on the AST
 
Ah, I see, it's there to merge the module parts.
 
Xeo
@RMartinhoFernandes Java sucks, so no.
 
1:36 AM
@Xeo Wuss.
 
Xeo
@RMartinhoFernandes Also, I think the same trick the C# guy uses should work, no?
 
@Xeo Ah, possibly.
 
although I'm not too sure how I'm going to handle some constructs which Bison appears to not have a problem with and I've got no idea why
must be that LR magic
 
Xeo
Bison > DeadMG
 
nah
LR might be a great theoretical algorithm, but it has it's limitations
that fucking POD restriction, for one
and two, unlike LL, it can't be converted to use the hardware stack as it's "stack"
it needs an explicit, separate, heap-allocated stack
that, in my opinion, is a rather large fundamental limitation on what LR can do in terms of raw performance
that, plus the fact that it can produce some fucking unreadable output and code
and it's interface is ... questionable
 
1:43 AM
I agree with Xeo. Bisons are bigger than puppies.
 
mmh
 
bison > dog
 
I'm fairly sure that my code is effectively an LL and LR hybrid anyway
 
puppies will chew anythin
 
1:45 AM
photoshop
 
the proportions on them are wrong, especially the left one
btw robot, did you check my updated nested comment code?
 
27 mins ago, by DeadMG
return (MakeEquality(L'/') >> MakeEquality(L'*') >> *( !(MakeEquality(L'*') >> MakeEquality(L'/'))  >> (multi_line_comment() || eps)) >> eps >> eps)(begin, end);
This one?
 
yes
 
and?
 
1:50 AM
Looks fine.
 
awesum
anyway, I realized I was being completely idiotic about my previous statement
I can parse those things just fine
 
@DeadMG Nothing new, then :P
 
roflcakes
mmm... cakes
 
Btw, I like your comment style.
 
what comment style?
 
1:53 AM
// It was already inserted! Now we can happily read it to our hearts content, and modify the contents, verify it, etc.
 
heh
 
Most people would probably write // already inserted.
 
@RMartinhoFernandes somebody misspelled sock puppets
 
did you like my yylex trick with Bison?
 
1:54 AM
Haven't looked at the bison parts yet.
 
bison calls a free function called yylex to get it's token information
 
Xeo
Look at the compile time xDD
 
but I cheated and defined it as a std::function instead, then gave it a lambda
 
Xeo
Oh wait, it doesn't show that. :s
> 3 minutes 23 seconds ago
 
result: compilation error
 
Xeo
1:55 AM
Was when it finished
for sum(1..10000)
 
@Xeo Just wait a few days!
:P
@DeadMG As would be expected.
 
Xeo
@DeadMG That's the desired behaviour
 
oh yeah#
ok
 
Xeo
I wonder how long Clang would take
 
@Xeo Gosh, that's awesome.
 
1:57 AM
I definitely have the power of LR within me, so fuck you Bison, I hate your union shit, and it's time for me to get a new parser
 
lol "the power of LR within me".
 
I've Got The Powerâ„¢!
 
Xeo
Let's see how long Comeau takes
 
imagine my nerd arms shaking with pure energy!
 
Xeo
Anyone got a Clang copy handy?
 
1:58 AM
ok
I had the power
 
Xeo
lol
 
but the nVidia display drivers decided that displaying it was too much
and crashed
 
@Xeo on gcc 4.6.1 64bit: real 0m1.433s
 
my code: so awesome, the display driver can't render it
 
Xeo
1:59 AM
@sehe Nice, what are your specs?
 

« first day (448 days earlier)      last day (4504 days later) »