PDA

View Full Version : thinBasic direction



John Spikowski
30-11-2012, 20:28
*** deleted ***

Petr Schreiber
30-11-2012, 22:06
John, the day you will be able to focus all your energy on simply working on your project instead of doing this, you will create something beautiful. I am sincerely convinced about it.


I keep my fingers crossed,
Petr

ErosOlmi
01-12-2012, 13:31
Today is not the day to reply to your question.

ErosOlmi
03-12-2012, 16:03
Two considerations:

thinBasic development has just recently started to take advance of PowerBasic 10.x features.
Only starting from thinBasic version 1.9.x.x release, currently in beta stage and released just few weeks ago, I started to use PowerBasic 10.x features and only at a minimum level.
This means there are a lot of PowerBasic compiler features still to be studied and eventually used in thinBasic development
so far the official information we have from PowerBasic are that sales, support and development will continue as usual. Bob Zale wife is in charge of PowerBasic company: http://www.powerbasic.com/support/pbforums/showthread.php?t=51895

For those two reasons, I will continue to use PowerBasic Compiler to develop thinBasic.

Regards
Eros

Michael Clease
04-12-2012, 10:54
John can we assume that you have started converting scriptbasic to oxygenbasic ??

Charles Pegge
04-12-2012, 14:00
As long as we have Microsoft and Pentium-powered PCs we will have PowerBasic.

No need to panic yet but the technology is gradually shifting, and we also have to consider how BASIC can remain accessible and useful to new generations of programmers, and how it can be sustained with declining funds, in an environment where most programming tools are free.

Charles

Charles Pegge
10-12-2012, 07:26
We have discussed it in the past. There is general compatibility (also with thinBasic headers), but PB has adopted a COM-based object model, more tuned into VisualBasic. So a few adaptations would be required to read the COM parts. But my preference is to be able to use original C headers with minimal translation or cleanup.

Nonetheless, I often refer to Jose's headers for interpretation - the C originals can be very convoluted and excessively defined.

ErosOlmi
12-12-2012, 00:27
For sure current down/up/down of PB forum and web site is not good.

Even if they are moving into a new site or doing whatever action into another direction, leaving the web site in "The requested URL /support/ was not found on this server." status is not good for a commercial company.

Will see.

ErosOlmi
12-12-2012, 08:08
My direction is the same I posted in this thread.
Even if PB Inc would stop now, PB Compiler would be a great compiler for many years: it is so feature rich, it is rock stable, it is mainly bug free.
So this is not the point now.

I was only stating about the way web site was recently conducted.

ErosOlmi
14-12-2012, 10:05
So ... all is going on as usual ;)
Now I feel better.

José Roca
16-12-2012, 13:40
Does it matter? Leave the dead to rest in peace.

ErosOlmi
16-12-2012, 14:30
John, I'm quoting José words:

Does it matter? Leave the dead to rest in peace.

So please let's the time do its job.
We will see next year what will be the situation.

ErosOlmi
16-12-2012, 17:39
John,

I'm very sorry about that. Such a sequence would waste anyone.

In any case, because you know better than us, let them (I mean PB staff/family) face the period.
Maybe in few weeks they will let us know if there will be a direction or not.

Eros

Charles Pegge
16-12-2012, 18:42
The most important thing when tragedy strikes - losing several family members in rapid succession, is to be very kind to yourself. Regardless of one's philosophical viewpoint, losing close family members or friends is physically and emotionally traumatic. It takes time to recover and there is often a lot of work to do, especially if you have administrative responsibilities. It all takes time to settle and rebalance.

Charles

ErosOlmi
19-12-2012, 18:14
Yes, there is a bug in thinBasic.
I think because I'm making a copy of the string so after 800MB of allocation the string len is zero but the allocate memory remain.

I will check.
Thanks John

ErosOlmi
21-12-2012, 15:47
You need to use latest PB10x which has "#Option LargeMem32" option
With this option I was able to execute and run without problems up to 2.1Gb string



#Compile Exe
#Dim All
#Option LargeMem32


Function PBMain () As Long


Dim s As String
s = String$(2100000000, $Nul)
MsgBox Str$(Len(s))


End Function


Attached source and EXE so you can test
Ciao
Eros

Charles Pegge
21-12-2012, 19:01
Interesting John.

This is a limitation of MS Bstrings (32 bit length descriptor). Can we assume this limitation does not apply to system memory allocation on a 64bit platform?

Charles

Charles Pegge
21-12-2012, 21:39
Then you must compose your DVDs in 2 sections, when in Windows :)

LanceGary
22-12-2012, 13:22
Maybe this is the follow-up to ...

Bill Gates denies ever saying the above...

Lance

HelloCode
28-12-2012, 09:15
Yes, it is stupid. Don't to be stupid.

largo_winch
04-01-2013, 12:35
hello. I've a general "programming question" thinbasic. it's possible or is thinbasic available to get more power than e.g. "powerbasic" ?

that's a serious question, because I've had a discussion last days with some freebasic users if there's a chance to create a common (synergie project) programming language they use the best of three or four top basic languages? I can consider the very interesting module feature of thinbasic and python too they will have a future for next ten, twenty years or more. I've noticed that you can merge oxygen with thinbasic and even freebasic. there was a discussion yet at another time so a similar theme but for me it's important question "what can be there for chance for thinbasic for the future?". :-)

I am impressed what good feedback this interpreter became last years and I am glad to see that this programming language will overlive all stormy wheathers.

bye, largo

ErosOlmi
04-01-2013, 13:55
Hi largo_winch,

in one way or the other, thinBasic will survive to this "stormy weathers".

As you know thinBasic is developed using PowerBasic and even if PowerBasic could have a "stormy weather" it is so good, so full of features and bug free that it can be used to develop professional applications and libraries for many years. And there is still the possibility that remaining PowerBasic Inc guys will be able to go on with PowerBasic Compiler project.
So I do not see any problem on this side so I do not see big problems for thinBasic future.

Regarding possibility to merge different projects, I do not see how.

Ciao
Eros

ErosOlmi
06-01-2013, 20:25
You can be right or wrong depending on the situations.

In many companies it is important to keep things as they are when they are rock solid and work fine.
In other companies it is important always be over the wave of the last new "fashion" system.

I can understand the second situation is important but I prefer the first especially considering I still didn't find the limit of my development tool.

PS:
most of the bosses wants things rock solid working fine on a long term.
Mainly because they just do not understand how they work but just want a system to work fine

Chris Boss
12-01-2013, 06:53
Even if there was no new version of PowerBasic released ever, the compiler will be good for probably the next decade as long as there is a Windows Desktop.

I have tested a good bit of my GUI engine (built using PowerBasic 9.0) on Windows 8 and it runs almost flawlessly.

By being able to access the Windows API directly, the compiler has actually increased its lifespan.

To show you how powerful the PB compiler is, my latest GUI engine (which does a lot of compex stuff) was being developed using PB 6.1 and not the latest compiler. I had to switch to a newer compiler only because I maxed out the resources of the 6.1 compiler (too much to compile). I could have moved to PB 7.0, but I decided to just move to the PB 9.0 compiler for my software (I do have the PB 10 compiler too and am using it to develop an SLL version).

The point is, that the compiler has a long life span for SDK programmers and even if PowerBasic disappeared tommorrow, it would be easy to develop addons for the compiler using the compiler so third party developers could offer solutions for years.

Likely few compilers would have been well suited to building a language like ThinBasic as is PowerBasic. PB's unique string engine is one of its great strengths. Other so called Basic compilers (ie. freebasic, purebasic, etc.) don't use OLE strings for the string variables like PB does and PB has one of the richest string command sets of any programming language today.

Chris Boss
12-01-2013, 07:06
It should also be pointed out that open source is not the panacea many think it is. No two programmers are alike and it is not always easy for others to pick up the work of another to continue.

Using PowerBasic is no different than using an open source tool (which could have its developers just stop one day).

Also I am not always impressed with some independent programming languages which were created using a bunch of open software tools and libraries. There are some patchworked so called Basic compilers out there which are simply a bunch of open source libraries and utilities (ie. assemblers, linkers, etc.) from a number of different sources just "glued together" to produce a programming language. The downside to that is that they may not have any control over the open source tools they use to build their programming language. If there are bugs in the libraries or utilities for example, then those bugs get passed on to the programming language.

Now PowerBasic was built by one company and it is not a patchwork, but a powerful professional grade compiler.

Building ThinBasic using PowerBasic was actually a smart decision.

Michael Clease
12-01-2013, 12:54
"Glued together" is a term I would use to describe my experiences with Linux in it multi-flavours, some development tools requires 5 packages from various places on the net relying on some poor user to write a guide how to get the damn things to talk to the next link in the chain.

Chris am I correct to assume that your main job is as a programmer?

Even if microsoft went under tomorrow that wouldn't be the end of windows someone would buy the windows branch of the business and carry on, this makes good business sense it has a huge customer base already established.

Is Charles a PowerBasic user? I would be interested to see OxygenBasic rewritten in PB, I know this would remove cross platform but it would be interesting from a speed point of view.

Mike C.

Charles Pegge
12-01-2013, 14:42
Hi Mike,

I don't think there would be any speed advantage porting to PowerBasic. FreeBasic, at least in the primitive way I use it, is really very zippy. It compiles Oxygen (450k binary) in about 1.5 seconds. No time to put the kettle on.

I must say I find the Linux technical culture hard to penetrate. I am not sure outsiders are welcome but perhaps they feel the same way about MSWindows.

Charles

Chris Boss
12-01-2013, 16:30
Mike,

Yes, I am more than a hobby programmer.

I have been using PowerBasic for the last ten years and I am a third party developer of addons for PowerBasic. Most people on the PowerBasic forums likely recognize my name and that I am the developer of EZGUI Professional.

I am an SDK style programmer (meaning my software calls the Windows API directly rather than use the compilers GUI command set) so I have a good bit of experience with working with the WIN32 API's.

There is a good reason Eros uses PowerBasic in creating ThinBasic.

Scripting languages like ThinBasic are not easy to create, so that they have decent performance. Scripting languages always take a big hit when it comes to performance.

PowerBasic is unique compared to many compilers, especially open source ones, in that it uses the Windows OLE API's to handle variable length strings, where as C compilers (like GCC) or Basic compilers (like FreeBasic) don't use these API's, but instead fall back on types like asciiz or the like.

Bob Zale (who created PowerBasic) put a great deal of effort into the "small stuff" most take for granted, such as the string functions of the language. A compiler like freebasic may be fine in general and have decent performance, but it surely couldn't come close to the string command set of a language like PowerBasic.

When it comes to string manipulation and parsing, few languages can come close to what PowerBasic offers.

The other thing about PowerBasic is its reliability. IMO "solid as a rock". No compiler can be perfect, but I have grown to trust PowerBasic a great deal because of this reliability.

It is also the little things in a language which make a big difference to professional programmers. Bob Zale spent a lot of time "tweaking" the compiler in the little areas we often don't even think about. He also liked adding plenty of low level stuff to his compiler.

Lastly, which is also very important, many so called BASIC compilers "break" the traditional syntax of the Basic language. Not so with PowerBasic. Some of us BASIC programmer have been around since the DOS days (or earlier like myself) and we have been using Basic so long we get used to the original core syntax of the language from the QuickBasic days. Having a language sytnax which remains unchanged for decades (but with new features added of course) helps a programmer be more productive.

It is little things like:

A subroutine ends with:

END SUB

and for some strange reason, some of these indy compiler makers think that just the word END is enough.

Or in Basic, a subroutine does not return a value like a function does, but some indy Basic creators (maybe they use C too much) think that a subroutine should return a value.

Some indy developers will get rid of things they think are obsolete (but really are not and are a useful tool to a basic programmer) like GOTO and GOSUB.

I think Eros made a good decision in using PowerBasic to create ThinBasic. Likely ThinBasic is what it is because of PowerBasic.

zlatkoAB
12-01-2013, 17:48
First of all..Chriss ..thanks on great explanation.!I think to..that Eros made good choice when he use PowerBasic as development tool.Oxygen maybe is not as fast as Power Basic with strings but is like Charles said very quick and and good for me.''When it comes to string manipulation and parsing, few languages can come close to what PowerBasic offers."Chris do you can tell us which languages are this few...?

Chris Boss
12-01-2013, 22:03
John,

You speak with limited knowledge. You obviously were not privy to the inner workings of PowerBasic. Jose may have been a help, like many who have beta tested PB, but I really doubt Bob could not have created PB without Joses help.

The big difference in the PowerBasic compiler compared to others is that it was written in assembler. Most compilers are written using a high level language like C or C++. To create a compiler using pure assembler is not an easy task by any means and only an expert (like Bob) could have done it.

You give too little credit to Bob Zale and too much to others.

One of the reasons PowerBasic took longer to be developed and to add features many requested is that aside from it being written in assembler, Bob also from my experience never implimented any technology unless he felt he understood it very well first. In essence, he wanted to do it right.

My impression of some of the indy compiler developers, is they use their customers as beta testers (not beta test first before releasing the product). Every few weeks a new update is released to fix a bug. Not so with Bob Zale. During beta testing he did his best to work out the bugs as best as possible and updates were only released in much longer intervals (more beta testing).

I would venture to say that unless you personally have written a compiler yourself (I mean to native code too) then one should not speak so strongly about what you do not know. It's been a long time since I wrote a compiler (for the Commodore 64) and even back then I used a high level language to create it (it did generate pure machine code and no assembler). Building a compiler for something like Windows is no easy task by any means.

I do not appreciate the bad talk some like to make about Bob Zale and his work. Bob was by no means perfect, but I have little doubt that he was one of the best assemblers around and his compiler showed it.

