« first day (527 days earlier)      last day (4424 days later) » 

9:00 PM
@MooingDuck readstring basically takes care of spaces and newlines and such .... i use %s and prints int's too ... it's weird :S
 
@MooingDuck ideone always returns -1.
 
@RMartinhoFernandes oh
@RMartinhoFernandes wierd.
@Beginnernato why did you make that function? That's the same as scanf("%20s", mystring)?
 
@RMartinhoFernandes i dont think i could use "scanf("%20s%d" " .. since i sometimes will input things like just "highscore" and it produces the highest int.
 
@Beginnernato I don't understand the problem.
oh, you want to do the reads one at a time? So do them one at a time.
 
@EtiennedeMartel People are stupid. #shocked
#notreally
 
9:03 PM
Idiots are stupid.
 
@MooingDuck yea i kinda want to read one at a time
 
@Beginnernato: I don't see anywhere in the assignment that says you must do reads one at a time
 
@Insilico well i thought reading one at a time might benefit me ? i guess nt
 
@Beginnernato what you'll want to do is scanf("%11s", ... to get the command, and then if that matches "score", then you proceed to do scanf("%20s%d", ...
luckily, for this assignment, you don't really care about newlines
wait, that URL looks familiar. Are you "LearningC"? The same one with the linked lists and such.
 
yea :)
lol
 
9:08 PM
I still hate your teachers
"You may not use recursion in any of your solutions. "
 
@MooingDuck i know everyone hates them
 
dude
I told you to stop endlessly coming in here an spamming the place up with your C questions
 
@Beginnernato: Although Mooing Duck's reasons are probably different from your classmates
 
...
 
@DeadMG ma bad :S
 
9:09 PM
@Beginnernato Oh that explains.
Lols
 
@DeadMG just want some idea' im totatlly lost
 
I feel kind of sorry for you though
 
@Beginnernato Last time I checked, you tried that, and I assure you that I do not care.
 
Shit. I accidentally told Firefox to open a 250 MB image.
 
@DeadMG am i not allowed ? :S ...
 
9:11 PM
@Beginnernato: Your TAs aren't any help?
 
@Beginnernato You can of course come in here, but the moment you start crying baby tears "My professor won't let me do this and that" or "I am not allowed to use StackOverflow" you're going on mute
 
Had to kill it with fire.
 
Surely they have a much better idea about your assignment
 
@Beginnernato No.
 
250 MB image?
What's this, a 100 megapixel image or something?
 
9:11 PM
woops my bad guys
 
Or is it like a bitmap?
 
@Beginnernato you have been told many times before
 
@Beginnernato: Your prof doesn't care.
Shouldn't even.
All he cares about is that you actually learn your stuff. We can help with that
 
@Insilico 17000x11000.
 
@Beginnernato you're lucky I'm a compulsive helper :(
 
9:12 PM
@RMartinhoFernandes: So it was about a 100 megapixel picture. :-)
 
Hmm. I wonder what would happen if I dared to onebox it here.
 
Fun
 
I won't try it, I promise.
 
in the Dwarf Fortress sense
 
@RMartinhoFernandes Link? I'd be happy to see how Opera fares
 
9:13 PM
@RMartinhoFernandes onebox it in a test room
 
@sehe yeaaa .... i dont want answer's ... just some guidance i guess :S
 
in the Java room
 
@MooingDuck Want to get banned?
 
@sehe pft, I merely offer bad advice, he's the one who'd get in trouble :D
 
@MooingDuck People have been castrated for littler offenses
 
9:15 PM
smaller
peasant
 
Here's a secret: don't go to the sandbox right now.
 
goes to the sandbox
 
nah
nothing shows up
 
412kb/s
ETA 9 minutes
 
Well, Firefox totally stops the world for me.
 
9:16 PM
I don't see jack
Firefox seems to be running okay
Albeit without showing the picture
 
@DeadMG Buy a patience upgrade. Don't buy used patience off eBay, it doesn't work anymore
7m 32s remaining - 669kb/s
 
What's this a picture of?
 
200000 galaxies.
 
@RMartinhoFernandes chrome seems to have no problems
 
9:17 PM
Meta penises
@MooingDuck You see it yet?
 
@sehe no, I see a loading doohicky
 
@MooingDuck Define "no problem". I'd call that: no picture
 
