Click Here
home features news forums classifieds faqs links search
6071 members 
Amiga Q&A /  Free for All /  Emulation /  Gaming / (Latest Posts)
Login

Nickname

Password

Lost Password?

Don't have an account yet?
Register now!

Support Amigaworld.net
Your support is needed and is appreciated as Amigaworld.net is primarily dependent upon the support of its users.
Donate

Menu
Main sections
» Home
» Features
» News
» Forums
» Classifieds
» Links
» Downloads
Extras
» OS4 Zone
» IRC Network
» AmigaWorld Radio
» Newsfeed
» Top Members
» Amiga Dealers
Information
» About Us
» FAQs
» Advertise
» Polls
» Terms of Service
» Search

IRC Channel
Server: irc.amigaworld.net
Ports: 1024,5555, 6665-6669
SSL port: 6697
Channel: #Amigaworld
Channel Policy and Guidelines

Who's Online
11 crawler(s) on-line.
 133 guest(s) on-line.
 0 member(s) on-line.



You are an anonymous user.
Register Now!
 Hypex:  12 mins ago
 DiscreetFX:  2 hrs 55 mins ago
 amigakit:  4 hrs 28 mins ago
 Hammer:  5 hrs 18 mins ago
 Rob:  5 hrs 56 mins ago
 billt:  6 hrs 4 mins ago
 amigang:  6 hrs 14 mins ago
 OneTimer1:  6 hrs 17 mins ago
 agami:  6 hrs 40 mins ago
 matthey:  6 hrs 47 mins ago

/  Forum Index
   /  Amiga Development
      /  The PortablE compiler - AmigaE reborn!
Register To Post

Goto page ( 1 | 2 | 3 | 4 Next Page )
PosterThread
ChrisH 
The PortablE compiler - AmigaE reborn!
Posted on 14-Apr-2006 16:32:08
#1 ]
Elite Member
Joined: 30-Jan-2005
Posts: 6679
From: Unknown

This post is to announce that for several years I have been working on PortablE - a brand new compiler for an AmigaE-like language which I have designed. Although not yet complete, I have made significant progress. But first some history...


What is AmigaE?
AmigaE used to be a hugely popular programming language, which combined the power & efficiency of C/C++ with much of the readability of BASIC or Pascal. As such, it was a great way to learn the principles behind C/C++, without having to deal with the (IMHO!) horrendous *&{}!=; syntax of C/C++. It was also very powerful in it's own right, and was used to write several major programs for the Amiga.

Sadly development of AmigaE gradually slowed to a crawl after version 3 was released, and then halted entirely about a decade ago, because it was completely written in 68k assembler, and had become very hard to improve due to it's complexity. Thus interest in AmigaE has gradually declined since then. The death of Commodore obviously did not help!

Want to know more about AmigaE? Look here:
http://wouter.fov120.com/e/
http://en.wikipedia.org/wiki/Amiga_E
http://www.stud.uni-hamburg.de/users/goldi/aee/beginner/beginner_toc.html

Note: PortablE is more complicated than BASIC, but simpler than C/C++. So if you want more power (and complexity) than BASIC allows, PortablE might be right for you. But if you don't want to learn any new concepts, then it is not. PortablE is best suited to those who already know AmigaE, although it's type checking will make it easier to learn than AmigaE.


