![]() |
![]() |
| Paypal | FTP | CCD | Buscar | Trucos | Trabajo | Foros |
|
#5
|
||||
|
||||
|
Ahora es el turno de un interprete de Brainfucker
La wikipedia define este lenguaje de la siguiente manera: Cita:
http://es.wikipedia.org/wiki/Brainfuck (Español) http://en.wikipedia.org/wiki/Brainfuck (Ingles) Ahora que ya sabemos algo sobre el Brainfucker, vamos con su interprete: Ya tenemos nuestro flamante interprete de Brainfucker, pero haciendo honor a su nombre, es jodidamente complicado programar en este lenguaje . Así que sera mejor que pongamos algunos ejemplo para probarlo.El hola mundo: Código:
++++++++++ [>+++++++>++++++++++>+++>+<<<<-] The initial loop to set up useful values in the array >++. Print 'H' >+. Print 'e' +++++++. Print 'l' . Print 'l' +++. Print 'o' >++. Print ' ' <<+++++++++++++++. Print 'W' >. Print 'o' +++. Print 'r' ------. Print 'l' --------. Print 'd' >+. Print '!' >. Print newline Código:
>++++++++++>+>+[
[+++++[>++++++++<-]>.<++++++[>--------<-]+<<<]>.>>[
[-]<[>+<-]>>[<<+>+>-]<[>+<-[>+<-[>+<-[>+<-[>+<-[>+<-
[>+<-[>+<-[>+<-[>[-]>+>+<<<-[>+<-]]]]]]]]]]]+>>>
]<<<
]
This program doesn't terminate; you will have to kill it.
Daniel B Cristofani (cristofdathevanetdotcom)
http://www.hevanet.com/cristofd/brainfuck/
Código:
>>>>+>+++>+++>>>>>+++>>+[
-,[----------[---[+<++++[>-----<-]+>[<+>--------[<+>-
[--->>+++++++++++++[<<[-<+>>]>[<]>-]<<
[+>+++++[<-------->-]<[<+>-]]]]]]]]
<
[<<++[>>>>>>>>>>>+<<<<<<<<<<<-]<<+>+>+>>>+>+>>+>+<<<<<-
[<<+>>>+>+>>>+<<<<<-
[<<<<+>>->>>>->>+<<<<-
[<<<<->+>>>>->>>->-<<<<<-
[<<<->>>>+<-
[<<<+>>>>->+>>+<<<<-
[<<<<+>->+>>>+>>>>+<<<<<-
[<<->>>->->>>-<<<<<-
[<<<<->+>>>>+>+>>>+<<<<<-
[<<<<+>>>>>>-<<-
[<<+>>>->>>>-<<<<<-
[>+>>>->+<<<<<-
[>>+<<-
[<<<->->>>->->>+<<<<-
[<<<+>+>>>+>+<<-
[>->-<<-
[<<->>>+>+<<-
[<<+>>>>>>->-<<<<<-
[<<<<->>->>-
[<<<<+>>>>>>>>+<<<<-
[<<<<->>+>>>>>>>+<<<<<-
[>->>>-<<<<-]]]]]]]]]]]]]]]]]]]]]
>[[<<<<<<<<<<<+>>>>>>>>>>>-]>]+>>>>>>>+>>+<]>
]<<[-]<[-[>>>>+<<<<-]]<<<<<<++<+++<+++[>]<[
>>>>>++++++++[<++++++<++++>>-]>>>[-[<+<<<<.>>>>>-]]<<+<<-<<<<[
-[-[>+<-]>]>>>[.[>]]<<[<+>-]>>>[<<-[<++>-]>>-]
<<[++[<+>--]>+<]>>>[<+>-]<<<<<<<<
]>>>>>++++++++++.>+[[-]<]<<<
]
[Enter a number using ()-./0123456789abcdef and space, and hit return.
Daniel B Cristofani (cristofdathevanetdotcom)
http://www.hevanet.com/cristofd/brainfuck/]
PD: La función de entrada ',' no termina de convencerme como esta implementada, si alguien se anima a mejorarla ... Última edición por seoane fecha: 15-03-2007 a las 17:40:53. |
| Herramientas | Buscar en Tema |
| Desplegado | |
|
|
Temas Similares
|
||||
| Tema | Autor | Foro | Respuestas | Último mensaje |
| Utilidad para comparar dos bases de datos. | avmm2004 | Varios | 1 | 16-11-2006 20:47:22 |
| Utilidad para contar lineas de código | Alexander | Varios | 10 | 18-10-2006 00:14:55 |
| Utilidad para manejo de lista TODO | ANG4L | Varios | 3 | 02-08-2006 09:36:39 |
| Cual es la utilidad de la paleta Server | Gelmin | Servers | 1 | 05-03-2004 22:20:36 |
| utilidad del application.tag | Giniromero | OOP | 8 | 17-10-2003 12:21:53 |
|