code logs -> 2006 -> Sun, 10 Dec 2006< code.20061209.log - code.20061211.log >
--- Log opened Sun Dec 10 00:00:03 2006
00:14 Martivir is now known as EvilDarkLord
00:24 You're now known as theWatcher[T-2]
00:27 You're now known as TheWatcher[zZzZ]
00:45
< Janus>
May I ask a mathicaticalish question?
00:46
< EvilDarkLord>
Asking tends to be permitted.
00:49
< Janus>
Alrighty, let's say you know the diameter of a circle... and, using that diameter, pick an arbitrary spot (the distance is known). Then, how would one determine the distance along the circumference if, say, there were a line were drawn across... it... uh.
00:49
< Janus>
I had a feeling I wouldn't be able to explain it, so I drew a picture.
00:49
< Vornicus>
...huh?
00:49
< Vornicus>
yes, show us this picture.
00:50
< Janus>
http://img.photobucket.com/albums/v492/tai_ragnarok/fullcircle.jpg (It was OpenCanvas; I couldn't help myself)
00:50
< Vornicus>
You want arc lengths?
00:50
< Janus>
Yes, that's it!
00:50
< Vornicus>
okay.
00:51
< Vornicus>
I believe the arc length over a circle segment like that is r * (acos(right) - acos(left))
00:52
< Vornicus>
yes.
00:53
< Janus>
Wow... I never thought acos() would ever have a use either.
00:54
< Vornicus>
...where right and left scale from -1 on the left to +1 on the right.
00:54
< Janus>
Thanks then! This particular circle is a unit circle, so that shouldn't be a problem.
00:55 Thaqui [~Thaqui@Nightstar-1264.jetstream.xtra.co.nz] has quit [Ping Timeout]
00:56
< Vornicus>
if you want /really/ fucked up, try it with a sphere.
00:58
< Janus>
I'll stick with the 'sort of' variety, thank you.
00:58
< Vornicus>
heh
01:11 Thaqui [~Thaqui@Nightstar-12532.jetstream.xtra.co.nz] has joined #code
01:17 Chalcy [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has quit [Ping Timeout]
01:20 Janus [~Cerulean@Nightstar-10302.columbus.res.rr.com] has quit [Quit: Jouets de Dieu, jouets de jouets, et les jouets de me, fait naĆ®tre Clairvoire.]
01:25
< Vornicus>
okay. postgres installed.
01:25
< Vornicus>
now I need to test cgi.
01:26
<@Reiver>
?
01:26 * Vornicus is building!
01:26
<@Reiver>
??
01:26 * Vornicus is preparing his machine for development of his web catan game
01:27
<@Reiver>
!
01:27
< EvilDarkLord>
Hm. Why postgres instead of my, by the way?
01:29
< Vornicus>
Mostly because I'm used to Postgres.
01:29
< Vornicus>
Every time I've tried to use My in the past I've run up against a wall of "augh why doesn't this work?"
01:33
< EvilDarkLord>
Oh. I think MySQL 5.0 is slightly saner about standards and stuff.
01:38 * Vornicus tries to figure out a tricky bit.
01:38
< EvilDarkLord>
Aye?
01:38
< Vornicus>
okay, to create a game I need to insert many rows at once, and make linkes between them.
01:39
< EvilDarkLord>
Okay. What's the problem?
01:40
< EvilDarkLord>
Getting the index number for the ones you just inserted?
01:40
< Vornicus>
Essentially
01:41
< EvilDarkLord>
Grmbl. There's an easy way to do that with php/mysql but I have no idea about your setup.
01:41
< EvilDarkLord>
As I have never really used anything beyond those for dynamic sites.
01:42
< EvilDarkLord>
See if your insert returns some useful value?
01:42 * Vornicus is fiddling with it
01:44
< Vornicus>
Since I have a game_id, I might use that in /all/ game-specific tables, as /part/ of the primary key; then I can just copy indices from the game template and fill in just the game_id
01:49
< EvilDarkLord>
Copy stuff from database to database?
01:49 Takyoji [~Takyoji@Nightstar-25280.dhcp.roch.mn.charter.com] has joined #code
01:50 Fish [~Shemhazai@Nightstar-4203.vl20-cph.dhcp.clearwire.dk] has quit [Quit: Don't try to read the quit message, that is impossible. Instead only realize the thruth; "there is no quit message" and you will see it is not you who read the quit message but the quit message who reads you.]
01:51 EvilDarkLord is now known as EvilSLEPLord
01:52
< Vornicus>
copy stuff from the template tables into the game tables.
01:54 Janus [~Cerulean@Nightstar-10302.columbus.res.rr.com] has joined #Code
02:08 Chalcedon [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code
02:08 mode/#code [+o Chalcedon] by ChanServ
02:16 Saurivir is now known as AnnoDomini
02:18 Chalcedon is now known as ChalcyNap
02:21 ChalcyNap [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has quit [Ping Timeout]
02:22 Chalcedon [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code
02:22 mode/#code [+o Chalcedon] by ChanServ
02:25
< Takyoji>
Stupid question: In the graph in the Windows Task Manager (via CTRL+ALT+DEL) of the CPU usage, what does is the red line supposed to be?
02:25
< Takyoji>
I mean, what is it suppose to represent?
02:25
< Janus>
That's the Kernel.
02:25
< Takyoji>
oh
02:26
< Janus>
Uh... That's all I know~
02:26
< Takyoji>
so, the red is the calculation by the kernel, then green is supposed to be the overall usage?
02:26
< Takyoji>
k
02:31
<@ToxicFrog>
Red is either proportion of cycles spent executing kernel code or proportion of cycles in Ring 0, I'm not sure which.
02:34 Chalcedon [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has quit [Ping Timeout]
02:34 Chalcedon [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code
02:35 mode/#code [+o Chalcedon] by ChanServ
02:42
< Takyoji>
ahh
02:46
< Takyoji>
oh, and I also found a very good Web application editing tool called "PHP Developer 2007"
02:46
< Takyoji>
But stupidly, I think it's only for Windows
02:54 AnnoDomini [~fark.off@Nightstar-29709.neoplus.adsl.tpnet.pl] has quit [Quit: Some people find sanity a little confining.]
03:06 Janus is now known as Jan[bathipoo]
03:17
< Takyoji>
Otherwise, another stupid question: How can images contain viruses that execute when they are opened? Or is that just some random myth?
03:18
< Takyoji>
otherwise something I came across: http://www.albinoblacksheep.com/video/spyware
03:20
<@ToxicFrog>
There are two ways, actually.
03:20
<@ToxicFrog>
(1) image rending function has a flaw in it that allows an image that's corrupted in a certain specific way to inject code into memory where it will be executed (buffer overrun attack)
03:21
< Takyoji>
ahh
03:21
<@ToxicFrog>
(2) Windows WMF images are actually programs for a small VM that are in theory only meant to contain drawing commands but can, by design, execute arbitrary code on the host system (Microsoft sucks attack)
03:22
<@ToxicFrog>
Note that (1) requires you to be using the specific image display library (and version) that has the flaw; (2) requires you to be opening WMFs on an unpatched version of windows.
03:23
< Takyoji>
ahh
03:44 Reiver is now known as ReivOut
03:46
< Vornicus>
http://pastie.caboo.se/26790 <--- is this sane?
03:51
< Takyoji>
is that.. MySQL?
03:52
< Vornicus>
Postgres
03:52
< Vornicus>
But I believe it would work in My as well
03:52
< Takyoji>
ahh
03:52
< Takyoji>
looks like it
03:53
< Takyoji>
So your basically trying to make tables for saving data from the game you're creating?
03:53
< Vornicus>
Takyoji: yes.
03:53
< Takyoji>
I dont see anything wrong with it
03:53
< Vornicus>
And these tables here are examples of my key system.
03:54
< Takyoji>
oh
03:54
< Vornicus>
(the whole schema is considerably more complex.)
04:06
< Takyoji>
Quickly! How do you refresh the permission of a folder in Apache to default?
04:08
<@ToxicFrog>
$ chmod <insert default modes here> directory_name?
04:09
< Takyoji>
erm
04:10
< Takyoji>
The website is hosted elsewhere so I can't access it's shell
04:10
<@ToxicFrog>
Try that in FTP, then./
04:11
< Takyoji>
erm I mean, I have the appropriate permissions, but its still forbidden
04:11
<@ToxicFrog>
*you* have the permissions, but clearly *apache* doesn't.
04:11
< Vornicus>
you need to give "others" those permissions - the third number.
04:11
<@ToxicFrog>
Vornicus: or do group twiddling, if his host works that way.
04:12
< Vornicus>
...is there a reasonable use for having the more general people have more permissions than the more specific?
04:12
<@ToxicFrog>
But, yes, in general, you need to give the perms to "other"
04:12
<@ToxicFrog>
Not that I know of, why?
04:12
< Takyoji>
Oh, that worked
04:12
<@ToxicFrog>
(hmm. Will that even work?)
04:13
< Vornicus>
I'm curious
04:13
<@ToxicFrog>
Yes it will.
04:13
<@ToxicFrog>
[ben@leela tmp]$ chmod 007 test
04:13
<@ToxicFrog>
[ben@leela tmp]$ ls -l test
04:13
<@ToxicFrog>
-------rwx 1 ben ben 0 Dec 9 23:11 test
04:13
<@ToxicFrog>
[ben@leela tmp]$ cat test
04:13
<@ToxicFrog>
cat: test: Permission denied
04:13
< Takyoji>
So, what is Owner, Group, and Other supposed to be really?
04:13
< Vornicus>
madness
04:13
<@ToxicFrog>
Takyoji: "owner" is the single user who owns the file.
04:14
<@ToxicFrog>
"group" is the group that owns the file, which is usually but not always the same as the group the user belongs to.
04:14
<@ToxicFrog>
"other" is everyone else.
04:14
< Takyoji>
ANd how does Apache pertain to being in the "Other" category?
04:14
<@ToxicFrog>
So, the user permissions are what the file's owner is allowed to do, the group permissions are what everyone who's a part of that group are allowed to do, and the other permissions are for people who are neither the owner nor members of the group.l
04:15
<@ToxicFrog>
Apache is not you, so it doesn't get the user permissions.
04:15
<@ToxicFrog>
And it's not part of whatever group you're in (probably "users"), so it doesn't get those permissions either.
04:15
<@ToxicFrog>
Thus, to determine what apache is allowed to do to the file, the "other" permissions are consulted.
04:15
< Takyoji>
ahh
04:16
<@ToxicFrog>
Take, say, something that's owner ben, group users, permissions rwxr-xr--
04:16
<@ToxicFrog>
Ben, the owner of the file, can do anything to it.
04:17
<@ToxicFrog>
Other users on the system can read and execute it but not alter it.
04:17
<@ToxicFrog>
(that is to say, "other people in the 'users' group". Sorry.)
04:17
<@ToxicFrog>
Everyone else not in the "users" group can read, but neither write nor execute it.
04:19
< Takyoji>
ahh
04:19
< Vornicus>
(though root can do anything anytime.)
04:19
< Takyoji>
so the proper permission for a secret file, IE contain MySQL connection data, would be rw------- ?
04:20
< Vornicus>
yep.
04:20
< Takyoji>
k
04:21
< Vornicus>
Indeed, many things that use a secrets file /require/ that it have exactly those permissions.
04:21
< Takyoji>
What is execute for? To make the server be able to execure the document?
04:21
< Takyoji>
execute*
04:22
< Vornicus>
execute permissions means that you can tell the computer to try to run the file.
04:23 TakyojiClone [~Takyoji@Nightstar-25280.dhcp.roch.mn.charter.com] has joined #code
04:23
< TakyojiClone>
sorry for the disconnection
04:23
<@ToxicFrog>
Vornicus: specifically, it pertains to the exec*() syscalls, yes?
04:24
<@ToxicFrog>
<Takyoji> execute*
04:24
<@ToxicFrog>
<Vornicus> execute permissions means that you can tell the computer to try to run the file.
04:24
<@ToxicFrog>
--> TakyojiClone (~Takyoji@Nightstar-25280.dhcp.roch.mn.charter.com) has joined #code
04:24
< Vornicus>
I... don't know.
04:24 Takyoji [~Takyoji@Nightstar-25280.dhcp.roch.mn.charter.com] has quit [Killed (NickServ (GHOST command used by TakyojiClone))]
04:24
< Vornicus>
I know that execute permissions make it possible to run a script file just by naming it (as opposed to having to tell it what kind of script it is).
04:25
<@ToxicFrog>
Yeah. I think that this is actually done via exec() wizardry.
04:25
<@ToxicFrog>
Because otherwise, we end up with parts of the executable-permissions check inside the shell.
04:25
<@ToxicFrog>
And I'm fairly sure that's not the case.
04:25
< Vornicus>
Yes, that would be a Bad Thingā¢
04:26
<@ToxicFrog>
I think what it boils down to is that if it's +x you can exec() it.
04:26
<@ToxicFrog>
If it's not, you can't, but you can still load it into an interpreter (since that's just read()) if it's +r
04:26
<@ToxicFrog>
And of course +x means different things for directories.
04:28
<@ToxicFrog>
Although I find myself unable to recall the exact semantics.
04:28
<@ToxicFrog>
Oh, right.
04:28
<@ToxicFrog>
+w means you can change the directory contents (unlink, rename, create, etc). +x means you can list directory contents.
04:28
< Vornicus>
I think you can ls an +x
04:28
< Vornicus>
yeah
04:28 Mahal [~Mahal@Nightstar-12600.worldnet.co.nz] has quit [Connection reset by peer]
04:29
<@ToxicFrog>
Wait, no.
04:29
<@ToxicFrog>
+r means you can list contents.
04:29
< Vornicus>
and +r means that you can enter the directory
04:29
<@ToxicFrog>
+x means you can chdir() into it.
04:29
< Vornicus>
or, other way around
04:29 Mahal [~Mahal@Nightstar-12600.worldnet.co.nz] has joined #Code
04:29 mode/#code [+o Mahal] by ChanServ
04:29
<@ToxicFrog>
Being -x also means it can't be deleted, since rm needs to chdir() into the target directory.
04:30
< Vornicus>
...whoa, it does?
04:30
<@ToxicFrog>
[ben@leela tmp]$ mkdir test
04:30
<@ToxicFrog>
[ben@leela tmp]$ chmod -x test
04:30
<@ToxicFrog>
[ben@leela tmp]$ rm -r test
04:30
<@ToxicFrog>
rm: cannot chdir from `.' to `test': Permission denied
04:30
<@ToxicFrog>
[ben@leela tmp]$ chmod +x test && rm -rv test
04:30
<@ToxicFrog>
removed directory: `test'
04:30
< Vornicus>
...why does it need to do that?
04:31
<@ToxicFrog>
Because it needs to clean up the directory contents before it can destroy the directory itself.
04:31
< Vornicus>
oh yes.
04:31
<@ToxicFrog>
In particular, "-r" implies "chdir to each directory and unlink all of its contents before processing the directory itself", and lack of -r implies "skip directories because they can't be safely removed while they contain links"
05:00 Mahal [~Mahal@Nightstar-12600.worldnet.co.nz] has quit [Connection reset by peer]
05:01 Jan[bathipoo] is now known as Janus
05:01 Mahal [~Mahal@Nightstar-12600.worldnet.co.nz] has joined #Code
05:01 mode/#code [+o Mahal] by ChanServ
05:06
< Janus>
Whoo, is there anyway to average the total 32-bit value of two or more pixels so they look like an averaged together colour, or do they have to be split into rgb channels?
05:08
< Vornicus>
hm
05:08
< Vornicus>
I think you have to split them into channels; otherwise you may stomp one channel's high bit with the previous one's low bit.
05:08
< Vornicus>
That said, your graphics library probably comes with blend functions.
05:09
<@ToxicFrog>
If this is a roundabout way of asking "how do I blend multiple semi-transparent images", the answer is "SDL has functions to do that, just make sure your alpha channel is set correctly"
05:13 Ev3 [~-@87.72.36.ns-26407] has quit [Connection reset by peer]
05:14
< Janus>
Well... actually, what I'm trying to do is pretty specific; it takes a /long/ 3000ish x 40ish pixel image, and maps the pixels so that it would appear appear like a wall to the inside of a circular room. A part of this is that the pixels near the edge of the wall, where the wall is perpendicular to the camera, need to average together.
05:15 Mahal [~Mahal@Nightstar-12600.worldnet.co.nz] has quit [Connection reset by peer]
05:16 Mahal [~Mahal@Nightstar-12600.worldnet.co.nz] has joined #Code
05:16 mode/#code [+o Mahal] by ChanServ
05:16 NSGuest-553 [~-@87.72.36.ns-26407] has joined #Code
05:16
< Janus>
It would make GIMPing the areas easier, (it's not for real-time effects, of course.)
05:19
<@ToxicFrog>
Aah.
05:19
<@ToxicFrog>
I think there's a GIMP filter for that.
05:19
< Janus>
... really?
05:20
<@ToxicFrog>
I mean, not a filter specifically for that, but one that can be adapted for that purpose.
05:20
<@ToxicFrog>
Specifically, I think there's one for mapping a two-dimensional image onto the surface of a sphere/cylinder/etc
05:20
< Vornicus>
This is obviously a very low-ceilinged room.
05:21
<@ToxicFrog>
Or a very wide one.
05:21 Chalcedon [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has quit [Ping Timeout]
05:21
< Janus>
It's more like the step of a bleacher; there's more walls as it's layered many times.
05:22
< Janus>
Think of the circus, with a stage in the middle, and seating going up around it.
05:23
< Vornicus>
...I see where you're going with that.
05:23
<@ToxicFrog>
Pre-rendered backgrounds?
05:24
< Janus>
Yes. It would be nice if it could be done in real-time (camera swooping and all that), but pre-rendering is the main goal.
05:24
< Janus>
The floor as well, is actually just a normal texture rotated by theta, then shrunk along the y-axis by .5
05:30 * Janus loves playing around with pixels~
06:10 TakyojiClone [~Takyoji@Nightstar-25280.dhcp.roch.mn.charter.com] has quit [Quit: Leaving]
06:14 NSGuest-553 is now known as Ev3
06:18 * Vornicus fiddles with his database schema
06:20
< Vornicus>
The table counts are just going batshit.
07:00 Stephenie [Safyra@Nightstar-25904.ok.ok.cox.net] has quit [Quit: ]
07:11 EvilSLEPLord [althalas@Nightstar-15301.a88-115-211-62.elisa-laajakaista.fi] has quit [Ping Timeout]
07:13 Janus [~Cerulean@Nightstar-10302.columbus.res.rr.com] has quit [Quit: Jouets de Dieu, jouets de jouets, et les jouets de me, fait naĆ®tre Clairvoire.]
08:25 Takyoji [~Takyoji@Nightstar-25280.dhcp.roch.mn.charter.com] has joined #code
08:46
< Takyoji>
Is there a way to make animations in GIMP?
08:50
< Takyoji>
or how can animations be made in Adobe ImageReady?
08:57 Takyoji [~Takyoji@Nightstar-25280.dhcp.roch.mn.charter.com] has quit [Quit: Leaving]
09:28 ReivOut is now known as Reiver
10:37 EvilDarkLord [althalas@Nightstar-15301.a88-115-211-62.elisa-laajakaista.fi] has joined #code
10:43 Reiver is now known as ReivZzz
11:00 You're now known as TheWatcher
11:54 Thaqui [~Thaqui@Nightstar-12532.jetstream.xtra.co.nz] has quit [Client exited]
12:07 AnnoDomini [~fark.off@Nightstar-29094.neoplus.adsl.tpnet.pl] has joined #Code
12:09 EvilDarkLord [althalas@Nightstar-15301.a88-115-211-62.elisa-laajakaista.fi] has quit [Ping Timeout]
12:22 EvilDarkLord [althalas@Nightstar-15301.a88-115-211-62.elisa-laajakaista.fi] has joined #code
14:13 MyCatOwnz [~mycatownz@Nightstar-379.dsl.in-addr.zen.co.uk] has joined #code
15:09
< AnnoDomini>
Could youse guys help me out a bit?
15:09
<@jerith>
No. I have spent all my helping credits today explain "grok" to someone's little brother.
15:09 * jerith grins.
15:10
<@jerith>
What's the problem?
15:10
< AnnoDomini>
http://pastie.caboo.se/26840
15:10 * AnnoDomini isn't even sure that site's for this kind of thing.
15:10
< AnnoDomini>
This bloody thing does not want to work.
15:10
< MyCatOwnz>
Probably. That's C, right? Those multidimensional arrays - where did you get them?
15:11
< AnnoDomini>
Randomly generated, A[N][N+1].
15:11
< MyCatOwnz>
Were those multidimensional arrays malloc()'d on the heap or are they local or global variables?
15:11
< AnnoDomini>
Hmm. Global.
15:12
< MyCatOwnz>
k. Does the compiler give you any warnings about conversions between pointers and integers without casts?
15:12
< AnnoDomini>
No errors, no warnings.
15:13
< AnnoDomini>
This is Borland C++ 3.1.
15:13
< MyCatOwnz>
k. No segfaults either?
15:13
< AnnoDomini>
Not sure what that is, but it compiles flawlessly.
15:14
<@jerith>
Do you not perhaps want to start i at 0?
15:14
< AnnoDomini>
!
15:14
< AnnoDomini>
That's a good idea.
15:14
< MyCatOwnz>
C arrays being zero-indexed, he probably does.
15:14 * jerith takes a bow and waits to see if it worked.
15:15
< AnnoDomini>
Well, now it actually does something.
15:15
< AnnoDomini>
Too bad is obliterates the wrong cells.
15:15
< AnnoDomini>
...
15:16
< AnnoDomini>
What's a 'parity error?'
15:16
<@jerith>
It's been a little over a year since I last did Gauss-Jordan in C...
15:16
< MyCatOwnz>
AnnoDomini: a complicated way of saying, "Oh dear."
15:17 * jerith ponders the algorithm.
15:17
< MyCatOwnz>
D'ya have ECC memory, by any chance?
15:17
< AnnoDomini>
ECC?
15:17
< MyCatOwnz>
Probably not, then.
15:26
<@jerith>
AD: I hope that's not all there is to your reduction...
15:26
<@jerith>
Mine is quite a bit bigger to catch edge cases.
15:27
< AnnoDomini>
I really don't understand this whole thing well enough to make anything more sophisticated.
15:28
< AnnoDomini>
My priorities include making this thing work.
15:28
< AnnoDomini>
Which, at the moment, it doesn't.
15:29
<@jerith>
Just to make sure we're doing the same algorithm here:
15:29
<@jerith>
You're solving a system of linear equations.
15:30
<@jerith>
The input is a matrix of the form:
15:30
<@jerith>
[a1 b1 c1 | z1]
15:30
<@jerith>
[a2 b2 c2 | z2]
15:30
<@jerith>
[a3 b3 c3 | z3]
15:30
< AnnoDomini>
Yes.
15:30
<@jerith>
and the output is:
15:31
<@jerith>
[1 0 0 | a]
15:31
<@jerith>
[0 1 0 | b]
15:31
<@jerith>
[0 0 1 | c]
15:31
< AnnoDomini>
That's Gauss-Jordan.
15:31
< AnnoDomini>
This thing's supposed to do Gaussian elimination plus reverse reduction.
15:32
<@jerith>
Refresh my memory?
15:32
< AnnoDomini>
The result is the same, but it goes about it differently.
15:32
<@jerith>
Ah.
15:32
<@jerith>
I shall think about it over supper (which has just been served) and read your explanation of the algorithm when I return.
15:32
<@jerith>
:-)
15:36
< AnnoDomini>
A|B -> A*|B* -> I|B**. Where A is the matrix of coefficients, A* is an upper triangular matrix after Gaussian elimination, B is the free vector and B* is that after Gaussian elimination, I is a matrix with ones on where i==j, and B** is the solution vector.
15:45
<@jerith>
Ah.
15:46
<@jerith>
So rather than doing it in one step, you clear the lower triangle first.
15:46
< AnnoDomini>
Yeah.
15:48
<@jerith>
So, first you'll have to clear everything to the left of the pivot.
15:48
< AnnoDomini>
Yeah.
15:49
<@jerith>
However, some rows just don't work.
15:49
< AnnoDomini>
Eh?
15:49
<@jerith>
Because you end up with a zero on the pivot.
15:49
<@jerith>
So you have to swap if this happens.
15:49
<@jerith>
Correct?
15:50
< AnnoDomini>
Yeah. But that's hardly important, as the odds are very unlikely - right now, I just need this to begin working as intended.
15:50
< AnnoDomini>
I'll have to do the lead element choice later.
15:51
<@jerith>
Do your sample by hand to make sure it's not manifesting.
15:53
< AnnoDomini>
But there isn't a zero on the pivot.
15:54
< AnnoDomini>
It would return 'division by zero' if there was.
15:57 * jerith considers other edge cases.
16:00
<@jerith>
Explain what you do to each row.
16:03
< AnnoDomini>
I start at row 2. I calculate this m number, m[x][y]=-a[x][y]/[y][y].
16:03
< AnnoDomini>
So that's, for the first row, first collumn, m[2][1]=-a[2][1]/a[1][1].
16:04
<@jerith>
What is m?
16:04
< AnnoDomini>
I'm am unsure what to call it.
16:04
<@jerith>
Are you 1-basing your arrays again?
16:04
< AnnoDomini>
Yes.
16:05
<@jerith>
What do you use m for?
16:05
< AnnoDomini>
I'll get to that.
16:07
< AnnoDomini>
Argh.
16:07
< AnnoDomini>
I cannot explain this.
16:07
< AnnoDomini>
It's beyond me.
16:07
< AnnoDomini>
I can do Gaussian elimination on paper just fine.
16:07
< AnnoDomini>
But this bloody thing is incomprehensible to me.
16:07 * AnnoDomini tears hair.
16:09
< AnnoDomini>
I'm supposed to add row1 to row2, so that the elements under the pivot are zero.
16:09
< AnnoDomini>
M is the number I multiply row1 by so that m*row1+row2=0.
16:10
< AnnoDomini>
Under the pivot.
16:10
< AnnoDomini>
The other elements can be whatever.
16:10
<@jerith>
Okay, you have to do that once for each row above the one you're on
16:10
<@jerith>
.
16:10
<@jerith>
To zero all the elements.
16:11
< AnnoDomini>
Yes. Change all the rows so that the elements under the pivot in the first collumn are zero.
16:11
< AnnoDomini>
Then do that again for the next collumn, until I run out of them.
16:12
<@jerith>
Ah.
16:13
<@jerith>
So the innermost loop is over all rows below the current one.
16:13
< AnnoDomini>
No... The innermost is the collumns.
16:13
< AnnoDomini>
For each row.
16:13
<@jerith>
Yeah.
16:14
<@jerith>
Innermost loops, I meant.
16:14
< AnnoDomini>
Step, row, collumn.
16:15
<@jerith>
So, let's check that the array indeces aren't on crack.
16:16 * jerith fires up an editor.
16:17
< AnnoDomini>
http://pastie.caboo.se/26848
16:17
< AnnoDomini>
This what I'm using now.
16:25
<@jerith>
http://pastie.caboo.se/26850 <-- What I think you should have there.
16:25
<@jerith>
Firstly, better var names.
16:26
<@jerith>
Oops, left out the +1 after the n in the column loop.
16:26
<@jerith>
I'm using n as the number of rows.
16:27
< AnnoDomini>
But it's in C. So that would mean the rows are 0..n-1 and the collumns are 0..n.
16:28
< AnnoDomini>
Since A[n][n+1].
16:28
<@jerith>
Yes. Hence "row < n" and "col < n+1".
16:28
<@jerith>
<, not <=.
16:29
<@jerith>
Just out of interest, how much is Hetzner hosting?
16:30
< AnnoDomini>
Who?
16:30
<@jerith>
Oops, wrong channel.
16:31
<@jerith>
They're a local colo.
16:32
< AnnoDomini>
"for (int col=row; col < n; col++)" Shouldn't that be col=pivot?
16:33
<@jerith>
Indeed.
16:34
< AnnoDomini>
Well, that does the same thing as my own code.
16:34
< AnnoDomini>
Changes everything under the first row into random gibberish, whilst not zero-ing the region under the pivot.
16:35 * jerith ponders.
16:35
<@jerith>
I should probably put that in a frame and test it.
16:42 AnnoDomini [~fark.off@Nightstar-29094.neoplus.adsl.tpnet.pl] has quit [Ping Timeout]
16:44 AnnoDomini [~fark.off@Nightstar-29094.neoplus.adsl.tpnet.pl] has joined #Code
16:45
<@jerith>
Hmm, you need to normalise your pivot in there somewhere.
16:46
< AnnoDomini>
Which means?
16:47
<@jerith>
Make your pivot equal to 1.
16:47
<@jerith>
Or is that unnecessary?
16:47
< AnnoDomini>
I can do that when I get to the reverse reduction, right now I just need to obtain a upper triangular matrix.
16:48
<@jerith>
Also, why do you keep the ms?
16:48
<@jerith>
Why not just put it in a throwaway loop variable?
16:49
< AnnoDomini>
I think I need to indexes.
16:50
< AnnoDomini>
*the
16:54
<@jerith>
What for?
16:54 * AnnoDomini is not sure.
17:34 ReivZzz is now known as Reiver
17:35 You're now known as TheWatcher[afk]
17:41 Reiver is now known as ReivWork
17:43
< AnnoDomini>
Right...
17:43
< AnnoDomini>
I think I know what's wrong.
17:43
< AnnoDomini>
Rounding errors.
17:44
<@jerith>
Really?
17:44
<@jerith>
Assuming you're using doubles those should be negligable.
17:44
< AnnoDomini>
We're not supposed to use doubles.
17:44
<@jerith>
And you should only be displaying to about 3 decimals anyway.
17:44
<@jerith>
Why not?
17:44
<@jerith>
Even floats should be accurate enough for small numbers...
17:45 Ev3 [~-@87.72.36.ns-26407] has quit [Ping Timeout]
17:45
< AnnoDomini>
Because it's the point of this exercise. We're supposed to find how much computers skew the solutions to matrixes.
17:46
< AnnoDomini>
For REALLY low integers, all's well.
17:46
< AnnoDomini>
Sometimes, I even get all zeroes under the pivot.
17:47
< AnnoDomini>
But as the dimension, and the complexity of the numbers grows, more often than not, I get something like 3.005e-07.
17:47
<@jerith>
Ah.
17:53
<@ToxicFrog>
Umm.
17:54
<@ToxicFrog>
This seems kind of like flawed methodology.
17:54
<@ToxicFrog>
"We want to see how much computers skew the results, so we're going to use floats, when in practice this is a problem that would be solved with doubles or with a special-purpose math library"
17:56 Netsplit DeepThought.NY.US.Nightstar.Net <-> Troika.TX.US.Nightstar.Net quits: @Pi, Raif, Vornicus, AnnoDomini, @jerith, @Chalain
17:56 Netsplit over, joins: Chalain, jerith
17:56 mode/#code [+o Chalain] by ChanServ
17:56 mode/#code [+o jerith] by ChanServ
17:56 Netsplit over, joins: Vornicus
17:56 Netsplit over, joins: Pi
17:56 mode/#code [+o Vornicus] by ChanServ
17:56 mode/#code [+o Pi] by ChanServ
17:56 Netsplit over, joins: Raif
17:56 mode/#code [+o Raif] by ChanServ
17:57 Raif_ [~corvusign@Nightstar-16707.hsd1.ca.comcast.net] has joined #Code
17:57 Raif [~corvusign@Nightstar-18227.hsd1.wa.comcast.net] has quit [Ping Timeout]
17:57 Pi [~sysop@Nightstar-6915.hsd1.or.comcast.net] has quit [Ping Timeout]
17:57 Netsplit over, joins: AnnoDomini
17:57
< AnnoDomini>
What do you mean?
17:57
<@ToxicFrog>
How much of that did you get?
17:59 Netsplit DeepThought.NY.US.Nightstar.Net <-> Troika.TX.US.Nightstar.Net quits: Raif_, @Vornicus, AnnoDomini, @jerith, @Chalain
18:03 mode/#code [+o Chalain] by ChanServ
18:03 Netsplit over, joins: @Chalain
18:03 Netsplit over, joins: jerith
18:03 Raif [~corvusign@Nightstar-16707.hsd1.ca.comcast.net] has joined #Code
18:03 mode/#code [+o Raif] by ChanServ
18:04 Netsplit over, joins: AnnoDomini
18:04 Netsplit over, joins: Vornicus
18:04 jerith is now known as NSGuest-580
18:06 Netsplit DeepThought.NY.US.Nightstar.Net <-> Troika.TX.US.Nightstar.Net quits: Vornicus, @Raif, NSGuest-580, AnnoDomini, @Chalain
18:06 Netsplit over, joins: Chalain, NSGuest-580, AnnoDomini, Raif
18:06 mode/#code [+o Chalain] by ChanServ
18:06 Netsplit over, joins: Vornicus
18:06 mode/#code [+o Raif] by ChanServ
18:06
< AnnoDomini>
ToxicFrog: What do you mean?
18:07
<@ToxicFrog>
<ToxicFrog> This seems kind of like flawed methodology.
18:07
<@ToxicFrog>
<ToxicFrog> "We want to see how much computers skew the results, so we're going to use floats, when in practice this is a problem that would be solved with doubles or with a special-purpose math library"
18:07 Vornicus is now known as NSGuest-589
18:08
< AnnoDomini>
If we use doubles, there is no problem.
18:08
< AnnoDomini>
That's the thing.
18:08
< AnnoDomini>
We apparently need the problem to see how much it is a problem.
18:08
< AnnoDomini>
Or something.
18:09
<@ToxicFrog>
Well, if the problem *doesn't occur* when the program is written properly, the answer appears to be "not much of one"
18:09
< NSGuest-580>
Which doesn't help unless you actually quatise it.
18:09
< NSGuest-580>
+n
18:09 NSGuest-580 is now known as jerith
18:10
< AnnoDomini>
ToxicFrog: You are not getting the point. The point is seeing that numerical methods are only approximate, not ideal.
18:10
<@ToxicFrog>
Aah.
18:10
<@ToxicFrog>
Now it makes sense.
18:11
< jerith>
The trick is to make sure you use appropriate data types for your accuracy requirements.
18:13
< jerith>
The whole "don't blindly trust the computer" thing.
18:13
< AnnoDomini>
Yeah.
18:13
< jerith>
Like the Verizon Canadian data billing thing doing the rounds in the blogosphere.
18:14
<@ToxicFrog>
...link?
18:15
< jerith>
http://www.theregister.co.uk/2006/02/28/goat_wedding/
18:15
< jerith>
Um, not that one.
18:15
< jerith>
Stupid bloody clipboard.
18:16
< jerith>
http://verizonmath.blogspot.com/
18:16
< jerith>
http://scienceblogs.com/goodmath/2006/12/pathetic_but_funny_bad_billing.php
18:20
<@ToxicFrog>
...
18:20
<@ToxicFrog>
That doesn't look like "don't blindly trust the computer"
18:20
<@ToxicFrog>
It looks like "wow, the stupidity"
18:22
< jerith>
"But I type .002 into the calculator and..."
18:23
<@ToxicFrog>
"And it comes up with a unitless value, which I am going to say doesn't matter because dollars and cents are the same thing"
18:23
<@ToxicFrog>
The stupidity would be the same if he said "and now work it out longhand with pencil and paper" instead of "and now type it into the calculator"
18:24
< jerith>
The thing is, people seem to think that they *don't need to know this stuff* because the machine does it all for them. That's what machines are for, right?
18:25
< jerith>
Like looking at what the "start a new project" wizard does under the hood. Because sooner or later you'll need to debug that shit.
18:29
<@ToxicFrog>
No, if you keep reading the transcript, that's clearly not the problem.
18:29
<@ToxicFrog>
"How do you write down one cent?" "0.01"
18:29
<@ToxicFrog>
"Ok, how do you write down half a cent?" "0.005 cents"
18:30
< jerith>
Indeed.
18:30
<@ToxicFrog>
It's not that they are blindly trusting the output of the calculator, or even so much that they don't know basic math. It's that they are incapable of grasping the concept that "cent" and "dollar" are in fact different units.
18:32 You're now known as TheWatcher
18:33
<@ToxicFrog>
Which may, now that I think of it, stem from a fundamental lack of understanding of how reals work.
18:36 * jerith nods sagely.
18:37
<@ToxicFrog>
...snrk
18:37
<@ToxicFrog>
http://xkcd.com/verizon/
18:37
< jerith>
Indeed.
18:55 NSGuest-589 is now known as Vornicus
19:01 Takyoji [~Takyoji@Nightstar-25280.dhcp.roch.mn.charter.com] has joined #code
19:02
< Takyoji>
Apparently I'm trying to make a file move to another location, but, it it's being moved to the wrong folder and ISN'T errorous
19:02
< Takyoji>
IE: I tell it to move it to C:/Program Files/xampp/htdocs/store/pictures/button.jpg instead it moves it to C:/Program Files/xampp/htdocs/store/pictures/admin/button.jpg
19:03
< Takyoji>
erm C:/Program Files/xampp/htdocs/store/admin/button.jpg
19:03
< Takyoji>
for the second one
19:09
< Takyoji>
So, basically, the script that moves the file is in the 'admin' folder, then I tell it to move the files to '../pictures/' but it just moves them to the 'admin' folder
19:13
< Takyoji>
Well?? Is it Apache or something??
19:18 Janus [~Cerulean@Nightstar-10302.columbus.res.rr.com] has joined #Code
19:33
< Takyoji>
gotta go
19:34 Takyoji [~Takyoji@Nightstar-25280.dhcp.roch.mn.charter.com] has quit [Quit: Leaving]
19:37
< jerith>
Am I the only one annoyed by Takyoji's way of asking for help?
19:38
<@ToxicFrog>
No.
19:38
< Janus>
I couldn't help his path problem either~
19:38
< jerith>
I take it that's why he was met by a resounding silence.
19:38
< jerith>
Usually I at least mention that I can't help if I'm here.
19:39
<@ToxicFrog>
Actually, I wasn't paying attention to this channel.
19:40 MyCatOwnz [~mycatownz@Nightstar-379.dsl.in-addr.zen.co.uk] has quit [Quit: It's roughly quarter to eight in the evening. Perhaps I should put some clothes on.]
19:45 * Janus ponders if he should ask a question now. D:
19:51
< jerith>
Sure, just be polite. :-)
19:52
< jerith>
It's the "21:13 < Takyoji> Well?? Is it Apache or something??" that pushed me over the edge into hostility.
19:52
< jerith>
That and the lack of any kind of context.
19:53
< Janus>
Yes sir, I'll keep my troll in his bag then~
19:54 Pi [~sysop@Nightstar-6915.hsd1.or.comcast.net] has joined #code
19:54 mode/#code [+o Pi] by ChanServ
19:56
< Janus>
The length for an arc-length is r * (acos(right) - acos(left)), right? Well... how would someone find out the 'right' variable if the arc-length is already known...?
19:56
< Vornicus>
given left?
19:57
< Janus>
Left would already be know, yep.
19:57
< Janus>
*known too. It seems I was trying to work backwards yesterday~
19:57
< jerith>
cos(length/r + acos(left)) perhaps?
19:58
< Vornicus>
l = r * (acos(right) - acos(left)); l/r = acos(right) - acos(left); acos(right) = l/r + acos(left); right = cos(l/r + acos(left))
19:58
< Vornicus>
so yes
19:58
< jerith>
Unless I'm too tired to twiddle and equation.
19:58
< jerith>
What are left and right, though?
19:59
< Vornicus>
left and right are normalized distances from the circle center
19:59
< Vornicus>
er
19:59 * Vornicus tries to describe
19:59
< Janus>
Alright, thank you then! I'll... see if I can get the drawing out; I'm not very apt at discribing geometric thingies.
20:00
< Vornicus>
Given a circle of radius r and center x coordinate x, and x coordinates a and b are the left and right extents of the arc in question, left is (x - a)/r, and right is (x - b)/r
20:01
< Janus>
http://img.photobucket.com/albums/v492/tai_ragnarok/fullcircle.jpg (again, OpenCanvas. The temptation was too great.)
20:02
< Janus>
Except, the qustion marks are now on the radius thing, not the arcs.
20:02
< jerith>
Hmm...
20:03
< jerith>
Ah, normalised.
20:03
< jerith>
Yes, that makes sense.
20:03 Takyoji [~Takyoji@Nightstar-25280.dhcp.roch.mn.charter.com] has joined #code
20:04
< Takyoji>
I almost forgot to ask again. Is there a way to make animations in GIMP?
20:04
< jerith>
What kind of animations?
20:04
< Takyoji>
gif
20:04
< Janus>
Indeed. Give me a moment to find the exact command...
20:04
< jerith>
http://www.google.com/search?q=gimp%20gif%20animation
20:05
< jerith>
There's a tutorial.
20:05
< Takyoji>
oh thanks
20:05 * jerith sighs.
20:05
< Janus>
Ah, that'll explain it far better than I.
20:06 Chalcedon [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code
20:06 mode/#code [+o Chalcedon] by ChanServ
20:06
< jerith>
Hey Chalcy.
20:06
<@Chalcedon>
hi jerith
20:07
< jerith>
How's Monday?
20:07
<@Chalcedon>
bright and sunny
20:08
<@Chalcedon>
what about Sunday?
20:09
< jerith>
Getting to the point where I need to sleep.
20:09
< jerith>
This whole weekend has just been ugh.
20:11
< jerith>
G'night all.
20:11
< Takyoji>
night
20:12
< Janus>
Nighty-nite Mr. jerith.
20:15 TakyojiClone [~Takyoji@Nightstar-25280.dhcp.roch.mn.charter.com] has joined #code
20:17 Takyoji [~Takyoji@Nightstar-25280.dhcp.roch.mn.charter.com] has quit [Killed (NickServ (GHOST command used by TakyojiClone))]
20:24 * Chalcedon hug jerith
20:28 Thaqui [~Thaqui@Nightstar-12532.jetstream.xtra.co.nz] has joined #code
20:45 TakyojiClone [~Takyoji@Nightstar-25280.dhcp.roch.mn.charter.com] has quit [Quit: Leaving]
20:47 passedit [~passedit@Nightstar-10260.dsl.bell.ca] has joined #Code
20:49
< passedit>
hello people i have 3 items for immediate sale, one sony vaio notebook computer price 550, one de ll xps notebook computer price 650, one sony playstation3 60 gigabyte with 3 games and extra controller, price 650. prices include shipping. message me on aim at polter1981 or msn at justit1981@hotmail.com if interested
20:50
< passedit>
hello people i have 3 items for immediate sale, one sony vaio notebook computer price 550, one de ll xps notebook computer price 650, one sony playstation3 60 gigabyte with 3 games and extra controller, price 650. prices include shipping. message me on aim at polter1981 or msn at justit1981@hotmail.com if interested
20:50 passedit was kicked from #code by ToxicFrog [Frozen.]
21:11 MyCatOwnz [~mycatownz@Nightstar-379.dsl.in-addr.zen.co.uk] has joined #code
21:14
< AnnoDomini>
I need more help. I've somehow gotten Gaussian elimination going. But now, I need to work out how to write the code for the LU decomposition.
21:16
< AnnoDomini>
I've ascertained that the LU decomposition (Dolittle algorithm) is basically Gaussian elimination - so L=I and U=A*.
21:16
< AnnoDomini>
Where A* is the result of Gaussion elimination on A.
21:16
< AnnoDomini>
And I is a ones-on-pivot matrix.
21:16
< AnnoDomini>
But where do I go from here?
21:34
< MyCatOwnz>
No clue. Way outside my mathematical grounding. :/
21:34
< AnnoDomini>
Aha.
21:35
< Janus>
Gaussion Blur is supposed to be destructive, right..?
21:35
< AnnoDomini>
I have no idea.
21:36
< AnnoDomini>
And it's Gaussian. Not like I typo'ed.
21:36 * AnnoDomini suspects Janus of either not being proficient in English, or using a Dvorak Standard Keyboard.
21:36
< AnnoDomini>
:p
21:37
<@ToxicFrog>
Janus: any kind of blur filter is.
21:37 * Janus suspects AnnoDomini of being his English teacher.
21:38 * AnnoDomini does not teach, is terrible at explaining things.
21:46 Pi [~sysop@Nightstar-6915.hsd1.or.comcast.net] has quit [Ping Timeout]
21:47 Chalcedon is now known as ChalcyUni
21:48 Pi [~sysop@ServicesAdmin.Nightstar.Net] has joined #code
21:48 mode/#code [+o Pi] by ChanServ
22:01 Pi [~sysop@ServicesAdmin.Nightstar.Net] has quit [Ping Timeout]
22:05 Pi [~sysop@Nightstar-6915.hsd1.or.comcast.net] has joined #code
22:05 mode/#code [+o Pi] by ChanServ
22:13 Chalcy [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code
22:13 mode/#code [+o Chalcy] by ChanServ
22:15 ChalcyUni [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has quit [Ping Timeout]
22:15 Pi [~sysop@ServicesAdmin.Nightstar.Net] has quit [Ping Timeout]
22:20 Pi [~sysop@Nightstar-6915.hsd1.or.comcast.net] has joined #code
22:20 mode/#code [+o Pi] by ChanServ
22:20 You're now known as TheWatcher[T-2]
22:23 Pi [~sysop@ServicesAdmin.Nightstar.Net] has quit [Ping Timeout]
22:28 You're now known as TheWatcher[zZzZ]
22:31 Janus [~Cerulean@Nightstar-10302.columbus.res.rr.com] has quit [Quit: Jouets de Dieu, jouets de jouets, et les jouets de me, fait naĆ®tre Clairvoire.]
22:44 Ev3 [~Shemhazai@87.72.36.ns-26407] has joined #Code
23:35 AnnoDomini [~fark.off@Nightstar-29094.neoplus.adsl.tpnet.pl] has quit [Quit: Some people find sanity a little confining.]
--- Log closed Mon Dec 11 00:00:03 2006
code logs -> 2006 -> Sun, 10 Dec 2006< code.20061209.log - code.20061211.log >