POV-Ray : Newsgroups : povray.general : Programming languages Server Time
6 Nov 2024 00:28:04 EST (-0500)
  Programming languages (Message 1 to 8 of 8)  
From: Tom Melly
Subject: Programming languages
Date: 14 Oct 2004 17:31:08
Message: <416ef01c@news.povray.org>
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

From: Christopher James Huff
Subject: Re: Programming languages
Date: 14 Oct 2004 18:19:49
Message: <cjameshuff-971B4E.18194214102004@news.povray.org>
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

From: Mike Williams
Subject: Re: Programming languages
Date: 15 Oct 2004 01:26:45
Message: <xSuP7GAqx1bBFwQM@econym.demon.co.uk>
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

From: Daniel Hulme
Subject: Re: Programming languages
Date: 15 Oct 2004 03:53:06
Message: <20041015085306.2cc9a501@dh286.pem.cam.ac.uk>
> 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

From: Tom Melly
Subject: Re: Programming languages
Date: 15 Oct 2004 04:34:25
Message: <416f8b91$1@news.povray.org>
"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

From: povray
Subject: Re: Programming languages
Date: 15 Oct 2004 21:18:09
Message: <8mmvm0hfj9dqlhj4jbu99t7im0dlnik2vt@4ax.com>
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

From: Thies Heidecke
Subject: Re: Programming languages
Date: 17 Oct 2004 07:22:04
Message: <417255dc@news.povray.org>
A rather minimal and funny language is Brainfuck :)

http://www.muppetlabs.com/~breadbox/bf/

Thies


Post a reply to this message

From: Rick
Subject: Re: Programming languages
Date: 21 Oct 2004 06:47:26
Message: <417793be@news.povray.org>
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

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.