It is currently Wed Jun 19, 2013 1:54 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Preprocessors
PostPosted: Sun Feb 05, 2012 6:09 am 
Offline
User
User

Joined: Tue Jan 18, 2011 7:13 am
Posts: 36
I took a long time to find and select this language and package. PureBasic has an amazing array of advantages and options (optional object-oriented methods, insertion of assembly language, and more). I wonder if yet another area of functionality would be of interest to any of you:

The BASIC language of the Commodore 64 was very simple. I could not find anything that simple on the market two years ago. It was simple, in part, because it was limited. Nowadays, we must preface the arithmetic with a lot of declarations of various sorts. Programming has become a specialty that requires a serious commitment of time and learning. This has tended to uninvite scientists and engineers who are maxed out on time and definitely max out on the complexity of their metal lives. Preprocessors could bring them back to programming and improve their productivity while making PureBasic even more amazing.

The idea is to offer a number of limited and task-specific interfaces that let the unsophisticated programmer dispense with all of the complications and get on with the arithmetic and logic. Fore example, there might be an interface that does arithmetic and logical operations on bytes, does not do floating point arithmetic and has a default address word length. This might be of interest to those trying to demonstrate an encryption algorithm without making a career of programming. I would call such an interface a preprocessor, but perhaps there is a better name. There might be more than a dozen such preprocessors made available.

So, my question is this: Are there any PureBasic programmers out there who would like to facilitate this kind of thing? Do you have an opinion as to the value of this? Do you have any suggestions for me?

Please respond to this message here or contact me directly.

Thank you for your help.

Jim Adrian

jim@futurebeacon.com


Top
 Profile  
 
 Post subject: Re: Preprocessors
PostPosted: Sun Feb 05, 2012 7:42 am 
Offline
Addict
Addict

Joined: Sun Aug 08, 2004 5:21 am
Posts: 1108
Location: Netherlands
I'm not sure what your are requesting.
PureBasic isn't that complicated.

When it comes to an address, this always has to be the same as the OS (32 or 64 bit).
And when it comes to arithmetic, you can change the default mode using Define.
Code:
Define.d; default to double precision

b = 4
c = 3
a = b / c

Debug a

Code:
Define.a; default to unsigned byte type

b = %11110011
a = b << 1

Debug Bin(a)


Top
 Profile  
 
 Post subject: Re: Preprocessors
PostPosted: Sun Feb 05, 2012 1:04 pm 
Offline
Enthusiast
Enthusiast

Joined: Sat Dec 20, 2003 6:19 pm
Posts: 467
Location: Switzerland
Maybe I misunderstand, but I think he's talking about
domain-specific languages (DSL). Meaning we make a
preprocessor, which is actually a small compiler, that
translates a DSL into PureBasic.

Why not. PB is not what I'd target but some people
might find it interesting to do.

_________________
Athlon64 3700+, 1024MB Ram, Radeon X1600


Top
 Profile  
 
 Post subject: Re: Preprocessors
PostPosted: Sun Feb 05, 2012 10:12 pm 
Offline
User
User

Joined: Tue Jan 18, 2011 7:13 am
Posts: 36
remi_meier wrote:
Maybe I misunderstand, but I think he's talking about
domain-specific languages (DSL). Meaning we make a
preprocessor, which is actually a small compiler, that
translates a DSL into PureBasic.

Why not. PB is not what I'd target but some people
might find it interesting to do.


Here is the start of an example:

http://www.futurebeacon.com/example-program.htm

People who need to show the math of statistics, like social scientists, would be attracted to this one if it gave fractional results; however, it is good for encryption. Everything about it, as much as possible, sticks to what is already familiar outside the field of programming.

The HTML rendering, the defining of a key word in a context-dependent way and the file handling might be somewhat rare.

Jim Adrian

jim@futurebeacon.com


Top
 Profile  
 
 Post subject: Re: Preprocessors
PostPosted: Mon Feb 06, 2012 6:49 am 
Offline
Addict
Addict

Joined: Sun Aug 08, 2004 5:21 am
Posts: 1108
Location: Netherlands
So what you want is to create your own programming language ?
I have no idea how to create something like that :shock:
I suggest this topic to be moved to the 'Coding Questions' forum as it is not OS X specific.
In the coding questions forum you probably will get more answers.


Top
 Profile  
 
 Post subject: Re: Preprocessors
PostPosted: Wed Feb 15, 2012 1:50 am 
Offline
User
User

Joined: Tue Jan 18, 2011 7:13 am
Posts: 36
wilbert wrote:
So what you want is to create your own programming language ?
I have no idea how to create something like that :shock:
I suggest this topic to be moved to the 'Coding Questions' forum as it is not OS X specific.
In the coding questions forum you probably will get more answers.


wilbert,

I do not want to create a new programming language. I want to create a dozen or so front-end editors for PureBasic. I don't want to rewrite the compiler. I want to write translators that take the output of one of these editors and turns it into PureBasic source code.

James Adrian
jim@futurebeacon.com


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye