Purebasic Compiling Itself?
-
johndehope3
- New User

- Posts: 9
- Joined: Tue Jan 13, 2004 7:00 am
Purebasic Compiling Itself?
Could you write a compiler for the Purebasic language using Purebasic? In other words, can Purebasic compile itself? If not, what feature is missing from Purebasic that would prevent such a project?
Not sure to understand you well, but PureBasic is a language which has a level good enough to imagine to create something able to parse a source code and compile it by programer's directives.
By the way I guess that nobody will try to spend 4-5.000 hours to make an alternative compiler having the same level of results.
Writing some quick code that can generate FASM patterns from a PureBasic's source code would be rather easy, but don't expect to cover the whole language's features like this.
This is a myth in most people mind that a good language is one able to define itself. This is something true somewhere but do most people philosophy ? I don't think so, most people make work, cooking etc ...
Well, saying that PureBasic would be able to compile itself is not wrong, but the work to do would be huge. I suppose Fred and he's team have PureBasic tools to enhance PureBasic, but they also might have other tools to aggregate for the global work they do when delivering a build.
What is a language that compiles itself ? One able to compile a source from an executable generated with the language itself ? Or is it something else ?
In first case, just you can do what I posted on the forum some weeks before : make a program that proposes an editor gadget in which the user can type a PureBasic code, and give a button which starts pbcompiler ... it works like that.
But this is just another way to propose an editor to enter code and access to the compiler which is part of the package you get when purchasing PureBasic.
Rgrds
By the way I guess that nobody will try to spend 4-5.000 hours to make an alternative compiler having the same level of results.
Writing some quick code that can generate FASM patterns from a PureBasic's source code would be rather easy, but don't expect to cover the whole language's features like this.
This is a myth in most people mind that a good language is one able to define itself. This is something true somewhere but do most people philosophy ? I don't think so, most people make work, cooking etc ...
Well, saying that PureBasic would be able to compile itself is not wrong, but the work to do would be huge. I suppose Fred and he's team have PureBasic tools to enhance PureBasic, but they also might have other tools to aggregate for the global work they do when delivering a build.
What is a language that compiles itself ? One able to compile a source from an executable generated with the language itself ? Or is it something else ?
In first case, just you can do what I posted on the forum some weeks before : make a program that proposes an editor gadget in which the user can type a PureBasic code, and give a button which starts pbcompiler ... it works like that.
But this is just another way to propose an editor to enter code and access to the compiler which is part of the package you get when purchasing PureBasic.
Rgrds
My avatar is a small copy of the 4x1.8m image I created and exposed at 'Le salon international du meuble à Paris' january 2004 in Matt Sindall's 'Shades' designers exhibition. The original laminated print was designed using a 150 dpi printout.
I'd say you might be able to do that if you wanted to..
Most C compilers are written in C... *shrug*
Most C compilers are written in C... *shrug*
-Mitchell
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
-
techjunkie
- Addict

- Posts: 1126
- Joined: Wed Oct 15, 2003 12:40 am
- Location: Sweden
- Contact:
Yeah - as some Unix / workstation hardware vendor suggest...Karbon wrote:I'd say you might be able to do that if you wanted to..
Most C compilers are written in C... *shrug*
First compile GCC with CC (or another included C compiler), then compile GCC with GCC...

(\__/)
(='.'=) This is Bunny. Copy and paste Bunny into your
(")_(") signature to help him gain world domination.

