Hard Light Productions Forums

Off-Topic Discussion => General Discussion => Topic started by: Kosh on September 15, 2006, 01:07:03 am

Title: The death of BASIC
Post by: Kosh on September 15, 2006, 01:07:03 am
http://www.salon.com/tech/feature/2006/09/14/basic/index.html


It's a rather interesting point of view really.......
Title: Re: The death of BASIC
Post by: brozozo on September 15, 2006, 01:17:15 am
The article sounded interesting, and I would have read it, but you have jump through various hoops to read it all.

No, sir.
Title: Re: The death of BASIC
Post by: kode on September 15, 2006, 02:27:39 am
that guy is obsessed with basic.

basic isn't even a good language for learning, tbh. what you learn in it is bad coding. C programmers like to say that goto is evil, well, BASIC illustrates that very point excellently. what he should've done instead is find a nice object oriented programming language, such as Ruby (http://www.ruby-lang.org), and used this book (http://www.pragmaticprogrammer.com/titles/fr_ltp/). but then again, kid wouldn't like c++ at all after trying some of that ruby drug.
Title: Re: The death of BASIC
Post by: IPAndrews on September 15, 2006, 03:25:20 am
BASIC was quite hard work really. I won't weep for it too much.
Title: Re: The death of BASIC
Post by: Turnsky on September 15, 2006, 03:36:50 am
the only good thing about basic was "nibbles"  :p
Title: Re: The death of BASIC
Post by: Descenterace on September 15, 2006, 04:01:00 am
Teach 'em LISP.

Once you know LISP, everything else is merely a subset.
Title: Re: The death of BASIC
Post by: Scooby_Doo on September 15, 2006, 04:03:21 am
Basic wasn't that bad... albiet missing quite a few functional  function-oriented features.

Course C#/Java projects say pointers are evil and C illustrates that point  :P
Title: Re: The death of BASIC
Post by: Scooby_Doo on September 15, 2006, 04:04:22 am
Hell why not just teach them brain****  :nervous:  :lol:  :drevil:
Title: Re: The death of BASIC
Post by: kode on September 15, 2006, 04:33:40 am
Teach 'em LISP.

Once you know LISP, everything else is merely a subset.

LISP is a bit like sex, you just don't get it. ;)
Title: Re: The death of BASIC
Post by: IPAndrews on September 15, 2006, 04:34:17 am
I do it's called Prolog.
Title: Re: The death of BASIC
Post by: Ashrak on September 15, 2006, 04:43:32 am
PHP FTW



and this i suspect is why noone wants to program, they rahterp lay games
Title: Re: The death of BASIC
Post by: Kosh on September 15, 2006, 04:47:11 am
My first crack at coding was with Visual Basic. I thought it was reasonably good for beginners, as it was intuitive and you could single step the program execution. Also the M$ helpfiles, as technical as they are, were somewhat helpful and they were very complete (which was greatly appreciated in my VB class).


EDIT: But he does have a point about today's kids being lazy as hell..........
Title: Re: The death of BASIC
Post by: Herra Tohtori on September 15, 2006, 04:53:32 am
What I would suggest for anyone interested in lower level programming to get a programmable graphical calculator and try some assembler programming. That way you don't need to get an obsolete computer, and it's dead useful at mathematics classes too... and it's portable. TI-86 is quite nice thing to have :nod:

Heck, now that I think of it I invented object oriented programming autonomously (in a way) when I divided my programs into modules that put out different things depending on input... I believe they would be called "methods" in Java, except that these methods would be just parts of a main method...

I think there was even a possibility to call other programs in during running another program... Not unlike Java classes. :nervous:

Why do we even need anything else than assembler? Functions you say? Well WRITE those functions, at least you know what the program does and you're not just feeding attributes to readily given method of Math class that does some chewing and then spits out something that you just accept to be the correct answer... :nervous:


Title: Re: The death of BASIC
Post by: Kosh on September 15, 2006, 04:57:05 am
Quote
TI-86 is quite nice thing to have



TI-86? Pffft. TI-89 FTW!!!!!!!
Title: Re: The death of BASIC
Post by: Herra Tohtori on September 15, 2006, 05:10:45 am
Yeah, yeah... :doubt:

 ;)

TI-86 has sufficient properties for me as a calculator. If I want something fancy I'll do it with Mathematica. :nod:


I'll not be able to use the TI in exams anyway, we have a rule that only function calculators are allowed... in physics exams.

In matehmatics exams, we are usually not allowed to use calculators of any kind. :shaking:
Title: Re: The death of BASIC
Post by: Ghostavo on September 15, 2006, 05:52:36 am
Just out of curiosity, how hard is java and lisp compared to c++?
Title: Re: The death of BASIC
Post by: Nuke on September 15, 2006, 07:11:39 am
ive programmed in basic and in c / c++ back in highschool. so i know the basics of programming. but it was never something i wanted to persue. my instructors at the time thought id be better off doing graphics. with what i can do now, it seems they were right.
Title: Re: The death of BASIC
Post by: karajorma on September 15, 2006, 09:07:29 am
Just out of curiosity, how hard is java and lisp compared to c++?

