KBasic: A VB-Like Rad/IDE For KDE

KBasic is a programming language which brings a complete BASIC to KDE. It will include a great IDE with a form designer and a complete binding to KDE like controls (CommandButton, TextBox, ComboBox, Image, Html) and the other KDE features. Read on for more.

Now the first steps are the development of the form designer and the designing of the KBasic language (EBNF-Grammar, Lexical Scanner, Grammar Parser, BASIC-Functions and Interpreter). In later future it will also support SQL database access via a KSql-Plugin. The big aim is to have a free and good programming tool.

The KBasic language is a pretentious project, so we will need a long time to make it complete. We think in the summer of 2001 the first end user version will be released.

The KBasic website is at http://kbasic.de/. Any help is very welcome.

The KBasic Team

Dot Categories: 

Comments

by anonymous (not verified)

I heard that GNOME has or is working on a VB implementation for xls/doc compatibility. Can you use any of that work?

by Haakon Nilsen (not verified)

Seems like you've used many German words for identifiers etc. in the kbasic code. Is this really necessary?

Other than that, I'm taking my first compiler course and kbasic is very interesting as it's always nice to see something in "real life". Good going! :)

by anonymous (not verified)

I was curious so I downloaded the source. I couldn't find one German word in it.

by Haakon Nilsen (not verified)

Look closer, in the parser code (bnf.cpp). Some comments and some method names are in German ("TokensatzAktuell", "GrammatiksatzAktuell"...). Anyway it's not really a problem since it really doesn't occur often (and I speak some German anyway ;), so it's really nit-picking. Guess I over-reacted :)

by Xtian (not verified)

Wait... uh... oh, I see. I must have been asleep the day God announced that everything to do with KDE or any programming in all the world shall be done in English.

How arrogant.

Americans need to learn how deal with the concept that they aren't the center of universe.

by Jack Crack (not verified)

I agree every programing lanuage and tool should be done in different languages. That way I will be 10x more productive since I am an expert in every language in the world. My point is that things need to be standardized. I don't care if it is English or Swahili.

by Haakon Nilsen (not verified)

I agree that Americans are not center of the universe. In fact, I'm Norwegian. That doesn't mean I write my open source code in Norwegian. Doing that would make it harder for non-Norwegians to get into the code. And when they decide to add some code using words in their own language, that would further the confusion... So we obviously need to agree on one language. We could pick a truly international language like Esperanto, but unfortunately I don't speak Esperanto. If you'd like, you can go with British English, since the Brits don't believe they're center of the universe (guess the fall of their Empire taught them a thing or two (sorry, I couldn't resist ;)).

However, this is completely off-topic :)

by Nick Ives (not verified)

Yea, lots of things like that are based on british rather than american. Well, we got the meridian for time at least, so were the centre of time on this planet =).

Even though our empire collapsed, we still know were the centre of everything, just us english tend to be very modest about it ;).

by Daedalous (not verified)

Americans did not decide our language was to be the defacto standard for software. Saying so only shows a persons' smallminded animosity. The reason so much software is in English (Note English NOT American!) is because such a large portion of the Computer Using world speaks english! The U.S., Canada, The U.K. and Australia. Supply and demand Pal, If China has 50% of its populace online, we'd all be speaking Chinese!

by Anonymous (not verified)

The Gnome team is working on Gnome Basic.
Wouldn't it be better to work together with them instead of reinventing the wheel?

by ac (not verified)

i'd like to see kde co-operate and work /with/ gnome instead of poking fun at them for a change. if not on the language, at least with the api that the language uses to interface into things.

by Heiko Stoermer (not verified)

I do not see any needs for another IDE for KDE.
Why won't you guys cooperate with the KDevelop Team and incorporate a good GUI Designer and KBasic language output for that thing? (you can still "invent" your KBasic language then)
So much work is being done over and over and over again, but not many things reach high release numbers on Linux, especially user applications.Please put your energy in KDevelop, don't reinvent the wheel.

Well, I suspect that they will use a lot of Kdevelop's code. Then again, Kdevelop2 is nowhere near finished yet, so they might have to really mess about with the code in order to get it to work properly.

by Carlos Miguel (not verified)

I totally agree about reusing KDevelop or KStudio,
I also think QtDesigner should be used as the common GUI Designer, so that it's XML output could be translated to any language implementation...or better: why don't use an approach similar to Glade, so GUI definition could be loaded at run-time and modified without recompiling.

by anonymous (not verified)

I'd love to see this. Visual Basic 5 is the only thing I miss from Windows.

by anon (not verified)

VB/VBScript etc is the thing i hate MOST about windows ;)

by anonymous (not verified)

Yes indeed. Urgh.

by Guyren G Howe (not verified)

They could do worse than pick up the better features of REALbasic. Its optional event-based class inheritance model is *inspired*.

A better VB than VB. Hmmm.

by Joeri Sebrechts (not verified)

This is going to sound like a troll, but it isn't meant as one. It's just my humble opinion. And this is a opinion forum after all.
I think KBasic and GNOME Basic are very bad ideas. Mostly because the worst programming memories I have are tied to Visual Basic, after which these will no doubt be modeled.
At first I was shocked someone would actually want to write this, but after viewing the member list I understood. Not a single member of this project has experience with Delphi. If they did, they'd be writing KDelphi.
I know it sounds like favoritism. But my eyes really opened when I switched from Basic to Delphi. Before the switch, I thought Basic was cool, and nice to program in. After switching I couldn't understand how I stuck with the horrid thing so long. When compared to the inctricate complexity of C++ (especially Visual C++) Visual Basic might look like a good idea, but ...
My problem is not with them writing it, however. It's a free world (mostly). My problem is that this is obviously targeted at existing Visual Basic programmers. And most of those programmers also use VBA for every MS app out there, so they will be demanding Visual Basic integration with applications (like GNOME Basic is doing right now).
The last thing I'd want to see happen is that I'd have to resort to Basic (*spit* *gag*) to program macro's in linux office apps. And it seems to go that way more and more. It's not because MS marketing chose to use Basic as a back-end that we do too, and I hope we don't.
I know it all seems distant future, and alarmist ramblings, but I do believe the odds are in favour of Visual Basic infiltrating the linux office environment. You can't teach an old dog new tricks, and there are a lot of old Windows dogs looking at linux, especially with the Windows gui-clone KDE (no offense meant here, people's preferences differ). And as we all know, majority wins, even if it doesn't know what it's talking about (eg presidential elections).

by StrawberryFrog (not verified)

> If they did, they'd be writing KDelphi.

There are 2 flavours of this already in the works: Kylix (will be shipping this year from Borland) and FreePascal, a GPL'd clone that works as a command line compiler, IDE coming later.

I could not agree more with Joeri Sebrechts. VB is *not* something to be emulated. IMHO it's not something to be touched with a bargepole. Please someone tell me that this is not meant as as a VB-wannabee. Who needs that?

Yes, I am a Delphi advocate. I tell everyone how good it is. I am a Delphi advocate *because* it rocks, not vice versa.

by barnaclebarnes (not verified)

Writing a VBA clone for Linux *is* a good idea. You can then leverage the thousands of developers who already know VB/VBA to write corporate productivity apps. VBA is all about speed of development and a short learning curve, even a crap programmer like me can knock up an app in an afternoon to solve some basic business problem and save $$$ over doing it manually.

by Stephen Samuel (not verified)

You can use a VB clone for the old bait&switch. Lure them over to the Linux side with the knowledge that they don't have to forget their VB training, then show them a REAL language.

(I'm presuming, here, that the various office replacements will give users a choice of plugin language to use).

by Kyle Dansie (not verified)

I would have to agree with Joeri Sebrechts on this one. VB is a piece of crap, why would anyone want such a thing on Linux.

KDelphi, now that would be interesting. Borland has already started to do a comercial version, but yes a free one would be better yet.

What about http://www.freepascal.org/
Could this be used as a starting point for a KDelphi?

Later,
KJD

by Dougster (not verified)

Actually, though I'm a longtime linux pro and advocate, I have recently been using VBA and Access to make some pretty nifty software for work. When it gets to the abstraction level such as VBA, all of the languages tend to blur into an OO mishmash.

Having said that, I think that Python should be the defacto scripting language for linux office apps. As far as interpreted languages go, it is pretty hard to beat Python. Imagine the fantastic things you could do with a python module and a database... easy to use Tk for quick dialog boxes and such, really easy dynamic arrays, hashes, fast polymorphic variables, good file I/O capability, advanced math modules, all the rich library modules which are just part of the regular Python distribution.

The office app would have to provide its own Tk-like functions to its modules. In any case I think some type of programmability is a good thing for the gnome applications. It is a useful addition to the software and really enhances its usability. Just look at what it did for Emacs :-)

Why reinvent the wheel and put corners on it just because Microsoft does? If the idea is to attract Microsoft programmers, why not do a translator, along the lines of the excellent ASP2PHP, and choose a semi-decent language as the base language instead. BTW, I will personally thump anyone who takes that literally and makes PHP the default language for KDE. Stretching BASIC into object-land and RAD is a bad idea. Leave it where it belongs: on TRS-80s and Ohio SuperBoards.

Does anyone remember those huge American cars (``Yank tanks,'' we call them in Oz) with ginormous fins spreading out from their rear ends? I recall a MAD Magazine cartoon of one driving along a street knifing pieces out of the scenery with the fin tips. That bizarre trend started because a single small car sported vertical fins for stability at speed. The car started out popular, so other designers copied the look to try elbowing into that market. Naurally, the horizontal fins they added are unstable at speed!

We're doing that again here. Pull out! Pull out! We're gonna hit...

by Dimi Shahbaz (not verified)

I could not agree more. I think the focus should be on what would be most beneficial for KDE and not necessarily dupe MS, or try to get MS developers. There is already visual python
http://www.thekompany.com/projects/vp/ that looks very promising. Why not focus on that instead of fragmenting shit?

by Timbo (not verified)

Well, like many others, BASIC was the first programming language I learned. It sucked 20 years ago, and VB sucks no less today. There exists a fairly complete and mature set of Python bindings for Qt/KDE (www.thekompany.com/projects/pykde/). Perhaps the effort would be better spent developing a nice IDE for PyKDE?

by Chris (not verified)

If you like Python, you may want to use the
PyKDE IDE "Vipyl". Look at http://vipyl.sourceforge.net !

by Blackjax (not verified)

I am reading down the list of comments here and noticing that there are very few which express the view that the project as it stands now is a good idea. Given the fact that you are making something you hope the developer community will adopt, wouldn't it make sense to ask them what they really want, then define the approach which will be taken? I've seen suggestions here to use: Java, Delphi, Python, and a plea to coordinate with the Gnome people. Perhaps you should consider a poll of your development community to find out if how they would like to see you approach this.

Those most vocal are responding.
I like the idea, I like BASIC, VB isn't as nice, C sucks, pascal is good.
The developers want this to go through because they probably want to use it.
That seems like a pretty good and standard reason to me.

Fran
:):):)

by Mongolo (not verified)

You know, I see a lot of arrogant replies to this thread as to why there shouldn't be a BASIC for KDE. You're sounding a lot like the Microsoft guys who don't think there should be a Linux, or the Sun guys who don't think there should be a Linux.

What you're talking about is another programming language CHOICE for Linux, that is a GOOD THING, not a bad thing.

S=op what it's BASIC? There are millions of Visual Basic developers out there in corporate jobs using it who would love to target Linux, but can't, because Linux development can only be done by the "in" crowd, e.g. C/C++ developers.

C/C++/Java developers my laugh at Visual Basic, that's OK, but VB isn't a slouch, either. Put me up against a C/C++/Java developer to write an OOish order entry app, and I bet I get get mine finished before yours even compiles. Some people like to get the job done using a tool their comfortable with.

If we can create a KBASIC that is easy to use, with constructs and keywords that don't leave people out of the Linux loop.

Mongolo
C++/Java/Visual Basic developer.

by Trevor (not verified)

Have you ever seen/tried Delphi?
If you can't do anything in Delphi that you can in VB in the same time or less, I'd be surprised.

Delphi has all the power of C/C++ and almost all the simplicity of BASIC, with more read-ability than either.

You really should try it out, and as Borland/Inprise happens to have a 60 day free trial available for download, it's fairly easy to start out with =)

by Tsujigiri (not verified)

Have you ever seen/tried Delphi?

Also Borland is getting closer to finishing Kylix, their Delphi/C++ builder on Linux project, so that anything written with (is it the CLX cross platform class set) will simply recompile in both windows AND linux with little to no modification.

Snazzy!

by Still do not li... (not verified)

Well, there are still people who prefer Visual Basic-like language to Delphi. I have done some bigger projects in Delphi and written some littler programs in Kylix and of course there numerous things that are better in Delphi and Kylix than in VB, but I do not believe that it is not possible to give to BASIC the power of Delphi and also maintain (partial?) compatibility with Visual Basic. I personally would like something Visual Basic .NET-like more than Delphi. And it seems to be simpler to learn BASIC than Pascal (I do not realize, why and maybe this is only my experience with people) and for me the modern BASIC looks better than Pascal. For GUI programming and for plugins BASIC would be my true preference (even if I like old-style text-mode applications and use to write these in C/C++).

by Leon Brooks (not verified)

Go for the RAD/IDE parts, burn the VB. That's what Boa Constructor is. John Sowa's post below pretty much sums VB itself up as it is, but why not translate?

ASP2PHP already has a top-notch VB parser in it, and I'm sure that making it spit out a Python subset or whatever would be a heck of a lot easier than coping with VB's deficiencies for the rest of our collective lives!

by John Sowa (not verified)

The Microsoft developers themselves admit that VB is a total disaster: it was never designed, and it evolved with unplanned patches installed by programmers who didn't coordinate their work with COM or with other modules that use VB as a scripting language.

VB and VBA run many billions of dollars worth of application code, and it is the single biggest reason for the almost universal use of M$ Office.

The only way that any office suite will be able to compete with M$ office is to run current VBA scripts without any change.

by Steve Wilson (not verified)

And also be subject to the viruses that spread via this scripting language! That is my ONLY real concern for things. Whatever anyone does - don't make things like mail clients that use VBS...PLEASE!!!

by Justin Buist (not verified)

It's not having VB scripting that allows end uses to easily run malicous code -- it's because the file extensions are associated to the interpreter engine by default. Users could just as easily click on an .exe file and run it.

VBS viruses are not spread due to any fault in software (well, that's arguable)... it's sheer human stupidity that causes it.

VBS viruses are not spread due to any fault in software (well, that's arguable)...

It certainly is! VB is conceptually descended from a whole line of BASICs without terms like ``multi-user'' or ``network'' or even ``resources'' in their concept spaces. The fact that some of these have been (kind of) crudely bolted on afterwards is no help to the gestalt of the language. When you program in VBS land, you are programming with a hyper-extended version of dear old single-user, network-free MBASIC. Dear as in expensive, which is how it often ends up.

As networking and timesharing have been strapped on to Windows 9[58] (and age has seriously compromised the plastic cable-ties they used), so it can be strapped on to VB - but unlike (respectively) Unix or Python, it can never approach the clean, strong elegance of being born networking and timesharing. It will always be ``nuevo riche'' and illegitimate.

Trust me, we do not want to adopt this!

by george rogers (not verified)

perl too

by Leon Brooks (not verified)

VB and VBA run many billions of dollars worth of application code, and it is the single biggest reason for the almost universal use of M$ Office. The only way that any office suite will be able to compete with M$ office is to run current VBA scripts without any change.

How gloomy. And doesn't that sound like CoBOL used to, once upon a time? I reckon a son of ASP2PHP would be a much better idea. It would cope with a great many existing projects (it does very well with VBS-based .ASP pages) and also break us loose from the millstone which is Visual BASIC.

It comes down to this: dumb people. They are everywhere. But the last place you want them is in an IS/IT department. Yet, languages like COBOL and VB allow dumb people to get jobs in this very department. I guess the only thing sadder is a company of dumb people making a crappy product in COBOL/VB that a dumber group of dumb people needs to support (and obviously can't because the code is dumb).

If you want to stop wasting money (on smart people like me that charge outrageous rates for fixing dumb code), please keep dumb people and dumb technologies out of your department.

by george rogers (not verified)

1! it teaches you bad habits;
2! its a pached up basic witch is a dumb languige;
3! no lexicle closhures, no regexs, and worst of all propriatary;
4! perl has all theas fetures free and the languige is not for retards

by unknown (not verified)

Ppls ppls just because VB can't do powerful stuffs does not mean it sucks... I love VB and it makes me so sad when ppls curse at it... i can make pretty decent programs out of VB... i made a lot of programs for my school and i make happy birth day cards to my good friends with VB... As programers we should know how to live with other programs around us ^^ so yea my point is lets not curse at VB... thank you so much wish you all luck on your programings!

by Mr. Underhill (not verified)

We all know that this programming language sucks but when it's what the crappy schools and teachers hand to you you can't do much but cower and learn how to use it and then make sure you don't do all the stupid crap that the obvious idiots are doing.

Also this language can be as fun or as strong as any other and it does a lot more than what those earlier naysayers were saying in the beginning. This laguage has become very powerful and it does way more than you naysayers give it credit for...

Also if your stoopid enough to deal with a Microsoft product then you have to put up with it and take your lumps or better yet go learn another 'BETTER' language if you can even find one...

I've been using it for longer than this particular thread has been around and what they say at the beginning of the thread is/was true at the time but we have adapted so things are much better now. So, if your gonna say no to learning VB just because of the first few naysayers well that is your loss and that just too bad for YOU....

nuff said...

by Martijn Klingens (not verified)

Personally, I'd rather not see a VB implementation for Linux. I love Delphi, C++ and PHP a lot, and although I do not know much about Java and Python, I think these two are great languages as well. VB (or Basic in general) is not a good language in my opinion.

However, that doesn't mean there shouldn't be a VB version for Linux. It's said before: CHOICE is the keyword here and for the majority of Windows people VB is the only language they know about. Just offer them a language they know, as it DOES do the job for many simple apps.

It's just Basic's tendency to promote 'quick and dirty' work that makes many experienced programmers hate the Basic language AND that makes inexperienced programmers LOVE the language.

There are just a few notes I want to add here:

1) NEVER use a single language as the only scripting language in other apps. There should be a KPart like interface to plugin litterally any programming language into e.g. KOffice. That would be a feature that would bring KOffice way beyong MS best selling product

2) PLEASE share as much code as possible with the Gnome Basic and the KDevelop guys. Reinventing code is nice if the old code is fundamentally wrong, but it also uses lots of resources that could otherwise be used much more efficiently.

3) Continue the work for all Basic people out there (but do not expect ME to use it on a regular basis)

by Concatenatus (not verified)

Get off it you sanctimonious naysayers. Believe it or not, there are some of us out here who have the capacity to create useful (even inspired) code who don't have the time to tangle with the malodorous intricacies of C++ and other gnome-inspired languages. If you don't like Basic (for theological or practical reasons), stay away. Those of us who value our time ... and who aren't bound by the peer group politics of turf-guarding (viz the IBM era)... often prefer it.

by cbcbcb (not verified)

40% of the cost of software is maintanance. THose of us who value that time DON'T use Basic.

by Michael Jennings (not verified)

It seems to me that Microsoft put efficient tools into Visual Basic because the company wants to make sure it doesn't deliver a good programming tool. It isn't Basic that people like, it is the tools available in VB.

Visual Basic is written in C and C++, I understand. Microsoft wants to make sure that its customers are not able to become good enough programmers to compete with its own products. That's why it delivers efficient tools for a ridiculously bad language.

Most people don't seem to realize that the limitations of Microsoft products are deliberate. Windows 98 crashes because there is a deliberate limitation (of 128 K memory, I understand) in GDI and User resources. Exceed those limitations, and the operating system crashes without warning. Deliberate limitations like this are the action of a monopoly wanting to insure that the customers always have a reason to upgrade.

(Run Microsoft's own Resource Meter software in Windows 98 to see the limitations in action.)

It is a challenge for open source software creators not to get involved with Microsoft's destructiveness. Possibly what is really needed here is a converter to take source code from a VB program and turn it into source code in a sensible language.

If the conversion could go in both directions, the need to write in VB would completely disappear. This is the desired effect. The present plan, of providing a VB-like language in open source software has the negative effect of encouraging VB programming.

I want to know is there any possibility of convertion of vb source to say c/c++ ?