Powerbasic Museum 2020-B

IT-Berater: Theo Gottwald (IT-Consultant) => PureBasic Tipps and Tricks => Topic started by: Theo Gottwald on February 29, 2016, 03:44:59 PM

Title: Edwins Tools (Incl. PBDev)
Post by: Theo Gottwald on February 29, 2016, 03:44:59 PM
Here is a Site with Downloads from Edwin Knoppert.
Also a version of PwrDev for PureBasic can be downloaded.
I did not try if it works.

Edwins Tools (http://sites.nofeeshost.com/hellobasic/downloads/?ckattempt=1)
Title: Re: Edwins Tools (Incl. PwrDev)
Post by: Bob Houle on March 01, 2016, 12:34:47 AM
Still works.  :)

The odd time, you'll have to adjust the generated code.

Still the nicest Visual Designer for ease of use and getting out of the way.

blueb
Title: Re: Edwins Tools (Incl. PwrDev)
Post by: Theo Gottwald on March 01, 2016, 10:01:27 AM
Can you give me a hint what exactly needs to be modified?
Also, IS PwrDev now Free or not?
Title: Re: Edwins Tools (Incl. PwrDev)
Post by: Bob Houle on March 01, 2016, 04:31:45 PM
I complies most times, with no problems, but a few keywords have changed slightly.
eg... Renamed Frame3DGadget() to FrameGadget() (since ALL frames were now always 3D )

No, PrwDev was never free (as far as I know)

but PBDev is.  ;D


           
Title: Re: Edwins Tools (Incl. PwrDev)
Post by: Theo Gottwald on March 01, 2016, 06:02:59 PM
And what is the difference? PBDev and PwrDev ?
Title: Re: Edwins Tools (Incl. PBDev)
Post by: Bob Houle on March 04, 2016, 04:51:43 PM
Two completely different programs  :)

PwrDev - PowerBASIC Visual Designer

PBDev - PureBasic Visual Designer

Title: Re: Edwins Tools (Incl. PBDev)
Post by: Theo Gottwald on March 05, 2016, 07:18:56 PM
What exactly does need to be changed to make it work with the newest PureBasic version?
Title: Re: Edwins Tools (Incl. PBDev)
Post by: Bob Houle on March 06, 2016, 04:09:31 PM
You cannot tell what PBDev needs until you compile your program.

If there's a problem, the PureBasic compiler will point you in the right direction.

Remember PBDev is 7 years old (2009) and PureBasic has improved. Expecting PBDev to
be totally compatible is not going to happen.... but it's still very usable to me.

Because PureBasic is the best programming language out there {grin} and has the most
liberal licensing system (lifetime license)... you can download the version that IS TOTALLY
COMPATIBLE WITH PBDEV.

All you need to do is go to the "museum"and download: Version 4.31 - (June 2009)
Then everything will run fine.  :)

PS - Many users have more than one version of PureBasic installed on their computer.

Simply put different versions in different directories.
e.g.
C:\PureBasic431
C:\PureBasic542, etc.
same as 32-bit and 64-bit


Title: Re: Edwins Tools (Incl. PBDev)
Post by: Theo Gottwald on March 07, 2016, 01:52:39 PM
I will not pay for the design flaws of Fred, with the installation of several PureBasic versions.
With the last release they have made some small improvements in teh builtin VD, so it does not generate
such a buggy code like before.
Possibly it can be used for simple Forms.

For the Rest currently i have to stick with Firefly.
;D
Title: Re: Edwins Tools (Incl. PBDev)
Post by: Bob Houle on March 07, 2016, 03:33:21 PM
QuoteI will not pay for the design flaws of Fred, with the installation of several PureBasic versions.

Stop being so melodramatic  ;D

If I design a program in with version 1 of my favorite compiler, and it works... fine, it'll work for a long time.
There are no guarantees however (remember all the *.hlp files... they no longer open in Windows 7 or later)
I guess you should insist Microsoft fixes their design flaws.  ;)

In this case, you could blame Edwin for designing a program that doesn't work properly, but somehow I think he may have some choice words for you.

Title: Re: Edwins Tools (Incl. PBDev)
Post by: Theo Gottwald on March 09, 2016, 08:22:30 AM
i wrote something about Microsoft in the PureBasic Forum, and here also.
Go and read it. Its about the "design flaws" of Windows 10. And they are numerous.
My conclusion was "Any windows since Windows 2000 was worse then the windows before".
Ok, that my opinion.

