code logs -> 2006 -> Tue, 15 Aug 2006< code.20060814.log - code.20060816.log >
--- Log opened Tue Aug 15 00:00:02 2006
00:16 * ReivSLEP er. Knwos java! Like, six lines. >.>
00:16 * ReivSLEP is thus possible not the best person to ask.
00:16 * Serah pokes ReivSLEP.
00:16
< Serah>
Liar.
00:16 ReivSLEP is now known as Reiver
00:16
<@Vornicus>
He just got here.
00:17
< Serah>
How do you know?
00:17
<@Vornicus>
Because I've been here for 7 hours now.
00:17
<@Reiver>
Because he still has that tracking implant installed.
01:06 Chalcy [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code
01:06 mode/#code [+o Chalcy] by ChanServ
01:06 Chalcedon [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has quit [Killed (NickServ (GHOST command used by Chalcy))]
01:06 Chalcy is now known as Chalcedon
01:12 * ToxicFrog snrks at a recent DWTF.
01:12
<@ToxicFrog>
Popup title "NO! - Bad User!!!"
01:13
<@ToxicFrog>
content "You've been warned 3 times that this file does not exist. Now you've made us catch this worthless exception and we're upset. Do not do this again."
01:13
<@Chalcedon>
...
01:26
<@Reiver>
...
01:26
<@Reiver>
Brilliant
01:27
<@Chalcedon>
?
01:27 * Chalcedon gives Reiver a cookie
01:29 * Reiver nrom!
01:29 * Reiver offers Chalcedon some of his delicious smelling apricot chicken.
01:30
<@Chalcedon>
thank you Reivy
01:30
<@Chalcedon>
(they're still warm btw
01:30
<@Chalcedon>
*)
01:30
<@Reiver>
Ooooh.
01:30 * Reiver /really/ wants to nrom, now. >.<
01:31 * Reiver has six large chicken drumsticks in apricotty goodness.
01:31
<@Chalcedon>
excellent
01:31 * Reiver would actually /really/ invite you over for dinner, if he didn't have so much homework.
01:31 * Chalcedon has to go out tonight anyway
01:31
<@Reiver>
Ah, well.
01:31 * Reiver nod. :)
01:31
<@Chalcedon>
we're meeting Forj's two business partners
01:31 * Chalcedon is making dinner
01:32
<@Reiver>
:)
01:50 himi-sleeping is now known as himi-coffee
01:55 Reiver is now known as ReivClass
03:00 Vornicus [~vorn@Nightstar-18307.slkc.qwest.net] has quit [Quit: ]
03:07 Chalain [~chalain@ServicesAdmin.Nightstar.Net] has left #code []
03:07 Chalain [~chalain@ServicesAdmin.Nightstar.Net] has joined #code
03:07 mode/#code [+o Chalain] by ChanServ
03:11 MahalWork [~Mahal@Nightstar-5049.worldnet.co.nz] has joined #Code
03:11 mode/#code [+o MahalWork] by ChanServ
03:45 Vornicus-Latens is now known as Vornicus
04:33 Mahal [~Mahal@Nightstar-5049.worldnet.co.nz] has quit [Quit: wr0k. Wootage.]
05:00 You're now known as TheWatcher
05:23 * Chalcedon beats python
05:23
<@Chalcedon>
why aren't you recognising a built in command?
05:23
<@Vornicus>
What's up?
05:27
<@Chalcedon>
I'm trying to learn how to read/write to/from text files
05:27
<@Chalcedon>
I have the file open
05:27
<@Chalcedon>
but it is not recognising write() or close()
05:27
<@Vornicus>
ah.
05:28
<@Vornicus>
Show me how you're doing it.
05:28
<@Chalcedon>
open('test.txt', 'w')
05:28
<@Chalcedon>
and write(s) (where s is a string) and close()
05:28
<@Vornicus>
Ok, I see where you're going wrong.
05:28
<@Chalcedon>
I'm just working in the command line thingamagig at the moment
05:29
<@Chalcedon>
please enlighten me?
05:29
<@Vornicus>
write and close (and open, at that) are methods on a file object.
05:29
<@Vornicus>
So you have to tell it what you're writing to, and what you're closing.
05:29
<@Chalcedon>
AH
05:29 * Chalcedon duhs at the obvious
05:29
<@Vornicus>
And for /that/ you need to tell it where to put file object that you created.
05:29
<@Vornicus>
Should be:
05:29
<@Chalcedon>
so I need to do write('test.txt', s)?
05:29
<@Vornicus>
f = file("test.txt", "w")
05:29
<@Vornicus>
then f.write(s)
05:30
<@Vornicus>
then f.close()
05:30
<@Chalcedon>
ok, yes thats better
05:30
<@Chalcedon>
which is object orientation?
05:30
<@Vornicus>
Essentially.
05:30
<@Chalcedon>
ok, makes sense.
05:30
<@Chalcedon>
thank you very much, I couldn't figure out why it didn't work.
05:31
<@Chalcedon>
yay, it works!
05:31
<@Vornicus>
yay!
05:31 * Chalcedon gives Vorn a stoatburger with side of cookies
05:32
<@Vornicus>
woohoo!
05:32 * Vornicus nromminates.
05:35
<@Vornicus>
Hrm. I think the only annoying thing about using Eclipse for Ruby is that it is overly aggressive with figuring out the collapse tree. So much so, in fact, that if at any point you stop typing for a few moments and do not have a well-formed script, you lose the collapse tree and all the collapses made on it.
05:35
<@Chalcedon>
o.O
05:37
<@Vornicus>
(a collapse tree is a very common system in IDEs by which you can hide large amounts of code so you get a more complete overall view of the code in the same amount of screen space. It makes your code act like, oh, Windows Explorer)
05:37
<@Chalcedon>
it sounds both intriguing and horribly confusing
05:38
<@Vornicus>
It's wonderful stuff, when it works.
05:38
<@TheWatcher>
It is actually easy to follow once oyu've seen it in action.
05:39
<@TheWatcher>
Although I prefer emacs' hide-show minor mode
05:39
<@Chalcedon>
having written a couple of really long files, it does sound handy
05:43
< himi-coffee>
If your files are long enough that they're confusing you, this is a good sign that you should be refactoring
05:43
<@Chalcedon>
refactoring?
05:43
<@Vornicus>
Long files aren't a big deal. Long functions, complicated classes, those are important.
05:44
< himi-coffee>
Rearranging/rewriting/reorganising
05:44
<@Chalcedon>
yes, but if you can't find the function in the file?
05:44
< himi-coffee>
Vorn: yeah, but long files that are /confusing/
05:44
< himi-coffee>
It's the confusing bit that's key
05:44
<@Vornicus>
Refactoring is the process of taking code that is Bigger Than Your Head, and cutting it into little bits that you can read and understand.
05:45
< himi-coffee>
And personally, if you have a file that's really long, even if it's not a big complicated nasty thing, if you can't find stuff in it you should probably start splitting it up so you /can/ find stuff
05:46
<@Chalcedon>
yeah... I did that, probably not the way one should...
05:46
<@Chalcedon>
but I always figure you learn how to do things better by screwing them up the first time.
05:46
< himi-coffee>
I mean, collapsing trees is great and all, but there's a reason you can split code into more than one file
05:47
<@Vornicus>
Right now I'm working on some code for euclidean geometry.
05:49
<@Vornicus>
One piece of code here, it determines the tangent points on a circle to a point.
05:49
<@Vornicus>
To do this, you get the midpoint between the circle's center and the given point, then draw a circle through the given point around that midpoint, then get the intersections of that circle with the given circle.
05:50
<@Vornicus>
Technically, I could put all this madness into a one-line function that does all those calculations.
05:50
<@Vornicus>
But then even I couldn't read it.
05:51
<@Vornicus>
So, here's one function I wrote:
05:51
<@Vornicus>
def x_distance_to(other)
05:51
<@Vornicus>
other.x - x
05:51
<@Vornicus>
end
05:51
< himi-coffee>
. . . . that's a nifty method for calculating the tangents . . . .
05:51
<@Vornicus>
It is. It's also 2500 years old.
05:52
< himi-coffee>
Yay the greeks
05:52
<@Chalcedon>
yeah....
05:53
<@Vornicus>
def distance_to(other)
05:53
<@Vornicus>
Math.hypot(x_distance_to(other), y_distance_to(other))
05:53
<@Vornicus>
end
05:53
<@Vornicus>
And there's another.
05:54
<@Vornicus>
Each method is so small that anyone with a middle school education in mathematics can see what I'm doing.
05:55 * himi-coffee ponders
05:56
< himi-coffee>
For /this/ particular problem, I'd probably have a circle intersection method, taking two circles defined by (x1, y1, r1, x2, y2, r2)
05:56
< himi-coffee>
I'm not sure what else you'd want to do with circles, though, so that might be too specific for the general library
05:56
<@Vornicus>
--now, granted, the actual circle-circle intersection method is pretty hairy.
05:58
<@Vornicus>
but that's because the math is, too.
05:58 * himi-coffee nods
05:59
< himi-coffee>
Not much you can do about /that/
05:59
< himi-coffee>
There are probably elements that can be split out, but without implementing it I can't say what
05:59
<@Vornicus>
There is a bit I can split out.
06:01
<@Vornicus>
Given any two circles I can describe the Radical Line, which is the line where distance_to(a.center) / a.r = distance_to(b.center) / b.r
06:01
<@Vornicus>
And if intersections exist, they will be on the Radical Line.
06:02
< himi-coffee>
That would indeed be useful
06:02
< himi-coffee>
Generally useful, in fact
06:03
<@Vornicus>
and then since I know the point of closest approach to the radical line, the rest is pretty trivial.
06:04
<@Vornicus>
(indeed, I find the PoCA first, and then the radical line is perpendicular to the line through both centers, through that point)
06:06
< himi-coffee>
Well, if you've got the radical line and you know that the tangent intersection points must be on the circumference of the first circle, then you can simply look for the two points on the radical line where distance_to(a.center) = a.r
06:06
<@Vornicus>
Yep.
06:06
< himi-coffee>
Unless I'm misunderstanding things
06:06
<@Vornicus>
And since you know how far the radical line is at its closest approach, you know how far along the radical line you have to go.
06:07
< himi-coffee>
But you should have a function describing the radical line in terms of the two center points, shouldn't you?
06:07
<@Vornicus>
Yes.
06:08
<@Vornicus>
And that's easily done.
06:08
< himi-coffee>
It'd be some set of simultaneous equations to describe the two tangent intersections
06:08
<@Vornicus>
I'll be posting the whole thing to my LJ when I'm done, you can see how it's done.
06:08 * himi-coffee nods
06:09
< himi-coffee>
It just seems like it should pretty much fall out, unless the equations don't work out
06:09 * himi-coffee ponders
06:09
< himi-coffee>
Though, since we're talking circles, they won't be linear
06:10
<@Vornicus>
No, the equations aren't linear. But they're astonishingly graceful.
06:10
< himi-coffee>
That makes them a lot nastier
06:10
< himi-coffee>
heh
06:11
<@Vornicus>
here's the distance from a to the radical line (d is the distance between a and b): (d^2 - a.r^2 + b.r^2) / 2d
06:11
< himi-coffee>
x.r being x's radius?
06:11
<@Vornicus>
yes.
06:13
<@Vornicus>
I saw that result quoted somewhere, and I didn't believe it, so I derived it myself.
06:13
<@Vornicus>
And if you take the right step in one place, it just kinda falls out.
06:29
< himi-coffee>
ugh
06:29
<@Vornicus>
?
06:30 * himi-coffee is going to get antihistamines, regardless of whether they make him sleep all day
06:30
<@Vornicus>
ah.
06:30
<@Vornicus>
suck.
06:31
< himi-coffee>
I don't /know/ they will, but anything that'll make me drowsy on top of the meds I'm already on might knock me out completely
06:31 himi-coffee is now known as himi-drug-shopping
06:36 You're now known as TW[flying]
06:52 ReivClass is now known as Reiver
06:56
<@Reiver>
I must wonder if one /can/ refactor perl?
06:56
<@Reiver>
>.>
07:03
<@Vornicus>
One must, if one intends on ever reading it again.
07:12
<@Vornicus>
mrh. You know, I think that guy in #ruby-lang was right. This thing makes more sense if you have all the operations work in the context of a metric space.
07:13 himi-drug-shopping is now known as himi
07:14
< himi>
. . . . everything makes more sense in metric . . .
07:14 * himi ducks
07:14
<@Vornicus>
That's not what I meant.
07:14
< himi>
(yes, I know that's not what you meant)
07:14 * Vornicus drops a half-ton stoatburger on himi.
07:15 * himi eats his way out
07:33 Chalcy [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code
07:33 mode/#code [+o Chalcy] by ChanServ
07:34 Chalcedon [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has quit [Ping Timeout]
08:02
<@Vornicus>
I do believe that it is time for slep.
08:02
<@Vornicus>
therefore.
08:02
<@Vornicus>
SLEP
08:02 * Vornicus slep
08:03
<@Reiver>
Ni Vorn!
08:06
< himi>
Slep wel
08:06
< Serah>
Night night Vorn.
08:10 Vornicus is now known as Vornicus-Latens
08:12 ASCIISkull [~none@Nightstar-17767.ny325.east.verizon.net] has quit [Ping Timeout]
08:33 Mahal [~Mahal@Nightstar-5049.worldnet.co.nz] has joined #code
08:33 mode/#code [+o Mahal] by ChanServ
08:36 ASCIISkull [~none@Nightstar-18623.ny325.east.verizon.net] has joined #Code
08:41 AFKSkull [~none@Nightstar-18623.ny325.east.verizon.net] has joined #Code
08:42 ASCIISkull [~none@Nightstar-18623.ny325.east.verizon.net] has quit [Ping Timeout]
10:53 AFKSkull [~none@Nightstar-18623.ny325.east.verizon.net] has left #Code []
11:30 Mahal [~Mahal@Nightstar-5049.worldnet.co.nz] has quit [Quit: This computer just fell asleep.]
11:59 Chalc [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code
12:00 Chalcy [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has quit [Ping Timeout]
12:00 Chalc is now known as Chalcedon
12:12 * EvilDarkLord hooray! Windows is finally workink.
12:16
<@Reiver>
Yay!
13:28
<@ToxicFrog>
That's a first.
13:30
< EvilDarkLord>
Well, it did disable sleep mode for some reason but I'm guessing it's just some silly default option I need to change.
14:02 Reiver is now known as ReivZzz
14:48 Chalcy [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code
14:48 mode/#code [+o Chalcy] by ChanServ
14:49 ToxicFrog|AFK is now known as ToxicFrog|W`rkn
14:50 Chalcedon [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has quit [Ping Timeout]
15:41 EvilDarkLord [althalas@Nightstar-17046.a80-186-184-83.elisa-laajakaista.fi] has quit [Ping Timeout]
15:43 himi is now known as himi-sleeping
15:43 himi-sleeping is now known as gnipeels-imih
15:43 gnipeels-imih is now known as himi-sleeping
15:53 EvilDarkLord [althalas@Nightstar-17046.a80-186-184-83.elisa-laajakaista.fi] has joined #code
17:05 Vornicus [~vorn@Nightstar-18307.slkc.qwest.net] has joined #code
17:05 mode/#code [+o Vornicus] by ChanServ
17:18 Chalcy [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has quit [Ping Timeout]
18:44 Syloq [Syloq@NetAdmin.Nightstar.Net] has joined #code
19:29 Chalcedon [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code
19:29 mode/#code [+o Chalcedon] by ChanServ
19:38
<@Vornicus>
bah. I put stuff on my USB stick to bring home and work on, and then I forget to bring it back.
19:38
<@ToxicFrog|W`rkn>
Oopsies.
19:38 * ToxicFrog|W`rkn keeps work and home in sync with rsync.
19:40
<@Vornicus>
Yeah, both of mine are behind routers.
19:40
<@ToxicFrog|W`rkn>
Portfwd 4tw.
19:40
<@Vornicus>
both of mine are behind routers I can't do that to.
19:41
<@Vornicus>
Well, technically I /could/ do it to the router here, but that would be Bad Form.
19:41
<@ToxicFrog|W`rkn>
Keh.
20:29
<@Vornicus>
Beware of computational algebra. It will eat your mind.
20:29
<@Vornicus>
And /then/ it will borrow your car.
20:30
<@Vornicus>
And /then/ it will raid your fridge.
20:50 EvilDarkLord is now known as Thokk
20:54 Mahal [~Mahal@Nightstar-5049.worldnet.co.nz] has joined #code
20:54 mode/#code [+o Mahal] by ChanServ
20:59 Thokk is now known as EvilZZZLord
21:37 * ToxicFrog|W`rkn eyes this comment.
21:37
<@ToxicFrog|W`rkn>
"There are 6 keys used for input: UP DOWN LEFT RIGHT ENTER ESC
21:38
<@ToxicFrog|W`rkn>
"There are also 4 timers pretending to be keystrokes: STATS INPUT INSERT FLASH HELP"
21:38
<@ToxicFrog|W`rkn>
5 == 4?
22:07 Chalcy [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code
22:07 mode/#code [+o Chalcy] by ChanServ
22:07 Chalcedon [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has quit [Killed (NickServ (GHOST command used by Chalcy))]
22:08 Chalcy is now known as Chalcedon
22:13 * ToxicFrog|W`rkn fiddles with SciTE.
22:13
<@ToxicFrog|W`rkn>
I think NEdit just got supplanted.
22:38
<@Vornicus>
Scite is pretty awesome.
22:44
<@ToxicFrog|W`rkn>
I'm finding this out, yes.
22:45
<@ToxicFrog|W`rkn>
Hopefully performance will be acceptable on Orias.
22:46
<@Vornicus>
Okay. Geometric numbers.
22:47
<@ToxicFrog|W`rkn>
I'd rather not, thanks~
22:48
<@Vornicus>
The core of the problem, really, is defining addition in such a way that I can add two disparate things and have them appear as two disparate things - 1 + sqrt(2) should remain as 1 + sqrt(2) - but two things that can add without going wiggy should actually add - 3/5 + 2/7 = 31/35.
22:49
<@Vornicus>
...the funny thing about that is that from there it's just a short hop to actual computational algebra.
23:01
<@ToxicFrog|W`rkn>
Umm.
23:01
<@ToxicFrog|W`rkn>
I recall burblings about doing this in Ruby, but in Lua...
23:02
<@Vornicus>
Yeah, I am doing it in Ruby.
23:05
<@ToxicFrog|W`rkn>
Aah.
23:07 Vornicus [~vorn@Nightstar-18307.slkc.qwest.net] has quit [Connection reset by peer]
23:07 Vornicus [~vorn@Nightstar-18307.slkc.qwest.net] has joined #code
23:08
< Vornicus>
Last I got was "aah"
23:09 Vornicus is now known as NSGuest-718
23:09 NSGuest-718 is now known as Vornicus
23:10
<@Chalcedon>
thats all there was
23:10
< Vornicus>
ok
23:35 * Vornicus floons
23:45 ToxicFrog|W`rkn is now known as ToxicFrog|AFK
--- Log closed Wed Aug 16 00:00:02 2006
code logs -> 2006 -> Tue, 15 Aug 2006< code.20060814.log - code.20060816.log >