What is PortablE?
Well, to cut a long story short, about 5 years ago I started working out how to translate AmigaE programs into other programming languages (esp. for non-Amiga computers) - something far harder than it might first appear. Also, I was becoming increasingly frustrated by the limitations of AmigaE (which hadn't seen any development in a long time), particularly for Object Orientated Programming. So I started planning improvements, as well as other changes that would increase portability.

I ended-up with the following main aims for PortablE, my successor to AmigaE:

* As backwards-compatible as possible, but not at the expense of portability or essential new features. Wierd features that I don't use (such as lisp cells, unification or quoted expressions) may never be implemented, depending on user interest. The compatability is not yet tested, but it should do OK, and can only improve.

* The translated code should retain as much of the original formatting & comments as possible, so that it is human readable/editable. This has been achieved quite successfully!

* OS independant (hence PortablE), which means no more direct AmigaOS calls - although an emulation layer for old programs may be added later. Most of the necessary wrapper abstractions are already written (and used to code PortablE!).

* Type checking, something which AmigaE sorely lacked, which will prevent many bugs. But it should work with the programmer, not against him as you might have experienced in C/C++. Typing checking has been achieved, but probably needs tweaking.

* Decent error reporting, which correctly highlights the problematic code. This has been achieved successfully, and nicely puts AmigaE to shame!

* A powerful & modern Object Orientated Programming system, but one that is still very easy to understand (unlike C++). Not started on this yet, but the compiler design will make this relatively easy to add.

* New features should keep to the friendly AmigaE-style; no nasty C-style syntax creeping in! Again, mostly not started yet, but the compiler design will make new features easy to add.

* Eventually able to compile itself, since PortablE will essentially be fully backwards compatible with my usage of AmigaE. But I won't be trying to do this until certain new features have been added.

* Adding new target (output) languages should be relatively easy, by being able to re-use the relevant work done for previous target languages, thanks to high modularity of the back-end. Looking very good so far, although please see below for current limitations.


What is the state of PortablE now?
Given the delays seen with Mattathias Basic, you would be right to wonder if PortablE might suffer the same fate of limited features, slow progress & major rewrites. I am fairly confident this won't be the case, because while Mattathias was announced (as far as I can tell) before much coding or design had been done, I spent many months designing PortablE, before I even started coding (several years ago now!). I have already rewritten much of PortablE once, and am now confident that I have it exactly right!

I am only announcing the existance of PortablE, as it is now sufficiently complete that there aren't any big gaps in it's functionality. It is currently able to do the following:

* Tokenise the source code.

* Load all the dependant modules, detect circular dependancies, and order the processing of modules so that they are always processed before they are used by other modules.

* FULLY parse constant declarations, global variable declarations, object declarations (including inheritance), procedures & methods declarations.

* Fully parse most AmigaE expressions & statements, including the very complex SELECT statements. It does everything that I intend to support, except for macros & lists. It does not yet do wierd stuff like lisp cells, unification, quoted expressions, and a few other things.

* Report errors & warnings, while parsing the code. It performs syntax checking, type checking (for both parameters & assignments), procedure/method call checking, member checks, inheritance checking, name-conflict checking, scope checking, and pretty much all the checking you will ever need!

* It should be able to refactor out PortablE features which the target language does not support, although this has not been tested yet. But as everything else has worked pretty much as I expected, there should be no problems. Refactoring will also be used to implement some advanced optimisations, eventually.

* Write out the parsed (and refactored) code in a completely customisable fashion, so as to create source code in the target language format & syntax, using a highly customisable back-end. It also easily handles both name-space differences & parser ordering differences between PortablE & the target language, so that there are no clashes or items referenced before they are parsed.


Something you might wonder is what language it is currently targetting (outputting) to. Well, AmigaE actually, because that is the easiest to test! But despite the similarity between AmigaE & PortablE, it is still quite a bit of work to recreate the AmigaE syntax & structure from PortablE's internal representation. There is little difference targetting other languages, except that I would need to refactor out unsupported features - which would just complicate my early testing.

Also, I have currently only implemented support for basic maths functions. String & memory functions will come next, eventually followed by abstractions for memory & file support. Where a function already exists in the target language, it only requires a couple of simple lines of code to support, so string & memory functions will be quickly added.

Other limitations are that PortablE is running slower & rather more memory hungry than it should, because I have lots of debugging enabled & optimisations disabled for testing purposes.

When will all this be completed? As Hyperion would say: "It's done when it's done!" I don't want to make any promises that I can't keep, but I do hope to move things along as quickly as possible


What do you plan for PortablE?
Oooh, lots of things - too many to explain! But to give you an idea:

* A run-time type system for objects.

* Constant propogation, for enhanced error reporting & optimisations.

* An OOP Generics system more powerful than Java's (almost as good as C++ Templates IMHO, with the bonus of type checking), but with syntax that makes Generics almost trivial to use!

* OOP interfaces like Java.

* A far more flexible inheritance system, which should be even better than C++'s in some ways, yet with a very easy to understand syntax (unlike C++!).

* Some sort of type system for primitive values, so for example you could have a POSITIVE type that only accepted positive integers. Compile-time (static) evaluation of the constant value of expressions (AKA constant folding) is already implemented...

* Various improvements to statement syntax.

* A semi-automatic object deallocation system, with compile-time checks, which is NOT garbage-collected. This will make large programs FAR easier to write (though not as easy as Java), because even beginners will be forced to handle object ownership correctly. This should become a major reason for ditching C++!

* Some sort of autodoc system, so that documentation of programs can be automatically generated.

Most of these will of course take some (possibly a lot!) of time to implement, but having a working compiler means that these ideas are now feasible.


Why have you announced PortablE?
As you may have gathered, PortablE has already achieved most of the functionality of AmigaE (a major milestone), but it currently has few of the standard function or procedure calls that a real program needs. It also only generates AmigaE source code at the moment. While I expect that both of these limitations won't take too long to overcome, I do not intend to release PortablE until it can be useful.

I am announcing PortablE now (a) to see what interest there is in a Next Gen AmigaE-style language, (b) to discuss my plans for PortablE (perhaps I may modify them), (c) help keep the Amiga alive with a bit of excitement (??), and (d) basically talk to other like-minded programmers who would be interested in trying out PortablE when it is ready. I would also be interested in joining an AmigaE mailing list again, if any are still alive...?

Well, that's all I can think to say at the moment. Please ask questions here or using Private Messages (but please include your email address if you expect a detailed reply or prolonged discussion).

Chris Handley

Last edited by ChrisH on 15-Apr-2006 at 09:54 AM.
Last edited by ChrisH on 15-Apr-2006 at 09:53 AM.
Last edited by ChrisH on 15-Apr-2006 at 09:40 AM.

_________________
Author of the PortablE programming language.
It is pitch black. You are likely to be eaten by a grue...

 Status: Offline
Profile     Report this post  
Samwel 
Re: The PortablE compiler - AmigaE reborn!
Posted on 14-Apr-2006 16:40:30
#2 ]
Elite Member
Joined: 7-Apr-2004
Posts: 3404
From: Sweden

@ChrisH

Woohoo the greatest language ever made is doing a major comback just in time
for the release of OS4. Coincidence?

I used to code alot with AmigaE around 1996-2000, especially 1997-1998.
Great language, almost as easy as ARexx.

If you release this before I get grey hair I might start doing something serious
again

_________________
/Harry

[SOLD] µA1-C - 750GX 800MHz - 512MB - Antec Aria case

Avatar by HNL_DK!

 Status: Offline
Profile     Report this post  
opi 
Re: The PortablE compiler - AmigaE reborn!
Posted on 14-Apr-2006 16:55:09
#3 ]
Team Member
Joined: 2-Mar-2005
Posts: 2752
From: Poland

@ChrisH

Woha! I didn't have time to read this (yet, Weroniqe kicked me out, I need to go to the shop ) BUT I HOPE it will be for OS3, OS4, MorphOS and Linux!

_________________
OpenWindows Initiative. Port PS3 hardware to bananas. For free. Join today and receive expired $50 cupon from AI!

 Status: Offline
Profile     Report this post  
Mr_Capehill 
Re: The PortablE compiler - AmigaE reborn!
Posted on 14-Apr-2006 16:58:31
#4 ]
Super Member
Joined: 15-Mar-2003
Posts: 1932
From: Yharnam

@ChrisH

Very interesting. Personally I have used very little 'E', and that was years ago. However, I am interested to revisit possible native AOS4 version ;)

 Status: Offline
