« first day (346 days earlier)      last day (4616 days later) » 

5:00 AM
@RMartinhoFernandes Nah that was just a code collision.
 
@LucDanton What?
 
I did try std::regex again at some point and then decided to move forward to use boost::regex + not Perl syntax except I forgot to change back to boost::regex.
 
@mootinator - make my boost download faster! :-D
 
boosts
 
@LucDanton I'm almost sure that these should work on Perl too.
 
5:02 AM
@RMartinhoFernandes Well I'm confused then.
 
In fact, Perl regexes are a superset of .NET regexes, and this works on .NET.
 
Got the source, what to do with it? I assume I need to build it?
 
./bootstrap then ./b2
Won't install it.
 
Will take a while.
For a certain definition of "a while".
 
hrm... what's next here?
 
5:06 AM
./b2 install if you trust the default, which I have no idea what it is on your OS.
 
mac os
 
@LucDanton how many matches do you get with boost::regex?
 
Otherwise move the headers + libraries to your favourite location and point your compiler to it.
@RMartinhoFernandes 201
 
Are you sure there's no other issue with your code? It's weird that only the first one matches.
 
the expressions look like they ought to work fine in perl
 
Right. Everyone and his dog took a subset of Perl's regexes, added to it, and then Perl took everything back. So, there's nothing in ECMAScript that Perl doesn't have.
 
3902 matches with regex_search.
Going to check the docs.
 
Oh, wait, I think I get it.
regex_match has implicit anchors.
 
Oh yeah, we don't have regexes for the full line.
> The algorithm regex_match determines whether a given regular expression matches all of a given character sequence [...]
 
5:10 AM
Emphasis original, as if to taunt us.
 
That explains why only the first one worked.
 
gah - permissions
 
So, either regex_search or pad the regexes with .*. The former seems more attractive somehow.
 
Now what, won't let me build...
 
@RMartinhoFernandes How many matches on your part now?
 
5:12 AM
Permissions are borked.
I can't run the main script.
 
bootstrap.sh?
 
I need to prepend it with sudo sh at which point one of the scripts it calls don't run.
@LucDanton yea
 
Yeah don't sudo that.
 
Do I even need to build for regexes, or can is it header only?
 
You need to build.
 
5:14 AM
ugh
What else can I try?
 
I'm not sure why ./bootstrap.sh would fail.
 
@LucDanton Permissions.
Line 218: Permission denied
 
$ ./bootstrap.sh --prefix=path/to/installation/prefix
 
@RMartinhoFernandes same thing
 
We need the error tbh.
Google it.
 
5:17 AM
sudo sh ./bootstrap.sh --prefix="~/Development/CPP/boost_1_47_0/"
./bootstrap.sh: line 188: ./tools/build/v2/engine/build.sh: Permission denied
-n Building Boost.Build engine with toolset ...

Failed to build Boost.Build build engine
Consult 'bootstrap.log' for more details
 
$ ls -l ./tools/build/v2/engine/build.sh
Do you have x permissions?
 
@RMartinhoFernandes On what?
 
On the build.sh file.
 
no
 
What did you download?
 
5:19 AM
apparently not
 
Hmm. Weird. $ chmod u+x ./tools/build/v2/engine/build.sh.
Maybe the default MacOS extractor suxxors and does not preserve permissions.
Or you downloaded the .zip!
 
I'm thinking .zip.
 
@RMartinhoFernandes yea
 
There you go then.
 
The .tar.gz should preserve the permissions.
 
5:21 AM
well, it built
so yay
Add the path to my project/IDE and include?
 
Did you $ ./b2 yet?
 
What about the stray \r though? Does the extraction utility take care of that?
 
I've concluded that that file was generated by the devil.
 
@LucDanton \r were?
 
@RMartinhoFernandes The .zip comes with Windows line endings.
 
5:22 AM
@mootinator Or the TSI dept. I have no idea why that place does what they do...
 
@LucDanton Ugh.
 
@RMartinhoFernandes just did, running
I want to reactivate the CS club so I can push for some positive change.
 
Remember when I mentioned something about "a while" a while ago?
That's this part.
 
Either the compiler will complain about the stray \r or whatever tool you used to unzip took care of that.
 
Okay, heh :-)
 
5:24 AM
@LucDanton Ok, I had a stray space in one regex in my previous run :) Now I get 3902 matches.
 
Great!
 
/me is watching a compiler take a long time. :-)
 
Is this an important line ` F 11:00AM-12:15PM 518 A Brown `?
 
@RMartinhoFernandes That's part of one.
 
It's not being matched.
@Moshe No, that's an entire line.
Line 11.
I think there's also a weird issue on lines 34-35.
 
5:27 AM
@RMartinhoFernandes Hrm... search in my browser doesn't even find it.
 
Line 11 is a similar one.
 
@RMartinhoFernandes Oh, whitespace, found it.
 
So, is it important or not? It's not being matched currently.
 
It is, it seems to be a subsection of the previous one.
 
