Maker Pro
Maker Pro

Larkin, Power BASIC cannot be THAT good:

B

Bob Larter

John said:
I'm an engineer and I design electronics. This is s.e.d. Does your C
do transient and frequency-domain circuit simulation? I use LT Spice
for that. And I use PowerBasic for engineering calcs and graphics. The
graphics are great.

John, have you tried FreeBASIC?
<http://www.freebasic.net/>
And if so, how does it compare to PowerBASIC?
 
B

Bob Larter

AZ said:
And BASIC? Want to talk about archaic?

True. BASIC is older than C.
A language that doesn't have
structured datatypes,

Depends on the version.
doesn't have block statements,

Mostly true, although it depends on the version.
can't call subprograms,

Not true.
can't pass parameters to subroutines

Depends on the version.
can is only good for nasty horrible
spaghetti code unless you use some proprietary extensions that haven't a prayer
of ever working on any other system?

Also not true. I've written recursive code in BASIC. Admittedly, it was
painful.
At least programs written in C are transportable.
All BASIC is good for is throaway code.

Not true. You can write crap code in any language. If nothing else,
BASIC's simple enough to be at least usable as pseudocode.
 
B

Bob Larter

Nobody said:
And I'd guess that most of it is incompatible with other Basics, and not
related to any formal standard.

C has most of this in the standard, so you can use the same code with gcc,
icc, msvc, ...

Unless you want to do graphics, or have a GUI.
 
B

Bob Larter

krw said:
Wrong. A bit is a contraction of "binary digit". It, by definition,
can only have two states.

Until you connect a 74LSxx output to a 74HCxx input...
 
T

Tim Williams

John Larkin said:
The PB folks do actual support, too. Email them a question, and they
answer. The documentation/HELP/manual are excellent too. I've noticed
that free/open software tends to have abysmal, inarticulate
documentation if it has any at all. If I save an hour somewhere, it's
worth the price of the paid version.

The online help is actually fairly useful. The compiler seems stable enough
for the constructs I've used, which isn't many, but it's not crashing left
and right anyway.

For professional purposes you'd obviously use a professional piece of
software, like PB.

Tim
 
S

Spehro Pefhany

I've noticed the exact opposite. Commercial software has some of the worst
documentation, usually no how-to guides, and no help forums.

When I see a button titled "wackflimflam", it doesn't do me a whole lot of
good if all the online help has "Use this button to wack the flim flam."

My other favorite is documentation that describes the exact function
that you need, but fails to tell you that it is 3 levels down in the
7th optional toolbar, and requires you to be in a certain one of 4
modes before the options several levels up will even be visible.
 
R

Rich Grise

Saying that McDonalds sells good food is like saying that RadioShaft
sells good electronics.

De gustibus non disputandum est. ;-)

Cheers!
Rich
 
K

krw

Until you connect a 74LSxx output to a 74HCxx input...

If there is a problem (there usually isn't and that can be taken care
of with a resistor), it's no longer binary. Do you now what the word
"definition" means?
 
B

Bob Larter

krw said:
If there is a problem (there usually isn't and that can be taken care
of with a resistor), it's no longer binary. Do you now what the word
"definition" means?

I was joking - lighten up.
 
M

Martin Brown

John said:
No, I haven't.

This is scary:

"When the compiler become stable enough - the actual priority - new
optimizations will be added, like common sub-expressions elimination,
dead code elimination, register variables, among others."

http://www.freebasic.net/index.php/about?section=features

Why do you consider these optimisations scary. They are standard now in
modern compilers and whilst a cooperative free software development team
might take a while to get it correct they are on the right track. I
don't approve of declaring register variables but apart from that ~OK.

Dead code elimination and determining paths where variables can be used
before initialisation during compilation saves time. Some of the
unreachable code lurking in a large project is often unintentional.
PB seems absolutely stable and very well optimized. So far, it has the
record for doing my 64M-sample signal averaging thing, 207 millisec,
better than any C that's been posted here.

It isn't at all clear why. The sheer volume of data being moved and
limited arithmetic means that the test you posted is very insensitive to
the quality of code generation and entirely dominated by the performance
of the memory subsystem. It is choking on external resources waiting for
data all the time.

It would be interesting to see the x86 assembler code that Powerbasic
has generated. I do not believe in magic.
The PB folks do actual support, too. Email them a question, and they
answer. The documentation/HELP/manual are excellent too. I've noticed
that free/open software tends to have abysmal, inarticulate
documentation if it has any at all. If I save an hour somewhere, it's
worth the price of the paid version.

JPEGLIB has reasonable documentation as does WFFT. Incidentally unless
you are very interested in precise determination of very low frequencies
you are barking up the wrong tree with a million sample FFT.

Regards,
Martin Brown
 
B

Bob Larter

Classic MS 'help'.
My other favorite is documentation that describes the exact function
that you need, but fails to tell you that it is 3 levels down in the
7th optional toolbar, and requires you to be in a certain one of 4
modes before the options several levels up will even be visible.

Photoshop's good for that one.
 
T

Tim Williams

Michael A. Terrell said:
'Vital Industries' did real time broadcast quality NTSC video special
effects with a Z80B in the mid '80s.
^^^^
Really? Sounds interesting . . .
768 K of 12 bit DRAM for the video
Luminance & Chroma signals. It processed one page, while displaying a
second. It could also be used as a frame sync, to stabilize &
synchronize external video that couldn't be genlocked to the studio
timebase. The system filled a full relay rack and used 1,000 amps on
the 5 volt rail.

.. . . Except that, no sane amount of hardware alongside a Z80 is going to
use that much current. Methinks there was several orders of magnitude more
processing power in MSI chips than the puny Z80! :)

Tim
 
N

Nobody

Now that is a shame. I do not happen to have any postscript printers.
Maybe i can try ghostscript, if i can figure how to run it as an
interpreter application. Funny i do not remember finding "." as any
kind of operator or function in postscript. Since you are much more
familiar with postscript perhaps you can refer me to where in the PLRM
is discussed.

"." isn't a predefined PostScript operator.

More generally, the only symbolic operators in PostScript are:

[ ] << >> = ==

[ { and } are language syntax rather than names.]

Everything else uses alphabetic names, e.g. the arithmetic operators are
named add, sub, mul, and div, the relational operators are named eq, ne,
lt, gt, le, and ge, and so on.
 
N

Nobody

That matches what i got from a very partial reading of the PLRM. I
did pick up that there is some kind of name to user defined function
association thing but it never became clear in my cursory browsing.
Nor do i get the multiple stacks yet.

The main ones are the operand stack (i.e. "the stack"), and the dictionary
stack.

The operand stack is reasonably obvious; values are pushed onto the stack,
operators pop their arguments from the stack and push their results onto
it.

The dictionary stack determines the scope of names. Whenever the
interpreter needs to evaluate a name, it looks it up in the topmost
dictionary on the dictionary stack. If the lookup fails, it tries the next
one down, and so on until it either finds a match or it exhausts the
stack (at which point you get an "undefined" error).

If you bind a name with "def", it is added to the topmost dictionary on
the stack. At startup, there are two dictionaries on the stack: systemdict
at the bottom and userdict at the top. The standard operators are defined
in systemdict, which is read-only; userdict is where any user-defined
bindings go (unless additional dictionaries are pushed onto the
dictionary stack).

For complex functions, it's often simpler to start by pushing a new
dictionary onto the stack so that you can associate names with parameters
and intermediate results, rather than having to manipulate the operand
stack explicitly with dup, index, roll, etc. Using a new dictionary
ensures that you don't accidentally trash any bindings which were being
used by the caller; you just pop it off when you're done with it.

The other important stacks are the VM stack (the save and restore
operators save and restore the state of composite values such as arrays
and dictionaries) and the graphics stack (gsave and grestore save and
restore the state of the graphics engine, which allows elements of the
page to be encapsulated so that any state changes within each element
don't affect subsequent elements).
 
B

Bob Larter

JosephKK said:
Now that is a shame. I do not happen to have any postscript printers.
Maybe i can try ghostscript, if i can figure how to run it as an
interpreter application.

If you run it from a commandline, that should work.
Funny i do not remember finding "." as any
kind of operator or function in postscript. Since you are much more
familiar with postscript perhaps you can refer me to where in the PLRM
is discussed.

Section 3.8.5. And the operator is renamed '=' instead of '.', which I'd
forgotten, but it does the same thing.
 
B

Bob Larter

My mistake. That operator is named '=' in PS. Eg:
1 2 3 add add =
will print '6' to your terminal.
More generally, the only symbolic operators in PostScript are:

[ ] << >> = ==

[ { and } are language syntax rather than names.]

Everything else uses alphabetic names, e.g. the arithmetic operators are
named add, sub, mul, and div, the relational operators are named eq, ne,
lt, gt, le, and ge, and so on.

That matches what i got from a very partial reading of the PLRM. I
did pick up that there is some kind of name to user defined function
association thing but it never became clear in my cursory browsing.

FORTH & PS work by building new words out of existing ones & slapping a
name on them. Eg (under Ghostscript):
/addsix {6 add =} def
....creates a new function named 'addsix' that adds 6 to whatever number
is on the top of the stack & outputs it to your terminal, so:
Nor do i get the multiple stacks yet.

The operand & execution stacks work the same way that they do in other
languages, it's just that they're split into separate stacks. The only
'new' one is the dictionary stack.
 
N

Nobody

Crickey, that is more like a list than a stack.

It's modified as a stack (i.e. dictionaries are pushed onto and
popped off the top of the stack) and searched as a list.

The end result is equivalent to a dynamically-scoped language.
Well the insight in how to use the stacks is notably missing from the
PLRM.

The way that names are resolved is documented. It's up to the programmer
as to how (or whether) to make use of the dictionary stack.
 
Top