Profile     Report this post  
ChrisH 
Re: The PortablE compiler - AmigaE reborn!
Posted on 14-Apr-2006 17:02:52
#5 ]
Elite Member
Joined: 30-Jan-2005
Posts: 6679
From: Unknown

It is worth pointing out that at the moment (and probably for some time to come) it needs access to the full source code to compile something. As such, I will likely have to release some of the necessary OS abstractions as some form of Open Source (suggestions? The GPL is a bit restrictive).

Once it has matured a bit, I will look into caching PortablE's internal representation of a module, which should allow compiled modules to be used without access to the source code. Although some of my planned features may be a little tricky to do without full access to the source-code at compile time...

_________________
Author of the PortablE programming language.
It is pitch black. You are likely to be eaten by a grue...

 Status: Offline
Profile     Report this post  
ChrisH 
Re: The PortablE compiler - AmigaE reborn!
Posted on 14-Apr-2006 17:07:08
#6 ]
Elite Member
Joined: 30-Jan-2005
Posts: 6679
From: Unknown

@opi & Mr_Capehill,
Well, AmigaE programs work on OS3, OS4 & probably MorphOS (?), so that should happen fairly early. I am planning for the 2nd (1st "real") target language to be OPL, which is a powerful BASIC-esque language that runs on Psion & Symbian devices. My 3rd target language will be C or C++ (which ever proves easier), and that will of course open the door to most OSes with a little work. But Windows support will likely come well before Linux, unless someone gives me loads of help...