Java is a bit easier because you don't need to learn about pointers and don't have to worry about memory leaks. But there isn't that much in it between the two. In fact the first few lessons in both languages will be almost identical as the basic concepts are the same.
Title: Re: The death of BASIC
Post by: Lord Platin on September 15, 2006, 10:37:50 am
Quote
TI-86 is quite nice thing to have



TI-86? Pffft. TI-89 FTW!!!!!!!

Who needs those minicomputers with no real keyboard? Voyage 200 FTW ;) Writing scripts during boring lessons is fun :)
Title: Re: The death of BASIC
Post by: Bobboau on September 15, 2006, 11:07:49 am
the hell!? if you want a solid calculator without the added stuff, get an 83, the 89 rocks hard on many levels, there is no excuse for the 86, it's slower than the 83, with fewer features.
Title: Re: The death of BASIC
Post by: Herra Tohtori on September 15, 2006, 11:18:00 am
Oo---kay. :wtf:

Let's not make this a god damn calculator coding platform war thread... I'll just say this and end this there:

I've only ever used the TI-86, and it has been enough for everything I've gotten a chance to do with it. I think TI-89 wouldnt have been allowed in out matriculation examinations since - as far as I know - it can perform symbolic integrations and stuff like that.

Also I've never tried a TI-83, but if it really is faster and has more functions than 86, well, thats very... interesting, to say the least. :confused: :hopping: We got our calculators as a group offer, and I don't think 83's were offered so... what gives, I've got a calculator that does what I want it to do. As I said, if I need something fancy I feed the equations to Mathematica and that's it.

AMD 64 3200+ gives, unsurprizingly, better counting power than whatever is embedded in TI-86.



Anyway, back on topic now, m'kay? :D
Title: Re: The death of BASIC
Post by: CP5670 on September 15, 2006, 11:26:58 am
The 89 is by far the best one. It has the same hardware and capabilities as the 92+ but looks like an 83, and it's allowed in most college classes and standarized tests such the AP ones. On the calculus one, it's practically an answer key and does most of the problems for you. I still have my 92+ somewhere (haven't used it in years though :p), which is an 89 with a larger screen and a full keyboard, but it's not allowed on many tests that the 89 works fine for.

I did some stuff with VB at one point in high school, although I don't remember any of it now. The only programs I know how to write are console-based math computation apps. I generally use Mathematica for those but have done stuff with C++, Matlab and Fortran as well.
Title: Re: The death of BASIC
Post by: Nuke on September 15, 2006, 11:51:26 am
i did alot of vb, it was very easy to program simple games with. i made an asteroid clone and a multiplayer top down shooter. both were atrocious examples of what not to do when programming.
Title: Re: The death of BASIC
Post by: ZylonBane on September 15, 2006, 01:20:28 pm
the only good thing about basic was "nibbles"  :p
A nybble is a unit of computer storage. It doesn't have a damn thing to do with BASIC.

IMHO, the problem with learning programming these days is how stupidly complex modern development environments have become. Someone who's learning to program needs to be able to sit down and type PRINT "HELLO!" and have it actually happen without having to import libraries, declare prototypes, link and compile, and all that other distracting cruft.
Title: Re: The death of BASIC
Post by: kode on September 15, 2006, 01:40:55 pm
turncoat is referring to one of the games that were included with qbasic in a few of the dos versions. it's a snake clone.

also, pylonbane, are you talking about integrated development environments or programming languages? most languages I program in doesn't need an IDE, and can without much trouble be programmed for in a nice text editor like emacs or vi and then compiled (or in the case of ruby, run) independentally. even java, which however is a bit nicer to program in a _good_ IDE than without one.
Title: Re: The death of BASIC
Post by: Descenterace on September 15, 2006, 02:40:52 pm
He's referring to the API that lies between the code you write and the system. Regardless of IDE, you still need to import certain basic libraries that provide stuff like I/O and advanced maths.

That said, IDEs are becoming too complex as well. Or rather, they do too much for the programmer. Someone who's learned Java with Eclipse and never had to work on a group project (and even some who have) might have no clue how to compile and run a program outside of that environment. Also, the nature of Autocomplete coerces programmers into writing a program bottom-up, since the IDE can only guess the names of functions already implemented/declared.
IDEs are very useful tools, but everyone should start off with a text editor, a command-line compiler and some version of 'make' before they move onto the time-savers.

Case in point: half of my CompSci group were using Eclipse in 2nd year. After two weeks of committing bad Java code to the repository, they finally asked me how to compile it.
Me: Type 'make'.
Them: We're using Windows.
Me: Yes. Hence the file 'make.bat' in the project dir, alongside the makefile. Just type 'make'.
Them: Why can't you just use Eclipse, like us?
Me: Because I'm buildmaster and it's my job to make sure this works when submitted, at which time it will be tested by someone who does not have Eclipse. And besides, I'm using a basic text editor with syntax highlighting only and I've already done ten times more work than the rest of you put together.

Second-year Computer Science students?  ::) And people have the damn nerve to complain that the course is too hard...

