--- Log opened Wed Feb 29 00:00:11 2012 |
00:00 | | Derakon [chriswei@Nightstar-a3b183ae.ca.comcast.net] has quit [[NS] Quit: leaving] |
00:05 | <@Alek> | hee. |
00:05 | <@Alek> | that's a nice trick, Vash. |
00:06 | <@Vash> | =P |
00:07 | | himi [fow035@D741F1.243F35.CADC30.81D435] has joined #code |
00:07 | | mode/#code [+o himi] by ChanServ |
00:15 | < maoranma> | Haha |
00:16 | < maoranma> | Though, Alakazam is scary anyway |
00:16 | <@Alek> | when's the last time himi spoke, anyway? |
00:23 | < maoranma> | C:\Users\Noah\AppData\Roaming\mIRC\logs\#code.Nightstar.20120220.log (5 hits) |
00:23 | < maoranma> | Line 5: [01:24] <@himi> Convincing people that two different files are the same is one other use I can think of |
00:23 | < maoranma> | Line 6: [01:24] <@himi> Unless they're also aware that MD5 is totally broken now |
00:25 | < maoranma> | That's in 24hr time, EDT |
00:26 | < maoranma> | It's possible much was said when I wasn't here, but that's my last known messages from him |
00:27 | < maoranma> | Vash: You're not Vash from way back when were you? |
00:28 | <&McMartin> | She totally is, I think |
00:28 | < maoranma> | From the really really bad DBZ RPG we used to host? |
00:28 | <&McMartin> | That I have no idea |
00:28 | < maoranma> | It was so bad |
00:29 | < maoranma> | But fun, thus why I hung around long enough to wander into the bar and anger many admins, who punished me by making me an oper under Poisyn |
00:30 | < maoranma> | god I'm old, when I can talk about things over a decade past...where's my cane |
00:37 | | Derakon[AFK] is now known as Derakon |
00:41 | < maoranma> | brb |
00:41 | | maoranma [maoranma@Nightstar-cd44a482.pools.spcsdns.net] has quit [[NS] Quit: ] |
00:52 | < celticminstrel> | Uh... urllib2.urlopen seems to be ignoring the timeout parameter. |
00:53 | < celticminstrel> | (This is Python.) |
00:58 | < celticminstrel> | ...ooh. Maybe it's my fault after all. |
01:55 | | Kindamoody[zZz] is now known as Kindamoody |
02:26 | | maoranma [maoranma@Nightstar-cd44a482.pools.spcsdns.net] has joined #code |
02:34 | | Attilla [Obsolete@Nightstar-f426a78e.as43234.net] has quit [Ping timeout: 121 seconds] |
02:36 | <@Vash> | maoranma: not the same vash. didn't ever do a DBZ RPG thing |
02:37 | <@Vash> | and I doubt you're that old.... um, unless I'm wrong. |
02:37 | <@Vash> | the question would be: are you older THAN Vorn? =P |
02:38 | <~Vornicus> | Pretty sure he's younger than me, but not by much |
02:38 | < maoranma> | Dunno, I'm...26? |
02:38 | < maoranma> | Born July of '85 |
02:38 | <@Vash> | .... |
02:38 | <@Vash> | man, you're woprse than me if you aren't sure how old you are |
02:38 | <@Vash> | worse* |
02:39 | <@Vash> | well, actually |
02:39 | | * Vash ponders |
02:39 | < celticminstrel> | I keep forgetting too. <_< |
02:39 | <@Vash> | yeah, I'm not that bad when it comes to my age. I kinda figure because of a few things |
02:39 | <@Vash> | also, vorn is 7 years older than me. so if in doubt, I can easily remember it because of that |
02:39 | <@Vash> | pffft |
02:40 | < maoranma> | I'm really bad with dates and ages. |
02:40 | <@Vash> | heh |
02:41 | < maoranma> | "Uh, okay random Kimono lady, I promise not to make a Togepi ommelet, bye now (weirdo)." |
02:41 | < Rhamphoryncus> | I forget too, but it's not too hard to calculate. Born in '83, current year is... 2012? |
02:41 | < maoranma> | Almost 30! |
02:42 | <@Vash> | vorn is 30 |
02:43 | <@Vash> | =) |
02:43 | <@Vash> | OMG |
02:44 | <@Vash> | 4 MONTHVERSARY |
02:44 | < maoranma> | I'm 840 million seconds old. |
02:44 | <&Derakon> | Rhamph: what's your birthday? |
02:44 | <~Vornicus> | Why do I keep thinking today is the 27th |
02:45 | <@Vash> | (4 monthversary that I moved in with vorn. <3) |
02:45 | < Rhamphoryncus> | january 22nd |
02:45 | <&Derakon> | Aw, got me beat. |
02:45 | <&Derakon> | I'm June 23rd. |
02:45 | | * Vash does stupid dance |
02:46 | <@Vash> | as for bdays..... |
02:46 | | * Vash is august 10... vorn is august 25 |
02:46 | <@Vash> | =D |
02:46 | <@Vash> | I believe it is tea time. |
02:46 | | * Vash goes make tea |
02:53 | < Rhamphoryncus> | That does make it easier to remember |
02:53 | <&McMartin> | June 25th. |
02:54 | <&McMartin> | I get presents at regular six-months intervals. >_> |
02:54 | <&Derakon> | Heh. |
02:55 | < maoranma> | I want to have been more on Oct 31 or Dec 25, for obvious reasons |
02:55 | <@Vash> | ... |
02:55 | <&Derakon> | You want to have your birthday coincide with a holiday? |
02:55 | <@Vash> | dec 25th is the worse bday ever |
02:55 | <@Vash> | ask my uncle |
02:55 | <&Derakon> | Usually people don't like that much. |
02:55 | <@Vash> | nobody rememebrs him |
02:55 | <@Vash> | -_- |
02:55 | < maoranma> | Ah, but I could celebrate it twice, see |
02:56 | <@Vash> | uncle is the 25th, my dad is the 28th . of december |
02:56 | < maoranma> | Oct 31 = Dec 25, narf |
02:56 | <@Vash> | ... |
02:56 | <@Vash> | huh? |
02:56 | <&Derakon> | Oh, right, a base joke. |
02:56 | <&Derakon> | Octal and decimal, Vash. |
02:57 | < maoranma> | Vash: My ratata is so awesome. |
02:57 | < maoranma> | It's like it's in the top precentage of ratatta |
02:57 | < maoranma> | And I mispelled Rattata twice, fuck me |
02:58 | <~Vornicus> | I have an aunt and a cousin who both were born on october 31 |
02:58 | <@Vash> | rofl |
02:59 | <@Vash> | maoranma: You love it so much you changed the name so that it's more unique? =P |
02:59 | < maoranma> | Is the cousin your aunt's child? |
03:00 | <~Vornicus> | You know it occurs to me I don't remember. |
03:00 | < maoranma> | haha |
03:00 | <@Vash> | that would be awesome |
03:00 | < maoranma> | It's slightly more uncanny if they're directly related |
03:00 | <~Vornicus> | It's either Barb or Mary for the aunt; Brad is Mary's son. |
03:08 | < maoranma> | I wonder if anyone has ever DDoS'd an IRC server to get their wife to come to bed at a reasonable hour.... |
03:16 | < Stalker> | Probably. |
03:17 | <@Vash> | ... |
03:17 | < Stalker> | I know of a female who glined herself to get her husband to come to bed. |
05:06 | | Rhamphoryncus [rhamph@Nightstar-5697f7e2.abhsia.telus.net] has quit [Client exited] |
05:11 | | celmin [celticminst@Nightstar-5d22ab1d.cable.rogers.com] has joined #code |
05:12 | | celticminstrel [celticminst@Nightstar-5d22ab1d.cable.rogers.com] has quit [Ping timeout: 121 seconds] |
05:12 | | celmin is now known as celticminstrel |
05:17 | | Derakon [Derakon@Nightstar-a3b183ae.ca.comcast.net] has quit [Client closed the connection] |
05:19 | | Derakon [Derakon@Nightstar-a3b183ae.ca.comcast.net] has joined #code |
05:19 | | mode/#code [+ao Derakon Derakon] by ChanServ |
05:21 | | celticminstrel [celticminst@Nightstar-5d22ab1d.cable.rogers.com] has quit [Ping timeout: 121 seconds] |
05:21 | | celticminstrel [celticminst@Nightstar-5d22ab1d.cable.rogers.com] has joined #code |
05:26 | | celticminstrel [celticminst@Nightstar-5d22ab1d.cable.rogers.com] has quit [Ping timeout: 121 seconds] |
05:29 | | eckse [eckse@Nightstar-88ef50bd.dsl.sentex.ca] has quit [Client closed the connection] |
06:23 | | Vash [Vash@Nightstar-cdeba41f.wlfrct.sbcglobal.net] has quit [[NS] Quit: I lovecraft Vorn!] |
06:41 | | Derakon is now known as Derakon[AFK] |
06:47 | | himi [fow035@D741F1.243F35.CADC30.81D435] has quit [Ping timeout: 121 seconds] |
07:00 | | Syloqs-AFH [Syloq@NetworkAdministrator.Nightstar.Net] has quit [Client closed the connection] |
07:57 | | ShellNin1a [abudhabi@Nightstar-6f2f7910.adsl.inetia.pl] has joined #code |
07:59 | | ShellNinja [abudhabi@Nightstar-a2b246ed.adsl.inetia.pl] has quit [Ping timeout: 121 seconds] |
09:08 | | Attilla [Obsolete@Nightstar-f426a78e.as43234.net] has joined #code |
09:43 | | You're now known as TheWatcher |
10:11 | | maoranma [maoranma@Nightstar-cd44a482.pools.spcsdns.net] has quit [Ping timeout: 121 seconds] |
10:44 | | ShellNinja [abudhabi@3A600C.C57732.7B31A9.45C326] has joined #code |
10:46 | | ShellNin1a [abudhabi@Nightstar-6f2f7910.adsl.inetia.pl] has quit [Ping timeout: 121 seconds] |
11:09 | | Kindamoody is now known as Kindamoody|out |
13:48 | | Rhamphoryncus [rhamph@Nightstar-5697f7e2.abhsia.telus.net] has joined #code |
14:37 | | Stalker [Z@Nightstar-3602cf5a.cust.comxnet.dk] has quit [Client closed the connection] |
14:37 | | Stalker [Z@Nightstar-3602cf5a.cust.comxnet.dk] has joined #code |
14:58 | | celticminstrel [celticminst@Nightstar-5d22ab1d.cable.rogers.com] has joined #code |
15:08 | | Syloqs_AFH [Syloq@NetworkAdministrator.Nightstar.Net] has joined #code |
15:08 | | mode/#code [+o Syloqs_AFH] by ChanServ |
15:09 | | Syloqs_AFH is now known as Syloqs-AFH |
15:33 | | Attilla_ [Obsolete@Nightstar-f426a78e.as43234.net] has joined #code |
15:35 | | Attilla [Obsolete@Nightstar-f426a78e.as43234.net] has quit [Ping timeout: 121 seconds] |
15:42 | | Vash [Vash@Nightstar-cdeba41f.wlfrct.sbcglobal.net] has joined #code |
15:42 | | mode/#code [+o Vash] by ChanServ |
16:13 | | Attilla_ is now known as Attilla |
17:05 | | Kindamoody|out is now known as Kindamoody |
17:17 | | ToxicFrog [ToxicFrog@ServerAdministrator.Nightstar.Net] has quit [Operation timed out] |
17:18 | | ToxicFrog [ToxicFrog@ServerAdministrator.Nightstar.Net] has joined #code |
17:18 | | mode/#code [+o ToxicFrog] by ChanServ |
17:42 | | Attilla [Obsolete@Nightstar-f426a78e.as43234.net] has quit [Ping timeout: 121 seconds] |
17:47 | | Attilla [Obsolete@Nightstar-f426a78e.as43234.net] has joined #code |
18:04 | | Derakon [chriswei@Nightstar-a3b183ae.ca.comcast.net] has joined #code |
18:04 | | mode/#code [+ao Derakon Derakon] by ChanServ |
18:04 | <&Derakon> | Interesting little bug: Python's shutil.copy() function doesn't work if the path being copied includes the "#" character. |
18:05 | <&Derakon> | Now, how the fuck do I Google for that? |
18:06 | | Kindamoody is now known as Kindamoody[zZz] |
18:28 | | Stalker [Z@Nightstar-3602cf5a.cust.comxnet.dk] has quit [Client closed the connection] |
18:29 | | Stalker [Z@Nightstar-3602cf5a.cust.comxnet.dk] has joined #code |
18:36 | | * ToxicFrog flails at xinetd |
18:58 | < celticminstrel> | Google Verbatim maybe? |
18:59 | <@jerith> | Derakon: Is it not treating the "#" as a comment? |
19:00 | <&Derakon> | >>> foo = "abc#def" |
19:00 | <&Derakon> | >>> foo |
19:00 | <&Derakon> | 'abc#def' |
19:01 | <&Derakon> | In other words, it's perfectly legal to construct Python strings that contain '#' |
19:01 | <@jerith> | Yes. |
19:01 | <&Derakon> | Not to mention you can get them indirectly. |
19:01 | <@jerith> | But shutil tries to behave like a shell. |
19:01 | <&Derakon> | (by e.g. listing files in a directory) |
19:01 | <@jerith> | (I'm not sure if it's actually invoking a shell.) |
19:02 | <&Derakon> | Well, the report is of a "no such file or directory" error. |
19:02 | <@jerith> | If it's turning "abc#def" into "abc", that might be expected. |
19:04 | < Rhamphoryncus> | try "abc;rm -rf /" |
19:04 | <&McMartin> | Er |
19:04 | <&Derakon> | Hm, the weird thing is that the line that's failing is "with open(src, 'rb') a fsrc" |
19:04 | < Rhamphoryncus> | :D |
19:05 | <&McMartin> | A shell expansion won't turn abc#def into abc |
19:05 | <&McMartin> | The # has to begin a token to begin a comment |
19:05 | <&Derakon> | And I can't replicate the error. |
19:05 | <&McMartin> | if I do less irclogs/#code.log, that's fine, while if I'm *in* irclogs, I'll have to do \#code.log |
19:05 | <&Derakon> | The actual filename is "pendingFiles/'20120224-1548__t000_p001_#8'-0-2" |
19:05 | <&Derakon> | And yes, I've tried mucking around with apostrophes as well; everything works, for me. |
19:05 | <&McMartin> | That should indeed be a legal filename, albeit a horrible one. |
19:06 | <&Derakon> | Yeah, this is one of my users. I don't know why he chose it. |
19:06 | <&Derakon> | He said that when he removed the # it worked. |
19:07 | <&McMartin> | As a rule, he shouldn't be putting apostrophes and number signs in file names, anyway |
19:08 | <&Derakon> | Oh, I agree. But I can't really go around telling people how to do their jobs. |
19:08 | <&McMartin> | True |
19:08 | <&McMartin> | If he can repro it, it's probably a bug |
19:08 | <&McMartin> | But it's a bug that does fall into the general realm of "Don't Do That Then" |
19:08 | <&McMartin> | That realm *can* be abused |
19:08 | <&McMartin> | but... |
19:09 | < Rhamphoryncus> | rhamph@Tetronimo:~/src/openttd/firs$ hg qimport http://devs.openttd.org/~planetmaker/patches/firs/ |
19:09 | < Rhamphoryncus> | adding firs to series file |
19:09 | < Rhamphoryncus> | What did that actually do? |
19:15 | | * McMartin builds a new VM for work, uses a Darwinia screenshot as its background |
19:17 | < Rhamphoryncus> | It seems like it snarfed the word "firs" out of that and used it as the name for the "outstanding patch".. which is nothing as of yet |
19:26 | | Vornucopia [NSwebIRC@C888DE.7F9621.4A1301.BBBE7B] has joined #code |
19:27 | < Rhamphoryncus> | Apparently what I want, importing a patch set, is not possible |
19:30 | <&McMartin> | lol firs post |
19:31 | | * Vornucopia replaces McM's text with "boobies!" and moves it several hours into the future. |
19:32 | | * McMartin foments a commenter tradition of posting blue-footed bird pics in all threads. |
19:32 | <@jerith> | ALL THE THREADS! |
19:34 | <&McMartin> | _o/ |
19:35 | <&McMartin> | Had you not edited it it would instead have been Christmas trees. |
19:35 | | Stalker [Z@Nightstar-3602cf5a.cust.comxnet.dk] has quit [Ping timeout: 121 seconds] |
19:39 | <@jerith> | <PenguinOfDoom> I misread restaurant sign that says "SENIORE'S PIZZA" as "-ENOMOREPIZZA" |
19:47 | | Derakon [chriswei@Nightstar-a3b183ae.ca.comcast.net] has quit [[NS] Quit: leaving] |
19:49 | | Vash is now known as Vashicopia |
19:52 | <@ToxicFrog> | WTF, windows doesn't come with telnet anymore? |
19:53 | | * Vornucopia does some ridiculous math. |
19:54 | < Namegduf> | ToxicFrog: Optional install. |
19:54 | < Vornucopia> | Hooray, convex hull calculations |
19:54 | <@jerith> | Vornucopia: Splines? |
19:55 | <@jerith> | Vornucopia: Have you seen bucket.jerith.za.net/depixel.pdf yet? |
19:55 | < Vornucopia> | jerith: no, I'm working on voronoi relaxation on the sphere, for some crazy reason. |
19:55 | <@jerith> | Ah. |
19:55 | < Vornucopia> | And I have not, so now I will read the fuck out of it |
19:55 | <@ToxicFrog> | Welp |
19:55 | <@jerith> | (It's slides from my talk.) |
19:55 | <@ToxicFrog> | Guess I can't use a shell script for this after all |
19:55 | <@ToxicFrog> | Goddamnit, windows |
19:56 | < Vornucopia> | But so far I've discovered that the delaunay triangulation of points on a sphere is also the convex hull of those points. |
19:58 | < Vornucopia> | (because the delaunay triangulation of points in space is he convex hull of those points in a higher space such that the added coordinate is the sum of the squares of the other coordinates, and the sum of the squares of a point on the sphere will be exactly the square of the radius of the sphere) |
19:58 | < Vornucopia> | (whih means that we're just moving them all onto a hyperplane in the higher dimension, so we can drop that dimension again) |
19:59 | <@ToxicFrog> | Everything is fun until I need to make a windows release :( |
19:59 | < Vornucopia> | (that bit about the sum of squares is how qhull does delaunay) |
20:00 | < Tarinaky> | Windows doesn't come with shell either :/ |
20:00 | < Tarinaky> | And Batch is horrible. |
20:01 | <@jerith> | PowerShell! *hides* |
20:02 | | Stalker [Z@Nightstar-5aa18eaf.balk.dk] has joined #code |
20:02 | < Vornucopia> | jerith: nice |
20:02 | < Vornucopia> | Though I probably would have picked a different letter to smooth, that one is kind of a pity with how it thickens the left corner |
20:03 | <@jerith> | Vornucopia: That's the one I had handy, and I didn't have much time. |
20:03 | < Vornucopia> | True |
20:03 | <@jerith> | I'm probably going to fix it for Saturday. |
20:03 | <@ToxicFrog> | I have the perfect name for this program/service |
20:03 | <@ToxicFrog> | Kessler |
20:04 | <@jerith> | (When I'm giving the same talk to a different audience.) |
20:04 | < Vornucopia> | Which program/service? |
20:04 | <@ToxicFrog> | Vornucopia: the KSP save file merging/synchronization service |
20:05 | < Vornucopia> | Ah |
20:06 | | * Vornucopia googles, obviously doesn't get the reference. |
20:07 | <@ToxicFrog> | Kessler Syndrome |
20:07 | <@ToxicFrog> | http://en.wikipedia.org/wiki/Kessler_Syndrome |
20:07 | < Vornucopia> | Oh shiit |
20:07 | < Vornucopia> | Yeah I was getting camera cranes and rehab centers |
20:08 | < Vornucopia> | also, "laser broom" is just ridiculously funny |
20:09 | <@jerith> | Pewpewpewsweep. |
20:09 | | * jerith approves. |
20:09 | <&McMartin> | That's a band name, right there. |
20:27 | < Vornucopia> | jerith: also, have you managed to convince the diagonal selection method to work right? |
20:28 | <@jerith> | Vornucopia: If by "work right" you mean "get the same result as they do on the space invader", then no. |
20:28 | < Vornucopia> | Which invader are you working on? |
20:28 | <@jerith> | If you mean "implement exactly what the paper describes, including a couple of variations where it's ambiguous", then yes. |
20:29 | <@jerith> | The one they use for the corner detection example when they're talking about smoothing. |
20:30 | <@jerith> | invader5.png, I think. I just have invader.png, because I manually copied it for my test stuff. |
20:30 | < Vornucopia> | aha. Okay I think what might be happening, uh, let me see |
20:31 | <@jerith> | I'll be immensely pleased if you can tell me. |
20:32 | < Vornucopia> | And you're gettin the "mouth" showing up as connecting the background as opposed to the critter? |
20:32 | <@jerith> | My suspicion is that they have some special-case handling for the sparseness heuristic if the region overlaps the edge of the image. |
20:32 | <@jerith> | Yes, that's the one. |
20:33 | <@jerith> | I haven't ruled out something I'm doing wrong in my code, but I've looked pretty hard. |
20:34 | < Vornucopia> | I would say that probably they extend the "transparent" part to infinity - or at the very least several px beyond the edge of the image. |
20:35 | <@jerith> | I tried that. The best I could do was get the heuristics equal. |
20:36 | <@jerith> | (And I think I had to "cheat" and consider bits of the region that were connected by edges outside the 8x8 block specified.) |
20:39 | < Vornucopia> | Okay, looking at it I'm getting a connected score of 30 for the black, and a connected score of 27 for the white, which probably matches yours. |
20:40 | <@jerith> | Yup. |
20:40 | < Vornucopia> | That suggests the white one wins, because they have the same strand weights |
20:40 | < Vornucopia> | Gner, wtf |
20:40 | <@jerith> | Yup. |
20:40 | <@jerith> | And no islands. |
20:41 | < Vornucopia> | But we need black to win, and that's kind of befuddl-- wait, this is going to sound stupid, but |
20:42 | | * jerith has already considered several stupid things. |
20:42 | <@jerith> | (I've only left most of them unimplemented because they're both stupid and hard.) |
20:43 | < Vornucopia> | That's not white, that's transparent |
20:44 | < Vornucopia> | In no cases in the input data I see does transparent win over similar colors. |
20:44 | <@jerith> | Hrm. |
20:44 | <@jerith> | Is it actually transparent in the source image? |
20:45 | <&McMartin> | Windows telnet always has been and still is pretty pants; I suggest PuTTY even for Telnet. (PuTTYtel is not needed; the SSH-capable client can telnet too) |
20:45 | < Vornucopia> | Perhaps it was; I'm not sure. |
20:45 | < Vornucopia> | But I know it's transparent in the real world. |
20:45 | <@jerith> | In invader6.png (which I think I grabbed from their site) the background is white rather than transparent. |
20:46 | < Vornucopia> | Right, same here, but I don't know how it's deciding otherwise |
20:46 | <&McMartin> | Are you trying to replicate results with this, or push the frontier? |
20:46 | <@jerith> | McMartin: Trying to replicate results. |
20:47 | <@jerith> | Since their results are better than mine. |
20:47 | <&McMartin> | nog |
20:48 | | * McMartin wonders if it's efficient enough to do on realtime on a 256x240 image |
20:48 | < Vornucopia> | The only place where I see diagonally-connected transparency beating colors on both sides in this is Randi1, the particle next to the sword is disconnected. But it's clear I think that the yellow and orange aren't similar enough colors for the program |
20:48 | <@jerith> | (Specifically, their space invader doesn't have a dislocated (and, indeed, entirely disconnected) jaw.) |
20:48 | <@jerith> | McMartin: They do it in video. |
20:48 | <@jerith> | My implementation is slow and entirely non-optimised. |
20:49 | < Vornucopia> | We don't know whether the video was created realtime |
20:52 | < Vornucopia> | ah, no |
20:52 | < Vornucopia> | They did per-frame image dumps and batch processed them. |
20:53 | <&McMartin> | I should get you some of the more insanely busy ZANAC screenshots~ |
20:53 | <@jerith> | Ah. |
20:54 | <@jerith> | My code takes about 8 seconds to process the space invader. |
20:54 | <&McMartin> | How large is the space invader? |
20:54 | <@jerith> | That includes the currently-broken curve smoothing. |
20:55 | < Vornucopia> | something like 12x16px |
20:55 | <@jerith> | 10x14px. |
20:55 | <@jerith> | Like I said, there's plenty of scope for optimisation. |
20:56 | < Vornucopia> | Lots and lots. |
20:56 | <@jerith> | I do a lot of slow-and-stupid because it's simpler and easier to convince myself of correctness. |
20:56 | | * McMartin nods |
20:56 | <&McMartin> | Well, if you want an overnight run, let me know and I'll look into hooking yo up~ |
21:00 | <@jerith> | I also don't handle outlines that aren't closed, so pretty much monochrome's it for now. |
21:24 | < Tarinaky> | https://github.com/Tarinaky/CS12420_GroupProject/commit/1f380ab1a542b0881800abbb 8e01312377fa0cb5 << This code makes me cry a little. |
21:25 | < Vornucopia> | That yours, or somebody elses? |
21:25 | < Tarinaky> | Mine. |
21:25 | < Vornucopia> | If the former, then good, you know better now~ |
21:25 | < Tarinaky> | That's all my fault. |
21:25 | < Tarinaky> | No I don;t. |
21:25 | < Tarinaky> | I don't know how to improve it >.< |
21:25 | < Tarinaky> | Otherwise I'd never have checked it in, lol. |
21:26 | < Vornucopia> | Okay let's see |
21:26 | < Vornucopia> | What's it do? |
21:26 | < Vornucopia> | ...oh, that's a join, isn't it |
21:27 | < Vornucopia> | Okay, factor out the join: make a method that takes a string and an array of strings, and returns a string that joins them correctly. you can use, um, shit I don't remember what it's called in java, stringstream or somthing, to make it take sensible amounts of time instead of having to make more strings each time. |
21:28 | < Vornucopia> | Then what you do is you have that thing you've got there call your join method. Actually this sort of thing is probably somewhere in java already but I don't know what it's called |
21:29 | < Tarinaky> | I need to do the join anyway. |
21:29 | < Vornucopia> | ah, the stringstream thing is actually called stringbuilder, I think that's the one you want anyway |
21:29 | <&McMartin> | Well |
21:29 | < Vornucopia> | Right, you do, but you'll want to factor it out so that it doesn't clutter up what you're doing |
21:29 | <&McMartin> | StringBuffer, if it's multithreaded, StringBuilder otherwise |
21:29 | < Tarinaky> | It#s mostly readibility that's the problem. |
21:29 | <&McMartin> | To *actually be StringStream*, that is a PrintWriter wrapped around a StringWriter. |
21:29 | < Tarinaky> | And the strings are okay. |
21:30 | < Tarinaky> | Because + as concatenation is fairly intuitive. |
21:30 | < Vornucopia> | Strings are not okay, you're looking at all sorts of memory thrashing |
21:31 | <&McMartin> | Note that "a = b+c+d+e+f" is compiled correctly |
21:31 | < Tarinaky> | I don't see how I can sensibly reuse those strings anyway |
21:31 | < Vornucopia> | Why would |
21:31 | < Vornucopia> | I think we're talking past each other now |
21:31 | < Tarinaky> | Yes. |
21:31 | < Vornucopia> | Write a method that all it does is join strings with a glue string |
21:32 | < Vornucopia> | pass into that method the strings that you've generated from your parameters list |
21:32 | < Tarinaky> | What's wrong with foo+" "bar? |
21:32 | < Vornucopia> | (and your glue string, which I think is comma) |
21:32 | < Tarinaky> | Err, there's a missing equals. |
21:32 | < Tarinaky> | Oh, I see. |
21:32 | < Tarinaky> | Won't that have exactly the same problem as this code? |
21:33 | < Vornucopia> | No, the problem with this code is that you've taken a string utility and unrolled it inside your method |
21:35 | < Tarinaky> | Alright. |
21:35 | < Tarinaky> | I'll fix that. |
21:35 | < Vornucopia> | Your goal here is to have a method that goes strings -> single string, and then this method that you've written should go parameters -> strings. |
21:36 | < gnolam> | https://www.youtube.com/watch?feature=player_embedded&v=QtJ77qsLrpw |
21:38 | <&McMartin> | Also, the problem with "foo = foo + " " + bar" is that it's quadratic in the number of bars. |
21:38 | <&McMartin> | This is what StringBuilders are for. |
21:39 | <&McMartin> | That said, it sounds like this is basically "join" |
21:39 | <&McMartin> | which may already be in the library somewhere |
21:39 | < Vornucopia> | Having hunted around I couldn't find it; I found something on StackOverflow that said 1.5 doesn't have it but there's something in the google libs that does it |
21:40 | <@ToxicFrog> | Java does not have string.join; StringBuilder is the closest you'll find |
21:40 | <&McMartin> | But you can write join in about four lines with StringBuilder. |
21:41 | < celticminstrel> | Actually, isn't what McMartin normally compiled down to a use of StringBuilder? |
21:41 | < celticminstrel> | ^what McMartin posted |
21:41 | <&McMartin> | No, it's compiled down into one use of StringBuilder with reconversion back into String in every iteration of the loop |
21:41 | < Vornucopia> | That. |
21:41 | < celticminstrel> | Oh, in a loop. |
21:41 | <&McMartin> | Thus requiring quadratic space and time in the number of iterations of the loop |
21:41 | < Vornucopia> | quadratic space too? |
21:41 | <&McMartin> | It happens at the end of the expression, though, yes, not per-unit. |
21:42 | <&McMartin> | Vornucopia: Well, none of the intermediate values are going away until the next GC |
21:42 | < Vornucopia> | true, since we're making objects they get heapy |
21:42 | < Vornucopia> | Though I thought java at least did some refcounting |
21:43 | <&McMartin> | Not positive but I think the stock VM is strictly generational |
21:43 | <&McMartin> | Though it's a highly advanced generational, so |
21:47 | <@ToxicFrog> | Isn't "generational" orthogonal to "refcounting" or "mark-and-sweep" or the like? |
21:48 | < Vornucopia> | I don't think generational actually applies to refcounting, or at least I can't see how |
21:52 | <&McMartin> | Generational is a (drastic) refinement of mark-and-sweep. |
21:54 | | Vornucopia [NSwebIRC@C888DE.7F9621.4A1301.BBBE7B] has quit [[NS] Quit: Page closed] |
22:01 | | cpux [cpux@Nightstar-c5874a39.dyn.optonline.net] has joined #code |
22:02 | | cpux|2 [cpux@Nightstar-c5874a39.dyn.optonline.net] has quit [Ping timeout: 121 seconds] |
22:12 | | maoranma [maoranma@Nightstar-45c46c98.pools.spcsdns.net] has joined #code |
22:17 | < maoranma> | Woot |
22:42 | | Stalker [Z@Nightstar-5aa18eaf.balk.dk] has quit [Ping timeout: 121 seconds] |
22:53 | | himi [fow035@D741F1.243F35.CADC30.81D435] has joined #code |
22:53 | | mode/#code [+o himi] by ChanServ |
23:07 | | Stalker [Z@Nightstar-3602cf5a.cust.comxnet.dk] has joined #code |
23:30 | <&McMartin> | Oh hey, Windows 8 Consumer Preview is out. |
23:30 | <&McMartin> | I suppose I should be a jerk and do the system tests to see if it is in fact really Windows 6.2 |
23:36 | | Derakon [chriswei@Nightstar-a3b183ae.ca.comcast.net] has joined #code |
23:36 | | mode/#code [+ao Derakon Derakon] by ChanServ |
23:57 | | Derakon [chriswei@Nightstar-a3b183ae.ca.comcast.net] has quit [[NS] Quit: leaving] |
--- Log closed Thu Mar 01 00:00:25 2012 |