« first day (475 days earlier)      last day (4564 days later) » 

12:36 AM
Woot! MSP swag en route!
 
12:59 AM
Microsoft Student Propagandist?
kicks himself at the obviousness that @Moshe meant Medical Services Plan
 
@moot do you know anything about RLE?
 
Medical Services has swag?
 
I'm in the other class, trying to help someone with this.
 
@YiJiangs独角兽 Your patient identity bracelet, of course
 
I'm at a wedding now, but smartphones are terribly useful.
 
@Tim thanks for the help before, btw.
 
Not sure that I contributed all that much, but sure thing.
 
You made me think. That's a contribution.
 
@Moshe Real Life Experience?
 
Run Length Encoding
 
1:15 AM
@Moshe Like ZIP?
 
Oh, not really like zip.
I see. And, no I can't say I have any experience with it.
 
I'm trying to work out that assignment.
 
It has pseudocode? That's like including the solution. =)
 
Heh I thought so too. I'm doing something wrong though.
 
1:21 AM
The encoder pseudocode is kinda stupid.
 
Why?
 
Output both of them The whole point is to not output every byte when you have a run.
It should be more like increment current run counter
 
I think he means to the terminal. Cout, not a file stream.
 
And output the byte and the count at the end of each run.
Why would you need to output everything to cout?
I think he was just on crack.
@Moshe And wouldn't repeating A 66 times break that encoding?
Or anywhere from 65-121 assuming you were limiting your character set to alpha characters.
It sounds like we're teaching students to not choose their optimizations carefully is what it sounds like.
Although he says:
> Note that the value can't be greater than 255
It seems to be implied that the value isn't greater than 9, because the encoded file has ascii numbers in it.
 
@moot does it help that he wants them to use arrays too? He doesn't mention it, but that's what I was told.
Char array limited to 1000 max chars.
 
1:36 AM
That isn't really a question. I wouldn't expect someone to want me to store binary or text data in a complex data structure.
 
1:48 AM
I can do the encoding in just two char variables, @moot. Is that wrong?
 
No, it's just not especially efficient to do unbuffered disk reads/writes. Of course if you're using a class which buffers the reads/writes for you I don't see what's wrong with that.
 
Wait, so the whole file should be read into an array first?
 
Not necessarily.
An algorithm capable of compressing large amounts of data would read in a few blocks at a time, process those, and write blocks to disk as necessary.
Finding a nice balance where the process isn't too I/O bound ideally.
But if you're using a high level language like C# or Java, you can just ignore that part most of the time and use a BufferedStream of some sort. I don't recall how C++ I/O works exactly which is what I presume you're using.
Anyhow, I've been delegated some housework... Hooray.
 
Ok, enjoy!
 
 
3 hours later…
5:19 AM
@moot - you mentioned the bit about 9 vs 255 earlier. My friend pointed out that we were using an int as the counter. Char does just as well and limits to 255 instead of 9.
 
5:42 AM
@YiJiangs, @balpha. Just for the record, it wasn't working because... I forgot to include /review in the includes for the userscript! :(
@Moshe, hello. And... goodbye :)
 
 
8 hours later…
1:14 PM
@Benjol Whoops! I've done that before too, if it makes you feel better. :P
 
1:47 PM
Not every noob question is terrible. Here's a good one.
Hey @Benjol.
 
 
1 hour later…
3:08 PM
My RLE Encoder (Seems to work, except it doesn't it encodes the count as an int for some reason.)
My RLE Decoder (Doesn't work yet because I can't encode the count as a char yet.)
 
3:40 PM
@Moshe That was my point about repeating A 66 times. if you write 'A' + char(66) to a stream, the stream looks like 'AB'.
Hence why it isn't safe to optimize out the run length of 1 if you're doing RLE that way.
What do I know though, I just write code in the real though. Professors have all of that impractical paper writing experience.
 
3:57 PM
@mootinator Hehe. Ok, so now I'm having this weird behavior.
Almost got it to work.
 
Wow, I can't write this morning, can I?
@Moshe What weird behavior is that?
 
When I use an int for my counter in the decoder, it decodes properly but won't decode numbers. But, when I use a char, it gets the numbers and spacing all wrong.
 
Spacing all wrong? You mean you have control codes in the document?
 
Control codes? As in ASCII less than 23 or whatever?
 
Yes.
 
4:02 PM
Yes.
That's how I was encoding it. But the file stream reinterpreted it as an int for some reason.
 
I'm just wondering where the spacing is all wrong. If it's in the encoded document, that's expected because if you open up a file containing char < 23 you have funky control codes in it.
 
Do I need to offset by 23?
Well, hang on.
 
No, you need to tell your prof not to write such an idiotic assignment.
 
It's not my prof, but that's besides the point.
 
Otherwise, you should offset by 48.
So that it uses ASCII 1-9.
 
4:04 PM
@mootinator In the encoder?
 
If you want to be able to open the encoded file and see the numbers 1-9, which the assignment seemed to imply, yup.
 
I am just wondering if my encoder is encoding incorrectly too.
 
Otherwise, just don't open it.
 
Hah. :-) So line 46 of the decoder is an int or a char?
 