But I digress.
Title: Re: The death of BASIC
Post by: Nuke on September 15, 2006, 02:58:21 pm
i never could understand compilers. they used to drive me nuts. the quake c i was using, while not a real language, had a nice compiler. it was simple and to the point, and i understood how to use it. even trying to compile freespace under linux was easyer, i had a hard time getting all the required packages. but i did thanks to taylors help. anyway im no ****ing programmer, so my expieriences with it are rather crappy. i have a hard enough time writing script.
Title: Re: The death of BASIC
Post by: Scooby_Doo on September 15, 2006, 03:16:06 pm
After using pascal on a unix system... I'd take an IDE anyday  :ick: :no:
Title: Re: The death of BASIC
Post by: Descenterace on September 15, 2006, 03:45:05 pm
Pascal? SPEAK NOT THE NAME OF THE DAMNED LANGUAGE.
Title: Re: The death of BASIC
Post by: ZylonBane on September 15, 2006, 04:12:02 pm
He's referring to the API that lies between the code you write and the system.
I'm referring to all tangential elements-- the IDE, the compiler, class libraries... everything.

IMHO, the absolute best environment for initial baby-step programmers is an interpretive environment. One where you have nothing more than a window that you can type things into and it immediately runs them and prints the results into the same window. And heck, a lot of times that's all I need too.
Title: Re: The death of BASIC
Post by: kode on September 15, 2006, 04:53:06 pm
like this (http://tryruby.hobix.com)?
Title: Re: The death of BASIC
Post by: Scooby_Doo on September 15, 2006, 05:30:35 pm
Hey Delphi was quite a good language.  :)

Perl on the other hand... PERL CAN DIE
Title: Re: The death of BASIC
Post by: Polpolion on September 15, 2006, 06:55:24 pm
This is a programming language thread, so What is the difference between Java and C/C++? My sister said Java is slow, my brother said Java is crap, and my dad says Java deletes memory caches or something... Also, someone said that Java and c/c++ were the same thing. Even I know thats not true. I just don't know why.
Title: Re: The death of BASIC
Post by: Goober5000 on September 15, 2006, 07:49:12 pm
C programmers like to say that goto is evil

GOTO is not evil.  It's used all the time in assembler, and it can be quite useful in modern languages too.  For example, in many languages (including C and C++), it's the most efficient way to break out of multiple nested loops.

IMHO, the problem with learning programming these days is how stupidly complex modern development environments have become. Someone who's learning to program needs to be able to sit down and type PRINT "HELLO!" and have it actually happen without having to import libraries, declare prototypes, link and compile, and all that other distracting cruft.

QUOTED.  FOR.  TRUTH.

Which environment would you rather learn to program in?  This...

Code: [Select]
PRINT "HELLO!"
HELLO!
Ok

Or this?...
Code: [Select]
#include <iostream.h>

int main(int argc, char *argv[])
{
    cout << "HELLO!" << endl;

    return 0;
}

[...after compiling and running...]

HELLO!
Press any key to continue
Title: Re: The death of BASIC
Post by: Flipside on September 15, 2006, 07:54:26 pm
Agree 100% with Zylon and Goober here, I started on Basic, and ended up moving onto Z80 machine code.

The only downside of 'old' basic was that it could teach bad programming habits, but the trade off was instant access to the computer. Interpreted languages will always be slower than compiled ones, but for simply opening a window on the possibilities, BASIC, or an equivalent is essential.

Quote
For example, in many languages (including C and C++), it's the most efficient way to break out of multiple nested loops.
.

Now, back in my day that would be considered a very naughty thing to do :p Mainly because you would leave a load of trash Return pointers on the stack which could seriously Fubar things later on in the program ;) The way I was taught, you used an 'escape pod' variable, which would be flagged if you need to leave the loop early, and included that in the exit conditions for the loop.
Title: Re: The death of BASIC
Post by: Turey on September 15, 2006, 08:03:32 pm
I started on basic, then jumped to C and then from C to Java.

IMHO, IDE's are for programmers who already know what they're doing. Autocomplete and things are fine, if you've done it by hand before. Otherwise, stick to Notepad2 and the command line.

I've had several occasions where one of the ppl i was helping learn java would show me code and ask why it didn't work. I told them that they used a completely wrong method call for what they were doing. I mean dead wrong. Input types, output type, usage, EVERYTHING. They then tell me that the computer wrote it for them, and i realize that the first 3-4 characters are the same as the correct method call...  :mad:
Title: Re: The death of BASIC
Post by: Scooby_Doo on September 15, 2006, 08:28:04 pm
The way I was taught, you used an 'escape pod' variable, which would be flagged if you need to leave the loop early, and included that in the exit conditions for the loop.

