« first day (479 days earlier)      last day (4467 days later) » 

9:00 AM
What's up?
 
I had an idea about that parser stuff I was working on
it's no wonder that we couldn't construct a strongly-typed solution to the left-recursive grammar, because LR doesn't do that either
 
@thecoshman More like white-space supremacist.
 
it uses goto
what I need as an algorithm is the shift/reduce of LR and the non-goto of LL
but there's no guarantee that such would allow left-recursive rules
 
@Pubby :O
 
@sbi Also the day 1 panel is now online! This is going to be a great day :)
 
9:02 AM
unless I were to introduce automatic refactoring to the while(true) malarky
now I figure that if I trace the rules, it shouldn't be too hard to introduce such functionality
 
Are you sure it needs goto?
expr : expr '+' term   { $$ = $1 + $3; }
     | expr '-' term   { $$ = $1 - $3; }
     | term            { $$ = $1; }
     ;

term : '(' expr ')'    { $$ = $2; }
     | num             { $$ = $1; }
     ;

num : '0'              { $$ = 0; }
    | '1'              { $$ = 1; }
    ;
The wikipedia example for this grammar, doesn't have goto.
 
ok... so life-hacker has put up a guide on how to roll your own version of Megaupload
I predict a huge amount of clones are going to swarm around
 
yes it does
 
@DeadMG Did you put that goto in there only to sacrifice it later?
 
I checked the state table for the sample grammar
it has four entries in the goto table
 
9:05 AM
But that doesn't mean a goto in code.
That's a just a state change without shifting.
 
Xeo
Clang talk is up, yay
 
Clang is up, but Herb's keynote isn't?
 
which is effectively an actual goto
 
That constexpr/null gotcha in the clang talk was quite fascinating.
 
9:08 AM
@Xeo That reminds me of "The Great Gniahahaha Sisters" on the Commodore 64 :)
 
I don't see how I could possibly implement the goto table
 
Xeo
@FredOverflow Uuuhhh... if you say so!
 
Never played "The Great Giana Sisters"?
 
Shift to 1 => ++token; state1(token);. Goto 1 => state1(token);
 
Xeo
I don't think so.
 
9:09 AM
Why play Giana if you've got Mario?
 
hmm
 
Mario wasn't available on home computers.
 
never considered it that way
 
 
> Now I know why my elementary school muted our PCs on typing day.
 
9:12 AM
OMG the PC beeper sound!
> id try it if it didnt sound like a computer having a seizure
 
That looks like you're being taught how to type asdfasdfasdfasf.
 
A very important word, I suppose :)
 
First word taught to me was "ffff" and then "jjjjj" and then finally "ffjjfjfj"
 
@FredOverflow there was also a mario game for some odd home computer platform
I forget the name, but it was very odd mario game
 
@Pubby spoken or typed? :)
 
9:16 AM
Probably both
 
@thecoshman The one were Mario and Luigi play at the same time on a single screen?
 
His first spoken word was probably something like bwaaaaaaaah!
 
@Pubby I think that is just a baby drooling :P
 
litb's first words were probably typename and . template :)
 
@FredOverflow I'm not sure... it's a very odd platform. it has an emulator for the platform. It only saw the one mario game, and it has strange mechanics
 
9:17 AM
Or do you mean Donkey Kong?
 
IIRC you moved from screen to screen, rather then a scrolling level and you couldn't back track through the screens
 
Is that the one where Mario is a carpenter?
 
no, definitely a mario game
 
nope, not that either
This article is a list of games where the Nintendo character Mario has appeared. Mario, who serves as Nintendo's mascot, is a fictional character created by game designer Shigeru Miyamoto and voiced by Charles Martinet. He has appeared in hundreds of games, both with starring and less significant roles. The year indicated is the year the game was first released, most commonly in Japan. It was sometimes released years later in other regions of the world. The list indicates the game's primary platform, although some of the games have also been ported on a large number of consoles. List {...
 
9:20 AM
> I Am a Teacher: Super Mario Sweater
 
@thecoshman Are you sure you're not confusing Mario with Metroid? :)
 
Maybe it was that game Pubby linked to
 
This is the one I mentioned earlier.
 
no, it's not 'Mario Bros.'
@Pubby perhaps this one
but shit, there are a lot more Mario games then I thought :P
 
Super Mario Sweater? lol
I wonder if any kid ever wanted to become a plumber because of Mario :)
 
Xeo
9:23 AM
@FredOverflow I'd rather wonder if any turtles died because kids decided to jump on top of them...
 
Mario was a carpenter originally.
 
eew
@RMartinhoFernandes You mean Mario was Jesus?
 
I think I was thinking of the NEC, and that there was only one Mario game, but it seems there where a few
@FredOverflow because all Carpenters are Jesus?
 
Isn't Mario the Jesus of our generation? ;)
Other people go to church and pray to Jesus, I go to castle and pray to Mario.
 
> By Miyamoto's own account, Mario's profession was chosen to fit with the game design. Since Donkey Kong was set on a construction site, Mario was made into a carpenter.
 
9:25 AM
erm... @Fred, I think you need to get out more or less... not to sure
 
I see.
@thecoshman Just trying to be funny in the morning, no worries ;)
 
9:40 AM
When you get a call from someone you don't know answer by saying "Loeriesfontein sperm bank you whack it we sack it how may I help you"
Debbie hasn't made sense in a while.
 
@RMartinhoFernandes This simultaneously makes sense and makes no sense.
 
yeah, she has been rather dull recently
seems to be trying to hard to get the cheep laughs
 
Xeo
@RMartinhoFernandes Did she ever?
 
Xeo
lol, GCC compile time just increases
 
9:47 AM
is there a way to put a password into a ssh command?
sort of like you can do user@server
 
The source has GCC 4.7 numbers, not sure why the graphs don't.
 
I know I can do some sort of config script, but that's not really practical here
 
And those numbers are bigger still lol.
 
morning all... what is the maximum number of type qualifiers you can apply to a type? Is that mandated by the Standard or purely compiler-specific?
 
Xeo
@LucDanton GCC trunk doesn't count as 4.7?
 
9:48 AM
@Xeo It should. Have been having a headache all morning long.
I'm a bit disappointed the mailing doesn't have numbers for the whole build, to see how those numbers relate to the complete build process (linking and what not). Although I guess those are not as statistically meaningful.
 
@Xeo (on the second graph:) gcc has stayed the same or decreased compile times in all scenarios including -O2; only with -g does the compile increase.
 
Xeo
Okay, I seriously need a mail program. Hotmail sucks thanks to its unbelievable slowness
 
gmail?
Or do you mean an actual program?
 
Xeo
Actual program
 
@LucDanton GCC is getting better!
 
9:55 AM
@RMartinhoFernandes Hurray!
 
> pavanto Says: Bartosz, why don’t you write more often? I am always longing to read something new from you. I know it’s off topic but just wanted to mention it here.
lol the commenter at bartoszmilewski.com/2012/02/06/call-your-headhunter/… is learning how to say "Thank you".
 
Xeo
@sehe There is no comment with that ID!
 
Hi all =) My first enter to the chat :)
 
@Xeo link works for me.
 
9:58 AM
Do I know you from somewhere?
 
Xeo
@sehe It "works" for me too, but doesn't jump to a comment
 
Ha, you asked this one: stackoverflow.com/questions/8839943/… :)
> Your answer to "Is C++11 Uniform Initialization a replacement for the old style syntax?" was migrated to Programmers.
Thank you for reminding me.
But the answer was deleted...
 
Xeo
lol
 
And apparently the answer was not migrated, since I can't see it.
 