_________________
Author of the PortablE programming language.
It is pitch black. You are likely to be eaten by a grue...

 Status: Offline
Profile     Report this post  
Mr_Capehill 
Re: The PortablE compiler - AmigaE reborn!
Posted on 14-Apr-2006 17:07:54
#7 ]
Super Member
Joined: 15-Mar-2003
Posts: 1932
From: Yharnam

@ChrisH

Make your pick :)

http://www.opensource.org/licenses/

 Status: Offline
Profile     Report this post  
BigBentheAussie 
Re: The PortablE compiler - AmigaE reborn!
Posted on 14-Apr-2006 17:36:19
#8 ]
Super Member
Joined: 28-Oct-2003
Posts: 1690
From: Melbourne, Australia

Errrm..
1. What does it support in terms of GUI, sound, mouse?
2. What platforms does it support? ie. Windows, Linux, Mac. etc.

I gather it's a language translator, and the above questions don't make sense.
So, I'm a little confused as to why you would target possibly the least portable language first. Anyway, what do I know?

Good luck. Nice to hear of something that people might find exciting.

Ok. Going back to my happy place now.

_________________
Leo Nigro, CTO Commodore USA, LLC
Opinions expressed are my own and not those of C= USA.
Commodore/AMIGA "Beautiful, High-Performance, Home Computers for Creativity and Entertainment."

 Status: Offline
Profile     Report this post  
smithy 
Re: The PortablE compiler - AmigaE reborn!
Posted on 14-Apr-2006 17:45:39
#9 ]
Regular Member
Joined: 28-Aug-2003
Posts: 364
From: Newcastle

@ChrisH

Wow! This looks very impressive mate! I'm amazed you've been working away quietly for 5 years. It's something I couldn't have done - I sometimes need a bit of a chat in public about my long-running project to keep my motivation up.

By the way, did you write some grammar rules before you started (I assume AmigaE never had any) - I've found writing language processing software extremely difficult without the production rules.

Your project could prove very useful for lots of developers. Best of luck.

 Status: Offline
Profile     Report this post  
Bean 
Re: The PortablE compiler - AmigaE reborn!
Posted on 14-Apr-2006 17:52:31
#10 ]
Super Member
Joined: 4-Apr-2003
Posts: 1225
From: U.K.

@ChrisH

Sounds good Chris. Now I can see why you had some strong opinions in the other
thread!

How about a demonstration of the translation of a program from PortablE to
AmigaE at next months Ant meeting? I'd be interested to see it.

Cheers,
Bean.

_________________
OS4.1 + SAM Flex
RIP my A1XE.. that used to have an appetite for batteries!

 Status: Offline