Course using an escape flag introduces one more variable that can go wrong. Theres no easy way  :blah:
Title: Re: The death of BASIC
Post by: Descenterace on September 16, 2006, 12:51:47 am
Return pointers can only get trashed by a GOTO if you're using exceptions or if you make a jump between function scopes. Just breaking out of a few loops isn't going to screw anything up because the compiler will notice the GOTO and suppress any optimisation that might cause it to break.
Static code analysis is sufficient for averting disaster.
The correct way to break out of nested loops is either a boolean flag or an exception, though. GOTO is deprecated in pretty much every language above assembly, although any language I design will certainly include it for the WTF factor.
Actually, C# does have a valid use for GOTO. It's used to jump to other CASE labels in a SWITCH block.

As for Perl, I rather like it. It's certainly not pretty, but it was created to do a range of jobs with minimal typing. That's why there's at least a dozen ways to do anything in Perl. You can pick the way that's best for your overall goal.
The problem with Perl is that people think that, because it looks incomprehensible, it should really be incomprehensible. Following proper coding practices allows for perfectly readable code but, as with so many terse languages, it's only readable if you know the language. And don't tell me that C# or BASIC are far more readable; to the layman they're just as confusing, and besides, I've seen some horrendous messes written in either language.

In short, Perl gets a bad rep because people are willing to judge it before they know it. They're scared off by the symbols, just as people get scared of LISP's brackets. All that weird syntax makes perfect sense once you're used to it.
Sure, Perl has a large number of WTFs in it, but again, every language does. Except possibly LISP. All the gotchas are in the API in LISP.
Title: Re: The death of BASIC
Post by: Flipside on September 16, 2006, 12:59:04 am
Oh, I'm sure that these days it's not a problem, else people wouldn't do it, I'm talking about programming in Z80 over a decade ago here. where, if you screwed up the stack, you locked up the computer solid, so you constantly had to POP and PUSH stuff around. I suspect that these days whatever has replaced the stack is far more complex than a single Last In First Out register that the old 8-Bit systems used. :)
Title: Re: The death of BASIC
Post by: Goober5000 on September 16, 2006, 01:15:09 am
The correct way to break out of nested loops is either a boolean flag or an exception, though.

Nope.  The "correct" way is to do
Code: [Select]
break [loop-label]with the label of the loop you want to break out of.  This is how Java does it.  Without the enhanced break operator, though, GOTO is the next best bet.  "Escape pod" variables clutter up the code and invite mistakes, and exceptions are entirely the wrong approach*.

*Unless, of course, you're doing something that actually does throw an exception, as opposed to generating one yourself.  I'm talking about the general case.

Oh, I'm sure that these days it's not a problem, else people wouldn't do it, I'm talking about programming in Z80 over a decade ago here. where, if you screwed up the stack, you locked up the computer solid, so you constantly had to POP and PUSH stuff around. I suspect that these days whatever has replaced the stack is far more complex than a single Last In First Out register that the old 8-Bit systems used. :)

You might be confusing GOTO with GOSUB.  A loop is itself just a bunch of GOTO and IF statements, and adding another GOTO shouldn't change anything.  A GOSUB on the other hand calls a subroutine and involves pushing the return address onto the stack.  Branching out of a subroutine is definitely a recipe for trouble.
Title: Re: The death of BASIC
Post by: Flipside on September 16, 2006, 01:34:44 am
Hmmm...Yeah, it might have been GOSUB that was the nasty one, the only situation I can remember using GOTO in a loop was the dreaded FOR...NEXT loops because you couldn't define any exit conditions, so you could have something like

10 FOR X=1 TO 10
20 IF (X+Y)>30 THEN GOTO 40
30 NEXT

It may have just been the practice the was drummed into me, but for REPEAT...UNTIL loops, I always used to use a 'flag', so you'd have

10 REPEAT
20 X=X+1
30 UNTIL X=10 OR (X+Y)>30

or

10 LET EXIT = FALSE
20 REPEAT
30 X=X+1
40 IF (X+Y)>30 THEN EXIT=TRUE
50 UNTIL X=10 OR EXIT=TRUE

That, iirc was considered a more 'correct' way of doing it ;)

Sorry, getting my coding brain in gear here for starting at college :D
Title: Re: The death of BASIC
Post by: Scooby_Doo on September 16, 2006, 02:36:26 am
Using exceptions to break out of a loop is a bad idea.  Cluttering and confusing to people who haven't seen your code... Not to mention slower.

I kinda like:
10 LET EXIT = FALSE
20 REPEAT
30 X=X+1
40 IF (X+Y)>30 THEN EXIT=TRUE
50 UNTIL X=10 OR EXIT=TRUE


better.  Easier to step through debug  :)
Title: Re: The death of BASIC
Post by: kode on September 16, 2006, 03:05:05 am
The correct way to break out of nested loops is either a boolean flag or an exception, though.

You do NOT use exceptions for non-exceptional events!

