←2008-11-05 2008-11-06 2008-11-07→ ↑2008 ↑all
00:32:24 -!- Corun has quit (Remote closed the connection).
00:32:39 -!- Corun has joined.
00:41:26 -!- optbot has set topic: the entire backlog of #esoteric: http://tunes.org/~nef/logs/esoteric | oh ok.
00:43:45 -!- Corun has left (?).
01:36:17 -!- Slereah_ has joined.
01:36:21 <Slereah_> GUBMENT
01:36:22 <Slereah_> JEWS
01:36:27 <Slereah_> RON PAUL
02:26:11 -!- Sgeo has joined.
02:45:06 -!- GreaseMonkey has joined.
02:46:34 -!- Slereah has joined.
02:52:57 <GregorR> Slereah_: DAH GUBMENT JEWED MY RON PAUL?
02:54:01 <Slereah> You know how the gub is
03:00:37 <bsmntbombdood> RON PAUL AND DENNIS KUCINICH IN 2012
03:01:35 <GregorR> RON PAUL AND FIDEL CASTRO'S REANIMATED CORPSE IN 2012
03:01:53 <Slereah> RON PAUL AND RON PAUL IN 2012
03:02:02 <Slereah> Can you nominate yourself as vice president?
03:02:29 <bsmntbombdood> ron paul will be senile by 2012
03:02:42 <GregorR> Ron Paul is functionally no better than senile already.
03:10:02 -!- Slereah_ has quit (Read error: 110 (Connection timed out)).
03:36:21 -!- warrie has joined.
03:36:46 <warrie> Without objection, I intend to ratify the following report: "#esoteric is about politics."
03:37:43 <GregorR> I object.
03:38:31 -!- Sgeo_ has joined.
03:38:39 <warrie> You can't object, you're not a player.
03:38:59 <warrie> Register, then you'll be able to object.
03:39:44 <GregorR> I object to your suggestion that I must register to object.
03:40:45 <warrie> It's not a suggestion, it's a rule.
03:41:25 <GregorR> I'm not playing your game, and as such I am not following your rules. Since I am not following your rules, I may object to anything you say for any reason. Since I'm not playing by your rules, my objections have no bearing on anything.
03:41:39 <warrie> Oh. Darn.
03:43:31 <GregorR> I object to your motion to darn.
03:43:45 -!- cmeme has quit (Read error: 60 (Operation timed out)).
03:44:55 <warrie> I object to your interpretation of my interjection.
03:47:58 <GregorR> I object to your objection of the interpretation of your interjection leading to my objection of your response to my assertion defying your declaration arguing against my objection of your complaint at my objection.
03:49:08 <warrie> I object to everything.
03:49:13 -!- Sgeo has quit (Read error: 110 (Connection timed out)).
03:49:32 <GregorR> I OBJECT TO NOTHING!!!
03:50:30 <GregorR> Well, that was fun :P
03:51:35 <warrie> Very.
03:51:56 <warrie> Let us now take pictures of skulls among junk.
03:52:31 <GregorR> "Only one store has been a part of your life for 150 years."
03:52:38 <GregorR> That line in this commercial is so stupid :P
03:52:44 <GregorR> It is literally not true of /anyone/.
03:53:48 * warrie sends the picture, which, presumably, puts it somewhere
03:55:15 <warrie> I wish this phone had a "what the heck does that flashing icon mean" button.
03:59:00 <warrie> Well, that didn't work.
03:59:06 * warrie tries to plug his phone into his computer
04:00:14 <GregorR> * warrie's computer explodes
04:01:23 <warrie> What's that in Spanish? "calavera"?
04:03:46 <warrie> I'll take your silence as meaning "Yes, Master."
04:09:16 -!- calamari has joined.
04:09:26 <calamari> hi
04:09:43 <calamari> saw this on slashdot: http://slashdot.org/comments.pl?sid=1019609&cid=25649459
04:10:33 <warrie> Ello.
04:12:48 <GregorR> Almost certainly not turing complete, no unbounded loops or recursion.
04:16:11 -!- Leonidas_ has joined.
04:16:25 <calamari> no recursion? hmm .. you may be right
04:21:42 <GregorR> Also, 'find' isn't really useful in it unless you can create files and directories, for which you need mkdir and (something akin to) touch.
04:24:00 <calamari> so if we changed things.. sh and ; can help with recursion
04:27:29 -!- Leonidas has quit (Read error: 110 (Connection timed out)).
04:27:40 <calamari> GregorR: so does Facebook still make you sick?
04:28:18 <GregorR> calamari: It has one (1) useful feature.
04:28:33 <calamari> wasting time?
04:29:07 <GregorR> I was referring to the event planning :P
04:35:10 -!- Sgeo_ has quit (Remote closed the connection).
04:41:40 -!- sebbu2 has joined.
04:42:46 -!- Slereah has quit (kornbluth.freenode.net irc.freenode.net).
04:42:46 -!- sebbu has quit (kornbluth.freenode.net irc.freenode.net).
04:42:47 -!- sebbu2 has changed nick to sebbu.
04:48:22 -!- Slereah_ has joined.
04:55:20 -!- calamari has quit ("Leaving").
04:57:32 -!- warrie has quit (Read error: 104 (Connection reset by peer)).
05:42:06 <oklopol> what did he mean? that it's tc to pipe them? because that's basically max(map(computational_power,["find","xargs","grep"]))
06:13:46 -!- ab5tract has joined.
06:17:20 -!- Judofyr has joined.
06:32:29 -!- ab5tract has quit.
06:35:35 -!- Judofyr has quit.
06:41:26 -!- optbot has set topic: the entire backlog of #esoteric: http://tunes.org/~nef/logs/esoteric | cheap!.
07:59:59 -!- clog has quit (ended).
08:00:00 -!- clog has joined.
08:09:14 -!- oerjan has joined.
08:18:13 <AnMaster> morning
08:18:30 <oerjan> good moaning
08:22:04 <fizzie> Re the stack things, of course it's trivial to do the guard pages portably, with mprotect; didn't realize (I blame tiredness) it can set individual pages out of a larger mapping.
08:26:58 <AnMaster> fizzie, heh
08:31:12 <fizzie> Currently I'm wondering why the underflow handling seems to work even though I've only implemented one half (resetting ESI correctly), not the other (setting to zero the target register). It might be just luck, those target registers might be zero at that time anyway. Also, 1+\..a,@ prints out "1 0 " instead of "0 1 ", but that seems to be a bug in the generated code already.
08:35:15 -!- GreaseMonkey has quit ("Unisex.").
09:13:26 <AnMaster> fizzie, how would that part work on other platforms?
09:13:35 <AnMaster> I mean sure I can see how you could port the code generation
09:13:46 <AnMaster> but I'm not so sure about the segfault handling
09:13:54 <AnMaster> it seems extremely fragile
09:15:22 <fizzie> I'm sure something similar is implementable on most archs; if not, then the code generation can generate plain old explicit checks for underflow.
09:15:30 <AnMaster> ah
09:15:50 <AnMaster> fizzie, by the way I tested open64, it can compile cfunge
09:15:53 <fizzie> I just think most architectures have something to handle dynamic stack-enlargening in Real Programs (tm).
09:17:11 <fizzie> I just spent more than a minute wondering why "00g.a," printed out 48 instead of 32, before I realized that the space isn't empty at start, there's that program inside it. "Heh."
09:18:03 <AnMaster> hah
09:18:22 <AnMaster> fizzie, does it handle wrapping?
09:18:44 <fizzie> Sure, in the tracing code. Don't think I have tested it at all, though.
09:18:56 <AnMaster> hm mycology will test it
09:19:13 <AnMaster> fizzie, what about a _ at the edge then?
09:19:37 <fizzie> I don't see anything special about _ at the edge.
09:19:41 <AnMaster> hm ok
09:19:45 <fizzie> The next trace will start at the edge and wrap.
09:19:49 <fizzie> (Hopefully.)
09:20:02 <AnMaster> fizzie, right, how far does it get in mycology now?
09:20:21 <AnMaster> fizzie, oh and I suppose \ is turned into a single XCHG or something like that?
09:21:04 <fizzie> Actually in most cases \ just changes the registers used by later instructions; I don't keep things on stack unless I have to.
09:21:26 <fizzie> But a plain old \ by itself currently does pop+pop+push+push; I'll think about optimizations later on, maybe.
09:22:38 <AnMaster> fizzie, it could be turned into a single XCHG I believe
09:22:41 <fizzie> (Basically a trace containing only a \ will automagically generate stack loads into virtual registers r0, r1; then the \ instruction just changes the order of those in a list; and hitting the end of trace will generate those two push instructions because it needs to flush things back on stack.
09:23:24 <fizzie> Sure, although I'm not completely sure how my stack underflow thing will survive it.
09:24:50 <AnMaster> fizzie, heh
09:24:55 <fizzie> Still, I can special-case a bit depending on the opcode that caused the underflow.
09:25:13 <fizzie> What I really don't see is why this underflow thing stubbornly keeps working even though I haven't really implemented it completely.
09:25:48 <AnMaster> fizzie, heh
09:26:44 <fizzie> I have 9 in ecx; then I do a "mov ecx, [esi]" which causes a segfault; when I restore the context, ecx automagically seems to be zero, even though I don't mangle the saved context at all.
09:27:20 <fizzie> I'm not sure how well-defined things like that are. Should probably read some processor manuals to find out.
09:28:11 <AnMaster> hah
09:28:27 <AnMaster> fizzie, could depend on OS too?
09:28:55 <fizzie> Also if I do a "lodsd" instruction (which does ax <- [esi] and auto-post-decrements esi), and the read from [esi] causes a fault, I'd like to know whether esi is still decremented.
09:28:55 <AnMaster> fizzie, since a segfault would go through the kernel
09:28:59 <AnMaster> pretty sure it would
09:29:21 <fizzie> Sure, it's the kernel who packages the context up and sends a signal.
09:29:32 <AnMaster> fizzie, what about out of order execution?
09:29:40 <AnMaster> that could probably mess up this a lot
09:29:47 <AnMaster> since modern CPUs reorder instructions
09:31:07 <AnMaster> fizzie, or?
09:31:08 <fizzie> Well, I don't think they're allowed to do that too much so that observable semantics change.
09:31:49 <fizzie> Admittedly the exact happenings on a page fault are a bit of a border case.
09:31:56 <AnMaster> fizzie, well "not for normal use", but I think a fault isn't that
09:32:04 <AnMaster> indeed
09:32:48 <AnMaster> fizzie, if it didn't matter instructions such as MFENCE wouldn't exist
09:36:48 <fizzie> I'm hoping a page fault will do the sensible things re flushing/serializing stuff. Will worry about the details later.
09:49:08 -!- jix has joined.
10:00:27 <fizzie> What I'm not quite sure is to have to deal with a self-modifying 'p' while retaining the "constant-location-g/p access is as fast as variables" behaviour. On code-generation time, I can't be sure if that particular location will later become part of something executable. I guess I could keep a list of all constant-p references to any cells, and when tracing, invalidate those pieces of compiled code that need changes.
10:00:36 <fizzie> s/have/how/
10:25:47 -!- jix has quit ("CommandQ").
10:32:29 <fizzie> Curious, after "GOOD: 8*0 = 0" I now get an infinite number of newlines from mycology.
10:32:45 <fizzie> Yesterday it correctly printed out "GOOD: # < jumps into <".
10:33:09 <AnMaster> fizzie, well the way you do that stuff it won't be easy to debug
10:35:51 <fizzie> Indeed. Well, I could dump out the generated code every time it traces things, to see if that helps any. It will probably generate quite a lot of output, though.
10:37:27 <AnMaster> fizzie, you could insert trace calls or something?
10:37:48 <AnMaster> I mean, on the fly
10:38:07 <fizzie> I guess I could, reasonably easily even.
10:38:15 <AnMaster> may not help a lot though
10:39:25 <AnMaster> fizzie, for scripted interpreters I found that doing something such as having a known good implementation dump traceoutput
10:39:35 <AnMaster> then your new one dump trace in the same format
10:39:38 <AnMaster> diff the output
10:39:39 <AnMaster> compare
10:39:45 <AnMaster> err s/scripted//
10:39:53 <AnMaster> but for JIT that may not help a lot
10:40:15 <AnMaster> fizzie, anyway the point is diffing trace output and see where it begins to differ
10:41:09 <AnMaster> fizzie, for example cfunge at -t 4 should work for that
10:41:14 <AnMaster> tix=0 tid=0 x=0 y=0: 9 (57)
10:41:14 <AnMaster> tix=0 tid=0 x=1 y=0: 1 (49)
10:41:14 <AnMaster> tix=0 tid=0 x=2 y=0: + (43)
10:41:14 <AnMaster> tix=0 tid=0 x=3 y=0: " (34)
10:41:26 <AnMaster> (tid and tix are got threads so ignore that)
10:41:50 <fizzie> The constant-folding part will make that a bit difficult; of course I could dump some trace output already before code-generation, but at that point I don't have the stack available. But I would get the "where did the IP go" trace, at least.
10:42:06 <AnMaster> ah
10:42:15 <AnMaster> fizzie, for stack in cfunge you would want -t 9
10:42:30 <AnMaster> shows top 5 elements iirc
10:42:44 <AnMaster> tix=0 tid=0 x=0 y=0: 9 (57)
10:42:45 <AnMaster> Stack is empty.
10:42:45 <AnMaster> tix=0 tid=0 x=1 y=0: 1 (49)
10:42:45 <AnMaster> Stack has 1 elements, top 5 (or less) elements:
10:42:45 <AnMaster> 9
10:42:45 <AnMaster> tix=0 tid=0 x=2 y=0: + (43)
10:42:47 <AnMaster> Stack has 2 elements, top 5 (or less) elements:
10:42:49 <AnMaster> 1 9
10:43:27 <AnMaster> fizzie, anyway diffing trace output to "known" good have helped me a lot when working on efunge
10:44:56 <fizzie> It seems to end up in a >:#,_ print loop, printing infinite newlines. I'm guessing it might even be finally the stack undeflow thing not returning zero; but I'd like a bit smaller test case than mycology for that.
10:45:21 <AnMaster> right
10:45:34 <AnMaster> well that helps you somewhat at least :)
10:46:55 <fizzie> Hey, yay. A single a"yay">:#,_@ loop will also print infinite newlines; after popping that a, it seems to pop and pop and pop and pop.
10:47:15 <AnMaster> heh
10:49:12 <oerjan> once you pop, you can't stop
10:49:16 <AnMaster> haha
10:50:47 <fizzie> Hmph, I don't know gdb enough to make a breakpoint inside an overloaded C++ operator. Maybe the line number will work.
10:50:58 <AnMaster> fizzie, file.cc:554
10:51:01 <AnMaster> for example
10:51:03 <AnMaster> should work
10:51:44 <fizzie> Yes, seems to.
10:52:40 <AnMaster> only issue if you have two files with the same name, then gdb always manage to interpret it as the other file, not the one you wanted
10:53:08 <AnMaster> (this can happen if you built some library with debugging info for example)
10:53:39 <fizzie> Heh.
10:53:44 <fizzie> (gdb) disassemble 0xf7ee8023
10:53:44 <fizzie> No function contains specified address.
10:53:55 <fizzie> Right, I just want them bytes.
10:54:16 <AnMaster> hm?
10:54:27 <fizzie> I guess the two-argument form will disassemble for me without finding a function.
10:54:28 <AnMaster> fizzie, change language mode to asm or such
10:54:31 <AnMaster> I think that may work
10:54:36 <AnMaster> or that
10:55:24 <AnMaster> fizzie, btw how do you jump into the generated code?
10:55:35 <fizzie> Cast to a function pointer and call it.
10:55:43 <AnMaster> ah, right
10:56:07 <AnMaster> hm that is a sure way to confuse any debugger I can think of...
11:01:21 <AnMaster> fizzie, do you think it will build as a Position Independent Executable (PIE)?
11:01:30 <AnMaster> hm it does
11:01:47 <AnMaster> which I didn't expect
11:01:58 <fizzie> Sure, since the compiler doesn't know about the code-generation part, and the addresses and such are known at the time when it actually does the code-generation.
11:02:03 <AnMaster> ah
11:02:36 <AnMaster> fizzie, thought the pie offset thingy register would have messed up for you
11:05:07 <fizzie> Oh, founded the bug. There's a "peek" instruction (I combine a pop+push into a peek) which reads from below the stack; the segfault handler accidentally increments the stack pointer there too, even though it wasn't actually decremented.
11:05:26 <AnMaster> fizzie, hm possible to fix?
11:05:55 <AnMaster> heh while valgrind may work, it seems mudflap doesn't
11:06:00 <AnMaster> over 1000 warnings
11:06:56 <AnMaster> ah MUDFLAP_OPTIONS="-heur-proc-map" makes it work
11:12:12 -!- oerjan has quit ("leaving").
11:24:26 <fizzie> Phew, fixed that bug. Now it looks at the opcode which caused the stack fault and sets the target register to zero; and also at the next opcode to avoid decrementing the stack pointer after resetting it.
11:26:37 -!- Corun has joined.
11:35:25 -!- Leonidas_ has changed nick to Leonidas.
12:41:26 -!- optbot has set topic: the entire backlog of #esoteric: http://tunes.org/~nef/logs/esoteric | Reloaded..
12:44:35 -!- Jiminy_Cricket has quit (Read error: 110 (Connection timed out)).
12:57:40 <fizzie> There is the self-modifying 'p', although I guess it's a bit buggy still. Mycology doesn't complain about "p doesn't modify space" now, but "BAD: 900pg doesn't get 9" even though running "900pg.a,@" does print out 9.
13:05:10 <AnMaster> fizzie, nice, updated the snapshot?
13:08:18 <fizzie> Did now, but don't expect much to work yet either.
13:09:33 <AnMaster> src/interp.cc: In constructor 'jitfunge::Stack::Stack()':
13:09:34 <AnMaster> src/interp.cc:159: warning: missing initializer for member 'sigaction::__sigaction_handler'
13:09:34 <AnMaster> src/interp.cc:159: warning: missing initializer for member 'sigaction::sa_mask'
13:09:34 <AnMaster> src/interp.cc:159: warning: missing initializer for member 'sigaction::sa_flags'
13:09:34 <AnMaster> src/interp.cc:159: warning: missing initializer for member 'sigaction::sa_restorer'
13:10:27 <AnMaster> http://rafb.net/p/LDH6i265.html is all the warnings
13:10:36 <AnMaster> fizzie, hm nice
13:11:40 <AnMaster> fizzie, nice I don't know how you manage to mess up mycorand so much...
13:11:46 <AnMaster> ? was met 1 times
13:11:48 <AnMaster> heh
13:12:07 <fizzie> I don't think I implement ? at all. Not sure.
13:12:14 <AnMaster> fizzie, it thinks it was ^
13:12:32 <AnMaster> but afaik mycorand should loop until it had at least one of each direction
13:12:33 <ehird> Hi fizzie .
13:12:35 -!- Corun has quit ("This computer has gone to sleep").
13:12:38 <AnMaster> hi ehird
13:13:05 <fizzie> 900pg 9-!| leaves down instead of up. That's a nice bug too. Debugging this isn't very pleasant.
13:13:11 <fizzie> ehird: Hello.
13:18:05 <AnMaster> fizzie, where is the debug output generated?
13:25:11 <fizzie> Ooh: "GOOD: 900pg gets 9", "GOOD: p modifies space". Then it hangs up.
13:25:22 <AnMaster> hangs up?
13:25:31 <fizzie> Well, an infinite loop is my guess.
13:25:41 <AnMaster> trace? :)
13:30:45 <fizzie> At (5,17), heading left. Maybe a wrapping issue or something. It seems to bounce off the edge for some strange reason: it sees two $s and an _, instead of wrapping.
13:31:12 <fizzie> The debug output isn't written anywhere just yet, it's just one line I've been commenting/uncommenting. I'll add a command-line flag for it in the next revision.
13:31:26 <fizzie> I think I'll try to get the wrapping right first, though.
13:33:35 <ehird> fizzie: Can I test it on OS X again?
13:33:35 <ehird> :P
13:34:11 <AnMaster> ehird, did it work last time?
13:35:45 -!- Corun has joined.
13:35:47 <fizzie> I haven't removed the mremap or changed the hashmappery, so I doubt it'll work any better.
13:38:12 <fizzie> Oh, it wraps just fine, it's just the \r\n newlines of mycology leaving a \r there, which it reflects from.
13:38:20 <AnMaster> fizzie, hashmappery?
13:38:38 <AnMaster> fizzie, then you need to fix your loading ;)
13:40:35 <fizzie> There was some C++ template error from my use of <tr1/unordered_map> on OS X.
13:41:00 <fizzie> Loading is fixed, but mycology crashes at the same point: "unrecognized opcode in stack underflow".
13:41:04 <fizzie> That's a curious one.
13:44:26 <AnMaster> fizzie, hm what gcc version did you say you used?
13:44:44 <fizzie> 4.3.2, I think.
13:44:51 <fizzie> Hmm, it's a stack underflow when pushing. That's creative.
13:45:10 <AnMaster> fizzie, underflow when pushing, how did you manage that?
13:46:40 <ehird> fizzie: let me know when it's ready to implement fingerprints
13:46:41 <ehird> :-P
13:51:54 <fizzie> Oh, right. A $ does not read from the stack (because it's a useless memory read), it just decrements the stack pointer reg; so the next push will cause the stack underflow check to fire. Well, that's... somewhat easy to fix. I think.
13:56:15 <AnMaster> fizzie, depending on the program this faulting instead of checking bounds could be a lot slower
13:56:17 <AnMaster> or faster
13:56:46 <fizzie> I think most programs do not do stack underflow much. At least my programs, anyway.
13:56:50 -!- Corun has quit ("This computer has gone to sleep").
13:57:18 <fizzie> Yay: Befunge-98 detected. GOOD: wraparound works, GOOD: a pushes 10, GOOD: b-f push 11-15, GOOD: [ turns left, GOOD: ] turns right, GOOD: instructions between ; are skipped, UNDEF: # across left edge hits easternmost cell in file, UNDEF: # across left edge hits easternmost cell on line, BAD: k reflects
13:57:32 <fizzie> Well, it's again few steps further.
13:57:53 <fizzie> Haven't done 'k' yet; it will probably not be very pleasant, at least to get all the corner cases right.
14:00:23 -!- Slereah_ has quit (Read error: 113 (No route to host)).
14:03:08 -!- Corun has joined.
14:07:06 -!- Corun has quit (Client Quit).
14:10:56 <AnMaster> fizzie, cfunge have a bunch of test programs for k
14:11:05 <AnMaster> for the stuff mycology doesn't test
14:11:27 <AnMaster> fizzie, uploaded a new snapshot?
14:12:11 <fizzie> Now, yes.
14:12:34 <fizzie> You can run it as "jitfunge file.b98 -d" to make it dump the traces it generates.
14:12:38 <fizzie> (To stderr.)
14:12:59 <fizzie> I'll add getopt'd command line arguments when I have something that actually works.
14:13:50 <comex> oh god jitfunge
14:15:39 <AnMaster> fizzie, hm it seems slower than profile feedback compiled cfunge at life.bf
14:15:59 <AnMaster> oh wait I can't compare 32-bit to 64-bit
14:17:01 <fizzie> What, do you mean it actually runs life.bf?
14:17:10 <AnMaster> fizzie, yes it does
14:17:26 <fizzie> That's really strange.
14:17:31 <AnMaster> output seems correct as far as I can tell
14:17:38 <AnMaster> fizzie, why?
14:17:51 <AnMaster> it is b93
14:17:56 <AnMaster> and you pass that section you said
14:18:11 <AnMaster> since you get to k
14:18:30 <AnMaster> though it is fast on life.bf
14:18:49 <fizzie> Yes, but even the ()-parsing part of underload.b98 (which doesn't involve any fingerprints) has some infinite-loopy bug.
14:19:13 <AnMaster> there is no ( or ) in life.bf
14:19:32 <AnMaster> fizzie, it fails at prime.bf however
14:19:33 <AnMaster> with:
14:19:35 <AnMaster> error: FIXME register spill
14:19:41 <fizzie> I mean the underload ().
14:19:56 <fizzie> Heh.
14:20:17 <AnMaster> pi2.bf -> floating point exception
14:20:26 <AnMaster> divide by zero?
14:20:32 <AnMaster> do you handle that correctly
14:20:44 <fizzie> No, I don't.
14:20:49 <AnMaster> fib.bf cause
14:20:50 <AnMaster> unexpected SIGSEGV; dying...
14:20:50 <AnMaster> Aborted
14:21:07 <AnMaster> fizzie, but yes it somehow manages life.bf
14:21:08 -!- jix has joined.
14:21:53 <fizzie> I see. Heh.
14:22:01 <AnMaster> wumpus.bf cause infinite loop I think
14:22:13 <AnMaster> it just locks up
14:23:31 <AnMaster> fizzie, oh nice you don't do error checking on input, I typoed and ran it on a directory
14:23:37 <AnMaster> it seemed to actually try to execute that
14:24:14 <AnMaster> fizzie, oh and if I run it under valgrind it fails at life.bf
14:24:23 <fizzie> I think it just executes some empty space in that case.
14:24:31 <fizzie> (The directory-as-input one, that is.)
14:24:39 <AnMaster> just dots for output and lots of valgrind errors
14:24:47 <AnMaster> so valgrind affect the behaviour too there
14:25:18 <AnMaster> in fact it breaks under valgrind all the time
14:25:23 <AnMaster> like stack underflow
14:25:26 <fizzie> That's not terribly surprising.
14:25:47 <AnMaster> fizzie, hm valgrind is useful for debugging, but I guess you will solve that in some other way
14:26:09 -!- Corun has joined.
14:27:44 <AnMaster> fizzie, um mycouser.b98 says it handles division by zero
14:27:58 <AnMaster> or is that just the constant folder?
14:28:46 <fizzie> Yes, that part does it correctly.
14:29:15 <AnMaster> fizzie, inputting a newline to the char test in mycouser acts oddly
14:29:19 <AnMaster> as in just pressing enter
14:29:29 <AnMaster> first it says 10, right, but then it waits for another newline
14:29:35 <AnMaster> wait *checks with cfunge*
14:29:50 <AnMaster> ah no
14:29:55 <AnMaster> it is mycology's "fault"
14:36:03 <fizzie> (build/jitfunge life.bf > life.txt &); sleep 20 ; killall jitfunge ; ls -l life.txt generates around 8.5 megabytes of output, compared to ~2.7 megs from cfunge (32bit, -O3, no fancy flags), here. I'm not sure jitfunge is in a benchmarkable state yet, though.
14:37:08 <oklopol> fizzie: are you making something like a befunge compiler?
14:37:28 <fizzie> oklopol: It's an interpreter which does just-in-time compilation to native x86 code.
14:37:50 <oklopol> oh to x86? you use like gcc or smth?
14:38:01 <fizzie> No, I just write some bytes.
14:38:07 <oklopol> cool
14:38:38 <fizzie> The generated code is quite non-optimal, though.
14:39:11 <AnMaster> fizzie, here I get around 5.2 MB from each
14:39:21 <AnMaster> 64-bit cfunge
14:39:26 <AnMaster> with 32-bit fungespace
14:39:37 <AnMaster> profile feedback compiling
14:39:59 <AnMaster> gcc 4.1.2
14:40:15 <fizzie> Right, the cfunge build I did is probably 64-bit too, I just turned USE_64BIT off.
14:41:44 <AnMaster> fizzie, hm ok
14:42:15 <AnMaster> fizzie, well for me both generates around 5 MB, sometimes slightly more for cfunge, sometimes more for jitfunge
14:42:17 <AnMaster> very even
14:42:28 <AnMaster> but that is profile feedback so...
14:44:12 <AnMaster> fizzie, with just plain -O3 for both I get results close to your
14:44:49 <AnMaster> 5 mb from jitfunge, around 1.8 from cfunge
14:45:10 <AnMaster> fizzie, however I don't know how large setup time jitfunge needs. cfunge have quite a bit of setup time
14:45:18 <fizzie> GCC is pretty good at the optimization game, compared to my code generation.
14:45:29 <AnMaster> oh yes it is
14:45:38 <jix> hmm optimization game => the game => i just lost it :(
14:45:40 <AnMaster> hm icc wouldn't help this is amd...
14:45:57 <ehird> jix: agh, ditto
14:46:10 <AnMaster> fizzie, oh and my build ifdefs out tracing there ;)
14:46:32 <jix> yesterday my gf made me lose the game 5 times... :(
14:46:39 <AnMaster> fizzie, and also disables threads, another speedup
14:50:36 <fizzie> There's quite a lot of small code snippets generated for life.bf, increasing the overhead there. Every time there's a branch or a merging of two code paths, jitfunge splits the code to separate functions there.
14:51:31 <jix> you try to jit compile befunge?
14:51:44 <AnMaster> fizzie, you may want to do superblock optimising
14:51:51 <AnMaster> jix, he isn't trying, he is doing it
14:51:54 <fizzie> I'm not sure "try" is the right verb here, since it already does life.bf.
14:51:55 <AnMaster> seriously
14:52:09 <jix> -try then :)
14:52:26 <AnMaster> "you to jit compile befunge"?
14:52:33 <AnMaster> maybe -to as well
14:52:37 <jix> yeah -_-
14:54:40 <fizzie> It would be better to generate longer pieces of code, and jumps into them, but that's trickier.
14:55:20 <AnMaster> fizzie, heh
14:55:33 <AnMaster> fizzie, better get it working properly before you start optimising like that?
14:58:08 <fizzie> Probably, yes.
14:59:59 <fizzie> Although I would probably get significantly longer snippets of code simply by always assuming either the true or false branch from an if, and continuing the trace that way.
15:00:19 <fizzie> Given that it's JIT, I should probably be collecting some statistics and doing branch prediction that way.
15:02:44 <AnMaster> fizzie, or compile it to code with a jump in?
15:03:15 <ehird> hey jix
15:03:17 <ehird> THE GAME
15:03:45 -!- Corun has quit ("This computer has gone to sleep").
15:03:58 <AnMaster> fizzie, I mean, compile both paths with a compiled jne instruction or such at the |
15:04:05 <AnMaster> or je
15:06:11 <fizzie> Then I would really have to think harder when recompiling parts of code, since it would not be a distinct function I could just discard.
15:06:31 <fizzie> But sure, a single generated mess of code with jumps around would have less overhead.
15:06:57 <AnMaster> fizzie, you may have to discard several ones already
15:07:12 <ehird> fizzie: how fast is it? :p
15:07:26 <AnMaster> fizzie, for example suppose one cell is hit with two different deltas. then a p changes the value there
15:07:38 <AnMaster> then you have to discard multiple ones
15:08:31 <jix> ehird: nargh
15:11:36 <fizzie> Yeah, sure, but I can discard them easily and let the interpreter recompile when it notices it doesn't have code for that part.
15:11:55 <AnMaster> fizzie, hm ok true
15:12:08 <ehird> Ohh, fizzie HASN'T been monologuing this whole time
15:12:23 <ehird> That makes things less confusing
15:14:04 <AnMaster> fizzie, if you discard some jitted code, and the jitted code is placed in a mmaped region, how do you allocate new ones, try to find the first hole large enough?
15:14:06 <AnMaster> or?
15:15:16 <fizzie> Away for a while.
15:15:20 <AnMaster> cya
15:52:27 -!- Corun has joined.
15:52:35 -!- Corun has quit (Client Quit).
16:04:17 <ehird> [[
16:04:17 <ehird> Mind Control
16:04:18 <ehird> Doctors from the Association of American Physicians and Surgeons have stated that Obama uses techniques of mind control in his speeches and campaign symbols. For example, one speech declared, "a light will shine down from somewhere, it will light upon you, you will experience an epiphany, and you will say to yourself, 'I have to vote for Barack.'"[19] The doctors observe that "Obama's logo is noteworthy. It is always there, a small one in the middle of the pod
16:04:19 <ehird> ]]
16:04:21 <ehird> -- Conservapedia
16:04:36 <ehird> [[If elected, Obama would likely become the first Muslim President, and could use the Koran to be sworn into office.]] - also conservapedia
16:15:16 <jayCampbell> makes liberal conspiracy theories seem almost tame
16:18:00 -!- Corun has joined.
16:20:02 <jayCampbell> also from that site, "World Bank Group.s computer network has been compromised by cybercriminals"
16:20:40 <jayCampbell> their book section is full of real winners too
16:21:00 <jayCampbell> "HMOs are not "free market" alternatives, but rather an unholy partnership of government and corporate interests seeking monopolistic government protection to eliminate competition while changing the ethics of medicine from a Hippocratic ethic to a false corporate morality"
16:21:12 <ehird> dun dun DUUUUUUUUUNNNNNNNNNNN
16:22:53 -!- jix has quit ("CommandQ").
16:22:59 <jayCampbell> there was this awesome group last month running around in circles convincing themselves both candidates were Manchurian Candidates
16:23:03 <jayCampbell> awesome to watch, at least
16:25:47 -!- Corun has quit ("This computer has gone to sleep").
16:33:59 -!- Jiminy_Cricket has joined.
16:46:01 <jayCampbell> i missed bfbasic
16:46:08 <jayCampbell> that's nift
16:46:22 -!- Corun has joined.
16:47:35 -!- ab5tract has joined.
16:56:13 <AnMaster> hm?
16:58:25 -!- Hiato has joined.
17:05:03 -!- oklokok has joined.
17:06:35 -!- Hiato has quit ("Leaving.").
17:08:01 -!- Hiato has joined.
17:08:14 -!- comexk has joined.
17:09:25 -!- comex has quit (Read error: 104 (Connection reset by peer)).
17:09:29 -!- oklokok has quit (Client Quit).
17:11:31 -!- oklopol has quit (Read error: 145 (Connection timed out)).
17:24:54 -!- Sgeo has joined.
17:40:49 -!- Corun has quit ("This computer has gone to sleep").
17:41:00 -!- oklopol has joined.
17:41:53 -!- Hiato has quit ("Leaving.").
17:44:23 -!- Corun has joined.
18:17:41 -!- oerjan has joined.
18:21:11 <mbishop> wee l4d demo is fun
18:27:58 -!- Corun has quit ("This computer has gone to sleep").
18:33:56 -!- olsner has joined.
18:34:22 -!- Mony has joined.
18:37:55 <Mony> plop
18:37:59 <ais523> hi Mony
18:38:11 <Mony> hi ais523
18:41:26 -!- optbot has set topic: the entire backlog of #esoteric: http://tunes.org/~nef/logs/esoteric | ^bf ++++++[->++++++<]>>+[<.>[[[[[][][][][][][][][][][][][][][][][][][][][][][][]]]]]].
18:42:03 <fizzie> optbot!
18:42:04 -!- optbot has set topic: the entire backlog of #esoteric: http://tunes.org/~nef/logs/esoteric | cool page: http://www.angio.net/pi/piquery.
19:01:26 <fizzie> Meh, sensiblized the code generated by jitfunge, and managed to cut life.bf performance into 4 % (variant 1) or 30 % (variant 2) of what it used to be; the new system does generate longer pieces of code, but it ends up recompiling something all the time. I need a figure out a less complicated test case for the issue, though.
19:01:53 <ais523> fizzie: can you beat cfunge yet?
19:02:43 <fizzie> ais523: Well, the previous version was faster at life.bf with my setup; apparently with the right magical GCC flags (profile-guided optimization?) the life.bf speeds were just about even.
19:03:06 <ais523> ah, interesting
19:04:07 <fizzie> At least this current code-generation can turn >:#,_ into a function that actually does loop, instead of having a single function that is called (by the interpreter part) repeatedly for each character.
19:06:36 -!- Corun has joined.
19:09:36 -!- kar8nga has joined.
19:17:52 -!- KingOfKarlsruhe has joined.
19:34:34 -!- kar8nga has quit ("Leaving.").
19:41:05 <AnMaster> ais523, those magical flags included -fwhole-program -combine and -fprofile-use
19:41:09 <AnMaster> which explains a lot
19:41:24 <AnMaster> and it was x86_64 vs. x86
19:41:31 <AnMaster> which isn't fair really
19:46:17 <AnMaster> whoo I shaved another 0.10 seconds of mycology run time in cfunge. I think I may do even better
19:46:29 * AnMaster tries to rewrite the loop to make it easier to vectorise
19:47:30 <fizzie> I probably will be slow as heck in mycology, since I guess there's not much repeatedly executed stuff there.
19:50:14 <AnMaster> well mycology is where I'm really really really fast
19:50:36 <AnMaster> oh and very fast for an interpreter elsewhere
19:53:46 * AnMaster waits while -ftree-vectorizer-verbose=10 spews output
19:53:52 -!- KingOfKarlsruhe has quit (Remote closed the connection).
19:54:20 -!- Corun has quit ("This computer has gone to sleep").
19:55:33 <ais523> AnMaster: is that a gcc or icc option?
19:55:46 -!- KingOfKarlsruhe has joined.
19:55:58 <AnMaster> ais523, gcc
19:56:24 <AnMaster> it is interesting to see that gcc detects some possible vectorisations that icc doesn't as well as vice verse.
19:56:30 <AnMaster> spelling...
19:56:51 <oerjan> "versa"
19:57:29 <AnMaster> yep
19:57:58 <AnMaster> oerjan, at least in Swedish, but aspell doesn't like it in English
19:58:00 <AnMaster> hm
19:58:13 <AnMaster> ais523, oh and it needs -ftree-vectorize to do anything
19:58:22 <oerjan> it's latin
19:59:31 <AnMaster> oerjan, hm it is spelled vise versa in Swedish
19:59:36 <AnMaster> not vice versa
20:04:51 <AnMaster> ais523, oh and GCC generates faster programs on AMD64
20:04:59 <AnMaster> icc is faster on intel though
20:05:03 <AnMaster> no surprise there
20:05:08 <ais523> yep, not really surprising at all
20:05:47 <AnMaster> but icc is still useful on AMD, because it points out different issues and so on
20:07:32 <AnMaster> real 0m0.051s
20:07:32 <AnMaster> user 0m0.037s
20:07:32 <AnMaster> sys 0m0.011s
20:07:33 <AnMaster> whoo
20:07:57 <AnMaster> -march=k8 -msse3 -O3 -funroll-loops -DNDEBUG -fweb -ftracer -frename-registers -ftree-vectorize
20:08:06 <AnMaster> no I don't claim it is sane
20:08:17 <ais523> AnMaster: where are you directing the output, BTW?
20:08:23 <AnMaster> /dev/null
20:08:27 <ais523> ok
20:08:42 <ais523> have you optimised cfunge to detect output going to devnull and not output it?
20:08:47 <AnMaster> with output to konsole it is 0m0.087s
20:09:29 <AnMaster> ais523, hm I have, as far as I know, not added any stuff that would make one or the other slower as an effect of making the other one faster
20:09:35 <AnMaster> I try to check using both anyway
20:09:46 <AnMaster> but I run the timings I report to /dev/null
20:09:58 <AnMaster> they vary less
20:10:06 <AnMaster> so easier to compare with
20:10:40 <AnMaster> I mean with stdout the spread is about +/- 0.020 seconds but with /dev/null it is about +/- 0.010
20:13:13 <AnMaster> real 0m0.043s
20:13:15 <AnMaster> nice
20:13:20 <AnMaster> that is a profile feedback build
20:15:08 <AnMaster> and if I run with env -i PATH=/bin:/usr/bin TERM=$TERM it is reduced to around 0.025 seconds
20:20:13 <fizzie> I don't get this; I changed completely unrelated things, but now it doesn't have the life.bf "causes recompilations all the time" issue, and does 10.6 megabytes of life.bf output in 20 seconds.
20:20:25 <AnMaster> fizzie, these latest changes should help a lot for fungot, string handling was sped up a lot by reorganising pushing to allow gcc to vectorise the push loop
20:20:25 <fungot> AnMaster: i believe that is a very original thought....are you a poet? so.....you like atlanta? what color are your eyes?
20:20:35 <AnMaster> they aren't committed yet
20:21:12 <AnMaster> and they need you to use the relevant -march to take advantage of it, and -O3 and -ftree-vectorize
20:21:20 <AnMaster> SSE2 at least I believe
20:22:12 <AnMaster> anyway it helped a lot for y in the HRTI test
20:22:53 <AnMaster> $ env | wc -c
20:22:54 <AnMaster> 5815
20:23:00 <AnMaster> UNDEF: T after M pushed 3 and a second T, after 675 ys, pushed 10899
20:23:49 <AnMaster> oh and I seriously want memrcpy() which would be like memcpy() but would reverse (byte by byte) the entire thing
20:24:04 <AnMaster> if I had such a thing and it was fast this could get even faster
20:24:17 <AnMaster> alternative would be to resign funge stacks to grow downwards
20:24:19 <AnMaster> I guess
20:24:25 <AnMaster> redesign*
20:24:32 <AnMaster> but that would be a pain to grow
20:25:05 -!- Corun has joined.
20:25:20 <AnMaster> at least without being unportable
20:25:34 <fizzie> The jitfunge stack grows up, but that's pretty arbitrary.
20:25:57 <oerjan> don't resign. stacks should grow up dammit!
20:25:59 <AnMaster> fizzie, yes but I would need to copy stuff around instead of just reallocing if I were to do that
20:26:16 <ais523> fizzie: use Fungus as your processor and make the stack grow sidewats
20:26:19 <ais523> *sideways
20:26:22 <AnMaster> const size_t top = stack->top + len;
20:26:22 <AnMaster> for (ssize_t i = len; i >= 0; i--)
20:26:22 <AnMaster> stack->entries[top - i] = str[i];
20:26:22 <AnMaster> stack->top += len + 1;
20:26:37 <AnMaster> that is how my push 0"gnirts" look like now
20:27:00 <AnMaster> well it preallocates to make sure there is enough room before that of course
20:27:48 <AnMaster> ais523, that fungus emulator is superslow
20:28:00 <ais523> AnMaster: obviously, you'd have to build the hardware and run on there
20:28:23 <AnMaster> ais523, and how fast would it be compared to a high end AMD or Intel CPU?
20:28:38 <ais523> it would depend on how fast the chip you'd built was
20:28:56 <ais523> the type of typical chip that students use has a clock cycle of a few tens of nanoseconds
20:29:02 <ais523> so about 500 MHz or so
20:29:13 <ais523> less, 100 MHz or so
20:29:22 <ais523> so probably not competing with high-end CPUs
20:29:46 <AnMaster> ais523, even though it could potentially run funge more natively?
20:29:50 <AnMaster> err spelling
20:30:05 <ais523> yes, I think so
20:30:48 <AnMaster> fizzie, how far out in negative funge space does the ul stack go on ^ul (::^):^
20:30:48 <AnMaster> ?
20:31:21 -!- comexk has quit ("Caught sigterm, terminating...").
20:31:32 -!- comex has joined.
20:31:32 <fizzie> Depends on the stack limit.
20:31:47 <oerjan> i recall some discussion on implementing special chips for functional languages or something - the mainstream chips are just too fast to compete with even for such a special design
20:32:00 <AnMaster> oerjan, lisp machines
20:32:03 <oerjan> (i think it was on Lambda the Ultimate)
20:32:14 <oerjan> AnMaster: that was _decades_ ago
20:32:22 <AnMaster> oerjan, but same concept
20:32:36 <fizzie> In fungot currently, cd*:* so it goes to X=-24336 before complaining.
20:32:37 <fungot> fizzie: i would need to involve nec page, so that's ok. well... x-chat doesn't. instead of " new code" do you mean? what kind of module system is quite nasty too:
20:32:47 <oerjan> the point was, the mainstream chips improve so fast that they will be better than yours before you get it out to market
20:32:58 <oerjan> or something like that
20:33:20 <AnMaster> oerjan, indeed
20:34:21 <AnMaster> ok I can't do static space for that
20:34:27 <AnMaster> would require 32 mb ram
20:34:33 <AnMaster> for the static array
20:34:44 <AnMaster> to keep power of two nice
20:35:01 <AnMaster> I would have to use 4096x1024
20:35:03 <AnMaster> with offset
20:35:16 <AnMaster> oh wait even more
20:35:25 <AnMaster> I missed a digit
20:36:04 <AnMaster> ok... more than 190 MB
20:38:37 <AnMaster> ^bf +[]
20:38:42 <fungot> ...out of time!
20:38:46 <fizzie> If you need a long-running benchmark, (xxxx)(~:*:*:*:*~):^:^(~~:^)~^:^ takes pretty damn long before finally giving an "out of time" message.
20:39:01 <AnMaster> fizzie, not really long running, I was using gprof
20:39:13 * AnMaster was looking at callgraph
20:39:45 <jayCampbell> i'm pretty sure we're going to be programming DNA in some analogy of bfbasic soon
20:39:46 <AnMaster> ^source
20:39:47 <fungot> http://zem.fi/~fis/fungot.b98.txt
20:39:52 <AnMaster> fizzie, last version ^
20:39:53 <AnMaster> ?
20:39:58 <fizzie> I'm not sure how new it is. Let's diff...
20:40:14 <AnMaster> tell me when you have the last one
20:40:30 <fizzie> Seems to be the latest, diff reports no changes.
20:40:49 <fizzie> Haven't done much to it lately.
20:41:03 <fizzie> This week I've been mostly writing jitfunge. :p
20:41:08 -!- testthingy has joined.
20:41:18 <AnMaster> %ul (xxxx)(~:*:*:*:*~):^:^(~~:^)~^:^
20:41:27 <AnMaster> ^ul (xxxx)(~:*:*:*:*~):^:^(~~:^)~^:^
20:41:51 <fizzie> Took me some 90 seconds last time.
20:41:53 <AnMaster> ah
20:41:58 <AnMaster> lets wait
20:42:04 <AnMaster> fizzie, how comes it is so slow there?
20:42:32 <fizzie> It builds a long string and then repeatedly swaps it around.
20:42:47 <AnMaster> well pushing string on stack is what I made faster
20:42:51 <AnMaster> as y does
20:42:57 <fungot> ...out of time!
20:43:00 <ais523> +ul ^ul (xxxx)(~:*:*:*:*~):^:^(~~:^)~^:^
20:43:01 <thutubot> ...^ out of stack!
20:43:03 <testthingy> ...out of time!
20:43:06 <AnMaster> hm
20:43:07 <AnMaster> that's odd
20:43:10 <fizzie> It's a 16-kilobyte string.
20:43:14 <ais523> +ul (xxxx)(~:*:*:*:*~):^:^(~~:^)~^:^
20:43:15 <AnMaster> specs on your system?
20:43:18 <ais523> AnMaster: I typoed the program
20:43:28 <AnMaster> I mean... fizzie's system
20:43:35 <AnMaster> it's obviously a bit faster
20:43:41 <fizzie> 1.4 GHz Pentium-M is that fungot box.
20:43:41 <fungot> fizzie: today's ( one of scheme48, you can implement syntax-rules with it.
20:43:47 <AnMaster> fizzie, hrrm
20:43:52 <AnMaster> wait
20:43:57 <AnMaster> 64-bit build
20:43:58 -!- testthingy has quit (Remote closed the connection).
20:43:58 <fizzie> And 32-bit cells, of course.
20:44:09 <thutubot> ...out of time!
20:44:10 <fizzie> It's not a x86-64 platform, after all.
20:44:10 <AnMaster> fizzie, concurrency?
20:44:21 <fizzie> Probably enabled if it is by default.
20:44:27 <AnMaster> it is on by default
20:44:31 <AnMaster> anyway this worries me
20:44:48 <AnMaster> testthingy should have been faster
20:44:49 <AnMaster> it wasn't
20:46:51 * AnMaster builds old one to test
20:47:21 -!- testthingy has joined.
20:47:27 <AnMaster> %ul (xxxx)(~:*:*:*:*~):^:^(~~:^)~^:^
20:47:29 <AnMaster> ^ul (xxxx)(~:*:*:*:*~):^:^(~~:^)~^:^
20:47:31 <AnMaster> +ul (xxxx)(~:*:*:*:*~):^:^(~~:^)~^:^
20:48:02 <ais523> which bot is using % as its character?
20:48:06 <AnMaster> testthingy,
20:48:11 <AnMaster> which is my copy of fungot
20:48:16 <ais523> ok, presumably that's fungot on optimised cfunge?
20:48:25 <thutubot> ...out of time!
20:48:28 <AnMaster> ais523, it is on old pre-last-change cfunge
20:48:38 <AnMaster> last change made mycology a lot faster
20:48:38 <ais523> well, thutubot won
20:48:46 <AnMaster> but I want to know if it slowed down fungot or not
20:48:59 <fungot> ...out of time!
20:48:59 <fungot> AnMaster: that's quite a lot of doors for people with prior programming experience?' the answer to your question is that
20:48:59 <fungot> ais523: ( that second one is horizontally displaced by 1 pixel with the hardware directly. :p)) for f(n-1) 2*f(n-2)
20:48:59 <fungot> AnMaster: we are asked to enter a player's name, but forget about the c2bf2c step
20:49:10 <ais523> sped it up by the look of it
20:49:13 <testthingy> ...out of time!
20:49:22 <AnMaster> hm I guess other stuff running on my system is to blame
20:49:46 <AnMaster> for why my 2 GHz x86_64 is slower than that 1.4 GHz pentium M that fungot runs on
20:49:46 <fungot> AnMaster: in one article then. my ass was saved by moore. i know. it just doesn't look right
20:50:37 <AnMaster> 43:03 - 41:17 vs. 49:13 - 47:27
20:50:54 <AnMaster> anyone wants to do the messy modulo 60 calcs for me?
20:51:26 <AnMaster> no one?
20:52:25 <AnMaster> ok speed up by 20 seconds
20:52:42 <AnMaster> which even on a single run should be enough to be significant
20:52:45 <AnMaster> very nice
20:52:55 -!- testthingy has quit (Remote closed the connection).
20:57:36 <AnMaster> damn running that with gprof output on takes forever
20:57:52 <AnMaster> well I'll check on that when I get back
21:00:05 <AnMaster> ah no not 20
21:00:06 <AnMaster> 10
21:00:46 <AnMaster> ok interesting
21:02:27 <AnMaster> that stack
21:02:33 <AnMaster> where does it go fizzie ?
21:02:49 <AnMaster> I mean, how far into negative space
21:03:40 <AnMaster> because the main issue is that it seems to work a lot on outer fungespace
21:04:46 -!- Mony has left (?).
21:09:02 <fizzie> The one in that test? Well, 16k cells that way, obviously.
21:10:18 * AnMaster allocates a 128 MB large static array
21:10:40 * AnMaster waits
21:11:29 <AnMaster> fizzie, ok I got it down to 41 seconds
21:11:31 <AnMaster> using this:
21:11:35 <AnMaster> #define FUNGESPACE_STATIC_OFFSET_X (32768-1024)
21:11:35 <AnMaster> #define FUNGESPACE_STATIC_OFFSET_Y 64
21:11:35 <AnMaster> #define FUNGESPACE_STATIC_X 32768
21:11:35 <AnMaster> #define FUNGESPACE_STATIC_Y 512
21:11:55 <AnMaster> actually you probably want later Y
21:12:17 <AnMaster> fizzie, anyway I believe that is 64 MB
21:12:29 <AnMaster> with 32-bit cells
21:13:44 <AnMaster> fizzie, thanks to linux allocating that lazily it won't take as much ram in fungot as that
21:13:44 <fungot> AnMaster: how would you know?
21:13:59 <ais523> optbot!
21:13:59 -!- optbot has set topic: the entire backlog of #esoteric: http://tunes.org/~nef/logs/esoteric | it's quite loaded and quite popular.
21:14:24 -!- jix has joined.
21:18:59 <AnMaster> still it went far into non static space
21:22:12 * AnMaster makes it dump edges
21:24:07 <AnMaster> fizzie, err you grow something into positive space:
21:24:09 <AnMaster> Coords: {-16395,-20} {16384,2000}
21:24:24 <AnMaster> that looks very very strange
21:25:04 <oerjan> fungal growth
21:27:36 <AnMaster> fizzie, ok I got it down to 10 seconds with this mad one:
21:27:43 <AnMaster> #define FUNGESPACE_STATIC_OFFSET_X (32768/2)
21:27:43 <AnMaster> #define FUNGESPACE_STATIC_OFFSET_Y 32
21:27:43 <AnMaster> #define FUNGESPACE_STATIC_X 32768
21:27:43 <AnMaster> #define FUNGESPACE_STATIC_Y 2048
21:27:48 <AnMaster> around 250 MB ram I believe
21:28:13 <AnMaster> fizzie, but please try to grow only in one direction
21:28:15 <AnMaster> ;P
21:30:11 -!- Sgeo has quit (Connection timed out).
21:31:20 <fizzie> Oh, right.
21:31:44 <fizzie> That 16384 comes from the fact that it writes the string at x=0,y=10 for temporary storage when swapping it on in the stack.
21:31:55 <AnMaster> fizzie, so it writes it positive too?
21:31:59 <AnMaster> well that messes up
21:32:05 <AnMaster> you can get either easily but not both
21:32:16 <AnMaster> try to write them all in the same direction
21:32:46 <fizzie> It's not that easy, since STRN can only write in one direction. Of course I could use the current stack-top 'x' coordinate for the temporary storage too, I guess.
21:32:54 -!- jix has quit (Read error: 104 (Connection reset by peer)).
21:33:17 <AnMaster> fizzie, don't you use STRN in both cases?
21:33:26 <AnMaster> so why does one go positive and the other one negative?
21:33:43 <fizzie> Because the other one is a stack of strings; it's easier to grow that to the negative direction.
21:34:05 <AnMaster> well why does the other one go positive then?
21:34:15 <fizzie> Otherwise it's quite difficult to find how long the string is below the positive-stack-pointer.
21:34:46 <fizzie> With the stack growing to the negative direction, I can just G at the current top-of-stack and I get the topmost string.
21:35:11 <fizzie> And the other one grows to the positive direction because it's not a stack; when you P a string to temporary storage, that's the direction it writes to.
21:35:23 <AnMaster> fizzie, well, you can't get both, I recommend trying to put both in the same direction
21:35:36 <fizzie> I'm not sure I'm going to bother.
21:35:41 <AnMaster> hm ok
21:36:03 <AnMaster> fizzie, well by making one huge 512 MB static array I got execution time down to less than 10 seconds for it
21:36:10 <fizzie> The temporary storage start coordinate could follow the top of stack, but that's just extra work.
21:36:34 -!- testthingy has joined.
21:36:39 <AnMaster> %ul (xxxx)(~:*:*:*:*~):^:^(~~:^)~^:^
21:36:39 <AnMaster> ^ul (xxxx)(~:*:*:*:*~):^:^(~~:^)~^:^
21:36:39 <AnMaster> +ul (xxxx)(~:*:*:*:*~):^:^(~~:^)~^:^
21:36:48 <testthingy> ...out of time!
21:36:58 <AnMaster> thutubot will be next
21:37:32 <thutubot> ...out of time!
21:37:53 <ais523> well predicted
21:38:09 <fungot> ...out of time!
21:38:28 <AnMaster> fizzie, however why does it go to positive 2000?
21:38:30 <AnMaster> in y
21:38:31 <AnMaster> I mean
21:38:55 <AnMaster> you could make this reasonable, 64 MB for 32-bit funge, if you didn't go that far
21:39:56 <AnMaster> fizzie, hope that will teach you something or whatever
21:40:34 <AnMaster> point is the less area you use for the static stuff the less memory you will waste and the more static you can use
21:42:33 <fizzie> There is no point in a Befunge irc-bot, really, no matter how much you'd like there to be.
21:42:48 <fizzie> I did what was convenient to code, not what was optimized for maximum efficiency.
21:42:53 <AnMaster> heh ok
21:42:54 <AnMaster> :)
21:43:05 <AnMaster> fizzie, but why do you use 2000 y?
21:43:18 <fizzie> So that there's room for 1900 lines of code, of course.
21:43:20 <ais523> <fizzie> There is no point in a Befunge irc-bot, really, no matter how much you'd like there to be. <--- wrong, you wouldn't have made one otherwise
21:43:36 <fizzie> However, you don't really need to have the static space go that far down.
21:43:48 <fizzie> It's only used for storing the programs; for execution, they're copied to y=8.
21:44:00 <AnMaster> fizzie, oh? 512 is enough? because then I could actually recommend it on x86
21:44:22 <fizzie> Source code length + 100 is enough.
21:44:48 <AnMaster> fizzie, how do you feel about 128 MB RAM?
21:45:04 <AnMaster> since it should be power of two
21:45:10 <AnMaster> and 512 is not enough
21:45:18 <AnMaster> for source code length + 100
21:45:24 <AnMaster> so 1024 is next step
21:45:51 -!- testthingy has quit (Remote closed the connection).
21:46:45 <AnMaster> luckily the "fill with spaces" code is vectorised
21:46:48 <AnMaster> so that is quite fast
21:47:15 -!- omniscient_idiot has quit (Read error: 113 (No route to host)).
21:47:38 -!- Jiminy_Cricket has quit (Read error: 113 (No route to host)).
21:47:51 -!- testthingy has joined.
21:47:55 <AnMaster> %ul (xxxx)(~:*:*:*:*~):^:^(~~:^)~^:^
21:48:04 <testthingy> ...out of time!
21:48:12 <ais523> AnMaster: where does that particular test program come from, btw?
21:48:19 <AnMaster> ais523, fizzie pasted it
21:48:35 <AnMaster> as one that took a long time
21:48:48 <AnMaster> anyway this array size is way too big for normal usage
21:49:06 <AnMaster> if you got 128 MB RAM and/or swap to waste however:
21:49:08 <AnMaster> #define FUNGESPACE_STATIC_OFFSET_X 16396
21:49:08 <AnMaster> #define FUNGESPACE_STATIC_OFFSET_Y 64
21:49:08 <AnMaster> #define FUNGESPACE_STATIC_X 32768
21:49:08 <AnMaster> #define FUNGESPACE_STATIC_Y 1024
21:49:37 <ehird> how does thutubot out of time ais523?
21:49:38 <AnMaster> a non-rectangular shape would be a LOT faster
21:49:42 <ehird> how can string rewriting languages know time.
21:49:54 <ais523> ehird: it counts the number of times round the main loop it goes
21:50:01 <ais523> in a number system which vaguely resembles binary but isn't
21:50:10 <ehird> ah
21:51:04 -!- testthingy has quit (Remote closed the connection).
21:51:13 <oklopol> i accidentally the time
21:52:10 <oerjan> well, don't the time again
21:52:42 <oklopol> well i can't really, i accidentally the WHOLE time
21:52:55 <oerjan> also, i will have to your salary
21:53:50 <oklopol> i think i'm gonna this book now.
21:56:43 <ehird> oklopol: the WHOLE book?!
21:57:28 <oklopol> no i'll prolly only like 20 pages more
22:03:04 -!- Corun_ has joined.
22:05:27 -!- KingOfKarlsruhe has quit (Remote closed the connection).
22:09:56 -!- Corun has quit (Read error: 110 (Connection timed out)).
22:10:51 <fizzie> fungot's out-of-time check is also just a count of loop iterations, which is why it takes 90 seconds to time out with that program, but only a few for the standard infinite loop.
22:10:52 <fungot> fizzie: is it just personal preference?,
22:11:04 <fizzie> ^ul (:^):^
22:11:04 <fungot> ...out of time!
22:11:23 <ais523> fizzie: I'm counting the main loop of my Thutu program, not the main loop in the Underload program
22:11:37 <oerjan> ^ul (::^):^
22:11:37 <fungot> ...too much stack!
22:12:08 <fizzie> Well, fungot counts the Underload interp loop, so it's pretty close to the amount of underload instructions actually executed.
22:12:08 <fungot> fizzie: you have 1 message. riastradh says: actually, it would be
22:12:16 <oerjan> ^ul (::^^)::^^
22:12:17 <fungot> ...too much stack!
22:12:29 <fizzie> fungot: Do you have a messaging service now too?
22:12:29 <fungot> fizzie: he annoyed the communist govt and was sent there.
22:12:55 <AnMaster> hm
22:13:27 <oerjan> poor riastradh
22:14:51 <AnMaster> fizzie, I'm working on improving STRN
22:14:54 <fizzie> #scheme's sarahbot had a feature where you could say "later tell <nick> <message>", and it would repeat that sort of message when <nick> next spoke. That's where the quote is from.
22:15:03 <AnMaster> however as a side effect of this it won't cast to char in between
22:15:14 <AnMaster> at least for P
22:15:20 <AnMaster> it may do it for G, not sure
22:16:38 <fizzie> STRN improvements should help the underload interp. Although the Funge code could do with some optimization too.
22:16:57 <AnMaster> well I noticed no difference for STRN really here
22:17:04 <oerjan> In the beginning, accidentally a universe.
22:17:14 <AnMaster> fizzie, thing that would help: knowing how much you actually are going to push/pop
22:17:22 <AnMaster> keeping a counter for that
22:28:39 -!- Corun__ has joined.
22:30:46 -!- Corun__ has changed nick to Corun.
22:31:40 -!- Corun_ has quit (Read error: 60 (Operation timed out)).
22:32:12 <AnMaster> real 0m0.048s
22:32:12 <AnMaster> user 0m0.032s
22:32:12 <AnMaster> sys 0m0.012s
22:32:14 <AnMaster> for mycology
22:32:16 <AnMaster> \o/
22:32:19 <AnMaster> ais523, ^
22:32:31 <AnMaster> that is profiled build
22:32:40 <AnMaster> profile-feedback*
22:32:41 <AnMaster> I mean
22:39:03 -!- oklokok has joined.
22:40:28 -!- oklopol has quit (Read error: 104 (Connection reset by peer)).
22:45:35 -!- Sgeo has joined.
23:13:05 -!- Sgeo_ has joined.
23:15:16 -!- Sgeo has quit (Read error: 110 (Connection timed out)).
23:17:40 -!- Corun has quit ("This computer has gone to sleep").
23:19:16 -!- ab5tract has quit.
23:25:06 -!- oerjan has quit ("Good night").
23:25:53 -!- olsner has quit ("Leaving").
23:57:01 -!- optbot has quit (kornbluth.freenode.net irc.freenode.net).
23:57:02 -!- psygnisfive has quit (kornbluth.freenode.net irc.freenode.net).
23:58:21 -!- optbot has joined.
23:58:21 -!- psygnisfive has joined.
←2008-11-05 2008-11-06 2008-11-07→ ↑2008 ↑all