Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Re: BASIC vs Python

Reply
Thread Tools

Re: BASIC vs Python

 
 
Steve Holden
Guest
Posts: n/a
 
      12-17-2004
Steve Holden wrote:

> Adam DePrince wrote:
>
>> On Thu, 2004-12-16 at 13:36, abisofile wrote:
>>
>>> hi
>>> I'm new to programming.I've try a little BASIC so I want ask since
>>> Python is also interpreted lang if it's similar to BASIC.

>>
>>
>>
>> Nobody is answering this question because they are shuddering in fear
>> and revulsion.
>> During the 1980's BASIC was the language to embedd into the ROM's of the
>> computers of the day. This was in a misguided effort to make computers
>> understandable to their target audience. The goal of the day was to
>> build a system that a manager would want to buy; it was believed that
>> the only way for a manager to see the value of a system was to make the
>> language understandable to said manager. The expectation, of course,
>> that the manager would sit down and play with the computer instead of
>> delegating the tasks to somebody more qualified is somewhat misguided in
>> hindsight. To do that, a language that closely resembled the process of
>> micromanaging an untrained worker was employed.
>>

> But that language was COBOL, not BASIC. BASIC is actually an acronym for
> "Beginners' All-purpose Symbolic Instruction Code", which the initial
> implementations at Dartmouth weren't, really. The big innovation was the
> use of line-numbering to allow interactive editing and testing of a
> program.
>

Which, now I remember, Digital Equipment extended to floating-point in
their FOCAL language. I never did discover whether the number of
insertions required was limited by the floating-point precision, but
Focal was unique in my experience in allowing insertion of statement 1.5
between statements 1 and 2.

(mumbles into beard and drools quietly in the corner).

talking-to-myself-again-ly y'rs - steve
--
Steve Holden http://www.holdenweb.com/
Python Web Programming http://pydish.holdenweb.com/
Holden Web LLC +1 703 861 4237 +1 800 494 3119
 
Reply With Quote
 
 
 
 
Jeremy Bowers
Guest
Posts: n/a
 
      12-17-2004
On Fri, 17 Dec 2004 13:53:15 +0000, Gregor Horvath wrote:
> OK. Then please schow me, how you can create a complex form with grids,
> explorer like trees etc. in 2 minutes in standard python.
>
> Or make any given standard python object accessible from MS Excel in 2
> minutes.


Boa, gtkglade, or, I forget what the equivalent is for QT but I'm pretty
sure it has one.

Of course, I never use them because I find static forms anathema, and I
build my forms dynamically from metadata; more flexible, more powerful,
ultimately more maintainable. (I have *never* experienced the "Oh ****, I
have to change 25 forms in 5 minutes for the demo!" moment; I've only
heard about the horrors of programs with umpteen hundreds of distinct
static forms second hand.) Try *that* in VB. It can be done, but you lose
so fast it isn't even funny.

One of the Facts of Life is that a sufficient quantitative change
*becomes* a qualitative change. Python makes enough things easier that you
do things that you'd never even imagine in VB.

I speak of VB 6, but knowing the language I'd still expect VB to be about
the worst .Net language to work in. BASIC bears only surface resemblance
to the BASIC of 30+ years ago but the philosophy hasn't changed. Static
forms are only a win if you need a program cranked out by one programmer
in less than a week; sadly, BASIC makes everything else so hard that few
people have realized this... but they have paid for it. Yes sir, you
always pay the piper.
 
Reply With Quote
 
 
 
 
It's me
Guest
Posts: n/a
 
      12-17-2004

"Gregor Horvath" <> wrote in message
news:fxBwd.12981$...
> It's me wrote:
> > Absolutely *ugly*!
> >
> > But still, your point is well taken. Thank you for pointing this out.
> >
> > Adam was right:
> >
> > "Don't do it, unless your goal is simply to embarrass and insult
> > programmers".

>
>
> OK. Then please schow me, how you can create a complex form with grids,
> explorer like trees etc. in 2 minutes in standard python.
>
> Or make any given standard python object accessible from MS Excel in 2
> minutes.
>
> --
> Greg


I thought we are talking about the language, are we not?

--
It's me


 
Reply With Quote
 
Mike Meyer
Guest
Posts: n/a
 
      12-17-2004
Christos "TZOTZIOY" Georgiou <> writes:

> On Fri, 17 Dec 2004 01:43:56 -0600, rumours say that Mike Meyer
> <> might have written:
>>Assembler was better - at least you had recursion with
>>assembler.

