--- Log opened Sat Jan 12 00:00:17 2013 |
00:00 | | Zemyla [zemyla@Nightstar-8fbb7981.compute-1.amazonaws.com] has quit [Ping timeout: 121 seconds] |
00:02 | | Zemyla [zemyla@Nightstar-8fbb7981.compute-1.amazonaws.com] has joined #code |
00:02 | | mode/#code [+o Zemyla] by ChanServ |
01:08 | | Derakon[AFK] is now known as Derakon |
01:19 | | celticminstrel [celticminst@Nightstar-e83b3651.cable.rogers.com] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!] |
01:36 | | Derakon [Derakon@Nightstar-a3b183ae.ca.comcast.net] has quit [Client exited] |
01:41 | | celticminstrel [celticminst@Nightstar-e83b3651.cable.rogers.com] has joined #code |
01:41 | | mode/#code [+o celticminstrel] by ChanServ |
01:41 | <&McMartin> | What is this batshittery |
01:42 | | * McMartin counts bytes, discovers that unrolling this loop makes it *smaller* |
01:43 | <~Vornicus> | ...that is batshittery |
01:43 | <&McMartin> | 6502 is really bad at pointers, it turns out~ |
01:45 | <~Vornicus> | apparently! |
01:45 | <&McMartin> | The savings comes from being able to switch to direct indexed memory loads |
02:00 | <&McMartin> | OK, apparently unrolling becomes less effective than a pointer loop once you're initializing more than 1.25KB of RAM. |
02:03 | <~Vornicus> | ...5 pages seems oddly arbitrary |
02:07 | <&McMartin> | Yes, that's because it's "the instructions for a pointer loop stay the same, but you go up N bytes as you unroll over larger spaces" |
02:07 | <&McMartin> | The tipping point for that linear equation hits the inflection point at f unrolls. |
02:07 | <&McMartin> | Er |
02:07 | <&McMartin> | five unrolls |
02:07 | <&McMartin> | There's nothing particularly designed about it |
02:08 | <&McMartin> | (It'd be more, but this is filling a fractional page so my unroll needs a branch to skip the last part) |
02:08 | <~Vornicus> | ah. |
02:09 | <~Vornicus> | "tipping point for that linear equation hits the inflection point at 5 unrolls" - how I can tell you aren't a mathematician. :P |
02:11 | <&McMartin> | Also am multitasking. |
02:11 | <&McMartin> | Intersects the constant function is boring~ |
02:12 | <~Vornicus> | just "the tipping point for that is at 5 unrolls" would have worked. :P |
02:47 | | syksleep is now known as Syk |
02:50 | | Vash [Vash@Nightstar-221158c7.sd.cox.net] has joined #code |
02:51 | | mode/#code [+o Vash] by ChanServ |
03:14 | | mac [mac@Nightstar-fe8a1f12.il.comcast.net] has joined #code |
03:33 | | Attilla [Obsolete@Nightstar-9e7fa2b2.range86-162.btcentralplus.com] has quit [Ping timeout: 121 seconds] |
03:36 | | Kindamoody[zZz] is now known as Kindamoody |
04:06 | | Azash [ap@Nightstar-339920e6.net] has quit [Ping timeout: 121 seconds] |
04:09 | | Azash [ap@Nightstar-339920e6.net] has joined #code |
04:09 | | mode/#code [+o Azash] by ChanServ |
05:16 | | Vash [Vash@Nightstar-221158c7.sd.cox.net] has quit [[NS] Quit: I <3Lovecraft<3 Vorn!] |
05:22 | | Zemyla [zemyla@Nightstar-8fbb7981.compute-1.amazonaws.com] has quit [Ping timeout: 121 seconds] |
05:26 | | Zemyla [zemyla@Nightstar-8fbb7981.compute-1.amazonaws.com] has joined #code |
05:26 | | mode/#code [+o Zemyla] by ChanServ |
05:32 | | VirusJTG [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has quit [[NS] Quit: Program Shutting down] |
05:38 | | Derakon [Derakon@Nightstar-a3b183ae.ca.comcast.net] has joined #code |
05:38 | | mode/#code [+ao Derakon Derakon] by ChanServ |
06:39 | | Syk_ [the@A6D346.0C1313.97001D.1140D4] has joined #code |
06:41 | | Syk [the@9C034E.7405CE.051E50.DB7CC7] has quit [Ping timeout: 121 seconds] |
06:52 | | Derakon is now known as Derakon[AFK} |
07:15 | | ErikMesoy|sleep is now known as ErikMesoy |
07:32 | | thalass [thalass@Nightstar-724ec5eb.bigpond.net.au] has joined #code |
07:43 | < mac> | would the world be better off it Internet explorer didn't exist? |
07:43 | <@Tarinaky> | Didn't exist, or hadn't existed? |
07:45 | <@Tarinaky> | If some kind of magical wave passed through reality and turned every copy of IE into a different browser, and erased all source and binaries Microsoft had - eliminating it from the market today. |
07:45 | <@Tarinaky> | The world would probably be a better place, if only because there're a lot of very old versions of IE in the wold that need to die. |
07:46 | <@Tarinaky> | If IE had never existed though, then we'd all be paying $59.99 with every computer for a copy of Nutscrape Navigator. |
07:46 | <@Tarinaky> | Mozilla would never have existed. |
07:47 | <@Tarinaky> | Which means no Firefox. Which means no watershed moment when the dominant browser was forced to stopped sucking. |
07:47 | <@Tarinaky> | Everything that was ever said against Internet Explorer would count against Netscape... |
07:47 | <@Tarinaky> | Except for ActiveX, that would never have happened - so some good news at least. |
07:48 | < thalass> | heh |
07:48 | < thalass> | Without the bad, you can't appreciate the good (or be inspired to create it) |
07:49 | <@Tarinaky> | There's a reason Internet Explorer became the dominant browser. |
07:53 | <@Tarinaky> | But in Bizarro Netscape land the market would probably break down: Netscape Navigator, Opera, Google Chrome, Other. |
07:53 | <@Tarinaky> | No Mozilla codebase means less variety in 'Other'. |
07:54 | <@Tarinaky> | As the only free browser with a brand Google Chrome would be catapulting itself up the rankings... but it's still new today so we'll give it third place. |
07:55 | < ErikMesoy> | Are you saying Opera isn't a free browser with a brand? |
07:55 | <@Tarinaky> | Any contradictions? |
07:56 | < ErikMesoy> | Do you mean "already famous brand"? |
07:56 | | Kindamoody is now known as Kindamoody|afk |
08:04 | <@Tarinaky> | ErikMesoy: I don't think Opera would have a free version in bizarro world. |
08:05 | <@Tarinaky> | I'm going out on a limb a little with that - but their main revenue is the paid for version right? |
08:06 | <@Tarinaky> | The free version is because most browsers are free so they have to compete with that. |
08:06 | <&ToxicFrog> | Their main revenue is licensing mobile/console versions. AFAIK there is no pay version of the PC version. |
08:09 | < ErikMesoy> | Even before the PC version went totally free, it was free to download + pay to remove ads. |
08:11 | < ErikMesoy> | So they were on that track pretty early. |
08:20 | | thalass [thalass@Nightstar-724ec5eb.bigpond.net.au] has quit [Ping timeout: 121 seconds] |
08:21 | <@Tarinaky> | I still contend that it wouldn't have gone totally free on the PC without IE to compete against. |
08:21 | <@Tarinaky> | But I guess this doesn't really matter. |
08:35 | | celticminstrel [celticminst@Nightstar-e83b3651.cable.rogers.com] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!] |
09:00 | | mac [mac@Nightstar-fe8a1f12.il.comcast.net] has left #code ["Leaving"] |
09:44 | | thalass [thalass@Nightstar-724ec5eb.bigpond.net.au] has joined #code |
10:18 | | You're now known as TheWatcher |
10:33 | | Vornicus [vorn@ServerAdministrator.Nightstar.Net] has quit [[NS] Quit: ] |
12:25 | | VirusJTG [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has joined #code |
12:28 | | AD[Tab] [yaaic@Nightstar-be32adc8.80-203-17.nextgentel.com] has joined #code |
12:28 | | AD[Tab] [yaaic@Nightstar-be32adc8.80-203-17.nextgentel.com] has quit [Client closed the connection] |
12:28 | | AD[Tab]2 [yaaic@Nightstar-be32adc8.80-203-17.nextgentel.com] has joined #code |
12:30 | < AD[Tab]2> | I want screen for android because the terminal emulator resets itself when I alt-tab. Where can I find that? |
12:58 | <@TheWatcher> | ... that's really weird. I use ConnectBot, never had that |
13:02 | < Syk_> | same |
13:05 | | AD[Tab]2 [yaaic@Nightstar-be32adc8.80-203-17.nextgentel.com] has quit [Client closed the connection] |
13:05 | | AD[Tab] [yaaic@Nightstar-be32adc8.80-203-17.nextgentel.com] has joined #code |
13:06 | | Attilla [Obsolete@Nightstar-9e7fa2b2.range86-162.btcentralplus.com] has joined #code |
13:07 | | * thalass , too. ConnectBot is good. |
13:09 | < Syk_> | irssi connectbot for me |
13:11 | | AD[Tab] [yaaic@Nightstar-be32adc8.80-203-17.nextgentel.com] has quit [Client closed the connection] |
13:12 | | thalass [thalass@Nightstar-724ec5eb.bigpond.net.au] has quit [[NS] Quit: maybe] |
13:16 | < ErikMesoy> | Anno has ConnectBot open now and it's not letting him input commands. |
13:21 | | AD[Tab] [yaaic@Nightstar-be32adc8.80-203-17.nextgentel.com] has joined #code |
13:24 | < AD[Tab]> | How do I uso this connectbot? |
13:24 | < AD[Tab]> | *use |
13:25 | < AD[Tab]> | I see no place to enter a command. It just says it is not connected. |
13:39 | | AD[Tab]2 [yaaic@Nightstar-be32adc8.80-203-17.nextgentel.com] has joined #code |
13:39 | | AD[Tab] [yaaic@Nightstar-be32adc8.80-203-17.nextgentel.com] has quit [Client closed the connection] |
13:39 | < ErikMesoy> | I am listening for Anno, fwiw |
13:40 | < AD[Tab]2> | Good, because this client hops for no reason. |
13:51 | <@TheWatcher> | Start connectbot, From the dropdown at the bottom left (defaults to "ssh v", select 'local' |
13:51 | <@TheWatcher> | enter a nickname, anything |
13:54 | <@TheWatcher> | when you hit done, you'll get a command prompt. And from then on, that local user will appear in the connectbot user list |
13:55 | | Syloq [Syloq@NetworkAdministrator.Nightstar.Net] has quit [Operation timed out] |
13:55 | | Syloq [Syloq@NetworkAdministrator.Nightstar.Net] has joined #code |
13:56 | | mode/#code [+o Syloq] by ChanServ |
13:56 | < AD[Tab]2> | I have no dropdown on the bottom left. |
13:57 | <@TheWatcher> | you should have some box somwehre that contains a ghosted 'username@hostname:port' with a dropdown next to it |
13:59 | < AD[Tab]2> | One moment. I'll give a screenshot. |
14:01 | < ErikMesoy> | http://i48.tinypic.com/29vmi5h.jpg |
14:01 | < AD[Tab]2> | That. I see no boxes. |
14:05 | <@TheWatcher> | No idea wtf then - when I start connectbot I get: http://fleet.starforge.co.uk/images/Screenshot.png |
14:05 | <@TheWatcher> | Do you have a 'hosts' button or something? |
14:07 | < ErikMesoy> | No. |
14:09 | < ErikMesoy> | Anno has installed a different version and it "sorta works" now |
14:09 | | AD[Tab]2 [yaaic@Nightstar-be32adc8.80-203-17.nextgentel.com] has quit [Client closed the connection] |
14:14 | | AD[Tab] [yaaic@A08927.B4421D.FE7332.A86588] has joined #code |
14:15 | < AD[Tab]> | Okay, now how do I switch between channels in irssi? |
14:15 | <@Tamber> | /window <window number>, or /w <window number> |
14:16 | <@TheWatcher> | Or install Hacker's Keyboard and get your alt, ctrl, etc keys back >.> |
14:17 | < AD[Tab]> | I can't use alt-# or anything? |
14:17 | <@TheWatcher> | sure, if your keyboard has them |
14:19 | < AD[Tab]> | I have HK, but alt-# does nothing. |
14:21 | < ShellNinja> | No, wait, that's just lag. |
14:39 | | AD[Tab] [yaaic@A08927.B4421D.FE7332.A86588] has quit [Connection reset by peer] |
14:40 | < ShellNinja> | Why does it force portrait mode? |
14:40 | < ShellNinja> | I prefer landscape. |
14:44 | < ShellNinja> | There we go. |
14:44 | < ShellNinja> | Now I can actually hit one key at a time. |
15:50 | <@gnolam> | http://acko.net/blog/how-to-fold-a-julia-fractal/ |
16:28 | | celticminstrel [celticminst@Nightstar-e83b3651.cable.rogers.com] has joined #code |
16:28 | | mode/#code [+o celticminstrel] by ChanServ |
16:34 | | Syk_ is now known as syksleep |
16:41 | | Kindamoody|afk is now known as Kindamoody |
17:24 | | Kindamoody is now known as Kindamoody|cooking |
17:26 | | Rhamphoryncus [rhamph@Nightstar-cc6253d6.abhsia.telus.net] has quit [Ping timeout: 121 seconds] |
17:27 | | Rhamphoryncus [rhamph@Nightstar-cc6253d6.abhsia.telus.net] has joined #code |
17:27 | | mode/#code [+o Rhamphoryncus] by ChanServ |
18:14 | | Kindamoody|cooking is now known as Kindamoody |
19:05 | | ErikMesoy [Erik@Nightstar-be32adc8.80-203-17.nextgentel.com] has quit [[NS] Quit: Reboot] |
19:26 | | Kindamoody is now known as Kindamoody[zZz] |
19:27 | | d4de [olorin@687AAB.1E386D.9FE338.92E600] has quit [Ping timeout: 121 seconds] |
19:27 | | ErikMesoy1 [Erik@Nightstar-be32adc8.80-203-17.nextgentel.com] has joined #code |
19:32 | | d4de [olorin@687AAB.1E386D.9FE338.92E600] has joined #code |
19:43 | | d4de [olorin@687AAB.1E386D.9FE338.92E600] has quit [Ping timeout: 121 seconds] |
19:43 | | d4de [olorin@687AAB.1E386D.9FE338.92E600] has joined #code |
20:32 | | Derakon[AFK} is now known as Derakon |
20:37 | | ErikMesoy1 is now known as ErikMesoy |
21:11 | | RichyB [mycatverbs@Nightstar-86656b6c.cable.virginmedia.com] has joined #code |
22:21 | <&McMartin> | My appetite for pointlessness has been temporarily sated |
22:21 | | * McMartin has written a joystick-powered high-resolution sketch program for the Commodore 64 in 355 bytes. |
22:37 | < RichyB> | Neat. |
22:43 | <&McMartin> | C64 bitmap mode is kind of wackass; it's basically a complete partition of the screen into unique character-like tiles. |
22:45 | <&McMartin> | So to set a pixel at (x, y), you have to compute the address BASE+(X & 240)+(Y >> 3) * 320 + (Y & 7), and then OR that address by 2^(7-(X&7)) |
22:45 | <&McMartin> | A few days ago I woke up with a realization that you could do this *reasonably* efficiently with a 3-byte address/mask combo that you updated to do relative motion of one pixel in any direction. |
22:46 | <&McMartin> | (Since the C64's CPU can't do multiplication, setting up the initial condition is kind of challenging and expensive) |
22:46 | <&McMartin> | And it looks like my little scheme works, so I put in joystick control and a little sprite cursor |
22:47 | <&McMartin> | I've got an implementation of Bresenham's algorithm already that *does* do the multiplication; if I get the urge later I might come up with some way of doing precomputation of important parts of it in advance. |
22:48 | <&McMartin> | I'm not sure if that can be done without division, though. |
22:48 | <&McMartin> | (Which the chip also doesn't have) |
22:48 | < RichyB> | Neat. |
22:49 | <&McMartin> | (Bresenham's is the standard algorithm for efficiently rasterizing lines) |
22:49 | <&McMartin> | (But my implementation is slow enough that if you're drawing a bunch of lines at once you can basically see it chugging along, even if you're writing it in machine language) |
22:49 | < RichyB> | I knwo. I think that you can do it without division, though. |
22:50 | <&McMartin> | Oh yes |
22:50 | <&McMartin> | Bresenham's does |
22:50 | < RichyB> | Uh, how about multiplying with LUTs? |
22:50 | <&McMartin> | But it does it by setting up some precomputed values and then the 'division' happens via repeated subtraction as part of your I/O-bound pixel output loop. |
22:50 | <&McMartin> | LUTs? |
22:51 | < RichyB> | Look up tables. |
22:51 | <&McMartin> | Ah |
22:51 | <&McMartin> | My goal is to be space-efficientn as well as speed-efficient, actually |
22:51 | <&McMartin> | And the number "320" only has 2 bits set so you can do it with shifts and adds pretty simply |
22:52 | <&McMartin> | There's no way around that one if you're going to allow starting from an arbitary point |
22:52 | | Vornicus [vorn@ServerAdministrator.Nightstar.Net] has joined #code |
22:52 | | mode/#code [+qo Vornicus Vornicus] by ChanServ |
22:52 | <&McMartin> | The problem is that my current version does this from scratch on every pixel drawn. |
22:53 | <&McMartin> | That's *really inefficient*, especially when you're setting (as you were in that moire pattern I linked the other day) 64,000 pixels. |
22:54 | <&McMartin> | Ha ha |
22:54 | <&McMartin> | Well, I guess if I wanted to optimize for *space* I could just do a "home the pen and then do linear loops" for setting the start position |
22:54 | <&McMartin> | That's not very efficient~ |
22:55 | <&McMartin> | But the address/mask storage mode is exactly as much space as the X/Y coordinate mechanic. |
22:56 | <&McMartin> | So maybe I *can* use a pen-based thing that doesn't try for anything else and have it be Fast Enough (tm) |
22:56 | < RichyB> | I'm confuses. |
22:56 | < RichyB> | Bresenham's does not have multiplication in it either. |
22:57 | <&McMartin> | No, it doesn't. |
22:57 | <&McMartin> | But it *does* have "set the pixel at (x, y)" |
22:57 | <&McMartin> | Which is that horrendous equation I quoted above. |
22:57 | < RichyB> | Where do you multiply? Why? To turn (x,y) into the address containing the pixel to turn on? |
22:57 | <&McMartin> | Yes. |
22:57 | < RichyB> | Ah. |
22:57 | <&McMartin> | Which is actually 8 pixels. |
22:58 | < RichyB> | Oh |
22:58 | <&McMartin> | And which is not laid out in any sensible grid |
22:58 | <&McMartin> | So there's also bitmask trickery. |
22:58 | <&McMartin> | But! |
22:58 | < RichyB> | You can advance in any direction by 1 pixel fast though, right? |
22:58 | <&McMartin> | For any given line, one of X and Y changes by exactly one pixel each loop iteration, and the other changes by either 0 or 1. |
22:59 | <&McMartin> | I can *now*. That was precisely the insight that kicked all this off. |
22:59 | < RichyB> | Just after doing (x += dx), loop dx times moving the cursor right. |
23:00 | < RichyB> | Then you do the mad multiply only for the start pixel. |
23:00 | <&McMartin> | ("fast" is still kind of relative. It would be one instruction on a 8086 driving an MCGA 320x200 display, and it's like 50 |
23:00 | <&McMartin> | Yes |
23:00 | <&McMartin> | THat's exactly the plan, and it's better than that |
23:00 | <&McMartin> | because abs(dx) is guaranteed to be 1[*] |
23:00 | < RichyB> | Spiffy. |
23:00 | <&McMartin> | [*] Assuming |x2-x1| > |y2-y1| |
23:01 | <&McMartin> | and abs(dy) is guaranteed to be either 0 or 1[*] |
23:01 | <&McMartin> | (same caveat) |
23:01 | <&McMartin> | It might be possible to do better with a version of Bresenhams that knows exactly how long it's going to be before abs(dy) isn't zero |
23:03 | < RichyB> | You know what would be really funny is if you attached something like a HD7970 or a GTX690 to your C64 emulator |
23:03 | <&McMartin> | I'm not sure if you can meaningfully drive one of those through an RS232 |
23:03 | < RichyB> | So that you could write c64 programs that did really fast graphics but only by poking shaders into them. |
23:04 | < RichyB> | Well, you can drive them by serialising openGL calls to a byte stream. |
23:05 | < RichyB> | Would be too silly. |
23:05 | | Derakon is now known as Derakon[AFK] |
23:10 | <&McMartin> | Yeah, I'm less interested in "driving new hardware from older cores" and more interested in "how do you efficiently do tricky things in ways that would have made sense at the time" |
23:17 | <&McMartin> | http://pastebin.starforge.co.uk/547 |
23:17 | <&McMartin> | Whole lot of abuse and lack of error checking going on in there |
23:18 | | * McMartin could probably crunch out a few more bytes there. |
23:18 | <&McMartin> | But since the whole point was more or less to test the pen'* routines... |
23:27 | | RichyB [mycatverbs@Nightstar-86656b6c.cable.virginmedia.com] has quit [Client closed the connection] |
23:27 | | RichyB [mycatverbs@Nightstar-86656b6c.cable.virginmedia.com] has joined #code |
23:31 | <&McMartin> | Bleh |
23:32 | <&McMartin> | My current Bresenham's algorithm is well over 200 lines long. |
23:32 | <&McMartin> | Grimly wasteful of space. |
23:32 | <&McMartin> | Not sure if there's a better way. |
23:37 | <~Vornicus> | assembler? |
23:37 | <&McMartin> | Yeah |
23:37 | <~Vornicus> | and is this just for straight lines? |
23:37 | <&McMartin> | Also, there *is* a better way |
23:37 | <&McMartin> | Wiki has a variant that maintains two "error bars" and thus doesn't need code duplication for the cases where the slope of the line is greater than 1. |
23:38 | <&McMartin> | But I expect I won't be able to do *much* better; the initial implementation on the IBM 1041 was 150 lines or so and *it* didn't have to deal with a coordinate range larger than its own ALU. |
23:38 | < RichyB> | You could be really dirty and have the fn rewrite the loop to swap x with y depending on which way steepness goes? |
23:39 | <&McMartin> | I was thinking something like that |
23:39 | <&McMartin> | But ti doesn't pay off, I don't think. |
23:39 | <&McMartin> | It's *really* wacky because the x coordinate is a 16-bit value and the y coordinate is an 8-bit value |
23:40 | <&McMartin> | It *is* sensible to have the assignment of sx and sy to +/- 1 modify some later JSR calls to jump to the appropriate routine. |
23:40 | < RichyB> | How much does it hurt to treat both as 16 if you get to do that? |
23:41 | <&McMartin> | While this is *technically* self-modifying code themodification is done once and dominates all calls to it, so it's just polymorphism from the point of view of code analysis. |
23:41 | <&McMartin> | Uh, one moment, let's see here... |
23:41 | <&McMartin> | 8-bit "add this value to this memory location" is CLC; LDA loc; ADC #val; STA loc for 9 bytes |
23:42 | <~Vornicus> | why is... oh, wait, c64. it's 320x200, that makes sense |
23:42 | <&McMartin> | 16-bit is CLC; LDA loc; ADC#val_low; STA loc; LDA loca+1; ADC#val_high; STA loca+1 |
23:42 | <&McMartin> | WHich is, hm... 1+3+2+6+2+3 = 17 bytes |
23:42 | <&McMartin> | So it's just under twice as much code to do it. |
23:43 | < RichyB> | Sure, changing jmp addresses in code is just like setting up threaded interpreters. No issue. |
23:43 | <&McMartin> | Anyway |
23:44 | <&McMartin> | This implementation looks very, very good: http://en.wikipedia.org/wiki/Bresenham%27s_line_algorithm#Simplification |
23:45 | <&McMartin> | The only multiplication is by two, and that's a six-byte, two instruction sequence for 16 bits (asl ptr; rol ptr+1) |
23:45 | | * RichyB nod |
23:46 | < RichyB> | That's the one that I was looking at during tthis converstion earlier |
23:46 | <&McMartin> | Yeah, that's a *significant* space and code complexity optimization over the original |
23:46 | < RichyB> | Sorry for typing really poorly, I'm not good with this Droid keyboard. |
23:47 | <&McMartin> | You're kicking ass if this is on a phone |
23:47 | < RichyB> | I've used the circle Bresenham's from there before, to make scripts in Minecraft that generate circles of TNT |
23:48 | <&McMartin> | Heh |
23:48 | <&McMartin> | So, yes |
23:48 | <&McMartin> | http://michaelcmartin.github.com/Ophis/book/p481.html will be seeing some consultation. |
23:48 | <&McMartin> | Memo From My Past Self, as it were. |
23:48 | <&McMartin> | (Also, having read some of the books about becoming an advanced 6502 programmer from the era, I appear to have basically matched or exceeded them~) |
23:48 | < RichyB> | Nah, Nexus 7 with Hacker's Keyboard installed. It's proper qwerty but I have to use my thumbs and I'm bad enough at that to feel self-conscious about it. |
23:50 | < RichyB> | Heh, good choice of article title. |
23:51 | <&McMartin> | Well, series title. |
23:51 | < RichyB> | Are you familiar with parser combinators? |
23:51 | <&McMartin> | I've used Parsec, but I don't consider myself an expert in the general field. |
23:52 | < RichyB> | That'll do. So Parsec is kinda an eDSL that gives you nice parsers without having to invoke an external LR-generator |
23:52 | <&McMartin> | Yup |
23:53 | <&McMartin> | IIRC, Parsec's actual parsing was backtracking-based, which lets it solve a lot of the ugliness in table-based systems. |
23:53 | < RichyB> | Similar idea, there are a few eDSLs for generating VHDL using Haskell as the host language |
23:53 | < RichyB> | Yeah, it sucks if your language is not LL(1) |
23:55 | < RichyB> | I was just thinking, you can generate parsers and nets, why not Lisp macros or Haskell combinators that spit out CPU opcodes? :) |
23:55 | <&McMartin> | Well |
23:55 | <&McMartin> | Congratulations: you have invented the "compiler" |
23:56 | | * McMartin has a sizable fraction of a Pascal compiler for the 6502 written in OCaml |
23:56 | <&McMartin> | I never got off my butt enough to make recursive function calls working. |
23:56 | < RichyB> | I think I remember seeing a paper or presentation where somebody did that for generating code for the Cell |
23:56 | <&McMartin> | But yeah, that's absolutely a legitimate thing to do, and if you can get away with direct generation off the AST you're in pretty good shape |
23:57 | <&McMartin> | normally you want to transform it a little first to make sure that it makes a nice ABI or checks its variable assignments or whatever |
23:57 | <&McMartin> | Oop, running out of power. |
23:57 | <&McMartin> | Back later. |
23:58 | < RichyB> | Their motivation was they wanted to write high-level code 90% of the time, but every now and again they wanted to spit out one of the special vector instructions that Cell has which operate with really weird semantics on vectors and you can never get compilers to emit them because their use depends on knowledge about precision that only the human author can ever have in advamce. |
--- Log closed Sun Jan 13 00:00:07 2013 |