Bob was right about 64 bit compilers too. There is a big difference between 64 bit generated code and 32 bit and likely he knew the challenges faced in producing quality machine code. Knowing the kind of person Bob was, he would not create a "half baked" compiler just for the sake of getting a 64 bit compiler out the door. When he felt it was ready for prime time he would have wanted it to have the same quality as his 32 bit compiler.

Again, writing his compiler in pure assembler is what makes it so different and so powerful. At the same time, writing in assembler does not make the transition to 64 bit as easy.

Chris Boss
13-01-2013, 03:33
I have a number of some of the better books on COM and believe me when I say that COM is not easy to grasp. The basics of C pointer tables is not so difficult, but there are a number of aspects of COM which are very complex and not easily understood. Bob took his time with COM until he was confident he was doing it right.

Yes, Bob appreciated how others tackled COM, so would anyone who is interested in adding COM support to a compiler.

Charles is obviously a good programmer if he has written his compiler in pure assembler. Did he write the parser in assembler ? If so, that is commendable.

But PowerBasic has a long history behind it, with a very large and complex command set and I really doubt someone like Charles has implimented a compiler with all the features found in PowerBasic. That would be a daunting task for anyone.

John, you have a tendency to read negative views into simple things.

I should also point out that building a compiler that works and one which has a track record for reliability is a big difference. There are many PowerBasic users who write software which is mission critical, relying on the compiler to be "rock solid". While no software can be 100% bug free, PowerBasic has a good reputation for reliability.

Its kind of like a lot of the source code on the web (even the PB forums). It may work and may look good, but often errors creep in and the code is not as good as one may think. Even some of the better PowerBasic programmers (users) known for good code, at times write stuff which is not correct with serious errors (and I am sure Jose and others like him are not immune to this). One good example I found on the PB forums was the code for DIB's. A number of the examples, posted by experienced programmers, were treating the DIB handle as if it were a Global memory handle and using Global memory API's with it. This was absolutely wrong and they likely simply copied the error from C code posted on the internet from which they may have learned from (which I found also made this common error). I had to research it thoroughly ownly to find they were in error. Fortunately the code worked, because Windows tolerated the errors. But this is not always the case with many API's in Windows.

Bob Zale, as long as I have used PowerBasic, had always appeared to me to be a little slower in implimenting some things as many users would have liked. What I learned over time was that it more likely was that Bob was careful about implimenting anything he wasn't 100% sure he understood fully. Even if he had to make customers wait a bit for a feature, he would not impliment new features, IMO, until he was absolutely sure he could do it right.

Guess, what ?

I do the exact same thing. For one, I never impliment a new feature to my GUI engine until after I am fully convinced I fully understand it. Many of my customers would have liked some features much earlier than when I implimented them. But there is one thing my customers have confidence in and that is that I build "rock solid" tools. Reliability, to me, is far more important than having the latest features. For example I had one customer who had an app which was needed to be able run for weeks on end (his customers needed this). Small bugs, like resource leaks, may be tolerated for a short term, but if an app is required to run for days or even for weeks, then those small bugs can add up and bring Windows completely down (or at minimum the app). Some call this "sweating out the little things". That is what I do and I strongly believe that Bob Zale was similar (at least from my experience in using PB for a decade).

Even big companies like Microsoft, with all their resources, can't make a development system (aka. Visual Studio) which is so rock solid that it can be run for days on end with no mishaps. Visual Studio, from what I have read, is known to crash pretty often.

So don't get on a high horse and expect from the likes of Bob Zale and his PowerBasic company what even Microsoft can't do.

So if Eros chooses to use Powerbasic for building ThinBasic, then consider. The reliability of PowerBasic carries over into ThinBasic. ThinBasic benefits from this. And I am sure all you thinbasic users appreciate the high quality of ThinBasic, but just remember: ThinBasic was built using PowerBasic !

I have been very impressed with what Eros has done with ThinBasic and the BASIC programming world needs languages like ThinBasic. I also can appreciate how ThinBasic was built and how PowerBasic made it possible.

It is sad that Bob is now gone (and he will be missed). It is even worse that many like "vultures" are flying around waiting for Powerbasic (the company) to die. While it is difficult to tell how well PowerBasic will whether this storm, Bob did put into place plans for this scenario. If the quality of work he did in building his compiler is any gauge, I have to believe that he put as much thought into his plans for the company when we would be gone. We have to give them time so we can see how well those plans work and to give the people he left behind a chance to prove themselves.

The tech world did the same thing with Tim Cook of Apple. No one could fill Steve Jobs shoes they all said. Yes, Tim Cook is no Steve Jobs. But Tim Cook appears to be doing quite well and making choices of his own. Time will only tell. But if the big compaies like Apple face a similar problem when a company leader dies, then why would it be any different with a small company like PowerBasic ? Give it time. The people left behind now have to come out from Bob's shadow and that is a big challenge. Give them time.

As far as ThinBasic goes, it would be a big mistake to jump ship so quickly because of this. Thinbasic, IMO, is one of the best hobby Basics around and is gaining in popularity. Not because Eros is quick to jump ship at the slightest bad weather, but because he obviously is sticking with what he knows works (and that is use Powerbasic to build thinbasic).

Let Eros make the decision and trust he will do what is best for ThinBasic.

Chris Boss
13-01-2013, 05:24
One of the most extensive lists on the web of all the Basic compilers/languages there are:

http://basic.mindteq.com/index.php?i=full

Powerbasic gets 4 1/2 stars !

ThinBasic gets 4 stars !

FreeBasic gets 4 stars !

DarkBasic gets 4 stars !

Oxygen Basic gets 3 1/2 stars !

QB 64 gets 3 1/2 stars !

RealBasic gets 3 1/2 stars

and oh, by the way ...

ScriptBasic gets 2 1/2 stars !

Not a glowing recommedation.

The above web site has been around for a very long time and has been one of the best resources I can find for lists of all the Basic programming languages made in recent years.

From this list, which would we want ThinBasic to be created with ?

Interestingly, ThinBasic gets 4 stars, an excellent rating. And guess what ? It was created using Powerbasic.

When you click on "Editor rating" for sorting, PowerBasic is in the top 5 and all the top five get 4 1/2 stars. ThinBasic is in the top 15.

When you click on "User rating" for sorting, PowerBasic is in he top 4. Thinbasic gets top billing as #1 by user ratings.

The user ratings is based not just on the number of stars, but I believe also on the number of users who rated it.

The editor ratings are more accurate though, since they put a lot of thought into the rating.

I have to admit, the ratings on that web site actually say a lot about ThinBasic. Good job Eros ! Excellent ratings.

Petr Schreiber
13-01-2013, 11:45
Hi Chris,

I share lot of points of your view. One thing I would disagree is the note regarding:

"Visual Studio, from what I have read, is known to crash pretty often."

I cannot confirm this - VS(2005/2008/2010/2012) did not crashed for me even once - and I use it on daily basis for professional work. As I do with ThinBASIC.

As with ratings (stars or points or ...) - I never look at them as objective markers of quality, for me it is feedback of similarly thinking people who are happy from tool resonating with their way of work exists and it is nice motivating kick forward for me to continuine the developement. I am sure there are people for which any randomly picked language is the holy grail, and at the same time other people for which it is completely unusable.

There is no point pushing for/against tool in infinite loop, I also do not force my colleagues at work to use ThinBASIC. And they never force me to use their tools - they don't keep me telling every day how C is cool and how I should use it. When we need help, we ask for it and friend helps.
I think we are not in situation of hitting the wall with PowerBASIC - it does what it declares, that is why it was picked, and it does it well.

For photography, I use discontinued Nikon D80. According to Johns logic I should have immediately bought another camera when the product was discontinued (5 years ago). This would be a dream behavior from tradesman perspective, but that is not how I think - camera works great and it will for years. Like my HP-42s calculator, manufactured in 1988. Well built tool is well built tool. A potential disaster for tradesman, a pure hapiness for the user.


Petr

Charles Pegge
13-01-2013, 16:23
Thinking several years ahead, there are some significant challenges to computing as we know it today : one is the possible displacement of x86 based technology with ARM-based technology, with GPUs taking on parallel tasks. This will unfortunately marginalise any program that relies on Asm86 coding, (not to mention platform-specific API stuff.)

With this in mind I have substantially reduced the assembly code used in the Oxygen compiler in favour of basic source code, wherever this can be done without compromising efficiency significantly.

The only practical way to program tablets, at present is via C or Java/Java byte code or LLVM (or .net even), so Basic and indeed other language compilers need to emit these languages rather than low-level code to gain any footfall onto the platforms that support these new devices.

To survive in the long term, I think PowerBasic needs to step in this direction.

Charles

Chris Boss
13-01-2013, 22:49
The x86 world is not going anywhere anytime soon.

ARM is over rated as if it will somehow replace x86 CPU's

The advantage of ARM has been its system on a chip (SOC) design with the benefits of taking up less space and signficantly better battery life.
Intel though is not standing still and each new generation of their SOC's (aka. Atom) are getting better and better and soon they will remove many of the advantages ARM has over them.

Actually it is ARM which could have problems in the long run. In the Windows 8 world, some manufacturers are even holding back on WinRT designs with a wait and see attitude. 2013 will be a big year for Intel and many new designs are coming.