sbi
@RMartinhoFernandes Indeed, she somewhat deteriorated. Too bad, because when she was good, she was really good.
 
10:06 AM
Has anybody here worked with DHCP packetsa manually and building it in C++ ? I need help
*packets
 
@Xeo I use to use thunderbird, which was alright
 
@FredOverflow how about 'undefined behaviour', prvalue, sequence point, whole-expression, temporary lifetime :) That template I would associate slightly more with Xeo
 
0
Q: Suppression files for Qt memory leaks with Valgrind

linelloI usually write my classes in C++ and check if they leak memory using valgrind on Linux platform. I'm not satisfied until all the heap memory is freed. Starting to write in Qt, I found how many leaks valgrind detects, also on a simple project. They are so many that it's difficult to detect my sa...

 
sbi
@user1131997 I guess that's a "no", then. :(
 
Is Qt this leaky?
 
sbi
10:10 AM
@user1131997 You can edit messages here, for 2mins. You might want to read the newbie hints linked from the panel at the right of your browser window.
 
Xeo
@sehe I think there are a few people in here that aren't necessarily uninterested in templates. :P
 
@Xeo I shan't think a double negation would not be less than appropriate barring some absent conditions
 
@sbi thanks
0
Q: Building DHCP packet ( DHCPDISCOVER ) , packet structure

user1131997I'm trying to build DHCP packet in then send it via UDP ( "0xff.0xff.0xff.0xff", 67 port ). I have sucessfully connected to my DHCP server, but I have problems with first packet structure ( DHCPDISCOVER ) as I see, but I have built it from RFC && Wiki, and have checked all fields/size in...

 
@Xeo I know that? I'm just saying, you seem to be more focused on them than others. Litb has always struck me as the compiler-writer guy 'obsessed' with the exact semantics of the language, less than the 'front-end' facilities so to speak. It is a gut feeling
 
Xeo
@sehe Consider my mind confuzzled.
 
10:29 AM
I love how to close a putty connection at work, I have to exit nearly a dozen times thanks to all the shells and hopping
 
Can't you just Ctrl+D all the shells?
 
@RMartinhoFernandes o_0 what ctrl+D do?
 
Marks end of input.
 
mawning
 
I use that all the time to exit shells.
Less typing.
 
10:34 AM
can anybody help me here. I have a compiler error I'm not sure how to fix, and just a question.
 
will have to try to remember that one :D
oooh
 
@TonyTheLion We had that one a few hours ago. typename ptr_vector<T>::iterator.
 
Xeo
2
Q: Template classes & operator overloading

jordaninternetsHow do I go about overloading a template class like below? template <class T> const_iterator& List<T>::const_iterator::operator++() { current = current->next; return *this; } template <class T> const_iterator List<T>::const_iterator::operator++(int) { const_...

 
Xeo
To be exact.
Oh, and Tony: //CPP file BAAAAD
 
10:36 AM
Is that error from MSVC?
 
@Xeo right, so perhaps I'll just have to put everything in the header
@RMartinhoFernandes yep
 
Xeo
@TonyTheLion Not only perhaps. And the typename problem still applies
 
yea
why is it so bad though?
 
Because it just doesn't work with templates.
 
Xeo
What, template in .cpp?
 
10:38 AM
I just write all my templates in-class. I only write member functions of templates out-of-class when I need to break dependency chains.
 
I always define my members out of line*.
*: unless when I'm lazy.
 
Xeo
@RMartinhoFernandes Unless you want to only provide definitions for (partial) specs of the class
Or special definitions
 
@Xeo yes
so I should define it in the class where I declare it? or can I just copy-paste everything under my class definition?
 
You can just the latter.
 
Xeo
You can paste it under the class def
 
10:42 AM
phew, otherwise that would have meant a lot of added work
lol
 
Xeo
Robot, I need your super-search-power. Find the question on templates in cpp files.
37
Q: Storing C++ template function definitions in a .CPP file

RobI have some template code that I would prefer to have stored in a CPP file instead of inline in the header. I know this can be done as long as you know which template types will be used. For example: .h file class foo { public: template <typename T> void do(const T& t); }; ...

^ this isn't the one I remember
 
> Find the question on templates in cpp files.
WTF.
35
Q: Why can templates only be implemented in the header file?

MainIDQuote from The C++ standard library: a tutorial and handbook: The only portable way of using templates at the moment is to implement them in header files by using inline functions. Why is this?

 
oh thanks
 
Xeo
Damn!
 
Can you guys read the code in this paper: open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3334.html?
void MyOldRoutine(const int* elems, int N) {
  for (int i = 0; i < N; i++) { assert(elems[i] == N - i); }
}
Doesn't look like valid C++ to me.
 
Xeo
10:46 AM
ZALGO!
 
sbi
@Xeo Just search . That's the fasted way I know to find canonical answers.
 
can't read
 
Xeo
Or not.
 
He comes?
 
Xeo
10:46 AM
@sbi Yeah, I didn't remember that one was a
 
we have a bot
he can search thing fast :P
 
sbi
@RMartinhoFernandes I can read that code just fine. I just can't understand the gibberish. :-/
@TonyTheLion He might not be a search bot, though.
 
we'll have to write a binarysearch for SO so he can do some search for us
lol
 
void MyOldRoutine(const int* elems, int N) {
  for (int i = 0; i < N; i++) { assert(elems[i] == N - i); }
}
Switch encoding to UTF-8.
 
Xeo
I'd make a Linux find joke right now, but I can't remember the damn syntax.
5
 
10:48 AM
:P
 
Xeo
Like with Xeo@robot$ find ....
 
Wait, why did Firefox use something other than UTF-8?
 
Xeo
@LucDanton How do I do that in FF? oO
 
@Xeo View > Character Encoding.
 
ok I have another question about my ptr_vector. The template itself takes a typename T and the iterator has a vector<T*>, so when I do ptr_vector<myclass>, the type of myclass is T*. my push_back takes a T*, is this correct?
 
10:50 AM
@RMartinhoFernandes I'm no interwebs magician but perhaps there's a discrepancy in the actual encoding used and some of the content tags. Or whatever it is they call it these days.
 
@Xeo I always have check it before I run find.
 
Xeo
@RMartinhoFernandes Okay, that's already UTF-8 for me...
Wait, it wasn't in the n3334 page
 
Yeah, that's kinda the point.
 
[Exception... "Component returned failure code: 0x80520010 (NS_ERROR_FILE_NO_DEVICE_SPACE) [nsINavHistoryService.setCharsetForURI]" nsresult: "0x80520010 (NS_ERROR_FILE_NO_DEVICE_SPACE)" location: "JS frame :: chrome://browser/content/browser.js :: BrowserSetForcedCharacterSet :: line 9099" data: no]
fsck.
 
sbi
@LucDanton <html><head><meta charset="utf-8"><title>Proposing array_ref&lt;T&gt; and... Looks good to me.
 
Xeo
10:53 AM
@RMartinhoFernandes In any case, that proposal is a step forward! Views ftw.
 
Hmm, seems like Firefox had Latin-1 set as the default encoding. Argh.
 
@sbi Passing that through a validator nets errors on this particular attribute.
 
sbi
@LucDanton Ah, so it only looks good, but it uses some garbled syntax.
 
@Xeo Yep. I was going over it to adapt my own clumsy implementations to the same interface.
 
hey robot
 
10:59 AM
Hey.
 
I realized in our discussion earlier that I failed to accurately articulate my position
 
Wouldn't be the first time :)
 
the goto table isn't just impossible because of goto, but because of the stack
it's indexed by the rule that you just reduced
but in a strongly-typed parser, you can't, because those two rules have different result types
 

« first day (479 days earlier)      last day (4467 days later) »