(that's tip 34 from the pragmatic programmers by andrew hunt and david thomas, btw. a book well worth reading, and always keep at your side while programming.)
Title: Re: The death of BASIC
Post by: Flipside on September 16, 2006, 03:34:01 am
Heh, I think my least favourite language was 6502 machine code. The problem with 6502 was that it had 3 8-Bit registers to play with, and you couldn't even link them together to make 16 Bit ones like you could in Z80, so if you wanted to access, say, a look-up table (start + offset), you had to use Indirect Referencing, i.e. point to the address that held the adress that you wanted to jump to. Add to that the fact that older computers ALWAYS used lsb-msb ordering for addresses and you had the ultimate migraine recipe ;)
Title: Re: The death of BASIC
Post by: Roanoke on September 16, 2006, 03:53:13 am
I sometimes read the Python tuts when I'm hella bored at work........
Title: Re: The death of BASIC
Post by: Fragrag on September 16, 2006, 03:56:57 am
*snip*
*snip*

QFT², I tried dabbling in programming several times, when I was 10, 12 and 13. I'm 14 now by the way. Granted, learning C++ and other languages were already too complicated for my age but if making a program just to say 'hello' takes 4 lines of rather incomprehensible lines (What the hell does 'int argc, char *argv' mean?) then I'm not surprise that kids today aren't dabbling in programming, it's just getting complicated. By the way, the simplest language I tried was Python.
Title: Re: The death of BASIC
Post by: Ghostavo on September 16, 2006, 07:24:02 am
*snip*
*snip*

QFT², I tried dabbling in programming several times, when I was 10, 12 and 13. I'm 14 now by the way. Granted, learning C++ and other languages were already too complicated for my age but if making a program just to say 'hello' takes 4 lines of rather incomprehensible lines (What the hell does 'int argc, char *argv' mean?) then I'm not surprise that kids today aren't dabbling in programming, it's just getting complicated. By the way, the simplest language I tried was Python.

Well, when I learned C++ (my first and only experience with programming) the teachers sort of avoided that by:

Code: [Select]
void main()

And only much later when we made stuff other than the main did they explain what that meant.

C++ sounds simple enough, never understood how people find it complicated. :blah:
Title: Re: The death of BASIC
Post by: Kamikaze on September 16, 2006, 11:08:12 pm
Just out of curiosity, how hard is java and lisp compared to c++?

Ever read through Stroustrup's _The_C++_Programming_Language_? C++ is one of the most ridiculously complex programming languages in the world.

Comparatively, Lisp is incredibly simple (Particularly Scheme; it's my favorite Lisp dialect). There's barely any syntax and the basis of the language can be described in about 40 pages (http://www.r6rs.org/r6rs_91.pdf).

Java also aims to be simple, but it's actually just crippled and bloated from the poor "let's make it more like C++ after stripping it way down first" style of design.

I'm also puzzled at why peole still think BASIC is good for teaching anything. The basics of Python, Ruby, or even Perl are pretty easy to pick up. All three have far better libraries than any BASIC dialect except maybe VB.Net (pretty sure CPAN beats the hell out of .Net though). It's also worth keeping in mind that Python runs on .Net (IronPython) and Ruby runs on the Java platform (JRuby) nowadays.

Quote from: Scooby Doo
Using exceptions to break out of a loop is a bad idea.

True, but there are exceptions even to this rule (no pun intended). :p For example, exceptions are the right way to break out of while loops in Objective Caml, because while loops are very weak due to the pure functional design. Though it's often better to use recursion in OCaml anyway.
Title: Re: The death of BASIC
Post by: Flipside on September 16, 2006, 11:17:32 pm
Pascal was always a good language to start with, it was not much more complex than Basic, but had the beginnings of more modern approaches to programming in it. It's pretty long in the tooth nowadays however, and Delphi, it's supposed 'Next Generation' is confusing as hell :/

Edit : Oh, and COBOL is the language of Satan...
Title: Re: The death of BASIC
Post by: Scooby_Doo on September 17, 2006, 12:41:22 am
Two langauges I wanted to learn... Ocaml and eiffel...
Eiffel isn't well supported and their .NET version is rather blah..

I gave perl 2 tries and gave up... I extremely dislike typeless languages.

I suppose lisp wouldn't be so bad, as long as you don't mind seeing (((())))) the rest of your life  :lol:
Title: Re: The death of BASIC
Post by: kode on September 17, 2006, 02:52:43 am
hah, yeah. back when I did it for a uni class, most of the debugging was to count opening and closing parentheses.
Title: Re: The death of BASIC
Post by: Kamikaze on September 17, 2006, 12:22:02 pm
That's why you need to use a good editor. I use vim to do all my editing; it automatically matches parantheses as I type.
Title: Re: The death of BASIC
Post by: Descenterace on September 17, 2006, 12:45:51 pm
The correct way to break out of nested loops is either a boolean flag or an exception, though.

You do NOT use exceptions for non-exceptional events!

(that's tip 34 from the pragmatic programmers by andrew hunt and david thomas, btw. a book well worth reading, and always keep at your side while programming.)

Did I say otherwise? But if having to drop out of a deeply-nested loop is not an exceptional event, the loop structure and terminating conditions need to be rethought.

A good general rule is to only throw meaningful exception types and think very carefully before deriving your own exception class. If your loop breakout exception violates either of these, the loop conditions need to be rethought.
Title: Re: The death of BASIC
Post by: kode on September 17, 2006, 12:50:22 pm
nested loops are the devil anyhow.
Title: Re: The death of BASIC
Post by: Descenterace on September 18, 2006, 12:23:52 am
Sometimes they're required, but it's rare that you need to drop out of one under non-exceptional circumstances.
Title: Re: The death of BASIC
Post by: Scooby_Doo on September 18, 2006, 01:23:18 am
Course one possible solution is to have the inner loop stuck within another function (make it an inline function)
Title: Re: The death of BASIC
Post by: Hippo on September 18, 2006, 11:16:53 am
1 print "**** basic"
2 print "use c++"
3 goto 1
run


god i havent touched basic in yonks. a higher level code is awalys better.
Title: Re: The death of BASIC
Post by: Flipside on September 18, 2006, 03:00:52 pm
Basic is higher level than C++, the lowest level code is Assembler ;)
Title: Re: The death of BASIC
Post by: ZylonBane on September 18, 2006, 06:36:25 pm
1 print "**** basic"
2 print "use c++"
3 goto 1
run


god i havent touched basic in yonks. a higher level code is awalys better.
And yet you illustrate exactly how much more expressive and easy to remember it is.
Title: Re: The death of BASIC
Post by: Hippo on September 18, 2006, 06:39:34 pm
#include <iostream>
using namespace std;

int main()
{
     cout << "**** basic\n" << "use c++";

     return 0;
}




I dont know loops yet, so dont get me on that, but i find that much easier to manage, and much more powerful. and they're both off the top of my head, so i dont claim accountability for errors.

Basic was definately easier to run, but with something like visual studio, c++ isnt hard to compile and run either
Title: Re: The death of BASIC
Post by: Scooby_Doo on September 18, 2006, 06:46:55 pm
technically "int main ()" is incorrect plus your missing a "\n" after "c++"  :D

and some people will complain about using "using namespace std"

for the loops:

#include <iostream>

int main (int argc, char *[] args)
{
     while (true)
     {
          std::cout << "**** basic\n" ;
          std::cout << "use C++\n" ;
     }

     return 0 ;
}



Or how about

Start:
     print "**** C++"
     print "Use QuickBasic"
     goto Start
Title: Re: The death of BASIC
Post by: Mathwiz6 on September 18, 2006, 06:50:09 pm
Print "WTF is wrong with Python?"
Print "Response appreciated"
if input = useless argument:
      Argue back
      If argument = blocked:
             Argue harder
else:
      print "example of nested loops in python :D"

WTF is wrong with Python?
Response appreciated
Title: Re: The death of BASIC
Post by: Scooby_Doo on September 18, 2006, 06:51:10 pm
LOL

 I'll let the perl experts handle the umteen million different ways to do that LOL
Title: Re: The death of BASIC
Post by: Hippo on September 18, 2006, 06:58:26 pm
your missing a "\n" after "c++"  :D


I dont need that if its not looping though :p
Title: Re: The death of BASIC
Post by: ZylonBane on September 18, 2006, 07:00:14 pm
The Perl code for this would be trivial--

while() {
   print "**** C++\nUse Perl\n";
}

Title: Re: The death of BASIC
Post by: Mathwiz6 on September 18, 2006, 07:35:42 pm
Print "**** BASIC"
Print "Use Python"


Press enter to run this baby.

Short and sweet.
Title: Re: The death of BASIC
Post by: ZylonBane on September 18, 2006, 07:49:07 pm
Loop it!
Title: Re: The death of BASIC
Post by: Herra Tohtori on September 18, 2006, 07:49:32 pm
And Java is even funnier...  :lol:

Code: [Select]
public class ScrewBasic {

 public static void main(String arguments) {

  System.out.println("***** BASIC.\nUse Java instead.\nAs you can see, it's easy and fun!");

 }
}


Now you have to save this as ScrewBasic.java, compile it in the directory with command "javac ScrewBasic.java", then run it with "java ScrewBasic"... Isn't that easy? Ands... comprehensive? ...Or? :shaking:


Another one, that utilizes object-oriented programming possibilities of Java!


Code: [Select]
public class ScrewBasic {

 public String toString() {

   String string = "***** BASIC.\nUse Java instead.\nAs you can see, it's easy and fun!";
   return string;
 }


 public static void main(String arguments) {

  System.out.println(this.toString());

 }
}


 :shaking: :shaking: :nervous:
Title: Re: The death of BASIC
Post by: Mathwiz6 on September 18, 2006, 07:53:51 pm
z = 0

While z < 1000:
      Print "**** BASIC"
      Print "Python ownz j00"
      z += 1
Title: Re: The death of BASIC
Post by: Kamikaze on September 18, 2006, 08:04:54 pm
Code: [Select]
let rec main () =
  print_endline "**** any language without tail-recursion optimization!";
  main ();;

main ()
Title: Re: The death of BASIC
Post by: Flipside on September 18, 2006, 08:10:02 pm
#F000 DATA "USE ASSEMBLER"
#F00D LDX #00
#F010 LRX #F000
#F013 CALL #xxxx - Wherever the Firmware Screenwrite routine is
#F016 INC X
#F018 CPX #0C
#F01A JNE #F010
#F01D LDA #0D
#F01F CALL #xxxx
#F021 JMP #F00D

And I'm not even certain the LRX (Load Relative X) was a valid command now...
Title: Re: The death of BASIC
Post by: Scooby_Doo on September 18, 2006, 08:10:35 pm
your missing a "\n" after "c++"  :D


I dont need that if its not looping though :p

ACtually you do otherwise you'll get something like this:
**** basic
use c++**** basic
use C++**** basic

How about :
"**** basic$"       db     basic
"use assembly$" db     asem

mov bx, basic
mov ax, 10
int 21h

mov bx, asem
mov ax, 10
int 21h


not that i remember assembly much anymore.
Title: Re: The death of BASIC
Post by: Scooby_Doo on September 18, 2006, 08:14:06 pm
or how about

program basic ;
begin
     while true do
          begin
               writeln ('**** basic') ;
               writeln ('use pascal') ;
          end ;
end.
Title: Re: The death of BASIC
Post by: Ghostavo on September 18, 2006, 08:16:39 pm
your missing a "\n" after "c++"  :D


I dont need that if its not looping though :p

ACtually you do otherwise you'll get something like this:
**** basic
use c++**** basic
use C++**** basic
Title: Re: The death of BASIC
Post by: Flipside on September 18, 2006, 08:19:18 pm
Quote
How about :
"**** basic$"       db     basic
"use assembly$" db     asem

mov bx, basic
mov ax, 10
int 21h

mov bx, asem
mov ax, 10
int 21h


not that i remember assembly much anymore.


Heh, you can tell why the Intel Processors won out over 6502 ;) Mostech actually had the faster chip, but it was such anightmare to code for it that not nearly as many Assembly games got written for it, and in those days, if you wanted an action game to run at any decent speed, it HAD to be in assembly. Z80 was easier, but I remember almost none of that now.
Title: Re: The death of BASIC
Post by: Hippo on September 18, 2006, 08:48:37 pm
your missing a "\n" after "c++"  :D




I dont need that if its not looping though :p

ACtually you do otherwise you'll get something like this:
**** basic
use c++**** basic
use C++**** basic


:nod:
Title: Re: The death of BASIC
Post by: Goober5000 on September 18, 2006, 09:01:50 pm
Code: [Select]
( every-time
   ( true )
   ( send-message
      "#Command"
      "High"
      "use FRED"
   )
)

I win!
Title: Re: The death of BASIC
Post by: Hippo on September 18, 2006, 09:02:50 pm
/me spams shift-r so that those messages never go through
Title: Re: The death of BASIC
Post by: Kamikaze on September 18, 2006, 09:03:04 pm
Yay for one-liners!

Code: [Select]
puts "**** non-interpreted languages!\n" until false
Title: Re: The death of BASIC
Post by: ZylonBane on September 18, 2006, 09:59:18 pm
Heh, you can tell why the Intel Processors won out over 6502 ;) Mostech actually had the faster chip, but it was such anightmare to code for it that not nearly as many Assembly games got written for it
What the hell? The 6502 was the dominant CPU in the 8-bit era by a huge margin. It only lost popularity when 8-bit CPUs in general were superceded by 16/32-bit CPUs.
Title: Re: The death of BASIC
Post by: Kosh on September 18, 2006, 10:28:28 pm
Quote
Heh, you can tell why the Intel Processors won out over 6502  Mostech actually had the faster chip, but it was such anightmare to code for it that not nearly as many Assembly games got written for it, and in those days, if you wanted an action game to run at any decent speed, it HAD to be in assembly. Z80 was easier, but I remember almost none of that now.