Chrome hasn't loaded it yet
which is odd, since I've got a 4MB/sec connection
 
@sehe it appears to be loading, no crash, no freeze
 
but it still seems to be responsive
 
9:18 PM
Yeah, it should take a few minutes.
 
@MooingDuck Sweet, so now we know your browser does downloads. Yay
 
@DeadMG DAmmit, am I the only one with a crappy browser?
 
@RMartinhoFernandes upgrade to IE
 
failfox, bro
 
IE is actually downloading the thing
 
9:18 PM
%11s <---- what does the number 11 mean ?
 
@Beginnernato it stops reading at 11 letters
 
I can slowly see the JPG being rendered
 
ohh ok
 
sbi
@LucDanton No, they need to be called "two foot transplants". (And I had been saying this for hours, when you asked that.)
 
@Insilico oh, I see white while it downloads
 
9:19 PM
@Beginnernato:
Scanf format string (which stands for "scan formatted") refers to a control parameter used by a class of functions typically associated with some types of programming languages. The format string specifies a method for reading a string into an arbitrary number of varied data type parameter(s). The input string is by default read from the standard input, but variants exist that read the input from other sources. Usage The scanf function, which is found in C, reads input for numbers and other datatypes from standard input (often a command line interface or similar kind of a text user inte...
 
@RMartinhoFernandes I'm trying to remember which of my friends use firefox so I know who's wall to post it on.
 
@sbi Oh, noes, this thing is still running?
@MooingDuck You're evil.
 
sbi
@RMartinhoFernandes No. Why do you think so?
 
ok
 
Eh this download is taking a while
 
9:20 PM
I think Chrome is fail
really, it should have dled the image by now
 
Current status (two downloads simultaneously):
 
oh, maybe my connection's just super-slow today
apparently just like, 230kbs
 
@DeadMG What's eso's upload? How many of us are downloading now?
 
good point
 
9:22 PM
@DeadMG i'm getting server 134.171.75.1, you?
 
@sehe As if he knows.
 
Done: 2012-03-26 23:22:09 (671 KB/s) - `eso1213a.jpg' saved [265805881/265805881]
 
chrome just crashed this tab and the image tab
 
Mwhahahaha.
 
when I went to inspect the image properties
 
9:23 PM
@MooingDuck: Really? IE is just chugging along fine
Ah okay
 
@sehe That was wget or Opera?
 
@RMartinhoFernandes opera renders the whole picture in 15s (indepent from download) and uses 501M reserved set in doing so (978 Virt, but that's with 20 tabs open)
 
Did you imspect the image properties while it's downloading?
 
Btw, that's a whopping 0.004% of the sky.
 
@Insilico yes I did
 
9:24 PM
@RMartinhoFernandes I did both: I let opera render incrementally (see sshot ^^) and I used wget, in case it went awry. It didn't
 
@sehe So, both finished?
 
@Insilico No, I had patience, unlike the rest of you :)
@RMartinhoFernandes Yup
You know what's silly, switching tabs will re-render the jpg, taking about 8 seconds again
 
Why the hell does IE use ~100 threads
 
Ah, it's a memory optimization: only when the tab is shown, the bits are mapped into process space (reserved set jumps to 1.2Gb); switching back to 'Lounge' tab drop reserved set to about 200Mb
 
9:27 PM
@Insilico IE uses 100 threads to go 100 times faster obviously!
 
@MooingDuck Wut? I use opera
 
@MooingDuck: It's because I have a 100-core machine, obviously.
 
@sehe either way
@Insilico sometimes threads stall, so it's good even on a 30ish core machine
 
What now? I can't access code.google.com without being logged in?
 
@sehe my memory doesn't go back that far
 
9:28 PM
Fuck is wrong with the Internet?
 
@RMartinhoFernandes 4chan
 
> 7.3.203 (fixed) MS-Windows: Can't run ext. cmd without console window
Huh.
Y U NO BINARIES.
grump grump
 
@RMartinhoFernandes Chrome uses 2.7Gb virtual, and also 998Mb for the renderer process while showing the jpg
 
Dear Internet: I don't want to fucking login for every minor action I take.
Also, dear Internet: I'm tired of fucking passwords. Can we please move on?
 
9:29 PM
@RMartinhoFernandes It must be that new, improved, 'central' signon/single EULA thingie they promoted over the last two months
 
what do you propose to replace passwords?
 
@DeadMG: Smart cards?
How much is a smart card in bulk quantities?
 
@Insilico Those require card readers, and fuck that shit
 
So passphrases instead of passwords?
 
9:32 PM
@RMartinhoFernandes Firefox just has another Mem/Speed tradeoff: it took about a minute (!!!) to render, but it uses only 371Mb in working set
 
How much of the sky does the picture cover, again?
 
@Insilico That's the same.
@Insilico 0.004%.
 
O_O
 
Total Perspective Vortex hit you, eh?
 
Are pictures released by ESO public domain?
I know almost all the pictures released by NASA are public domain
 
9:35 PM
@Insilico CC-BY, I think.
 
That's probably close enough (I'm no lawyer).
 
@RMartinhoFernandes in other news, feh doesn't load it (No Imlib2 loader for that file format - IOW: fail)
 
My downloads must be slow as shit today
 
hmm, Pandora has gone from thinking I only like rap, to thinking I only like instrumentals like Enya. I wonder what I voted on?
 
Justin Bieber?
 
9:37 PM
@MooingDuck: I assume you don't like either genres?
 
@RMartinhoFernandes Gimp took about 12 seconds to load, another 20 seconds to convert to sRGB using the embedded color profile
 
@Insilico I actually liked the rap, but I was trying to get more of a 90's pop radio in there.
 
Closing Firefox yielded ' This program does not respond. Force quit?' - a few seconds before it finally shut down properly
 
@MooingDuck: You can't just tell Pandora "I want 90's pop radio stuff"?
 
how did you guys learn to program, from school or learned by your own ?
 
9:39 PM
@Beginnernato By myself
 
@Beginnernato: I did on my own
 
@Beginnernato a book someone handed me
@Insilico not really, you build from a list of artists/songs
 
im starting to think i need to spend this summer on some serious "coding for fun"
 
@MooingDuck So, you grab a list of 90's pop radio artists?
 
@MooingDuck True enough. I got handed a book. It was my password to using the IBM PC of someone we knew: I had to read it before I could use his PC (I bet he thought I'd never read "MSDOS 3.0 + GWBASIC", so he'd be safe)
I was 8-9 yrs/old
 
9:40 PM
@RMartinhoFernandes I did. And then I upvoted one Enya song, and it skewed the list more than I thought it would, by a lot.
 
I think my music tastes would just confuse the hell out of Pandora
It's really random
 
@sehe I was taking a "programming class" where the teacher handed me a book, told me to email him weekly progress reports, and he'd be in the next room with his real class if I had any questions.
 
I grabbed a book from the library.
 
I actually didn't grab a book for a long time
My first C++ book was actually Effective C++
 
@RMartinhoFernandes I learned BASIC from a book in the library before the class, but I didn't know how to use it well, I barely count it.
 
9:42 PM
@RMartinhoFernandes Oh, I grabbed a dozen books. But that one I got handed was the key: it told me much more than I should have ever known about computers: you can make them do stuff
 
Then I "appropriated" a computer that had a "Broken" sign on it, except it wasn't broken, it just couldn't boot Windows, so you were stuck with DOS. That was not an hindrance if all you wanted to run was TP7.
 
@RMartinhoFernandes That was a good time.
 
I have no idea what my book was, but it came with a CD with a Borland command line compiler on it, so that's how I learned :(
 
C-F9 Run! F5: Zoom/Unzoom, ^K^B begin block selection, ^K^E end IIRC
 
9:44 PM
Size: 265805881 bytes
I didn't realize IE was done downloading
IE seems to have no trouble with big-ass pictures
 
@RMartinhoFernandes I had no PC, but I just grabbed any book I could. I learned all about 3D graphics on the Amiga (in German), Assembly language on the MSX2, Signal Processing, Lotus 1-2-3, Turbo Prolog, etc. etc.
@RMartinhoFernandes Maximize, sorry, bad wording
Only started doing actual C++ when I got 'conscious' about programming (not just toying anymore).
I knew just about enough (read: close to nothing) about C++ when I got my first job. Obviously as a C++ programmer on the critical path a of a big-ass SAP R/3 implementation.
Good times, that
 
SAP? As in sap.com ?
 
@Insilico Absolutely. Interfacing serial hardware interface to ABAP modules. I picked Borland C++ (I was green, remember). I think it was around 5/5.5 back then
 
what's a condition to end a loop when done reading 1000 lines or when eof ?
 
@Beginnernato: What do you think?
Seriously, think about it for a moment
 
9:50 PM
@Beginnernato It's a condition that returns 'true' when at eof, or when done reading 1000 lines.
 
reading 1000 lines or when eof
 
So, you need to count lines, and test whether you reached it.
 
#if !defined( CPP_DECLARE_UNUSED )
#   define CPP_DECLARE_UNUSED( argName )    \
        (void)(argName, void(), 0); struct argName
#endif
OK?
 
You've spent all that time on this silly macro? :P
 
Why struct? Looks more convoluted than I'd expect, really
 
9:51 PM
he he
 
@sehe To hide the name, apparently.
And that entire expression is to avoid calling overloaded operator, and operator void.
 
ohhh alrite .. thnks ... but for eof i've been using "while (1 == scanf("%s",(char*)s))"
 
@CatPlusPlus Why would you hide 'the name' if you declare it? Not declaring it is simpler: you'll have no name, and it will not be unused
@CatPlusPlus I got that idiom
 
@sehe We tried to tell 'em, but they kept going.
 
9:53 PM
@sehe because the argument name has value as documentation
 
@Beginnernato So, don't change it. Do you know how to step out of a loop from the middle?
 
void foo(int /* bar */) { ... }
 
But those comments do not nest
 
@sehe from the middle? like break ... ?
 
@CheersandhthAlf So, you are declaring unused structs? Use case?
 
9:54 PM
Argument names don't nest, either.
 
@Beginnernato Bingo!
 
arrite
 
@Beginnernato so, don't change the loop condition, but just add a break if linecount>1000
 
Also, I have to say, non-nesting /* is another stupeed thing in C++.
 
@Beginnernato Feels good, eh, to come up with it yourself?
 
9:55 PM
Making lexer handle that is trivial.
 
@sehe it does :) , thanks for the guidance thou
 
@CatPlusPlus No you don't. But go ahead anyway
 
@sehe Why thank you.
 
@sehe Like this:
        static raw::LResult CALLBACK windowProc(
            raw::WindowHandle const window,
            raw::UInt const         messageId,
            raw::WParam const       wParam,
            raw::LParam const       lParam,
            UINT_PTR const          subclassId,
            DWORD_PTR const         subclassData
            )
        {
            CPP_DECLARE_UNUSED( subclassId );

            InvisibleCommandForwarderWindow const*  pCppObject  =
                reinterpret_cast<InvisibleCommandForwarderWindow const*>( subclassData );
^ The signature is forced by the API.
 
That seems like a lot of work into a macro
What's wrong with:
 
9:57 PM
static raw::LResult CALLBACK windowProc(
        raw::WindowHandle const window,
        raw::UInt const         messageId,
        raw::WParam const       wParam,
        raw::LParam const       lParam,
        UINT_PTR const          /* subclassId */, // HEY THAT WORKS
        DWORD_PTR const         subclassData
        )
    {
Or even might go crazy and do it this way:
 
@CheersandhthAlf Ok, but what would struct subclassId do?
 
@CatPlusPlus Damn you CatPlusPlus damn you
 
static raw::LResult CALLBACK windowProc(
          raw::WindowHandle const window
        , raw::UInt const         messageId
        , raw::WParam const       wParam
        , raw::LParam const       lParam
        , UINT_PTR const          // subclassId
        , DWORD_PTR const         subclassData
        )
    {
 
@CheersandhthAlf I 'get' the (void)(subclassId, void(), 0); part
 
Because apparently it has to be forced to be unusable, since it's unused.
 
9:58 PM
@sehe Give you an error if you use subclassId despite marking it unused.
 
@sehe the struct with the same name as the argument, causes compilation error if that name is used, so that use of the macro does not mislead/lie.
 
Waste of time, methinks.
But hey, what do I know.
 
for the line r = scanf("%20s%d", (char*)readin[i].name, &readin[i].score); what exactly is r ?
 
@CatPlusPlus That it's a waste of time?
 
int.
Number of fields read.
 
9:59 PM
@Cat, you should really stop asking rhetorical questions.
 
@Beginnernato: Seriously, just search for scanf on your favorite search engine
 
@Insilico alrite
 
Where did I ask a rhetorical question?
 

« first day (527 days earlier)      last day (4424 days later) »