Who did come up with the assignment. Someone needs to slap that person.
 
4:06 PM
@mootinator I suspect that I haven't heard the half of it, btw.
 
a char
I think...
 
When I try outputting it as a char, I get weird representations of it.
 
They aren't weird representations.
 
But then it actually loops too many times.
 
Because you offset the output by 48 and didn't account for that in the decoder?
 
4:14 PM
I didn't offset.
I'm so confused now, this is insane. Just saying.
 
I apologize.
 
No need to, you didn't write the assignment.
I'm considering getting off of my rumpus and taking the train to school even though I have no class today to ask the chairman what this assignment is all about.
 
1 sec.
 
ok
 
 
4 hours later…
8:03 PM
notarealquestion.appspot.com now allows you to sign your win with your account on the particular site
(experimental API V2 support)
have fun breaking it :)
 
I'm shocked that the silence was finally broken and it had nothing to do with the SO mod election.
 
Congrats new mods!
Also, >_< :(
 
@jjnguy :(
 
Whaaa?
:(
 
@Pekka I am also surprised.
 
8:07 PM
I cast my super vote for you. The one I extorted out of @balpha for suppressing photographs of how Unicorns are really made
 
<_<
2
>_>
 
I was really sure it would work out this time. Oh man. But next time!
Who made it then?
 
@balpha ah, thanks
 
@Pekka Don't you mean the photo of where sparkly glue sold to elementary schools gets made?
 
8:08 PM
Congrats!
@PopularDemand yeah, it's the same factory. There are, um, synergy effects
I won't go into more detail. In case some readers haven't eaten dinner yet.
 
I am about to head out for lunch.
 
Right. I forgot you Americans are... somewhat behind the times.
 
It's past 3:00 already!
 
It's 9pm!
 
@TimStone Well... I wanted to see how the election turned out.
 
8:12 PM
Are there any brits in here?
 
I noticed that the UK have now switched to the metric system on food packaging.
When was that introduced?
How is it received in the public?
Although I guess I can Google it instead of conjuring Marc :)
 
@Pekka switched a long time a go. A few people complained most people are fine with it - mid/late 90s I think. Complaints died off recently
 
@awoodland Interesting. I thought it hadn't been that way when I spent time in the UK in 2000/2001.... But maybe I'm misremembering.
 
are you sure that's "2000/2001" in metric years?
 
8:17 PM
@Pekka - a lot of stuff still is labelled with both or has pre-metric units converted to metric. Jam comes in 454g jars.
 
@awoodland hahaha! Nice.
@balpha oh, sorry. I mean the imperial year 793, 3 fifths and 9!
I would love for the old, pre-1972 pound to still be around, though. That had a certain charm to it. Although I would probably never have understood how it works.
 
9:08 PM
I love StackOverflow.
 
lol
 
 
2 hours later…
11:31 PM
Ok, it works! For real this time.
 
I find your lack of unit tests disturbing.
 
@mootinator How do I write a unit test? I've already tested several files.
 
It's just a program which would test several inputs against known outputs.
They don't teach TDD in first year yet? :P
 
Ah, ok. I'm not sure how to set that up, because the inputs are not human readable/ typable.
 
Base 64 enco... yeah don't bother.
 
11:43 PM
@mootinator - Care to take a peek at the new code?
 
Maybe later; a bit busy now.
 
Ok, I'll just leave these here then...
 

« first day (475 days earlier)      last day (4564 days later) »