Help Logs Database

Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Ircnet  |  Dalnet
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32

<NKD> 25,000,000 crossings
<NKD> took like 8 sec
<KimmoA> BASIC has such an incredibly stupid base syntax :/
<_amnesia_> i can't believe it's still in use
<NKD> I hate its syntax for declaring variables
<Madsy_> "declare foo as integer"
<Madsy_> In caps.
<KimmoA> I found intact books on BASIC when we cleaned out a school stock.
<NKD> lol
<NKD> foo! = 0
<NKD> foo# = 0
<NKD> foo% = 0
<NKD> and soon
<NKD> so on*
<NKD> totaly uninformative
<NKD> and no bool
<KimmoA> What the hell was up with refering to line numbers?
<_m_> calc scroll
<CalcMe> scroll = Using longer sentences instead of having a verbal diarrhea helps to keep the scroll down.
<Madsy_> I coded in Qbasic, until 1998 when I discovered C :-D
<KimmoA> I don't get why anyone would think that GOTO and line numbers would be a good design...
<NKD> well it is easier than loops and functions for kiddies
<KimmoA> And especially not why they were numbered so weirdly...
<NKD> not exactly as nice to read and work on after the fact though
<NKD> Im just glad my qbasic cl*** doesnt involve learning gotos
<KimmoA> You actually are forced to learn QBASIC?
<KimmoA> In 2005?
<NKD> Yes
<KimmoA> o_O
<Madsy_> haha
<NKD> My instructor said he's probably going to phase it out, but he likes the syntax or something, easy to teach to morons, apparently
<Madsy_> Man.. that ****s beyond comparsion :-)
<_amnesia_> yeah might as well teach pascal while your at it
<KimmoA> "With these skills, you can become... a lame programmer."
<NKD> Hah, he said up front that we wouldnt ever actually use qbasic
<_amnesia_> "with these skills you could get a job in 1985"
<NKD> That he was to get people familiar with what a function is, what a loop is, and so on
<Madsy_> I could understand ***embly, but basic? Nah.
<[eloi]> NKD: that's as good a reason as any to keep it
<Trazer> You have to start learning somewhere.. C++ is not suitable for beginners..
<KimmoA> If you ever happen to invent a time machine...
<NKD> Well, I could handle c++, but I know for a fact alot of the guys in my qbasic cl*** could not
<NKD> Most of them only touch a computer to play counterstrike
<[eloi]> NKD: these days, i might prefer javascript, because you can do lots of stuff with it, and its syntax is similar to C++ and java, and everyone's got a "compiler" for it :)
<KimmoA> Then why the hell are they trying at all? :/
<NKD> Who knows, they are probably taking it for some IT degree. Even if you want to get into non-coding stuff, some of the degrees require an intro programming cl*** or two
<[eloi]> KimmoA: if i recall correctly, many people were in my pascal cl*** in high school because CS looked pretty on college applications
<NKD> I dont think many fo them are Comp Sci majors like myself
<KimmoA> :S
<NKD> virtually nobody does CS these days for some reason
<NKD> They do trendy crap like MIS
<[eloi]> KimmoA: also, some people enjoy programming but don't want to make it a serious hobby or career choice
<[eloi]> NKD: those bastards
<KimmoA> Then they don't REALLY enjoy it ;)
<NKD> Heh, I was talking to my math prof yesterday about what terms various cl***es are going to be offered
<NKD> Obviously for a CS degree its alot of math
<KimmoA> I spend WAY too much time thinking of how I should format code and structure it...
<[eloi]> my boss likes to tell me how he used to be a programmer, like me... he was writing foxpro, and apparently not a lot of it, because he doesn't follow my code all that well... even if you don't know the syntax, you should still be able to read (although not necessarily write) the code in most cases
<NKD> I have to take Calc I II and III, and the parallel calculus based physics cl***es. Then I have to take discrete, and linear algebra too.
<Yunited> i spend 5+ hrs daily on my comp :p
<Trazer> Learning the syntax of a language is quick and painless.. Learning the concepts is what takes time.. Much easier to start of with a simple language, where for instance you don't have to care about stuff like linking.. Pascal was created for learning how to program..
<NKD> Plus Ive been out of high school for a few years so my math was a bit rusty, had to start in Intermediate Algebra, now I'm in College Algebra, and I've still got pre-calc ahead of me.
<NKD> Sad part is... I'm starting to really like math :P
<[eloi]> KimmoA: my brother likes math -- a lot, by my estimation -- but isn't getting a degree in math, nor does he do math for fun (generally speaking)
<KimmoA> Hmm...
<NKD> I can't wait to get into linear algebra,or discrete structures
<NKD> Very small cl***es
<NKD> Generally people who have at least a little love for math
<[eloi]> e.g. maybe it's fun to break out a protractor to solve a problem, but you don't usually do it because you finished your crosswords early
<NKD> In my College Algebra cl***, its like everyone is there only because they need a math credit
<NKD> cout << "Percentage Failed: "<< ( tallyFailure / totalCrossings * 100) << "%\n";
<NKD> Whats wrong with that
<NKD> heh
<NKD> it gives me "0" no matter the value of tallyFailure or totalCrossings.
<patzmar`> tallyFailure and totalCrossings are int's, right?
<NKD> yes
<patzmar`> cast one of them to a float.
<ZorbaTHut> or do the multiplication first.
<NKD> Oooh right. heh
<NKD> Im too used to qbasic making variables whatever type you need in certain cases
<Nick_E> qbasic is the ****
<Nick_E> I wrote an artificial neuro network in qbasic
<Nick_E> and a real-time ray tracer
<NKD> http://rafb.net/paste/results/D8j3B747.html
<NKD> theres my final program
<NKD> :)
<NKD> lemme post the qbasic version too
<[eloi]> for (int currentCrossing = 0; currentCrossing < totalCrossings; ++currentCrossing) // prefer ++i to i++, and also [0, n) to [1, n], i.e. for (i = 0; i < n; ++i) instead of for (int i = 1; i <= n; ++i)
<patzmar`> DUFF MAN! OHHH YEAH!
<NKD> Ahh
<NKD> yeah
<NKD> makes sense eloi
<[eloi]> the [0, n) range is the style of 0-based languages (C and its descendants), while the [1, n] range is the style of 1-based languages (basic and its descendants)
<NKD> but say the input is 10
<NKD> [0, 10) = 11 iterations
<NKD> yes?
<_amnesia_> nkd [0,9)
<[eloi]> 0 1 2 3 4 5 6 7 8 9, but not 10... so still 10 iterations
<[eloi]> [i, j) means i, everything up to j, but not j
<[eloi]> [i, j] means i, everything up to j, and j as well
<NKD> OH right, interval notation
<NKD> yes.
<_amnesia_> oops, meant [0,9]
<NKD> yeah amnesia but then you're basically asking the users "Please enter the number of loops you want to run, plus one"
<NKD> er
<NKD> minus one
<[eloi]> almost all sequence iteration in C++ is done via closed intervals -- arrays, standard containers, even standard input
<[eloi]> no, the number they enter is the number of loops you perform
<NKD> Yes, in yours
<_amnesia_> nkd, not quite what i meant...
<NKD> but if I were to do [0,n]
<_amnesia_> nkd, was just pointing out the range
<[eloi]> oh, yeah, that would be a problem
<[eloi]> calc <=
<CalcMe> no entry for "<="
<[eloi]> calc <
<CalcMe> < = Unless you know better, use < or != for iteration over a sequence, not <=: for (int i = 0; i < N; ++i) f(a[i]); for (T::iterator i = c.begin(), j = c.end(); i != j; ++i) f(*i); // Note that the 1st and Nth elements are a[0] and a[N - 1], and that a[N] and c.end() are just *after* the last element.
<_amnesia_> nkd, max = 10; for(i = 0; i < max; ++i) { }
<NKD> So for example i != n
<NKD> http://rafb.net/paste/results/lnrwck28.html
<NKD> theres my qbasic version
<NKD> Used the visual basic parser so there may be errors
<NKD> but that doesnt really matter now does it :P
<tenfe> hey
<NKD> Hey eloi is ++i always preferred to i++
<NKD> If so, they should rename the language to ++C :P
<Nick_E> heh
<Nick_E> NKD ?
<Nick_E> they do different things
<KimmoA> "++i" is for people who do "(:".
<Nick_E> "(:" ? whats that ?
<KimmoA> Reversed smiley used by teenage sluts.
<Nick_E> hahaha
<Nick_E> if (i++) evaluates forst then increments
<Nick_E> if (++i) increments first then evaluates
<Nick_E> or were u asking for another reason ?
<KimmoA> ;S
<NKD> I didn't know they did different things.
<Nick_E> well
<Nick_E> say i = 1
<NKD> Didn't even know you could evaluate n+1 or n-1 that way :)
<Nick_E> i = 1;
<Nick_E> sorry
<upb> what does ++i += i + i++; do?
<Nick_E> i = 0; if (i++) will return false
<Nick_E> i = 0; if (++i) will return true


Return to c++
or
Go to some related logs:

error C2065: 'ENOMEM' : undeclared identifier

Copyright © 2005 www.irclogs.ws. All rights reserved. » disclaimer » contact