00:00:00 --- log: started forth/02.01.07 00:00:22 (this is a byte organisation brainfuck interpreter) 00:01:09 brainfuck knows 8 instructions 00:01:15 but is turing complete 00:01:44 its an amiga thing :P 00:01:48 amiga coders are cool heh 00:01:49 there exists a brainfuck interpreter, written in brainfuck 00:02:54 a bubblesort looks like this: 00:03:10 >>>>>,+[>>>,+]<<<[<<< 00:03:11 [>>>[-<<<-<+>[>]>>]<<<[<]>> 00:03:11 [>>>+<<<-]<[>+>>>+<<<<-] 00:03:11 <<]>>>[-.[-]]>>>[>>>]<<<] 00:04:09 this is a "hello, world!" program: 00:04:11 >+++++++++[<++++++++>-]<.>+++++++[<++++>-]<+.+++++++..+++.[-]>++++++++[<++++>-]< 00:04:11 .#>+++++++++++[<+++++>-]<.>++++++++[<+++>-]<.+++.------.--------.[-]>++++++++[<+ 00:04:11 +++>-]<+.[-]++++++++++. 00:05:26 this program lists the ascii char set: 00:05:28 .+[.+] 00:06:43 a file interface: 00:06:49 Read: 00:06:49 >+[>,] 00:06:49 Rewind: 00:06:49 <[<] 00:06:49 Write: 00:06:49 >>[.>] 00:06:59 ft what are all teh brainfuck functions ? 00:07:08 operators i mean 00:07:10 > increment pointer 00:07:16 < decrement pointer 00:07:29 + increment memory at pointer 00:07:36 - decrement mem at pointer 00:07:48 [ id mem at pointer = 0, jump to ] 00:07:59 (1 behind ]) 00:08:09 ] jump to [ 00:08:16 . output byte at pointer 00:08:32 , input byte, write to pointer (mem at pointer) 00:09:06 other chars in source ignored 00:09:21 cool 00:09:33 and what defines something as being turing complete ? 00:09:36 [-] : clear mem at pointer 00:10:18 that you basically can do everything what you can do with a turing complete machine 00:10:38 like, build a more complex machine like the one you use to build it with 00:10:43 what is a turing complete machine ? 00:10:49 oh 00:11:03 brainfuck is simple but can be used as a primative for something more complex 00:11:15 pity you ant modularize brainfuck code heh 00:11:30 no function calls etc heh 00:11:36 speed is not brainfuck's strong side 00:12:32 [->+<] move [pointer] to [pointer+1] 00:13:15 better, add [pointer] to [pointer+1], and clear [pointer] in that process 00:13:44 brainfuck needs a call operator 00:13:48 and a return 00:13:59 just linear code 00:14:03 i know 00:14:09 nope ... 00:14:14 imagine writing windows in brainfuck ??? heh 00:14:18 !!!!!!!!!!!!!!!!! 00:14:19 you got a loop construct ! 00:14:21 maybe they did! 00:14:26 LOL 00:15:13 it is funny to see a bf program, when running on the simple interpreter, actually do something ... 00:15:21 heh 00:15:22 magic 00:15:35 i just thunked of something 00:15:42 a realy cool competition 00:15:54 invent a turning complete language smaller than brainfuck! 00:16:24 terms of compiler/interpreter size, or number of operators ? 00:16:31 both 00:16:35 well 00:16:43 smallest bf interpreter i know is about 170 bytes 00:16:57 for linux 00:17:24 linux elf executable ! 00:17:33 heh 00:18:07 asm written 00:18:12 not c 00:18:17 yea 00:18:23 prolly assembled with nasm 00:18:25 you guessed so ? 00:18:30 true 00:18:31 i guessed so 00:19:02 hey you CAN do functions in brainfuck! 00:19:11 you just have to wrap them up in something 00:19:19 each function goes in its own source file 00:19:25 which can be compiled 00:19:27 8 functions 00:19:59 1 byte per function 00:20:02 or even a NIBBLE!!! 00:20:30 would have to have a way to return a value to teh wrapper thoi 00:20:33 like bash 00:20:56 have bash execute brainfuck interpreter on file specified in the source :) 00:21:28 better than bytecode. each operation can be encoded in 3 bits 00:21:35 ya 00:21:43 but i said nibble for simplicity 00:22:10 but compiled brainfuck would be ultra small :) 00:23:05 from source of a bf program: 00:23:12 Believe it or not this language is indeed Turing complete! 00:23:12 Combines the speed of BASIC with the ease of INTERCAL and 00:23:12 the readability of an IOCCC entry! 00:23:14 " 00:24:43 compute prime numbers is about 4.4 kb 00:25:35 factoring of an arbitrarily large positive integer is 5.8 kb 00:26:28 i gtg zzz dood 00:26:34 its 3:30 here 00:26:35 am 00:26:41 and im brainfucked heh 00:27:03 --- nick: I440r_ -> I440r 00:27:10 g'd nite 00:27:26 --- mode: ChanServ set mode: +o clog 00:27:33 --- mode: ChanServ set mode: +o Speuler 00:27:39 --- mode: ChanServ set mode: +o aaronl 00:27:45 nite nite :) 00:28:00 --- quit: I440r ("Trillian (http://www.ceruleanstudios.com)") 02:18:41 --- quit: aaronl ("The name's X. Bitch X.") 02:21:37 --- join: aaronl (aaronl@vitelus.com) joined #forth 08:49:47 --- join: Fare (fare@samaris.tunes.org) joined #forth 08:49:48 --- quit: Speuler (Read error: 104 (Connection reset by peer)) 12:11:04 --- mode: ChanServ set mode: -o clog 17:13:25 * aaronl is away: I'm busy 18:19:56 --- join: I440r (mark4@pool-63.52.218.26.ipls.grid.net) joined #forth 18:36:42 * aaronl is back (gone 01:23:16) 18:48:30 --- quit: aaronl (Read error: 113 (No route to host)) 18:48:34 --- join: aaronl (aaronl@vitelus.com) joined #forth 18:56:19 * aaronl is away: dinner 19:01:08 --- join: I440r_ (mark4@pool-63.52.217.18.ipls.grid.net) joined #forth 19:02:00 --- quit: I440r (Read error: 60 (Operation timed out)) 19:03:14 --- quit: Fare (Remote closed the connection) 19:47:21 * aaronl is back (gone 00:51:02) 20:16:17 --- join: futhin (thin@24.66.212.245) joined #forth 20:17:30 heheh 20:30:32 --- quit: futhin () 20:42:56 --- quit: I440r_ ("Trillian (http://www.ceruleanstudios.com)") 20:51:28 --- join: Xuz (aemerson@bgp01079860bgs.wanarb01.mi.comcast.net) joined #forth 20:51:35 --- mode: ChanServ set mode: +o Xuz 21:02:32 * aaronl is away: bed 22:34:00 --- join: futhin (thin@24.66.212.245) joined #forth 22:34:04 hi xuz 22:36:23 i should buy thinking forth. that's what i should do. 22:36:24 bye 22:36:25 --- quit: futhin (Client Quit) 23:02:50 --- quit: Xuz ("ircII EPIC4-0.9.16 -- Are we there yet?") 23:59:59 --- log: ended forth/02.01.07