Now back to PureBasic. I think that PureBasic developed much better then windows.
I did never regret that i bought it - possibly as one of the first customers.
And i possibly would buy it again because its very cheap for what it offers.

Besides that it has some design flaws. Before i start and you feel insulted - which is NOT my intention,
get this book and read it.
Book on compiler architecture (http://www.amazon.de/Engineering-Compiler-Keith-Cooper-ebook/dp/B00J5AS70G/ref=sr_1_8?ie=UTF8&qid=1457509452&sr=8-8&keywords=compiler+architecture)

For me they are openly visible. Because i come from PowerBasic.
But if you come from Visual Studio - it will not be of much difference.

In PowerBasic we have an unbelievable backwards compatibility since at least version 6.

In PureBasic - and i watch this for long time -
with each new version, you have to watch for all user-libraries to be updated.

Problem is that many of them are not beeing updated.

In my opinion:
If the "core compiler/assembler" would have been designed professional,
not from a hobbyist, that Fred was at this time when he started PureBasic -
the compatibility would be much greater over the years.

And we would not have the architecture like it still basically has.

Of corse now he changes here and there with any version a bit to handle the shortcomings.
And exactly these small architectural changes break the compatibility.
Normally a clean cut and a clean redsign - possibly with a new name (and an new licence?)
would be the way out of this.

Instead of doing a clean cut and having a real "compiler core" that does not need to change ever.

Just an example:
The handling of local variables "on the stack" prevents the use of "CALL RET" inside prodcedures.
Go out and search a second compiler using this system.
You will never find one, because this is just not "how things are done".
Nobody will implement it like this.

If you don't believe me get a university course on compiler building. Thats just what he never did.
So besides all the good things (libraries etc.) there are some basic desgin flaws that
he defends like they are for any reason.

But the reason is just historic and its not easy to change.
Because it would need a clean cut and a clean system-design.

And now he changes here and there and as a result these changes prevent a better compatibility betwen the versions.

I think you need to understand that i am coming from a scientific standpoint.
Read in the PureBasic Forum. I am definitely not alone with this opinion.

These things that you learn in university have been proofed to work over the last years.
Did you know that  "compiler building" is already a science?

CPU's are designed in a way to support building of compilers.

In some places - and that includes the handling of local variables. the construction of Loops and conditions, at least there you have to hold the "rules".
Because they are built in the CPU and ANY compiler out there will also do it in the same way.


There are rules you can learn, these are scientific standards.
You can't make a program that does not support floating point number in a FOR .. NEXT Loop and say "this is a compiler".
Your professor will kick you out of the course in that schoool. Its just a Basic design flaw.

Why should it not be allowed to talk about this?

If you say "Ok, its a Macro Assembler" then the same program will be Ok.
But its just not a "state oif the art" compiler - and you will also not find a second one with these design flaws out there.

Other then in hobbyist projects. Thats something you can try yourself.
Go and find one.

PS: I should really write a book on that :-) while there are already some ...
Title: Re: Edwins Tools (Incl. PBDev)
Post by: Bob Houle on March 09, 2016, 03:14:03 PM
Well let's agree to disagree  ;)

But you are "really" hung up on For/Next loops and floating point numbers..
QuoteYou can't make a program that does not support floating point number in a FOR .. NEXT Loop and say "this is a compiler".

but I believe floating point numbers can cause problems here...
because they ARE floating point numbers...
but that's just me (and Fred as well)  ;)

Since we are quoting Computer Science....

QuoteFrom the IEEE Standard...

Rounding Errors...

Squeezing infinitely many real numbers into a finite number of bits requires an approximate representation. Although there are infinitely many integers, in most programs the result of integer computations can be stored in 32 bits. In contrast, given any fixed number of bits, most calculations with real numbers will produce quantities that cannot be exactly represented using that many bits. Therefore the result of a floating-point calculation must often be rounded in order to fit back into its finite representation. This rounding error is the characteristic feature of floating-point computation.

Title: Re: Edwins Tools (Incl. PBDev)
Post by: Theo Gottwald on March 09, 2016, 07:21:27 PM
Hahaha ... of course there are rounding errors.

