< 1166918438 0 :ihope!unknown@unknown.invalid PRIVMSG #esoteric :What's the difference, then? < 1166918465 0 :oerjan!unknown@unknown.invalid PRIVMSG #esoteric :static variables are not deallocated when the function returns, but kept the same for all invocations < 1166918471 0 :pikhq!unknown@unknown.invalid PRIVMSG #esoteric :fizzie: That'd be 640k, not 64k. < 1166918513 0 :ihope!unknown@unknown.invalid PRIVMSG #esoteric :What if the function calls itself? < 1166918525 0 :fizzie!unknown@unknown.invalid PRIVMSG #esoteric :ihope; You get a new instance of the automatic variable. < 1166918533 0 :fizzie!unknown@unknown.invalid PRIVMSG #esoteric :pikhq; 64k is a very common limit, too, since it's a single memory page. < 1166918536 0 :ihope!unknown@unknown.invalid PRIVMSG #esoteric :If it's a static variable? < 1166918548 0 :oerjan!unknown@unknown.invalid PRIVMSG #esoteric :only one version < 1166918559 0 :fizzie!unknown@unknown.invalid PRIVMSG #esoteric :pikhq; Er, I mean, segment. < 1166918578 0 :oerjan!unknown@unknown.invalid PRIVMSG #esoteric :a static variable is like a global variable, except that it doesn't clutter the global namespace < 1166918599 0 :pikhq!unknown@unknown.invalid PRIVMSG #esoteric :fizzie: I thought MS-DOS used the x86 CPU with what amounts to a flat memory model. < 1166918624 0 :pikhq!unknown@unknown.invalid PRIVMSG #esoteric :(I could be absolutely wrong, and in all probability am) < 1166918633 0 :fizzie!unknown@unknown.invalid PRIVMSG #esoteric :Err, no? Why would there be the 640k limit, then? < 1166918698 0 :pikhq!unknown@unknown.invalid PRIVMSG #esoteric :ACTION uses his external brain attachment (Wikipedia) to sound like less of an idiot < 1166918714 0 :fizzie!unknown@unknown.invalid PRIVMSG #esoteric :DOS programs, of course, can run in protected mode, with a 32-bit flat memory model. < 1166918812 0 :pikhq!unknown@unknown.invalid PRIVMSG #esoteric :You're right. < 1166918825 0 :pikhq!unknown@unknown.invalid PRIVMSG #esoteric :I'm no assembly expert. ;) < 1166918853 0 :oerjan!unknown@unknown.invalid PRIVMSG #esoteric :ACTION suddenly wonders whether wikipedia will cause us to develop a group mind... < 1166918878 0 :bsmntbombdood!unknown@unknown.invalid PRIVMSG #esoteric :ACTION is working on hello world < 1166918882 0 :pikhq!unknown@unknown.invalid PRIVMSG #esoteric :oerjan: Probably. < 1166918899 0 :pikhq!unknown@unknown.invalid PRIVMSG #esoteric :At least, Wikipedia said so. < 1166918922 0 :oerjan!unknown@unknown.invalid PRIVMSG #esoteric :link please? :) < 1166918975 0 :pikhq!unknown@unknown.invalid PRIVMSG #esoteric :Find it yourself. < 1166918994 0 :fizzie!unknown@unknown.invalid PRIVMSG #esoteric :Anyway, compilers generating "16-bit executables" usually can use all kinds of memory models, and the "tiny", "small" and "medium" memory models all limit data pointers to a single segment. Which would mean no integer arrays larger than 64k bytes, or 32k elements. http://en.wikipedia.org/wiki/Memory_model < 1166919028 0 :pikhq!unknown@unknown.invalid PRIVMSG #esoteric :That's just stupid, IMO. < 1166919081 0 :fizzie!unknown@unknown.invalid PRIVMSG #esoteric :The whole segmented memory architecture doesn't really feel like a very bright idea. < 1166919093 0 :pikhq!unknown@unknown.invalid PRIVMSG #esoteric :Of course, I live in the roarin' 64 bit pointer 2000s. ;) < 1166919176 0 :bsmntbombdood!unknown@unknown.invalid PRIVMSG #esoteric :this is hards < 1166919184 0 :fizzie!unknown@unknown.invalid PRIVMSG #esoteric :Well, the 68k (which was a contemporary of 8086, I think) had a 24-bit flat memory model. < 1166919198 0 :bsmntbombdood!unknown@unknown.invalid PRIVMSG #esoteric :how do I jump if 0? < 1166919208 0 :ihope!unknown@unknown.invalid PRIVMSG #esoteric :Subtract -1? < 1166919235 0 :pikhq!unknown@unknown.invalid PRIVMSG #esoteric :fizzie: The 8086 was like the 68k's retarded little brother. :p < 1166919236 0 :bsmntbombdood!unknown@unknown.invalid PRIVMSG #esoteric :right :) < 1166919265 0 :ihope!unknown@unknown.invalid PRIVMSG #esoteric :So just how ugly is x86? < 1166919272 0 :ihope!unknown@unknown.invalid PRIVMSG #esoteric :Is it composed entirely of cruft? < 1166919305 0 :pikhq!unknown@unknown.invalid PRIVMSG #esoteric :ihope: Cruft, rubber bands, bubble gum, and fairy dust. < 1166919333 0 :ihope!unknown@unknown.invalid PRIVMSG #esoteric :At least it has the fairy dust, eh? < 1166919351 0 :pikhq!unknown@unknown.invalid PRIVMSG #esoteric :The fairy dust only is in the 64 bit variants, though. < 1166919357 0 :ihope!unknown@unknown.invalid PRIVMSG #esoteric :Oh. < 1166919403 0 :fizzie!unknown@unknown.invalid PRIVMSG #esoteric :A single x86 opcode can be anything between one to 15 bytes, iirc. It does sound rather a bit overcomplicated, at least when compared to your standard "all instructions are alike" riscs. < 1166919442 0 :bsmntbombdood!unknown@unknown.invalid PRIVMSG #esoteric :Segmentation fault (core dumped) < 1166919466 0 :pikhq!unknown@unknown.invalid PRIVMSG #esoteric :fizzie: It comes from the bad ol' days when ASM coding was the standard way of doing anything. < 1166919492 0 :pikhq!unknown@unknown.invalid PRIVMSG #esoteric :Opcodes, opcodes, and more opcodes are the idea. < 1166919508 0 :fizzie!unknown@unknown.invalid PRIVMSG #esoteric :That reminds me of a wonderful comic; I wonder if I can still find the link. < 1166919542 0 :fizzie!unknown@unknown.invalid PRIVMSG #esoteric :http://juho.vaha-herttua.fi/Zilog.Z8000.1979.102646293.pdf < 1166919673 0 :fizzie!unknown@unknown.invalid PRIVMSG #esoteric :Specifically page 6 of the pdf. "It's not magic, readers! With dual environments, 418 op codes, and --". And page 17; "-- just a few, well-chosen op codes!* * Captain Zilog had 418 to choose from!" < 1166919903 0 :fizzie!unknown@unknown.invalid PRIVMSG #esoteric :"Holy cow, boss! Dis baby can use any of its registers as a stack pointer!" "None of the registers are designated! They're all general!" < 1166919927 0 :ihope!unknown@unknown.invalid PRIVMSG #esoteric :All general? < 1166919942 0 :ihope!unknown@unknown.invalid PRIVMSG #esoteric :Where's the trap register for each of 75 instructions? < 1166919950 0 :pikhq!unknown@unknown.invalid PRIVMSG #esoteric :Gimme an R, gimme an I, gimme an S, gimme a C! What does that spell? RISC! < 1166919955 0 :fizzie!unknown@unknown.invalid PRIVMSG #esoteric :Well, it's a little white lie. At least according to my reading of the Z8000 specification book. < 1166919968 0 :pikhq!unknown@unknown.invalid PRIVMSG #esoteric :;) < 1166919998 0 :bsmntbombdood!unknown@unknown.invalid PRIVMSG #esoteric :can't figure out how to dereference a pointer < 1166920012 0 :ihope!unknown@unknown.invalid PRIVMSG #esoteric :In your OISC? < 1166920015 0 :bsmntbombdood!unknown@unknown.invalid PRIVMSG #esoteric :yeah < 1166920028 0 :pikhq!unknown@unknown.invalid PRIVMSG #esoteric :*p < 1166920047 0 :fizzie!unknown@unknown.invalid PRIVMSG #esoteric :In fact, it even has one register sort-of designated as a stack pointer; there are many stack-manipulating instructions, including subroutine calls, which implicitly assume that register is the stack pointer. < 1166920067 0 :ihope!unknown@unknown.invalid PRIVMSG #esoteric :Set a memory location to the address of the destination, then copy? < 1166920109 0 :bsmntbombdood!unknown@unknown.invalid PRIVMSG #esoteric :? < 1166920155 0 :oerjan!unknown@unknown.invalid PRIVMSG #esoteric :you need to copy the pointer into the code < 1166920160 0 :fizzie!unknown@unknown.invalid PRIVMSG #esoteric :Can you do self-modifying code in your oisc, btw? Or are the instruction and data spaces separate? < 1166920166 0 :ihope!unknown@unknown.invalid PRIVMSG #esoteric :Wait... < 1166920174 0 :bsmntbombdood!unknown@unknown.invalid PRIVMSG #esoteric :fizzie: they are the same < 1166920293 0 :pikhq!unknown@unknown.invalid PRIVMSG #esoteric :fizzie: Harvard architectures aren't exactly common. . . < 1166920330 0 :ihope!unknown@unknown.invalid PRIVMSG #esoteric :Harvard architectures? < 1166920344 0 :fizzie!unknown@unknown.invalid PRIVMSG #esoteric :pikhq; Well, now, there's the MIPS. < 1166920348 0 :pikhq!unknown@unknown.invalid PRIVMSG #esoteric :An architecture with seperate instruction and data space. < 1166920368 0 :oerjan!unknown@unknown.invalid PRIVMSG #esoteric :if the pointer is in P, do a copy from P to Label+1, where Label is the address of an instruction < 1166920403 0 :bsmntbombdood!unknown@unknown.invalid PRIVMSG #esoteric :hmm < 1166920487 0 :oerjan!unknown@unknown.invalid PRIVMSG #esoteric :wait, i mean Label, not Label+1 < 1166920553 0 :bsmntbombdood!unknown@unknown.invalid PRIVMSG #esoteric :crap, there's a bug in my assembler < 1166920685 0 :fizzie!unknown@unknown.invalid PRIVMSG #esoteric :And MIPS is common; I have a SGI Indy ("Indigo without the go") with its MIPS R4000 sitting right here on my desk. < 1166920842 0 :fizzie!unknown@unknown.invalid PRIVMSG #esoteric :lindi; To comment on something that appeared a long time ago in this discussion; due to the utterly low precedence of =, "if (b = b-a <= 0)" (and similarly the later "if (*b = *b-*a <= 0)") would read as "if (b = (b-a <= 0))", which is probably not what you intended. (And wouldn't it look better as "if ((b -= a) <= 0)" anyway?) < 1166920867 0 :bsmntbombdood!unknown@unknown.invalid PRIVMSG #esoteric :ok, that bug fixed < 1166920919 0 :bsmntbombdood!unknown@unknown.invalid PRIVMSG #esoteric :longer first, longer first < 1166920926 0 :bsmntbombdood!unknown@unknown.invalid PRIVMSG #esoteric :ACTION repeats to himself < 1166920970 0 :bsmntbombdood!unknown@unknown.invalid PRIVMSG #esoteric :now back to hello world < 1166920990 0 :pikhq!unknown@unknown.invalid PRIVMSG #esoteric :ACTION has seen the reason behind the Tcl style guide's recommendation for copious parentheses in expr expressions. . . < 1166921197 0 :lindi-!unknown@unknown.invalid PRIVMSG #esoteric :fizzie: oh right < 1166921304 0 :tgwizard!unknown@unknown.invalid QUIT :Remote closed the connection < 1166921455 0 :ihope!unknown@unknown.invalid PRIVMSG #esoteric :Oh, right... schools need algae, and to get algae, my workers need to be able to swim, meaning I need a swimming pool. < 1166921541 0 :ihope!unknown@unknown.invalid PRIVMSG #esoteric :And there we have it, a swimming pool indeed. < 1166922543 0 :bsmntbombdood!unknown@unknown.invalid PRIVMSG #esoteric :aargh < 1166922545 0 :bsmntbombdood!unknown@unknown.invalid PRIVMSG #esoteric :this is hard < 1166922579 0 :bsmntbombdood!unknown@unknown.invalid PRIVMSG #esoteric :I can't do hello world < 1166922599 0 :pikhq!unknown@unknown.invalid PRIVMSG #esoteric :Hah. < 1166922623 0 :bsmntbombdood!unknown@unknown.invalid PRIVMSG #esoteric :I got pointer dereferencing thoug < 1166922633 0 :bsmntbombdood!unknown@unknown.invalid PRIVMSG #esoteric :now it's not looping like it's supposed to < 1166922827 0 :ihope!unknown@unknown.invalid PRIVMSG #esoteric :Conway's Game of Life... now there's a real esoteric thingy. < 1166922840 0 :pikhq!unknown@unknown.invalid PRIVMSG #esoteric :And it' < 1166922844 0 :pikhq!unknown@unknown.invalid PRIVMSG #esoteric :s nicely Turing complete. < 1166922849 0 :bsmntbombdood!unknown@unknown.invalid PRIVMSG #esoteric :Decimal output is very useful for debugging < 1166922854 0 :ihope!unknown@unknown.invalid PRIVMSG #esoteric :It's full of puzzles beyond proving it Turing-complete. < 1166922865 0 :ihope!unknown@unknown.invalid PRIVMSG #esoteric :Like making a 17c/45 spaceship. < 1166922893 0 :ihope!unknown@unknown.invalid PRIVMSG #esoteric :The Caterpillar is one such spaceship, and it's pretty huge. < 1166922936 0 :ihope!unknown@unknown.invalid PRIVMSG #esoteric :http://www.yucs.org/~gnivasch/life/article_cat/cat_picture.gif <- the Caterpillar, scale 1:40 < 1166923048 0 :ihope!unknown@unknown.invalid PRIVMSG #esoteric :Now, just imagine: if one were to remove a cell near the front, the whole thing would probably explode. < 1166923104 0 :bsmntbombdood!unknown@unknown.invalid PRIVMSG #esoteric :oh fuck, no wonder < 1166923206 0 :ihope!unknown@unknown.invalid PRIVMSG #esoteric :We're still all waiting, though, for the spaceship generator, capable of making spaceships of any rational speed in both directions, as long as that speed is less than c/2. < 1166923307 0 :ihope!unknown@unknown.invalid PRIVMSG #esoteric :Or any computable speed, if periodicity doesn't matter. < 1166923629 0 :ihope!unknown@unknown.invalid PRIVMSG #esoteric :Just program a universal computer with that, and hook it up to a universal constructor, and there you go... < 1166923789 0 :bsmntbombdood!unknown@unknown.invalid PRIVMSG #esoteric :arghhhhhhh < 1166923838 0 :oerjan!unknown@unknown.invalid PRIVMSG #esoteric :ACTION likes the Day and Night CA < 1166923921 0 :oerjan!unknown@unknown.invalid PRIVMSG #esoteric :complete symmetry between on and off cells, but still so complicated that it nearly has to be Turing-complete (but I don't think it has been proved) < 1166923984 0 :bsmntbombdood!unknown@unknown.invalid PRIVMSG #esoteric :I can't get it to work :( < 1166924008 0 :oerjan!unknown@unknown.invalid PRIVMSG #esoteric :the "Hello World"? what's the problem? < 1166924048 0 :bsmntbombdood!unknown@unknown.invalid PRIVMSG #esoteric :Can't figure out how to get the loop to terminate < 1166924094 0 :bsmntbombdood!unknown@unknown.invalid PRIVMSG #esoteric :one quitp QUIT < 1166924114 0 :ihope!unknown@unknown.invalid PRIVMSG #esoteric :Loop? < 1166924133 0 :bsmntbombdood!unknown@unknown.invalid PRIVMSG #esoteric :ihope: To loop through the string < 1166924152 0 :oerjan!unknown@unknown.invalid PRIVMSG #esoteric :is the string zero-terminated? < 1166924158 0 :ihope!unknown@unknown.invalid PRIVMSG #esoteric :Great hacks are needed to do the simplest of things? I like it. :-) < 1166924171 0 :ihope!unknown@unknown.invalid PRIVMSG #esoteric :ACTION tries to run Life32 under Wine < 1166924173 0 :bsmntbombdood!unknown@unknown.invalid PRIVMSG #esoteric :oerjan: yeah < 1166924184 0 :bsmntbombdood!unknown@unknown.invalid PRIVMSG #esoteric :ihope: indeed < 1166924209 0 :oerjan!unknown@unknown.invalid PRIVMSG #esoteric :at some point you probably load the current character into some cell, right? < 1166924244 0 :bsmntbombdood!unknown@unknown.invalid PRIVMSG #esoteric :yeah < 1166924268 0 :ihope!unknown@unknown.invalid PRIVMSG #esoteric :I guess I need Wine to do that. < 1166924273 0 :oerjan!unknown@unknown.invalid PRIVMSG #esoteric :that instruction will branch if and only if the character is zero < 1166924290 0 :bsmntbombdood!unknown@unknown.invalid PRIVMSG #esoteric :which is what I want < 1166924301 0 :bsmntbombdood!unknown@unknown.invalid PRIVMSG #esoteric :http://pastebin.ca/290491 < 1166924324 0 :ihope!unknown@unknown.invalid PRIVMSG #esoteric :Now, how easy would it be to write a Linux compatibility layer for Windows? < 1166924335 0 :bsmntbombdood!unknown@unknown.invalid PRIVMSG #esoteric :ihope: cygwin? < 1166924335 0 :pikhq!unknown@unknown.invalid PRIVMSG #esoteric :GregorR: In Plof, your "for" loop semantics are really different from C's. . . < 1166924351 0 :ihope!unknown@unknown.invalid PRIVMSG #esoteric :That runs Linux binaries now? < 1166924351 0 :pikhq!unknown@unknown.invalid PRIVMSG #esoteric :ihope: CoLinux or UML for Cygwin. < 1166924364 0 :ihope!unknown@unknown.invalid PRIVMSG #esoteric :Well, yeah, that. < 1166924367 0 :ihope!unknown@unknown.invalid PRIVMSG #esoteric :...Those. < 1166924378 0 :ihope!unknown@unknown.invalid PRIVMSG #esoteric :How fast is CoLinux? < 1166924395 0 :pikhq!unknown@unknown.invalid PRIVMSG #esoteric :When I last used it, it was damned close to native. < 1166924422 0 :pikhq!unknown@unknown.invalid PRIVMSG #esoteric :That was a few years ago, though. < 1166924430 0 :pikhq!unknown@unknown.invalid PRIVMSG #esoteric :Err. < 1166924434 0 :pikhq!unknown@unknown.invalid PRIVMSG #esoteric :Maybe a year or two. < 1166924446 0 :pikhq!unknown@unknown.invalid PRIVMSG #esoteric :UML for Cygwin, I can't say anything about. < 1166924471 0 :bsmntbombdood!unknown@unknown.invalid PRIVMSG #esoteric :oerjan: I think i got it < 1166924471 0 :pikhq!unknown@unknown.invalid PRIVMSG #esoteric :But one has to admit that it's kind of funny that Linux has been ported to Windows. . . Literally. < 1166924509 0 :ihope!unknown@unknown.invalid PRIVMSG #esoteric :Okay, Wine's all nice and installed. < 1166924566 0 :ihope!unknown@unknown.invalid PRIVMSG #esoteric :Now how do I use it? < 1166924579 0 :bsmntbombdood!unknown@unknown.invalid PRIVMSG #esoteric :...nevermind < 1166924621 0 :pikhq!unknown@unknown.invalid PRIVMSG #esoteric :GregorR: A patch is coming your way. < 1166924627 0 :ihope!unknown@unknown.invalid PRIVMSG #esoteric :Cannot open /home/ns/Desktop/Life32/Life32.exe: No application suitable for automatic installation is available for handling this kind of file. < 1166924689 0 :pikhq!unknown@unknown.invalid PRIVMSG #esoteric :ACTION hopes Gregor notices it < 1166924769 0 :bsmntbombdood!unknown@unknown.invalid PRIVMSG #esoteric :Now it doesn't terminate too early, it terminates too late < 1166924805 0 :bsmntbombdood!unknown@unknown.invalid PRIVMSG #esoteric :it prints "hello, world 0x00 0x00..." < 1166924913 0 :ihope!unknown@unknown.invalid PRIVMSG #esoteric :Whoa! < 1166924917 0 :ihope!unknown@unknown.invalid PRIVMSG #esoteric :It's ugly, but it works! < 1166924950 0 :ihope!unknown@unknown.invalid PRIVMSG #esoteric :Pretty sweet, actually. < 1166925033 0 :ihope!unknown@unknown.invalid PRIVMSG #esoteric :Then again, maybe it actually doesn't work. < 1166925051 0 :bsmntbombdood!unknown@unknown.invalid PRIVMSG #esoteric :hmm? < 1166925059 0 :ihope!unknown@unknown.invalid PRIVMSG #esoteric :Life32 under Wine. < 1166925076 0 :bsmntbombdood!unknown@unknown.invalid PRIVMSG #esoteric :aah < 1166925171 0 :ihope!unknown@unknown.invalid PRIVMSG #esoteric :Aha! It DOES work! < 1166925413 0 :bsmntbombdood!unknown@unknown.invalid PRIVMSG #esoteric :hello world doesn't :( < 1166925523 0 :ihope!unknown@unknown.invalid PRIVMSG #esoteric :Can't you just zero a memory location and use it to test for positive? < 1166925549 0 :bsmntbombdood!unknown@unknown.invalid PRIVMSG #esoteric :can someone take a look? http://pastebin.ca/290503 < 1166925579 0 :oerjan!unknown@unknown.invalid PRIVMSG #esoteric :i am taking a look, my attempt coming up < 1166925772 0 :ihope!unknown@unknown.invalid PRIVMSG #esoteric :Why, I think the Caterpillar has loaded. < 1166925851 0 :ihope!unknown@unknown.invalid PRIVMSG #esoteric :It's possibly even larger than I thought it would be. < 1166925962 0 :oerjan!unknown@unknown.invalid PRIVMSG #esoteric :try this: http://pastebin.ca/290507 < 1166926012 0 :ihope!unknown@unknown.invalid PRIVMSG #esoteric :It looks quite nice, actually. < 1166926055 0 :ihope!unknown@unknown.invalid PRIVMSG #esoteric :This is what large Life patterns look like, then? < 1166926085 0 :bsmntbombdood!unknown@unknown.invalid PRIVMSG #esoteric :oerjan: workage < 1166926117 0 :bsmntbombdood!unknown@unknown.invalid PRIVMSG #esoteric ::) < 1166926152 0 :oerjan!unknown@unknown.invalid PRIVMSG #esoteric :ACTION makes the V sign < 1166926336 0 :bsmntbombdood!unknown@unknown.invalid PRIVMSG #esoteric :odd < 1166926352 0 :oerjan!unknown@unknown.invalid PRIVMSG #esoteric :even? < 1166926361 0 :digital_me!n=digital@wikipedia/Digitalme JOIN :#esoteric < 1166926405 0 :bsmntbombdood!unknown@unknown.invalid PRIVMSG #esoteric :nope, pretty odd < 1166926414 0 :oerjan!unknown@unknown.invalid PRIVMSG #esoteric :what is? < 1166926424 0 :bsmntbombdood!unknown@unknown.invalid PRIVMSG #esoteric :How your's worked < 1166926430 0 :bsmntbombdood!unknown@unknown.invalid PRIVMSG #esoteric :Mine did almost the same thing < 1166926486 0 :oerjan!unknown@unknown.invalid PRIVMSG #esoteric :i didn't completely understand yours, but it seemed to me that it did the quit test after printing the character so i expect at least an extra 0x00 < 1166926500 0 :oerjan!unknown@unknown.invalid PRIVMSG #esoteric :*expected < 1166926555 0 :bsmntbombdood!unknown@unknown.invalid PRIVMSG #esoteric :Mine never quit the loop < 1166926668 0 :oerjan!unknown@unknown.invalid PRIVMSG #esoteric :what was the point of the quitp WRITE -1 anyhow? < 1166926677 0 :bsmntbombdood!unknown@unknown.invalid PRIVMSG #esoteric :debugging < 1166926726 0 :oerjan!unknown@unknown.invalid PRIVMSG #esoteric :right. i _think_ your problem is that you never managed to dereference the quitp pointer < 1166926777 0 :oerjan!unknown@unknown.invalid PRIVMSG #esoteric :so you actually tested the pointer itself rather than the character < 1166926777 0 :bsmntbombdood!unknown@unknown.invalid PRIVMSG #esoteric :line 12? < 1166926822 0 :oerjan!unknown@unknown.invalid PRIVMSG #esoteric :line 12 is a comment < 1166926841 0 :bsmntbombdood!unknown@unknown.invalid PRIVMSG #esoteric :13,14,15 < 1166926864 0 :oerjan!unknown@unknown.invalid PRIVMSG #esoteric :it is essentially quitp = -pos, with no dereferencing < 1166926890 0 :bsmntbombdood!unknown@unknown.invalid PRIVMSG #esoteric :hrm < 1166926927 0 :oerjan!unknown@unknown.invalid PRIVMSG #esoteric :to dereference a pointer, you _must_ copy it into an actually running code part < 1166926958 0 :oerjan!unknown@unknown.invalid PRIVMSG #esoteric :like writepos:, or my quitpos: < 1166926998 0 :bsmntbombdood!unknown@unknown.invalid PRIVMSG #esoteric :oh, and in your's, line 16 needs to be NULL NULL -1 < 1166927080 0 :oerjan!unknown@unknown.invalid PRIVMSG #esoteric :i don't think so, because NULL is not used again before NULL NULL CODESTART < 1166927257 0 :bsmntbombdood!unknown@unknown.invalid PRIVMSG #esoteric :oh, right < 1166927366 0 :bsmntbombdood!unknown@unknown.invalid PRIVMSG #esoteric :probably not good to leave NULL unzeroed though < 1166927464 0 :oerjan!unknown@unknown.invalid PRIVMSG #esoteric :well, you could rename it to temp... < 1166927706 0 :bsmntbombdood!unknown@unknown.invalid PRIVMSG #esoteric :yeah < 1166927995 0 :bsmntbombdood!unknown@unknown.invalid PRIVMSG #esoteric :I should work on a brainfuck interpreter < 1166928039 0 :oerjan!unknown@unknown.invalid PRIVMSG #esoteric :that would certainly kill some time... < 1166928045 0 :pikhq!unknown@unknown.invalid PRIVMSG #esoteric :Do it in Plof. < 1166928060 0 :oerjan!unknown@unknown.invalid PRIVMSG #esoteric :i assumed he meant in OISC :) < 1166928067 0 :pikhq!unknown@unknown.invalid PRIVMSG #esoteric :(Plof is in bad need of Esome) < 1166928097 0 :bsmntbombdood!unknown@unknown.invalid PRIVMSG #esoteric :oerjan: I think it would be pretty straighforward < 1166928103 0 :bsmntbombdood!unknown@unknown.invalid PRIVMSG #esoteric :except for [] < 1166928228 0 :oerjan!unknown@unknown.invalid PRIVMSG #esoteric :you could just compile into memory < 1166928250 0 :oerjan!unknown@unknown.invalid PRIVMSG #esoteric :for [] you need a stack of branch points < 1166928260 0 :oerjan!unknown@unknown.invalid PRIVMSG #esoteric :during the compilation < 1166928283 0 :oerjan!unknown@unknown.invalid PRIVMSG #esoteric :i believe Forth works in that way < 1166928309 0 :bsmntbombdood!unknown@unknown.invalid PRIVMSG #esoteric :[] is hard even in real languages < 1166928314 0 :pikhq!unknown@unknown.invalid PRIVMSG #esoteric :Not in Tcl. < 1166928326 0 :pikhq!unknown@unknown.invalid PRIVMSG #esoteric :Of course, my BF implementation in Tcl is a bit. . . Lazy. < 1166928351 0 :pikhq!unknown@unknown.invalid PRIVMSG #esoteric :Basically, I compile the Brainfuck code in-memory to Tcl, and then evaluate the compiled code. ;) < 1166928404 0 :oerjan!unknown@unknown.invalid PRIVMSG #esoteric :essentially what i suggest for OISC as well < 1166928426 0 :oerjan!unknown@unknown.invalid PRIVMSG #esoteric :because [] is _not_ particularly hard to compile < 1166928465 0 :bsmntbombdood!unknown@unknown.invalid PRIVMSG #esoteric :no, just a jump < 1166928466 0 :pikhq!unknown@unknown.invalid PRIVMSG #esoteric :It's only hard because one has to do it in OISC. . . And you're going to have to do that just to write the thing, anyways. < 1166928468 0 :oerjan!unknown@unknown.invalid PRIVMSG #esoteric :its only if try to run directly on the string interpretation it gets awkward < 1166928495 0 :oerjan!unknown@unknown.invalid PRIVMSG #esoteric :*representation < 1166928626 0 :oerjan!unknown@unknown.invalid PRIVMSG #esoteric :*it's only if you < 1166928790 0 :oerjan!unknown@unknown.invalid PRIVMSG #esoteric :hm... you could actually avoid a disjoint stack by keeping the stack _in_ the partially compiled code < 1166928821 0 :oerjan!unknown@unknown.invalid PRIVMSG #esoteric :then you avoid having to juggle two distinct growable memory areas < 1166928896 0 :bsmntbombdood!unknown@unknown.invalid PRIVMSG #esoteric :how? < 1166928911 0 :oerjan!unknown@unknown.invalid PRIVMSG #esoteric :so, when you get to a [, you compile it, except that the branch location points to the previous [ < 1166928939 0 :oerjan!unknown@unknown.invalid PRIVMSG #esoteric :and you have a global pointer to the topmost [ < 1166929014 0 :oerjan!unknown@unknown.invalid PRIVMSG #esoteric :when you get to ], you use that global pointer to compile the ] _and_ to patch the corresponding [, finally letting the new global pointer be the previous content of the [ < 1166929016 0 :ihope!unknown@unknown.invalid QUIT :"Leaving" < 1166929085 0 :oerjan!unknown@unknown.invalid PRIVMSG #esoteric :so the global pointer plus the pointers saved in each [ is the stack, pushing on a new [ and popping on a new ] < 1166929307 0 :bsmntbombdood!unknown@unknown.invalid PRIVMSG #esoteric :ACTION writes cat in OISC < 1166929404 0 :pikhq!unknown@unknown.invalid QUIT :"leaving" < 1166929418 0 :oerjan!unknown@unknown.invalid PRIVMSG #esoteric :you might need a special EOF location < 1166929432 0 :bsmntbombdood!unknown@unknown.invalid PRIVMSG #esoteric :-1 < 1166929437 0 :oerjan!unknown@unknown.invalid PRIVMSG #esoteric :ah < 1166929752 0 :bsmntbombdood!unknown@unknown.invalid PRIVMSG #esoteric :grar, I think there's a bug in my vm < 1166929787 0 :bsmntbombdood!unknown@unknown.invalid PRIVMSG #esoteric :READ char -1 < 1166929787 0 :bsmntbombdood!unknown@unknown.invalid PRIVMSG #esoteric :char WRITE -1 < 1166929787 0 :bsmntbombdood!unknown@unknown.invalid PRIVMSG #esoteric :NULL NULL CODESTART < 1166929797 0 :bsmntbombdood!unknown@unknown.invalid PRIVMSG #esoteric :doesn't do what it should < 1166929822 0 :oerjan!unknown@unknown.invalid PRIVMSG #esoteric :hm... make that char char CODESTART? < 1166929861 0 :bsmntbombdood!unknown@unknown.invalid PRIVMSG #esoteric :!?! < 1166929864 0 :EgoBot!unknown@unknown.invalid PRIVMSG #esoteric :Huh? < 1166929872 0 :bsmntbombdood!unknown@unknown.invalid PRIVMSG #esoteric :oh, right < 1166929895 0 :bsmntbombdood!unknown@unknown.invalid PRIVMSG #esoteric :char doesn't get zeroed < 1166929994 0 :oerjan!unknown@unknown.invalid PRIVMSG #esoteric :actually, you probably need to test it for -1 first < 1166930014 0 :oerjan!unknown@unknown.invalid PRIVMSG #esoteric :which would have to go between READ and WRITE < 1166930036 0 :bsmntbombdood!unknown@unknown.invalid PRIVMSG #esoteric :I know < 1166930044 0 :oerjan!unknown@unknown.invalid PRIVMSG #esoteric :ah! < 1166930058 0 :bsmntbombdood!unknown@unknown.invalid PRIVMSG #esoteric :http://pastebin.ca/290546 < 1166930164 0 :oerjan!unknown@unknown.invalid PRIVMSG #esoteric :there is a simpler way if you use READ char