Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
One instruction set computer (wikipedia.org)
69 points by 0x12 on Sept 28, 2011 | hide | past | favorite | 18 comments


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


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.


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/


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.



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.]


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.



Isn't this a bit of a misnomer? Wouldn't "one instruction computer" be more fitting? I mean, every computer has one instruction set...


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...


It's always great to see Computing Theory posted to the HN homepage.


This is a personal favourite of mine, and actually one of the key moments in me and my girlfriend hooking up, strangely enough


A recent prior discussion of OISC processors brought up another HN contributor's "Calculus Vaporis" https://github.com/kragen/calculusvaporis


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]


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


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...


See the 'U' combinator link above, but it's a bit of a trick.


Well, hello there. Lean Brainfuck is coming right up.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: