code logs -> 2006 -> Sun, 12 Nov 2006< code.20061111.log - code.20061113.log >
--- Log opened Sun Nov 12 00:00:24 2006
00:09 Martivir is now known as EvilDarkLord
00:11 Takyoji [~Takyoji@Nightstar-25280.dhcp.roch.mn.charter.com] has joined #code
00:12 Syloq is now known as Syloqs-AFH
00:12
< Takyoji>
I can't think of method to make a shopping cart for an online store I'm working on
00:12 ReivZzz is now known as Reiver
00:22
<@Reiver>
Hm.
00:23
<@Reiver>
One thought I had regarding Python/Ruby/et al programs.
00:23 myoru [~Myoru@Nightstar-14304.sip.gsp.bellsouth.net] has left #Code []
00:23
<@Reiver>
They run straight off the source code, right?
00:24
<@Reiver>
Unlike C/C++ which is compiled into machine code, or Java which is compiled into bytecode which is still unreadable to squishies.
00:24
<@Reiver>
So... if this was propietary software, does this mean you're throwing your source code at all the users, or do they have an unreadable-to-people version as well?
00:25
<@Vornicus>
Python has .pyc and .pyo files that are bytecode.
00:25
<@Reiver>
Ah, ok.
00:25
<@Vornicus>
Ruby I know does not have such a thing.
00:25
< GeoTube>
yeah, perl, python, etc can becompiled.. usually it isn't though
00:26
<@Reiver>
...So Python can be bytecoded, but Ruby can't at all? Interesting quirk.
00:26
<@Vornicus>
You can release .pyc/.pyo files to the exclusion of .py files
00:26
<@Vornicus>
Ruby executes its syntax tree; later versions will likely switch to bytecode, which is faster.
00:27
<@Vornicus>
Lua I think can be compiled to machine code.
00:28
<@Vornicus>
I don't know what perl does.
00:30
<@Reiver>
Pft.
00:30
<@Reiver>
perl source code is as indecipherable as C++ machine code.
00:30
<@Reiver>
:p
00:32
<@Vornicus>
indeed
00:54 MyCatOwnz [~mycatownz@Nightstar-379.dsl.in-addr.zen.co.uk] has joined #code
00:56
< GeoTube>
Hey MCO
00:59
< MyCatOwnz>
Hello GT.
01:03 MyCatOwnz [~mycatownz@Nightstar-379.dsl.in-addr.zen.co.uk] has quit [Connection reset by peer]
01:04 MyCatOwnz [~mycatownz@Nightstar-379.dsl.in-addr.zen.co.uk] has joined #code
01:15 Stephenie [Safyra@Nightstar-4370.ok.ok.cox.net] has quit [Quit: ]
01:39
< Takyoji>
anyone have an idea or how I could arrange a way to add things to a shopping cart in php using the session varible?
01:39
<@McMartin>
Can you carry a hash around in it?
01:39
< Takyoji>
by using an array for it or what?
01:39
< Takyoji>
hmm?
01:44
< MyCatOwnz>
Leave an array index in the session variable, p'raps?
01:46 Chalcy [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code
01:46 mode/#code [+o Chalcy] by ChanServ
01:46
< Takyoji>
I mean, I what format to have the product be added to the session varible? just have a column 'product-number' and 'quanity'?
01:47
< MyCatOwnz>
That sounds like it should be enough, arrr.
01:47
< Takyoji>
then..
01:47 * Takyoji thinks
01:47
< Takyoji>
yea, that should work
01:48
< MyCatOwnz>
But I have no PHP experience - I don't know what the session variable is and what the constraints on its use might be. If it turns your webserver into a huge pile of steaming segfault, please don't blame me.
01:48 Chalcedon [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has quit [Ping Timeout]
01:49
< Takyoji>
the session varible basically stays declared as you visit other pages without passing
01:50
< Takyoji>
it
01:51
< Takyoji>
but when you leave the website, it refreshes
01:51
< Takyoji>
in example, for logging in on forums and such
01:53
< Takyoji>
I wonder if I can have an array in an array
01:55
< MyCatOwnz>
So a session variable is a piece of data that sits on the server, which is kept track of by a client's cookie? Handy.
01:55
< Takyoji>
basically
01:57
< MyCatOwnz>
Uh, it is or it isn't. There is no basically.
01:57
< Takyoji>
actually, its like a cookie on the server. But it has a different cookie for each ip address, to prevent problems
01:58
< Takyoji>
I believe
01:58
< Takyoji>
and gets deleted once they leave the website
01:58
< MyCatOwnz>
Yeah, that and a bag of unicorn farts will get you a cup of coffee.
01:58
< Takyoji>
heh
01:58
< MyCatOwnz>
a) http proxies b) the server can't detect when the client has left the site.
01:59
< MyCatOwnz>
Y'know, what with HTTP being completely stateless and all that jazz.
01:59
< MyCatOwnz>
a) is solvable by cookies, b) is solvable by cookies that automatically expire after a set period, at which point the server can safely delete the local information.
02:00
< Takyoji>
http://us2.php.net/manual/en/ref.session.php
02:00
< Takyoji>
just misread it a little
02:01
< Takyoji>
I mean, "I just misread it a little"
02:02
< MyCatOwnz>
I guessed from context :)
02:02
< MyCatOwnz>
I mean, I have never read it in the first place, so I couldn't possibly have misread it =)
02:28 Jan[dinner] is now known as Janus
02:29 EvilDarkLord [althalas@Nightstar-17046.a80-186-184-83.elisa-laajakaista.fi] has quit [Ping Timeout]
02:30 ThaquiWork is now known as Thaqui
02:38 You're now known as TheWatcher[T-1]
02:39 You're now known as TheWatcher[zZzZ]
02:39 MyCatOwnz [~mycatownz@Nightstar-379.dsl.in-addr.zen.co.uk] has quit [Ping Timeout]
02:41 EvilDarkLord [althalas@Nightstar-17046.a80-186-184-83.elisa-laajakaista.fi] has joined #code
02:44 Chalcy is now known as Chalcedon
02:46 Stephenie [Safyra@Nightstar-4370.ok.ok.cox.net] has joined #code
03:01 Janus [~Cerulean@Nightstar-10302.columbus.res.rr.com] has quit [Quit: Get off my lawn ya swank!]
03:04 Syloqs-AFH [Syloq@Admin.Nightstar.Net] has quit [Connection reset by peer]
03:40
< Takyoji>
well, I cant put arrays into $_SESSION which already is an array..
03:41
< Takyoji>
so.. just have several of the products apart of the 'productID' array, and have them seperated by commas?
03:51 TakyojiClone [~Takyoji@Nightstar-25280.dhcp.roch.mn.charter.com] has joined #code
03:54 Takyoji [~Takyoji@Nightstar-25280.dhcp.roch.mn.charter.com] has quit [Ping Timeout]
03:58 Janus [~Cerulean@Nightstar-10302.columbus.res.rr.com] has joined #Code
04:05
< TakyojiClone>
grr, I can't figure out how to make sessions work correctly in php
04:06
< TakyojiClone>
I declare a session, and try to echo it, but it doesn't echo anything
04:06
<@McMartin>
I only know how to do sessions in Java Servlets, sorry. =/
04:07
< TakyojiClone>
crap..
04:07 * McMartin doesn't do a lot of web stuff
04:09
< TakyojiClone>
same here
04:09
< TakyojiClone>
erm
04:09
<@McMartin>
On the other hand, I'm a languages guy, and PHP is one I don't really know. I should probably fix that at some point
04:09
< TakyojiClone>
I mean, I don't do a lot of programming on applications, only web applications.
04:10
< TakyojiClone>
http://php.net would be a good start ;P
04:10
< TakyojiClone>
for learning
04:11 * Janus calmly imprints his head into the wall.
04:12
< Janus>
May I ask a small mathmatics question..?
04:12
< TakyojiClone>
to who?
04:13
< Janus>
Whomever feels ripe and eager I suppose~
04:13
< TakyojiClone>
oh, go ahead
04:13
<@McMartin>
TakyojiClone: I've got about five more important projects, which is one reason I never bothered
04:13
< TakyojiClone>
oh
04:14
< Janus>
How would one go about rotating an image surface..? (Hmm... it's sort of a programming question as well.)
04:15
< TakyojiClone>
hmm
04:15
<@McMartin>
With SDL_rotozoom.h, which I believe is part of the SDL_gfx library.
04:15
< Janus>
I've been mixing sin() this and cos() that in several interesting ways, but it never does it.
04:15
<@McMartin>
Yeah, you'll get a lot of shear.
04:15
< TakyojiClone>
check wikipedia possibly..
04:15
< TakyojiClone>
well..
04:16
< Janus>
I've tried loading rotozoom, but to no success. Also, anti-aliasing isn't a concern, as it needs to occur in real time.
04:16
< Janus>
*including
04:16
<@McMartin>
Janus: Seriously, this is the kind of thing that works way better with 3D acceleration
04:16
<@McMartin>
Which you can abuse to 2D ends
04:16 * McMartin thinks
04:16
<@McMartin>
UQM does this via pre-rendering, basically.
04:17
<@McMartin>
There's one sprite for each of the 16 directions you can face, and it renders the appropriate one.
04:18
< Janus>
Heh... I would make the jump to 3D, but, truth be told, I don't think I'm quite ready for it.
04:18
<@McMartin>
It's a pain, and it hurts portability.
04:18
<@McMartin>
Even 2D-in-3D has ridiculous performance penalties without the right hardware.
04:18
<@McMartin>
(Like, 20x slowdown or worse in UQM on my system that does OpenGL in software)
04:19
< TakyojiClone>
I suppose there's something called the "Euler's rotation theorem" but I can't find the equation, and I believe its only for 3d objects
04:19
<@McMartin>
That's probably not what you need
04:19
< TakyojiClone>
I mean, only for vectors
04:20
<@Vornicus>
Euler's Rotation Theorem is /not/ what you need
04:20
<@McMartin>
How is rotozoom not working, incidentally?
04:20
<@Vornicus>
it's one of the bases of 3d work, but it doesn't do you much /good/ in the end.
04:20
< TakyojiClone>
sorry
04:20
< Janus>
Isn't that the one that tries to make pixels rotate as squares and not points, or something?
04:21
<@McMartin>
Um
04:21
<@McMartin>
I suppose it depends on whether or not you have alpha issues.
04:21
< Janus>
Alpha is a channel I frequent, yes.
04:21
< TakyojiClone>
still not sure if this is even for what you want http://en.wikipedia.org/wiki/Rotation_%28mathematics%29
04:21
<@Vornicus>
rotozoom will handle this madness
04:21
<@Vornicus>
but
04:21
< Janus>
If there's alpha issues, the game implodes, simple as that.
04:22
<@McMartin>
Well, you'd have trouble if you weren't using alpha, I think.
04:22
<@McMartin>
The issue is that spinning it 45 degrees requires a larger rectangle to hold it
04:22
< Janus>
It's alright if it's clipped in this case.
04:23
< Janus>
the only thing that'd be sheared is the trasparent key color.
04:23
<@McMartin>
http://www.ferzkopp.net/joomla/content/view/19/14/
04:24
<@McMartin>
If you haven't gotten those
04:24
<@McMartin>
UQM is using an adaptation of those
04:24
<@McMartin>
(But that involved mipmapping a few other weirdnesses in UQM's side, which was Not My Department)
04:24
< Janus>
The only thing that really needs to be done, is decide where to put pixel (x, y) on the new surface.
04:29
< Janus>
I'm quite ignorant when it comes to the "Installation and Test" business... Including new libraries, if it were a limb, would flash orange so the player would know what to shoot.
04:30 * Janus needs to fix that, sooner than later.
04:31
<@Vornicus>
"where to put pixel (x,y) on the new surface" is not the right way to think about it anyway
04:31
<@Vornicus>
the /right/ question is "what texel does this pixel look at?"
04:32
<@Vornicus>
But to say that this is an expensive operation is underestimating the expense of the operation.
04:35
< Janus>
This is going to cost quite the chunk of fps, SDL_gfx or not, isn't it..?
04:36
<@Vornicus>
It's an expensive operation. That said, SNES managed it okay
04:39
< Janus>
Is there a large difference in the cost between rotating, as compared to simpling 'flipping' a surface horizontally and vertically?
04:40 Thaqui [~Thaqui@Nightstar-23723.broadband-telecom.global-gateway.net.nz] has quit [Client exited]
04:40 * Janus adds "simpling" to the soffice.dic.
04:41
<@McMartin>
Flipping is really cheap.
04:42
<@Vornicus>
yeah
04:43
< Janus>
Alright. What about rotation without anti-aliasing of any sort?
04:43
<@Vornicus>
Let me put it to you this way.
04:44
<@Vornicus>
if I need to flip or 90-rotate a texture with power-of-two length in both directions, I can do this /entirely/ with shifts, adds, incs, decs, and assigns.
04:45
<@Vornicus>
If I need to rotate that same texture an arbitrary amount, I need to make /at minimum/ four multiplications.
04:45
<@Vornicus>
in addition to your usual crap.
04:47
<@Vornicus>
this is per pixel, by the way
04:47 * Janus guesses his flipping function isn't exactly optimized...
04:48
< Janus>
So the only way it could work per frame, is if the texture in question is very small to begin with..?
04:49
<@Vornicus>
Well, that, or you let your dedicated graphics hardware do it for you.
04:51 * Janus has [ ] as his graphics card, so bossing the hardware around is out.
04:52
<@McMartin>
It's not like the flipping changes.
04:52
<@McMartin>
Pre-compute.
04:52
<@McMartin>
Memory Is Cheap.
04:53
< Janus>
Okay, so just have one image to manipulate, and recalculate it at different rotations, writing each as a frame inside of a surface?
04:54
<@McMartin>
Yeah, or as a separate surface for each
04:56
< Janus>
Memory is cheap, filling it isn't... that makes sense then.
04:56
<@McMartin>
Yeah, fill memory once. Blitting it is blazing fast.
04:57
<@McMartin>
Even Not Very Good Cards can do accelerated pixel copy.
04:59
< Janus>
Aye. Just one last question then~
05:01
< Janus>
With rotating, let's say there's a colour key for a transparent colour, would it be possible to keep this colour key, /and/ anti-alias the image in it..?
05:01
<@McMartin>
Anti-aliasing pretty much implies that you're doing non-paletting, which means an alpha channel, not a colorkey.
05:02
< Janus>
So it has to be 32 bit RGBA in Memory then... I guess that's not too bad.
05:04
< Janus>
I haven't done much with alpha on a per-pixel basis.
05:08
<@Vornicus>
Also, what you're calling antialiasing is more likely bilinear or bicubic filtering.
05:08
<@Vornicus>
Which are interesting in their own right.
05:08
< Janus>
I always thought of cubic and linear as being using for resizing...
05:09 * Janus is in love with the present tense tonight.
05:11
<@McMartin>
Janus: MMX and SSE have specialized instructions that will do 32-bit alpha-channel-like operations in batch.
05:11
<@McMartin>
SDL's drivers will use them.
05:13
<@Vornicus>
bicubic and bilinear filtering are used for generic matrix operations on textures
05:14
<@Vornicus>
and since nearly everything in 3d is a matrix operation...
05:14
<@McMartin>
Vornicus: For SDL_gfx, it's actual antialiasing.
05:14
<@McMartin>
Postfiltering Does Not Work on lines.
05:14
<@McMartin>
You get blurred stairsteps.
05:14
<@Vornicus>
ah, true this
05:15 * Vornicus gets 96/96 in Super Mario World.
05:16
<@Vornicus>
(but bilinear /is/ for textures.)
05:16
<@McMartin>
(Yup.)
05:19
<@Vornicus>
Oh, and
05:19
<@Vornicus>
while we're yelling about precomputing stuff?
05:20
<@Vornicus>
many games will, when they need to rotate a guy in 2d, actually come with those rotations packaged on the game disc - up to 64 of them, I've seen
05:22
< Janus>
That doesn't seem too bad, less that accounts for /every/ frame of animation of course.
05:23
<@Vornicus>
though this is most often used when the rotation is not on the axis through the screen. Diablo, for instance.
05:23
<@Vornicus>
Generally you have to do that with every frame.
05:24
< Janus>
Seems like overkill, unless there's some tricky camera issues of course.
05:25
<@McMartin>
For 2D it makes sense because you have not only camera issues but lighting issues.
05:26
<@Vornicus>
oh, indeed
05:27
<@Vornicus>
yeah, if you don't precompute like that you don't get to use decent lighting.
05:28
< Janus>
It would be hard to show lighting in a drawing by shining a flash light at it.
05:30
< Janus>
The opposite holds for 3D of course. I guess this means that, if I want lighting, I'm going to have to open GIMP and do quite a bit of touching up.
05:31 * Janus ponders doing 64 rotations * 180 poses * 35 characters like that.
05:32
<@Reiver>
!64*180*35
05:32
< KarmaBot>
[Reiver] 64*180*35 = 403200.
05:32
<@Reiver>
You might wanna cut down a little somewhere.
05:32
<@McMartin>
Or rely on 3D skeleton-based animation.
05:32
<@Vornicus>
/180/ poses?
05:33
<@Vornicus>
Or composites, like FFT does
05:33
< Janus>
I say, we cut down on lights~
05:33
< Janus>
No... it's pretty close to 180.
05:33
<@McMartin>
Do you have, uh, a screenshot or anything?
05:33
<@Vornicus>
As in, reduce it to just a few legs, and just a few arms
05:34
<@McMartin>
I don't think even Curse of Monkey Island, which hand-animated everything, had nearly that many frames.
05:34
<@Vornicus>
And then use color schemes and individual heads, and suddenly you're down to a manageable range.
05:34
<@McMartin>
That said.
05:35
<@McMartin>
Even 403,200 sprites is in the "1MB or less of graphics content" range.
05:35
<@McMartin>
Individual frames of UQM starships are typically less than 1kB.
05:35
<@Vornicus>
um
05:35
<@Vornicus>
I think you're missing a sigfig or three
05:35
<@McMartin>
Hm. So I am.
05:36
<@Vornicus>
1MB of graphics for 403,200 sprites averages 2 /bytes/ of data per sprite.
05:36
<@Vornicus>
...which would be perfectly acceptable, if you were doing 4x4 monochrome. Too bad there's only 65k of those.
05:37
< Janus>
I may have overestimated the number now that I'm looking at it, but it's still unplausible to add lighting to it.
05:37
< Janus>
http://img.photobucket.com/albums/v492/tai_ragnarok/Rogue.gif
05:37
<@McMartin>
Um
05:37
<@McMartin>
OK, new question.
05:37
<@McMartin>
What exactly are you rotating for here?
05:38
<@McMartin>
That won't even look like a realistic handstand-turning.
05:38
< Janus>
No, the characters are fine just being flipped.
05:39
<@McMartin>
(No they aren't; their handedness will switch suddenly)
05:39
<@Vornicus>
(cf Legend of Zelda)
05:39
<@McMartin>
(Also Mega Man X)
05:39
<@McMartin>
(But if you're looting the sprites, not a lot you can do)
05:39
< Janus>
They're symetrical enough that one would be hard pressed to tell.
05:40 * Vornicus can tell!
05:40
<@McMartin>
Non-characters presumably don't have poses.
05:40
< Janus>
They do the same thing in the game it's from, Disgaea, so if the pros can get away with it...
05:40
<@Vornicus>
I have said on numerous occasions stuff like "dammit I thought he was left-handed. Stop that!"
05:41
<@McMartin>
The fact that someone is paid to do it doesn't make it right, but yeah, if you don't have artists to order around, this doesn't help you
05:41
< Janus>
The brawler is particularly bad at it, as she has her back to the camera at all times.
05:42 * Janus isn't an artist, and doesn't play one on T.V. either.
05:42
<@McMartin>
What exactly are the entities you're rotating?
05:43
< Janus>
Weapons, like swords, umbrellas, and purses.
05:43
<@McMartin>
Those surely don't have 180 poses.
05:44
<@Vornicus>
Heh, indeed not
05:44
< Janus>
Nope, just three for solid things like swords, and more for more dynamic things like gatling guns. (ponders showing off The List...)
05:45
<@McMartin>
I think you should be able to get away with prerenders, then.
05:45
<@Vornicus>
Indeed
05:45
<@Vornicus>
and, at that, many games (Chrono Trigger) get away with a single prerender for many weapons.
05:46
<@ToxicFrog|AFN>
Vornicus: Lua can indeed be compiled to bytecode, and now sleep.
05:47 TakyojiClone [~Takyoji@Nightstar-25280.dhcp.roch.mn.charter.com] has quit [Connection reset by peer]
05:48
<@Vornicus>
I was wondering about machine code
05:49
<@McMartin>
It could, but it isn't.
05:50
<@Vornicus>
ah, wll, ok.
06:30 Janus [~Cerulean@Nightstar-10302.columbus.res.rr.com] has quit [Quit: braaaaains]
07:16 Mahal [~Mahal@Nightstar-11770.worldnet.co.nz] has joined #Code
07:16 mode/#code [+o Mahal] by ChanServ
07:44 Thaqui [~Thaqui@203.184.62.ns-21966] has joined #code
08:43 Vornicus is now known as Vornicus-Latens
09:02 You're now known as TheWatcher
09:42 You're now known as TheWatcher[afk]
10:32 You're now known as TheWatcher
10:34 GeoTube [~Someone@Nightstar-2556.cable.ubr01.dund.blueyonder.co.uk] has quit [Ping Timeout]
11:35 Thaqui is now known as ThaquiSleep
12:57 GeoTube [~Someone@Nightstar-2556.cable.ubr01.dund.blueyonder.co.uk] has joined #code
13:10 Reiver is now known as ReivZzz
13:47 Chalcy [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code
13:47 mode/#code [+o Chalcy] by ChanServ
13:48 Chalcedon [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has quit [Ping Timeout]
14:19 ReivZzz is now known as ReivSLEP
14:29 KBot [~fark.off@Nightstar-29263.neoplus.adsl.tpnet.pl] has joined #Code
14:30 KarmaBot [~fark.off@Nightstar-29201.neoplus.adsl.tpnet.pl] has quit [Ping Timeout]
14:30
< GeoTube>
fark fark fark
14:31 KBot is now known as KarmaBot
14:34 * jerith arrives.
14:34 * jerith prods the KarmaBot.
14:36 EvilDarkLord [althalas@Nightstar-17046.a80-186-184-83.elisa-laajakaista.fi] has quit [Ping Timeout]
14:49 EvilDarkLord [althalas@Nightstar-17046.a80-186-184-83.elisa-laajakaista.fi] has joined #code
14:54 mode/#code [+ooov EvilDarkLord Stephenie ThaquiSleep KarmaBot] by ToxicFrog|AFN
14:59 You're now known as TheWatcher[nap]
16:07 ToxicFrog|AFN is now known as ToxicFrog
16:35 You're now known as TheWatcher
16:51 MyCatOwnz [~mycatownz@Nightstar-379.dsl.in-addr.zen.co.uk] has joined #code
16:54 MyCatOwnz [~mycatownz@Nightstar-379.dsl.in-addr.zen.co.uk] has quit [Connection reset by peer]
16:56 MyCatOwnz [~mycatownz@Nightstar-379.dsl.in-addr.zen.co.uk] has joined #code
17:27 You're now known as TheWatcher[afk]
17:38 MyCatOwnz [~mycatownz@Nightstar-379.dsl.in-addr.zen.co.uk] has quit [Quit: Food, glorious food!]
18:35 Janus [~Cerulean@Nightstar-10302.columbus.res.rr.com] has joined #Code
19:01 You're now known as TheWatcher
19:21 Mahal is now known as MahalWork
19:29 Takyoji [~Takyoji@Nightstar-25280.dhcp.roch.mn.charter.com] has joined #code
19:30
< Takyoji>
How could I continuously add data to an array in PHP? Sorry that I keep asking questions about everything btw.
19:30
< Takyoji>
For example
19:30
< Takyoji>
If I had an array: 4 => 5
19:31
< Takyoji>
Then could later add 6 as a child of 5, so then it would be 4 => 5 => 6 ?
19:33
< GeoTube>
I think parenting 5 to 4 then 6 to 5 later will be alright, not a php programmer though I think it worked like that..
19:33
< Takyoji>
oh,
19:33
< Takyoji>
stupid me
19:38 Takyoji [~Takyoji@Nightstar-25280.dhcp.roch.mn.charter.com] has quit [Quit: Leaving]
20:08
< GeoTube>
..was I right? :E
20:12 * jerith ponders.
20:15
<@ToxicFrog>
What he was describing isn't an array.
20:15
<@ToxicFrog>
It's either a tree or a linked list.
20:18
<@Vornicus-Latens>
he's using his array as a tree
20:19
<@Vornicus-Latens>
which is sensical because he's got SQL as a backdrop
20:22 Vornicus-Latens is now known as Vornicus
20:37
<@Vornicus>
But only sensical so far; it is, imo, better to use a data model proper to the system in PHP and use SQL as merely a pickle jar.
20:45
<@ToxicFrog>
...madness!
20:45
<@ToxicFrog>
The textbook refers me to Table D, and unlike the last three things it referred me to, Table D actually exists!
20:45
<@ToxicFrog>
Clearly someone has massively screwed up in the Department Of Turning Students Into Bitter, Hateful Casks Of Bile.
20:48
< GeoTube>
:o
21:12 EvilDarkLord is now known as EvilSLEPLord
21:20 MyCatOwnz [~mycatownz@Nightstar-379.dsl.in-addr.zen.co.uk] has joined #code
21:25 jerith [~jerith@IRCop.Nightstar.Net] has quit [Ping Timeout]
21:27
< Janus>
Oh ****ing ***** on a sandwiche.
21:28 * Janus actually managed to get SDL_gfx to work.
21:28
< Janus>
And-- I did it in an arcanely obtuse fashion that would offend most folks.
21:31 * Janus deleted a few of these INTERFACE predefinitions, cut out the .dll whatevers, got rid of the 'extern to "C"' bugger, and manually included the corrosponding .c file, making various edits here and there.
21:32 jerith [~jerith@IRCop.Nightstar.Net] has joined #code
21:32 mode/#code [+o jerith] by ChanServ
21:33 * Janus is interviewed by the Catholic Church to make the miracle offical.
21:35
<@ToxicFrog>
.......
21:35
<@ToxicFrog>
That is sick and hideous and shouldn't possibly have worked.
21:35
<@ToxicFrog>
Why wasn't it working when you tried linking against it properly?
21:35
< MyCatOwnz>
That shouldn't work, ever.
21:36
< Janus>
It couldn't find the .c file that defined the function declarations in the .h file.
21:36
< MyCatOwnz>
Removing the extern "C" should turn all the normal name decoration on and cause the linker to swear at you like a Russian sailor.
21:36
<@ToxicFrog>
Janus: it shouldn't have /needed/ it.
21:36
<@ToxicFrog>
You only need the .dll or .a.
21:36
<@ToxicFrog>
Then you add it to the link line.
21:37
<@ToxicFrog>
If you're building it from source, you build it seperately as a DLL and then link against it.
21:38
< Janus>
I mustn't of had the .dll file then. Besides the INTERFACE word that was before all the function declarations, it looked like a normal C++ header.
21:40
< Janus>
I was just messing around with it in frustration... the fact it works is as great a surprise to me as it is to anyone else.
21:42 ThaquiSleep is now known as Thaqui
21:43
<@ToxicFrog>
INTERFACE is likely a preprocessor macro.
21:44
<@ToxicFrog>
So that you can go, say, -DINTERFACE=__stdcall or -DINTERFACE=__dllexport depending on what you're compiling it for.
21:45
<@ToxicFrog>
Anyways. The *correct* way to do something like is to compile and install it as a library, after which you only need the header files and library binaries.
21:45
<@ToxicFrog>
This is more portable and easier to maintain.
21:45
<@ToxicFrog>
And, for that matter, easier to *implement*.
21:48
< Janus>
I tried compiling it with the shell, but it would always stop short, as it couldn't find "SDL ver. 1.2.0" Whether this was a file, a dll, a header, or several things, it wouldn't say.
21:50
< Janus>
I've moved around anything that had "SDL" in it's name, into it's path to see if it would pick it up, but zilch.
21:51
<@ToxicFrog>
...
21:51
<@ToxicFrog>
It means the SDL library.
21:51
<@ToxicFrog>
As in, the header files + the .dll, .so or .a binary.
21:51
<@ToxicFrog>
And, probably, the sdl-config program.
21:53
< Janus>
I've run that as well. It compiles fine. As for the SDL library, I've stuck gfx right in the same directory as it, but still no luck.
21:53
<@ToxicFrog>
Where sdl_gfx is doesn't matter.
21:53
<@ToxicFrog>
Where did you put /SDL/?
21:54
<@ToxicFrog>
It's probably looking in someplace like /usr/include or /usr/include/SDL for the headers, and in /usr/lib for the libraries.
21:54
< Janus>
It's in C:/Dev-Cpp/include/SDL and it's library is in ./lib as well.
21:58
<@ToxicFrog>
Right. And you were building SDL_gfx from mingw?
21:58
<@ToxicFrog>
It is /not/ going to find SDL all the way over there without special help.
21:58
<@ToxicFrog>
Which is what the --whatever-path arguments to configure are for.
22:00
< Janus>
... --?
22:01
<@ToxicFrog>
The problem was that you were running ./configure and it was complaining that it can't find SDL, yes?
22:01
<@ToxicFrog>
Try ./configure --help sometime.
22:01 * Janus ponders the --help dialog
22:01
<@ToxicFrog>
Or perhaps just building it by hand. SDL_gfx is a really simple library, it doesn't take long and you can fill in the -I and -L yourself.
22:05 MyCatOwnz [~mycatownz@Nightstar-379.dsl.in-addr.zen.co.uk] has quit [Connection reset by peer]
22:06 MyCatOwnz [~mycatownz@Nightstar-379.dsl.in-addr.zen.co.uk] has joined #code
22:08 MyCatOwnz [~mycatownz@Nightstar-379.dsl.in-addr.zen.co.uk] has quit [Quit: Things to see, people to do.]
22:14 Chalcy is now known as Chalcedon
22:25 KarmaBot [~fark.off@Nightstar-29263.neoplus.adsl.tpnet.pl] has quit [Connection reset by peer]
22:26 KarmaBot [~fark.off@Nightstar-29263.neoplus.adsl.tpnet.pl] has joined #Code
23:20 ReivSLEP is now known as Reiver
23:36 Janus is now known as Jan[dinner]
23:40 Thaqui [~Thaqui@203.184.62.ns-21966] has quit [Ping Timeout]
23:45 Reiver [~reaverta@IRCop.Nightstar.Net] has quit [Ping Timeout]
23:47 ReivSLEP [~reaverta@IRCop.Nightstar.Net] has joined #Code
23:48 ReivSLEP is now known as Reiver
--- Log closed Mon Nov 13 00:00:24 2006
code logs -> 2006 -> Sun, 12 Nov 2006< code.20061111.log - code.20061113.log >