Damn you're old. :p
Title: Re: The death of BASIC
Post by: Hippo on September 18, 2006, 10:30:24 pm
Thats why they went to 16 bit. They couldnt count to his age with 8bit.
Title: Re: The death of BASIC
Post by: Scooby_Doo on September 18, 2006, 10:32:45 pm
your missing a "\n" after "c++"  :D




I dont need that if its not looping though :p

ACtually you do otherwise you'll get something like this:
**** basic
use c++**** basic
use C++**** basic


:nod:

Ohhh I see now....
Now if your running from the command prompt you might still want the \n there otherwise it could do this:
*** Basic
Use C++C:\
Title: Re: The death of BASIC
Post by: Kosh on September 18, 2006, 10:40:08 pm
Thats why they went to 16 bit. They couldnt count to his age with 8bit.


:lol:
Title: Re: The death of BASIC
Post by: Hippo on September 18, 2006, 10:41:00 pm
Doh!

(http://sectorgame.com/ahtw/basicsucks.jpg)



I completely forgot about whent he prompt comes up. Damn, so close too.




EDIT: ok thats gay, bring back lvlshot.
Title: Re: The death of BASIC
Post by: Scooby_Doo on September 18, 2006, 10:50:31 pm
Code: [Select]
( every-time
   ( true )
   ( send-message
      "#Command"
      "High"
      "use FRED"
   )
)

I win!

how about this
Code: [Select]

begin UseTCE

short doOnce

if (doOnce == 1)
    return
end

set doOnce to 1
messageBox ("Use Morrowind TCE Scripting instead!")

end
Title: Re: The death of BASIC
Post by: kode on September 18, 2006, 11:49:13 pm
Code: [Select]
loop { puts "y'all got it all wrong.\ny'all should use Ruby instead." }
no seriously. blocks rocks.
Title: Re: The death o' BASIC
Post by: Scooby_Doo on September 19, 2006, 12:04:13 am
Morrowind script has got to be one of the worst.....

You probably can't do something like this

Code: [Select]
set positionX to Player->GetX + 10it may work, but probably not, it should work if you use this:
Code: [Select]
set positionX to Player->GetX
set positionX to positionX + 10

not to mention you need a doOnce flag for ALL scripts, because they are continusually ran (once per program step)
actually for the infinite loop that'll be easy
Code: [Select]
begin TCEBasic

mesageBox ("Don't Use Me Please!!!!") ;

end
not to mention theres no debugger and if something goes wrong the script will just stop running often with no warning  :hopping:


Title: Re: The death o' BASIC
Post by: Hippo on September 19, 2006, 12:13:06 am
TIBasic:


Lbl A
Disp "**** basic"
Disp "use a calculator!"
Goto A



(optional add a 'pause' before the goto and it will wait for the user to press enter before repeating)
Title: Re: The death o' BASIC
Post by: Scooby_Doo on September 19, 2006, 12:23:10 am
how about Snobol:

Code: [Select]
Start   Output = "Use Snobol!"  :S(Start)
Title: Re: The death o' BASIC
Post by: Descenterace on September 19, 2006, 05:16:24 am
Well...  going by the fractionally-finished spec of Megaplex:

Code: [Select]
@(0,0,0) { DIMENSION 3 } (+5, +6, -2)
(+1, +2, @4) { EXIT } @(0, 0, 0)
@(5, 6, -2) { PIPE "Use Megaplex!" STDOUT } (-4, @2, +6)

Horrific, no? It is correct code, so see if you can figure out the syntax.  :p
Title: Re: The death o' BASIC
Post by: Flipside on September 19, 2006, 12:43:08 pm
Heh, ye can tell why th' Intel Processors won out o'er 6502 ;) Mostech actually had th' faster chip, but it were bein' such anightmare t' code fer it wot not nearly as many Assembly games got written fer it
What th' hell, ye scurvey dog?  The 6502 were bein' th' dominant CPU in th' 8-bit era by a huge margin.  It only lost popularity when 8-bit CPUs in general were superceded by 16/32-bit CPUs.
 

