|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
What is the minimum required for a fully-functional programming language?
(i.e. one in which, theoretically, you could perform any calculation).
iirc machine code seems to get by purely on 'ifs' and assignments - would in
theory a language be functional that only had these two functions (and
presumably the ability to loop over the whole code, but not individual
sections of it).
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
In article <416ef01c@news.povray.org>,
"Tom Melly" <pov### [at] tomandlucouk> wrote:
> What is the minimum required for a fully-functional programming language?
> (i.e. one in which, theoretically, you could perform any calculation).
IIRC, conditional jumps and addition are all that is required for a
Turing-complete language. However, it'd be too much work to do anything
useful with that kind of instruction set.
"Functional" has a special meaning in programming languages, but I
assume you aren't talking about functional languages.
> iirc machine code seems to get by purely on 'ifs' and assignments - would in
> theory a language be functional that only had these two functions (and
> presumably the ability to loop over the whole code, but not individual
> sections of it).
Real machine code is a bit more extensive, with a lot of useful
instructions that are faster to hard-wire on the processor than to
compute using multiple instructions. (Some modern processors have a
square root instruction, for example.)
The extreme would be CISC architectures, which give you a lot of
instructions, and many forms of each. Then there are RISC architectures,
which aim to simplify the processor electronics, and execute simpler
instructions more rapidly.
http://en.wikipedia.org/wiki/CISC
http://en.wikipedia.org/wiki/RISC
And you will probably find this interesting:
http://everything2.com/index.pl?node_id=857484
--
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: <chr### [at] tagpovrayorg>
http://tag.povray.org/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Wasn't it Tom Melly who wrote:
>What is the minimum required for a fully-functional programming language?
>(i.e. one in which, theoretically, you could perform any calculation).
>
>iirc machine code seems to get by purely on 'ifs' and assignments - would in
>theory a language be functional that only had these two functions (and
>presumably the ability to loop over the whole code, but not individual
>sections of it).
When I was at university, I worked on an Elliot 903 computer that had a
machine code which had only 16 instructions, and one of those was a
no-op. Two other instructions could have been omitted ("increment in
place" and "decrement in place") without making much impact on the
usability of the language.
--
Mike Williams
Gentleman of Leisure
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> What is the minimum required for a fully-functional programming
> language?(i.e. one in which, theoretically, you could perform any
> calculation).
Well, Minsky's register machines are Turing-strong, and they just have
increment and decrement (by one), but the decrement is a conditional
that jumps to one place if it succeeds and to another if you try to
decrement a register whose value is zero.
> iirc machine code seems to get by purely on 'ifs' and assignments -
> would in theory a language be functional that only had these two
> functions (and presumably the ability to loop over the whole code, but
> not individual sections of it).
I designed a processor over the Summer that had about 20 instructions:
the usual set of arithmetic (add, subtract, etc.) and logical
(or, and, etc.) operations, instructions to load from and store to
memory, a few types of branch, and an if. However, it is possible to
make do with only one instruction:
subtract-and-write-back-conditionally-branching. Computers like this
(which are entirely theoretical, nobody would want to use something like
this) are called single instruction computers (SICs).
Daniel
--
A most peculiar man With the windows closed And Mrs Reardon says
He died last Saturday So he'd never wake up He has a brother somewhere
He turned on the gas To his silent world Who should be notified soon
And he went to sleep And his tiny room .oO( http://sad.istic.org/ )
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Tom Melly" <pov### [at] tomandlucouk> wrote in message
news:416ef01c@news.povray.org...
BTW sorry for OT, I posted to the wrong group...
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On Thu, 14 Oct 2004 22:29:16 +0100, "Tom Melly"
<pov### [at] tomandlucouk> wrote:
>What is the minimum required for a fully-functional programming language?
>(i.e. one in which, theoretically, you could perform any calculation).
>
If I understand your question, I think you mean a
"turing complete" language. If you google using that
term you can probably get a formal definition.
>iirc machine code seems to get by purely on 'ifs' and assignments - would in
>theory a language be functional that only had these two functions (and
>presumably the ability to loop over the whole code, but not individual
>sections of it).
>
Google "oisc" or "one instruction set computer". Interesting
results.
--
to all the companies who wait until a large user base becomes
dependant on their freeware, then shafting said happy campers with
mandatory payment for continued usage. I spit on your grave.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
A rather minimal and funny language is Brainfuck :)
http://www.muppetlabs.com/~breadbox/bf/
Thies
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Thies Heidecke wrote:
> A rather minimal and funny language is Brainfuck :)
>
> http://www.muppetlabs.com/~breadbox/bf/
Yes, but if your not insane before learning it, you will be afterwards
--
Rick
Digital Printing
www.intelligence-direct.com
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |