code logs -> 2007 -> Thu, 08 Mar 2007< code.20070307.log - code.20070309.log >
--- Log opened Thu Mar 08 00:00:51 2007
00:30 Derakon [~Derakon@Nightstar-12737.sea2.cablespeed.com] has joined #code
00:32 * Derakon makes available to Lua a C function that accepts an arbitrary number of arguments.
00:32 Thaqui [~Thaqui@Nightstar-25354.jetstream.xtra.co.nz] has quit [Quit: This computer has gone to sleep]
00:33 Reiver is now known as ReivOut
00:37
<@ToxicFrog>
That is a pain in the ass to do, depending on what the arguments are.
00:38
< Derakon>
Object type, number of animations, animation name 1, animation path 1, animation name 2, animation path 2, etc., animation name N, animation path N.
00:38 * ToxicFrog nods
00:38
< Derakon>
The "number of animations" is ugly, I'll grant.
00:38
<@ToxicFrog>
Yeah, you shouldn't need that.
00:38
<@ToxicFrog>
Use lua_gettop() to determine the number of arguments passed in.
00:38
< Derakon>
...duh.
00:40
<@ToxicFrog>
(the one I was binding was linking a varargs function into Lua, at which point the problem isn't so much getting the arguments out of lua as getting them into the varargs function)
00:41
< Derakon>
Right now I'm basically just writing functions that do "load a bunch of assets for me, plzkthx".
00:43
< Derakon>
Incidentally, I'm using ftw again to make loading images not suck.
00:44 MahalSLEEP is now known as Mahal
00:45
< Derakon>
Hrm...actually, that's kinda tricky.
00:45
< Derakon>
I want to load all the images in a user-specified directory, and then assemble them into a vector.
00:46
< Derakon>
I'm trying to figure out how to assemble a vector using ftw without abusing globals.
00:46
<@Vornicus>
Also, TF, another minor refinement to your centered text code, you shouldn't add 1.
00:47
< MyCatVerbs>
Vornicus: ahhh, security limitations. How do Java IRC clients get around that, please?
00:47
<@Vornicus>
Nightstar's java IRC is hosted on Deepthought.
00:48
< MyCatVerbs>
Oh, sorry, I think I misparsed what you said.
00:48
<@Vornicus>
?
00:48
< MyCatVerbs>
So you're limited to sockets with the machine that the .class file is hosted on, right?
00:48
<@Vornicus>
Well, the .class ifle or .jar or whatever it's sent as.
00:49
< MyCatVerbs>
I misparsed it as limited to sockets to the machine the .class file was downloaded to - effectively, localhost sockets only. Oops.
00:55 Derakon is now known as Derakon[AFK]
01:00 gnolam [Lenin@Nightstar-13557.8.5.253.se.wasadata.net] has quit [Quit: Z?]
01:06
<@ToxicFrog>
I believe you can also have it connect to other things -if- the user gives it permission.
01:06
<@ToxicFrog>
The mechanism for doing which is probably browser-specific.
01:07
<@ToxicFrog>
IIRC Opera asks, I think Firefox does as well.
01:16 Derakon[AFK] is now known as Derakon
01:16
< Derakon>
Any thoughts on my problem above, TF?
01:30
<@ToxicFrog>
How do you mean "assemble a vector"?
01:30
<@ToxicFrog>
"perform some operation on a data structure, modified by the contents of the file being loaded"?
01:30
< Derakon>
I mean that I want to do "For each file, IMG_Load(file), insert resultant SDL_Surface* into vector" and then have the vector at the end.
01:30
< Derakon>
(vector == list)
01:32
<@ToxicFrog>
Yeah, the only way I've come up with of doing this is to bind ftw to a language with function closures, such as lua, and use that binding.
01:32
< Derakon>
Ergh...no thanks. ¬.¬
01:32
<@ToxicFrog>
Since C doesn't have function closures, so you have to fall back on void * userdata, but ftw doesn't have that either.
01:33
<@Vornicus>
"ftw"?
01:35
<@ToxicFrog>
ftw(3), File Tree Walk.
01:35
<@ToxicFrog>
ftw(path, function) is the C equivalent of bash's find path -print0 | xargs -0 function
01:35
<@ToxicFrog>
xargs -0n1 function, rather.
01:36
< Derakon>
I.e. perform some function on each file under some path.
03:03
<@ToxicFrog>
Aha, I have a new and awesome ctor convention.
03:04
<@ToxicFrog>
function foo:__new(init)
03:04
<@ToxicFrog>
for key,value in pairs(init) do
03:04
<@ToxicFrog>
if self[key] == false then
03:04
<@ToxicFrog>
self[key] = value
03:04
<@ToxicFrog>
end
03:04
<@ToxicFrog>
end
03:04
<@ToxicFrog>
-- rest of ctor goes here
03:04
<@ToxicFrog>
end
03:04
< Derakon>
Er, what is ctor?
03:04
<@ToxicFrog>
Constructor.
03:04
< Derakon>
Ahh.
03:05
< Derakon>
So this is what amounts to a copy constructor?
03:05
<@ToxicFrog>
You can use it as such, actually!
03:06
<@ToxicFrog>
obj = foo:New(anotherobj) will copy from obj everything marked as initializeable (that is to say, false) in the prototype.
03:06
<@ToxicFrog>
However, I'm thinking of things more like:
03:06
<@ToxicFrog>
obj = Symbol:New { text="!", width=4, type=Symbol.nonbreaking }
03:07
<@ToxicFrog>
No need to worry about what order the constructor args go in, no rummaging through the docs to find the ctor signature when you're looking at a ctor someone else has written...
03:07
< Derakon>
So essentially, you get to name your arguments to the constructor.
03:07
< Derakon>
Right.
03:07
<@ToxicFrog>
Yes.
03:07
<@ToxicFrog>
Why didn't I think of this before?
03:07 * Derakon snerks.
03:40 Mahal is now known as MahalWork
03:42
<@ToxicFrog>
Hmm.
03:42
<@ToxicFrog>
My DNS is fux0red.
03:44
<@ToxicFrog>
Aah, no it's not, Leela's resolver is.
04:30 Serah [~Z@Nightstar-28403.proxy2.balk.dk] has quit [Quit: * Serah explodes.]
04:41
<@ToxicFrog>
Woot woot, my IRC bot framework is working.
04:41
<@ToxicFrog>
Not *completely* working - I still need to implement, among other things, better handling of source prefixes and automatic channel population lists - but working well enough.
04:41
<@ToxicFrog>
Apart from the cmdcons, which is going to be a total bastard.
04:42
< Derakon>
What's special about your bot?
04:43 ReivOut is now known as Reiver
04:44
<@ToxicFrog>
There has to be something special about it?
04:44
< Derakon>
I figured there *would* be something special about it. *shrug*
04:45
<@ToxicFrog>
It's a little lua library that makes it easy to build stand-alone IRC bots in Lua, using a callback style a la xchat.
04:45
< Derakon>
Sounds like it could easily be adapted to provide IRC chat in a program that already uses Lua.
04:46
<@ToxicFrog>
Hmm. Perhaps, perhaps not.
04:46
<@ToxicFrog>
It uses an eventloop style.
04:46
<@ToxicFrog>
You set up all your server handles and callbacks and stuff and then call irc.mainloop()
04:46
< Derakon>
Ahh.
04:46
<@ToxicFrog>
Which runs until you explicitly exit it.
04:47 Forj [~Forj@Nightstar-869.bitstream.orcon.net.nz] has joined #code
04:47
< Derakon>
You could probably adapt that to a polling system instead without too much trouble, though.
04:47
<@ToxicFrog>
I'd prefer a PumpEvents() style, but yes.
04:47
<@ToxicFrog>
The problem is that is that if you stop polling, the server ping-timeouts you.
04:47
< Derakon>
RIGHT.
04:47
< Derakon>
Er, sorry. Playing EV here.
04:48
<@ToxicFrog>
However, it should adapt well to usage with libsurtr.
04:48 timelady [~romana@Nightstar-9473.lns10.adl2.internode.on.net] has joined #Code
04:48
<@ToxicFrog>
A few extra lines of code in the event loop and it will listen to events from other threads; or you can use the cmdcons, once I finish it.
04:49
< Derakon>
My program is, um, not thread-safe.
04:49
<@ToxicFrog>
At which point, for IRC support in your program, you just surtr.create() an appropriate thread.
04:49 * ToxicFrog blinkblinks
04:49
<@ToxicFrog>
How so?
04:49
< Derakon>
Well, maybe it is once you're done loading assets, which can be done easily enough in one thread.
04:50
< Derakon>
I ended up going with the global-variable method of creating a vector of loaded graphics. :\
04:50
<@ToxicFrog>
(I note that due to the nature of libsurt, it is impossible to make thread-unsafe Lua code; any unsafeness comes from calling into unsafe C bindings from multiple threads.)
04:50
< MyCatVerbs>
ToxicFrog: nahhhhh.
04:51
< MyCatVerbs>
ToxicFrog: you could write a Lua emulator for an SMP machine and have un-thread-safe code inside of that =D
04:51
<@ToxicFrog>
...yes, but then it's not the Lua code that's not threadsafe, is it?
04:52
<@ToxicFrog>
And the worst you'll do is screw the emulator state; you won't damage the actual program.
04:52
< MyCatVerbs>
Touché.
04:53
<@ToxicFrog>
Well, actually. Not entirely true.
04:53
<@ToxicFrog>
It is possible, with some work, to create a deadlock.
04:56
<@ToxicFrog>
Typically by having a poorly thought out thread heirarchy that results in two threads send()ing to each other at the same time.
05:01
<@ToxicFrog>
(this can be fixed by clearly defining which of your threads are the proletariat and which are the bourgeoise)
05:03
<@ToxicFrog>
Hmm.
05:03
<@ToxicFrog>
SSL bindings for Lua would be handy here.
05:06
<@ToxicFrog>
Hmm. Ok, I take it back.
05:09 MyCatVerbs is now known as MyCatNaps
05:14 Serah [~Z@87.72.36.ns-26407] has joined #Code
05:21 timelady [~romana@Nightstar-9473.lns10.adl2.internode.on.net] has quit [Quit: kids home]
05:27 Reiver is now known as ReivOut
05:53 gnolam [Lenin@Nightstar-13557.8.5.253.se.wasadata.net] has joined #Code
06:01 SupineSoldier is now known as GeekSoldier
06:13 MahalWork [~Mahal@Nightstar-4998.worldnet.co.nz] has quit [Ping Timeout]
06:20 Mahal [~Mahal@Nightstar-4998.worldnet.co.nz] has joined #Code
06:20 mode/#code [+o Mahal] by ChanServ
06:23 ReivOut is now known as Reiver
06:31 Forjeh [~Forj@Nightstar-869.bitstream.orcon.net.nz] has joined #code
06:33 Forj [~Forj@Nightstar-869.bitstream.orcon.net.nz] has quit [Ping Timeout]
07:11 Vornicus is now known as Vornicus-Latens
07:31 * Derakon idly wonders why merely referencing an instantiated variable is cause for a bus error.
07:39 Derakon is now known as Derakon[AFK]
07:44 GeekSoldier [Rob@Nightstar-3728.pools.arcor-ip.net] has quit [Ping Timeout]
07:53 GeekSoldier [Rob@Nightstar-4301.pools.arcor-ip.net] has joined #code
08:21 You're now known as TheWatcher
08:41 Forjeh [~Forj@Nightstar-869.bitstream.orcon.net.nz] has quit [Connection reset by peer]
09:02 Chalcy [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code
09:02 mode/#code [+o Chalcy] by ChanServ
09:03 Chalcedon [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has quit [Ping Timeout]
09:11 Derakon[AFK] [~Derakon@Nightstar-12737.sea2.cablespeed.com] has quit [Connection reset by peer]
09:13 Thaqui [~Thaqui@Nightstar-25354.jetstream.xtra.co.nz] has joined #code
09:25 Chalcy [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has quit [Quit: ]
11:21 Thaqui [~Thaqui@Nightstar-25354.jetstream.xtra.co.nz] has left #code [Leaving]
12:04 Reiver [~reiver@IRCop.Nightstar.Net] has quit [Ping Timeout]
13:01 Reiver [~reiver@Nightstar-29730.ubs-dsl.xnet.co.nz] has joined #Code
13:01 mode/#code [+o Reiver] by ChanServ
13:04 Reiver is now known as ReivZzz
14:00 Vornicus-Latens is now known as Vornicus
14:18 Guest17789 [~edribaspa@Nightstar-815.cpe.netmadeira.com] has joined #Code
14:19 Guest17789 [~edribaspa@Nightstar-815.cpe.netmadeira.com] has left #Code []
15:40
<@ToxicFrog>
Hmm.
15:40 * ToxicFrog ponders the hook API.
15:40
<@ToxicFrog>
This needs changing, I think.
15:40
<@ToxicFrog>
Hooks should be added to the end by default, with a means of adding them to the beginning
15:41
<@ToxicFrog>
Also, after falling off the end of the chain it should be configurable to have it fall through to the raw-line hook chain rather than returning.
15:41 * Serah dances with ToxicFrog.
15:56
<@Vornicus>
Why does make suck so hard? you'd think this would be easier.
16:00
<@Vornicus>
(so you know - \ does not make a line continue in make, and functions can't cross lines)
16:01
<@ToxicFrog>
(\ does make a line continue, at least in variable declarations)
16:01
<@ToxicFrog>
SRCS=\
16:01
<@ToxicFrog>
util.lua \
16:01
<@ToxicFrog>
Prototype.lua \
16:01
<@ToxicFrog>
Object.lua \
16:01
<@ToxicFrog>
(...)
16:01
<@ToxicFrog>
luairc.lua: $(SRCS)
16:02
<@Vornicus>
Doesn't work with make.
16:02
<@Vornicus>
with functions
16:02
<@Vornicus>
rather
16:02
<@ToxicFrog>
Lovely.
16:02
<@Vornicus>
$(foreach SCALEFACTOR, $(SCALEFACTORS), \
16:02
<@Vornicus>
is line 10.
16:02
<@Vornicus>
Makefile:10: *** unterminated call to function `foreach': missing `)'. Stop. <--- is the error.
16:03
<@ToxicFrog>
Hmm.
16:03
<@ToxicFrog>
I bet you could write a "make makefile" target that regenerates the rules with a bash script, then.
16:03
<@ToxicFrog>
Although this shouldn't be necessary.
16:03 * ToxicFrog thwaps Make
16:04
<@Vornicus>
It's crap. On the other hand, I am trying out rake, because the rest of this thing is in Ruby on Rails, and it uses rake.
16:04
<@ToxicFrog>
The problem is make is that it's crap, but all the alternatives are not only also crap, but less portable.
16:05
< Serah>
^_^
16:06 ReivZzz [~reiver@Nightstar-29730.ubs-dsl.xnet.co.nz] has quit [Ping Timeout]
16:06
<@ToxicFrog>
Perhaps I should write Lake.
16:06 * ToxicFrog dances with Serah
16:07 * Serah dances with ToxicFrog.
16:07
< Serah>
CAKE!
16:20 Mahal is now known as MahalBedd
16:20
<@Vornicus>
Lake?
16:20
<@Vornicus>
Lua Make?
16:20 Serah [~Z@87.72.36.ns-26407] has quit [Connection reset by peer]
16:21 Serah [~Z@87.72.36.ns-26407] has joined #Code
16:23 Netsplit DeepThought.NY.US.Nightstar.Net <-> Blargh.CA.US.Nightstar.Net quits: gnolam, MyCatNaps
16:36 MyCatNaps [~mycatownz@Nightstar-379.dsl.in-addr.zen.co.uk] has joined #Code
16:36 gnolam [Lenin@Nightstar-13557.8.5.253.se.wasadata.net] has joined #Code
16:36 AnnoDomini [~farkoff@Nightstar-29514.neoplus.adsl.tpnet.pl] has quit [Killed (NickServ (GHOST command used by AbuDhabi))]
16:36 AnnoDomini [~farkoff@Nightstar-29039.neoplus.adsl.tpnet.pl] has joined #Code
16:42
<@ToxicFrog>
Vornicus: yes.
16:45 gnolam [Lenin@Nightstar-13557.8.5.253.se.wasadata.net] has quit [Ping Timeout]
16:45 gnolam [Lenin@Nightstar-13557.8.5.253.se.wasadata.net] has joined #Code
16:47 * Vornicus wishes there were a real, decent make remake.
16:50 Netsplit DeepThought.NY.US.Nightstar.Net <-> Blargh.CA.US.Nightstar.Net quits: MyCatNaps
16:51
< gnolam>
Alas, no such luck.
16:51 Netsplit over, joins: MyCatNaps
17:07 Syloq is now known as Syloqs-AFH
17:15 You're now known as TheWatcher[afk]
17:33 Forj [~Forj@Nightstar-869.bitstream.orcon.net.nz] has joined #code
17:53 Forj [~Forj@Nightstar-869.bitstream.orcon.net.nz] has quit [Quit: Gone]
18:05 MyCatNaps is now known as MyCatVerbs
18:40 You're now known as TheWatcher
19:29 Chalcedon [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code
19:29 mode/#code [+o Chalcedon] by ChanServ
20:07 Thaqui [~Thaqui@Nightstar-25354.jetstream.xtra.co.nz] has joined #code
20:22 Doctor_Nick [~fdsaf@Nightstar-1992.9-67.se.res.rr.com] has joined #code
20:23
< Doctor_Nick>
man, is it just me, or are some software developers entirely humorless about the languages and software they use
20:23
<@Vornicus>
it's not just you.
20:23
< GeekSoldier>
explain, please?
20:24
< Doctor_Nick>
I made a passing reference about Turbo Debugger not running well on my machine and this guy read me the riot act, explaining how good and fast it was
20:24
< MyCatVerbs>
That's just a symptomn.
20:24 MyCatVerbs [~mycatownz@Nightstar-379.dsl.in-addr.zen.co.uk] has quit [Quit: Reconnecting]
20:24
< Doctor_Nick>
what?
20:24
< GeekSoldier>
some people...
20:25 gnolam [Lenin@Nightstar-13557.8.5.253.se.wasadata.net] has quit [Ping Timeout]
20:25 MyCatVerbs [~mycatownz@Nightstar-379.dsl.in-addr.zen.co.uk] has joined #code
20:29
< MyCatVerbs>
Doctor_Nick: that's not a problem.
20:29
< MyCatVerbs>
Doctor_Nick: that's a symptomn. The problem is an outright lack of any sense of humour whatsoever. I reccommend such people for swift deletion.
20:29 gnolam [Lenin@Nightstar-13557.8.5.253.se.wasadata.net] has joined #Code
20:30
< Doctor_Nick>
MyCatVerbs: i mean, they have decent senses of humor otherwise, but just not about coding and such
20:35
< MyCatVerbs>
This might sound crazy-paranoid, but I'm having trouble believing you on that count.
20:36
< MyCatVerbs>
Unless they're completely shite coders, in which case I could see that they might be unable to get any of the jokes... :/
20:36 Janus [~Cerulean@Nightstar-10302.columbus.res.rr.com] has joined #Code
20:38
<@Chalcedon>
I believe that. It sounds very similar to how most mothers are about their children.
20:39
< Janus>
Hungry?
20:40
<@Vornicus>
pfff
20:41
<@Chalcedon>
pff Vorn?
20:43
<@Vornicus>
laughing at Janus' response.
20:44
<@Chalcedon>
me sees the light
20:44
< Doctor_Nick>
man, these pain killers are making me woozy
20:44 * Vornicus gives Chalcy stoat stew.
20:44
<@Chalcedon>
Janus: no, completely unable to comprehend that they /might/ not be perfect.
20:44 * Chalcedon nrom stoat stew, give Vornicus cookies and meringues
20:45
< Janus>
Oh, human mothers specifically.
20:47
< Doctor_Nick>
what
20:48
<@Chalcedon>
what're you what-ing about Doctor_Nick?
20:48
< Doctor_Nick>
anyway
20:48
< Doctor_Nick>
monitors
20:48
< Doctor_Nick>
what would be your ideal display setup
20:49
< Doctor_Nick>
im getting a new computer soon and i need ideas for what monitor(s) i should get
20:49
< GeekSoldier>
price range?
20:49 * Chalcedon flee
20:49 Chalcedon is now known as ChalcyShopping
20:50
< Doctor_Nick>
GeekSoldier: like, 6-700 dollars
20:51
< Doctor_Nick>
im thinking dual monitors but im wondering if i should get widescreen or not
20:52 shark08 [~whiteface@85.103.124.ns-3473] has joined #code
20:52 shark08 [~whiteface@85.103.124.ns-3473] has left #code []
20:53
<@ChalcyShopping>
having observed dual monitors, I think widescreen would simply add to the confusion
20:53
< Doctor_Nick>
how's that?
20:54
< Doctor_Nick>
too much horizontal viewspace?
20:55
<@ChalcyShopping>
basically yes. One generally only has so much room to move one's mouse in. By the time you've got effectively 3-4 screen's width there getting from one to the other is going to be a pain.
20:56
<@ChalcyShopping>
it will also have the potential to distort what you're viewing at that level.
20:56
< Doctor_Nick>
hmm
20:56
<@ChalcyShopping>
Having said that, I've never seen it set up and I could be totally wrong.
20:56
<@ChalcyShopping>
but based on what I have seen, that's what I'd expect.
20:57
<@ChalcyShopping>
any how, I really need to get moving now.
20:57 ChalcyShopping is now known as ChalcyGone
20:57
< Doctor_Nick>
one foot after the other!
20:58 * Vornicus wants a Jeopardy screen.
21:00
< Doctor_Nick>
what would you use it for?
21:02
< GeekSoldier>
Questioning answers.
21:04
< MyCatVerbs>
Remove all the screws and bolts in it.
21:04
< MyCatVerbs>
Stick a pneumatic bomb behind it (deliberately aiming for low yield here).
21:05
< MyCatVerbs>
Wait 'till a starfish walks past, then set the bomb off, causing the screen to fall off the wall and land on their head.
21:05
< MyCatVerbs>
???
21:05
< MyCatVerbs>
PROFIT!
21:05
<@Vornicus>
Half-Life.
21:05
< GeekSoldier>
It all makes sense now.
21:06
< GeekSoldier>
Ooh.
21:06
< Doctor_Nick>
Vornicus: Wouldn't a giant LED screen be better for that?
21:06
< GeekSoldier>
That would be nice, nonetheless.
21:07
< MyCatVerbs>
Vornicus: ...that would be fifteen different categories of awesome, glued together.
21:08
<@Vornicus>
Though at that size a laser projector would work nicely too.
21:08
< MyCatVerbs>
Better still, play Canned Tuna deathmatch on it with some truly fuck-off monstrous subwoofers installed. Everytime someone drops a mortar shell on you, you will *know*. Hehehhee.
21:09
<@Vornicus>
yeah, rumble seat.
21:14
< MyCatVerbs>
Set two of those up, one for you and one for your opponent (one-on-one deathmatch is the most honorable way, right? ^^).
21:14
< MyCatVerbs>
Make sure that the speaker systems have a few subtle electronic differences.
21:16
< MyCatVerbs>
For example, make sure that your opponent's subwoofers have a strong harmonic at the brown note and that their amplifiers have an *entirely* unexplained gain spike around it.
21:16
< Doctor_Nick>
what
21:16
< Doctor_Nick>
i dont think that actually exists
21:17 * MyCatVerbs pokes Mythbusters.
21:17
< GeekSoldier>
hehe.
21:17
< GeekSoldier>
brown note.
21:17
< GeekSoldier>
ask Nikola Tesla and Mark Twain about that one.
21:17
< Janus>
Notes at that frequency do have certain biological effects on the body, though poopy is one of the more extreme and rare reactions.
21:20
< Janus>
Then again, old folks do that to pretty much anything besides Sunny 95.
21:23
< MyCatVerbs>
Anyway. Even if we can't make them shit themselves, let's at least have the eyeball-rattling effects, right? XD
21:25
< GeekSoldier>
that would certainly be a tactical advantage.
21:25 ChalcyGone [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has quit [Ping Timeout]
21:25 Chalcedon [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code
21:26 mode/#code [+o Chalcedon] by ChanServ
21:35
<@ToxicFrog>
Personally, my ideal setup would be a 3:4 primary, and a widescreen secondary connected to a KVM between Durandal and Leela.
21:47 Doctor_Nick [~fdsaf@Nightstar-1992.9-67.se.res.rr.com] has quit [Quit: ]
21:52 You're now known as TheWatcher[T-2]
21:57 You're now known as TheWatcher[zZzZ]
22:01
< Janus>
Er... May I ask a question about quadratic (and up) equations? I remember hearing about how they could predict the future place of a moving point... but how?
22:05 * Janus didn't pay attention in class during Polynomial Week, apparently.
22:06
< MyCatVerbs>
Janus: in ballistics? You can use the quadratic s=ut + (a*t*t/2)
22:06
< GeekSoldier>
what level maths, Janus?
22:07
< MyCatVerbs>
Janus: where s is the height relative to the release point, u is the initial velocity, a is the gravitational thingummy (9.8ms^-2 on earth, less on the moon, etc) and t is the number of seconds since release.
22:08 MyCatVerbs [~mycatownz@Nightstar-379.dsl.in-addr.zen.co.uk] has quit [Connection reset by peer]
22:09
< AnnoDomini>
*Sniff!* He just managed to utter that with his last breath!
22:09
< AnnoDomini>
:P
22:09 MyCatVerbs [~mycatownz@Nightstar-379.dsl.in-addr.zen.co.uk] has joined #code
22:09
< Janus>
Well, it would be for collision detection with points on a 3d... thing, where the past coordinates of each point is used to create a line that passes through each. I think.
22:09 * Janus is taking Pre-cal, and failing vigourously.
22:09
< GeekSoldier>
ah.
22:09
< MyCatVerbs>
Janus: pretty much it goes like lah: a quadratic equation can be used to model the motion of an object which is accelerating at a constant rate. The constant term will be equal to the starting point. The linear term will be proportional to the initial velocity. The square term will be proportional to the acceleration.
22:09 * GeekSoldier grins at AnnoDomini.
22:10 * GeekSoldier has never considered that.
22:10 * GeekSoldier breaks out his handy-dandy notebook.
22:10
< Janus>
Then, would anything beyond cubic be needed then?
22:11
< GeekSoldier>
Not unless you needed a term beyond acceleration, I believe.
22:11
< MyCatVerbs>
Janus: only if the acceleration wasn't constant.
22:11
< MyCatVerbs>
Say, if the acceleration was changing at a constant rate, you'd need a cubic equation.
22:12
< Janus>
Then, what about quartic?
22:12
< MyCatVerbs>
If the rate at which the acceleration was changing was changing at a constant rate, you'd need a fourth-degree polynomial.
22:12
< Janus>
Ah! I get it now. (I think).
22:12
< MyCatVerbs>
If the rate at which the rate at which the acceleration was changing was changing was changing at a constant rate, you'd need a fifth degree polynomial.
22:12
< MyCatVerbs>
And if *that* is changing, then you're going to cause me to wear out my damn keyboard.
22:13 * GeekSoldier smells calculus up in here.
22:13
<@Vornicus>
To simulate orbits of non-massy bodies around a single body, you need a fourth-degree polynomial.
22:13
< MyCatVerbs>
Sorry, my bad. Farted half an hour ago.
22:13
< GeekSoldier>
for each degree of Delta Acceleration, you would need another term... loosely defined, Janus.
22:14
<@Vornicus>
Position Velocity Acceleration Jerk Snap Crackle Pop
22:15
< MyCatVerbs>
Vornicus: nununununu!
22:15
<@Vornicus>
what?
22:15
< MyCatVerbs>
Vornicus: jerks aren't differentiatable. =D
22:15
<@Vornicus>
whut?
22:15
< MyCatVerbs>
Differentiable? Whatev.
22:15
<@Vornicus>
yes they are.
22:15
< GeekSoldier>
djerk/dx = What?
22:16
< MyCatVerbs>
No they're not. The graph changing slope instantly with no curvature? You show me a method to differentiate that and I'll show you a hermaphrodite stick insect.
22:16
< GeekSoldier>
Wow... /me just wants to see the stick insect.
22:16
<@Vornicus>
No, no
22:17
<@Vornicus>
Jerk is the rate of change of acceleration.
22:17
<@Vornicus>
And nothing is instantaneous in this universe, you know that.
22:18
< GeekSoldier>
ok, so djerk/dx would be the near-instantaneous rate of change of $whatever?
22:19
<@Vornicus>
it would be the rate of change of jerk.
22:19
< AnnoDomini>
There is no "x" in "jerk". djerk/dx = 0.
22:19
< MyCatVerbs>
Vornicus: ah, terminology difference. I see.
22:19
< GeekSoldier>
good call.
22:19
<@Vornicus>
Which is snap.
22:20 * GeekSoldier hasn't done much in calculus for a number of years now.
22:20
< Janus>
So, it's "position + velocity*x + acceleration*x^2", right? Then, what's 'x' do?
22:20
<@Vornicus>
x is actually time
22:20
< AnnoDomini>
Time?
22:20
< MyCatVerbs>
Janus: acceleration/2.
22:20
< AnnoDomini>
Should be t.
22:20
<@Vornicus>
and it's 1/2 a * t^2
22:20
< MyCatVerbs>
Janus: and yesh, it should be time.
22:20
<@Vornicus>
and 1/6 j * t^3, and 1/24 s * t^4....
22:21
< MyCatVerbs>
Vornicus: just how many terms up does anyone bother to make up names for anyway?
22:22
< MyCatVerbs>
Vornicus: I'd have thought it a complete waste of time to bother making up names for anything beyond f''''(x), myself.
22:22
<@Vornicus>
Just those seven.
22:22
<@Vornicus>
I know Hubble goes to f'''''(x). They just went one further for, ah, completeness' sake.
22:23
< Janus>
Okay, so "start + vel * i + 1/2 a * i^2" then? (double-check)
22:23
<@Vornicus>
yep
22:23
< GeekSoldier>
hextic, heptic, octic, nontic...
22:23
<@Vornicus>
should be t, not i.
22:24
< MyCatVerbs>
Bwuhhhh, is there actually any sane notation for differentials that translates well to ASCII?
22:24
< MyCatVerbs>
"d^6x/dt^6" looks ugly, "f''''''(x)" is easy to mistake the count of.
22:24
< GeekSoldier>
nay.
22:25
< GeekSoldier>
f`(6)
22:25
< GeekSoldier>
?
22:25
<@Vornicus>
The usual way for it in print is f<sup>(6)</sup>(x)
22:25
< MyCatVerbs>
Yeah, but that only works for computer lusers when they're working in TeX.
22:26 * Janus uses 'i' for ticks instead of 't', since i looks prettier in Courier.
22:27 * Vornicus beats Janus with a stick.
22:27
< AnnoDomini>
Bah at you, Janus!
22:27
< AnnoDomini>
i is for current. Or sqrt(-1), if you're a mathematician.
22:27
< MyCatVerbs>
Janus: nuuu, you bastard! i is reserved for array indexing!
22:28
< MyCatVerbs>
Janus: or imaginary numbers, if you're a puss-er, mathematician.
22:28
< Janus>
No, that's what 'n' and 'm' do now.
22:28
<@Vornicus>
gah.
22:28 * Janus changes /all/ the rules!
22:28 * Vornicus throws a manual of programming style at Janus.
22:29 * MyCatVerbs drops a gold-plated Knuth book on Janus' foot.
22:29 * GeekSoldier translates the manual into Hungarian notation.
22:29 * ToxicFrog kills Janus with a forklift
22:29
<@ToxicFrog>
Hey, as long as it's apps- instead of systems-...
22:29
< MyCatVerbs>
ToxicFrog: yesh, s'good.
22:30
< MyCatVerbs>
There should be an extra tickbox section on programmer recruitment programs for things that're relevant to specific domains.
22:30 * Janus thinks he should keep his source to himself for sake of life, as those are just minor things compared to other "things".
22:30
< GeekSoldier>
hehe.
22:30
< GeekSoldier>
Goodnight, all.
22:30
<@ToxicFrog>
"ticks" should, in fact, be called "ticks"
22:30
< MyCatVerbs>
e.g. when hiring language designers, it should be possible to filter CVs based on whether the geeks in question have read, "No Silver Bullet," or not. When writing GUI apps, they should be filterable for, "Making wrong code look wrong." and so on.
22:31 GeekSoldier is now known as SupineSoldier
22:31
< MyCatVerbs>
Though you *are* allowed to slash-and-burn s/ticks/fleas/g throughout your entire codebase. We're all fine with that.
22:31
< Janus>
But they're used in gosh near everything. And scrolling to right and left is such a hassle.
22:32
<@Vornicus>
heh
22:32
<@ToxicFrog>
....then you need to format your code better and/or widen your editor window.
22:32
< MyCatVerbs>
Janus: :set tabstop=3
22:32
<@ToxicFrog>
4, heathen ??
22:32
< MyCatVerbs>
If that doesn't work in your text editor, *get a real text editor*.
22:33
<@ToxicFrog>
I'm sorry, but when confronted with the problem "I don't like scrolling horizontally", the solution is not "so I'll make my code half as readable and one-fourth as maintainable"
22:33
< MyCatVerbs>
ToxicFrog: ah, well. The power of viiiim! Is that I can set that on a per-file basis if I feel like it.
22:34 * Vornicus wants 2.5 tabstops.
22:34
< MyCatVerbs>
ToxicFrog: the only reason I use 3 for the moment is that the last chunk of somebody else's code that I was hacking on was built with (*ptooooie!*) soft tabs and a tabstop of three.
22:34
<@ToxicFrog>
Augh, soft tabs
22:34
<@ToxicFrog>
death, deaaaath
22:34
< MyCatVerbs>
*Violent* death.
22:36
<@Vornicus>
(2 is about the right size, and 4 is too big, but I find that whole-number tab stops make it so text blends into each other)
22:37
< MyCatVerbs>
Vornicus: you deliberately make your text jerk about the page to make it easier to pick out?
22:37
<@Vornicus>
Yes.
22:37
< MyCatVerbs>
Your ideas intrigue me. I wish to subscribe to your newsletter.
22:37
<@Vornicus>
Sadly, I haven't found any text editors that let me set a non-integer tab stop.
22:38 ReivZzz [~reiver@Nightstar-435.ubs-dsl.xnet.co.nz] has joined #Code
22:39
< MyCatVerbs>
Doesn't VIM do that? Or shurely emacs could be hacked to?
22:40 ReivZzz is now known as Reiver
22:41
<@ToxicFrog>
MyCatVerbs: the problem there is that the terminal doesn't let you place text at row 8, col 2.5
22:41
<@Vornicus>
Emacs might possibly be capable of it, but emacs is so alien to everything I've ever done that it's not worth it.
22:42
< MyCatVerbs>
Oh. I had interpreted 2.5-tabstops to mean "every odd tab level adds two spaces, every even one three."
22:42
<@Vornicus>
xemacs, rather, because the terminal version obviously can't handle it.
22:49 Thaqui [~Thaqui@Nightstar-25354.jetstream.xtra.co.nz] has left #code [Leaving]
23:29 Doctor_Nick [~fdsaf@Nightstar-1992.9-67.se.res.rr.com] has joined #code
23:33 Chalcedon is now known as ChalcyCooking
23:47 McMartin [~mcmartin@Nightstar-5796.dsl.pltn13.sbcglobal.net] has joined #code
23:47 mode/#code [+o McMartin] by ChanServ
23:57 Reiver is now known as ReivClass
--- Log closed Fri Mar 09 00:00:56 2007
code logs -> 2007 -> Thu, 08 Mar 2007< code.20070307.log - code.20070309.log >