6502's were in things like Commodore 64's, Orics Jupiter Ace and BBC Micros (Plus a few others)  in the home computer market, whereas the Z80 was only really famous for the ZX Spectrum and the Amstrad 4xx and 6xx series.  But then, look at how many games were written for the Spectrum compared to the others, on account of Z80 being a lot more flexible and quicker to learn than 6502. 

Actually, to be honest, even when the 16-Bit CPU's started, the Amiga, with the 6502 based Blitter technology held it's own for a long time.  Were it down to hardware only, it would probably still be a serious contender, however, it wasn't down to hardware, especially once tho x86 series started creeping out of offices an' into houses.

And yes, I'm old, you bastards :p
Title: Re: The death o' BASIC
Post by: Kamikaze on September 19, 2006, 04:44:16 pm
Kinda on topic: http://www.gdargaud.net/Humor/QuotesProgramming.html
Title: Re: The death of BASIC
Post by: ZylonBane on September 20, 2006, 03:58:26 pm
Actually, to be honest, even when the 16-Bit CPU's started, the Amiga, with the 6502 based Blitter technology held it's own for a long time.
6502-based Blitter??

Okay, now I know you're deeply confused.
Title: Re: The death of BASIC
Post by: Janos on September 20, 2006, 04:01:21 pm
I HACK THE INTERNETS
Title: Re: The death of BASIC
Post by: Flipside on September 20, 2006, 04:13:40 pm
Yeah, you're right, the Motorola 68000 set had the Blitter chip mounted on it, that was my mistake, it was the Apple 2 systems that used the 6502.

Still doesn't change the fact that the Z80 outbid and outsoftwared it's 6502 competitors.
Title: Re: The death of BASIC
Post by: ZylonBane on September 21, 2006, 12:33:46 am
Not in America it didn't.