--- Log opened Mon Oct 12 00:00:54 2009 |
00:13 | | You're now known as TheWatcher[T-2] |
00:17 | | You're now known as TheWatcher[zZzZ] |
00:56 | | Alek [omegaboot@Nightstar-32f25247.emhril.sbcglobal.net] has quit [[NS] Quit: reboot... gah. fricken CoX glitches.] |
01:02 | | Alek [omegaboot@Nightstar-32f25247.emhril.sbcglobal.net] has joined #code |
01:03 | | GeekSoldier [Rob@Nightstar-e86e3e0d.ip.cablemo.net] has joined #code |
01:19 | | * Finerty tries to refocus on building the binary tree so that he can then get back to the sparse matrix thing. |
01:20 | | * McMartin successfully scrapes OCRemix data from the website using Cocoa. |
01:38 | | * Finerty needs to do something like that. hates having to go to the website to get the ID #. |
01:39 | <@McMartin> | Finerty: Well, I'll have a handy plist version of it pre-scraped shortly, I hope~ |
01:40 | <@McMartin> | Once it's in that form it can then be handed to arbitrary Python scripts and One's Will May Be Done To It. |
01:40 | <@McMartin> | Not sure what data to collect besides the title and the filename, though. |
01:40 | | Finerty is now known as Vornicus |
01:40 | <@Vornicus> | The most important imo is the number used in the OCR database, so that I can apply it as track numbers. |
01:41 | <@McMartin> | That's in fact precisely my motivation in writing this~ |
01:41 | <@McMartin> | Also to see if I can find evidence of the tracks that are cut from torrents. |
01:42 | | * McMartin isn't sure the code he's writing will even run on Tiger. |
01:43 | | * Vornicus is on leopard. |
01:43 | <@McMartin> | I'm pretty sure this runs there. |
01:44 | <@McMartin> | ... yes. |
01:44 | < Derakon> | I'm on Tiger, but I don't spend much time on OCR. |
01:44 | <@McMartin> | This runs on Leopard but not Tiger, because I'm using the Better String -> Int Converter. |
01:45 | <@McMartin> | And, I mean, I could use respondsToSelector: to use the older version instead, but Meh (tm). |
01:45 | <@McMartin> | ... NSArray got a *shitload* of stuff added in 10.6 |
02:00 | <@McMartin> | ocr_fetch.m:117: warning: 'NSString' may not respond to '+stringWithUTF9String:' |
02:01 | <@Vornicus> | UTF9 now? |
02:09 | <@McMartin> | Astonishingly, this did not work~ |
02:18 | < SmithKurosaki> | Wow |
02:21 | <@Vornicus> | Gee, that's surprisingly. |
02:22 | <@McMartin> | At least it caught it at compile time. Take that, Python! |
02:22 | <@Vornicus> | Yeah, I wish Python could do that. |
02:23 | <@Vornicus> | I wish JS could do that too, right now. |
02:23 | <@Vornicus> | InnerHTML != innerHTML |
02:23 | < SmithKurosaki> | o.0 |
02:24 | <@McMartin> | Tragically, there's no way to reliably split game from title out of the page title, ANAICT. |
02:26 | | * Vornicus tries to remember how to fucking /build/ a binary tree without going insane with stupid special cases anyway. |
02:27 | < SmithKurosaki> | I just noticed. LOTR music sounds quite a lot like JP in spots |
02:50 | <@McMartin> | Have current scraped through #500... |
02:52 | < Derakon> | So you're what, 1/10th of the way there? |
02:53 | <@Vornicus> | 1/4. |
02:53 | <@McMartin> | A bit over a quarter |
02:53 | <@McMartin> | It's not actually continuous, and the current top index is in the 1900s somewhere. |
02:53 | <@McMartin> | And, of course, by now it's more at 600. |
02:54 | < Derakon> | So, about 100 entries per three minutes, meaning you have another ~45 minutes to go. |
02:54 | <@McMartin> | Varies wildly. |
02:54 | <@McMartin> | But yeah, I'm deliberately throwing in sleeps |
02:54 | <@McMartin> | I can tell I'm being antispidered occasionally though |
02:56 | < SmithKurosaki> | antispidered? |
02:56 | <@McMartin> | Like, they're deliberately holding off on replying because they've figured out it's not a human reading |
02:57 | < SmithKurosaki> | ahh |
02:58 | < SmithKurosaki> | Who is though? |
02:58 | | * Vornicus args. Is getting that "Purity is the only thing!" sentiment again, sitting here trying to write the damn insert method for the binary tree. |
02:59 | | * SmithKurosaki hugs |
03:00 | <@McMartin> | OCRemix, or their web host |
03:01 | < SmithKurosaki> | Ahh |
03:02 | | * Derakon mutters wants a Photoshop paintbrush mode that behaves like an actual pencil. |
03:02 | < Derakon> | Mischan. |
03:04 | <@McMartin> | #825 |
03:12 | <@McMartin> | Ah, Battle Rocks. |
03:12 | <@McMartin> | That would be #970 |
03:12 | | Attilla [The.Attilla@FBC920.482E2D.402892.A075C8] has quit [[NS] Quit: ] |
03:13 | <@McMartin> | 1000/1915 |
03:14 | < SmithKurosaki> | I am sad, I always miss those awesome 2 am convos in here |
03:21 | < simon`> | have you guys ever tried this in GHCi? Prelude> round (1/0) |
03:21 | <@McMartin> | No; I'd expect an exception on the division though, assuming it got to that point |
03:21 | < simon`> | McMartin, try it. :) |
03:22 | < simon`> | 1/0 actually interprets to something (that it perhaps shouldn't), but that's not the funny part. |
03:22 | <@McMartin> | It looks like round (Infinity) is MAX_INT. |
03:22 | <@McMartin> | That actually makes sense~ |
03:23 | <@McMartin> | Hm, no |
03:23 | <@McMartin> | More like round (MAX_FINITE_DOUBLE) |
03:23 | < simon`> | somehow rounding infinity sounds weird to me. :) |
03:24 | <@McMartin> | Well, round is "turn this float into the nearest handy integer value" |
03:24 | <@McMartin> | I guess there's no Aleph_Null constructor~ |
03:24 | < simon`> | also, is there really a dispute between whether 1/0 is Inf or NaN? |
03:24 | <@McMartin> | No |
03:24 | < Namegduf> | No. |
03:24 | < Namegduf> | It's NaN |
03:24 | <@McMartin> | IEEE 954 is very clear on this |
03:24 | <@McMartin> | 1/0 is Inf |
03:24 | <@McMartin> | 0/0 is NaN |
03:24 | < Namegduf> | Oh, right, in this context. |
03:24 | < Namegduf> | Ew, that's a violation of the real rules of mathematics, isn't it? |
03:25 | <@McMartin> | ... I don't believe so, if you treat them as limits. |
03:25 | <@Vornicus> | Sort of, yes. |
03:25 | <@McMartin> | If you have a limit as n -> inf of something positive over something that goes to 0, it diverges (limit is inf). |
03:25 | <@Vornicus> | 0/0 is non-asymptotic; its limit depends on the derivatives of the top and bottom. |
03:25 | < simon`> | earlier I dug up this article: http://scienceblogs.com/goodmath/2008/10/infinity_is_not_a_number.php |
03:25 | <@McMartin> | If you have a limit as n -> inf of 0 on both, then it could be anything. |
03:25 | <@McMartin> | simon: "Infinity" is not a member of Z, no. |
03:26 | < simon`> | McMartin, but that's not as the result of an arithmetic operation, which one might end up with using the / operator. |
03:26 | <@McMartin> | But I can write down the (infinite) size of Z with two sigils. |
03:26 | <@Vornicus> | 1/0 is asymptotic, but lim_{x->0+} 1/x is +inf and lim_{x->0-} 1/x is -inf; |
03:27 | <@McMartin> | Vorn: Right. IEEE 954 specifies that it's basically always 0+ here. |
03:27 | <@McMartin> | As 1/0 and -1/0 then give expected results |
03:27 | < simon`> | McMartin, so do you think that this rounding in Haskell is a nasty side effect, or did someone deliberately think that rounding infinity should result in some big, magic number? |
03:27 | <@McMartin> | It's not a side effect; it's purely functional~ |
03:28 | <@McMartin> | Any translation between Floating and Integer is, I believe, guaranteed to be machine-dependent. |
03:28 | <@McMartin> | So you do something that's handy and that is unlikely to break code, and call it a day |
03:28 | <@McMartin> | It's probably legal by the Haskell standard to format your hard drive if you try it. |
03:28 | <@McMartin> | Or the proverbial nasal demons. |
03:28 | <@McMartin> | MCV is the local Haskell expert, though. |
03:30 | <@McMartin> | (IEEE 954, however, also allows +0 and -0, intended for representing infinitesimal quantities or underflows) |
03:30 | <@Vornicus> | haaaaaate |
03:30 | <@McMartin> | Otherwise you lose the invariant that dividing by a positive number preserves sign. |
03:31 | <@Vornicus> | haaaaaaaaaaaaaaaaaaaaate |
03:31 | <@McMartin> | Finite precision: because we can't all run on abstract machines. |
03:32 | | * Vornicus gnaws the damn binary tree thing. Whyyyy do I find this so damn complicated. |
03:52 | | gnolam [lenin@Nightstar-38637aa0.priv.bahnhof.se] has quit [[NS] Quit: Z?] |
03:53 | <@McMartin> | #1500 |
03:53 | <@McMartin> | Then I'll need to write a plist merger and upload it somewhere. |
03:59 | <@ToxicFrog> | Vornicus: what kind of bintree? |
04:00 | <@Vornicus> | Plain old plain old. No balancing or anything. Right now the special case I'm fighting with is "the tree is currently empty" |
04:03 | < simon`> | fun huh Leaf = Leaf |
04:03 | < simon`> | Vornicus, what algorithm are you making that operates on btrees? |
04:03 | <@Vornicus> | Right now? insertion. |
04:03 | <@ToxicFrog> | ...what language? |
04:04 | <@Vornicus> | javascript still. |
04:04 | < simon`> | oh |
04:04 | <@Vornicus> | But my purity brain is kicking in and it shouldn't. |
04:04 | | * simon` wonders how purity comes into the picture when coding javascript. |
04:05 | | * simon` just did an example of a binary tree and how to populate one from a list using folding. |
04:05 | <@Vornicus> | I'm a math nerd. "No special case is so special as to invalidate the general rule" comes up a lot. |
04:06 | < simon`> | heh :) |
04:10 | <@ToxicFrog> | Tree is empty: root = { left = nil, right = nil, value = nil } |
04:13 | <@Vornicus> | Right, that's about what I've got, but... my problem is still that then comparison doesn't work - nil doesn't compare. |
04:14 | <@Vornicus> | eh. |
04:14 | <@ToxicFrog> | For insertion? I would think that first you check value, see it's nil, insert at that ode |
04:15 | | * Vornicus is having purity issues, like he said. and is having an ADD moment over it. |
04:15 | <@ToxicFrog> | ...right, but unless I've missed something, this means insert doesn't need to special-case the empty tree |
04:18 | <@Vornicus> | It still does. Usually I create a node on insert. |
04:21 | <@ToxicFrog> | An "empty" node is all three nils. When you promote an empty node to a full one, create its two child nodes as empties. When inserting, reaching an empty node means means you have found the insertion point |
04:21 | <@Vornicus> | But this is me being ADD-tastic. |
04:22 | <@Vornicus> | I find stupid excuses and then fight and fight and fight to get over them and nothing works. |
04:23 | <@ToxicFrog> | Well, this approach has higher memory usage, but doesn't special case~ |
04:23 | <@Vornicus> | Heh |
04:30 | < simon`> | fun insert (x, Leaf) = Node (Leaf, x, Leaf) |
04:30 | < simon`> | | insert (x, (Node (left, y, right))) = |
04:30 | < simon`> | if x > y then Node (left, y, insert (x, right)) |
04:30 | < simon`> | else Node (insert (x, left), y, right) |
04:30 | < simon`> | ToxicFrog, I don't understand yours and McMartin's use of ~s at the end of sentences. |
04:31 | <@Vornicus> | "sing-song", almost. |
04:32 | <@ToxicFrog> | Ehn, kind of but not quite |
04:32 | <@ToxicFrog> | Generally it implies a sort of playfulness or nonseriousness |
04:33 | < Namegduf> | Yeah. |
04:34 | <@ToxicFrog> | In this case stemming from doubt that basically doubling the size of the table to avoid an additional if in insert() is worth it. |
04:35 | <@ToxicFrog> | Yours is quite nice, but sadly Javascript lacks structural pattern matching~ |
04:35 | <@Vornicus> | Heh. I'm going to go with it. Technically I should be using a singleton sentinel but I can't remember how to do that. |
04:35 | <@Vornicus> | Where the hell did my redblack.c go? |
04:43 | | * Vornicus actually figures it out. The trick: make it so that the tree itself has a "right" attribute. |
04:43 | <@ToxicFrog> | ? |
04:44 | <@Vornicus> | What it means is that I can change the identity of the root using exactly the same code as I do to change another location in the node: by changing the appropriate directional attribute above it. |
04:46 | <@ToxicFrog> | ...above the root |
04:46 | <@ToxicFrog> | ? |
04:46 | <@Vornicus> | Above the root /node/ is the binary tree's primary structure, which has all the functions on it. |
04:51 | <@Vornicus> | So now instead of calling the, uh. soil's tree-holder "root" I call it "right", and now my insertion code works without any complications whatsoever. |
04:53 | < simon`> | hrm... trying to recall an algorithm. a simple way to balance a binary tree is to find the median and rebuild the tree with that as the top element. but I can only remember how to find a median in a list using partition from quicksort. |
04:55 | < simon`> | anyone got a suggestion as to how I can find the median element in an ordered, binary tree? |
04:56 | <@Vornicus> | In an ordered binary tree? Dunno. The way I'd do it is store how much stuff is beneath this branch. |
04:56 | <@Vornicus> | In each node. |
04:57 | < simon`> | ah, good idea |
05:15 | <@Vornicus> | okay. Now, delete! The hard one. |
05:16 | | * Vornicus doesn't think he can avoid special cases here. |
05:17 | <@Vornicus> | Finding the value in the first place is not a problem; the pain is that once that's done you have to replace the old value with a new one, typically the rightmost element of the left subtree. |
05:19 | <@Vornicus> | Which means diving into the left subtree... but if it doesn't exist, then we have to move the entire right subtree up! |
05:19 | <@Vornicus> | And if they /both/ don't exist, well, that's a small problem. |
05:22 | <@ToxicFrog> | Create a new tree with that as the root, DFS pipe insert, discard old tree? |
05:22 | <@Vornicus> | Mh. This job can be done with at most one node move. |
05:23 | <@Vornicus> | I think anyway. |
05:23 | <@Vornicus> | ...good god, no it can't. |
05:23 | <@Vornicus> | oh. Two, okay. |
05:24 | <@Vornicus> | (what happens if the rightmost child of hte left tree has left children? Duh - move that left child up into the rmc's old position.) |
05:26 | | * simon` implemented deletion using a treefoldl function |
05:32 | <@ToxicFrog> | Yes, but you're also using Haskell, which is practically cheating~ |
05:32 | < simon`> | I'm using Standard ML. I'm not cool enough to use Haskell yet. ;-) |
05:33 | | * Vornicus should really clean his desk. |
05:33 | < simon`> | I haven't really had the time to learn its Prelude and all the things that make Haskell special compared to other functional languages. |
05:34 | | * simon` got a dorm room, yay. |
05:35 | | * Vornicus has too much shit on his desk. |
05:36 | | * simon` 's got a 240cm x 100cm desk that fills with stuff way too easily. |
05:37 | <@Vornicus> | That's about mine, too. Actually it's smaller. And it's got a printer and a tower and a CRT on it. |
05:37 | | * Vornicus is still waiting for acceptable-quality flatscreens to come down in price. |
05:37 | < simon`> | mine's got a rat cage and a guitar hero controller on it... >:) |
05:37 | <@Vornicus> | Yeah, mine is... 150ish by 60ish. |
05:38 | < simon`> | I've got two 22" LCDs that my friends are using because my 12" IBM x41 is sufficient. |
05:41 | < Derakon> | Vorn: that 28" LCD for $300 isn't good enough? |
05:41 | <@Vornicus> | Der: I have never seen an LCD for under $1000 that had even vaguely acceptable color quality. |
05:42 | < Derakon> | Oh, color quality, gotcha. |
05:42 | < Derakon> | Talking about e.g. blacker blacks? |
05:42 | < Derakon> | Or just general vibrancy? |
05:42 | < simon`> | just get a poor eyesight like me and you couldn't tell the difference. ;-) |
05:43 | <@Vornicus> | Der: most LCDs, if I'm less than 6 feet away, what's black at the top of the screen is medium-grey at the bottom. |
05:43 | <@Vornicus> | And yellow folds into white. |
05:47 | <@Kazriko> | oled's any good? heh |
05:47 | <@Vornicus> | Dunno. I never really looked into the name of the technologies. |
05:47 | <@Vornicus> | I do know there's the one with the "mirrors" that if you're not looking straight at it goes completely black, wondered why the hell anyone would want that. |
05:49 | <@Kazriko> | oled's are the really thin ones. |
05:49 | <@Kazriko> | light emitting like plasma, rather than a white light then blocking parts of the spectrum. |
05:50 | <@Vornicus> | When I was in Utah I walked into a best buy and bought the floor model of the only CRT they had left. |
05:50 | < Alek> | why? |
05:50 | <@Kazriko> | all of my CRT's have passed on... |
05:50 | <@Vornicus> | It was sad; it was the best looking one under a grand. |
05:51 | <@Kazriko> | http://en.wikipedia.org/wiki/Organic_light-emitting_diode |
05:51 | <@Vornicus> | I do not know how /anyone/ tolerates the dismal vertical viewing angle on LCDs. |
05:51 | <@Kazriko> | we don't look at it from an angle... |
05:52 | <@Kazriko> | also, widescreen displays mean less need to look up or down at parts of the screen. |
05:52 | <@Vornicus> | When I say "dismal" I mean "if you're sitting less than 6 feet from it, at least part of the screen is /out/ of the viewing angle" |
05:52 | < simon`> | this LCD doesn't have that problem. I can stare at it from an angle so wide that the mere angle makes it hard for me to read the content because the letters look narrow. |
05:52 | <@Kazriko> | I'm about 3 feet from mine, and the viewing angle is just fine for all 3 of mine. |
05:53 | <@Kazriko> | But they are all 26 inches or lower, and all wide screen. |
05:53 | <@Kazriko> | when I had my 42 inch, that was a problem. |
05:53 | < simon`> | this one is 19" regular. |
05:53 | | * Kazriko has a 23 and 26 inch computer monitor, and a 27 inch TV off to the right, but generally backs up to use that one. |
05:54 | < Derakon> | Going back up, Vorn, people buy rear-projection displays because they're a cheap way to get big displays. |
05:54 | | * Vornicus has no idea where you're getting your screens, but he's never seen an inexpensive one that actually does the job. |
05:54 | <@Kazriko> | This one isn't inexpensive. $600 for the 26 inch. |
05:54 | < Derakon> | My first TV that I bought, right out of college, was a rear-projection display. IIRC it was 51" and I got it used for $500 or so? |
05:54 | <@Kazriko> | Samsung 2693hm |
05:54 | <@Kazriko> | The Asus display was only $210 or so though. |
05:55 | <@Kazriko> | but it's so short that it isn't a problem. |
05:55 | <@Kazriko> | It's about as tall as my old 19 inch 4:3 monitor. |
05:56 | <@Kazriko> | That said, I can't wait until I can afford OLED screens, at least for the right display. |
05:56 | <@Kazriko> | the 2693 says it has a 160 degree viewing angle, lesse... |
05:57 | <@Kazriko> | not sure how accurate that is. if I get about a foot and a half away, and keep my eyes level with the top, the bottom starts to go out of viewing angle. |
05:58 | <@Vornicus> | Definintely not. |
05:58 | <@Kazriko> | actually, the color starts to get darker at about 2 feet away. |
05:59 | <@Vornicus> | Heh. |
05:59 | <@Vornicus> | THat would be a 60 to 90 degree viewing angle. |
06:00 | <@Kazriko> | but with my eyes at the 1/3rd to 1/2 level on the screen and sitting at about 3-4 feet, no problems at all. |
06:00 | <@Kazriko> | (3-4 feet away with my eyes at the bottom 1/4th on the 42 inch definitely had problems.) |
06:01 | <@Vornicus> | Most monitors in my price range have had a vertical viewing angle of about 45 degrees. |
06:01 | <@Kazriko> | I think by 160 they meant adding the right and left side, which would mean 80 degree off center. |
06:01 | <@Vornicus> | Right. |
06:01 | <@Vornicus> | That's how I'm calculating it. |
06:02 | <@Kazriko> | I see, yeah, the marketing is a little excessive on that. I'd say about 35 to 40 off center seems to be about right, so 70-80 degree viewing angle. |
06:03 | <@Kazriko> | what's shocking is that the cheaper monitor seems to do better. Staring straight down at it I can still read it. |
06:04 | <@Kazriko> | Could be because the big monitor is using cleartype though. |
06:06 | | * Vornicus gets back to battling delete. |
06:07 | <@Kazriko> | http://www.newegg.com/Product/Product.aspx?Item=N82E16824236052 << cheap monitor. |
06:07 | <@Kazriko> | same claims to viewing angle. heh |
06:11 | <@Kazriko> | http://www.epn-online.com/page/new119227/new-oled-module-offers-near-180-viewing -angle.html |
06:12 | | AnnoDomini [farkoff@Nightstar-93bbfe6f.adsl.tpnet.pl] has joined #code |
06:12 | | mode/#Code [+o AnnoDomini] by Reiver |
06:27 | < Alek> | hmm. |
06:28 | < Alek> | my LCD has a viewing angle of up to about 89 degrees. :P |
06:28 | < Alek> | and it cost like $100. |
06:28 | < Alek> | several years ago. |
06:28 | < Alek> | a little gray at the extreme angles, but still quite sharp and readable. |
06:29 | < Alek> | well. |
06:29 | < Alek> | about 89 from normal, that is. :P |
06:29 | < Alek> | not range. |
06:29 | <@Vornicus> | That means that you can get to about a meter and a half away with your nose pressing the wall it's mounted on and see its color clearly. |
06:30 | < Derakon> | Parse failure. |
06:30 | < Derakon> | Unless you have a meter-and-a-half-long nose. |
06:30 | <@Vornicus> | A meter and a half sideways. |
06:30 | < Derakon> | Ah. |
06:31 | | Rhamphoryncus [rhamph@Nightstar-a62bd960.abhsia.telus.net] has joined #code |
06:48 | < Derakon> | Idly, I discovered on Friday that the drive that the microscope software writes all its data to is a Firewire drive. |
06:49 | < Derakon> | Two things from that: a) it's limited to 400 megabits/second (assuming this isn't more modern Firewire since the compy's pretty old), and b) per the boss, the gigabit network that the lab computers are on is 80% saturated when an experiment is running. |
06:49 | < Derakon> | So! Tomorrow, I try writing to a non-Firewire drive, and see if that fixes the bug~ |
06:54 | <@Vornicus> | Heh. |
07:02 | <@Vornicus> | okay. Deletion, I /think/ sorted. |
07:06 | < Derakon> | T-2, all. |
07:06 | <@Vornicus> | nider |
07:09 | | Derakon is now known as Derakon[AFK] |
07:26 | <@McMartin> | Victory |
07:26 | <@McMartin> | (With a length video game break) |
07:26 | <@Vornicus> | Yay victory! |
07:27 | | * simon` started playing M-x adventure |
07:27 | <@McMartin> | http://hkn.eecs.berkeley.edu/~mcmartin/ocr.plist |
07:28 | | * Vornicus does battle now with getting the interface for his binary tree rig set up sanely. |
07:28 | <@McMartin> | (It's not an array because there are gaps and plists aren't allowed to have gaps.) |
07:28 | <@Vornicus> | Wootcake. |
07:52 | < simon`> | Vornicus, why is implementing a binary tree in JS a challenge if you've implemented red-black trees in C before? |
08:02 | <@Vornicus> | Because 1. I've forgotten how, and 2. because I am addled. |
08:03 | <@Vornicus> | Now that I've remembered all that shit though I still have to figure out how to talk to it. |
08:04 | <@Vornicus> | Or more precisely how to massage what it does into something that a webpage can do! |
08:15 | < simon`> | ah |
08:15 | < simon`> | I build functions for that |
08:15 | < simon`> | s/.*/duh/ :) |
08:16 | | Namegduf [namegduf@Nightstar-7ec84b32.bath.ac.uk] has quit [Ping timeout: 121 seconds] |
08:16 | < simon`> | I wonder if none of the smart JS frameworks have good datastructures. |
08:19 | | * Vornicus beats simon` with a cheese. |
08:19 | <@Vornicus> | Well, most of the time, object and array do nicely. |
08:24 | | Namegduf [namegduf@Nightstar-7ec84b32.bath.ac.uk] has joined #code |
08:26 | < simon`> | also for trees? |
08:26 | < simon`> | you know, stuff like inserting, searching and deleting could be library functions, too. |
08:27 | <@Vornicus> | They kind of already are. |
08:27 | < simon`> | in JS itself, or what? |
08:27 | <@Vornicus> | Most of the time what trees do are already covered by object. |
08:28 | <@Vornicus> | I rarely need much more than an array and a dictionary, and js provides both rather strongly. |
08:31 | <@Vornicus> | A great many 'data structures' are alternative methods of doing the same thing. Most of the time? I don't need to worry overmuch about the complexity of actions. |
08:33 | <@Vornicus> | I mean, okay. My sparse matrix? useful. I don't have something that does that. But honestly I wouldn't write it this way in either js or python, because they provide more useful methods. |
08:56 | | AnnoDomini [farkoff@Nightstar-93bbfe6f.adsl.tpnet.pl] has quit [Ping timeout: 121 seconds] |
08:56 | | AnnoDomini [farkoff@Nightstar-d2dd4360.adsl.tpnet.pl] has joined #code |
08:56 | | mode/#Code [+o AnnoDomini] by Reiver |
08:57 | | Rhamphoryncus [rhamph@Nightstar-a62bd960.abhsia.telus.net] has quit [Client exited] |
09:21 | | Vornicus is now known as Vornicus-Latens |
09:39 | | You're now known as TheWatcher |
11:49 | | Attilla [The.Attilla@FBC920.482E2D.402892.A075C8] has joined #code |
11:49 | | mode/#Code [+o Attilla] by Reiver |
12:22 | | AnnoDomini [farkoff@Nightstar-d2dd4360.adsl.tpnet.pl] has quit [Ping timeout: 121 seconds] |
12:30 | | AnnoDomini [farkoff@Nightstar-4003dab3.adsl.tpnet.pl] has joined #code |
12:30 | | mode/#Code [+o AnnoDomini] by Reiver |
12:34 | | AnnoDomini [farkoff@Nightstar-4003dab3.adsl.tpnet.pl] has quit [Ping timeout: 121 seconds] |
12:43 | | AnnoDomini [farkoff@Nightstar-e97defaf.adsl.tpnet.pl] has joined #code |
12:43 | | mode/#Code [+o AnnoDomini] by Reiver |
12:46 | | AbuDhabi [farkoff@Nightstar-95e948f3.adsl.tpnet.pl] has joined #code |
12:47 | | AnnoDomini [farkoff@Nightstar-e97defaf.adsl.tpnet.pl] has quit [Ping timeout: 121 seconds] |
12:50 | | AbuDhabi [farkoff@Nightstar-95e948f3.adsl.tpnet.pl] has quit [Ping timeout: 121 seconds] |
12:57 | | AnnoDomini [farkoff@Nightstar-4b7a3ce6.adsl.tpnet.pl] has joined #code |
12:57 | | mode/#Code [+o AnnoDomini] by Reiver |
13:01 | | AnnoDomini [farkoff@Nightstar-4b7a3ce6.adsl.tpnet.pl] has quit [Ping timeout: 121 seconds] |
13:08 | | AnnoDomini [farkoff@Nightstar-c42e973c.adsl.tpnet.pl] has joined #code |
13:08 | | mode/#Code [+o AnnoDomini] by Reiver |
13:13 | | AnnoDomini [farkoff@Nightstar-c42e973c.adsl.tpnet.pl] has quit [Ping timeout: 121 seconds] |
13:19 | | AnnoDomini [farkoff@Nightstar-e03be0c6.adsl.tpnet.pl] has joined #code |
13:19 | | mode/#Code [+o AnnoDomini] by Reiver |
13:24 | | AnnoDomini [farkoff@Nightstar-e03be0c6.adsl.tpnet.pl] has quit [Ping timeout: 121 seconds] |
13:39 | | AnnoDomini [farkoff@Nightstar-530cff06.adsl.tpnet.pl] has joined #code |
13:39 | | mode/#Code [+o AnnoDomini] by Reiver |
13:43 | | AnnoDomini [farkoff@Nightstar-530cff06.adsl.tpnet.pl] has quit [Ping timeout: 121 seconds] |
13:52 | | AnnoDomini [farkoff@Nightstar-c8b1864c.adsl.tpnet.pl] has joined #code |
13:52 | | mode/#Code [+o AnnoDomini] by Reiver |
13:56 | | AnnoDomini [farkoff@Nightstar-c8b1864c.adsl.tpnet.pl] has quit [Ping timeout: 121 seconds] |
14:02 | | AnnoDomini [farkoff@Nightstar-a2334382.adsl.tpnet.pl] has joined #code |
14:02 | | mode/#Code [+o AnnoDomini] by Reiver |
14:07 | | AnnoDomini [farkoff@Nightstar-a2334382.adsl.tpnet.pl] has quit [Ping timeout: 121 seconds] |
14:15 | | AnnoDomini [farkoff@Nightstar-6537c812.adsl.tpnet.pl] has joined #code |
14:15 | | mode/#Code [+o AnnoDomini] by Reiver |
14:16 | | Alek [omegaboot@Nightstar-32f25247.emhril.sbcglobal.net] has quit [[NS] Quit: ] |
14:20 | | AnnoDomini [farkoff@Nightstar-6537c812.adsl.tpnet.pl] has quit [Ping timeout: 121 seconds] |
14:22 | | Alek [omegaboot@Nightstar-32f25247.emhril.sbcglobal.net] has joined #code |
14:33 | | AnnoDomini [farkoff@Nightstar-5ce91515.adsl.tpnet.pl] has joined #code |
14:33 | | mode/#Code [+o AnnoDomini] by Reiver |
14:37 | | AnnoDomini [farkoff@Nightstar-5ce91515.adsl.tpnet.pl] has quit [Ping timeout: 121 seconds] |
14:46 | | AnnoDomini [farkoff@Nightstar-05c13203.adsl.tpnet.pl] has joined #code |
14:46 | | mode/#Code [+o AnnoDomini] by Reiver |
14:50 | | AnnoDomini [farkoff@Nightstar-05c13203.adsl.tpnet.pl] has quit [Ping timeout: 121 seconds] |
14:51 | | gnolam [lenin@Nightstar-38637aa0.priv.bahnhof.se] has joined #code |
14:59 | | AnnoDomini [farkoff@Nightstar-d4691d61.adsl.tpnet.pl] has joined #code |
14:59 | | mode/#Code [+o AnnoDomini] by Reiver |
15:03 | | AnnoDomini [farkoff@Nightstar-d4691d61.adsl.tpnet.pl] has quit [Ping timeout: 121 seconds] |
15:11 | | AnnoDomini [farkoff@Nightstar-fbd10b43.adsl.tpnet.pl] has joined #code |
15:12 | | mode/#Code [+o AnnoDomini] by Reiver |
15:16 | | AnnoDomini [farkoff@Nightstar-fbd10b43.adsl.tpnet.pl] has quit [Ping timeout: 121 seconds] |
15:22 | | You're now known as TheWatcher[afk] |
15:23 | | AnnoDomini [farkoff@Nightstar-6089935b.adsl.tpnet.pl] has joined #code |
15:23 | | mode/#Code [+o AnnoDomini] by Reiver |
15:27 | | AnnoDomini [farkoff@Nightstar-6089935b.adsl.tpnet.pl] has quit [Ping timeout: 121 seconds] |
15:36 | | AnnoDomini [farkoff@Nightstar-896529c2.adsl.tpnet.pl] has joined #code |
15:36 | | mode/#Code [+o AnnoDomini] by Reiver |
15:40 | | AnnoDomini [farkoff@Nightstar-896529c2.adsl.tpnet.pl] has quit [Ping timeout: 121 seconds] |
15:42 | | simon` [simon@Nightstar-a12ff716.gjk.dk] has quit [Ping timeout: 121 seconds] |
15:47 | | AnnoDomini [farkoff@Nightstar-a110da50.adsl.tpnet.pl] has joined #code |
15:47 | | mode/#Code [+o AnnoDomini] by Reiver |
15:51 | | AnnoDomini [farkoff@Nightstar-a110da50.adsl.tpnet.pl] has quit [Ping timeout: 121 seconds] |
15:55 | | simon` [simon@Nightstar-a12ff716.gjk.dk] has joined #code |
15:58 | | AnnoDomini [farkoff@Nightstar-8f708898.adsl.tpnet.pl] has joined #code |
15:58 | | mode/#Code [+o AnnoDomini] by Reiver |
16:02 | | AnnoDomini [farkoff@Nightstar-8f708898.adsl.tpnet.pl] has quit [Ping timeout: 121 seconds] |
16:12 | | AnnoDomini [farkoff@Nightstar-cb49de66.adsl.tpnet.pl] has joined #code |
16:12 | | mode/#Code [+o AnnoDomini] by Reiver |
16:16 | | crem [moo@Nightstar-8ca3eea7.adsl.mgts.by] has quit [Client closed the connection] |
16:16 | | AnnoDomini [farkoff@Nightstar-cb49de66.adsl.tpnet.pl] has quit [Ping timeout: 121 seconds] |
16:21 | | crem [moo@Nightstar-8ca3eea7.adsl.mgts.by] has joined #code |
16:29 | | AnnoDomini [farkoff@Nightstar-cbef117a.adsl.tpnet.pl] has joined #code |
16:30 | | mode/#Code [+o AnnoDomini] by Reiver |
16:34 | | AnnoDomini [farkoff@Nightstar-cbef117a.adsl.tpnet.pl] has quit [Ping timeout: 121 seconds] |
16:41 | | AnnoDomini [farkoff@Nightstar-b54551f0.adsl.tpnet.pl] has joined #code |
16:41 | | mode/#Code [+o AnnoDomini] by Reiver |
16:42 | | * gnolam declares victory over moments of inertia. |
16:44 | | AbuDhabi [farkoff@Nightstar-2698decd.adsl.tpnet.pl] has joined #code |
16:46 | | AnnoDomini [farkoff@Nightstar-b54551f0.adsl.tpnet.pl] has quit [Ping timeout: 121 seconds] |
16:47 | < SmithKurosaki> | At least you're not stabing it |
16:48 | | AbuDhabi [farkoff@Nightstar-2698decd.adsl.tpnet.pl] has quit [Ping timeout: 121 seconds] |
16:50 | < SmithKurosaki> | I think you are improving gnolam |
16:53 | | Rhamphoryncus [rhamph@Nightstar-a62bd960.abhsia.telus.net] has joined #code |
17:07 | | AnnoDomini [farkoff@Nightstar-93dc0e2d.adsl.tpnet.pl] has joined #code |
17:07 | | mode/#Code [+o AnnoDomini] by Reiver |
17:11 | | AnnoDomini [farkoff@Nightstar-93dc0e2d.adsl.tpnet.pl] has quit [Ping timeout: 121 seconds] |
17:13 | < gnolam> | Well, I don't have to stab them. They've submitted to me as loyal minions. |
17:16 | | * gnolam ponders trochoids. |
17:47 | | You're now known as TheWatcher |
17:48 | < Rhamphoryncus> | minions? |
18:30 | < gnolam> | Yes. They now do my bidding without protest. |
21:27 | | * gnolam stabs Gmail. |
21:59 | | Derakon[work] [Derakon@Nightstar-d44d635e.ucsf.edu] has joined #code |
22:00 | < Derakon[work]> | For all X, X is scientific? |
22:01 | <@McMartin> | That's wrong, one moment |
22:02 | | McMartin changed the topic of #code to: Welcome to #Code! | Rants and monologues are encouraged | Pastebin: http://pastebin.starforge.co.uk/ || ? x, ich wird x Wissenschaft tun |
22:02 | <@McMartin> | I'm not sure how to put "x" in the dative case, but at least the right word is now replaced |
22:02 | < Derakon[work]> | You perceive this tells me little else. |
22:02 | | McMartin changed the topic of #code to: Welcome to #Code! | Rants and monologues are encouraged | Pastebin: http://pastebin.starforge.co.uk/ || ? x, ich wurde x Wissenschaft tun |
22:02 | < Derakon[work]> | Now I'm tempted to think that X is a scientific tuna. |
22:02 | <@McMartin> | "Ich wurde ihm Wissenschaft tun" = "I will do science to it" |
22:02 | < Derakon[work]> | Ahh. |
22:03 | <@McMartin> | Or, rather, "I will to it Science do" |
22:03 | <@TheWatcher> | ... SCIENCE Tuna sounds like a particularly cringe-worthy Children's education TV mascot.. |
22:04 | <@McMartin> | ("wird" is the third person for werden, the verb for which you mark the future tense; it is what you should have in /mes.) |
22:05 | <@TheWatcher> | Wait, isn't wurde past tense? |
22:05 | <@TheWatcher> | (been an age and a half since I did german, so...) |
22:06 | <@McMartin> | I think it's first person present |
22:07 | | McMartin changed the topic of #code to: Welcome to #Code! | Rants and monologues are encouraged | Pastebin: http://pastebin.starforge.co.uk/ || ? x, ich werde x Wissenschaft tun |
22:21 | | Vornicus-Latens is now known as Vornicus |
22:35 | | * Derakon[work] mutters at the impossibility of fitting 4 512x512 fields onto a 1280x1024 display. |
22:36 | < Derakon[work]> | YOU REQUIRE MORE VESPENE PIXELS. |
22:36 | <@Vornicus> | Um. That should be, you know. 4 with room left over for half of each of two more. |
22:37 | < Derakon[work]> | Except for the minor issue of menubars and button bars on the top and bottom. |
22:40 | <@Vornicus> | Ah. |
22:42 | < Rhamphoryncus> | oh hey, how long has that bit about rants and monologues been in the topic? I've never noticed it before >.> |
22:43 | < Derakon[work]> | I put it in a few weeks back, IIRC, after someone apologized for ranting. |
22:43 | < Rhamphoryncus> | Ahh |
22:43 | < Rhamphoryncus> | Yeah, I feel bad about ranting too |
22:43 | < Rhamphoryncus> | I have on a couple occasions created an empty channel just to talk to myself.. |
22:44 | < Derakon[work]> | Hee. |
22:45 | < Rhamphoryncus> | still haven't figured out the proper term for "flow dependant range analysis" |
22:45 | <@Vornicus> | And beofre that it was there for ages in the old server. |
22:46 | < Derakon[work]> | Which is why I added it when we had the database refresh. |
22:46 | < Derakon[work]> | Since I knew it was longstanding policy. |
22:46 | < Rhamphoryncus> | ie, "if (a > 0) {...}", knowing that a is > 0 within the branch.. |
22:47 | < Rhamphoryncus> | Realized I needed it to do anything useful with loops in my static analyzer |
22:47 | < Derakon[work]> | You're talking about predictive execution? |
22:47 | < Rhamphoryncus> | uhh.. dunno :) |
22:49 | <@Vornicus> | No, this is a static analysis thing. It's mostly used for stuff like Java's "guarantee that you'll hit the array in a place where it exists" and such. |
22:50 | <@McMartin> | Rhamphoryncus: If you're paying attention to the predicates, you mean? |
22:50 | <@McMartin> | That's "path-sensitive". |
22:50 | <@McMartin> | "flow-sensitive" is much weaker and just means you're looking at assignments but assuming that any branch could go either way |
22:50 | | * Rhamphoryncus nods |
22:50 | <@McMartin> | "context-sensitive" is the other thing people talk about, and that refers to whether or not you're paying attention to the call stack. |
22:51 | <@McMartin> | (That is, you're conceptually inlining every function, and then cheating somehow once you hit recursion) |
22:51 | < Rhamphoryncus> | cursed google.. my search results are full of patents :( |
22:51 | <@McMartin> | In rough order of complexity, flow < context < path |
22:53 | < Rhamphoryncus> | huh |
22:53 | < Rhamphoryncus> | My plan so far is to create a new version of the affected variables in that branch, based on the comparison |
22:54 | < Rhamphoryncus> | versions are visible ala SSA.. although I'm sure that's not the general term |
22:55 | < Derakon[work]> | What's the overall goal here? |
22:56 | < Rhamphoryncus> | Overall is to compile python with performance on par with C. The specific goal here is to determine the range of a variable, so I can fit ints into registers |
22:57 | < Derakon[work]> | Ahh. |
23:02 | <@McMartin> | SSA = Static Single Assignment? |
23:03 | <@McMartin> | You do of course realize that like all program analysis questions of any interestingness this is an undecidable problem in the general case |
23:03 | <@McMartin> | So you'll always have to occasionally fail over |
23:03 | <@McMartin> | To some conservative assumption. |
23:03 | <@McMartin> | (Objects, in particular, will basically always suck, spacewise, compared to C++) |
23:06 | < Rhamphoryncus> | The general case, yes, but I'm not convinced that I can't handle most useful programs |
23:06 | < Rhamphoryncus> | objects, for instance, I should be able to track where they're used, and thus what attributes are used |
23:07 | <@McMartin> | Shape analysis is one of those things where you can run an analysis for years |
23:07 | <@McMartin> | Because what you're really asking is "how can I know in advance what the result of arbitrary integer computation is?" |
23:07 | <@McMartin> | Which usually involves, you know, running the program and stuff. |
23:08 | < Rhamphoryncus> | I don't handle arbitrary computations. I just handle common cases |
23:08 | <@McMartin> | tbh I'd ignore this outright at the start |
23:08 | < Rhamphoryncus> | If you know that your algorithm never exceeds 2**64-1, but it's not obvious to the compiler, stick an assert somewhere that makes it obvious |
23:08 | < Rhamphoryncus> | tbh? |
23:09 | < Derakon[work]> | To be honest. |
23:09 | < Rhamphoryncus> | ah |
23:10 | < Rhamphoryncus> | Well, not fitting integers in registers would severely reduce the value in the whole project |
23:10 | <@McMartin> | If you go that route, you might as well allow compiler hints |
23:10 | <@McMartin> | Declare variables as register in comments or something |
23:10 | <@Vornicus> | Yaaaaay compiler hints! |
23:10 | < Derakon[work]> | That's basically what Cython is, isn't it? |
23:10 | < Derakon[work]> | Compiler hints plus some static checking. |
23:11 | | Vornicus [vorn@ServerAdministrator.Nightstar.Net] has quit [[NS] Quit: Leaving] |
23:11 | < Rhamphoryncus> | I haven't seen why my particular approach would be that bad |
23:11 | <@McMartin> | It's more that it would be noticably more work |
23:11 | < Rhamphoryncus> | Yes, doing it right is more work |
23:11 | <@McMartin> | And, you know, involving making forays into stuff that you still get PhDs for making minor improvements to. |
23:12 | <@McMartin> | (This was in fact my lab's focus when I was a grad student~) |
23:12 | | Vornicus [vorn@ServerAdministrator.Nightstar.Net] has joined #code |
23:12 | | mode/#Code [+o Vornicus] by Reiver |
23:13 | < Rhamphoryncus> | Python's for statement is noticably simpler than C's.. |
23:13 | <@McMartin> | So I'm just saying, as long as you're half-assing it anyway, you might as well choose the easiest way to do it - which is to say, adding type markers outright. |
23:13 | <@McMartin> | C doens't have a "for" statement, really. It's syntactic sugar for while |
23:13 | <@McMartin> | If you're blocking while outright, you're probably fine |
23:14 | < Rhamphoryncus> | That'd be quitting, not half-assing it. Nor do I see my approach as half-assing anyway, but rather focusing on specific common use cases that can practically be accomplished |
23:14 | <@McMartin> | "register x" and "assert x < 2**64-1" are semantically identical; how is one quitting while the other is not? |
23:15 | < Rhamphoryncus> | the latter should only be used for unusual circumstances when the builtin analysis fails |
23:15 | < Rhamphoryncus> | And in fact it builds on that analysis |
23:15 | <@McMartin> | As you will |
23:16 | <@McMartin> | I strongly suspect that outside of very specific problem domains you won't like your results, though. |
23:17 | <@McMartin> | (And Python is at least cleaner about this than, say, PHP.) |
23:17 | <@McMartin> | (Dynamic includes >_<) |
23:20 | | * McMartin would probably actually start with some kind of type analysis/inference, but suspects that too would be messy in Python since each object gets its own individually re-assignable namespace. |
23:21 | < Rhamphoryncus> | umm, I'm doing a superset of type inference :) |
23:21 | < Rhamphoryncus> | types are just values after all |
23:21 | <@McMartin> | Well, the part you're doing is likely to end up going to Bottom a lot more. |
23:21 | < Rhamphoryncus> | Bottom? |
23:22 | <@McMartin> | The value with which, when you merge it with any other value, remains itslef |
23:22 | <@McMartin> | For integer ranges, that would be [-inf, inf] |
23:22 | < Rhamphoryncus> | ahh |
23:22 | <@McMartin> | (In the dataflow world. in the type inference world they do everything backwards and that is Top.) |
23:23 | <@McMartin> | I assume you've already managed code that turns Python into control-flow graphs? |
23:23 | < Rhamphoryncus> | a subset for experimenting on, yes |
23:24 | < Rhamphoryncus> | Anyway, I've gotta head out now. I'll leave IRC on in case you want to leave me further comments :) |
23:26 | <@McMartin> | I'd start with a general dataflow framework and start by being flow-sensitive and everything-else-insensitive. |
23:26 | <@McMartin> | Since it's python and thus every single function call is, effectively, indirect I'd punt on context-sensitivity forever; anything that escapes the function should be treated as "anything can happen" |
23:27 | <@McMartin> | Once you have basic flow-sensitive analysis working (an easy useful test for that one is something that detects use-before-define, or that detects assignments to variables that are never used) you can then start adding path-sensitivity to that |
23:27 | <@McMartin> | But I'd get the basic analysis working first with basic dataflow before adding extra stuff |
23:59 | < Derakon[work]> | My boss just came by and said "So what'd it take to port this to Linux?" |
23:59 | < Derakon[work]> | He's certainly not shy about asking big questions... |
--- Log closed Tue Oct 13 00:00:08 2009 |