Author Topic: Self Compiling  (Read 14433 times)

0 Members and 1 Guest are viewing this topic.

JRS

  • Guest
Self Compiling
« on: October 07, 2018, 02:25:40 PM »
Charles,

When are you estimating a release of the self compiling branch?

Charles Pegge

  • Guest
Re: Self Compiling
« Reply #1 on: October 08, 2018, 03:37:45 AM »
Hi John,

I'm working on the features we were discussing with José on automatic destructors and transient objects. I think that with other intervening tasks, it will take about 4 weeks. But if anyone wants to try o2 in its current state, I can provide an update.

JRS

  • Guest
Re: Self Compiling
« Reply #2 on: October 08, 2018, 10:55:23 AM »
If I can get GitLab CS running on the server as a sandbox repository, we can create two O2 branches and move Jose's docs over. Until then, no use making any changes or giving you extra work.

José Roca

  • Guest
Re: Self Compiling
« Reply #3 on: October 08, 2018, 12:34:02 PM »
It would also be needed that the compiler will be able to work with UTF-16 source files. Otherwise, working with unicode and not being able to use unicode string literals will be so hard that nobody that works with unicode will use it. Of course, an editor able to work with unicode will also be needed.

The provided include files that contain wrapper functions are also useless to work with unicode since all of them are ansi.

Charles Pegge

  • Guest
Re: Self Compiling
« Reply #4 on: October 08, 2018, 12:50:48 PM »

I have made provision for reading UTF-16 source code. It is reduced to UTF-8 before compiling. What I need to do is to conserve unicode string literals.

Aurel

  • Guest
Re: Self Compiling
« Reply #5 on: October 08, 2018, 10:11:00 PM »
First of all to have unicode i not crucial for compiler
and i don't understand Jose obsession with with this .
Personally i don't need and don't care about this unicode things i prefer ANSI.

Chales
Constructor /destructor ...why this must be same as in FB ?or any other compiler
personaly i don't do very much OOP but current way is unique and really the easiest in
programming world....so Charles is that still valid or be changed? 

JRS

  • Guest
Re: Self Compiling
« Reply #6 on: October 08, 2018, 10:38:20 PM »
Aurel,

You would be much happier being part of the save VB6 crowd. I get it you're happy with traditional Win32 programming. Charles is taking BASIC to new levels.

Aurel

  • Guest
Re: Self Compiling
« Reply #7 on: October 08, 2018, 10:45:56 PM »
John

 keep your opinion for yourself...  >:(
I am asking Charles and not you!
So i will stay with 043 because all that changes just cause bugs or quirks
and almost every time somethings not work properly.
win32 is still valid in Windows world...so swallow that fact ?

Or maybe i am not welcome here?
I and Arnold are probably only real Oxygen Basic users and as such i have a
right to know what will be .

Charles Pegge

  • Guest
Re: Self Compiling
« Reply #8 on: October 09, 2018, 04:25:58 AM »
Hi Aurel,

The class system will remain compatible, with optional constructors and destructors. The difference will be that destructors will be invoked automatically when objects containing them are reconstructed or go out of scope.

Arnold

  • Guest
Re: Self Compiling
« Reply #9 on: October 24, 2018, 11:55:27 PM »
Hi Charles,

I noticed that you provided an oxygen.dll with your recent upload to Github. Could this dll already be used to experiment a little bit or would it be better to wait until the next release of Oxygenbasic?

Roland

Charles Pegge

  • Guest
Re: Self Compiling
« Reply #10 on: October 25, 2018, 07:26:20 PM »
Hi Roland,

the OXSC series of folders are self-compile backups (these folders belong in the inc folder). I'm weaving in some very intricate code for José, so it might be a little early to experiment with them.


JRS

  • Guest
Re: Self Compiling
« Reply #11 on: October 25, 2018, 10:48:33 PM »
Any chance you can post a summary of the changes and additions to come? A small example would also be helpful.
« Last Edit: October 25, 2018, 11:22:17 PM by John »

Charles Pegge

  • Guest
Re: Self Compiling
« Reply #12 on: October 26, 2018, 04:12:30 AM »
Hi John,

This is my recent log:
Quote
11:35 26/10/2018 Support object operators
11:15 26/10/2018 Support extended 'with' syntax '..' (wths)
11:14 26/10/2018 Fix namespace names containing '::' (reco.bas instrevn)
11:21 26/10/2018 Support named enumeration dot members (enums)
11:10 26/10/2018 Trap attempted assignment to non-variables (not a variable)
11:10 26/10/2018 Fix higher types retval / retvar as pointer (typp)
11:09 26/10/2018 Support deferred destructors (epif)
11:09 26/10/2018 Fix lost arrays in types (tran.inc -8)
11:07 26/10/2018 Trap undefined types in C-style prototype (ert=406)
11:00 26/10/2018 Support wide string literals L"..." (utfs)
10:59 26/10/2018 Support UTF-8 and UTF-16 big-endian / little-endian (bom)
10:59 26/10/2018 Fix 64bit right() and mid() with negative offsets (RTL32 & RTL64 mids)
10:59 26/10/2018 Self-compiling 0.1.0 (7 Oct 2018) (final FB 6 Oct 2018)
11:05 20/10/2018 convert if block to case block (enco.bas sizeofregs)
11:01 20/10/2018 Fix integer comparator (expr.bas comparister)

08:44 20/10/2018 Rollback \inc\o2 to 06/10/2018

and here is my test piece for object operations:

Code: [Select]
'objects in expressions
uses ..\rtlobjects
class cc
  bstring b
  method constructor(cc*v) {b=v : print "cc in " b}
  method constructor(int v) {b=v : print "int " b}
  method constructor(float v) {b=v : print "float " b}
  method constructor(string v) {b=v : print "string " b}
  method destructor(){print "cc destructor" : frees b}
  'OPERATORS:
  operator load (string*s){s=b} 'requires perfect match
  operator load (cc*a){print "cc load" : a.b=b}
  operator + (cc*a) {print "cc +" : a.b+=b}
end class
'#recordof cc

function foo(string a) as cc {print "foo cc" : return.b=a}

'TESTS:
=======
'
cc a,b,c
'a=b
'a=b+c
'a=foo("helo ")+foo("world")
a=b+("hello "+"world") 'not working yet
print a.b

JRS

  • Guest
Re: Self Compiling
« Reply #13 on: October 26, 2018, 06:12:27 AM »
Thanks Charles!

JRS

  • Guest
Re: Self Compiling
« Reply #14 on: October 27, 2018, 01:52:08 PM »
Quote from: Charles@JRS
taken by the gulls

Hate when that happens.  :)