Ok, and now look at lines 8-9.
Those are supposed to be treated as a single line, right?
 
5:29 AM
@RMartinhoFernandes Which ones? Not sure what you mean by that. I don't have the regex running yet.
 
The eight and ninth lines in the input file?
 
what is add_const_reference<T> all about?
 
0004    TY9       TTH      9:05AM-10:45AM  222    A     McTague          PARTLY ONLINE (HYBRID) | OVER 50% OF
                                                                         INSTRUCTION IS ONLINE
Note how it's broken after OF.
 
Right
I see that now.
 
5:31 AM
That's one way to put it, yes.
Is there a solution?
 
Those things always start after column 78, so there might be a chance :)
 
@RMartinhoFernandes what is add_const_reference<T> all about?
 
Is there a solution?
(still building boost, btw)
 
So, ^\s{77}[A-Z] matches the second part of those broken lines.
That's 29 more matches. I'd appreciate confirmation :)
 
@RMartinhoFernandes From me or from @LucDanton?
 
5:35 AM
Someone that can confirm it.
 
I can't at the moment.
still boosting...
 
So, now there's those lines with the times and such...
 
right...
 
Seems like they start on column 23.
Or 24 :(
Need a stronger pattern then.
Damn, why can't that thing even be aligned?
 
3953 matches?
 
5:38 AM
@RMartinhoFernandes can you do a simple search and replace on the spaces and realign them?
Ooh! Yay, Boost is built!
 
@Moshe Wait, we can cheat on the data beforehand?
 
I'm now trying to understand how to use the match resulsts.
 
@RMartinhoFernandes yes I don't care.
 
You should have said so before, you know.
 
I just want a CSV file with all of the course info.
I'm sorry.
My mistake.
 
5:39 AM
I'm a vim wizzard :)
 
oh, so go for it.
 
... that's not too reassuring.
 
I don't care the tool, I just want a CSV.
I cared about an hour and a half ago. It's way too late for that.
 
Wait, no need for C++ now?
 
@LucDanton It would be nice, but is it going to take hours, or an hour?
 
5:40 AM
@LucDanton What's not reassuring?
 
I have class in 8 hours, and I should be asleep.
 
@RMartinhoFernandes Being a wizzard.
 
I wanted this data sorted out though...
I really do appreciate all of the help though.
 
:%g/^\s\{77\}[A-Z]/normal kJ BAM! broken lines merged.
 
nice
@LucDanton Boost is ready.
 
5:43 AM
@LucDanton Oh, I didn't know you read Pratchett.
:)
 
... :-)
So, what happens now?
I have boost
@RMartinhoFernandes - Are you just doing that conversion then?
 
I'm trying to figure out how use match_result
 
lol
 
ok
 
I'm trying to figure out stupidity.
 
5:44 AM
@mootinator Oh, you're still here? I'm falling asleep in my chair.
 
@Moshe Yes, I'm normalizing the hell out of this.
 
@mootinator Huh? What sort thereof?
@RMartinhoFernandes Thank you!
 
Very good, it's as easy as using parentheses to make groups apparently.
 
How to delimit that file correctly with awk :P
 
Haha, I'm amused now.
I also have the grad student data, but that's smaller.
 
5:46 AM
Ok, I'll upload a normalized version.
 
It's all very easy until two fields are separated by exactly one space.
 
@RMartinhoFernandes thank you
 
What char is ^L? My vim shows a couple ones in there.
 
Do we use that as input instead and update our patterns?
 
No need to update. I merged the broken lines and removed the stars.
 
5:49 AM
@LucDanton Whatever you want, I just don't know if it really worked for all of the lines.
I'm not sure.
 
That's just with the multiline garbage removed?
 
Oh, ok, so let's keep going. Thanks @RMartinhoFernandes
 
@RMartinhoFernandes So remove patterns 3 and 4 (1-based)?
 
@mootinator Right.
I just don't know what to do with these lines:
                                  F 11:00AM-12:15PM 518 A Brown
 
5:50 AM
Yep
 
@LucDanton Pattern 4 is not needed, but pattern 3 is still needed.
 
They all more or less line up, but sometimes the time is shifted left 1 column.
To make room for a 4 digit number.
 
regex_type patterns[] = {
    regex_type { R"(^\s+([A-Z ]+)\s*$)" }
    , regex_type { R"(^([A-Z]{4}))" }
    , regex_type { R"(^\s+\*?\s+(\d{4}))" }
}
I've added () groups.
 
@RMartinhoFernandes What;s the question?
 
They're not of any of the 3 types you mentioned at the start.
@mootinator Oh, I can fix that.
 
5:53 AM
@RMartinhoFernandes Those should use the missing data from the previous line, but you're right, I didn't mention them.
 
Ok, so let's make them type 4.
 
Those are all the different times for the same section, how very denormalized =)
 
Once more, what are the four types?
 
We need to specify what data to get for each pattern now (and by doing so complete the regexps), don't we?
 
@LucDanton Yep, make groups.
Oh, damn, I found another kind of broken line.
 
5:55 AM
It's a bit unfortunate that matches[0] returns the complete match or whatever, the final code would have looked very much beautiful without them thanks to range-for.
 
@LucDanton That's a common convention.
Would it help much if I aligned the time columns?
 
@RMartinhoFernandes Which is why I'm assuming it does that even if I really have no idea other than my output is filled with whitespace.
 
@RMartinhoFernandes - Also, if you don't mind, the grad schedule is now posted too.
Except I did absolutely nothing to it after converting from PDF.
 
for(auto&& pattern: patterns) {
    boost::smatch matches;
    if(regex_search(line, matches, pattern)) {
        for(auto&& match: matches) {
            std::cout << match << ',';
        }
        std::cout << '\n';
    }
}
Is what I'm speaking of.
 
I was wondering about that myself. I'm wondering if an intermediate file with some delimiter jammed in at specific columns might help
 
5:58 AM
Instead I have to manually iterate :(
 
@LucDanton Make an adapter :)
 
@RMartinhoFernandes Range-for is too limited. All it needed was to accept pairs of iterators.
 
Oh I'm just an idiot
 
@mootinator huh?
 
Talking to myself.
 
6:00 AM
ok
 
@RMartinhoFernandes Well as easy as putting a pair into a namespace + ADL, sure why not.
> UNDERGRADUATE COURSES /* huge whitespace stuff */ ,
suggested fix?
Oh yeah
 
Deleted it.
 
> R"(^\s+([A-Z ]+)\s*$)"
Wait, so do I wait for new formatted data or what?
 
Yeah, wait :)
 
I'm on break!
Anyway Boost.Regex is very pleasing to use, no wonder it was accepted into C++11.
I included <boost/regex.hpp> and very fast compilation times still.
 
6:10 AM
                                           FCY 21
What are these lines?
:)
Still a few warts left. Want guidance.
 
5
Q: Why was pair range access removed from C++0x?

HighCommander4I just discovered that at one point, the C++0x draft had std::begin/end overloads for std::pair that allowed treating a pair of iterators as a range suitable for use in a range-based for loop (N3126, section 20.3.5.5), but this has since been removed. Does anyone know why it was removed? I find...

 
Oh wait, bad link,
Wait, it's the same link, DropBox doesn't regenerate it.
 
$ md5sum data.txt
d41d8cd98f00b204e9800998ecf8427e data.txt
 
Have a look at this version.
There's still a bunch of more special lines we didn't notice before :(
 
Mmmh, actually I can do template<typename T, typename U> struct pair: std::pair<T, U> {}; can't I? Too bad there's no inherited constructor support...
I'm seriously pissed at the lack of begin/end :(
 
6:17 AM
@LucDanton In std::pair?
 
user457812
I had some awesome oatmeal just now. Looked kind of like melted brains though.
 
@RMartinhoFernandes Yes.
 
@Moshe you there? There are more special lines that I don't know how to take care of.
This is all the garbage that is still left: dl.dropbox.com/u/13779444/extra.txt
 
slips out again.
 
6:33 AM
I'm going to assume everyone went to sleep and set down shop.
 
I'm reading.
 
6:44 AM
Are there any good online sources on how to implement a custom allocator (I know it is described in effective STL but I don't have a copy at hand right now)?
 
7:02 AM
@KillianDS don't know. you just have to be aware of the rebind stuff. if i had to do this i would look that up, it never stays in my memory... :-(
 
 
1 hour later…
sbi
8:16 AM
"Faced with choice between changing one's mind and proving there is no need to do so, almost everyone gets busy on the proof" J K Galbraith
 
I don't need to change my mind because I already prefer the first option.
 
sbi
@RMartinhoFernandes I bow to this brilliant statement.
 
8:34 AM
@sbi I'm having trouble deciding if that was sarcasm or not.
 
sbi
@RMartinhoFernandes Well, I took it as sarcasm. You were, after all, trying to "prove" that you don't need to change your mind - and doing so with the excuse that you already had! That's an interesting twist.
 
Oh, so your comment was not sarcasm.
:)
 
sbi
@RMartinhoFernandes Yeah, but I took pains to make sure my answer would start out misleading you to believe it was. :)
@RMartinhoFernandes The subject simply hadn't come up, because @Xeo wasn't here for a long time.
@JohannesSchaublitb You might be interested in this.
 
8:53 AM
@sbi oh that's good, but why are you hiding important stuff in seemingly off-hand remarks about apparently nothing?
 
sbi
@AlfPSteinbach Actually I am not trying to hide anything. :) (I was reading through last night's starred postings and replied to a few.)
And you guys will simply have to learn that even the most meager off-hand remark dropped by me here is a pearl of wisdom you should carefully study. :b
 
@sbi oh, you're damaging my hemorrhoids
i mean, rotflmao
 
Good to know the flags are being revamped.
 

« first day (346 days earlier)      last day (4616 days later) »