News for hackers. Stuff that matters.
Re:One instruction set computer by arethuza on Thursday April 16, 2015 @04:57PM (#9390700)
At one point I was seriously fascinated by the lambda calculus and particularly the S and K combinators - two very simple functions that you can build any computation from:

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

More recently I found out about the U combinator which is a single combinator that can be used to define S & K:

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

Having a system that implemented recursion using the Y combinator in terms of S & K and have it actually compute stuff was rather amusing. I'd be fascinated to see what it would look like using just U.

Re:One instruction set computer by lisper on Thursday April 16, 2015 @05:03PM (#9390727)
It would look like a very (very!) long string of U's. :-)

You might enjoy this:

http://www.flownet.com/ron/lambda-calculus.html

Re:One instruction set computer by arethuza on Thursday April 16, 2015 @05:07PM (#9390753)
Actually, one of the many things I learned from doing a final year project for my CS degree on "benchmarking" different sets of combinators was how to write a garbage collector - I was doing this in '87/'88 on a Unix mini (HLH Orion) and memory was tight and my trees were comparatively huge!
Re:One instruction set computer by tome on Friday April 17, 2015 @03:34AM (#9392717)
Presumably a tree of U's.
Re:One instruction set computer by lisper on Friday April 17, 2015 @11:32AM (#9394924)
Oh, right. Good point.

It's worth noting, BTW, in case anyone is still following this thread, that what is going on here in all of these single-instruction languages is not particularly interesting. You're just encoding the program semantics in the arguments, or in the structure of the tree, or the length of the program, or something like that, rather than in the instructions.

Re:One instruction set computer by tptacek on Thursday April 16, 2015 @04:43PM (#9390653)
Here's a single-instruction computer built out of the page translation behavior of X86 processors:

http://events.ccc.de/congress/2012/Fahrplan/events/5265.en.h...

Re:One instruction set computer by gergoerdi on Thursday April 16, 2015 @09:38PM (#9391823)
If programming with just one instruction seems too low-level, I have just the solution for you! Now you can compile the user-friendly, high-level language of Brainfuck to this single-instruction machine!

http://gergo.erdi.hu/blog/2013-10-05-yo_dawg_i_heard_you_lik...

Re:One instruction set computer by SimonPStevens on Thursday April 16, 2015 @05:29PM (#9390842)
I wrote a little implementation of an OISC virtual machine many years ago [1]. Feel free to have a play. There are some sample 'one instruction assembler' programs in the test programs folder.

[1] - https://github.com/Creou/OISCVM

Re:One instruction set computer by j_baker on Thursday April 16, 2015 @05:31PM (#9390857)
I'm curious, is there any real-world application for this? Or is it mostly interesting from a research perspective?

It seems like this wouldn't perform very well in the real world for most applications, but I could see it being useful for very simple architectures.

Re:One instruction set computer by nulldozer on Thursday April 16, 2015 @06:03PM (#9391002)
My final year project was a hardware implementation of this. My group made an 8 core coprocessor and an OpenCL-like implementation complete with an LLVM IR to SUBLEQ translator. We actually got performance better than the proprietary NIOS II e soft processor on our image processing demo (Y colorspace conversion).
Re:One instruction set computer by jhallenworld on Thursday April 16, 2015 @08:41PM (#9391665)
Well it could be interesting as a test architecture for a new logic family as long as you have wide memory.

The Manchester Baby was the first programmable electronic computer and was close to a single instruction computer. It can emulate the single instruction computer with 5 of its 7 instructions: load, subtract, store, skip if negative and jump. The two extra instructions were halt and relative jump.

http://en.wikipedia.org/wiki/Manchester_Small-Scale_Experime...

Re:One instruction set computer by firebones on Friday April 17, 2015 @12:11AM (#9392224)
Side note: Douglas W. Jones was touting this [1] in a computer architecture class in the mid-1980s. Fun stuff. He later went on to do a lot of work with computerized voting [2][3]. Great instructor...

[1] http://homepage.cs.uiowa.edu/~jones/arch/risc/ [2] http://homepage.divms.uiowa.edu/~jones/voting/pictures/ [3] http://homepage.cs.uiowa.edu/~jones/voting/

Re:One instruction set computer by zem on Thursday April 16, 2015 @05:15PM (#9390797)
also my favourite wikipedia disambiguation page, for the sheer, entertaining unrelatedness of the items therein: http://en.wikipedia.org/wiki/OISC
Re:One instruction set computer by jhallenworld on Thursday April 16, 2015 @08:18PM (#9391585)
Re:One instruction set computer by cbrauchli on Friday April 17, 2015 @02:38AM (#9392549)
A fun challenge is to try to write a quine [http://en.wikipedia.org/wiki/Quine_(computing)] in an OISC.
Re:One instruction set computer by watmough on Thursday April 16, 2015 @05:12PM (#9390776)
The awesome WireWorld prime number calculating computer is also a one instruction computer.

http://www.quinapalus.com/wires10.html

Re:One instruction set computer by Chinjut on Thursday April 16, 2015 @05:39PM (#9390899)
How about the one instruction "RunInst a, b, c, d", whose behavior is defined as "Do the instruction described by parameter a in [your favorite architecture], upon parameters b, c, d"?
Re:One instruction set computer by baddox on Thursday April 16, 2015 @06:50PM (#9391203)
Yeah, the notion of "a single instruction" really doesn't mean a whole lot, just like how (in many languages) "a single line of code" doesn't mean much.
Re:One instruction set computer by jonsen on Thursday April 16, 2015 @07:02PM (#9391248)
Well, a long line of code could hold a lot of meaning.
Re:One instruction set computer by jonsen on Thursday April 16, 2015 @06:16PM (#9391059)
I think you just reinvented assemblerprogramming.
Re:One instruction set computer by spiritplumber on Thursday April 16, 2015 @11:09PM (#9392062)
OISC is something you sometimes get to build in EE labs, usually as the last project for that class. It's something that you can put together out of 7400s and, at least in our case, an eeprom for a lookup table. It's a fun thing to do and I recommend it.
Re:One instruction set computer by nemoniac on Friday April 17, 2015 @01:45AM (#9392430)
See also John Tromp's "interpreter for the simplest language possible"

https://tromp.github.io/cl/cl.html

Re:One instruction set computer by tsmith on Thursday April 16, 2015 @05:18PM (#9390807)
I always thought MADD (Multiply + Add) made a great candidate for a single instruction set computer, if the program counter was usable as an operand to the instruction.
Re:One instruction set computer by guava on Thursday April 16, 2015 @05:58PM (#9390976)
You will want a way of decreasing registers, hence the subtract parts of the single instruction sets.
Re:One instruction set computer by TheLoneWolfling on Thursday April 16, 2015 @09:41PM (#9391836)
If you've got fixed length registers you can subtract via addition or multiplication.