--- Log opened Mon Feb 26 00:00:27 2007 |
00:10 | | * gnolam snerks. |
00:10 | < gnolam> | http://www.dangermouse.net/esoteric/intelligentdesignsort.html |
00:11 | < MyCatVerbs> | Niiice. |
00:11 | <@Vornicus> | heh |
00:11 | < MyCatVerbs> | My own personal favourite was the darwinian mousetrap. |
00:12 | | * AnnoDomini chuckles. |
00:21 | <@ToxicFrog> | The Darwinian Mousetrap? |
00:23 | < gnolam> | I believe that's called a "cat". |
00:23 | < MyCatVerbs> | ToxicFrog: counterexample to Behe et crew's assertion that a mousetrap could never have been designed in incremental, evolutionary stages. |
00:24 | <@ToxicFrog> | Aah. |
00:24 | | Thaqui [~Thaqui@Nightstar-25354.jetstream.xtra.co.nz] has joined #code |
00:24 | <@Reiver> | Where is it? >.> |
00:25 | < MyCatVerbs> | ToxicFrog: so some student comes up with an entirely plausible sequence (assuming a universe whose physical laws are predisposed to reproducing mousetrap - no, I have no idea either) evolutionary sequence in which he shows that each subsequent stage is workable (if barely), much more effective than the previous one and also reachable from the previous one without much alteration. |
00:25 | < MyCatVerbs> | Reiver: no idea now, I saw it linked ages back from the Panda's Thumb project, I think. |
00:27 | <@Reiver> | http://www.arn.org/docs/behe/mb_mousetrapdefended.htm |
00:27 | <@Reiver> | GIYF. >.> |
00:28 | < MyCatVerbs> | Thanks, Reiver. That looks like it. |
00:28 | | AnnoDomini [~farkoff@Nightstar-29702.neoplus.adsl.tpnet.pl] has quit [Quit: Astro Cat will play for you... the Symphony of Space.] |
00:28 | < MyCatVerbs> | No wait, that's Behe. |
00:29 | < MyCatVerbs> | Ah, he linked it at the bottom. http://udel.edu/~mcdonald/mousetrap.html |
00:34 | <@Reiver> | The rebuttal is sorta weak, actually. |
00:34 | <@Reiver> | heh. |
00:35 | < MyCatVerbs> | Reiver: hmmmm? McDonald's page or Behe's? |
00:35 | <@Reiver> | Behe's. |
00:35 | < MyCatVerbs> | "If several separate mutations have to occur before we go from one functional trap to the next, then a Darwinian process is effectively ruled out, because the probability of getting multiple unselected mutations that eventually lead to a specific complex structure is prohibitive." <--- whoopsie, BZZT WRONG. Practical experiment shows the opposite. |
00:36 | < MyCatVerbs> | kthxbai you can go home now. Fuckwit. |
00:36 | <@ToxicFrog> | Yes, but remember, these people believe that such experiments are at best flawed and at worst deliberate deceptions. |
00:36 | <@ToxicFrog> | If they acknowledge them at all. |
00:37 | <@Reiver> | Truth, TF. |
00:37 | <@Reiver> | Sad, but truth. |
00:37 | < MyCatVerbs> | Oh and that's before we start on the upfront lies. |
00:37 | < MyCatVerbs> | I think Behe relies here entirely on the assumption that his audience will not read the material he links to. |
00:38 | < MyCatVerbs> | "Shown below are the simplest and next-to-simplest traps." http://www.arn.org/docs/behe/mousetrap1.gif <--- what Behe says McDonald's simplest trap is. |
00:38 | < MyCatVerbs> | http://udel.edu/~mcdonald/stillmousetrap1.gif <--- actually, it's this. Note the many fundamental differences? |
00:54 | <@ToxicFrog> | MCV: actually, I think that was correct at the time Behe's page was written. |
00:54 | <@ToxicFrog> | McDonald later redid his mousetraps with more steps and simpler starting point. |
00:55 | | timelady [~romana@Nightstar-14947.lns7.adl2.internode.on.net] has quit [Quit: bbl] |
00:58 | < MyCatVerbs> | ToxicFrog: would make sense. |
00:58 | < MyCatVerbs> | http://www.dangermouse.net/esoteric/hanoisort.html <--- ow, my fucking head. |
00:58 | < MyCatVerbs> | >_< |
00:59 | <@Vornicus> | Ah, pathological sorts. |
01:01 | <@ToxicFrog> | ... |
01:01 | <@ToxicFrog> | Bogosort is normally characterised as O(n x n!). Step 1, the checking if the list is sorted, is assumed to be done with some sort of efficient one-pass comparison check, which takes n-1 operations. The loop will repeat on average n! times, since this is the number of permutations of n objects. The product (n-1)n! is O(n x n!). |
01:01 | <@ToxicFrog> | This is far too efficient. |
01:02 | < MyCatVerbs> | It's the way it's apparently O(N) for the worst case that hurts me. |
01:02 | <@Vornicus> | that's because different sorts have different worst cases. |
01:03 | <@ToxicFrog> | Yeah. |
01:03 | <@Vornicus> | Quicksort's worst case with first-object pivot is something that's already sorted. |
01:03 | <@ToxicFrog> | It's O(n) for some other sort's worst case. |
01:03 | <@Vornicus> | I don't think heapsort has a worst case. |
01:04 | <@Vornicus> | Or, not one that is significantly worse than average performance, anyway. |
01:05 | <@ToxicFrog> | .... |
01:05 | <@ToxicFrog> | Introduction |
01:05 | <@ToxicFrog> | Diamond sort is a sorting algorithm based on Jared Diamond's popular book on geographical anthropology Guns, Germs, and Steel. |
01:05 | <@ToxicFrog> | Algorithm Description |
01:05 | <@ToxicFrog> | For each number in the list to be sorted, create a population of human hunter-gatherers and place them in a region with a number of domesticable animal and plant species proportional to the number. Allow the societies to invent agriculture, civilisation, and industry. The first society to invent guns corresponds to the largest number in the list, at which point the rest of the numbers quickly become irrelevant. |
01:06 | <@Vornicus> | pfff |
01:06 | < MyCatVerbs> | Nah, the real brainfuck lies in working out which situation bubble sort is optimal for. |
01:08 | | MyCatVerbs is now known as MyCatGames |
01:09 | < gnolam> | I know: "Teaching bad habits". |
01:15 | | Chalcedon is now known as ChalcyOut |
01:18 | | Chalcy [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code |
01:18 | | mode/#code [+o Chalcy] by ChanServ |
01:20 | | ChalcyOut [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has quit [Ping Timeout] |
01:31 | | BlueTiger [BlueTiger@Nightstar-567.natsoe.res.rr.com] has quit [Quit: ] |
01:40 | | ToxicFrog is now known as CommanderFrog |
01:41 | | MyCatGames is now known as MyCatSleeps |
01:42 | < MyCatSleeps> | gnolam: think of a thousand-CPU machine with shared memory. |
01:42 | <@CommanderFrog> | I'm not sure that mergesort wouldn't be better there. |
01:43 | < MyCatSleeps> | gnolam: the dataset has occasional inversions (that is, sequences ACBD instead of ABCD) but no other mis-sortings. |
01:43 | < MyCatSleeps> | Rarer, obviously, than unburnt steak, but still a fun academic exercise. ^_^ |
01:53 | | gnolam [Lenin@Nightstar-13557.8.5.253.se.wasadata.net] has quit [Quit: Z?] |
02:23 | | * Vornicus fiddlefiddles. |
02:23 | <@Vornicus> | Okay, I have no idea how I want to go about this at all. |
02:30 | <@CommanderFrog> | ? |
02:30 | <@Vornicus> | I'm trying to write a color scheme applyer thing |
02:32 | <@Vornicus> | But I don't want to apply the color scheme to /everything/ in an object, just certain ones. |
02:33 | <@CommanderFrog> | Umm. |
02:33 | <@CommanderFrog> | What language, and is it raster or vector? |
02:35 | <@Vornicus> | javascript for Illustrator, vector. |
02:35 | | ChalcyGone [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code |
02:35 | | ChalcyGone is now known as Chalcedon |
02:35 | | Chalcy [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has quit [Killed (NickServ (GHOST command used by Chalcedon))] |
02:41 | <@Vornicus> | I'm trying to figure out how to tell the script which objects to apply the scheme to. |
02:43 | <@CommanderFrog> | Aah. |
02:43 | <@CommanderFrog> | No idea, sorry ;.; |
02:43 | | * CommanderFrog would in all likelyhood have just done the whole thing in postscript |
02:48 | | * Vornicus examines postscript. |
02:54 | <@Vornicus> | hrm. This requires that I hunt down a postscript thingy that can render to images. |
02:55 | <@CommanderFrog> | Ghostscript, which AFAIK comes standard on everything, does that. |
02:56 | <@Vornicus> | it's just called, uh, gs, right? |
02:56 | <@CommanderFrog> | Yes. |
02:56 | <@Vornicus> | Okeydokey. |
02:56 | <@CommanderFrog> | Check gs --help for a list of supported output formats |
02:56 | <@CommanderFrog> | And use gs -sDEVICE=<output format> -g<width>x<height> script > outputfile |
02:56 | <@CommanderFrog> | Or, better yet |
02:56 | <@CommanderFrog> | Replace the output redirect with -sOutputFile="outputfile" |
02:58 | <@Vornicus> | okay. |
03:00 | <@CommanderFrog> | Actually, stoatburgers.ps does this |
03:00 | <@CommanderFrog> | So taking a look at that may prove helpful |
03:02 | | BlueTiger [BlueTiger@Nightstar-567.natsoe.res.rr.com] has joined #Code |
03:03 | <@Vornicus> | I've never seen stoatburgers.ps |
03:03 | | * Vornicus eyes the list of devices |
03:03 | <@CommanderFrog> | http://www.funkyhorror.net/toxicfrog/projects/stoatburgers.bash |
03:03 | <@CommanderFrog> | http://www.funkyhorror.net/toxicfrog/projects/stoatburgers.ps |
03:04 | | * Vornicus examines this code. |
03:05 | <@Vornicus> | Does gs handle antialiasing? |
03:05 | < BlueTiger> | Can anyone here recommend a good distro of linux for someone who's not so great with it(preferrably one with support for Atheros chipset wifi cards out of the box. ;P)? |
03:06 | < BlueTiger> | Other than Ubuntu anyway |
03:06 | <@Vornicus> | Ubuntu. |
03:06 | <@Vornicus> | heh |
03:06 | < BlueTiger> | I've tried Ubuntu, but it's a pain because it doesn't include make, and I need make to build the madwifi drivers. =/ |
03:07 | <@Vornicus> | ...I've never had an ubuntu that didn't include make. |
03:07 | <@CommanderFrog> | ...it should include make. |
03:07 | < BlueTiger> | The disks of 6.06 that I have don't |
03:07 | <@CommanderFrog> | And if it doesn't, you can just install it with the package manager |
03:07 | <@CommanderFrog> | I use Fedora 6, myself |
03:07 | < BlueTiger> | Frog: I'm not connected to the net until I can build the drivers for my wifi card |
03:07 | < BlueTiger> | which means no package manager except for what's on the disk |
03:08 | < BlueTiger> | and make/gcc is not on the disk. =/ |
03:08 | <@CommanderFrog> | ....ew |
03:08 | < BlueTiger> | Which is one of the main reasons I haven't use linux in a while |
03:08 | <@CommanderFrog> | I don't know if fedora has madwifi, but it does come with make and gcc |
03:08 | <@CommanderFrog> | On the other hand, it's four times the size |
03:09 | < BlueTiger> | well, I have madwifi on my flash drive, so as long as it has gcc and make it'll work |
03:09 | < BlueTiger> | will it fit on a normal CD? |
03:09 | <@CommanderFrog> | The first disc will. |
03:10 | <@CommanderFrog> | But I don't know if that's the disc with the build tools. |
03:10 | <@CommanderFrog> | I think it is. |
03:10 | < BlueTiger> | ah |
03:10 | < BlueTiger> | ok |
03:11 | < BlueTiger> | thanks. :D |
03:12 | <@Vornicus> | Okay, first attempt at working in Postscript. |
03:12 | <@CommanderFrog> | Alternately - download the build tools packages for Ubuntu on another machine, put them on CD/USB key, install from there. |
03:12 | <@Vornicus> | http://vorn.dyndns.org/~vorn/catan/new_art/8/terrain/ocean.png will be to recreate this. |
03:12 | <@CommanderFrog> | Hmm. |
03:13 | <@CommanderFrog> | The background hex? Trivial. |
03:13 | <@CommanderFrog> | The waves? No idea, never worked with curved stuff in postscript |
03:13 | <@CommanderFrog> | http://atrey.karlin.mff.cuni.cz/~milanek/PostScript/Reference/REF.html |
03:13 | <@Vornicus> | The path is the somewhat interesting part; I'm looking at the postscript reference right now, and it looks like it might be simple enough. |
03:13 | <@CommanderFrog> | Check curveto |
03:14 | <@Vornicus> | They're simple curves, using the usual control point thing. |
03:15 | <@Vornicus> | a 16-point line. |
03:15 | <@Vornicus> | indeed, curveto is the right thing to look at. What do you know. |
03:17 | <@Vornicus> | ...hey, look, the other thing I need is there too. |
03:17 | <@CommanderFrog> | What's the other thing? |
03:18 | <@CommanderFrog> | (actually - it might even be possible to have Illustrator generate postscript output, and then you can just modify that to generate all the different colors you need) |
03:18 | <@CommanderFrog> | (assuming it's not completely unreadable, which is just this side of completely possible) |
03:18 | <@Vornicus> | clipping. |
03:18 | <@Vornicus> | ...you know, that's a great idea, let's see if it does it. |
03:19 | | MyCatSleeps is now known as MyInsomniaVerbs |
03:20 | <@Vornicus> | It can do EPS |
03:21 | <@Vornicus> | I wonder what eps looks like. |
03:21 | <@CommanderFrog> | Depends on the generator. |
03:23 | <@Vornicus> | A surprising number of applications open this. Let's see. |
03:24 | <@Vornicus> | eew, it's a bit messy in there. |
03:24 | <@CommanderFrog> | Suspected it might be. |
03:25 | <@Vornicus> | I'm not willing to try to extract the important bits from it. |
03:45 | | timelady [~romana@Nightstar-14947.lns7.adl2.internode.on.net] has joined #Code |
03:45 | | * Vornicus fiddles with PostScript. |
03:49 | | Chalcedon is now known as ChalcyOut |
03:52 | | * Vornicus downloads a syntax colorer for it. |
03:54 | | Chalcy [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code |
03:55 | | mode/#code [+o Chalcy] by ChanServ |
03:56 | <@CommanderFrog> | Vornicus: what editor? |
03:56 | | ChalcyOut [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has quit [Ping Timeout] |
03:56 | <@Vornicus> | TextWrangler. |
04:00 | | * Vornicus wanders the thing. |
04:00 | <@Vornicus> | Okay, I'm definitely in over my head. |
04:00 | <@CommanderFrog> | The thing? |
04:00 | <@CommanderFrog> | The EPS? |
04:00 | <@Vornicus> | No, the postscript book. |
04:14 | | * Vornicus wanders around in there. |
04:15 | | ChalcyGone [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code |
04:15 | | Chalcy [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has quit [Killed (NickServ (GHOST command used by ChalcyGone))] |
04:15 | | ChalcyGone is now known as Chalcedon |
04:19 | | * Vornicus eyes. |
04:19 | <@Vornicus> | Okay, definitely very confused. |
04:23 | <@CommanderFrog> | ? |
04:23 | <@CommanderFrog> | Anything I can help with? |
04:23 | <@Vornicus> | oh, just, all the state it's throwing around in the background. |
04:24 | <@Vornicus> | How do I tell it what color I want? |
04:24 | <@CommanderFrog> | R G B setcolo |
04:24 | <@CommanderFrog> | R G B setcolor |
04:24 | <@CommanderFrog> | R G and B are reals in the range [0..1] |
04:24 | <@Vornicus> | ok |
04:24 | <@CommanderFrog> | You may also have to do: /DeviceRGB setcolorspace |
04:25 | <@CommanderFrog> | At some point before any calls to setcolor. |
04:25 | <@CommanderFrog> | A lot of this stuff you can, I think, figure out by poking stoatburgers.ps |
04:26 | <@Vornicus> | okay. |
04:26 | <@CommanderFrog> | (since that's how I'm refreshing my memory~) |
04:27 | <@Vornicus> | heh |
04:27 | <@CommanderFrog> | Oh. The scale command will be handy for generating the different sizes, too. |
04:27 | <@Vornicus> | Okay. |
04:28 | <@CommanderFrog> | And translate for repeating the same code in different places easily. |
04:33 | | * Vornicus apparently doesn't even need gs to run a .ps file, his image viewer can handle it. |
04:33 | <@CommanderFrog> | Cool. |
04:33 | <@CommanderFrog> | You might still want to use gs for the final run, though, since you'll be generating lots and lots of images. |
04:33 | <@Vornicus> | and, hey, it worked. |
04:34 | <@Vornicus> | yeah, I'm not going to use my image viewer for that step. |
04:45 | | * Vornicus starts drawing curves. |
04:46 | <@Vornicus> | okay, I need to use a thicker pen. |
04:47 | | Forj [~Forj@Nightstar-869.bitstream.orcon.net.nz] has joined #code |
04:47 | <@Vornicus> | setlinewidth! How appropriately named! |
04:47 | <@Vornicus> | woo, it works! |
04:48 | | Chalcedon is now known as ChalcyOut |
04:48 | <@CommanderFrog> | Isn't postscript tasty? |
04:49 | <@Vornicus> | Postscript is pretty tasty, yeah. |
04:52 | | Chalcy [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code |
04:53 | | mode/#code [+o Chalcy] by ChanServ |
04:53 | <@Vornicus> | let me see here. |
04:54 | <@Vornicus> | What's the right png device if I want a full color png? |
04:54 | | Forj [~Forj@Nightstar-869.bitstream.orcon.net.nz] has quit [Ping Timeout] |
04:54 | | ChalcyOut [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has quit [Ping Timeout] |
04:54 | | Forj [~Forj@Nightstar-869.bitstream.orcon.net.nz] has joined #code |
04:54 | <@Vornicus> | ...also, gs's x11 device seems to not do antialiasing, which I need. |
04:57 | <@Vornicus> | pngalpha. okay. |
04:59 | | MyInsomniaVerbs is now known as MyCatNaps |
05:00 | <@CommanderFrog> | I'll have to remember that. |
05:01 | <@Vornicus> | ...gah, I don't want it to give me a prompt, why is it giving me a prompt? |
05:03 | | * Vornicus tries to figure out how to get GS to just run silently. |
05:04 | <@CommanderFrog> | At the end of your file: |
05:04 | <@CommanderFrog> | showpage |
05:04 | <@CommanderFrog> | quit |
05:05 | <@Vornicus> | Okay. |
05:05 | <@Vornicus> | ...hrm. |
05:05 | <@Vornicus> | It's antialiasing the stroke, but not the fill. |
05:06 | | * Vornicus eyes |
05:06 | <@Vornicus> | ...wait, it's doing both, never mind. |
05:06 | <@Vornicus> | okay, that will do nicely. |
05:09 | | BlueTiger [BlueTiger@Nightstar-567.natsoe.res.rr.com] has quit [Quit: ] |
05:10 | | Forjeh [~Forj@Nightstar-869.bitstream.orcon.net.nz] has joined #code |
05:11 | | Forj [~Forj@Nightstar-869.bitstream.orcon.net.nz] has quit [Ping Timeout] |
05:11 | | Chalcy [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has quit [Ping Timeout] |
05:13 | | Chalcedon [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code |
05:13 | | mode/#code [+o Chalcedon] by ChanServ |
05:16 | <@CommanderFrog> | <3 postscript |
05:17 | <@Vornicus> | let's run it through a few more paces to see if it does everything I want. |
05:18 | <@Vornicus> | okay, scaling also scales line width. |
05:19 | <@Vornicus> | Good. |
05:19 | <@Vornicus> | now, can I make it so the file itself specifies the drawing size, as opposed to the gs command? |
05:39 | <@CommanderFrog> | This is, I think, theoretically possible. |
05:39 | <@CommanderFrog> | However, I have never been able to figure out how. |
05:40 | <@Vornicus> | setpagedevice looks promising. |
05:46 | <@Vornicus> | << /PageSize [612 792] >> setpagedevice |
05:46 | <@Vornicus> | Like that. |
05:48 | <@Vornicus> | ...only, I think there are probably more toys. |
05:50 | <@CommanderFrog> | ...I do not remember what << and >> do. |
05:50 | <@Vornicus> | It's a... dictionary, I think. I'm not exactly sure |
06:01 | | ErikMesoy [~ejm@Nightstar-12501.bb.online.no] has quit [Quit: School] |
06:02 | <@Vornicus> | ...it doesn't really work. For some reason, doing it that way makes the file size go through the roof, and makes it greyscale. |
06:02 | <@Vornicus> | I don't have the patience to figure out how to fix itt. |
06:12 | | MyCatNaps [~mycatownz@Nightstar-379.dsl.in-addr.zen.co.uk] has quit [Ping Timeout] |
06:14 | | MyCatNaps [~mycatownz@Nightstar-379.dsl.in-addr.zen.co.uk] has joined #code |
06:29 | <@Vornicus> | Hrm. |
06:29 | <@Vornicus> | I think gs's png implementation is not good. |
06:34 | <@Vornicus> | also, aren't bezier curves supposed to be tangent to the line from anchor to first control point? |
06:37 | <@CommanderFrog> | ...maybe? |
06:37 | <@CommanderFrog> | I don't know, I've hardly used bezier curves. |
06:42 | <@Vornicus> | Yeah, it's supposed to be. |
06:42 | <@Vornicus> | http://en.wikipedia.org/wiki/Image:Bezier_cubic_anim.gif <--- also, this is an awesome animation. |
06:44 | <@Reiver> | ...Blink. |
06:44 | <@Reiver> | Wtf? |
06:44 | | Forgles [~Forj@Nightstar-869.bitstream.orcon.net.nz] has joined #code |
06:44 | <@Vornicus> | what about blink? |
06:45 | <@Reiver> | Nono. |
06:45 | <@CommanderFrog> | Vornicus: ok, so what's the problem with beziers? |
06:45 | <@Reiver> | That animation. |
06:45 | <@Reiver> | That is terribly complex. |
06:45 | <@Vornicus> | It's not that complex. It's actually very simple. |
06:46 | <@Vornicus> | The problem I'm having is that the end cap is not pointed in the right direction, so that successive waves like the ocean picture has don't exactly meet properly. |
06:46 | | Forjeh [~Forj@Nightstar-869.bitstream.orcon.net.nz] has quit [Ping Timeout] |
06:46 | <@CommanderFrog> | Aah. |
06:46 | | Chalcedon [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has quit [Ping Timeout] |
06:46 | <@CommanderFrog> | What kind of endcap are you using? |
06:46 | <@Reiver> | ...You're mathematically drawing your arts. OK. |
06:46 | | Chalcedon [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code |
06:46 | | mode/#code [+o Chalcedon] by ChanServ |
06:46 | <@Vornicus> | a butt - the kind that just ends. |
06:47 | <@CommanderFrog> | Just out of morbid curiosity...why are these lines more than 1px wide in any case? |
06:48 | <@Vornicus> | CommanderFrog: so you can see them. |
06:49 | <@CommanderFrog> | (argh, I hate this mission in TA2 so much) |
06:49 | <@Reiver> | ? |
06:49 | <@CommanderFrog> | And, um |
06:49 | <@CommanderFrog> | For the waves |
06:50 | <@CommanderFrog> | I would have thought you would use lines of width 0 or 1 to outline the wave, then fill the resulting path? |
06:50 | <@Vornicus> | no, those are lines. |
06:51 | <@CommanderFrog> | Yes, but do they have to be? |
06:51 | <@Vornicus> | If I want that shape, yes. |
06:52 | | * CommanderFrog looks at the image again |
06:52 | <@CommanderFrog> | Why? |
06:52 | <@Vornicus> | ...If I could figure out how to chain path chunks together, that would work, though. |
06:52 | <@CommanderFrog> | "path chunks" |
06:52 | <@CommanderFrog> | ? |
06:53 | <@Vornicus> | uh |
06:53 | | AnnoDomini [~farkoff@Nightstar-29702.neoplus.adsl.tpnet.pl] has joined #Code |
06:53 | <@Vornicus> | 0 0 moveto |
06:53 | <@Vornicus> | 2 0 4 2 6 2 curveto |
06:53 | <@Vornicus> | 8 2 6 0 8 0 curveto |
06:53 | <@Vornicus> | } def |
06:53 | <@CommanderFrog> | Yes. That defines a partial path. |
06:53 | <@Vornicus> | ...except that it ate the first line, which just says /wave { |
06:54 | <@CommanderFrog> | Subsequent lineto and curveto operations will append to the path. |
06:54 | <@Vornicus> | I want to take those two curveto directives and repeat them several times. |
06:54 | <@CommanderFrog> | Eventually you will want to closepath or fill or stroke. |
06:54 | <@Vornicus> | stroke. Right. |
06:54 | <@Vornicus> | The thing is |
06:54 | | MahalWORK is now known as Mahal |
06:55 | <@Vornicus> | I want to just say "draw a wave" and then "draw a wave" and then "draw a wave" and have three waves show up. |
06:55 | <@Vornicus> | right next to each other, joined so they meet properly. |
06:55 | <@CommanderFrog> | Right. So what you do is something like this: |
06:55 | <@CommanderFrog> | /wave { |
06:55 | <@CommanderFrog> | x y translate |
06:55 | <@CommanderFrog> | 0 0 moveto |
06:55 | <@CommanderFrog> | % curves that outline the wave go here |
06:55 | <@CommanderFrog> | fill |
06:56 | <@CommanderFrog> | wavewidth 0 moveto |
06:56 | <@CommanderFrog> | x inv y inv translate |
06:56 | <@CommanderFrog> | } def |
06:56 | <@CommanderFrog> | Although that may be slightly off. |
06:56 | <@Vornicus> | but the outline is a lot harder to draw than the path. This is why I'm using stroke. |
06:56 | <@CommanderFrog> | The outline isthe path! |
06:57 | <@Vornicus> | No, no |
06:59 | <@CommanderFrog> | Hmm |
06:59 | <@CommanderFrog> | Oh, I think I see what you mean |
07:00 | <@Vornicus> | http://vorn.dyndns.org/~vorn/ocean.ps <--- see for yourself. |
07:01 | <@Vornicus> | The outline is the edge of the rather wide stroke. |
07:02 | <@CommanderFrog> | That...actually looks fine to me. |
07:02 | <@Vornicus> | Right, that's because there's only one. |
07:03 | <@Vornicus> | refresh, try again. |
07:04 | <@Vornicus> | ..gah, translated the wrong one anyway, I never get it right. |
07:06 | <@Vornicus> | try again. |
07:06 | <@CommanderFrog> | Oh, I see what you mean. |
07:07 | <@CommanderFrog> | This looks like it should be fixable by twiddling the curve a bit, but I don't know. |
07:07 | <@CommanderFrog> | Perhaps if you just moved the second one a few units to the left? |
07:07 | | * Vornicus ponders, fiddles |
07:08 | <@Vornicus> | Anyway, Reiver, the bezier curve is generally how it's done nowadays. |
07:11 | <@Vornicus> | And indeed is so common that all I said was curveto and it used one. |
07:12 | <@Vornicus> | ...and I keep accidentally quitting my reference guide. |
07:13 | <@Vornicus> | is there a way I can pass parameters to a definition? |
07:15 | | * Vornicus tries something, and lo it works. |
07:16 | <@CommanderFrog> | Same way you pass parameters to anything else: on the stack |
07:16 | <@CommanderFrog> | If you want to save one in a variable for later consideration: /name exch def |
07:16 | <@CommanderFrog> | Will store the top value on the stack in name. |
07:16 | <@Vornicus> | ok. |
07:17 | <@CommanderFrog> | You can also use dup, which is probably faster (at the cost of more stack space and less readable code), but this isn't realtime programming here. |
07:19 | | * Vornicus victories. |
07:20 | <@Vornicus> | check it out now. |
07:20 | <@CommanderFrog> | Victoly! |
07:22 | <@Vornicus> | So yes. Translates act immediately and are applied to upcoming path segments only. |
07:22 | <@Reiver> | Is two 2:1 oblong box beizier curves a circle? |
07:23 | <@Vornicus> | Reiver: I don't believe so. |
07:23 | <@Reiver> | Ah. |
07:24 | <@Vornicus> | in fact, no- you can't reach the middle line unless you cross it completely. |
07:25 | <@Vornicus> | -- it even looks like a Spellcast invokation. |
07:27 | <@Vornicus> | ...gah, I need to apply pngcrush. |
07:32 | | * Vornicus tries to figure out how to compile pngcrush, seeing as it did not come with such amenities as a readme. |
07:35 | <@Vornicus> | but it's coming out with 51kb files where Illustrator was giving 6kb |
07:35 | <@CommanderFrog> | Ew |
07:35 | <@CommanderFrog> | gs's png support is not great |
07:35 | <@Vornicus> | evidently not. |
07:35 | <@Vornicus> | And pngcrush doesn't want to compile. |
07:36 | | Forgles [~Forj@Nightstar-869.bitstream.orcon.net.nz] has quit [Ping Timeout] |
07:36 | <@Vornicus> | at least it does alpha right |
07:37 | | Chalcedon [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has quit [Ping Timeout] |
07:40 | | timelady [~romana@Nightstar-14947.lns7.adl2.internode.on.net] has quit [Ping Timeout] |
07:42 | | Chalcedon [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code |
07:42 | | mode/#code [+o Chalcedon] by ChanServ |
07:42 | | Forj [~Forj@Nightstar-869.bitstream.orcon.net.nz] has joined #code |
07:45 | | Chalcy [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code |
07:45 | | mode/#code [+o Chalcy] by ChanServ |
07:47 | | Chalcedon [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has quit [Ping Timeout] |
07:49 | | timelady [~romana@Nightstar-14947.lns7.adl2.internode.on.net] has joined #Code |
07:58 | <@Vornicus> | o << and >> (LanguageLevel 2) construct a dictionary consisting of the bracketed objects interpreted as key-value pairs. <--- what the reference has to say. |
08:02 | | * Vornicus slightly rejiggers wave, so it is less state-smashy. |
08:05 | | ChalcyGone [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code |
08:06 | | Chalcy [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has quit [Ping Timeout] |
08:13 | | * Vornicus then makes the whole process more readable. |
08:14 | <@Vornicus> | new ocean.ps up. |
08:20 | | * Vornicus is kinda enjoying working on a stack |
08:32 | <@Vornicus> | 12 30 2 waves <--- the current call. |
08:38 | <@Vornicus> | Okay. now, let's see if I can do include files. |
08:39 | | gnolam [Lenin@Nightstar-13557.8.5.253.se.wasadata.net] has joined #Code |
08:49 | | ChalcyGone [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has quit [Quit: ] |
08:51 | <@Vornicus> | I can't find anything. |
09:11 | | Mahal is now known as MahalBed |
09:45 | | Forj [~Forj@Nightstar-869.bitstream.orcon.net.nz] has quit [Quit: Gone] |
09:48 | | You're now known as TheWatcher[wr0k] |
10:07 | | timelady [~romana@Nightstar-14947.lns7.adl2.internode.on.net] has quit [Client exited] |
10:19 | <@Vornicus> | just quit works better than showpage quit |
10:23 | <@Vornicus> | showpage makes it wait till you hit enter. |
10:24 | | MyCatNaps is now known as MyCatVerbs |
10:38 | <@Vornicus> | I would also like to know what idiot decided that strings are delimited by () instead of the usual "". |
10:41 | <@Reiver> | Someone who expected ("text") to come up more than "(text)" ? |
10:42 | <@Vornicus> | evidently |
11:46 | | Thaqui [~Thaqui@Nightstar-25354.jetstream.xtra.co.nz] has quit [Quit: Leaving] |
12:29 | | MyCatVerbs is now known as MyCatStudies |
13:58 | | Vornicus is now known as Vornicus-Latens |
15:31 | | CommanderFrog is now known as ToxicFrog |
15:32 | <@ToxicFrog> | Vornicus-Latens: I know there's a way to keep showpage from giving you a prompt. |
15:33 | <@ToxicFrog> | However, I no longer remember how. |
15:36 | <@ToxicFrog> | Also, do to includes, use the following: |
15:37 | <@ToxicFrog> | /include { |
15:37 | <@ToxicFrog> | (r) file |
15:37 | <@ToxicFrog> | cvx exec |
15:37 | <@ToxicFrog> | } |
15:38 | <@ToxicFrog> | And use it as |
15:38 | <@ToxicFrog> | (filename) include |
15:38 | <@ToxicFrog> | You can also use |
15:38 | <@ToxicFrog> | (filename) run |
15:39 | <@ToxicFrog> | Which is safer in some ways (exit will throw an error rather than exiting the script, etc) and behaves more like the lua idiom of running the file as a function than the C idiom of running it at current scope. |
15:57 | | ErikMesoy [~ejm@Nightstar-12501.bb.online.no] has joined #code |
16:49 | | You're now known as TheWatcher |
17:03 | | Netsplit DeepThought.NY.US.Nightstar.Net <-> Troika.TX.US.Nightstar.Net quits: @Pi, Raif, Serah, @jerith, @Chalain |
17:05 | | Netsplit over, joins: Chalain |
17:05 | | mode/#code [+o Chalain] by ChanServ |
17:05 | | Netsplit over, joins: Raif |
17:05 | | mode/#code [+o Raif] by ChanServ |
17:05 | | Netsplit over, joins: jerith |
17:05 | | mode/#code [+o jerith] by ChanServ |
17:06 | | Netsplit over, joins: Serah |
17:06 | | MyCatVerbs [~rb6822@Nightstar-14601.cs.bris.ac.uk] has joined #code |
17:17 | | You're now known as TheWatcher[afk] |
17:21 | | MyCatVerbs [~rb6822@Nightstar-14601.cs.bris.ac.uk] has quit [Client exited] |
17:22 | | Forj [~Forj@Nightstar-869.bitstream.orcon.net.nz] has joined #code |
17:25 | | MyCatVerbs [~rb6822@Nightstar-14601.cs.bris.ac.uk] has joined #code |
17:36 | | GeekSoldier [Rob@Nightstar-6925.pools.arcor-ip.net] has joined #code |
17:46 | | Forj [~Forj@Nightstar-869.bitstream.orcon.net.nz] has quit [Quit: Gone] |
18:00 | | MyCatStudies [~mycatownz@Nightstar-379.dsl.in-addr.zen.co.uk] has quit [Connection reset by peer] |
18:01 | | MyCatStudies [~mycatownz@Nightstar-379.dsl.in-addr.zen.co.uk] has joined #code |
18:14 | | MahalBed is now known as Mahal |
18:16 | | MyCatVerbs [~rb6822@Nightstar-14601.cs.bris.ac.uk] has quit [Quit: Swim, swim, hungry!] |
18:36 | | You're now known as TheWatcher |
18:58 | | Mahal is now known as MahalWork |
19:01 | | Pi [~sysop@Nightstar-6915.hsd1.or.comcast.net] has joined #code |
19:01 | | mode/#code [+o Pi] by ChanServ |
19:07 | | Chalcedon [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code |
19:07 | | mode/#code [+o Chalcedon] by ChanServ |
19:19 | | Netsplit DeepThought.NY.US.Nightstar.Net <-> Troika.TX.US.Nightstar.Net quits: @Pi, @Raif, Serah, @jerith, @Chalain |
19:20 | | Netsplit over, joins: Chalain, Raif, Serah, jerith |
19:20 | | mode/#code [+o Chalain] by ChanServ |
19:20 | | mode/#code [+o Raif] by ChanServ |
19:20 | | mode/#code [+o jerith] by ChanServ |
19:20 | | Raif [~corvusign@Nightstar-22484.hsd1.ca.comcast.net] has quit [No route to host] |
19:20 | | Raif_ [~corvusign@Nightstar-22484.hsd1.ca.comcast.net] has joined #Code |
19:20 | | Raif_ is now known as Raif |
19:20 | | jerith [~jerith@IRCop.Nightstar.Net] has quit [Ping Timeout] |
19:20 | | jerith [~jerith@IRCop.Nightstar.Net] has joined #code |
19:20 | | mode/#code [+o jerith] by ChanServ |
19:20 | | mode/#code [+o Pi] by ChanServ |
19:20 | | Netsplit over, joins: Pi |
19:23 | < ErikMesoy> | Is there any special reason that half the people in here are ops? Was this channel previously a favorite target of various bots which had to be dealt with by anyone online, or some such? |
19:24 | < AnnoDomini> | ErikMesoy: They use a somewhat more firm approach to opping than I do, but it's basically the same. |
19:27 | <@Chalcedon> | blame Reiver |
19:27 | <@ToxicFrog> | ErikMesoy: why not? |
19:27 | | * ErikMesoy readies some blame for Reiver, first asking him. |
19:28 | | * ToxicFrog gives ErikMesoy a pipe |
19:28 | < ErikMesoy> | | |
19:28 | | * ErikMesoy has a pipe. |
19:28 | | * ErikMesoy doesn't smoke. |
19:29 | | * gnolam gives ErikMesoy a # |. |
19:29 | < ErikMesoy> | A numbered pipe, or a pound pipe? |
19:29 | < AnnoDomini> | Hash pipe. |
19:29 | < ErikMesoy> | Or an octothorp(e)? |
19:29 | < GeekSoldier> | hash pipe |
19:30 | < ErikMesoy> | I don't think I smoke that either. |
19:32 | | mode/#code [+oo AnnoDomini GeekSoldier] by jerith |
19:32 | | mode/#code [+oo gnolam Raif] by jerith |
19:39 | | AnnoDomini [~farkoff@Nightstar-29702.neoplus.adsl.tpnet.pl] has quit [Ping Timeout] |
19:44 | | AnnoDomini [~farkoff@Nightstar-28953.neoplus.adsl.tpnet.pl] has joined #Code |
19:45 | < AnnoDomini> | Well, that's just my luck. Just when I'm opped, my ISP chooses to reset the connection. |
19:46 | | mode/#code [+o AnnoDomini] by GeekSoldier |
19:46 | <@AnnoDomini> | :P |
19:52 | | Thaqui [~Thaqui@Nightstar-25354.jetstream.xtra.co.nz] has joined #code |
20:03 | <@ToxicFrog> | argh |
20:03 | | * ToxicFrog foams at his prof |
20:04 | | * AnnoDomini steals ToxicFrog's anger, and leaves his bleakness as a sort of compensation. |
20:06 | < ErikMesoy> | Quote: "And these links I'm reading paint Crichton's novel like a cross between a Chick Tract and The Da Vinci Code." (re State of Fear) |
20:06 | < ErikMesoy> | Ow. I wonder which of the three that insults most? |
20:06 | | * Chalcedon hugs TF |
20:06 | | * ErikMesoy gives ToxicFrog some dark chocolate. |
20:06 | <@Chalcedon> | what has your prof done this time? |
20:07 | <@Chalcedon> | how about beating mine for teaching such a horrid, non-portable language |
20:08 | <@ToxicFrog> | ErikMesoy: well, chick tracts are at least unintentionally hilarious~ |
20:08 | <@ToxicFrog> | Chalcedon: he's whining about how binary trees are a pain in the ass to implement in Java. |
20:08 | < ErikMesoy> | o.O |
20:08 | <@ToxicFrog> | Which is true, but this is because everything is a pain in the ass to implement in Java. |
20:08 | <@ToxicFrog> | Whereas his stated reason is because Java doesn't have pointers. |
20:08 | <@Chalcedon> | that was the impression I got |
20:09 | <@ToxicFrog> | Which makes me vomit black bile from my eye sockets. |
20:09 | <@Chalcedon> | (that things are a pain in Java I mean) |
20:09 | < ErikMesoy> | I think there must be a mistranslation here, because I implemented what translates from Norwegian as a "binary tree" during my first year of Java. |
20:09 | < ErikMesoy> | What is a binary tree in your context? |
20:09 | <@ToxicFrog> | ErikMesoy: a tree where each node has at most two children. |
20:09 | <@Chalcedon> | Java does have pointers, or the fact that it lacks them really irritates you |
20:09 | <@Chalcedon> | *? |
20:09 | <@ToxicFrog> | Commonly used for searching, some heap implementations, etc |
20:09 | <@ToxicFrog> | Chalcedon: neither. |
20:09 | | * Chalcedon is not familiar with java |
20:09 | <@ToxicFrog> | Java has references. |
20:10 | <@ToxicFrog> | Which are like pointers, except you can't overwrite arbitrary memory with them. |
20:10 | <@Chalcedon> | ...better than pointers? |
20:10 | <@ToxicFrog> | Mostly. |
20:10 | | * Chalcedon supply stick? |
20:10 | <@ToxicFrog> | Much safer. |
20:10 | <@ToxicFrog> | There are a few things you can do with pointers that you can't do with references, but none of them are at all relevant to building a binary tree. |
20:11 | | * Chalcedon supply +1 stick of thwappiness |
20:11 | <@ToxicFrog> | ErikMesoy: why, what's a binary tree in your context? |
20:11 | <@ToxicFrog> | Also, I didn't say it couldn't be done, or even that it was particularly difficult. |
20:11 | < ErikMesoy> | ...a tree where each node has at most two children. |
20:11 | <@ToxicFrog> | It's just a pain in the ass. |
20:11 | <@ToxicFrog> | As I said, everything in Java, starting from "hello world", is a pain in the ass. |
20:11 | <@ToxicFrog> | Especially after working in a high level language for a while. |
20:11 | < ErikMesoy> | I did this somewhere between writing heapsort/mergesort/quicksort and writing a neural network spam filter with a tree storage for word values. |
20:12 | < ErikMesoy> | (21:11:00) ToxicFrog: As I said, everything in Java, starting from "hello world", is a pain in the ass. <-- SECONDED, it's embarassing that "hello world" is longer in Java than in Brainfuck. |
20:12 | <@Chalcedon> | I'm finding C# irritating enough |
20:12 | | * ToxicFrog beats Chalcy's professor with his professor's spine |
20:12 | <@Chalcedon> | and my course has only been going 1.5 days |
20:12 | <@Chalcedon> | ...not even that really |
20:12 | <@ToxicFrog> | Perhaps you could get permission to work in a different language? |
20:12 | <@ToxicFrog> | I was able to do that with my AI course. |
20:12 | <@Chalcedon> | I doubt it. |
20:13 | < ErikMesoy> | Me? Nope. |
20:13 | <@ToxicFrog> | Can't hurt to try. |
20:13 | <@ToxicFrog> | ErikMesoy: no, Chalcy. |
20:13 | < ErikMesoy> | The norwegian uni only has java. |
20:13 | <@ToxicFrog> | ...and, um. |
20:13 | <@ToxicFrog> | What the fuck |
20:13 | <@Chalcedon> | it's first year, we aren't supposed to know anything |
20:13 | | * ErikMesoy looks forward and hopes to get to MIT one day. |
20:13 | <@ToxicFrog> | They have the gall to call that a computer science program?! |
20:14 | < ErikMesoy> | No. |
20:14 | | * Chalcedon supply TF with cookies and tea |
20:15 | | * ErikMesoy fetches more dark chocolate |
20:15 | <@ToxicFrog> | Oh. |
20:15 | | * ErikMesoy gets out some milk, too |
20:15 | <@ToxicFrog> | What do they call it, then? |
20:15 | | * ToxicFrog nibbles |
20:15 | < ErikMesoy> | An informatics program. ("Informatikk") |
20:15 | <@ToxicFrog> | ... |
20:15 | < ErikMesoy> | Snrk. Wiki on Informatics: "Today the word "Informatik" is used in German as a synonym of "Computerwissenschaft" (i.e. computer science)." |
20:15 | <@ToxicFrog> | Which means...what, exactly? |
20:16 | < ErikMesoy> | ^that, more or less. |
20:16 | <@ToxicFrog> | Oh. So they do call it computer science. |
20:16 | | * ToxicFrog froths |
20:16 | | * ErikMesoy forcefully but calmly asks ToxicFrog whether he wants milk in his tea. |
20:16 | <@gnolam> | Rabies! Someone shoot ToxicFrog before he bites someone! |
20:16 | <@ToxicFrog> | I am honestly having trouble thinking of a worse language than Java for this, at least among the languages that are actually seriously used. |
20:18 | <@ToxicFrog> | It combines the expressiveness and high-level constructs of C with the closeness to the metal of lisp. |
20:18 | <@ToxicFrog> | And the performance of neither. |
20:18 | < ErikMesoy> | I missed lisp when I began taking java. |
20:18 | < ErikMesoy> | I wanted defun. |
20:19 | <@ToxicFrog> | So you end up being taught neither the high-level techniques useful in theoretical and applications programming, nor the low-level stuff needed for systems programming. |
20:19 | <@ToxicFrog> | And now, movement. |
20:19 | <@ToxicFrog> | Ta. |
20:19 | | Janus [~Cerulean@Nightstar-10302.columbus.res.rr.com] has joined #Code |
20:19 | < ErikMesoy> | What is "closeness to metal"? |
20:19 | | * ErikMesoy pokes Janus. |
20:19 | <@gnolam> | Long hair, black shirts. |
20:20 | | * Janus turns Erik into a muffin. |
20:20 | < ErikMesoy> | And TF says that java and lisp have this. |
20:20 | | ErikMesoy is now known as ErikMesoy|muffin |
20:21 | <@gnolam> | Definitely. I hear Java is considering getting a dragon tattoo. |
20:21 | | * Janus lost his appetite. |
20:22 | | ErikMesoy|muffin is now known as ErikMesoy|raccoonboy |
20:22 | | * ErikMesoy|raccoonboy fails to understand what gnolam is saying. |
20:23 | | * Janus eats the raccoon. |
20:23 | <@gnolam> | I'm talking ex recto. |
20:23 | | ErikMesoy|raccoonboy [~ejm@Nightstar-12501.bb.online.no] has quit [Quit: You do NOT want to go there, Janus.] |
20:24 | < Janus> | *burp* |
20:25 | | ErikMesoy [~ejm@Nightstar-12501.bb.online.no] has joined #code |
20:30 | <@gnolam> | Bleh. |
20:30 | | GeekSoldier [Rob@Nightstar-6925.pools.arcor-ip.net] has quit [Quit: Not that there is anything wrong with that] |
20:30 | | * gnolam gets to work hacking together some 68k. |
21:21 | | MyCatStudies is now known as MyCatVerbs |
21:30 | | You're now known as TheWatcher[T-2] |
21:33 | | You're now known as TheWatcher[zZzZ] |
22:19 | | AnnoDomini [~farkoff@Nightstar-28953.neoplus.adsl.tpnet.pl] has quit [Quit: No fighting in the War Room!] |
22:25 | | Vornicus-Latens is now known as Vornicus |
22:26 | <@Vornicus> | TF: I found run. I also have no idea what good showpage is doing; the image gets generated properly without it. |
22:27 | | BlueTiger [BlueTiger@Nightstar-567.natsoe.res.rr.com] has joined #Code |
22:30 | <@Vornicus> | Actually, neither java nor lisp have "closeness to the metal", which is the ability to talk essentially directly to the hardware. |
22:31 | | * Vornicus fiddles with PostScript. |
22:32 | | ErikMesoy is now known as ErikMesoy|sleep |
22:39 | < MyCatVerbs> | Janus: closeness to metal is a property of languages like C and (though you will find yourself having to do a lot of work to bootstrap the language's features if you want to code on bare iron) also C++ wherein you have pretty much direct access to the underlying hardware. |
22:39 | < MyCatVerbs> | Janus: large computers having once been referred to (still are in some circles, I think) as, "big iron." |
22:40 | | * Vornicus calls mainframes big iron. |
22:41 | | * Janus knew, but felt there were a lack of muffins at the time. |
22:43 | < MyCatVerbs> | ...what? Guns don't lick people, I smoke kettles? Hell of a nonsequitir there, |
22:47 | <@ToxicFrog> | ErikMesoy|sleep: um, no. |
22:47 | <@ToxicFrog> | I'm saying they don't. |
22:47 | <@ToxicFrog> | That Java has the closeness to metal of Lisp, ie, none whatsoever. |
22:48 | < Janus> | Hm..? I thought you seen my prancing around Mr. Erik's question as my not knowing, hence the debriefing. Am I going to get the vaccination now? |
22:48 | < MyCatVerbs> | ToxicFrog: I think we might get to implement MIPS32 at some point during our course here. |
22:49 | <@ToxicFrog> | And, yes, as MCV said, this is the property of being able to control the machine at the lowest and most precise level, including direct access to memory, portmapped IO (if present), possibly the insertion of arbitrary assembler, and so forth. |
22:49 | < MyCatVerbs> | ToxicFrog: if so, I am *totally* stuffing CAR, CONS and CDR operations into the unused slots in the instruction space, just to spite you. =D |
22:49 | <@ToxicFrog> | C and C++ have this, and are thus favoured for writing things that have to work at that level, such as kernels and device drivers. |
22:50 | <@ToxicFrog> | The drawback, of course, is that they really aren't much more expressive than assembler... |
22:50 | < MyCatVerbs> | C++ slightly less so, because all the fancy OO features need a lot of hard work to bootstrap them. But aside from that, it's gravy. ^_^ |
22:50 | <@ToxicFrog> | MyCatVerbs: the compiler does the bootstrapping. |
22:51 | <@ToxicFrog> | Well, mostly; there are still a few pieces of SGOS that are written in assembler and C, mostly the context switching and scheduling code. |
22:51 | < MyCatVerbs> | ToxicFrog: how could it? If you're writing an operating system itself, the compiler's hardly going to know where it's appropriate for your code to store your vtables. |
22:51 | < MyCatVerbs> | (and so on and so forth...) |
22:51 | <@ToxicFrog> | ... |
22:52 | <@ToxicFrog> | By that logic, the compiler is in fact impossible to write. |
22:52 | <@ToxicFrog> | Because if it can't figure out where to store the vtables, it can't figure out where to store static globals either. |
22:52 | <@ToxicFrog> | Or locals, depending on how the stack works. |
22:52 | <@ToxicFrog> | Or the code itself. |
22:53 | < MyCatVerbs> | BRB, link diggin'. |
22:54 | < MyCatVerbs> | The C core of C++ is certainly directly implementable. But no compiler's going to automatically generate implementations of "new" and "delete" for you, similarly to how no C compiler is going to autogenerate malloc() for your operating system. |
22:54 | <@ToxicFrog> | In practice, at least on a modern system using PIC binaries, the compiler just writes the vtable into .idata |
22:55 | <@ToxicFrog> | And then generates assembler that refers to it - two MOVs and a CALL, I think, on x86 |
22:55 | <@ToxicFrog> | And it's the OS's loader's responsibility to relocate it, if necessary. |
22:55 | <@ToxicFrog> | And, no, the compiler can't autogenerate new and delete any more than the C compiler can autogenerate malloc and free. |
22:55 | < MyCatVerbs> | http://www.osdev.org/wiki/C_PlusPlus <--- I'm looking at this. Seems to be current and written by people who tinker at this level on a reguar basis. |
22:55 | <@ToxicFrog> | Those are part of the standard library. |
22:56 | < MyCatVerbs> | ToxicFrog: global objects' constructors & destructors? Exceptions? RTTI? |
22:57 | <@ToxicFrog> | Which you can in fact implement in C++; you just have to do it carefully, and it will probably involve dropping into asm a few times no matter what you implement it in. |
22:57 | < MyCatVerbs> | (Sorry, I was wrong about vtables. Only need one stub there to handle the not-found case, as you say.) |
22:58 | < MyCatVerbs> | ToxicFrog: yesh, this is the extra work that you have to do over C to support the increased feature load. I didn't say you'd need to switch languages or anything, dude, but just to refrain from touching certain subsets of C++ with a ten foot barge pole until you've created them for yourself. |
23:00 | < MyCatVerbs> | Whereas I don't think C itself needs to drop into ASM for any purpose than device I/O, right? |
23:01 | | * Vornicus is trying to figure out what MCV is on about. |
23:01 | <@ToxicFrog> | And setjmp/longjmp, and probably malloc and free... |
23:01 | < MyCatVerbs> | Vornicus: read the link. I'm rarely coherent anyway. |
23:01 | <@ToxicFrog> | Device IO actually doesn't require asm. |
23:02 | < MyCatVerbs> | ToxicFrog: you could do malloc and free with fixed-position pointer tables. Switching the x86 from one mode to another and all that context switching work, though... yeah. |
23:02 | <@ToxicFrog> | Or, rather, it doesn't on a memory-mapped system, and on a port-mapped system the functions to do IO are a single instruction each and trivially inlineable. |
23:02 | <@ToxicFrog> | Vornicus: he's going on about the fact that to use C++, you need a libstdc++, parts of which will be written in a language that isn't C++. |
23:02 | < MyCatVerbs> | ...are there any fully memory-mapped systems? PCI's partway there or something, innit? |
23:02 | <@ToxicFrog> | I'm not sure why this is relevant. |
23:02 | <@ToxicFrog> | The MC68K. |
23:02 | <@ToxicFrog> | And I think the PPC. |
23:03 | <@ToxicFrog> | And probably a lot of others I don't know about. |
23:03 | <@ToxicFrog> | Fucking Intel. |
23:03 | | Janus is now known as Jan[drawing] |
23:03 | <@ToxicFrog> | And what does PCI have to do with it? |
23:04 | <@ToxicFrog> | Unless, in addition to an expansion bus architecture, that's a processor architecture I'm unfamiliar with. |
23:04 | < MyCatVerbs> | ToxicFrog: I thought it was almost entirely memory mapping, plus the traditionally godawful PIC system? |
23:04 | <@ToxicFrog> | ...by PIC, do you mean Position Independent Code? |
23:05 | <@ToxicFrog> | What does that have to do with PCI? |
23:05 | < MyCatVerbs> | ToxicFrog: programmable interrupt controller. The gnarly collection of hacks that led to IRQ sharing. |
23:08 | <@ToxicFrog> | Aah. |
23:08 | <@ToxicFrog> | And I think we have some confusion of terminology here. |
23:08 | <@ToxicFrog> | PCI is either PMIO or MMIO depending on what processor is using it. |
23:08 | <@ToxicFrog> | In either mode, it has the capability to read and write system memory, which is not the same thing. |
23:11 | < MyCatVerbs> | Oh. Does not MMIO naturally afford being extended to use DMA? |
23:11 | <@ToxicFrog> | No, you're getting two completely different things mixed up. |
23:12 | <@ToxicFrog> | MMIO/PMIO is how code interacts with peripheral devices. |
23:12 | <@ToxicFrog> | It does not involve system memory except indirectly. |
23:12 | <@ToxicFrog> | For example, say you have an SSL card which is capable of using DMA operations to read a buffer in memory and write the decrypted data to another buffer. |
23:13 | < MyCatVerbs> | Fair enough. Which is MIPS, please? |
23:13 | <@ToxicFrog> | PMIO or MMIO is how the code tells the card what it should do, and where those buffers are. |
23:13 | <@ToxicFrog> | The card then goes off and does it. |
23:13 | <@ToxicFrog> | No idea, I've never used MIPS. |
23:17 | | * Vornicus blings. |
23:31 | | * Vornicus tries to think of /any/ language where nothing underlying it is written in a different language, fails. |
23:31 | <@Reiver> | Assembly! |
23:32 | | * Chalcedon enpouncenate a Reiver |
23:32 | <@Vornicus> | except that you have to tell the assembler what the various instructions translate to. |
23:32 | < MyCatVerbs> | Reiver: no, the assembler itself needs to be interpreted by a CPU at some point. >_> |
23:32 | <@Chalcedon> | machine code then? |
23:32 | <@ToxicFrog> | Well, you can write the assembler in ASM and then hand-assemble it. |
23:33 | < MyCatVerbs> | Chalcedon: there's a RISC CPU in the middle of any modern Intel chip. I'm going with your choice of either "microcode" or "transistors" |
23:33 | <@Chalcedon> | I wasn't really being serious given I missed most of the discussion |
23:34 | <@ToxicFrog> | I weep to think that the x86 can be thought of as "reduced instruction set" |
23:34 | <@Chalcedon> | (hadn't had time to read it and probably would still have missed half if I had) |
23:34 | | * ToxicFrog gives Chalcy a stoatburger |
23:34 | | * Chalcedon nrom stoatburger |
23:35 | < MyCatVerbs> | ToxicFrog: it's a CISC ISA being semiinterpreted by a bastardised RISC machine. What's the hard part? |
23:35 | | * Chalcedon feed TF cookies |
23:35 | | * Chalcedon then hunts down the Reiver and chains him to the channel |
23:36 | | Jan[drawing] [~Cerulean@Nightstar-10302.columbus.res.rr.com] has quit [Quit: Jouets de Dieu, jouets de jouets, les jouets de me, na?tre Clair enfant voire.] |
23:37 | | * ToxicFrog nibbles cookies |
23:56 | | * MyCatVerbs experimentally feeds ToxicFrog pot brownies. |
23:57 | <@ToxicFrog> | .. |
23:57 | | * ToxicFrog winds MCV's entrails out on a stick |
23:58 | | * Vornicus sells them to Dibbler. |
23:59 | < MyCatVerbs> | Oh hey, cool. I'm useful for a change. |
23:59 | | * MyCatVerbs bleeds out and dies. Yay. |
--- Log closed Tue Feb 27 00:00:27 2007 |