map
2011-04-18 01:42:04 UTC
I'm rather new to Usenet, so forgive me from barging on in here/
forgetting etiquette/etc.
Since this seems to be the place to do so, I'd decided to follow in
the
footsteps of the great and introduce the world to my programming
language
here.
Over the past two years or so in an effort to learn C I created an
interpreter for a programming language I also developed. The language
is
called FACT, or, Functions Are Classes Too. The basic concept behind
the
language is that classes/objects and functions/scopes can be combined
with
each other, thus creating a combination between the two famous PLT
paradigms (and I know I'm sounding rather pretentious at this point)
procedural and object-oriented programming. If you'd like to jump
right in
to the code, it's released here (I can't figure out how to post
sources on
Usenet): https://github.com/rookieMP/FACT
Moving on, here's the concept explained: Say one where to have a
function
f (). When we call it a new scope is created and by the time it
returns
three local variables are declared within its scope, x, y, and z. Now
lets
say this scope is called S. S contains three elements (as stated
earlier),
x, y and z. We can modify S by accessing these elements and changing
them,
we can even add elements to the scope and add other scopes as well.
But
how to we assign scopes? Let me also mention that each scope (very
much
similar to file systems) contains an "up" and "this" variable. The up
variable points to the next scope upward, and this (as you probably
know)
depends on if the language is lexically or dynamically scoped. The
this
variable points to the current scope. The "this" variable is very much
important for the creation of classes from functions. If a function
were
to return the "this" variable upon completion, it returns essentially
an
object. Methods can be defined by declaring functions withing
functions.
Tell me what you think, I'm very new to this whole game (only 16) but
I
think this language may be rather fruitful (but what do I know? I
already
overuse parentheses, I probably overuse fruitful too . Additionally,
it's a pretty good calculator, using GMP for the variables, and it
supports threading with the sprout statement. It also has a C api,
which
is kind of limited at the current moment, but works. Both 32 and 64
bit
architectures are completely supported; there is no dependency to
either.
In terms of speed, the interpreter is (I think) pretty fast, on my
computer it takes something like 13-14 seconds to computer factorial
of
100000, while python takes around 30-40. These aren't scientific
benchmarks in any sense, but they are promising.
Tell me what you think, if I should bugger off, post this somewhere
else,
whatever. I await your replies!
forgetting etiquette/etc.
Since this seems to be the place to do so, I'd decided to follow in
the
footsteps of the great and introduce the world to my programming
language
here.
Over the past two years or so in an effort to learn C I created an
interpreter for a programming language I also developed. The language
is
called FACT, or, Functions Are Classes Too. The basic concept behind
the
language is that classes/objects and functions/scopes can be combined
with
each other, thus creating a combination between the two famous PLT
paradigms (and I know I'm sounding rather pretentious at this point)
procedural and object-oriented programming. If you'd like to jump
right in
to the code, it's released here (I can't figure out how to post
sources on
Usenet): https://github.com/rookieMP/FACT
Moving on, here's the concept explained: Say one where to have a
function
f (). When we call it a new scope is created and by the time it
returns
three local variables are declared within its scope, x, y, and z. Now
lets
say this scope is called S. S contains three elements (as stated
earlier),
x, y and z. We can modify S by accessing these elements and changing
them,
we can even add elements to the scope and add other scopes as well.
But
how to we assign scopes? Let me also mention that each scope (very
much
similar to file systems) contains an "up" and "this" variable. The up
variable points to the next scope upward, and this (as you probably
know)
depends on if the language is lexically or dynamically scoped. The
this
variable points to the current scope. The "this" variable is very much
important for the creation of classes from functions. If a function
were
to return the "this" variable upon completion, it returns essentially
an
object. Methods can be defined by declaring functions withing
functions.
Tell me what you think, I'm very new to this whole game (only 16) but
I
think this language may be rather fruitful (but what do I know? I
already
overuse parentheses, I probably overuse fruitful too . Additionally,
it's a pretty good calculator, using GMP for the variables, and it
supports threading with the sprout statement. It also has a C api,
which
is kind of limited at the current moment, but works. Both 32 and 64
bit
architectures are completely supported; there is no dependency to
either.
In terms of speed, the interpreter is (I think) pretty fast, on my
computer it takes something like 13-14 seconds to computer factorial
of
100000, while python takes around 30-40. These aren't scientific
benchmarks in any sense, but they are promising.
Tell me what you think, if I should bugger off, post this somewhere
else,
whatever. I await your replies!