00:00:38 <ihope> What's the difference, then?
00:01:05 <oerjan> static variables are not deallocated when the function returns, but kept the same for all invocations
00:01:11 <pikhq> fizzie: That'd be 640k, not 64k.
00:01:53 <ihope> What if the function calls itself?
00:02:05 <fizzie> ihope; You get a new instance of the automatic variable.
00:02:13 <fizzie> pikhq; 64k is a very common limit, too, since it's a single memory page.
00:02:16 <ihope> If it's a static variable?
00:02:39 <fizzie> pikhq; Er, I mean, segment.
00:02:58 <oerjan> a static variable is like a global variable, except that it doesn't clutter the global namespace
00:03:19 <pikhq> fizzie: I thought MS-DOS used the x86 CPU with what amounts to a flat memory model.
00:03:44 <pikhq> (I could be absolutely wrong, and in all probability am)
00:03:53 <fizzie> Err, no? Why would there be the 640k limit, then?
00:04:58 * pikhq uses his external brain attachment (Wikipedia) to sound like less of an idiot
00:05:14 <fizzie> DOS programs, of course, can run in protected mode, with a 32-bit flat memory model.
00:07:05 <pikhq> I'm no assembly expert. ;)
00:07:33 * oerjan suddenly wonders whether wikipedia will cause us to develop a group mind...
00:08:19 <pikhq> At least, Wikipedia said so.
00:09:54 <fizzie> 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
00:10:28 <pikhq> That's just stupid, IMO.
00:11:21 <fizzie> The whole segmented memory architecture doesn't really feel like a very bright idea.
00:11:33 <pikhq> Of course, I live in the roarin' 64 bit pointer 2000s. ;)
00:13:04 <fizzie> Well, the 68k (which was a contemporary of 8086, I think) had a 24-bit flat memory model.
00:13:55 <pikhq> fizzie: The 8086 was like the 68k's retarded little brother. :p
00:14:25 <ihope> So just how ugly is x86?
00:14:32 <ihope> Is it composed entirely of cruft?
00:15:05 <pikhq> ihope: Cruft, rubber bands, bubble gum, and fairy dust.
00:15:33 <ihope> At least it has the fairy dust, eh?
00:15:51 <pikhq> The fairy dust only is in the 64 bit variants, though.
00:16:43 <fizzie> 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.
00:17:46 <pikhq> fizzie: It comes from the bad ol' days when ASM coding was the standard way of doing anything.
00:18:12 <pikhq> Opcodes, opcodes, and more opcodes are the idea.
00:18:28 <fizzie> That reminds me of a wonderful comic; I wonder if I can still find the link.
00:19:02 <fizzie> http://juho.vaha-herttua.fi/Zilog.Z8000.1979.102646293.pdf
00:21:13 <fizzie> 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!"
00:25:03 <fizzie> "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!"
00:25:42 <ihope> Where's the trap register for each of 75 instructions?
00:25:50 <pikhq> Gimme an R, gimme an I, gimme an S, gimme a C! What does that spell? RISC!
00:25:55 <fizzie> Well, it's a little white lie. At least according to my reading of the Z8000 specification book.
00:27:27 <fizzie> 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.
00:27:47 <ihope> Set a memory location to the address of the destination, then copy?
00:29:15 <oerjan> you need to copy the pointer into the code
00:29:20 <fizzie> Can you do self-modifying code in your oisc, btw? Or are the instruction and data spaces separate?
00:31:33 <pikhq> fizzie: Harvard architectures aren't exactly common. . .
00:32:10 <ihope> Harvard architectures?
00:32:24 <fizzie> pikhq; Well, now, there's the MIPS.
00:32:28 <pikhq> An architecture with seperate instruction and data space.
00:32:48 <oerjan> if the pointer is in P, do a copy from P to Label+1, where Label is the address of an instruction
00:34:47 <oerjan> wait, i mean Label, not Label+1
00:38:05 <fizzie> And MIPS is common; I have a SGI Indy ("Indigo without the go") with its MIPS R4000 sitting right here on my desk.
00:40:42 <fizzie> 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?)
00:43:10 * pikhq has seen the reason behind the Tcl style guide's recommendation for copious parentheses in expr expressions. . .
00:48:24 -!- tgwizard has quit (Remote closed the connection).
00:50:55 <ihope> Oh, right... schools need algae, and to get algae, my workers need to be able to swim, meaning I need a swimming pool.
00:52:21 <ihope> And there we have it, a swimming pool indeed.
01:13:47 <ihope> Conway's Game of Life... now there's a real esoteric thingy.
01:14:04 <pikhq> s nicely Turing complete.
01:14:14 <ihope> It's full of puzzles beyond proving it Turing-complete.
01:14:25 <ihope> Like making a 17c/45 spaceship.
01:14:53 <ihope> The Caterpillar is one such spaceship, and it's pretty huge.
01:15:36 <ihope> http://www.yucs.org/~gnivasch/life/article_cat/cat_picture.gif <- the Caterpillar, scale 1:40
01:17:28 <ihope> Now, just imagine: if one were to remove a cell near the front, the whole thing would probably explode.
01:20:06 <ihope> 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.
01:21:47 <ihope> Or any computable speed, if periodicity doesn't matter.
01:27:09 <ihope> Just program a universal computer with that, and hook it up to a universal constructor, and there you go...
01:30:38 * oerjan likes the Day and Night CA
01:32:01 <oerjan> 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)
01:33:28 <oerjan> the "Hello World"? what's the problem?
01:35:52 <oerjan> is the string zero-terminated?
01:35:58 <ihope> Great hacks are needed to do the simplest of things? I like it. :-)
01:36:11 * ihope tries to run Life32 under Wine
01:36:49 <oerjan> at some point you probably load the current character into some cell, right?
01:37:48 <ihope> I guess I need Wine to do that.
01:37:53 <oerjan> that instruction will branch if and only if the character is zero
01:38:44 <ihope> Now, how easy would it be to write a Linux compatibility layer for Windows?
01:38:55 <pikhq> GregorR: In Plof, your "for" loop semantics are really different from C's. . .
01:39:11 <ihope> That runs Linux binaries now?
01:39:11 <pikhq> ihope: CoLinux or UML for Cygwin.
01:39:38 <ihope> How fast is CoLinux?
01:39:55 <pikhq> When I last used it, it was damned close to native.
01:40:22 <pikhq> That was a few years ago, though.
01:40:34 <pikhq> Maybe a year or two.
01:40:46 <pikhq> UML for Cygwin, I can't say anything about.
01:41:11 <pikhq> But one has to admit that it's kind of funny that Linux has been ported to Windows. . . Literally.
01:41:49 <ihope> Okay, Wine's all nice and installed.
01:42:46 <ihope> Now how do I use it?
01:43:41 <pikhq> GregorR: A patch is coming your way.
01:43:47 <ihope> Cannot open /home/ns/Desktop/Life32/Life32.exe: No application suitable for automatic installation is available for handling this kind of file.
01:44:49 * pikhq hopes Gregor notices it
01:46:09 <bsmntbombdood> Now it doesn't terminate too early, it terminates too late
01:48:37 <ihope> It's ugly, but it works!
01:49:10 <ihope> Pretty sweet, actually.
01:50:33 <ihope> Then again, maybe it actually doesn't work.
01:50:59 <ihope> Life32 under Wine.
01:52:51 <ihope> Aha! It DOES work!
01:58:43 <ihope> Can't you just zero a memory location and use it to test for positive?
01:59:09 <bsmntbombdood> can someone take a look? http://pastebin.ca/290503
01:59:39 <oerjan> i am taking a look, my attempt coming up
02:02:52 <ihope> Why, I think the Caterpillar has loaded.
02:04:11 <ihope> It's possibly even larger than I thought it would be.
02:06:02 <oerjan> try this: http://pastebin.ca/290507
02:06:52 <ihope> It looks quite nice, actually.
02:07:35 <ihope> This is what large Life patterns look like, then?
02:12:41 -!- digital_me has joined.
02:14:46 <oerjan> 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
02:17:48 <oerjan> what was the point of the quitp WRITE -1 anyhow?
02:18:46 <oerjan> right. i _think_ your problem is that you never managed to dereference the quitp pointer
02:19:37 <oerjan> so you actually tested the pointer itself rather than the character
02:21:04 <oerjan> it is essentially quitp = -pos, with no dereferencing
02:22:07 <oerjan> to dereference a pointer, you _must_ copy it into an actually running code part
02:22:38 <oerjan> like writepos:, or my quitpos:
02:23:18 <bsmntbombdood> oh, and in your's, line 16 needs to be NULL NULL -1
02:24:40 <oerjan> i don't think so, because NULL is not used again before NULL NULL CODESTART
02:31:04 <oerjan> well, you could rename it to temp...
02:40:39 <oerjan> that would certainly kill some time...
02:41:00 <oerjan> i assumed he meant in OISC :)
02:41:07 <pikhq> (Plof is in bad need of Esome)
02:43:48 <oerjan> you could just compile into memory
02:44:10 <oerjan> for [] you need a stack of branch points
02:44:20 <oerjan> during the compilation
02:44:43 <oerjan> i believe Forth works in that way
02:45:26 <pikhq> Of course, my BF implementation in Tcl is a bit. . . Lazy.
02:45:51 <pikhq> Basically, I compile the Brainfuck code in-memory to Tcl, and then evaluate the compiled code. ;)
02:46:44 <oerjan> essentially what i suggest for OISC as well
02:47:06 <oerjan> because [] is _not_ particularly hard to compile
02:47:46 <pikhq> 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.
02:47:48 <oerjan> its only if try to run directly on the string interpretation it gets awkward
02:53:10 <oerjan> hm... you could actually avoid a disjoint stack by keeping the stack _in_ the partially compiled code
02:53:41 <oerjan> then you avoid having to juggle two distinct growable memory areas
02:55:11 <oerjan> so, when you get to a [, you compile it, except that the branch location points to the previous [
02:55:39 <oerjan> and you have a global pointer to the topmost [
02:56:54 <oerjan> 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 [
02:56:56 -!- ihope has quit ("Leaving").
02:58:05 <oerjan> so the global pointer plus the pointers saved in each [ is the stack, pushing on a new [ and popping on a new ]
03:03:24 -!- pikhq has quit ("leaving").
03:03:38 <oerjan> you might need a special EOF location
03:10:22 <oerjan> hm... make that char char CODESTART?
03:13:14 <oerjan> actually, you probably need to test it for -1 first
03:13:34 <oerjan> which would have to go between READ and WRITE
03:16:04 <oerjan> there is a simpler way if you use READ char <label>
03:16:29 <oerjan> because it then branches except on -1
03:19:37 <oerjan> right. if you make that char char QUIT you don't have to use NULL at all...
03:20:31 <oerjan> it's not really necessary to make NULL a special variable anyhow
03:21:42 <oerjan> for that matter, the same could be said about CODESTART
03:22:05 <oerjan> QUIT seems to have to be special, though
03:23:24 <oerjan> obviously the program doesn't start at 0, then
03:25:16 <oerjan> NULL, READ, WRITE and QUIT?
03:27:13 <oerjan> it might be an idea to make -1 = NEXT or something
03:31:16 <bsmntbombdood> You know a proccessor is great when you have to have self modifying code to do anything!
03:35:06 <bsmntbombdood> It's amazing that it can be turing complete with only one instruction
03:40:06 <oerjan> perhaps. but then the one instruction merges three concepts: subtraction, comparison and branching.
04:04:36 -!- anonfunc has joined.
04:20:34 -!- bsmnt_bot has quit (Remote closed the connection).
04:26:25 <bsmntbombdood> methinks running the OISC code through cpp and adding some macros would be a good idea
04:32:46 <oerjan> general numbers or up to a limit?
04:33:37 -!- digital_me has quit ("Lost terminal").
04:44:20 -!- anonfunc has quit.
04:44:33 <oerjan> something like this: c = 0; for (n=BITSIZE; n--; ) {c+=c; if (a < 0) {a+= 1 << (BITSIZE-1); c+=b;} a+=a; }
04:46:20 -!- digital_me has joined.
04:47:38 <oerjan> sure, but that takes time proportional to b
05:14:45 <bsmntbombdood> Not sure how to do this, because you need a place to dereference a pointer
05:14:49 <oerjan> are you just making general tools?
05:17:49 <oerjan> make a macro for pointer dereferencing
05:18:20 <bsmntbombdood> To get a value on the stack, we have to dereference a pointer, but we have to put it in a constant place
05:19:33 <oerjan> no, you have to put it into the instruction that makes the actual dereferencing
05:21:54 <oerjan> mov (pointer, label); then the label: instruction will dereference the pointer.
05:22:34 <oerjan> mov (pointer, label+1); then it will store into the dereferenced pointer
05:23:58 <oerjan> to do a-= *p, you do mov(p,l1); l1: 0 a -1
05:24:07 -!- calamari has joined.
05:24:43 <oerjan> to do *p -= a, you do mov(p,l1+1); l1: a 0 -1
05:27:29 <oerjan> but you don't have to use the same l1 for every use of a pointer
05:29:50 -!- calamari has quit ("Leaving").
05:31:28 <oerjan> and how is that a problem?
05:33:07 <oerjan> you mean to put it in the function's stack frame?
05:34:53 <GregorR> Anybody want to help me improve Plof's arrays?
05:35:12 <oerjan> no it does not have to be. the l1 is just a temporary variable that is reset every time the mov(p,l1); l1: 0 a -1 is encountered.
05:35:27 <oerjan> it refers to a part of the _code_, not of the data
05:36:00 <oerjan> do you see any function calls in that code?
05:36:41 <oerjan> so when the inner function returns, it will definitely not be to any place that cares about the value of l1.
05:37:52 <oerjan> so? l1 is global because it refers to _code_, not data.
05:38:24 <bsmntbombdood> oerjan: that works for return addresses, but not arguments
05:39:59 <oerjan> l1 is _only_ a label that is _only_ used to make that damned code up there equivalent to a-= *p. It does _not_ need to be stored anywhere, or saved, or remembered, except when that code is running.
05:40:23 <Sukoshi> Uh... what are we discussing?
05:43:42 <oerjan> look at it another way. l1 _is_ local, because its scope ends as soon as that code ends, and it is reinitialized when it is entered. however, it does not have to be in stack memory because the code is totally non-reentrant.
05:46:07 <oerjan> maybe it is not clear, but i intend the l1: to be immediately after the move. it is a that gets the final result, not l1.
05:48:42 <oerjan> if you need a to be on the stack, you just put an additional mov(&a,l1+1) first.
05:57:07 <oerjan> with all this moving going on it might pay to store pointers as their negatives (like you did with the characters in the Hello world program)
06:07:38 <bsmntbombdood> I think I've had enough of this for one night, time for bed
06:20:55 <Sukoshi> I'm assuming X is a total mess because it was designed to work on 70's era hardware?
06:21:55 <Sukoshi> It seems like a lot of the design choices are used to decrease bandwidth... which is a lot cheaper nowadays.
06:22:05 <Sukoshi> Especially if the X server is on your system :P
06:22:53 <oerjan> well it was designed to be able to have server and client on different machines
06:26:44 <oerjan> that, plus being old, probably accounts for the mess
06:28:18 <Sukoshi> Yeah. I have a WM idea I wanna try out.
06:28:22 <Sukoshi> It's gonna be written in CL :)
06:28:58 <oerjan> oh, right, separate WMs, that accounts for much mess-age...
06:29:52 <Sukoshi> Well, I like the concept of a WM.
06:30:23 <Sukoshi> It's just that, some of X's stuff (*cough* selections *cough*) are incredibly archaic.
06:30:53 <Sukoshi> I mean seriously, does one really need to send a timestamp for a selection? Why can't a selection just be a floating buffer on the X server which clients can access through requests?
06:32:16 -!- digital_me has quit (Read error: 110 (Connection timed out)).
06:41:31 <Sukoshi> I have a somewhat misty idea that's getting less misty.
07:32:14 -!- GreaseMonkey has joined.
07:59:59 -!- clog has quit (ended).
08:00:00 -!- clog has joined.
08:33:24 -!- int-e has joined.
08:34:42 <EgoBot> 58 +++++++++[>++++++++>+++++++++++>><<<<-]>.>++.+++++++..+++. [341]
08:40:12 -!- GreaseMonkey has quit ("Reverse Polish Notation: You cows 2 have.").
08:50:30 -!- anonfunc has joined.
09:54:01 -!- tgwizard has joined.
09:54:19 -!- oerjan has quit ("Later").
10:55:21 -!- jix_ has joined.
11:09:22 -!- int-e has quit ("Bye!").
11:37:26 -!- okokoko has quit (Read error: 60 (Operation timed out)).
13:48:24 -!- anonfunc has quit.
14:21:46 * SimonRC recalls that there *is* an X replacement out there.
14:21:59 <SimonRC> It was on /. a couple of years ago
15:01:46 -!- Asztal has joined.
15:41:29 -!- Asztal has quit (Read error: 113 (No route to host)).
16:48:27 -!- CakeProphet has quit ("haaaaaaaaaa").
17:00:53 -!- sp3tt has quit (Read error: 104 (Connection reset by peer)).
17:05:45 -!- sp3tt has joined.
17:27:35 -!- digital_me has joined.
17:40:14 -!- jix_ has quit (Read error: 110 (Connection timed out)).
18:34:27 -!- Asztal has joined.
18:40:39 * SimonRC finds the worlds silliest savant ability. Photographic memory of telephones: http://www.spinnoff.com/zbb/viewtopic.php?p=456141#456141
18:54:55 <bsmntbombdood> whoa, compiled with O0, 1.66 seconds; compiled with O3, .12 seconds
18:58:29 * SimonRC goes to dinner (about 2m away).
19:00:44 <lindi-> bsmntbombdood: what program is that?
19:10:51 -!- jix_ has joined.
19:26:00 <lindi-> vm could be optimized a lot :)
19:28:33 <lindi-> "./vm loop.x" segfaults
19:34:17 -!- anonfunc has joined.
19:53:42 -!- digital_me has quit ("Lost terminal").
19:54:42 -!- digital_me has joined.
20:02:17 -!- tgwizard has quit (Remote closed the connection).
20:48:21 -!- Asztal has quit ("Chatzilla 0.9.75 [IceWeasel 1.0.1b2] (kidding!)").
21:14:42 <GregorR> Is this particular variation of OISC MISC or something else?
21:14:53 <GregorR> Since OISC isn't well-defined, but MISC is :P
21:18:59 <jix_> subskin is the best oisc
21:20:36 <bsmntbombdood> except this is subtract and branch if not positive
21:20:54 <jix_> well subskin uses a different way of addressing
21:21:07 <jix_> like every thing is a pointer... not a word to select which kind it is
21:21:41 <jix_> http://esolangs.org/wiki/Subskin
21:23:16 <bsmntbombdood> wow m=readlines.map{|e|e.hex};loop{m[1]<0||$><<m[1].chr&&m[1]=-1;m[2]<0&&m[2]=STDIN.getc||256;a,b,c=m[m[0],3];q=(m[c]=m[a]-m[b])<0?6:3;m[0]+=q}rescue 0
21:28:39 <jix_> mine is the coolest
21:28:43 <jix_> the übercoolest
21:30:01 * jix_ likes his christmas presents
21:31:40 <jix_> in fact you must
21:32:54 <jix_> bsmntbombdood: why?
21:33:24 <jix_> bsmntbombdood: nah at least give a reason
21:34:16 <jix_> bsmntbombdood: give a reason
21:34:29 <jix_> bsmntbombdood: no you arn't
21:34:47 <jix_> in fact you think that the earth is made out of carrot juice
21:35:17 <jix_> ok let's stop this ;)
21:44:14 -!- Asztal has joined.
21:47:38 -!- Asztal has quit (Client Quit).
21:51:58 -!- ihope has joined.
21:53:01 <ihope> You know, plenty of programming languages out there just aren't very good.
21:53:28 <ihope> Here's one that seems to have no way of storing data.
21:54:46 * jix_ is still in love
22:09:59 <jix_> bsmntbombdood: no not with you
22:13:42 -!- ihope has quit ("Leaving").
22:15:15 -!- ihope has joined.
22:15:29 <ihope> That didn't do what I expected.
22:39:32 -!- Asztal has joined.
23:04:29 -!- anonfunc has quit (Remote closed the connection).
23:17:37 <jix_> but i stole it
23:17:52 * jix_ is in love for the first time.....
23:19:19 <jix_> it's kind of strange
23:22:26 <Asztal> In love with anything in particular, or just generally in love?
23:34:59 <GregorR> http://www.stileproject.com/hotty.html < This girl (don't click the link you sick bastards)
23:36:02 <jix_> i guess not that girl
23:48:03 <jix_> and i am still in love.....
23:48:38 <jix_> bsmntbombdood: yeah
23:48:43 <jix_> but i can't think of anything else
23:49:21 <GregorR> How about helping me improve Plof's array syntax.
23:49:26 <jix_> bsmntbombdood: she is on ski vacation
23:49:38 <jix_> bsmntbombdood: and i wouldn't do such things anyway....
23:50:04 <jix_> bsmntbombdood: i love her.... i'm not searching porn or something..... there is a BIG difference
23:50:40 <GregorR> bsmntbombdood: Basically awful, the only way to create an array is var foo = newarray(somecontent);
23:51:30 <GregorR> Except you can't create them as dynamically.
23:51:43 <GregorR> Well, you can expand them dynamically.
23:51:55 <GregorR> You can't create them as dynamically as in PHP.
23:51:58 <jix_> stupid ski vacation.....
23:52:05 <GregorR> Argh, CGI:IRC == lag a l'extreme
23:53:09 <GregorR> Well, in PHP, IIRC, you can do things like:
23:53:16 <jix_> like when she was here i didn't know what to do...
23:53:19 <GregorR> And then $foo will magically be an array
23:53:20 <jix_> now i know i can't do anything
23:53:24 <jix_> which is much worse
23:55:07 <jix_> pff you are mean
23:55:12 <bsmntbombdood> GregorR: So, you have to declare them like any other variable in plof...
23:55:34 <GregorR> bsmntbombdood: Yeah, I guess they're not as bad as I think XD
23:55:49 <GregorR> Idonno, I guess in my head it was worse than it actually is :P
23:56:25 <jix_> were you never in love?