What you say here is that you can not construct a FOR .. NEXT Loop (like PowerBasic and any other compiler can) because of possible rounding errors?

Thats why i said "Get the book".
Look others can.  ;D

PS: Now we get to the real topics. Maybe there are missunderstandings somewhere?
"Rounding errors" ? ::)
Title: Re: Edwins Tools (Incl. PBDev)
Post by: Bob Houle on March 10, 2016, 04:32:47 PM
From PureBasic forum...

It's a bad policy to use floating point variables for loop counters and loop increments.

Loop counts are, by definition, integral values. So even if floating point values are needed in the loop, the actual counting should always be done using integer values.

This will prevent rounding errors from causing incorrect loop counts.

So instead of trying to use:
    For A.d = 1 To 1.1 Step 0.05
    .
    .
    Next
------------------------------------------------

Use the following instead and, if needed, scale the value of the loop counter back to a floating point value.

Code:
For X.i = 100 To 110 Step 5
.
. A = X / 100
.
Next
------------------------------------------------

No use introducing a potential 'rounding error' bug that would be very hard to trace.  :)
Title: Re: Edwins Tools (Incl. PBDev)
Post by: Theo Gottwald on March 10, 2016, 06:58:52 PM
Bob, I know that.
There are multiple such things that you need to do workarounds because "Fred doesn't like it".
While i am religiouse, not so much in programming.

In case i really want to do much FP or String stuff, i will avoid PureBasic.
PureBasic has its strong sides where it has libraries.
And its possibly a great "Game-Basic". ;D

You know my first computrer was an ATARI 400. It had a BASIC language within a 8KB ROM.
And it had 8 KB RAM. When i bought my first 32 KB Memory expansion i felt like the "Computer King".
It was around 1980. Look what was possible even at that time.

In fact it was a 8 bit Computer.

FOR .. NEXT using FP with the ATARI 400 (http://www.abbuc.de/atari/software-ressort/133-software/softwarereferenz/309-atari-basic-referenz#FOR)

Maybe i never wannted to go behind this one :-)
Title: Re: Edwins Tools (Incl. PBDev)
Post by: Bob Houle on March 11, 2016, 03:54:40 PM
QuoteIn case i really want to do much FP or String stuff, i will avoid PureBasic.
::)

hahahahaha!

Theo, you crack me up!  ;D

Do you really think that PureBasic would still be around if it couldn't handle these "basic" things.

I said this before... Give me a string (or floating point) example of something 'impossible' in PureBasic.

Here are examples of what's available (in the rare case you find PureBasic "inadequate")

User Libs available:

-------------------------------------------------------
aNuMet - A Lib for numerical calculations -

Implements 40+ Matrix functions, including Determinant, Inverse, Division, Trasposed.
Solves equation systems, calculate coefficients of polinomial curve, show matrix elements, etc.
Includes equation parser/solver/intergator/differentiation with variables and functions
and other functions.
See the sample code in PB for the list of functions.
Very fast code. Sample code available in PureBasic.
---------------------------------------------------------

GNU MP Lib: Is a portable library written in C for arbitrary precision arithmetic on integers, rational
numbers, and floating-point numbers.
If you need numbers like this:
9.1596559417721901505460351493238411077414937428167213e-01
---------------------------------------------------------

MPFR library - MPFR is based on the ABOVE GMP multiple-precision library.
The MPFR library is a C library for multiple-precision floating-point computations with correct rounding.
MPFR has continuously been supported by the INRIA and the current main authors come from the Caramba
and AriC project-teams at Loria (Nancy, France) and LIP (Lyon, France) respectively; see more on the credit
page.

The main goal of MPFR is to provide a library for multiple-precision floating-point computation which is both
efficient and has a well-defined semantics. It copies the good ideas from the ANSI/IEEE-754 standard for
double-precision floating-point arithmetic (53-bit significant).
Contains 260 commands
---------------------------------------------------------

I can give you many more (strings too!)... to help you with the inadequacies of PureBasic.  ;)


Title: Re: Edwins Tools (Incl. PBDev)
Post by: José Roca on March 11, 2016, 04:29:51 PM
I have the same complain both for PureBasic and FreeBasic: they don't support dynamic unicode strings and structured exception handling. There are other drawbacks.

Libraries like GNU MP Bignum Library are open source libraries that you can use with almost any compiler, so it is not a merit of PureBasic.