--- Log opened Sun Jun 03 00:00:12 2012 |
01:29 | | io is now known as io|hockey |
02:02 | | * McMartin strides boldly into the Madness Place. |
02:06 | <@Tamber> | You're playing with Perl? |
02:07 | <&McMartin> | Worse. |
02:07 | <&McMartin> | But first, we must test, before I can gloat properly |
02:07 | <@Tamber> | :) |
02:20 | <&McMartin> | AHAHAHA |
02:20 | <&McMartin> | FLAWLESS VICTORY |
02:20 | | * McMartin is writing up his proof-of-concept 2600 program to show that his assembler supports it |
02:21 | <&McMartin> | As I think I mentioned before, the way you do sprite placement in 2600 development is by writing to a register that means "please place the sprite at the point that the CRT's electron gun is currently pointing" |
02:21 | <&McMartin> | I have managed to center a pair of sprites without using any NOP statements, just by putting the rest of the initialization in at the relevant points. |
02:21 | <&McMartin> | And carefully tuning a delay loop that never touches NOP. |
02:21 | <&Derakon> | Nice. |
02:22 | <&McMartin> | First shot at it was buggy because I was timing it to the *end* of the store statement, and it looks like it locks it in at the beginning of it. |
02:22 | <&McMartin> | That is, it's the activation of the address line that strobes the register, not the part where the value is written to it. |
02:28 | | Attilla [Obsolete@Nightstar-00137a38.as43234.net] has quit [Ping timeout: 121 seconds] |
02:45 | <&McMartin> | Hm |
02:45 | <&McMartin> | Doing the match and looking at the range the relative-control registers give, maybe this isn't as intrinsically crazy as it looks. |
02:45 | <&McMartin> | As long as all you're doing is writing Combat. =P |
02:53 | | Kindamoody[zZz] is now known as Kindamoody |
03:02 | | io|hockey [alex@Nightstar-e67f9d08.com] has quit [Client closed the connection] |
03:02 | | franny [fran@Nightstar-e67f9d08.com] has quit [Connection closed] |
03:10 | | franny [fran@Nightstar-e67f9d08.com] has joined #code |
03:17 | | iospace [Alexandria@Nightstar-e67f9d08.com] has joined #code |
03:19 | | iospace is now known as io|hockey |
03:22 | | * Vornicus determines that McM is very much in the Madness Place. |
03:22 | < io|hockey> | Vornicus: when isn't he there? |
03:23 | <~Vornicus> | ...You know I'm not sure. |
03:23 | < io|hockey> | :P |
03:25 | <~Vornicus> | Hex Inverter development doesn't seem very madness. |
03:49 | <&McMartin> | I kind of implemented co-routines in GML for that, so I'm not sure. |
03:50 | <~Vornicus> | Okay that's kind of madness. |
03:50 | <&McMartin> | Anyway, in addition to the "put sprite where electron gun is right now", there's also a "move the sprite by this signed nibble". So that means one move operation gives you leeway within a 15-pixel space. |
03:50 | <&McMartin> | There are 3 pixels drawn per machine cycle, so cycle-counting *alone* can't get you exactly where you want anyway. |
03:51 | <&McMartin> | And the most basic delay loop ever... |
03:51 | <&McMartin> | ldy #N; loop: dey; bne loop |
03:51 | <&McMartin> | Takes 5N+1 cycles, which is to say, it has a precision of 5 cycles. |
03:51 | <&McMartin> | Or 15 pixels. |
03:52 | <&McMartin> | So, for any screen position, you can really put it at that poisition in nine bytes. |
03:52 | <~Vornicus> | man it took a moment to not read "bne" as "end backwards" |
03:52 | <&McMartin> | (plus two bytes at the end for strobing the "make all motion happen"" |
03:52 | <&McMartin> | Branch if Not Equal to zero |
03:53 | <~Vornicus> | right, I got it, but |
03:54 | <&McMartin> | 174 bytes of code, 24 bytes of data, and 58 bytes to make it be a power of 2 |
03:56 | <&McMartin> | Two centered sprites, two independently animated palette cycles. |
03:57 | <&McMartin> | https://hkn.eecs.berkeley.edu/~mcmartin/hi_stella.png |
03:57 | <&McMartin> | Also .bin. |
03:57 | <~Vornicus> | WIcked. |
03:57 | <&Derakon> | Cute. |
03:58 | <&Derakon> | (Stella?) |
03:58 | <&McMartin> | And, proof of concept done. |
03:58 | <&McMartin> | (Stella was the codename for both the 2600's television adaptor and the console itself.) |
03:58 | <&McMartin> | (SO it's a trademark-friendly way of referring to the Atari(TM) 2600 (TM) VCS (TM).) |
03:59 | <&Derakon> | Ahh. |
03:59 | <&McMartin> | Also note the subpixel precision in the palette cycling, because the Television Interface Adaptor has no use for your puny "pixels" |
04:00 | <&McMartin> | The closest thing it has to pixels are "color clocks" horizontally and "scanlines" vertically. |
04:02 | <&McMartin> | Meanwhile, incidentally, the C64 "print hello world" program is 52 bytes of code and 32 bytes of data. 14 of the data bytes and 38 bytes of the code there are just to make sure that you can co-exist with BASIC. |
04:03 | <&McMartin> | No, wait. 16 of the data bytes are part of the header. 14 for BASIC and 2 for the on-disk program format. |
04:05 | | himi [fow035@Nightstar-5d05bada.internode.on.net] has quit [Ping timeout: 121 seconds] |
04:07 | <&McMartin> | Also, the Atari's palette is crazy good. |
04:08 | | himi [fow035@Nightstar-5d05bada.internode.on.net] has joined #code |
04:08 | | mode/#code [+o himi] by ChanServ |
04:08 | <~Vornicus> | How crazy good are we talking? |
04:09 | <~Vornicus> | (I know that the NES has something like 50 colors; the C64 has 16...) |
04:09 | <~Vornicus> | (and then the Genesis and SNES have 512 and 65k respectively and then after that we stopped caring because 24 bits is enough for everybody) |
04:11 | <&McMartin> | 128 colors, with careful gradations. |
04:11 | | PinkFreud [WhyNot@NetworkAdministrator.Nightstar.Net] has joined #code |
04:11 | | mode/#code [+o PinkFreud] by ChanServ |
04:11 | <&McMartin> | Also, for whatever batshit reason, it's the *high* seven bits. |
04:12 | <&McMartin> | Which is why each color band on that screencap is two scanlines tall. |
04:13 | <&McMartin> | http://www.atariage.com/screenshot_page.html?SoftwareLabelID=450 is one of the most impressively graphically programmed games I've ever seen for the platform. |
04:14 | <&McMartin> | I also had this game! |
04:14 | <~Vornicus> | I seem to recall seeing this game. |
04:15 | <&McMartin> | It's one of the reasons I wasn't as completely blown away by the NES as perhaps I should have been. >_> |
04:15 | <&McMartin> | Yeah, it's my go-to example. |
04:15 | <&McMartin> | It's also everything Star Raiders should have been but wasn't. |
04:16 | <&McMartin> | Also, the reason the palette is so good is because it was directly speaking NTSC, so it could just go "well, shit, let's just feed it hue and luminance values" |
04:16 | <&McMartin> | Which is to say, it's 7-bit true-color HSV. |
04:17 | <&McMartin> | Beats the shit out of black/cyan/magenta/eye-searing white, I tell you what. |
04:18 | | PinkFreud [WhyNot@NetworkAdministrator.Nightstar.Net] has quit [Z-Lined: Your IP range has been attempting to connect too many times in too short a duration. Wait a while, and you will be able to connect.] |
04:26 | | io|hockey is now known as iospace |
04:33 | | PinkFreud [WhyNot@NetworkAdministrator.Nightstar.Net] has joined #code |
04:33 | | mode/#code [+o PinkFreud] by ChanServ |
05:07 | < Noah> | Long live PinkFreud |
05:07 | < celticminstrel> | I just discovered I can use breakpoints to automatically skip a section of code when stepping through. |
05:08 | <@Tamber> | Meet the new PinkFreud, same as the old PinkFreud. |
05:09 | <&McMartin> | I don't suppose anyone here is familiar with Apple II emulation. |
05:10 | < Noah> | I emulated a Apple ][e on my Wii once, monochrome green Oregon Trail was a blast |
05:10 | <&McMartin> | Close but not quite to the nature of expertise I wanted |
05:10 | | * McMartin is looking for how to turn files into discs an emulator can read |
05:11 | | * McMartin is also looking for how one writes a program intended to be run as a machine language program. |
05:11 | < Noah> | Hmm |
05:12 | <&McMartin> | Essentially, I'm looking for both emulation details, and the equivalent of "linking information" for the platform. |
05:12 | <&McMartin> | Unfortunately, the hardcore types tended to write their programs on their Apple ][gs using a machine language monitor. |
05:13 | < Noah> | Soz, I never got that into old computer emulation |
05:14 | <&McMartin> | No worries |
05:14 | <&McMartin> | This is information I've been lacking for a long time~ |
05:14 | <&McMartin> | Also |
05:14 | <&McMartin> | I see apple2.info exists. |
05:14 | | * McMartin pokes at it. |
05:15 | <&McMartin> | PRODOS 8 Technical Reference |
05:15 | <&McMartin> | This looks promising |
05:17 | < Noah> | Sounds painful |
05:28 | <&McMartin> | Yeah, OK, not supporting Apple II |
05:29 | <&McMartin> | Since it looks like the way you do this is by writing a custom boot loader. |
06:34 | < celticminstrel> | My rect intersect function seems to be broken somehow... |
06:37 | | AnnoDomini [annodomini@A08927.B4421D.B81A91.464BAB] has joined #code |
06:37 | | mode/#code [+o AnnoDomini] by ChanServ |
06:40 | < celticminstrel> | Which is odd, because according to Google I have exactly the right algorithm. |
06:42 | < celticminstrel> | ...oh wait. There's no intersection at all. |
06:46 | < celticminstrel> | I guess I need a special case for that. :/ |
06:48 | < celticminstrel> | right = left + width, or left + width - 1? |
07:03 | | Rhamphoryncus [rhamph@Nightstar-5697f7e2.abhsia.telus.net] has joined #code |
07:09 | | Derakon is now known as Derakon[AFK] |
07:22 | <&McMartin> | holy fuck |
07:22 | <&McMartin> | So, Gauntlet. |
07:22 | <&McMartin> | The original arcade cabinet was a reasonably standard tiled memory jobber |
07:23 | <&McMartin> | With the minor addition of a sprite engine capable of 1,024 simultaneous sprites. |
07:24 | <@AnnoDomini> | Yes, but can it render 4 simultaneous 24 hour days? |
07:25 | | iospace is now known as io|crashed |
07:30 | <~Vornicus> | ...that's absolute fucking madness. |
07:31 | | * io|crashed slaps AnnoDomini with time pyramid |
07:31 | <@AnnoDomini> | Augh. |
07:31 | <~Vornicus> | celmin: are your rectangles considered closed (they include their edges, and 0-width rectangles are allowed), or open (they exclude their edges and 0-width rectangles are nonexistant)? |
07:39 | < celticminstrel> | I actually don't know... |
07:40 | < celticminstrel> | I guess zero-width is allowed. It's SDL, so it stores the width and height rather than the right and bottom. |
07:40 | <~Vornicus> | okay. |
07:41 | | * Vornicus hunts around for his math on this. |
07:41 | | * celticminstrel just finished implementing an in-game help page... with /-searching. |
07:43 | < celticminstrel> | Maybe since it stores width/height it doesn't matter as long as I'm consistent? |
07:44 | <~Vornicus> | http://paste.ubuntu.com/1020826/ |
07:44 | <~Vornicus> | for open, use <= instead |
07:45 | < celticminstrel> | hi_* is right/bottom and lo_* is left/top? |
07:46 | <~Vornicus> | Yes. Or whatever order your thing uses; it kind of depends on your library's handedness, which I think is as you described there. |
07:46 | <~Vornicus> | (PostScript it'd be right/top and left/bottom respectively) |
07:48 | < celticminstrel> | Doesn't really matter; point is that lo_* is the coordinates of the top left and hi_* is the coordinates of the bottom right... unless the library did something strange and used bottom left and top right, which is probably pretty unlikely. :P |
07:49 | < celticminstrel> | Okay, so lo_out and hi_out are...? |
07:49 | < celticminstrel> | By the max and min, obviously something to do with top left and bottom right, respectively, but... |
07:51 | < celticminstrel> | Um, why is there only one min and one max? |
07:51 | < celticminstrel> | Rather than two of each. |
07:52 | <~Vornicus> | Because I figure you can generalize to two dimensions yourself~ |
07:52 | <~Vornicus> | Note that you'll want an or for the None return |
07:53 | < celticminstrel> | Oh wait, the code you're pasting is only working on one dimension? So I'd need to do it twice, once for x and once for y? |
07:53 | <~Vornicus> | basically |
07:55 | < celticminstrel> | Alright, I get it now. Thanks. |
07:55 | < celticminstrel> | I'll compare it to what I had already. |
07:59 | | AnnoDomini [annodomini@A08927.B4421D.B81A91.464BAB] has quit [Ping timeout: 121 seconds] |
08:04 | | celticminstrel [celticminst@Nightstar-5d22ab1d.cable.rogers.com] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!] |
08:16 | < Rhamphoryncus> | yasttc.cpp:472:2: error: unknown type name 'VeretxBufferSet'; did you mean 'VertexBufferSet'? |
08:16 | < Rhamphoryncus> | >.> |
08:17 | <@Tamber> | "Probably, yes." |
08:30 | <~Vornicus> | Hooray, spellchecking |
09:10 | | Vash [Vash@Nightstar-241cb5d4.wlfrct.sbcglobal.net] has quit [[NS] Quit: I lovecraft Vorn!] |
09:11 | <&McMartin> | Vornicus: |
09:11 | <&McMartin> | I have extracted something |
09:11 | <&McMartin> | It may be Relevant To Your Interests. |
09:13 | <&McMartin> | https://hkn.eecs.berkeley.edu/~mcmartin/font.py |
09:14 | <&McMartin> | The source has been carefully hidden. Let's See If Anyone Notices. |
09:17 | <&McMartin> | Output: https://hkn.eecs.berkeley.edu/~mcmartin/font.txt |
09:36 | | McMartin [mcmartin@Nightstar-107eb580.pltn13.sbcglobal.net] has quit [Ping timeout: 121 seconds] |
09:37 | | McMartin [mcmartin@Nightstar-107eb580.pltn13.sbcglobal.net] has joined #code |
09:37 | | mode/#code [+ao McMartin McMartin] by ChanServ |
09:54 | <&jerith> | McMartin: String concatenation like that is horribly inefficient. |
09:55 | <&jerith> | Rather books a list and then ''.join() it. |
09:55 | <@Tamber> | "books a list"? Attack of the automangle? |
09:55 | <&jerith> | Um. Build. |
09:56 | <&McMartin> | jerith: With a length cap of 8, I found myself unable to care. |
09:57 | <&jerith> | You're looping over it a lot. |
09:57 | <&McMartin> | I'd have figured that lists would have similar problems to strings, though, since they appear to be array lists. |
09:57 | <&McMartin> | Um? |
09:58 | <&McMartin> | No, I'm looping over it 8 times, which is a realloc/copy, I'm guessing. |
09:58 | <&McMartin> | Which is n^2. |
09:58 | <&jerith> | Also, I'm describing idiomatic Python for general edification rather than this specific case. |
09:58 | <&McMartin> | Yeah, I'm aware that messing with strings directly is bad. |
09:59 | <&jerith> | You're calling that loop for each charactet. |
09:59 | <&McMartin> | Sure |
09:59 | <&McMartin> | But, um |
09:59 | <&McMartin> | My understanding is that it's the order of growth that's the problem here. |
10:00 | <&jerith> | On a tiny string it doesn't matter much. |
10:00 | <&McMartin> | Sure |
10:00 | <&McMartin> | This has a direct parallel in Java, except it's worse because x += "blah" is just as bad there, since its strings are immutable. |
10:01 | < Rhamphoryncus> | wee clang bug >.< |
10:01 | < Rhamphoryncus> | http://bpaste.net/show/XBvA4comWromAEvs8lo5/ |
10:01 | <&jerith> | The Python hacker in me just cringed a bit at the concat-inna-loop. |
10:02 | <&McMartin> | Hrm. |
10:02 | <&McMartin> | I was under the impression that they optimized +=. |
10:02 | <&jerith> | In cpython in certain cases. |
10:03 | <&jerith> | I've heard pypy devs complain about that kind of hackery. |
10:05 | <&McMartin> | Fixed, anyway. |
10:05 | <&jerith> | I think your prefix bypasses the special case optimisation. |
10:05 | <&McMartin> | Well, right |
10:06 | <&McMartin> | You'll notice I elected to reverse the list instead of inserting at 0, because I don't trust them to do the latter efficiently. |
10:06 | <&jerith> | Id probably listcomp it and join the reversed(). |
10:06 | <&McMartin> | Listcomp *what*. |
10:06 | <&McMartin> | I'm turning an integer into a list of bits. |
10:07 | <&McMartin> | If it's got a primitive for that, then great, but I don't have that swapped in. =P |
10:07 | < Rhamphoryncus> | I really dislike the += hack in cpython |
10:09 | <&jerith> | Loop over range(8) and & 2**i or something. |
10:10 | <&McMartin> | Actually, wait a tick |
10:10 | <&jerith> | You can also reverse the range and get the bits forwards. |
10:10 | <&McMartin> | Also, you can use bin(x) and strip off the 0b in front, then convert the 0s and 1s to . and X~ |
10:11 | <&jerith> | Also, it's kind of standard to use the fact that True==1 and False==0. |
10:11 | <&McMartin> | I just spent like five hours making it so that I stopped depending on that~ |
10:12 | <&jerith> | ".X"[x & 2**i] |
10:12 | <&McMartin> | Erm. |
10:12 | <&McMartin> | That's not gonna work |
10:12 | <&jerith> | I'd probably go with the bin(x) one. |
10:12 | <&McMartin> | x & 2**i is not a boolean~ |
10:13 | <&jerith> | Yeah. I realised after I hit enter. |
10:14 | <&jerith> | If you really want to be fast, cache each byte. |
10:14 | <&jerith> | But that's out of scope, probably. |
10:15 | <&McMartin> | "".join([".X"[ord(c) - ord('0')] for c in bin(x)[2:]]) |
10:15 | <&McMartin> | That's unpleasantly Ruby-y. |
10:16 | <&jerith> | bin(x)[2:].replace('0', '.').replace('1', 'X') |
10:17 | <&McMartin> | Hm. It's also not properly padding the left with zeroes. |
10:17 | <&jerith> | You could build a translate map, too. |
10:17 | <&jerith> | Is that a flag top bin()? |
10:17 | <&jerith> | -p |
10:18 | <&McMartin> | No, but you can rjust the string. |
10:18 | <&McMartin> | That got it, but now it's long enough to make PEP8 complain as a one-liner~ |
10:19 | <&jerith> | ("......." + bitstr)[-8:] |
10:19 | <&jerith> | If you want to be horrible. |
10:20 | <&jerith> | (I do that kind of thing for lists from time to time.) |
10:20 | <&McMartin> | for (c, i) in zip(font, range(len(font))): |
10:20 | <&McMartin> | print "Character #%d" % i |
10:20 | <&McMartin> | for l in c: |
10:20 | <&McMartin> | s = "".join([".X"[ord(c) - ord('0')] for c in bin(l)[2:]]) |
10:20 | <&McMartin> | print s.rjust(8, '.') |
10:20 | <&McMartin> | print |
10:22 | <&jerith> | Unicode .translate() takes a mapping. |
10:22 | <&McMartin> | There's a tr(), too, IIRC |
10:22 | <&jerith> | But the conversions make it ugly. |
10:22 | <&McMartin> | Mappings are a pain in the butt to set up. |
10:23 | <&jerith> | Mapping means "smells like a dict" in this context. |
10:24 | <&jerith> | Rather than the opaqu |
10:24 | <&jerith> | Ugh. |
10:24 | <&jerith> | You know what I mean. |
10:24 | <&McMartin> | Oh, as opposed to the 256-byte string. |
10:25 | <&jerith> | String translate and unicode translate are bit different. |
10:45 | | himi [fow035@Nightstar-5d05bada.internode.on.net] has quit [Connection closed] |
10:47 | | himi [fow035@Nightstar-5d05bada.internode.on.net] has joined #code |
10:47 | | mode/#code [+o himi] by ChanServ |
11:16 | < Rhamphoryncus> | Oww. Using multiple inheritance for exceptions can cause it to bypass handlers for both types. http://www.boost.org/community/error_handling.html |
11:20 | < Rhamphoryncus> | also funny: cout's << isn't marked nothrow so it could raise a bad_alloc exception too, or any other |
11:22 | < Rhamphoryncus> | So it's not practically different from using std::string as an attribute of your exception type. Either way you're screwed |
11:29 | | Kindamoody [Kindamoody@Nightstar-6154a72a.tbcn.telia.com] has quit [[NS] Quit: bbs I hope!] |
11:40 | | Kindamoody|afk [Kindamoody@Nightstar-6154a72a.tbcn.telia.com] has joined #code |
11:40 | | mode/#code [+o Kindamoody|afk] by ChanServ |
11:40 | | Kindamoody|afk is now known as Kindamoody |
11:42 | <&McMartin> | Man, I'd forgotten how ridiculously involved resetting the NES's state was. |
11:50 | | Attilla [Obsolete@Nightstar-00137a38.as43234.net] has joined #code |
12:37 | | You're now known as TheWatcher |
12:50 | <&McMartin> | Aaaand, that's the NES Hello World working. |
12:50 | <&McMartin> | 224 bytes of code and 254 bytes of data, for the largest program here by a sizable factor. |
12:52 | <&McMartin> | https://hkn.eecs.berkeley.edu/~mcmartin/hello.nes |
12:53 | < Rhamphoryncus> | heh. Added a 45 line header, including its own includes and include guard. Result? 43 errors from clang |
12:54 | < Rhamphoryncus> | oh, and I already fixed some |
12:55 | | * TheWatcher wonders if that can be termed "dropping a clanger"~ |
13:07 | < Rhamphoryncus> | heh |
14:04 | | io|crashed is now known as iospace |
14:09 | | iospace is now known as io |
14:18 | | * Rhamphoryncus wonders if assembly would be more expressive (and shorter) for string manipulation than C++ :P |
14:28 | | Kindamoody is now known as Kindamoody|out |
14:32 | < Rhamphoryncus> | Oh. Right. Even if I want to use the C functions I have to deal with differences in null termination |
14:33 | < Rhamphoryncus> | Yeah. Fuck it. Type safety is not worth the pain. |
14:34 | <&jerith> | Quite. |
14:42 | < Rhamphoryncus> | auto glGetInteger = [] (GLint prop) -> GLint { GLint temp; glGetIntegerv(prop, &temp); return temp; }; |
14:42 | < Rhamphoryncus> | woo :P |
14:50 | | celticminstrel [celticminst@Nightstar-5d22ab1d.cable.rogers.com] has joined #code |
14:57 | < Rhamphoryncus> | augh. I just used "fowl" instead of "foul" in a commit message |
15:01 | < io> | ... wow |
15:01 | < io> | that's takes something special |
15:01 | < io> | and something most fowl |
15:01 | | * io flees |
15:05 | | cpux [cpux@Nightstar-c5874a39.dyn.optonline.net] has quit [[NS] Quit: Well, most things get better when I kick them!] |
15:07 | | cpux [cpux@Nightstar-c5874a39.dyn.optonline.net] has joined #code |
15:24 | < froztbyte> | http://codegolf.stackexchange.com/questions/6043/were-no-strangers-to-code-golf- you-know-the-rules-and-so-do-i |
15:28 | < froztbyte> | http://codegolf.stackexchange.com/a/6142 |
15:32 | < Noah> | "If you do not quickly arrive at an answer of "AAA", pull out your RNG, blow in it and plug it back in." I lol'd |
15:33 | < Rhamphoryncus> | Update, 1st June 2012: |
15:33 | < Rhamphoryncus> | For solutions containing non-ASCII text, the size of your solution will be counted in bytes, based on UTF-8 encoding. If you use codepoints that cannot be encoded in UTF-8, your solution will not be judged as valid. |
15:33 | < Rhamphoryncus> | XD |
15:33 | < Noah> | I should write a program that prints random characters to the screen and argue that it WILL -eventually- produce the lyrics |
15:33 | < Noah> | it just takes....some time |
15:34 | < froztbyte> | use IMPS! |
15:34 | < froztbyte> | http://www.ietf.org/rfc/rfc2795.txt |
15:35 | < froztbyte> | and a selection filter to get Rick Astley out of the necessary Shakespeare text ;D |
15:35 | < Noah> | "@Matt: The "performance advice" sort of made me laugh. It was like telling a snail to keep its head low for better earodynamics :)" lmao |
15:45 | < Noah> | Dang, can't use external resources. Was gonna make a mIRC script to on START connect to irc.rastley.com then on CONNECT join #rastleyfans then on JOIN say "Can someone post the lyrics to "Never gonna Give You Up" in a private window to me please?" |
15:53 | | * Rhamphoryncus ponders how to build a state machine |
15:54 | < Noah> | Well, you need a nation machine to govern the state machine |
15:54 | < Noah> | But you need people machines to elect political machines into memory |
16:45 | < Rhamphoryncus> | Hrm. The best way to do my state machine would be writing a program to generate it :/ |
17:04 | | io is now known as io|meh |
17:30 | | io|meh is now known as io|gone |
18:02 | | rms is now known as Vasi |
18:20 | | Vash [Vash@Nightstar-241cb5d4.wlfrct.sbcglobal.net] has joined #code |
18:21 | | mode/#code [+o Vash] by ChanServ |
18:35 | | Kindamoody|out [Kindamoody@Nightstar-6154a72a.tbcn.telia.com] has quit [Operation timed out] |
18:47 | | Attilla_ [Obsolete@Nightstar-ef53f19f.as43234.net] has joined #code |
18:48 | | Attilla [Obsolete@Nightstar-00137a38.as43234.net] has quit [Ping timeout: 121 seconds] |
19:05 | | Kindamoody|afk [Kindamoody@Nightstar-6154a72a.tbcn.telia.com] has joined #code |
19:05 | | mode/#code [+o Kindamoody|afk] by ChanServ |
19:06 | | Kindamoody|afk is now known as Kindamoody |
19:14 | | Attilla_ is now known as Attilla |
19:15 | | Kindamoody is now known as Kindamoody[zZz] |
20:47 | < celticminstrel> | Okay, how to write a function template that says "if the type parameter satisfies X, do this; otherwise do that"... since I can't do partial specialization on a function template... |
20:48 | < celticminstrel> | Granted I could probably just use a normal if statement, but that'd make it a runtime check wouldn't it? I suppose that's not terribly important, but... |
20:50 | < celticminstrel> | The issue is that the type parameter is not used in the argument list. |
20:57 | <@ToxicFrog> | Which language is this again? |
20:57 | < celticminstrel> | C++ |
20:57 | < celticminstrel> | I guess I just have to do the if statement. |
20:57 | < celticminstrel> | Since I can't overload in this specific case. |
20:59 | < celticminstrel> | Oh, but if I use type traits it'll boil down to an "if(constant)", so I guess that's fine. |
21:42 | < Rhamphoryncus> | celticminstrel: boost has enable_if, which is an evil hack to accomplish compile-time conditionals |
21:52 | < celticminstrel> | That's true. I think it may not be quite what I need though. However, using the type traits in an if statement seems like the right move. |
21:52 | < celticminstrel> | Although, I broke collision again, so maybe not... I dunno... |
22:06 | < celticminstrel> | Oh I think I fixed it already. |
22:57 | <&McMartin> | 08:45 < Rhamphoryncus> Hrm. The best way to do my state machine would be writing a program to generate it :/ |
22:57 | <&McMartin> | There are some preprocessor lolz you can do to make it a tiny DSL |
22:58 | < Rhamphoryncus> | I was putting one together with python but building the state table.. |
22:58 | <&McMartin> | Mmm. |
22:59 | <&McMartin> | Yeah, if you're doing Python already, have it emit the Case Statement Of Doom. |
22:59 | <&McMartin> | and,hm, index it with either an int or an enum. |
22:59 | <&McMartin> | That will on a good compiler turn into an iterated computed GOTO, the best machine-level representation. |
23:00 | <&McMartin> | (As Gambit proved to me, this is also what "big pile of functions that all tail-call each other - itself also a state machine, where the state is "what function am I evaluating right now" - compiles down to) |
23:02 | <&McMartin> | (Gambit basically builds a state machine with one state for EVERY BASIC BLOCK IN THE PROGRAM, and then keeps the call stacks and environment structures on C's heap.) |
23:02 | <&McMartin> | (This is how it can be a C-emitting compiler - and actually a compiler - while still having full support for things like first-class continuations.) |
23:04 | | Vasi is now known as rms |
23:13 | < Rhamphoryncus> | I was using a string to encode either output of a character or recursion into two other locations within said string |
23:17 | | Attilla [Obsolete@Nightstar-ef53f19f.as43234.net] has quit [[NS] Quit: ] |
23:32 | < celticminstrel> | Ugh, my collision handling is all convoluted and stuff. |
23:35 | <&McMartin> | It's pretty rough, yeah. |
23:35 | <&McMartin> | The one serious collision detector I wrote (in 3D) was pretty much what carried the final grade in my graphics class. |
23:40 | < celticminstrel> | Well, I'm doing tile-based, but it's still kinda convoluted how I did it. |
23:41 | < celticminstrel> | Detecting collision isn't hard; it's the process that it goes through once it's detected that's convoluted. |
23:41 | < celticminstrel> | (It's basically "is there something on the space I'm trying to move to? If so, collide with it.") |
23:49 | | Attilla [Obsolete@Nightstar-ef53f19f.as43234.net] has joined #code |
23:52 | < celticminstrel> | Okay, for an allOf accumulation the initial value would have to be true, correct? |
23:55 | < celticminstrel> | ...wait. I should probably be doing anyOf, not allOf... |
--- Log closed Mon Jun 04 00:00:28 2012 |