> You had recursion with BASIC --what you probably mean is that you had no
> stacked parameters (unless you imitated that with using an indexed
> array).


Quite right. My bad.

<mike
--
Mike Meyer <> http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.
 
Reply With Quote
 
Mike Meyer
Guest
Posts: n/a
 
      12-17-2004
Peter Hickman <> writes:

> Mike Meyer wrote:
>> BASIC as implented by Microsoft for the Apple II and the TRS 80 (among
>> others) is simply the worst programming language I have ever
>> encountered. Assembler was better - at least you had recursion with
>> assembler.

>
> Basic has progressed much since you last looked at it, time to update
> your facts. Basic has recursion, it compiles to native code, it has
> objects, can be event driven and everything else you would expect of a
> language.


That's why I said "as implemented by". I'm well aware that BASIC has
changed a lot since then, adding structured programming facilities,
local variables, and even objects in some cases. But we were
discussing languages of the mid-80s, not what's currently available.

> Computing changes too fast to allow you to think you know it all. Keep
> up to date granddad.


You should be sure of your context before making snippy comments.

<mike
--
Mike Meyer <> http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.
 
Reply With Quote
 
Adam DePrince
Guest
Posts: n/a
 
      12-17-2004
On Fri, 2004-12-17 at 01:49, Andrew Dalke wrote:
> Adam DePrince
> > During the 1980's BASIC was the language to embedd into the ROM's of the
> > computers of the day. This was in a misguided effort to make computers
> > understandable to their target audience. The goal of the day was to
> > build a system that a manager would want to buy; it was believed that
> > the only way for a manager to see the value of a system was to make the
> > language understandable to said manager.

>
> That doesn't sound like the 1980s I remember but I was biased
> because I those included my teenage years and I wasn't a manager.
>
> I though part of the market was for parents of kids like me.
> In my case I learned from the book that came along with the
> computer. I remember how confusing arrays were ("By default
> it only takes numbers between 1 and 10, so I should be able
> to use 2.5, right?"). I don't think I could have handled
> UCSD Pascal on my own nor the other languages available at
> the time.


Sure you could have. There is nothing I hate more than the dumbing down
of technology for the sake of families with children. Having kids
doesn't make you dumb, it only makes you feel that way when you realize
how quickly your children's technical prowess with outstrip your own.

To Apple and Atari this was true, maybe, but other companies had their
sights set on the much more lucrative industrial market. Many
companies had "business" versions of their home PC's. Tandy, Commodore
PET, etc etc.

>
> Editing BASIC is also dead simple to read and to implement
> on a machine with a few K of RAM. Compare to EDLIN for
> DOS or other editors of the era. That's the era of WordStar
> and the ^K^B and ^K^K control character commands. Again,
> not something a beginning solo student programmer can
> likely pick up easily.


Simple and cheap to implement for sure, terribly obnoxious to use.
There was nothing preventing the implementation of a proper
edit/compile/execute cycle in 16k. My Tandy 102 has a special "basic
editor" mode where it basically dumps the basic program into the text
editor and "compiles" it to its intermediate representation when you
leave. They could have just as easily used a real language. Sure, it
had 32k, but that was also used for its file system. The basic editor
worked fine with just 1kb or 2kb of memory remaining.

>
> The BASICs of my youth also supported graphics and sounds.
>
> PLAY "CGFED>C<GFED>C<GFEFB"
>
> HGR
> HPLOT 0,0 to 20,40
>
> Twenty, yes *20* years later there's still no standard
> module for Python for doing the sound effects I could do
> on my old TI 99/4A, even without the hardware speech
> synthesizer (fun for Parsec and a few other games


The operative word being standard. TI 994/A BASIC was hardly standard
BASIC. Sound and graphics have no place in a base language definition;
use an add on module for that.

For the record, Python does have graphics in its base distribution -
TK. Search freshmeat and you will find ample sound libraries that could
be plugged in.

Perfection is having nothing else to remove; TI BASIC's bells and
whistles hardly made up for the lack of fundamental expressiveness
available in a language like Lisp or Forth.

If you really miss the pc speaker style music, it isn't too much trouble
to: open( "/dev/audio", "w+" ).write( my_sample )

>
> > In BASIC you literally list the steps the computer will follow. Each
> > step gets a line number. Decisions are controlled by jumping to
> > different "line numbers." No where in the language was there any notion
> > of or ability to make your program remotely abstract. You know those
> > jokes on slashdot.org that read:

<snip>
> > Each language carries with it a philosophy. BASIC stands alone in being
> > so utterly perverse that learning it will render you completely
> > unmarketable, except as a basic programmer, as you unlearn its
> > limitations and learn how to think in the abstractions of every other
> > language.

>
> Which was just fine with me. I learned Pascal in Sr. High,
> C in college (and C++ and Fortran) and didn't get paid to be
> a full-time programmer until 3 years after I graduated college.


I don't understand, are you presenting yourself as an example of my
assertion?

>
>
> > Perhaps I can best illustrate the difference between the two with an
> > analogy. Suppose you came to me and asked which was a better way of
> > learning a foreign language, the python way or the BASIC way.

>
> > The Python way would be how a language is taught in any normal class
> > you might find at a local college. You learn the vocabulary, grammar,
> > history and culture of the language.

>
> Let's try this recasting of your analogy.


You don't really think my intent was to be objective and unbiased?

>
> Given the hardware constraints of the early 1980s, which
> language do you think should have been used instead of BASIC?


Lisp
Forth

Thank you for feeding me.

Adam DePrince


 
Reply With Quote
 
Adam DePrince
Guest
Posts: n/a
 
      12-17-2004
On Fri, 2004-12-17 at 09:25, Steve Holden wrote:

> > OK. Then please schow me, how you can create a complex form with grids,
> > explorer like trees etc. in 2 minutes in standard python.


Use glade.

> >
> > Or make any given standard python object accessible from MS Excel in 2
> > minutes.


What you describe is a political, not technical, challenge.




Adam DePrince


 
Reply With Quote
 
Adam DePrince
Guest
Posts: n/a
 
      12-17-2004
On Fri, 2004-12-17 at 12:52, Mike Meyer wrote:
> Peter Hickman <> writes:
>
> > Mike Meyer wrote:
> >> BASIC as implented by Microsoft for the Apple II and the TRS 80 (among
> >> others) is simply the worst programming language I have ever
> >> encountered. Assembler was better - at least you had recursion with
> >> assembler.

> >
> > Basic has progressed much since you last looked at it, time to update
> > your facts. Basic has recursion, it compiles to native code, it has
> > objects, can be event driven and everything else you would expect of a
> > language.


What you describe isn't everything that I'd expect of a language.
Again, this is what I meant when I suggested that making basic your
native language limits your horizon.

1. First class functions
2. Full functional programming support ala Standard ML
3. Portability
4. Elegance

Please try to understand that Python is not created to kowtow to the
political and financial needs of any one entity. It is a group of
hackers that for reasons of ego satisfaction alone wish to create a
language that incorporates the best practices of every other language
they have a collective awareness of.

The only really common implementation of BASIC that exists is MS Visual
Basic. Its goals are a bit different - the furtherance of its author's
financial ambitions is its primary goal, and its geek appeal has
suffered as a result.

>
> That's why I said "as implemented by". I'm well aware that BASIC has
> changed a lot since then, adding structured programming facilities,
> local variables, and even objects in some cases. But we were
> discussing languages of the mid-80s, not what's currently available.
>
> > Computing changes too fast to allow you to think you know it all. Keep
> > up to date granddad.

>
> You should be sure of your context before making snippy comments.


I'd like to ask everybody a simple question. How many computer
languages are you completely and utterly fluent in? The reason I ask is
I'd like for everyone who has participated in this discussion to
introspect and ask themselves why they hold the views they do.

Does your opinion come from a deep understanding of computer languages
as a whole, or is it a reflection of the small list of languages you
happen to know?

Lastly, Mike, please refrain from "argumentum ad hominem." You never
know where life will bring you. Wouldn't it suck to find your dream
job, only to meet "Granddad" at the interview?

Need I point out that wandering onto python- and having
strong opinions in favor of BASIC is sort of like wandering into a
Hasidim temple on Yom Kippur and talking about the salvation of Jesus
while munching on a ham and cheese sandwich? Don't be surprised if you
have trouble making friends.

Adam DePrince


 
Reply With Quote
 
Adam DePrince
Guest
Posts: n/a
 
      12-17-2004
On Fri, 2004-12-17 at 10:14, Steve Holden wrote:
> >> Nobody is answering this question because they are shuddering in fear
> >> and revulsion.
> >> During the 1980's BASIC was the language to embedd into the ROM's of the
> >> computers of the day. This was in a misguided effort to make computers
> >> understandable to their target audience. The goal of the day was to
> >> build a system that a manager would want to buy; it was believed that
> >> the only way for a manager to see the value of a system was to make the
> >> language understandable to said manager. The expectation, of course,
> >> that the manager would sit down and play with the computer instead of
> >> delegating the tasks to somebody more qualified is somewhat misguided in
> >> hindsight. To do that, a language that closely resembled the process of
> >> micromanaging an untrained worker was employed.
> >>

> > But that language was COBOL, not BASIC. BASIC is actually an acronym for


It was a common theme and more than one language embraced it. The PET
20 wasn't exactly going to run COBOL any time soon.

To be fair, COBOL resembled the micromanaging of a well trained worker,
an accountant or actuary perhaps.

Notice that today every white collar employee that can afford to keep
the heat running in their office during the winter fantasizes their
operation as being "enterprise" class? The same was true 20 years ago -
but it was the mere presence of the computer that served a similar
role. If you were really enterprise class, you used COBOL. And if you
were in the wannabe category, you got yourself a PET 20 and told it what
to do in BASIC.

> (mumbles into beard and drools quietly in the corner).


Adam DePrince


 
Reply With Quote
 
Dan Bishop
Guest
Posts: n/a
 
      12-17-2004
Peter Otten wrote:
> Peter Hickman wrote:
>
> > Mike Meyer wrote:
> >> BASIC as implented by Microsoft for the Apple II and the TRS 80

(among
> >> others) is simply the worst programming language I have ever
> >> encountered. Assembler was better - at least you had recursion

with
> >> assembler.

> >
> > Basic has progressed much since you last looked at it, time to

update your
> > facts. Basic has recursion, it compiles to native code, it has

objects,
> > can be event driven and everything else you would expect of a

language.
> >
> > Computing changes too fast to allow you to think you know it all.

Keep up
> > to date granddad.
> >
> > However what basic doesn't have is a portable language definition.

>
> May you could give us an idea of the current state of basic affairs

then by
> translating the following example snippet:
>
> It's me wrote:
>
> > I saw this code from an earlier post:
> >
> > lst1 = ["ab", "ac", "ba", "bb", "bc"]
> > lst2 = ["ac", "ab", "bd", "cb", "bb"]
> > dct1 = dict.fromkeys(lst1) # <-- I'll assume "lst2" was intended.
> > print [x for x in lst1 if x not in dct1]
> > print [x for x in lst1 if x in dct1]
> >
> > It's simply remarkable for somebody to be able to do it so cleanly

(and so
> > obviously) - "out of the box", if you may.
> >
> > Sure, you can do it in Basic. Ur...sure? Yes, sure...


In Microsoft QBasic (1987), this could be written as:

DECLARE FUNCTION INARRAY% (ARR() AS STRING, X AS STRING)

DIM LST1(4) AS STRING
DIM LST2(4) AS STRING
DIM I AS INTEGER

FOR I = 0 TO UBOUND(LST1)
READ LST1(I)
NEXT

FOR I = 0 TO UBOUND(LST2)
READ LST2(I)
NEXT

' Print the elements of LST1 that are NOT in LST2
FOR I = 0 TO UBOUND(LST1)
IF INARRAY(LST2(), LST1(I)) = 0 THEN PRINT LST1(I); " ";
NEXT
PRINT

' Print the elements of LST1 that are in LST2
FOR I = 0 TO UBOUND(LST1)
IF INARRAY(LST2(), LST1(I)) = 1 THEN PRINT LST1(I); " ";
NEXT
PRINT

' Elements of LST1
DATA "AB", "AC", "BA", "BB", "BC"
' Elements of LST2
DATA "AC", "AB", "BD", "CB", "BB"

FUNCTION INARRAY% (ARR() AS STRING, X AS STRING)
' Return 1 if X in ARR, 0 otherwise
DIM I AS INTEGER
FOR I = LBOUND(ARR) TO UBOUND(ARR)
IF X = ARR(I) THEN
INARRAY = 1
EXIT FUNCTION
END IF
NEXT
INARRAY = 0
END FUNCTION

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
TurboTax Basic vs. Taxcut Basic? Sharp Dressed Man Computer Support 1 01-12-2009 12:52 PM
What is the difference between Visual Basic.NET and Visual Basic 6? Jimmy Dean Computer Support 3 07-25-2005 07:05 AM
Re: Python interpreter in Basic or a Python-2-Basic translator. rrr@ronadam.com Python 0 05-02-2005 01:48 PM
Python interpreter in Basic or a Python-2-Basic translator. Engineer Python 6 05-01-2005 10:16 PM
Upgrading Microsoft Visual Basic 6.0 to Microsoft Visual Basic .NET Jaime MCSD 2 09-20-2003 05:16 AM



Advertisments