News for hackers. Stuff that matters.
Re:One instruction set computer by SimonPStevens on Wednesday September 28, 2011 @05:47AM (#3047147)
It's an interesting idea that pops up here every now and again. It's fairly useless as anything other than a toy/educational system though.

I wrote a little OISC virtual machine and assembler a while back. I got as far as adding interrupts to the system for keyboard input and console output before I stopped.

http://simonpstevens.com/projects/oiscvm

Source code is on githib:

https://github.com/simonpstevens/oiscvm

Re:One instruction set computer by 0x12 on Wednesday September 28, 2011 @06:27AM (#3047215)
Great to see you were busy with this.

Minimal architectures are interesting in their own right even if they don't have an immediate practical application, though I can think of some fields where they may be useful rather than merely a curiosity or a teaching aid.

I'll download your vm code and mess around with it some, thank you very much for posting the links.

Re:One instruction set computer by david_ar on Wednesday September 28, 2011 @08:28PM (#3050576)
There's something mildly fascinating about SUBLEQ - I got as far as designing a CPU for it a little while back.

http://da.vidr.cc/projects/subleq/

Re:One instruction set computer by arethuza on Wednesday September 28, 2011 @06:58AM (#3047271)
On the functional side of things you can get by with just the two combinators S and K:

http://en.wikipedia.org/wiki/SKI_combinator_calculus

You can define the Y combinator, and therefore recursion quite happily (if not very efficiently) using S and K.

I believe there are also approaches that use as single universal combinator - but I can't find any good references to these - I'd be quite interested to see definitions of S and K in terms of a single universal combinator.

Re:One instruction set computer by 0x12 on Wednesday September 28, 2011 @07:04AM (#3047287)
Re:One instruction set computer by arethuza on Wednesday September 28, 2011 @07:10AM (#3047302)
I thought that definition looked a bit like cheating - wrapping up S & K in a form that makes it straightforward to get back to them!

There is also a U combinator referenced on this page:

http://www.ucombinator.org/

as U = λ f . f(f) - haven't had time to sit down and actually work it through though.

[Edit: I notice that page says that U enables universal computation, not that it is sufficient.]

Re:One instruction set computer by 0x12 on Wednesday September 28, 2011 @07:15AM (#3047315)
Yes, I agree it is a bit cheating.

They recover the S and K by applying U to itself in interesting ways, but that's like saying 'this tool is so universal, you can use it as a hammer and a chisel by banging one instance of the tool with another tool just like it'.

That's not a very mathematical way of putting it I guess but I believe that is more or less the spirit of it.

Re:One instruction set computer by 0x12 on Wednesday September 28, 2011 @07:21AM (#3047333)
Re:One instruction set computer by bostonpete on Wednesday September 28, 2011 @01:16PM (#3048888)
Isn't this a bit of a misnomer? Wouldn't "one instruction computer" be more fitting? I mean, every computer has one instruction set...
Re:One instruction set computer by ableal on Wednesday September 28, 2011 @06:20AM (#3047202)
More of the same kind of amusement can be found on the esoteric languages page, which explains:

A Turing tarpit is a Turing-complete programming language whose number of commands, operators, or equivalent objects is very small. These include brainfuck (8 commands, all with 0 operands), OISC (1 command, 3 operands), and Thue (1 command, 2 operands).

http://en.wikipedia.org/wiki/Esoteric_programming_language#T...

Re:One instruction set computer by sambeau on Wednesday September 28, 2011 @06:20AM (#3047201)
It's always great to see Computing Theory posted to the HN homepage.
Re:One instruction set computer by FeministHacker on Wednesday September 28, 2011 @12:09PM (#3048571)
This is a personal favourite of mine, and actually one of the key moments in me and my girlfriend hooking up, strangely enough
Re:One instruction set computer by ctdonath on Wednesday September 28, 2011 @09:11AM (#3047653)
A recent prior discussion of OISC processors brought up another HN contributor's "Calculus Vaporis" https://github.com/kragen/calculusvaporis
Re:One instruction set computer by andrewcooke on Wednesday September 28, 2011 @08:01AM (#3047429)
all of those seem to take operands. is it possible to have a single instruction with no operands? alternatively, is it proven impossible?

[edit: langton's ant suggests so - http://en.wikipedia.org/wiki/Langtons_ant]

Re:One instruction set computer by jerf on Wednesday September 28, 2011 @10:33AM (#3048002)
Arguably, Rule 110 [1] fits the bill. Once you have your data, you just apply Rule 110 endlessly.

One could argue that one has merely embedded the actual operands into the data fed to Rule 110, and I would then observe that in the context of Turing completeness, there is a fundamental fuzziness between data and code that goes "all the way down". All your no-operands single-instruction can really be is "do it", with "it" specified by the data.

[1]: http://en.wikipedia.org/wiki/Rule_110

Re:One instruction set computer by wladimir on Thursday September 29, 2011 @02:23AM (#3051369)
Right, this is very interesting, you are effectively running the data and code intermingled instead of in different separate memory areas.

A fascinating thing about computing with rule 110 seems to be that it is inherently parallel, the "instruction" is applied to the entire memory area in lockstep. There is no control flow of any kind. So if you have static data you need to encode it as "idle" instructions.

I/O is an even more interesting problem...

Re:One instruction set computer by 0x12 on Wednesday September 28, 2011 @10:39AM (#3048047)
See the 'U' combinator link above, but it's a bit of a trick.
Re:One instruction set computer by abcd_f on Wednesday September 28, 2011 @12:31PM (#3048669)
Well, hello there. Lean Brainfuck is coming right up.