• Welcome to Theos PowerBasic Museum 2017.

News:

Attachments are only available to registered users.
Please register using your full, real name.

Main Menu

The compiler advantage

Started by John Spikowski, August 11, 2013, 07:20:11 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

José Roca

Other things that PBers want are tools like a dedicated IDE, a good debugger, a Visual Designer, an help file... Without them, you aren't going to convince anybody to switch to O2.

Do you use O2, or you just use SB?

John Spikowski

#16
Quote
I don't need JIT.

What are virtual DLLs?

O2's JIT benefit interpreters more than compilers I would say. Charles first introduced the virtual dll concept with ScriptBasic and then implemented it in thinBasic. In essence what Charles has done is allowed an interpreter to pass a string of O2 code (function) to the O2 DLL JIT compiler creating executable code in memory as if you loaded a function from a standard DLL. This allows me to script/compile lighting fast code at runtime and still enjoy the benefits of using an interpreter.

I will let Charles answer your other question about resource embedding.


John Spikowski

#17
QuoteDo you use O2, or you just use SB?

In many ways SB and O2 are co-dependent on each other's success. It's like the 3M commercial.

QuoteWe don't write interpreters, we make them better.

I have dedicated my efforts on the Windows platform to take advantage of the features of O2 with SB for extending the language. Charles is the driving force to keeping SB relevant on Windows. The competition is fierce and you really have to have something special to get second looks. On Linux, I'm staying the course with ANSI/ISO C extension modules for portability.

FWIW @60 - That's cool, my karma and age match. (unsigned reality)

Theo Gottwald

#18
Reading your posts, John i believe you had great chances to get politician in germany or USA.
You write ... well selected words. Where you don't really know much about the backgound.
Then you say "I'll let Charles explain you that".
;D
Why don't you come to germany? Our political parties look for such people ... lots talking. No deeper thoughts behind. Is it some sort of therapy we are making here?

PS: Sorry Jose, i just had to write this  :-X

@John: Whatever happens is often just a follow up. if  i or Jose get too many mails from forum members, asking for something to be changed. Hope for you, the therapy works.

Charles Pegge

OxygenBasic started out as a compile-to-memory system, so you go directly from Basic source script to binary code execution, without producing a PE file. Hence John's term Virtual DLL, when this technique is used in conjunction with an interpreter, or other system that normally uses DLL-based extension modules.

The current IDE provided is Scite, though personally, I still prefer to work with notepad, and launch programs directly from script.

For resource compiling and attachment to PE files, I've included GoRc and Res2Exe utilities in the tools/compilers section of the package. But most of my attention has been on the core language itself, and I not so keen to get too deeply embroiled in Windows API stuff.


John Spikowski

#20
QuoteThe current IDE provided is Scite, though personally, I still prefer to work with notepad, and launch programs directly from script.

Charles,

Try Ultra Edit! (30 day free trial) I have used it for years.  It now comes with JavaScript as it's embedded scripting engine which would be a tantalizing replacement for what you are using FB for now.


Best text/programmers editor around for Windows. IMHO

John

José Roca

Neither GoRc nor Res2Exe are included in the package that I have downloaded: OxygenBasicA039.zip.

John Spikowski

#22
Please use the current Work-In-Process build.

This link may also be helpful.

José Roca

Does O2 generate a log file when there are errors during compiling? I could modify my editor to work with O2, but a log file containing information of the error, the path of the file in which it has happened and the line and column is needed to load the file in the editor and position the caret in the offending line.

Zlatko Vid

#24
Hello Power Rangers.. :)
There are already editor for Oxygen Basic called OxyEdit written by me and there is also editor
written in Oxygen called ASciEdit( still in development)...so IDE is not a problem from my point of view.
However i like your SED editor ..especially older version :)

And to not forget thanks again Jose for this great site which is full of programming resourses!

José Roca

Is not the IDE what worries me. Writing my own, I could add features not available in the compiler like attaching resources on the fly (Windows only, I don't intend to use Linux).

Charles Pegge

OxygenBasic currently produces a composite error message giving a description, a line, and the filename if the file is an INCLUDE.

I will need to provide additional calls to return these components separately, so that the compiler (usually gxo2.exe) can create a compatible logfile of for the IDE.

O2 compilers (front ends) are very easy to produce, so it would be no problem adapting one if necessary.

Including Aurel's we have 4 IDE projects on the go, but nothing as extensive as CSED.

My ultimate dream IDE is Opengl-driven with its own windows-independent controls, code-base, and integral help. The GUI part is now feasible, but there is a mountain of IDE logistics to pile on top.

John Spikowski

QuoteIs not the IDE what worries me. Writing my own, I could add features not available in the compiler like attaching resources on the fly (Windows only, I don't intend to use Linux).

Thanks José for taking a peek at O2!

FYI: O2 supports 64 bit Windows which may extend your reach if needed.




John Spikowski

QuoteMy ultimate dream IDE is Opengl-driven with its own windows-independent controls, code-base, and integral help. The GUI part is now feasible, but there is a mountain of IDE logistics to pile on top.



C4droid's SDL plug-in has taken that approach with it's Java VM connection to Android.


José Roca

I have been looking at the examples for classes and I think I could do at lot with them, but frankly, without documentation I'm a bit lost.

Suddenly, you find something like


  byte r,g,b,a
  =
  rgba as dword


What is this? Some kind of union?

or


  class stat
    method sum() as double
    method average() as double
    /\
    da(100) as double
    dn as long
  end class


What is /\?

or


'-------------
'THIS AND THAT
'=============

sys v=4

class c
  sys v
  method m()
    this.v=1
    print v
    print that.v
  end method
end class

dim as c d

d.m


What is "that"?

Also, I see examples in the forum using "del" with object variables, but not in the examples that come with the compiler, so I don't know if I have use del to destroy the class or not.

Too many questions.

I know that coding is the funny part and that nobody likes to write documentation, but...

I wrote a monster help file documenting all my wrappers. Knowing that if I had to write it when I had finished the wrappers I would never have done it, each time that I wrote a wrapper I wrote also the documentation before anything else.