One of the biggest problems with software design on most platforms, IMO, is the obession with object oriented programming. I am not a fan of OOP for a number of reasons and on most development platforms the overuse of OOP has caused programming languages to lose some of the performance benefits of better hardware, IMO.

Also good old Basic has many advantages over many so called modern languages, like C#, Java, etc.

Bob Zale often used the term "natural" when refering to Basic. I agree. Basic is a more natural language (easier to read, easier to code). One of the problems with building software which is reliable is code readability. The more terse a language is the more difficult it is to debug it. OOP adds levels of complexity which makes debugging more of a challenge.

Many developers are "forward looking", while failing to appreciate the lessons of the past. Consider back in the old days with the Commodore 64. Some amazing programmers were able to take that lowly computer (can you say 64 KB ram) and to turn it into a Mac like computer using low level well written code (remember Geos). Geos demonstrated what could be done with minimal hardware.

Today many programmers wouldn't even consider working on a PC with less than 4 or 8 hig memory.

For years, while most programmers were developing on Windows XP (and then Vista), I was still developing on a Windows 95 PC with less than a 500 mhz CPU (started with a 233 mhz and then later switched to a 500 mhz). With only 128 meg ram I had plenty of computing power.

Take a development tool like Visual Studio and it takes 2 gig or more just to install the thing. What were they thinking ?

Bob Zale had a motto of "smaller, faster" and he stood by that. It shows in the PowerBasic compiler.

While I like the variety of tools that exist for Basic programmers, it does bother me to see so much negative talk about PowerBasic and Bob Zale.

Some of us depend upon our programming tools for professional work. We don't have the option to play around with every open source, freeware compiler that comes along. Our work depends upon our tools.

I build tools for programmers, not end users. They depend upon what I create for their professional work. I depend upon Powerbasic to build my stuff.

I don't know how many Basic languages I have downloaded and tried. I have purchased a number of Basic languages over the years. In the DOS days it was QBasic, then QuickBasic, then PDS 7.1. In the Windows 16 bit years, I purchase CA Realizer, GFA Basic, Visual Basic 1. 0 and 2.0. In the WIN32 days I purchased Visual Basic 5.0 Pro and then PowerBasic. In recent years I have downloaded a number of shareware or freeware Basics (purchased IBasic pro, downloaded Emergence Basic, DarkBasic, PureBasic, FreeBasic). I was offered a free upgrade from VB 5 to RealBasic so got a free copy from them. I have downloaded NSBasic, TrueBasic and more.

None of them have given me what PowerBasic has.

The cross platform basics are the worse, because they often use open source GUI engines and things don't work the same in Windows as say on Linux or the Mac. You lose with crossplatform because you have to make too many compromises. Scripting languages are great for hobby programmers, but for those who need to write real native apps for Windows nothing beats a native compiler.

Some simply want to write games, so they likely opt for a Basic which is geared towards DirectX fullscreen for games. But try to build a normal app with such a compiler and you quickly find they are very limited to games only.


The needs of a professional programmer vary greatly from those of a hobby programmer. I have been writing software that ends up be used by businesses for almost 20 years now. My expectations of a programming language will be different from many who use many of the open source Basic languages available today.

The discussion of this thread revolved around the future of ThinBasic and its development. My point is that Eros made a wise decision on using PowerBasic to build ThinBasic. Do not think that by switching to some open source compiler, that ThinBasic will somehow become better. You definitely aren't going to build a scripting language (like ThinBasic) by using another scripting language. ThinBasics own performance is dependent upon it being built using the right native code compiler. Performance for a scripting language is directly proportional to the language used to create it.

ErosOlmi
14-01-2013, 00:11
ThinBasics own performance is dependent upon it being built using the right native code compiler. Performance for a scripting language is directly proportional to the language used to create it.


Plus some personal and unique techniques I've developed for creating a continuous parsing language :D

Believe me: even with a great compiler you can create very bad code ;)

Petr Schreiber
14-01-2013, 00:48
Basic is a more natural language (easier to read, easier to code). One of the problems with building software which is reliable is code readability.

Yes, that is why I like using BASIC. On the other side, OOP can add to code readability too. Please have a look at these two examples:



car = Model_Load("C:\carModel.mdl")
Model_Scale(myModel, 2)
Model_Push(myModel, 1, 1, 1)
Model_TurnY(myModel, 90)


and this:


car = new Model("C:\carModel.mdl")
car.Scale = 2
car.Push(1, 1, 1)
car.AngleY += 90


Which one is more elegant, more readable when you look at it?

The compound object reference can be used to cast operations on object in the natural order of things instead of procedural bracket nesting (getting dangerously LISPish) or writing one command per line of code.

OOP is not the solution in all the cases, of course, but it would not be wise to just rule it out. I did this mistake for many years, and now I see I just missed the point.

Direct3D is OOP (COM), OpenGL is procedural. Difference in performance - basically none.

Even Bob added OOP to his compiler, and especially with PB10 it is both fast and space efficient (removing unreferenced methods/props). I remember having loooong talks with Kent regarding OOP. I will quote him here:


Look at the benefits you get when you are able to use arrays instead of making a variable for each item one by one.
Then look at user defined types, how much that helps. And then to be able to use udt in an array. All add tremendously to what can be done in an elegant way.
Then comes classes, it is the next step up in elegance.

I agree with it 100% now.


Petr

Petr Schreiber
14-01-2013, 00:50
Plus some personal and unique techniques I've developed for creating a continuous parsing language :D

Believe me: even with a great compiler you can create very bad code ;)

True :D I remember my scripting engine I developed for my 3D editor before I discovered ThinBASIC...


Petr

P.S. Charles -> GPUs and parallel computations -> yes, yes, yes. I completely stopped doing image processing on CPU last year.

Charles Pegge
14-01-2013, 02:21
I hope you are right Chris about the continued evolution of the x86 into a less power-hungry device. However we are seeing a great diversification of new devices in the market, and the challenge is to be able to deploy Basic applications across the range, and the compiler must be able to connect with whatever interfaces are provided, including facilities for parallel processing.

OOP is nothing more than high-performance database. It deals with multiple items very efficiently, in neat bundles. And only one extra parameter per procedure call is required. Perhaps the safest way to avoid convoluted OOP design horrors is to start off a project with a straight procedural design, then bunch things together into objects when it becomes obvious they belong together.

Chris Boss
14-01-2013, 19:51
Charles,

I downloaded Oxygen and it looks pretty impressive.

Is it capable of 64 bit compiling ?

I would be interested to see if I could build a Metro app with it for Windows 8. There are many WIN32 API's not available with Metro apps so I need a compiler which can create an EXE with minimal API's calls to the WIN32's.

Chris Boss
14-01-2013, 21:44
The link is not dead. Just look carefully at it, it is a typo. The period is a comma, so the link is inaccurate.

If you read my posts above I am not afraid to look at other Basics. I have checked out more Basics than most people.

The problem though is the many of such basics diverge too much so they are not always practical for me to use.

For example, while I am impressed with Oxygen basic at first glance (and will try to work with it), the first thing I notices was a common problem of not using standard Basic syntax.

For example rather than:

SELECT CASE

Oxygen uses:

SELECT

Now this may seem a small thing, but I gauge a Basic language syntax (at least the core language) based on how well it compares to Quick Basic syntax, at least for the core language contructs (FOR NEXT, SUB, IF THEN, GOTO, DO LOOP, etc.). While I can live with a slightly different syntax for less uses commands, I can not tolerate (for commercial work) deviation from long time core Basic command syntax.

My impression of many indy Basics is that the language syntax is often tainted by the developers primary development language. For example some developers use C (or C++) to create their compilers and the language syntax often reflects this. For a Basic programming language, the developer must forget how other languages do things and try to better follow what long time Basic programmers are used to.

Some such languages for example may not support data type identifiers ($,%,#) which is not acceptable. Others may not support important string functions found in Basic.

Oxygen Basic looks like it has potential, but it surely is no where near as capable as PowerBasic is. Oxygen also appears to be concentrating on lower level stuff (which is good when you first start a language), but more complex higher level commands such as powerbasic has are vital too.

I think Eros did a good thing when emulates PowerBasic syntax in ThinBasic. This may be one of the reasons it has done better than many other freeware Basics and it is gaining a good deal of support.

One of the biggest mistakes indy Basic creators do is say to themselves "I want to make a better basic" so from the start they deviate from norms of the language, thinking they are doing a good thing. Actually Basic is best when it follows the long history of Basic and the core syntax dating even back to the DOS days. I like to use QuickBasic as the standard. True not ever aspect must be followed, but key things like the core command set, etc. need to be the same, particularly the logic commands (IE THEN, FOR NEXT) , basic data types (a LONG is 32 bit), etc. need to be the same. Some of the lesser used commands I can live with a slightly different syntax , but not the logic flow commands.

Programmers like myself have an advantage because of being long time Basic programmers. I have using some form of Basic since 1975. This provides some experience in what works well in Basic and what does not. Long gone are the days of variables only having one character, using Gosub because no subroutine support was available. Having seen Basic mature over decades allows one to see what works in the language and what doesn't.

PowerBasic is one of the few Basics I have found which has done an excellent job of combining the new with the old (core language) to get the best mix. Add to that is compiles lightning fast and produces reliable executables which are small and fast and you have a great combination.

I don't see myself switching to Oxygen over Powerbasic, so don't get that idea. But if I can find a use for Oxygen I won't ignore it.

Charles Pegge
14-01-2013, 21:45
Yes Chris, Oxygen can produce 64 bit exes and dlls. I do not have windows 8, but I can help you with the headers. (handles and pointers must be converted to 64 bit). Oxygen can read thinBasic and PowerBasic style headers, except for the recent COM constructs. It can also read C headers with minimal cleanup.

Charles

ErosOlmi
14-01-2013, 21:54
Because this thread seems going into an interesting direction not really related to thinBasic direction ...
why do not open new thread?

Consider also that Charles has a dedicated forum here at http://www.thinbasic.com/community/forumdisplay.php?335-O2-JIT-Compiler-Assembler-Oxygen-project

Charles Pegge
14-01-2013, 22:24
Yes. Sorry Eros. Back to topic. We must be patient and see which direction Powerbasic takes over the next year or so. There is a huge investment of code out there, especially among professional PB users, and I am sure that if there is the collective will to continue with this particular implementation of Basic, it will not be necessary to abandon ship.

Chris Boss
14-01-2013, 22:39
Now just one other comment about compilers.

It is so easy to jump ship and switch to a different compiler, but one critical point for professional developers myself is reliability.

Hobby programmers may not appreciate this, because they aren't writing apps which could be used commercially, possibly by hundreds if not thousands of users. But professional programmers take this very seriously.

Consider for a moment, the work I do. I wrote tools for programmers and even if I only had a few hundred users, consider that each user is also a programmer writing apps which will be used possibly by many hundreds or even thousands of users. The total number of end users effected by the software I write can be significant.

Reliability is one of the topmost criteria I have for any programming language I use.

Now if a hobby programming language gets a number of users, likely the end users are not depending upon the language to be able to handle "mission critical" stuff. If there are a few bugs, they just work around it somehow.

Now a professional language is different.

Look at PowerBasic. The programmers using PowerBasic (which could be tens of thousands) are often using it in commercial settings. Some of PowerBasic's customers are even government agencies. Big corporations are using it. Some companies write device drivers using PowerBasic. Now PowerBasic users (the programmers) are a good size group, but consider how huge the "end users" are of apps (or DLLs) created using PowerBasic. That could number in the many millions and many of those end users are using the app in a mission critical application.

This means the compiler is being field tested by millions. Serious bugs in the compiler are more likely to come to the surface.

Not so with hobby languages. They may be great for small apps for personal use or even making an inhouse app for a business, but for building mission critical apps which could be used by thousands and even millions is another story.

While the language ThinBasic is developed in, may not be critical, the idea of suggesting to professional programmers like myself to switch to some recent open source compiler from a professional language like PowerBasic is obsurd.

ThinBasic users should appreciate the development language Eros is using to create your favorite hobby language, ThinBasic. He is using a tool which is being used by major corporations all over the world.

This should give you even more confidence in ThinBasic.

The direction of ThinBasic right now is very good, IMO. Rather than suggest a different development system, I think it would be more productive to suggest more features.

zlatkoAB
15-01-2013, 01:53
Chris...Some your points looks to narcisoid.I cannot agree with you that is good that thinBasic syntax is so close to PB,why...?????And by the way oxygen have liberal syntax which is thing I like .select case work in o2 to......but i don't care to much about all this things...bye

Petr Schreiber
15-01-2013, 10:00
What gives me confidence in ThinBASIC is the way Eros works and what kind of (kind :)) person he is, not the language used to develop it.

Language itself can deliver some raw speed, the rest (90%) is on the human. I think that is the important fact actually making TB what it is, and that is the reason why I am not afraid to use it for professional work even if there is no big company behind it.

Regaring future, I would like to see more exploration on the OOP field, which already started with module based OOP.

I would also like to help with (optional) targetting of data paralelism on CPU and GPU from ThinBASIC, in form of native commands. Not a small challenge, I know :).


Petr

Chris Boss
15-01-2013, 18:09
The point is that a good programmer will use the best tool for the job.

Eros is obviously a talented programmer.

What concerned me was suggestions he drop PowerBasic for some other (likely no so good) language, when the language he chose to use he did so for a reason.

If Eros is most proficient with PowerBasic and if he gets the job done best with it, why would anyone suggest otherwise.

The language one uses does matter, because a programmers skills may best come to the fore with a language he grasps best and which provides the tools he requires.

Also it is my experience that programming languages are not all equal when it comes to reliability. The compiler one uses does matter in the long run.

Petr Schreiber
15-01-2013, 22:11
Hi John,

I am not sure what do you mean by masking, did you read PowerBASIC Gazette #115?


Petr