Profile     Report this post  
ChrisH 
Re: The PortablE compiler - AmigaE reborn!
Posted on 14-Apr-2006 18:00:11
#11 ]
Elite Member
Joined: 30-Jan-2005
Posts: 6679
From: Unknown

@BigBentheAussie who said Quote:
1. What does it support in terms of GUI, sound, mouse?
2. What platforms does it support? ie. Windows, Linux, Mac. etc.

At present, it is Shell (CLI) only. When language improvement slows down, I will looking at writing a GUI abstraction. Abstractions for other stuff will be further away.

HOWEVER, it would be perfectly possible for someone else to write these kinds of abstractions, as the features of the target language can be accessed from normal PortablE code. Thus once it is released, someone with the motivation could extend PortablE themselves...

_________________
Author of the PortablE programming language.
It is pitch black. You are likely to be eaten by a grue...

 Status: Offline
Profile     Report this post  
ChrisH 
Re: The PortablE compiler - AmigaE reborn!
Posted on 14-Apr-2006 18:04:53
#12 ]
Elite Member
Joined: 30-Jan-2005
Posts: 6679
From: Unknown

@smithy who said Quote:
I'm amazed you've been working away quietly for 5 years. It's something I couldn't have done

I can tell you it was VERY hard! But then again, what I was planning was something completely new to me (maybe even UNbelievable), so I had no way to know how long it would take, or even if I could achieve it. And I felt it would be even worse to announce vapour - can you remember how many vapourware products the Amiga has seen? And what it does to their credibility? As they say, "you only get one first impression".

Also, until a few months ago very little of my PortablE code had even been tested - it was just 1000s of lines of untried code. Not very impressive to talk about, and quite scary really... For what it is worth, I have managed about 1 bug that the compiler can't detect per 200-300 lines of code, so far.

Quote:
did you write some grammar rules before you started (I assume AmigaE never had any) - I've found writing language processing software extremely difficult without the production rules.

No, I developed my own language processing system, which made syntax parsing a relatively abstract (high-level) affair. So I was just able to write what the parser should expect at each step.

_________________
Author of the PortablE programming language.
It is pitch black. You are likely to be eaten by a grue...

 Status: Offline
Profile     Report this post  
ChrisH 
Re: The PortablE compiler - AmigaE reborn!
Posted on 14-Apr-2006 18:10:57
#13 ]
Elite Member
Joined: 30-Jan-2005
Posts: 6679
From: Unknown

@Bean who said Quote:
How about a demonstration of the translation of a program from PortablE to AmigaE at next months Ant meeting? I'd be interested to see it.

I don't see why not, but as PortablE is very similar to AmigaE, I'm not sure it'd LOOK very impressive. I suppose an interactive demonstration of it's error checking/reporting abilities would be better. And all of that assumes some knowledge of AmigaE, which no-one was interested in when I joined ANT years ago.

_________________
Author of the PortablE programming language.
It is pitch black. You are likely to be eaten by a grue...

 Status: Offline
Profile     Report this post  
itix 
Re: The PortablE compiler - AmigaE reborn!
Posted on 14-Apr-2006 18:17:27
#14 ]
Elite Member
Joined: 22-Dec-2004
Posts: 3398
From: Freedom world

@ChrisH

http://home.swipnet.se/blubbe/ECX/

AmiNetRadio and AmiTradeCenter are written in E.

_________________
Amiga Developer
Amiga 500, Efika, Mac Mini and PowerBook

 Status: Offline
Profile     Report this post  
smithy 
Re: The PortablE compiler - AmigaE reborn!
Posted on 14-Apr-2006 18:18:37
#15 ]
Regular Member
Joined: 28-Aug-2003
Posts: 364
From: Newcastle

Any plans for a code compiling phase?

Last edited by smithy on 14-Apr-2006 at 06:19 PM.

 Status: Offline
Profile     Report this post  
ChrisH 
Re: The PortablE compiler - AmigaE reborn!
Posted on 14-Apr-2006 19:11:49
#16 ]
Elite Member
Joined: 30-Jan-2005
Posts: 6679
From: Unknown

@smithy
Technically compilation is the translation from one language to another - although usually that target is a lower-level language (i.e. assembler or machine code). So technically it already compiles

But if you mean outputting assembler of some sort, yes, that should be possible (and I kept it in mind during design) - but I have no interest in doing that at the moment.

_________________
Author of the PortablE programming language.
It is pitch black. You are likely to be eaten by a grue...

 Status: Offline
Profile     Report this post  
T_Power 
Re: The PortablE compiler - AmigaE reborn!
Posted on 14-Apr-2006 19:43:36
#17 ]
Regular Member
Joined: 8-Sep-2003
Posts: 359
From: Durban, South Africa

@ChrisH

This is very GOOD news.

The more languages available the better for the community, as more people will find one that "fits".
One important consideration is good documentation with MANY, many examples.
Without this beginners will not get started, and jaded old-timers won't look either.

Congratulations, and good luck for the future.
Possibly get it in the Contributions drawer of Amiga OS4.0 Final.

Cheers,
Tim

 Status: Offline
Profile     Report this post  
wegster 
Re: The PortablE compiler - AmigaE reborn!
Posted on 14-Apr-2006 20:08:24
#18 ]
Elite Member
Joined: 29-Nov-2004
Posts: 8554
From: RTP, NC USA

@ChrisH

Very cool, Chris, I look forward to seeing where this goes (even if I don't agree with you about C )

For licensing, someone already gave the link, but perhaps something BSDish? (do with what you like, basically).

_________________
Are we not done with the same silly arguments and flames yet??!

 Status: Offline
Profile     Report this post  
elwood 
Re: The PortablE compiler - AmigaE reborn!
Posted on 14-Apr-2006 21:51:30
#19 ]
Elite Member
Joined: 17-Sep-2003
Posts: 3428
From: Lyon, France

@ChrisH

If it's not AmigaE maybe you could call it AmigaH (like ChrisH)

Could you post an example PortablE source code ?

_________________
Philippe 'Elwood' Ferrucci
Sam460 1.10 Ghz
AmigaOS 4 betatester
Amiga Translator Organisation

 Status: Offline
Profile     Report this post  
Anonymous 
Re: The PortablE compiler - AmigaE reborn!
Posted on 14-Apr-2006 22:50:29
# ]

0
0

Hi ChrisH,


Reply to post #1.


???????????????????????????????????????????

I did not understand most of the entire post at all.

For instance, if I type in:

Dim Monster$(200)
For X=1 to 200
Read Monster$(X)
Next

How much of what you wrote applies to those statements, I would guess not a whole lot. I didn't realize that using about 150 AMOS commands does what you are talking about, and I have no clue mostly as to what you are talking about, but yet I managed to achieve what I wanted by programming. No explanation is necessary, as I WAS able to write SW that worked.


Now, I have looked at AmiBlitz, Pascal, TrueBasic, and AmigaE (I think I saw some), and I must say, AMOS Pro IS the KING of them all for ease of use.

I didn't find anything that I couldn't do with it that I needed.

OldFart showed me some Arexx, and the above would require like 200 assign statements, not good, considering I have several 1000 that need to be done! It's certainly not made for RPGs.

Unfortunately, I wasn't able to upgrade my AOS install. I tried last night, I'll try again today. SDLBasic therefore is a no go until I get somewhere with that.



Like I said, AMOS Pro is the champion for me, and computed Restores (and I can't remember if it works for goto and gosub as well), creates unbelieveable flexibility..... You can have a very small stack space if you use "Restore" carefully.


I'm really rooting for Mattathias!

 
     Report this post  
Goto page ( 1 | 2 | 3 | 4 Next Page )

[ home ][ about us ][ privacy ] [ forums ][ classifieds ] [ links ][ news archive ] [ link to us ][ user account ]
Copyright (C) 2000 - 2019 Amigaworld.net.
Amigaworld.net was originally founded by David Doyle