00:04:45 -!- CakeProphet has quit ("haaaaaaaaaa").
00:11:42 -!- CakeProphet has joined.
00:16:55 <ihope> Ooh, the suspense.
00:17:16 <GregorR-L> if(in(a, a.type), {println("YAY");});
00:20:39 <ihope> I was hoping that it would ask if I wanted to decide on a class, race, gender and alignment or not.
00:22:14 <ihope> I have a little script thing called /dev/startnethack that's supposed to remount the filesystem as read-write and run NetHack.
00:22:28 <ihope> Then I put init=/dev/startnethack in my boot settings.
00:23:26 * ihope writes rw init=/usr/games/nethack
00:27:54 * ihope pops back to Linux to be greeted with "Who are you?"
00:28:24 <GregorR-L> /dev is sort of a bad place to put that ...
00:29:22 <GregorR-L> /dev/bin is sort of a bad place to put that ...
00:29:45 <GregorR-L> Well, /dev is generally a pseudofilesystem...
00:31:04 * ihope exits NetHack and is greeted with a kernel panic
00:31:12 <ihope> Or is that... hmm.
00:31:40 <pikhq> Well, duh. You tried killing init.
00:32:01 <pikhq> And, sadly, Linux doesn't handle that quite right.
00:32:15 <ihope> How am I supposed to shut down Linux from within NetHack, then?
00:38:00 <GregorR-L> Run it with a different program that just runs nethack then shutdown.
00:39:18 <ihope> Now, what if NetHack were an operating system? There'd be stuff like a portal to a web browser level...
00:39:24 <ihope> The lynx hits! The firefox hits!
01:00:26 -!- pgimeno has quit (Read error: 104 (Connection reset by peer)).
01:01:15 * ihope ipes over the ocean of error messages
01:13:46 -!- RodgerTheGreat_ has joined.
01:15:22 -!- RodgerTheGreat_ has quit (Read error: 104 (Connection reset by peer)).
01:15:52 -!- RodgerTheGreat_ has joined.
01:16:30 -!- pgimeno has joined.
01:39:11 * ihope tries booting into GHCi next
01:57:31 -!- RodgerTheGreat has quit (Nick collision from services.).
01:58:34 -!- RodgerTheGreat has joined.
01:59:17 -!- RodgerTheGreat has quit (Nick collision from services.).
02:00:21 -!- RodgerTheGreat has joined.
02:01:53 -!- RodgerTheGreat has quit (Nick collision from services.).
02:04:00 -!- RodgerTheGreat has joined.
02:06:03 <RodgerTheGreat_> this is what I get for leaving the computer in my room running without changing it to AFK first.
02:12:43 -!- tgwizard has quit (Read error: 110 (Connection timed out)).
02:13:47 <GregorR-L> No, this is what the rest of us get for you levaing the computer in your room without changing it to AFK first :-P
02:15:04 -!- RodgerTheGreat_ has quit (Read error: 104 (Connection reset by peer)).
02:15:20 -!- RodgerTheGreat_ has joined.
02:16:55 -!- RodgerTheGreat_ has quit (Read error: 104 (Connection reset by peer)).
02:17:37 -!- RodgerTheGreat_ has joined.
02:18:27 -!- RodgerTheGreat_ has left (?).
02:19:04 -!- jix has quit ("Bitte waehlen Sie eine Beerdigungnachricht").
02:35:54 -!- wooby has quit (Read error: 110 (Connection timed out)).
02:46:24 -!- calamari has joined.
02:47:37 <GregorR-L> if(in(A, B.type), { println("It's an A!"); });
02:48:18 <calamari> hey Gregor.. have a flex question for you..
02:48:32 <calamari> does it automatically read from stdin, or do I need to feed it somehow?
02:49:34 <GregorR-L> I think if you just run yyparse(), it's from stdin...
02:55:57 <GregorR-L> It's a functional/imperative/oo hybrid.
02:57:35 <calamari> functional languages confuse me
02:58:19 <GregorR-L> Well, "Plof attempts to be usable as a functional programming language, but without alienating imperative programmers."
02:59:51 <calamari> hmm.. is that code adding a function to a list?
03:00:35 -!- RodgerTheGreat_ has joined.
03:01:06 <GregorR-L> And it adds a function to the object, yes.
03:01:20 <GregorR-L> Then it makes B, which is derived from A, so B.type includes A.
03:01:42 -!- RodgerTheGreat has quit.
03:01:56 -!- RodgerTheGreat_ has changed nick to RodgerTheGreat.
03:33:53 <GregorR-L> lament: Problem Exists Between Chair and Keyboard [sic, PEBKAC]
03:43:16 <GregorR-L> http://www.cafepress.com/donotputthebaby < The T-shirts you should buy
03:43:54 <RodgerTheGreat> it doesn't have mine yet. I'll wait for the next revision.
03:45:44 <GregorR-L> I've been thinking I'll need to put fewer on.
03:45:52 <GregorR-L> It's hard to tell what's going on on the 40 one.
03:52:04 <calamari> well, 6 if you count the 90 cent stamps
03:53:15 <GregorR-L> "The 40 one" = "the t-shirt with 40 images"
04:04:39 -!- GregorR-L has quit ("Leaving").
04:34:47 -!- calamari has quit ("Leaving").
04:46:26 -!- anonfunc has joined.
04:52:46 -!- ihope has quit (Read error: 110 (Connection timed out)).
05:05:27 -!- RodgerTheGreat has quit.
06:01:29 -!- pgimeno has quit (Read error: 104 (Connection reset by peer)).
06:03:56 -!- calamari has joined.
06:17:19 -!- pgimeno has joined.
06:18:45 -!- ivan` has quit (" HydraIRC -> http://www.hydrairc.com <- 100,000+ downloads can't be wrong").
06:21:49 -!- anonfunc has quit.
06:24:33 -!- ivan` has joined.
06:32:03 -!- calamari has quit ("Leaving").
07:15:20 -!- Arrogant has joined.
07:59:34 <CakeProphet> !bf ++++>++++++++++++++++++++++++++++++++++++++++++++++++++++++++<[>.<-]
07:59:51 <CakeProphet> !bf ++++>+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++<[>.<-]
07:59:59 <CakeProphet> !bf ++++>+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++<[>.<-]
07:59:59 -!- clog has quit (ended).
08:00:00 -!- clog has joined.
08:00:26 <CakeProphet> !bf ++++++++++++++++++++++++++++++++++++++++++>,[>.<-]
08:02:00 <EgoBot> help ps kill i eof flush show ls bf_txtgen usertrig daemon undaemon
08:02:02 <EgoBot> 1l 2l adjust axo bch bf{8,[16],32,64} funge93 fyb fybs glass glypho kipple lambda lazyk linguine malbolge pbrain qbf rail rhotor sadol sceql trigger udage01 unlambda whirl
08:02:18 <EgoBot> fffffffffffffffffffffffffffffffffffffffffffffffffuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuccccccccccccccccccccccccccccccccccccccccccccccccckkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkfffffffffffffffffffffffffffffffffffffffffffffffffuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuccccccccccccccccccccccccccccccccccccccccccccccccckkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
08:03:43 <EgoBot> help ps kill i eof flush show ls bf_txtgen usertrig daemon undaemon
08:03:44 <EgoBot> 1l 2l adjust axo bch bf{8,[16],32,64} funge93 fyb fybs glass glypho kipple lambda lazyk linguine malbolge pbrain qbf rail rhotor sadol sceql trigger udage01 unlambda whirl
08:03:54 <EgoBot> Use: ls [dir] Function: list a directory in the pseudofilesystem
08:04:24 <EgoBot> Use: eof <pid> Function: send EOF to a process
08:04:36 <EgoBot> Use: flush Function: flush the output buffer, discarding any current output
08:13:14 -!- _jol_ has joined.
08:44:06 <Razor-X> Good job shouting out expletives *makes thumbs up sign*.
08:45:50 <Razor-X> And making ineffecient programs :P
08:51:20 <Razor-X> Is there any reccomended programming style in Scheme?
08:51:43 <Razor-X> Since it has good imperative and functional elements, is any one of them preferred, or can you program either way, or what?
08:55:40 -!- _jol_ has quit ("leaving").
08:59:19 <CakeProphet> Razor-X, Doesn't matter... although it's pretty function...
08:59:33 <CakeProphet> You can customize on it a ton with functions.
09:00:07 <Razor-X> Yeah... you can customize it with functions but.....
09:00:17 <Razor-X> You know, functional, imperial? Internal state?
09:01:56 <Razor-X> That's why I liked Haskell. At least it keeps you in one paradigm :P
09:09:16 <Arrogant> Razor-X, Scheme tends to emphasize functional, but does allow for state modification with a number of functions, often suffixed with a "!"
09:09:53 <Razor-X> I'm comfortable programming both ways, but I wonder if I should be ``functional until I have to''.
09:10:46 <Arrogant> Razor-X, be functional as long as it is reasonable, I'd say.
09:10:58 <Arrogant> I think Haskell goes beyond reasonable.
09:11:19 <Razor-X> I've gotten used to Haskell quite a bit though, so I can easily emulate state in a purely functional form.
09:11:46 <Razor-X> Well, there's only one jam I really came up with (multithreading two different functions that depend on one independant state).
09:21:19 -!- ivan` has quit (Read error: 104 (Connection reset by peer)).
09:26:07 -!- ivan` has joined.
10:13:42 -!- smokecfh has joined.
10:14:03 <Razor-X> Mmmm. This BF interpreter in the making should be easy to convert into a DBF interpreter when the time comes.
10:35:43 -!- CXI has joined.
10:46:45 -!- _jol_ has joined.
11:04:38 -!- _jol_ has quit ("leaving").
11:18:12 -!- CXI has quit ("If you're reading this, it's probably xchat's fault.").
12:20:39 -!- Arrogant has quit ("Leaving").
12:23:46 -!- smokecfh has quit (Remote closed the connection).
12:47:12 -!- jix has joined.
13:11:36 -!- tgwizard has joined.
13:29:12 -!- ihope has joined.
13:44:52 -!- ihope has quit ("http://tunes.org/~nef/logs/esoteric/06.08.09").
14:42:49 -!- RodgerTheGreat has joined.
16:09:27 -!- GreyKnight has joined.
16:10:05 * pikhq makes out with his graphing calculator. . .
16:38:19 -!- _jol_ has joined.
17:15:47 -!- _jol_ has quit ("leaving").
18:41:07 -!- GreyKnight has quit (".").
20:19:15 <pikhq> I stopped a while ago; seems saliva + batteries = pain.
20:19:41 <Razor-X> Good job *makes thumbs up sign*!
20:20:29 <Razor-X> RodgerTheGreat: Soon, your Java interpreter for DBF will not stand alone!
20:20:54 * pikhq should totally make a DBF compiler
20:22:32 * GregorR should totally make EgoDBF
20:22:48 <pikhq> Not even one that compiles directly to machine code?
20:22:55 <Razor-X> No, not DBF coders. We won't touch DBF after the interpreters are done.
20:23:22 <GregorR> egobfc2m compiles to machine code ^^
20:23:33 <Razor-X> Well, this was originally meant to be a BF interpreter, but it should be trivial to extend this to DBF.
20:23:41 * pikhq really should figure out how to do machine code. . .
20:24:00 <GregorR> pikhq: First you get gcc, then you get gobjdump :P
20:24:06 <pikhq> Meh. I'll write the DBF compiler in Tcl, since I'm really good at it. . .
20:24:32 <Razor-X> I could've written a DBF interpreter in Ruby or Haskell (or maybe even C) but that would take out the fun.
20:24:36 <pikhq> Maybe I'll just have it output ASM, and rely on gas to assemble it (like, I believe, GCC does?)?
20:24:57 <Razor-X> This is going to be a weird functional-imperative hybrid interpreter thing.
20:25:45 <pikhq> Or I'll be lazy and compile to C. :p
20:25:56 <Razor-X> Oh, and this is also Object Oriented.
20:26:18 <Razor-X> Functional, Imperative, OO. Fun.
20:27:16 * pikhq is already being crazy, and thinking of ways to optimise the compiler. . .
20:28:15 <Razor-X> This isn't going to be too optimized. Just a expand-as-needed tape.
20:28:23 <Razor-X> But I mean, that's all you really need.
20:28:44 <pikhq> Maybe get it to run each loop, and test to see if it does something which can be more easily summed up in a simple C instruction?
20:29:28 <pikhq> Like, instead of [>-<+], it'd do *p=*(p++);*(p++)=0;?
20:30:10 <Razor-X> That's incredibly trivial, come on.
20:30:20 <Razor-X> You can write that in sed in a few minutes.
20:31:15 <pikhq> A highly optimising DBF->C compiler. . .
20:32:05 <Razor-X> This is going to be odd. It's going to compile BF to its own language and then interpret it.
20:32:12 <Razor-X> So it's like a compiler/interpreter.
20:32:46 <pikhq> Mine's going to interpret little bits of it in order to try and optimise it. . .
20:33:26 <Razor-X> Have fun! *makes thumbs-up sign*
20:34:42 <Razor-X> I guess I forgot the ASCII code for newline :(.
20:35:43 <pikhq> Come on, newline, damn you!
20:35:56 -!- cmeme has quit ("Client terminated by server").
20:36:28 -!- cmeme has joined.
20:36:41 <pikhq> I assure you, it's ASCII 10.
20:37:12 <pikhq> And LF is \n, or newline.
20:37:47 <Razor-X> I believe the internet works on CR/LF basis.
20:38:26 <Razor-X> !bf +++++[>++>+++<<-]>.>--.
20:38:45 <pikhq> It's Windows that does CR/Lf.
20:38:55 <Razor-X> No, the internet uses CR/LF.
20:39:23 <lindi-_> Razor-X: you mean HTTP 1.0?
20:39:28 <Razor-X> Meaning that it's accepted as a general standard that a newline in a TCP stream is CR/LF.
20:39:37 <Razor-X> If it makes you feel happy to be pedantic :P.
20:39:50 <pikhq> !bf ++++++++++++++++[>++<-]>.<++++++++++.
20:39:53 <lindi-_> Razor-X: no it's not, i just wrote a daemon that wants unix style newlines
20:40:10 <pikhq> Razor-X: It's only the Windows world that does CR/LF.
20:40:23 <pikhq> In general, Internet protocols use LF.
20:40:44 <lindi-_> pikhq: can you name a few?
20:40:49 <pikhq> RodgerTheGreat: It's only Windows that uses LF. . . Everyone else uses either LF or CR (old-style makes).
20:40:56 <pikhq> lindi-_: Unix style newline is LF.
20:40:57 <Razor-X> Line-translation specifies how end-of-line characters will be translated when reading or writing to the socket. If this is unspecified or #f, then lines will be terminated by cr-lf, which is the standard for most internet protocols.
20:41:12 <lindi-_> pikhq: i mean, can you name a few such protocols
20:41:53 <pikhq> http://en.wikipedia.org/wiki/Newline Have fun.
20:42:15 <RodgerTheGreat> I'm going to continue supporting Razor-X here. Wether you guys like it or not, WinDOS is the standard, and as such, CR/LF is the most common form of a newline.
20:42:20 <Razor-X> Plus, when I wrote my IRC bot, Haskell uses the local LF as a newline, but a CR used to creep in the protocol.
20:42:45 <Razor-X> I had to make sure the trailing CR was taken out when writing the bot.
20:44:11 <lindi-_> pikhq: the page you linked has "Most textual Internet protocols ... use of ASCII CR+LF"
20:44:22 <lindi-_> pikhq: and not LF as you said :/
20:45:34 <pikhq> lindi-_: Who the hell decided "Oh, hey! Let's use Windows and DOS's specs, instead of the other OS's specs, which drives our network!"
20:45:49 <Razor-X> pikhq: It's not ``who the hell'', it's actually a pretty smart reason.
20:45:52 <pikhq> After all, that decision was sort-of made before DOS and Windows were on the Internet. . .
20:45:56 <Razor-X> I believe the reason was decided even before Windows came.
20:46:12 <pikhq> Razor-X: What? Using CRLF when everyone on it used LF?
20:46:22 <pikhq> Somehow, that doesn't make sense.
20:46:25 <Razor-X> If you read the Project Gutenberg FAQ, the reason CR/LF was chosen is because UNIX based machines used CR and Apple based machines used LF.
20:46:43 <Razor-X> Therefore you generate a newline on *both* platforms, only with an extraneous character.
20:47:08 <Razor-X> It was designed for portability in applications, IIRC.
20:48:07 <RodgerTheGreat> I'm think the teletype control-codes thing is more likely it originally happened, but I can believe that PG did it for that reason.
20:48:26 <Razor-X> PG did it for cross compatibility, yeah.
20:48:41 <Razor-X> That way newlines work for all three platforms at once.
20:49:12 -!- lindi-_ has changed nick to lindi-.
20:49:25 <Razor-X> Better than no newlines :P.
20:49:34 <lindi-> i'm not sure about that
20:49:43 <lindi-> at least the user would notice that the file is broken
20:50:04 <lindi-> now the file can look ok but still utilities can fail to parse it
20:50:04 <Razor-X> Well, the only thing you would get is a trailing \r or \p on Linux or Mac machines.
20:50:36 <Razor-X> Well, if you're parsing it, yeah you'll have to substitute out the extraneous character.
20:51:13 <Razor-X> But you know that no-one will agree on a standard (I like LF only because it's a lower number, and it's only one character, so you keep size down to a minimum).
20:51:59 <pikhq> Razor-X: LF is UNIX, CR is old Apple.
20:52:25 <pikhq> Now, it's only CRLF (Windows) and LF (everyone else). . .
20:52:25 <Razor-X> It's another one of those Useless Holy Wars :D.
20:53:39 <pikhq> CRLF hearkens back to the days of paper terminals. . .
20:54:25 <pgimeno> why o why didn't the ASCII code designers add a "line terminator" character?
20:54:37 <Razor-X> Yeah, I was thinking the same thing -_-''.
20:55:02 <Razor-X> They added ETX, but everyone uses their own EOF instead of ETX.
20:55:24 <pikhq> All I know is that Unicode has fixed that. . .
20:55:38 <pgimeno> and why is LF the UNIX line terminator and CR the code generated by the Enter key?
20:55:42 <Razor-X> Thing is, people add things because they feel like it, and people then defend it to the death because it becomes their religion.
20:56:01 <Razor-X> Code generated by the Enter key *should* be EOT.
20:56:26 <pikhq> By simply stating that all Unicode implementations must accept LF, CR, LF, NEL (Next Line), FF (Form Feed), Ls (Line Seperator), and PS (Paragraph Seperator) as newlines. ;)
20:56:39 <lindi-> pgimeno: what do you mean it is generated by enter key?
20:56:46 <lindi-> pgimeno: keyboard does not know about ASCII afaik
20:57:07 <pgimeno> lindi-: well, most systems translate the ENTER keycode into CR
20:57:25 <pikhq> lindi-: The BIOS can either translate to ASCII or leave as seperate keycodes, though.
20:58:08 <pgimeno> good ol' INT 16h returned CR for Enter
21:00:29 <pgimeno> pikhq: heh, I've just found http://www.w3.org/TR/newline
21:23:05 <CakeProphet> Does assigning a pre-existing variable a new value cut down on memory costs?
21:23:21 <CakeProphet> Like.. instead of making a new variable.. you replace an old one?
21:26:19 <pikhq> It's better to just use descriptive variable names.
21:26:31 <pikhq> They're there for your sanity's sake, after all. . .
21:29:00 <Razor-X> Cool, so the base is pretty much done. Time to make a parser.
21:29:15 * pikhq might want to actually work on his idea. . .
21:29:30 <Razor-X> CakeProphet: ... Yeah, it's even cheaper to directly reference function results.
21:29:47 <Razor-X> The more variables you use, the more beginner-ish your program looks.
21:32:28 <CakeProphet> Oh... you mean just put the function in the variable rather than giving its own variable?
21:32:56 <Razor-X> You probably can do it even less.
21:32:59 * CakeProphet tries to recycle his variables in clever ways.
21:33:09 <Razor-X> Code in Haskell and you'll really realize that you very rarely need variables at all.
21:33:26 <Razor-X> (Since Haskell doesen't give you variables.)
21:33:30 <CakeProphet> Hard to imagine... but I can see what you mean.
21:33:50 <CakeProphet> Well... it uses function arguements... which are a kind of "variable".
21:34:56 <Razor-X> They're local bindings, since they're scope expires outside of the local chunk of code.
21:35:56 <Razor-X> Yep. Now to write the parser for BF, and when I know that works, I'll simply extend the parser for DBF and all should work out fine.
21:37:43 <CakeProphet> It would seem that local bindings would require memory... since the computer needs to recognize that the variable is only usable in a certain chunk.
21:39:14 <Razor-X> But unless you redefine the definition of a function parameter that seems more-or-less universal in all computer languages, you're going to need those bindings *anyways*.
21:39:38 <Razor-X> But in actuality, I'll be going to a stupid place that talks about Indian property, and then I have to do my Japanese words for the day, and finish off some more of my summer homework. *Then* I can come back and write the parser.
21:43:03 <CakeProphet> Too bad you can't save memory by somehow creating a single variable that holds multiple values.
21:43:38 <CakeProphet> But arrays use about the same amount of memory as multiple variables right?
21:44:39 <Razor-X> I would think they take up more memory than an array, seeing how they're all cons'ed to each other, but I'm not sure.
21:56:34 -!- sexteddy has joined.
21:56:55 -!- sexteddy has left (?).
22:10:05 <CakeProphet> I'm going to create a BF parser in Python...
22:10:19 <CakeProphet> and then... with that BF parser... construct a Python interpreter.
22:10:38 * pikhq thinks about how to design his little interpreter for the purpose of optimisation. . .
22:11:17 <CakeProphet> Use a single variable instead of an array.
22:12:18 <pikhq> I want to use an interpreter function to be able to run each loop in some Brainfuck code so that it can see what each loop does to the array.
22:13:18 * CakeProphet wishes he had a way to quickly see every variable in every state change of a program.
22:13:35 <lindi-> CakeProphet: odb does that
22:13:35 <pikhq> So that instead of doing several lines to get "32" in the array, it could do, say, "*p=(*p)*5;". . .
22:14:20 <pikhq> If this could be done, it'd make optimising the output code very efficient.
22:14:37 <CakeProphet> Use a series of integers bound to a single variable... that'll save you like what... 4 bytes?
22:14:59 <pikhq> No, instead of the more direct translation of +++++[>+++++<-]. . .
22:15:18 <pikhq> It's a DBF compiler.
22:15:41 <pikhq> Examine the code before doing a braindead compilation, so that it can do a much smarter compilation.
22:16:20 <CakeProphet> It could count the repetitions of something before actually doing anything.
22:16:43 <CakeProphet> Keep reading until a symbol change... count out the number of same symbols... and then perform them all at once? Would that be more efficient?
22:17:34 <CakeProphet> symbol change... there were 3 +'s... so perform them now.
22:17:56 * CakeProphet was roleplaying a computer program... freaky... :P
22:18:27 <CakeProphet> And then doing something special for loops
22:20:11 <CakeProphet> Hmmm... for loops it could take the value of the current cell, scan over the loop, then multiply the values of each operation by three... no idea how that's more efficient (at all) but it sounds neato.
22:20:33 <CakeProphet> By "three" I mean to say "The value of CurrentCell"
22:20:39 <RodgerTheGreat> in order to optimize a program, you'd have to identify higher-level constructs. A useful step could be to replace all >> and < with references to variables
22:21:42 <RodgerTheGreat> but, for example, you'd want the compiler to identify an entire multiply construct, and just replace it with an instruction to load that value into memory
22:22:08 <RodgerTheGreat> several compilation passes would probably be the best way to do it.
22:22:37 <CakeProphet> Instead of readining it symbol-for-symbol... incrementing the pointer too many times... it could just read << and <<< as the variables themselves.
22:23:00 <RodgerTheGreat> "break it up", (rather than down) into a higher-level language until you have something that can be more efficiently turned into assembly.
22:23:38 <pikhq> I'm trying to get it to evaluate what each loop does, so that I can transform the stuff done by that loop into a higher-level construct. . .
22:24:03 <pikhq> At least, that's what I'm thinking about having it do.
22:24:03 <RodgerTheGreat> interestingly, really inefficient code would probably be the easiest to abstract into something C-like
22:24:08 <CakeProphet> I like the idea of just using three or four variables to do everything.
22:24:35 <pikhq> And having it replace > and < with variables would actually make it easy to evaluate. . .
22:25:58 <RodgerTheGreat> the actual conversion could get a bit tricky (because > and < represent relative addressing), but certainly not insurmountable
22:25:58 <pikhq> This could be a rather large project. . .
22:26:25 <RodgerTheGreat> you're effectively talking about making a BF disassembler.
22:26:33 <CakeProphet> array = 0000 point = 1 if CurrentSymbol == ">": poiner = pointer*10 if CurrentSymbol == "+": array = array + pointer
22:26:50 <pikhq> Once I've got this done, though, it could really kick ass.
22:27:23 <pikhq> I'll probably write it as a C/Tcl hybrid. . .
22:27:38 <CakeProphet> But then you have the problem of having values greater than 10... so that won't work right.
22:28:59 <pikhq> CakeProphet: I assure you: It's stupid trying to do everything in three or four variables.
22:29:19 <pikhq> Efficient, maybe, but it'll drive you insane, and I don't want to be the one maintaining the code after you.
22:30:09 <pikhq> In the real world, the programmer's spent time is much more important the computational time. . .
22:31:01 <CakeProphet> It's cool though.. like solving a puzzle ^_^
22:32:50 <pikhq> I simply must get this idea written.
22:34:46 <pikhq> This evaluator is going to be the hard part. . .
22:38:47 -!- CXI has joined.
22:40:09 <lament> i registered for university!
22:53:47 <GregorR> I'm getting no grants whatsoever this year X_X
22:54:30 -!- tgwizard has quit (Remote closed the connection).
22:55:56 -!- ihope has joined.
22:56:37 <ihope> What if I posted a programming language which consisted of copyright notices on the wiki? :-)
22:59:41 <pikhq> Let us join together to create the ultimate in Brainfuck compilers! :p
23:00:45 <CakeProphet> I just built a BF interpreter... well I'm working on it... and I need a quick way to convert shit into ASCII...
23:00:48 <ihope> This program is copyright (C) ihope 2072. This program is copyright (C) ihope 2101. This program is copyright (C) ihope 2108. This program is copyright (C) ihope 2108.
23:01:18 <ihope> CakeProphet: I know how to do it in C, and how to do it in Haskell...
23:01:31 <ihope> And probably Pascal, too.
23:01:45 <ihope> Nah, not Pascal. C and Haskell.
23:02:11 * pikhq would ideally like to make this Brainfuck implementation support a lot of different Brainfuck variants. . .
23:03:00 * pikhq has far too many ideas in his head
23:03:02 <pikhq> RodgerTheGreat: I know.
23:03:24 <pikhq> Likewise, BF can trivially be compiled into DBF. ;)
23:03:47 <pikhq> It's only a matter of stripping characters that are comments in BF but not DBF. ;)
23:05:35 -!- Sgeo has joined.
23:05:52 <CakeProphet> Now I'm trying to figure out how to use Python's encode method to encode input into a series of digits.
23:06:17 <ihope> A series of digits?
23:06:23 * pikhq is going to go out and design the overall architecture of this thing. . .
23:06:27 <ihope> What do you need series of digits for?
23:07:10 <CakeProphet> Okay... just so I know... in the traditional BF implementation... does , accept characters or just BF code?
23:07:57 <ihope> It usually accepts a character and puts its ASCII value into the cell, I think.
23:08:33 <CakeProphet> So that's what I'm doing... figuring out how to use Python's encode to encode text into an ASCII value.
23:11:45 <ihope> What does encode do, exactly?
23:12:34 <ihope> Hmm... apparently Python has ord() and chr() just like Haskell.
23:12:49 <ihope> ord() = character to integer, chr() = integer to character.
23:13:10 <pikhq> I'm going to have this compiler be slightly traditional in architecture: Frontends for the various BF variants, which compile into an intermediate language. Then, we run the optimisation routines on the intermediate code, and pass it through to the backends, which output the final code.
23:13:50 <pikhq> Seems a tried & true design, and makes for a clean architecture. . .
23:13:58 <CakeProphet> ihope, str() returns a string representation of whatever you put in it.... and int() returns an integer of something.
23:14:22 <ihope> Is str() like Haskell's show?
23:14:31 <ihope> What happens if you put a string into it?
23:14:46 <CakeProphet> I was just about to find out... as it might be my solution.
23:15:43 <CakeProphet> ValueError: invalid literal for int(): lol
23:16:56 <CakeProphet> str() is more flexible than int()... str() will pretty much return anything as a string.
23:24:25 <CakeProphet> | S.translate(table [,deletechars]) -> string
23:24:28 <CakeProphet> | Return a copy of the string S, where all characters occurring
23:24:30 <CakeProphet> | in the optional argument deletechars are removed, and the
23:24:31 <CakeProphet> | remaining characters have been mapped through the given
23:24:33 <CakeProphet> | translation table, which must be a string of length 256.
23:25:12 <ihope> Why not just use ord?
23:25:47 <CakeProphet> Hmmm.. oh.. Python has an ord function... but it might be an alias of int()
23:25:51 <ihope> You want to translate characters into numbers, don't you?
23:26:25 <CakeProphet> All those built-in functions I've never used throw me off guard.
23:29:38 <ihope> <ihope> Hmm... apparently Python has ord() and chr() just like Haskell.
23:30:10 <pikhq> If I were sufficiently insane, I could get this thing running, and make it target Brainfuck (thereby producing highly efficient Brainfuck code). :p
23:30:40 -!- CXI has quit (Connection timed out).
23:33:30 <EgoBot> /bin/bash: /opt/sablevm/bin/sablevm: No such file or directory
23:33:30 -!- CXI has joined.
23:34:49 <pikhq> 79 +++++++++++++++[>++++++>++++++++>+++++++>+++<<<<-]>------.>>-.---.<------.>.>+. [30]
23:37:17 * pikhq wonders what his intermediate language should look like. . .
23:38:35 <ihope> +15[>+6>+7>+3<4-]>-6.>2-.-3.<-6.>.>+.
23:39:51 <pikhq> And now we're back to the issue of how to write the optimising routines.
23:40:12 <pikhq> (although that alone should serve to optimise things a bit)
23:41:46 <pikhq> But I might as well at least try and get a simple frontend written.
23:42:43 <ihope> What sort of error?
23:42:46 <CakeProphet> Well... to make the array infinite.. I attempted to make it nest itself... :D
23:42:57 <CakeProphet> But... that apparently doesn't work in Python.
23:44:18 <ihope> Make it nest itself?
23:44:39 <CakeProphet> Well.. now that I think about it... that wouldn't work anyways.
23:44:44 <ihope> Sounds like generators you're after...
23:46:45 <CakeProphet> ihope, What's the standard size for a BF array?
23:47:01 <ihope> At least 30000 cells.
23:49:50 * CakeProphet makes the program print a list of 30000 0's for him.. so he doesn't have to.