code logs -> 2006 -> Sat, 30 Sep 2006< code.20060929.log - code.20061001.log >
--- Log opened Sat Sep 30 00:00:04 2006
01:39 Mahal is now known as MahalAFK
01:41 ReivZzz is now known as Reiver
01:43 Janus [~Cerulean@Nightstar-10302.columbus.res.rr.com] has joined #Code
01:43
< Janus>
It's so shiny~
01:44
<@ToxicFrog>
Alright. So. You have a list of dynamically allocated objects you need to sort.
01:44
<@ToxicFrog>
If you're storing it as a pointer array, qsort(3) already does what you need.
01:44
<@ToxicFrog>
You just need to write a comparison function.
01:44
< Janus>
Yes! I think I have something down, but it's horribly inefficient.
01:44 * Janus needs to type faster.
01:44
<@ToxicFrog>
Ok. What do you have so far?
01:45
<@ToxicFrog>
Offhand, the three possibilities that spring to mind are pointer-array with qsort; heap; and linked list with custom sort function.
01:47
< Janus>
Well, this is what the actual struct looks like (part 1 of a 3 part epic!) http://rafb.net/paste/results/T0RNvu32.html
01:47
<@ToxicFrog>
So you're storing it as a linked list.
01:47
<@ToxicFrog>
You could have just said :P
01:49
<@McMartin>
Insertion Sort is O(n^2) but is the cheapest to use if you're going to be keeping it sorted all the time.
01:49 * Janus isn't so up on the whole 'termonology' thing.
01:49
<@ToxicFrog>
And is also easy to implement on linked lists.
01:49
<@McMartin>
O(some function) is how fast the price grows.
01:49
<@McMartin>
TF: Well, this is linked lists specifically. Anything other than Insertion or Merge will suck on Linked Lists.
01:50
<@ToxicFrog>
Janus: a linked list is where each element in the list has a reference of some kind (a pointer, since we're talking C) to the next element.
01:50
<@ToxicFrog>
Some variants have pointers to the next and previous elements.
01:50
<@McMartin>
O(n^2) means that a list twice as long will take four times as long to sort.
01:50
<@McMartin>
O(n) means that a list twice as long will take twice as long to do what you need.
01:50
<@McMartin>
Inserting an element into a sorted linked list, or deleting it, is O(n).
01:50
<@ToxicFrog>
The start of the list is really easy to get at, but the further into the list you need to go, the longer it takes since you have to follow all the pointers.
01:51
< Janus>
I always wondered what the 'O(n^x) was about.
01:51
<@ToxicFrog>
It is also very easy to add and remove things from the middle of a linked list, which makes it nice for storing dynamically allocated stuff when you don't know in advance how many you need, or what order they'll be destroyed or created in. This also makes it suitable for insertion-sort.
01:51
<@McMartin>
Turning a randomized list of data into a sorted list is O(n*log n) at best. For certain kinds of data you can make it O(n), but this involves cheating, essentially.
01:52
<@McMartin>
If you've got all the data to hand at the beginning but it's randomized, and you're using linked lists, I believe merge sort is the fastest.
01:52
<@McMartin>
But for just dealing with sorted data, insertion sort is the easiest, and it will *usually* be acceptably fast.
01:53 MahalWork [~Mahal@Nightstar-4219.worldnet.co.nz] has quit [Connection reset by peer]
01:53
<@Vornicus>
insertion and merge sort are essentially the same thing anyway.
01:53
<@Vornicus>
It's just that in the first one, one of your lists is one item long.
01:54 * Vornicus goes home
01:54 Vornicus [~vorn@Nightstar-18307.slkc.qwest.net] has quit [Quit: ]
01:54
< Janus>
Merge Sort? I ended up using something called a 'Quick Sort' where it keeps dividing an array until everything is ordered.
01:55
< Janus>
It sounded quick, hence why I picked it~
01:55
<@McMartin>
Quick sort is quick on arrays. Usually.
01:55
<@ToxicFrog>
qsort is fast when accessing stuff in the middle of the list is O(1).
01:55
<@ToxicFrog>
For example, when using arrays.
01:55
<@ToxicFrog>
With a linked list, access is O(n).
01:55
<@McMartin>
Unless it's, say, sorted backwards, in which case it's even worse than bubble sort.
01:56
<@McMartin>
qsort on a linked list will be O(n^3), yes.
01:56
< Janus>
Eww... I suppose that's out then.
01:56
<@McMartin>
Insertion sort works like so:
01:56
<@McMartin>
(a) A list of zero or one elements is sorted. Yay! We're done!
01:57
<@ToxicFrog>
Yeah. As McM has said, insertion sort has the advantages here of being acceptably fast (as long as you aren't constantly re-sorting the list in different ways), and being very easy to implement on linked lists.
01:57
<@McMartin>
(b) To remove an element from the sorted list, take it out. Yay! We're done!
01:57
<@McMartin>
(c) To insert an element into a sorted list so that it stays sorted, flip through the list until we find something that we need to come before. Then put it before the first such element we find. List still sorted.
01:58
<@McMartin>
(c) (1) If we don't find any such element, we put it at the end.
01:58
< Janus>
I see... if you keep it from getting unsorted, you'll never have to sort it anyway.
01:59
<@McMartin>
Right. As it happens, this means that you're paying the sort cost at "add element" time.
01:59 MahalWork [~Mahal@Nightstar-4219.worldnet.co.nz] has joined #Code
01:59 mode/#code [+o MahalWork] by ChanServ
02:00
<@ToxicFrog>
More informally, it's "to insert an element in the list, scan the list until you find the two elements it goes between and insert it between them"
02:00
<@McMartin>
Also note that if you add the elements in order -- that is, you're sorting smallest to largest, and you insert them in smallest to largest order -- you're paying the maximum possible cost, while if you add them in reverse order, you pay no cost at all.
02:01
<@McMartin>
Or rather, it becomes O(n), which is also the cost of reading the data in in the first place.
02:02
< Janus>
This might be an important factor I forgot to mention, but the object that I'm trying to organize, the member inside it that determines what order the object should have is a y-coordinate variable (for a draw order thing), which would change every frame.
02:03 * Janus oopsies.
02:03
<@ToxicFrog>
...in other words, you're constantly re-sorting the list.
02:04
< Janus>
Yep, That's about it.
02:04
<@McMartin>
Mm, yes
02:04
<@McMartin>
"Don't use linked lists"
02:04
<@McMartin>
Although!
02:04
<@McMartin>
If they're only changing gradually, you might actually be able to get away with bubble sort
02:05
<@McMartin>
That is, if when resorting objects are unlikely to move more than one rank.
02:05
<@McMartin>
If it's whipping around all over, though, you need to use a !linked list.
02:05
<@McMartin>
And may want to consider trading up to C++ so you can use the vector classes.
02:05 * Janus is already using C++.
02:06
<@ToxicFrog>
Or divide things into explicit layers and design it so that there's no overlap within a single layer, a la 2d consoles.
02:06
<@McMartin>
Scene sorting is a bitch. =/
02:06
<@McMartin>
Especially in 3D with a movable camera.
02:06
<@McMartin>
This is one major reason Sable's camera is not movable.
02:06
<@ToxicFrog>
(or at least, so that if there is overlap, it looks ok regardless which object gets drawn first)
02:07
< Janus>
STL, right? I've tried for a solid 5 days to install it, only to have the compiler say "Error, too many messages to display; there must be something horribly wrong with your code, please fix it."
02:07
<@McMartin>
In any event. Laundry calls. I will track down my STL pocket reference after this. I'm *sure* vector<> has some sort routines.
02:07
<@McMartin>
Use a modern version of g++, then, yes.
02:07
<@McMartin>
That way you only get 700 messages instead of 15,000, and they're not written in the ancient lost tongue of the Deep Ones.
02:08 * McMartin Dislikes C++ for various reasons; what templates do to error reports is about 14 of them
02:08
<@ToxicFrog>
STL (n) see Cthulhu Mythos.
02:08
<@McMartin>
That said, STL > writing your own expandable arrays in C that don't leak memory and are contiguously sortable even when they grow, etc.
02:08
<@ToxicFrog>
True.
02:08
<@ToxicFrog>
Which is one of the reasons I no longer use C++ except for kernels~
02:09
<@ToxicFrog>
(and writing extension libraries for Lua)
02:09
< Janus>
Before I try riding that horse again, may I suggest something quickly?
02:09
<@ToxicFrog>
Sure.
02:13
< Janus>
Instead of resorting the list itself, what if I were to have the list cough up an array of the variable in question by running through it once, sort that list out, having a parallel list the same size, but with it's contents being 0 through n being sorted in the same way, and simply use the sorted second list to determine which objects to draw first, second, third, etc.?
02:15
<@McMartin>
Could work; you may run into memory fragmentation problems if you allocate then free a new array every frane, though.
02:15 Ev3 [~Shemhazai@Nightstar-8502.ds1-ba.adsl.cybercity.dk] has joined #Code
02:16
<@McMartin>
You could reuse that second array and only reallocate it as needed. Start with a reasonable number of maximum objects, then reallocate it at twice its former size whenever it runs out.
02:20
< Janus>
That sounds reasonable; the second array is only made of unsigned char (stingy), and there wouldn't be that many objects on a single map anyway.
02:33 Vornicus-Latens [~vorn@67.50.40.ns-3674] has quit [Quit: Leaving]
02:34 Vornicus [~vorn@67.50.40.ns-3674] has joined #code
02:35 mode/#code [+o Vornicus] by ChanServ
02:45 Vornicus [~vorn@67.50.40.ns-3674] has quit [Quit: Leaving]
02:46 Vornicus [~vorn@Admin.Nightstar.Net] has joined #code
02:46 mode/#code [+o Vornicus] by ChanServ
02:52 MahalWork [~Mahal@Nightstar-4219.worldnet.co.nz] has quit [Ping Timeout]
02:54 MahalWork [~Mahal@Nightstar-4219.worldnet.co.nz] has joined #Code
02:54 mode/#code [+o MahalWork] by ChanServ
02:55
< Reiver>
http://blogs.msdn.com/audiofool/archive/2006/09/29/777237.aspx
02:55 Pi [~sysop@Nightstar-6915.hsd1.or.comcast.net] has joined #Code
02:55 mode/#code [+ooo Reiver Syloqs-AFH ThaquiSleep] by Reiver
02:55 * Pi sneaks in under radar.
02:56 mode/#code [+o Pi] by Reiver
02:56 mode/#code [+vvv Ev3 fhtagncaps Janus] by Reiver
02:56
<@Pi>
Gah! A beacon upon me!
02:56
<@Reiver>
Hi Pi!
02:57
<@Reiver>
One day, a couple folks needed a place to discuss coding stuff, and those involved didn't have any commonly shared channels.
02:57
<@Reiver>
Um.
02:57
<@Reiver>
It's sorta grown since. :)
02:58
<@Pi>
Ahh. I see where I went wrong. All this time I had been joining #Cod.
02:58
<@Pi>
I knew something was fishy.
02:58
<@Reiver>
...
02:58
<@Vornicus>
actually it was more along the lines of "Reiver's pal needed help with an ugly ugly algorithm"
02:58 * Reiver giggles.
02:59
<@Reiver>
Vorn: Well, yes. Two folks who didn't share channels.
02:59
<@Reiver>
So I made one. :)
02:59
<@Vornicus>
Which I then rebuilt from the bottom up.
03:00 Raif [~corvusign@Nightstar-7918.hsd1.mn.comcast.net] has joined #Code
03:00 mode/#code [+o Raif] by ChanServ
03:00
<@Pi>
For the record, I embellished a bit on the NSB story, for the purpose of making a good point.
03:01
<@Pi>
You dumbasses didn't need to ruin a good story with the facts. :-P
03:01
<@Vornicus>
Yes, well, we're assholes. I thought you knew that.
03:01 MahalWork [~Mahal@Nightstar-4219.worldnet.co.nz] has quit [Ping Timeout]
03:02
<@Pi>
I'm so proud.
03:04
<@Reiver>
?
03:05 * Reiver plays with his mIRC machinegun script a little more.
03:06 MahalWork [~Mahal@Nightstar-4219.worldnet.co.nz] has joined #Code
03:07 mode/#code [+o MahalWork] by ChanServ
03:11 Janus is now known as Jan[bathipoo]
03:19
<@Reiver>
$#@! clunky scripting languages.
03:19 * Reiver , in a fit of irony, goes back to coding in Java. ¬¬
03:19
<@Vornicus>
...damn, yo
03:19
<@Reiver>
?
03:19
<@Vornicus>
out of the frying pan, into the fire.
03:19
<@McMartin>
Java's not, strictly speaking, a scripting language.
03:20
<@Reiver>
McM: I was more referring to the 'clunky'. ;p
03:20
<@Vornicus>
no, but it's kinda clunky.
03:20 * Reiver pokes at Java's GUI stuff.
03:20
<@Reiver>
What I want.
03:20
<@Reiver>
Is a monthly calendar.
03:21
<@ToxicFrog>
cal(1)
03:21
<@ToxicFrog>
:P
03:21
<@Reiver>
...It's built in?
03:21
<@ToxicFrog>
Nonono. I refer to 'cal', the *nix program for displaying calendars in the tty.
03:21
<@Reiver>
Oh. Heh. Ok.
03:22
<@Reiver>
What I'm wanting is the classic mon tue wed th fri sat sun layout.
03:22
<@Reiver>
With the dates arranged tidily below...
03:23
<@ToxicFrog>
...isn't the classic layout sun mon tue wed thu fri sat?
03:23
<@Reiver>
I think that's an american thing.
03:23
<@ToxicFrog>
Anyways. You wish to do this using Java's GUI toolkit, yes?
03:23
<@Reiver>
Yes.
03:23
<@ToxicFrog>
A leftpondian thing, anyways, since it's like that in Canada too.
03:24
<@Reiver>
Canada, US... other than the canadians have a better accent and a queen on the back of the coins, I don't bother distinguishing~
03:24
<@ToxicFrog>
Anyways. I would like to help, but, um, Java GUI.
03:24 * Reiver nods.
03:24
<@Reiver>
Chthulian horror. :)
03:27
<@ToxicFrog>
As soon as I devote even a single mindcycle to considering it, writing a GUI by hand in SDL starts sounding really tempting.
03:28
<@Reiver>
Well, I'm stuck doing GUI by hand in Swing, so~
03:29
<@Reiver>
(Thank heavens we have Swing. The lecturer showed us the Old Ways of doing it too... *wince*)
03:29 * Vornicus wonders if there are gtk bindings for java.
03:33
<@ToxicFrog>
Reiver: what, like java.awt.brainfoam?
03:33
<@Reiver>
Pretty much, TF!
03:34
<@Reiver>
I think he was doing it as a hint.
03:34
<@Reiver>
AKA: "Yeah, this is horrible. Observe the Old Way, and don't bloody complain."
03:36
<@ToxicFrog>
Bah. "Yeah, this is bad, but it used to be even worse" only holds water if there really is no better alternative.
03:36
<@Reiver>
TF: Or if you're the lecturer.
03:36
<@Reiver>
And trying to get folks to understand how to hand-hack stuff in case it's needed later.
03:36
<@ToxicFrog>
Your lecturer appears to be full of spiders.
03:36
<@Reiver>
(Apparently, it often is, alas.)
03:37
<@Reiver>
He's... I probably shouldn't say this, but he's a classic aryian german in looks.
03:37
<@ToxicFrog>
"Aryan", not "aryian".
03:37
<@Reiver>
You know, the sort that end up in really kinky german sadist porn movies?~
03:38
<@Vornicus>
03:38
<@Reiver>
¬¬
03:38
<@ToxicFrog>
03:38
<@Reiver>
He is teaching us Java.
03:38
<@Reiver>
It makes one wonder, y'know.
03:38
<@Reiver>
:p
03:38
<@Reiver>
Oh, and no course handouts, and our tests involve handcoding java.
03:39
<@Reiver>
Without reference text.
03:39
<@ToxicFrog>
..
03:39
<@Reiver>
Not all of the test, mind.
03:40
<@Reiver>
There's also manually parsing code to determine the output, and "There are ten errors in this code. Mark the faulty lines with an X. For every wrong X, you lose a mark."
03:41
<@Reiver>
With the errors being anything that would throw a compiler, up to and including, uh, including the wrong libraries. Or calling functions from libraries not listed.
03:41
<@Reiver>
Uh. He's evil.
03:41
<@Reiver>
See also: Speculations of sadism. :p
03:48
<@Pi>
static bNotFirstTime;
03:48
<@Pi>
There are three errors in the code above. Put an X on the line containing each one.
03:48
<@Pi>
BTW, for context, later in the function is this code:
03:49
<@Pi>
if (!bNotFirstTime) {bNotFirstTime = TRUE; do_stuff();}
03:50 * Reiver giggles.
03:50
<@Vornicus>
untyped, uninitialized, and uses the word "not"
03:52
<@ToxicFrog>
The last depends on whether you consider "terrible coding practice" a compile error,.
03:52
<@Pi>
Sorry. No credit. You forgot to place the X.
03:53
<@Pi>
ToxicFrog - It compiles perfectly well. I found that line in shipped code.
03:53
<@Pi>
(Vorn did get it right, though)
03:53
<@ToxicFrog>
Then you should have said "three things wrong", because if it compiles, none of those are errors.
03:53 * Raif giggles at pi's post today.
03:54 Jan[bathipoo] is now known as Janus
03:54
<@Pi>
Oh, yes, they are errors. Somebody should be flogged for them, because they're errors. I did not say compile errors.
03:54
<@Pi>
Raif: Which post?
03:54
<@Raif>
audiofool. :)
03:55
<@Pi>
Ah. That actually stemmed from a #buuthandi convo on Tuesday, though the idea had been rolling around in my head for a while.
03:56
<@Pi>
Remember back when we were doing NSB, and Kaz kept lauding the benefits of his EventWhatever class, and the only thing I could fixate on was "Just make sure I can still get to the protocol"? That's the seed.
03:56 Reiver changed the topic of #Code to: Welcome to #Code. It's like Swiss bank accounts, but for NS coders! | Stoatburger! | Discussing your minesweeper playing while your boss is in channel may be a career-limiting move.
03:56
<@Reiver>
(Sorry folks, but the southern hemisphere lost.)
03:56
<@Raif>
Ah, indeed.
03:56 Pi changed the topic of #Code to: Welcome to #Code. It's like Swiss bank accounts, but for NS coders! | Stoatburger! | Discussing your minesweeper playing while your boss is in channel may be a career-limiting move. Many bothans died to bring us this information.
03:56
<@Raif>
That particular point has been recurring with you. :)
03:56
<@Raif>
(and it's a good point)
03:56
<@Pi>
Indeed. It is something about which I feel passionately.
03:58
<@Pi>
When I had my emp review and we talked about my career path, two things came up. 1) My incredible "passion" for technology. 2) I'm probably better qualified for the architect route than the manager route.
03:58
<@Reiver>
Is that a good thing, Pi?
03:58
<@Pi>
1 comes from my extremely vocal bitching about people screwing up the product.
03:58
<@Pi>
2 comes from the fact that people are not safe around me. Neither is technology, but at least it doesn't have feelings.
03:59
<@Reiver>
*snrk*
04:01
<@Pi>
MS career paths: Lead/Manager = in charge of small dev group (4-10 ppl) and responsible for feature area's primary coding. Architect = person responsible for giving feature area long-term direction and working out the hideous bits of the coding; sits under a group mgr, but doesn't actually manage anyone.
04:01
<@Pi>
For people at that career level, there's about an 85/15 split of leads over architects.
04:01
<@Reiver>
Do architects get paid more? >.>
04:02
<@Pi>
No.
04:02
<@Reiver>
There's just less of them. Hm.
04:02
<@Pi>
They just don't have to manage people. Sign me up for that perk.
04:02 * Reiver nods.
04:02
<@Vornicus>
So, uh, Larry Osterman would be an Architect, and Steve Rowe would be a Lead?
04:03
<@Pi>
Indeed.
04:04
<@Pi>
Steve just happens to be *my* lead. There are 11 people on the team.
04:04
<@Vornicus>
I know Steve is your lead. I don't know any others.
04:06
<@Pi>
Question: What is the level of decorum here?
04:06
<@Pi>
I ask because, all things being equal, I tend to spew some pretty vulgar language.
04:07
<@McMartin>
All hostility is at misbehaving software or hardware.
04:07
<@Reiver>
Or occasional lamers/trolls.
04:07
<@Pi>
Okay, that's easy. I treat humans as a special case of software anyway.
04:08
<@Pi>
Perl 4
04:08
<@Pi>
.NET 1.0
04:08
<@Pi>
VB 6
04:08
<@Pi>
!
04:08 * Reiver has Pi shot.
04:08
<@Pi>
(Okay, that's enough vulgarity for now)
04:08
<@Reiver>
:p
04:10
<@Reiver>
As for lamers, the channel is public as it's technically open to anyone interested in code. But I have little patience for those that insist on being annoying lamers and/or getting in the road of an active discussion.
04:11
<@Pi>
I fit right in to that.
04:11 * Reiver nods.
04:12
<@Reiver>
Such folks are not required to be made welcome if they don't get the hint. <g>
04:12
<@Pi>
Don't worry. I won't be in danger of making anyone feel welcome.
04:13
<@Reiver>
You wouldn't be Pi if you did. ;)
04:14
<@Pi>
http://zoo.nightstar.net/viewtopic.php?p=255943#255943
04:16 * Reiver snerks.
04:18
<@Raif>
The correct pronounciation is l4m3rs.
04:18
<@Raif>
or l4m3rz!!! if you're being particularly effusive.
04:18
<@Pi>
I speak english. I don't have the correct mouth parts to pronounce that.
04:18
<@Raif>
Also, who am I, what am I, and why am I here?
04:19
<@Pi>
You're a coder geek whose D&D character is so going to be eaten by a zombie tomorrow.
04:20
<@Vornicus>
mmm, zombie cuisine.
04:20
<@Raif>
Not if the Fireball(!!!) script I installed in Sue's frontal lobe executes properly.
04:20
<@Reiver>
And you're here because you "Keep meaning to join but then forget", so I forcibly arranged matters. ;)
04:20
<@Raif>
At the very least, the one we installed in Rich seems to work. :P
04:20
<@Reiver>
If you'd rather not be, I'll let you be? >.>
04:21
<@Raif>
Well, that's sort of accurate. I would mean to join if I weren't AFK 90% of the time. :P
04:22
<@Reiver>
Hey, idling is fine.
04:22
<@Reiver>
And makes you more likely to be present the 10% of the time you /are/ here, so. :p
04:22
<@Pi>
Bah. You selfish fool, with your "job" and your "life". You need to spend every waking moment or IRC, or you have no worth.
04:27 * Pi idly wonders how long it would take to get banned from the channel if he brought the PiBot in.
04:28
<@McMartin>
Three seconds.
04:28
<@Reiver>
Given I have a distinct dislike of the PiBot... ¬¬
04:28
<@Reiver>
(Or rather, I dislike it in channels I actually pay attention to. It can run free in #Schlock_Mercenary all it wants. :p)
04:29 * Pi points and laughs at Reiver
04:29 * Pi summons a nature elemental to hump McMartin's leg.
04:29 * Reiver has Pi shot.
04:30 * McMartin sets rabbit scripts breeding on Pi's game consoles.
04:30
<@Reiver>
...McMartin wins.
04:30
<@Reiver>
>.>
04:31 * Janus catchs the reference, droping his dignity in the process.
04:32
<@McMartin>
What, rabbit scripts?
04:32 * McMartin *totally* didn't accidentally set one of those loose on one of the campus email machines.
04:33
<@McMartin>
Fortunately, I also caught it in time.
04:33 Janus [~Cerulean@Nightstar-10302.columbus.res.rr.com] has quit [Quit: ~]
04:34
<@Reiver>
>.>
04:34 * McMartin also isn't sure he's using the term right.
04:34
<@McMartin>
"Rabbit scripts" == "forkbombs", right?
04:34
<@McMartin>
Or at least superset of forkbombs?
04:44 * Pi misses the rabbit script reference, but since he only owns an xbox which is remarkably incompatible with everything (including itself), he is probably safe.
04:44
<@Pi>
"Forkbomb" I understand. Nearly got expelled from college for one of those.
04:47 MahalAFK [~Mahal@Nightstar-4219.worldnet.co.nz] has quit [Quit: The computer, she is snoring now.]
04:48 MahalAFK [~Mahal@Nightstar-4219.worldnet.co.nz] has joined #Code
04:51 MahalAFK [~Mahal@Nightstar-4219.worldnet.co.nz] has quit [Quit: It's hard to be mad at someone who misses you while you're asleep. ]
04:51 Reiver is now known as ReivBRB
04:55 Mahal [~Mahal@Nightstar-4219.worldnet.co.nz] has joined #Code
04:55 mode/#code [+o Mahal] by ChanServ
05:02
<@Vornicus>
...dammit
05:02
<@Vornicus>
freaking floating point numbers.
05:04 MahalWork [~Mahal@Nightstar-4219.worldnet.co.nz] has quit [Connection reset by peer]
05:11 MahalWork [~Mahal@Nightstar-4219.worldnet.co.nz] has joined #Code
05:11 mode/#code [+o MahalWork] by ChanServ
05:15 MahalWork [~Mahal@Nightstar-4219.worldnet.co.nz] has quit [Connection reset by peer]
05:16 Mahal [~Mahal@Nightstar-4219.worldnet.co.nz] has quit [Quit: The computer, she is snoring now.]
05:17 Mahal [~Mahal@Nightstar-4219.worldnet.co.nz] has joined #Code
05:17 mode/#code [+o Mahal] by ChanServ
05:20 Mahal [~Mahal@Nightstar-4219.worldnet.co.nz] has quit [Quit: It's hard to be mad at someone who misses you while you're asleep. ]
05:23 MahalWork [~Mahal@Nightstar-4219.worldnet.co.nz] has joined #Code
05:23 mode/#code [+o MahalWork] by ChanServ
05:26 ReivBRB is now known as Reiver
05:39 Mahal [~Mahal@Nightstar-4219.worldnet.co.nz] has joined #Code
05:39 mode/#code [+o Mahal] by ChanServ
05:50 Syloqs-AFH [Coder@NetAdmin.Nightstar.Net] has quit [Connection reset by peer]
05:55 EvilGoneLord is now known as Jo}{n
07:22 Mahal is now known as MahalCook
07:24 MahalCook [~Mahal@Nightstar-4219.worldnet.co.nz] has quit [Quit: The computer, she is snoring now.]
07:53 Vornicus [~vorn@Admin.Nightstar.Net] has quit [Ping Timeout]
08:02 NSGuest-195 [~vorn@67.50.40.ns-3674] has joined #code
08:09 NSGuest-195 is now known as Vornicus
08:22 You're now known as TheWatcher[swim]
09:12 Chalcedon [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code
09:12 mode/#code [+o Chalcedon] by ChanServ
09:14 Vornicus is now known as Vornicus-Latens
09:56 Chalcedon is now known as ChalcyZzz
09:58 MahalCook [~Mahal@Nightstar-4219.worldnet.co.nz] has joined #Code
09:58 MahalCook is now known as Mahal
09:59 mode/#code [+o Mahal] by ChanServ
10:16 Raif [~corvusign@Nightstar-7918.hsd1.mn.comcast.net] has quit [Killed (NickServ (GHOST command used by Raif_))]
10:16 Raif_ [~corvusign@Nightstar-7918.hsd1.mn.comcast.net] has joined #Code
10:16 Raif_ is now known as Raif
10:17 Ev3 [~Shemhazai@Nightstar-8502.ds1-ba.adsl.cybercity.dk] has quit [Connection reset by peer]
10:20 Ev3 [~Shemhazai@Nightstar-8502.ds1-ba.adsl.cybercity.dk] has joined #Code
10:52 Mahal is now known as MahalZzz
10:59 You're now known as TheWatcher
11:04
<@jerith>
Any JavaScript gurus here, perchance?
11:04
<@jerith>
I
11:04
<@jerith>
I'm writing a greasemonkey script and I'm not really all that sure how to navigate a DOM.
11:16 * Reiver knows Java, but not JavaScript - and is certainly no Guru. >.>
11:20
<@jerith>
Likewise. :-/
11:21
<@jerith>
I have a book here, but deadtree is a little tricky to grep.
11:24 * Reiver huggles.
11:26
<@jerith>
I think I have a way to do it, but the HTML is not very friendly. :-/
11:26
<@Reiver>
:(
11:28
<@jerith>
Hah! I have found an unambiguous way to the top-level element I need!
11:28
<@jerith>
caedes.net, if anyone's interested.
11:28
<@jerith>
What I'm trying to do is add a link to the appropriately sized image from each of the thumbnails.
11:29
<@jerith>
So I can download directly instead of going through their preview thingy which is bloody annoying.
11:34
< Ev3>
HTML is your friend.
11:34
< Ev3>
Like BonziBuddy.
11:35 * jerith tosses Ev3 into a vat of VB programmers.
11:35
< Ev3>
I can code VB!
11:35
< Ev3>
And VB.net.
11:35
< Ev3>
Or, rather.. could.
11:36
<@jerith>
VB (pre .NET) is so incredibly horrible it hurts just to remember it.
11:36
<@jerith>
I've been told .NET is slightly better, but I have no desire to find out.
11:40
<@Reiver>
VB.NET is actually usable, or so I'm told.
11:41
<@jerith>
I've heard that too.
11:41
<@jerith>
But I've also heard that it's basically C# with VB-style syntax.
11:43
<@jerith>
So you gain absolutely nothing by using it.
11:45
< Ev3>
Jerith .net is worse.
11:45
< Ev3>
Yes, but it's fuckd. Seriously.
11:45
< Ev3>
I'm a sharepoint module programmer and I can tell you I've seen better coding from people who're trying to make their first HTML site.
11:46
<@jerith>
:-(
11:46
<@TheWatcher>
I suspect this is the same problem that I've encountered with Java. They market it as a language that you don't need training to use, and too many people believe it and learn just enough to be dangerous
11:46
< Ev3>
The only real difference is that these guys are being paid, and their code usually works in some form or fashion.
11:47
<@jerith>
For some reason, my university taught VB to EE students for a semester. And then I had to unteach all the bad habits and teach them good ones the next semester.
11:47
<@Reiver>
Heh.
11:47
<@Reiver>
I know a decent VB coder...
11:47
< Ev3>
TheWatcher, actually I attribute it to .net's ability to handle multiple languages in the same function. They have pages, for example who is written in part vb.net, part PHP and part XML.
11:47
<@Reiver>
Well, .NET
11:47
< Ev3>
The other part of it is that there are too many coders.
11:48
<@Reiver>
But then, he's been coding since, err, COBOL.
11:48
<@Reiver>
He just uses .NET because people keep giving him things written 'in the feild' - Access and Excel plugins, mostly - and they all use VB >.<
11:48
<@Reiver>
'cuz it's the built in macro language.
11:48
<@Reiver>
>.>
11:50
<@jerith>
Nonononono, VBA != VB.
11:51
<@Reiver>
Yes, but he has to deal with one so often that he gets stuck using the other anyway.
11:52 * jerith nods.
11:52
<@jerith>
But there are lots of subtle (and some not-so-subtle) differences.
11:54
<@jerith>
And the languages are similar enough that they're hard to remember. :-/
11:58
<@Reiver>
True, this.
12:08
<@jerith>
I thought JS had a "for item in list" construct, but I was apparently mistaken. :-/
12:13
<@jerith>
Umm, why does this emacs JS mode want to indent three spaces?
12:14
<@Reiver>
That's only new to Java itself. >.>
12:14
<@Reiver>
Dunno.
12:18 ThaquiSleep is now known as Thaqui
12:28 You're now known as TheWatcher[afk]
13:07 Reiver [~reaverta@IRCop.Nightstar.Net] has quit [Ping Timeout]
13:08 Thaqui is now known as ThaquiSleep
13:09 Reiver [~reaverta@IRCop.Nightstar.Net] has joined #Code
13:09 mode/#code [+o Reiver] by ChanServ
14:03 ChalcyZzz [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has quit [Ping Timeout]
14:46 You're now known as TheWatcher
15:49 Jo}{n is now known as EvilDarkLord
17:24 You're now known as TheWatcher[afk]
18:10 Reiver is now known as ReivZzz
18:13 Syloq [Syloq@NetAdmin.Nightstar.Net] has joined #code
18:17 Janus [~Cerulean@Nightstar-10302.columbus.res.rr.com] has joined #code
18:22 ThaquiSleep [~Thaqui@Nightstar-8486.adsl.xtra.co.nz] has quit [Ping Timeout]
18:39 You're now known as TheWatcher
18:56 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 Clair voire.]
19:10 Syloq is now known as Syloqs-AFH
19:26 Thaqui [~Thaqui@Nightstar-8486.adsl.xtra.co.nz] has joined #code
20:55 Janus [~Cerulean@Nightstar-10302.columbus.res.rr.com] has joined #code
21:07 MahalZzz is now known as Mahal
21:22 Thaqui is now known as ThaquiWork
21:38 Raif [~corvusign@Nightstar-7918.hsd1.mn.comcast.net] has quit [Ping Timeout]
21:40 Syloqs-AFH [Syloq@NetAdmin.Nightstar.Net] has quit [Ping Timeout]
21:42 takyoji [~caleblang@Nightstar-25427.dhcp.roch.mn.charter.com] has joined #code
21:42
< takyoji>
What command in php is used to continue it to execute a script even though if an error occured?
21:43 Clairvoire [~Cerulean@Nightstar-10302.columbus.res.rr.com] has joined #code
21:43 Janus [~Cerulean@Nightstar-10302.columbus.res.rr.com] has quit [Operation timed out]
21:43 Syloq [Syloq@NetAdmin.Nightstar.Net] has joined #code
21:44
< takyoji>
anyone know?
21:44 Syloq is now known as Syloqs-AFH
21:47 Clairvoire is now known as Janus
21:48 * Mahal ers
21:48
< takyoji>
Fatal error: Call to undefined function: date_default_timezone_set() in /home/u4/jacobl/html/form-scripts/consultation.php on line 3
21:48
< takyoji>
and on line 3:
21:48
< takyoji>
date_default_timezone_set('America/Winnipeg');
21:49
<@Mahal>
Obvious question: that's a correct format for the thing, yes
21:49
< takyoji>
I've had it set to 'US/Central' before and it worked, but now it no longer works
21:49
<@Mahal>
Right.
21:49
<@Mahal>
So America/Winnipeg must be the issue?
21:50
< takyoji>
no no, I mean, orinigally, US/Central worked, but month later (now) it doesn't work
21:50
<@Mahal>
Oh.
21:50
<@Mahal>
Right.
21:50
<@Mahal>
You've not upgraded anyting on the server in the meantime?
21:51
< takyoji>
I had it completely functional a couple months ago, didn't edit it at all after that, tried the sript just recently and it won't work
21:51 * Mahal nod
21:51
< Vornicus-Latens>
"undefined function" means that you're missing a library.
21:52
< takyoji>
and the solution is?
21:54
< takyoji>
that apparently the computer that's running the server doesn't have the time set?
21:55 Chalcedon [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code
21:55 mode/#code [+o Chalcedon] by ChanServ
21:57 * takyoji smashes head through moniter
21:58
< Vornicus-Latens>
the solution is to figure out the name of the library that includes "date_default_timezone_set" and include it.
21:58
< takyoji>
oh ok
22:08
< takyoji>
ugh, it was because of the php version
22:08
< takyoji>
it needed to be version 5
22:08
< takyoji>
now it works
22:15 Janus [~Cerulean@Nightstar-10302.columbus.res.rr.com] has quit [Quit: ~]
22:16 McMartin is now known as McMartin[adventures]
22:31 Chalcedon is now known as ChalcyGone
22:37 takyoji [~caleblang@Nightstar-25427.dhcp.roch.mn.charter.com] has quit [Quit: ]
22:47 Mahal is now known as MahalAFK
23:37 You're now known as TheWatcher[T-2]
23:40 You're now known as TheWatcher[zZzZ]
23:52 Chalcy [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code
23:52 mode/#code [+o Chalcy] by ChanServ
23:53 ChalcyGone [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has quit [Ping Timeout]
23:58 Chalc [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code
23:59 Chalcy [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has quit [Ping Timeout]
--- Log closed Sun Oct 01 00:00:04 2006
code logs -> 2006 -> Sat, 30 Sep 2006< code.20060929.log - code.20061001.log >