--- Log opened Wed Apr 22 00:00:09 2009 |
--- Day changed Wed Apr 22 2009 |
00:00 | | KBot is now known as KarmaBot |
00:07 | | AnnoDomini [AnnoDomini@Nightstar-29187.neoplus.adsl.tpnet.pl] has joined #Code |
00:07 | | mode/#code [+o AnnoDomini] by ChanServ |
00:13 | | Vornicus [Vornicus@Admin.Nightstar.Net] has joined #code |
00:13 | | mode/#code [+o Vornicus] by ChanServ |
00:34 | | GeekSoldier [~Rob@Nightstar-8573.midstate.ip.cablemo.net] has joined #code |
00:34 | | mode/#code [+o GeekSoldier] by ChanServ |
01:12 | | AnnoDomini [AnnoDomini@Nightstar-29187.neoplus.adsl.tpnet.pl] has quit [Quit: Death is always at your back, for all return to the earth from which they came, the fire of life is at the births to come, the tears of a mourning woman are at your left, and the wind blows forth from your right.] |
01:46 | | SmithKurosaki [~jess@Nightstar-24858.acanac.net] has joined #code |
02:15 | | gnolam [lenin@Nightstar-1382.A163.priv.bahnhof.se] has quit [Quit: Z?] |
02:16 | < ToxicFrog> | So, friend of mine having a problem with her windows partition - windows blew up, so she restored it from image (via dd), and now it won't boot - grub says "unknown or unsupported executable format" |
02:17 | < ToxicFrog> | So, we fiddle around with it for a while. Windows recovery mode won't even ls it, > FIXBOOT doesn't work, > FIXMBR says "hey I'm about to vaporize your partition table is that cool y/n" which obviously it is not because it shares the drive with one of her linux installs. |
02:18 | < ToxicFrog> | mount -tntfs says that it can't read $MFT, which is bad. |
02:19 | < ToxicFrog> | "Well", says I, "maybe it didn't finish applying the filesystem image or something. Let's try again!" |
02:20 | < ToxicFrog> | Off we go to look at the filesystem images, which are all bzip2'd. |
02:20 | | mode/#code [-o ToxicFrog] by ToxicFrog |
02:20 | | mode/#code [+o ToxicFrog] by ToxicFrog |
02:20 | <@ToxicFrog> | "You did remember to unbzip2 the image as you applied it, right?" |
02:20 | <@ToxicFrog> | "I think so?" |
02:20 | <@ToxicFrog> | "Well, let's check." |
02:21 | <@ToxicFrog> | Turns out that $(dd if=/dev/sda1 bs=1M count=1 | md5sum) and $(dd if=image.bz2 bs=1M count=1 | md5sum) are identical. |
02:21 | <@ToxicFrog> | Whoops |
02:21 | <@ToxicFrog> | So now we're doing the dd again and sticking a bzcat on the front this time :) |
02:25 | <@Consul> | Well, it could've been worse. |
02:26 | <@Consul> | I was waiting for "complete hard disk failure." |
02:40 | | Reiv [~82d94c4d@Nightstar-29731.dsl.in-addr.zen.co.uk] has quit [Quit: CGI:IRC (EOF)] |
02:58 | | Syloqs_AFH [Syloq@Admin.Nightstar.Net] has joined #code |
02:58 | | Syloqs-AFH [Syloq@Admin.Nightstar.Net] has quit [Ping Timeout] |
02:59 | | Syloqs_AFH is now known as Syloqs-AFH |
03:05 | < McMartin> | Hm. OpenSUSE's installer looks wildly different from Fedora's, but the messages all seem identical. Strange |
03:59 | < SmithKurosaki> | Well, I've used both of them (fedora more than opensuse, though) and the actual install interface didn't really seem all that different to me, I just love how you can edit settings after you've chosen them from opensuse's confirm install screen |
04:16 | <@ToxicFrog> | Consul: turns out the bzip2'd image is corrupt! |
06:02 | | Syloqs-AFH [Syloq@Admin.Nightstar.Net] has quit [Connection reset by peer] |
06:43 | | * Vornicus can't find the schema for his php-mysql homework. |
06:43 | < Derakon> | It's just fifty columns of VARCHAR(600). |
06:43 | < Namegduf> | Haha, ew. |
06:44 | | * Namegduf is messing with some PHP and MySQL stuff now, actually. |
06:45 | <@Vornicus> | Fortunately this is about reading. Anybody know how to divine the schema of a mysql database? |
07:19 | < Derakon> | sorted(list(dict.fromkeys(digits(n)))) |
07:20 | <@Vornicus> | Fun fun |
08:10 | | Derakon is now known as Derakon[AFK] |
08:14 | | Namegduf [namegduf@86.25.56.ns-4159] has quit [Quit: Heading out; be back in the evening.] |
08:23 | | somnolence [~somnolenc@Nightstar-3790.hsd1.ca.comcast.net] has joined #code |
08:24 | | AnnoDomini [AnnoDomini@Nightstar-29187.neoplus.adsl.tpnet.pl] has joined #Code |
08:24 | | mode/#code [+o AnnoDomini] by ChanServ |
08:32 | | Vornicus [Vornicus@Admin.Nightstar.Net] has quit [Quit: ] |
09:11 | <@AnnoDomini> | Hmmm. Any Prolog monkeys in here? |
09:13 | <@AnnoDomini> | What I need to do is to obtain a list of items. But these items are spread out through several instances of a predicate: pred(X,Y). pred(X,Z). I want to obtain the list of all second items from the predicates identified by X, in this case [Y, Z] - how do I do that? |
09:35 | | somnolence [~somnolenc@Nightstar-3790.hsd1.ca.comcast.net] has quit [Client exited] |
09:39 | | somnolence [~somnolenc@Nightstar-3790.hsd1.ca.comcast.net] has joined #code |
09:43 | | somnolence [~somnolenc@Nightstar-3790.hsd1.ca.comcast.net] has quit [Client exited] |
09:43 | | somnolence [~somnolenc@Nightstar-3790.hsd1.ca.comcast.net] has joined #code |
10:07 | | crem [~moo@Nightstar-28703.adsl.mgts.by] has quit [Ping Timeout] |
10:11 | | NSGuest-11 is now known as EvilDarkLord |
10:44 | | Rhamphoryncus [~rhamph@Nightstar-7184.ed.shawcable.net] has quit [Quit: Rhamphoryncus] |
10:46 | <@AnnoDomini> | Nevermind, found the solution. |
--- Log closed Wed Apr 22 11:47:41 2009 |
--- Log opened Wed Apr 22 11:47:46 2009 |
11:47 | | TheWatcher [~chris@Nightstar-29731.dsl.in-addr.zen.co.uk] has joined #code |
11:47 | | Irssi: #code: Total of 19 nicks [9 ops, 0 halfops, 0 voices, 10 normal] |
11:47 | | mode/#code [+o TheWatcher] by ChanServ |
11:48 | | Irssi: Join to #code was synced in 52 secs |
11:52 | | EvilDarkLord [~jjlehto3@Nightstar-9591.cs.hut.fi] has quit [Ping Timeout] |
11:53 | | EvilDarkLord [~jjlehto3@Nightstar-9591.cs.hut.fi] has joined #code |
11:54 | | EvilDarkLord is now known as NSGuest-65 |
13:24 | <@TheWatcher> | Gah, I hate the situation where I just know I've written a piece of code, but I can't remeber where, and on which machine, it is |
13:47 | | gnolam [lenin@Nightstar-1382.A163.priv.bahnhof.se] has joined #Code |
13:47 | | mode/#code [+o gnolam] by ChanServ |
15:44 | | Doctor_Nick [~nick@Nightstar-12867.tampfl.fios.verizon.net] has quit [Operation timed out] |
16:04 | | Syloqs_AFH [Syloq@Admin.Nightstar.Net] has joined #code |
16:05 | | Syloqs_AFH is now known as Syloqs-AFH |
16:37 | | NSGuest-65 is now known as EvilDarkLord |
16:41 | | Derakon[AFK] is now known as Derakon |
16:48 | | SmithKurosaki [~jess@Nightstar-24858.acanac.net] has quit [Client exited] |
16:50 | <@ToxicFrog> | Hmm |
16:50 | <@ToxicFrog> | I could now do an online resize ofthe filesystem |
16:50 | <@ToxicFrog> | However, I really should fsck it first, which means another reboot. |
16:50 | <@ToxicFrog> | Sigh. |
16:51 | | SmithKurosaki [~Jenn@Nightstar-24858.acanac.net] has joined #code |
17:28 | | Namegduf [namegduf@86.29.157.ns-3965] has joined #code |
18:22 | | You're now known as TheWatcher[afk] |
18:44 | | Reiver [~reaverta@Admin.Nightstar.Net] has quit [Ping Timeout] |
18:44 | | ToxicFrog [~ToxicFrog@Admin.Nightstar.Net] has quit [Operation timed out] |
19:16 | | mode/#code [-o gnolam] by ChanServ |
19:16 | | mode/#code [-o TheWatcher[afk]] by ChanServ |
19:16 | | mode/#code [-o AnnoDomini] by ChanServ |
19:16 | | mode/#code [-o GeekSoldier] by ChanServ |
19:16 | | mode/#code [-o Consul] by ChanServ |
19:16 | | mode/#code [-o Derakon] by ChanServ |
19:16 | | mode/#code [-o C_tiger] by ChanServ |
19:16 | | mode/#code [-o McMartin] by ChanServ |
19:17 | | gnolam is now known as NSGuest-28 |
19:17 | | EvilDarkLord is now known as NSGuest-33 |
19:17 | | C_tiger is now known as NSGuest-58 |
19:17 | | McMartin is now known as NSGuest-60 |
19:17 | | Netsplit DeepThought.NY.US.Nightstar.Net <-> Blargh.CA.US.Nightstar.Net quits: Namegduf, MyCatVerbs, simontwo, KarmaBot, Tarinaky, Consul, Alek, PinkFreud, SmithKurosaki |
19:17 | | Consul_ [~consul@Nightstar-1864.dsl.sfldmi.ameritech.net] has joined #code |
19:17 | | NSGuest-28 is now known as gnolam |
19:18 | | NSGuest-60 is now known as McMartin |
19:18 | | Netsplit over, joins: Tarinaky |
19:19 | | Netsplit over, joins: Alek |
19:20 | | KBot [~karma.bot@Nightstar-29187.neoplus.adsl.tpnet.pl] has joined #Code |
19:21 | | Netsplit DeepThought.NY.US.Nightstar.Net <-> Blargh.CA.US.Nightstar.Net quits: KBot |
19:24 | | MyCatVerbs [~mycatverb@Nightstar-13709.lurkingfox.co.uk] has joined #code |
19:24 | | mode/#code [+o MyCatVerbs] by ChanServ |
19:27 | | NSGuest-3153 [~karma.bot@Nightstar-29187.neoplus.adsl.tpnet.pl] has joined #Code |
19:27 | | PinkFreud [~WhyNot@Admin.Nightstar.Net] has joined #Code |
19:28 | | NSGuest-3153 is now known as KarmaBot |
19:28 | | PinkFreud is now known as NSGuest-74 |
19:30 | | Namegduf [namegduf@86.29.157.ns-3965] has joined #code |
19:31 | | SmithKurosaki [~Jenn@Nightstar-24858.acanac.net] has joined #code |
19:31 | < SmithKurosaki> | was there a netsplit or something?? |
19:32 | < Derakon> | Blargh dropped off the face of the Earth. |
19:34 | < gnolam> | They nuked it from orbit. It was the only way to be sure. |
19:35 | | Reiver [~reaverta@Admin.Nightstar.Net] has joined #Code |
19:35 | | mode/#code [+o Reiver] by ChanServ |
19:38 | | NSGuest-58 is now known as C_tiger |
19:41 | | simontwo [~simon@Nightstar-28088.diogenes.hacklab.dk] has joined #code |
19:41 | | You're now known as TheWatcher |
19:45 | | Doctor_Nick [~nick@Nightstar-7517.tampfl.dsl-w.verizon.net] has joined #code |
19:45 | | mode/#code [+o Doctor_Nick] by ChanServ |
19:59 | | NSGuest-74 is now known as PinkFreud |
20:04 | | mode/#code [+o TheWatcher] by ChanServ |
21:06 | | Rhamphoryncus [~rhamph@Nightstar-7184.ed.shawcable.net] has joined #code |
22:01 | | * TheWatcher eyes the phpbb3 session code, wonders if this is a security hole |
22:02 | | ToxicFrog [~ToxicFrog@Admin.Nightstar.Net] has joined #code |
22:02 | | mode/#code [+o ToxicFrog] by ChanServ |
22:06 | <@ToxicFrog> | ben@orias:~$ df -h |
22:06 | <@ToxicFrog> | Filesystem Size Used Avail Use% Mounted on |
22:06 | <@ToxicFrog> | /dev/md0 2.1T 1.2T 825G 58% / |
22:06 | <@TheWatcher> | woot |
22:27 | | * gnolam stabs SDL with a piece of sharpened rebar. |
22:27 | < Derakon> | You're fond of stabbing things, aren't you? |
22:27 | < gnolam> | I wouldn't be so stabby if things Just Worked (TM). |
22:27 | < Derakon> | Well, then why did you go into computing? |
22:28 | < gnolam> | Like, for example, SDL deciding to fuck me over if I request a double-buffered mode. |
22:28 | | * AnnoDomini hasn't had major problems with SDL. |
22:31 | | * TheWatcher eyes Dera |
22:31 | < Derakon> | Yesh? |
22:31 | <@TheWatcher> | How incredibly cynical. |
22:31 | <@TheWatcher> | And true. |
22:31 | | * Derakon bows. |
22:32 | | Consul_ [~consul@Nightstar-1864.dsl.sfldmi.ameritech.net] has quit [Quit: Leaving] |
22:35 | < gnolam> | AnnoDomini: Good for you. |
22:35 | < gnolam> | But if I request a double-buffered mode - which is, you know, /standard/ - SDL just gives me a blank screen. |
22:35 | < gnolam> | SDL_Flip() doesn't even /fail/. It just refuses to do anything. |
22:35 | < AnnoDomini> | That's odd. |
22:36 | < AnnoDomini> | You seem to be on Windows, which makes it odder. |
22:37 | < NSGuest-33> | gnolam: Have you eliminated the most common error cause, gross user incompetence? |
22:38 | <@ToxicFrog> | I've used double buffering and flip on both linux and windows with no problems |
22:40 | <@TheWatcher> | Waved a dead chicken over it? |
22:42 | < gnolam> | NSGuest-33: Given that most of the code is /straight from the documentation/, I'd say it's SDL's fault. :P |
22:42 | <@ToxicFrog> | Pastebinulate? |
22:45 | <@TheWatcher> | Problem is, even if you get the code right, it might not be SDL's fault - it could be the graphics drivers being an arse |
22:51 | | mode/#code [+o gnolam] by ChanServ |
22:51 | <@gnolam> | ToxicFrog: http://paste.ubuntu.com/156159/ |
22:54 | <@ToxicFrog> | What documentation gives that as an example? Because I'm pretty sure it's wrong. |
22:55 | <@gnolam> | Oh? What's wrong? |
22:55 | <@ToxicFrog> | You can't directly twiddle the bits in the SDL_Surface flags like that and expect it to call SetVideoMode() again automatically; if you want it double-buffered, you need to tell it that when configuring the video interface with SDL_SetVideoMode. |
22:56 | <@ToxicFrog> | Unless SDL_OPENGL implies SDL_DOUBLEBUFFER or something? |
22:56 | <@ToxicFrog> | ...oh, wait |
22:56 | <@ToxicFrog> | No, sorry, I completely misread your printf ;.; |
22:58 | <@ToxicFrog> | Ok, rereading it more carefully, the only thing that seems off is glClear(GL_COLOR_BUFFER_BIT | GL_COLOR_BUFFER_BIT); - why do you have GL_COLOR_BUFFER_BIT there twice? |
22:58 | <@gnolam> | Ah, one is supposed to be GL_DEPTH_BUFFER_BIT. But that's not important. |
22:59 | <@ToxicFrog> | The rest looks plausible, but bear in mind I've never used openGL with SDL at all. |
22:59 | <@ToxicFrog> | It works for me with SDL_DOUBLEBUFFER|SDL_HWSURFACE |
22:59 | | * TheWatcher can't even get the flamin pastbin to load, so can't assist :/ |
23:02 | | SmithKurosaki [~Jenn@Nightstar-24858.acanac.net] has quit [Client exited] |
23:02 | <@MyCatVerbs> | ToxicFrog: my flatmate is making pretty heavy use of SDL+openGL in one of his courseworks. |
23:02 | <@MyCatVerbs> | ToxicFrog: the bad news is that it appears to be an arcane and pretty much randomly-behaving beast, according to his descriptions. |
23:02 | <@TheWatcher> | ... um |
23:03 | | SmithKurosaki [~jess@Nightstar-24858.acanac.net] has joined #code |
23:05 | <@TheWatcher> | frankly, assuming you're not going to try surface bittwiddling by hand at the same time as using openGL, and are just using SDL as mechanism to get yourself an opengl context, it's no more arcane and randomly behaving than opengl itself is... |
23:05 | <@TheWatcher> | oh, wate |
23:05 | <@TheWatcher> | >.> |
23:06 | < McMartin> | Programming OpenGL is like programming a robot to program a computer by toggling the program in through levers. |
23:06 | <@TheWatcher> | Unforunately, so's direct3d >.> |
23:07 | < McMartin> | At least OpenGL uses mathematical coordinate systems. |
23:07 | < McMartin> | If he's getting "random" results, he's probably applying his matrices in the wrong order. |
23:07 | < McMartin> | Which is one of those things that requires experimentation until you level up. |
23:09 | <@MyCatVerbs> | McMartin: judging from the tirades I've been eavesdropping on, most of his issues are with trying to use transparent surfaces for various odd purposes. |
23:10 | < McMartin> | Is he not rendering the scene in Z-order? |
23:10 | < McMartin> | transparency is a bitch, full stop, because it's fundamentally a hard problem. |
23:12 | < McMartin> | And OpenGL requires you render from furthest-to-camera to closest when transparency is involved, so that it can handle blending properly. |
23:12 | < McMartin> | Otherwise, the hardware occluders will mess stuff up. |
23:25 | | AnnoDomini [AnnoDomini@Nightstar-29187.neoplus.adsl.tpnet.pl] has quit [Quit: God created man, God created woman, but Samuel Colt made them equal.] |
23:28 | <@MyCatVerbs> | McMartin: I do not know. I got the impression that their program must be doing *something* screwy as you suggest, because honestly the vast overwhelming majority of games on the planet do not have trouble rendering transparent objects, but I'm not really up to butting in and turfing through his team's code to satisfy my own curiosity. |
23:30 | <@TheWatcher> | heh |
23:31 | <@TheWatcher> | they don't have trouble rendering transparent objects because they invest a fairly insane amount of experience, time, and code in dealing with it |
23:31 | <@MyCatVerbs> | TheWatcher: ah, but I have no trouble rendering transparent objects, either. |
23:32 | <@MyCatVerbs> | In my case, it is because instead of doing all the hard work myself, I just outsourced the effort by using OGRE instead of raw OpenGL. I have nothing to gain by re-implementing a good 3D renderer from scratch anyway, so why bother? ^_^ |
23:33 | <@TheWatcher> | Well, if it does all you want, and fits what you need, indeed. |
23:33 | <@TheWatcher> | There are reasons to do it, learning /how/ to being one of them |
23:33 | <@MyCatVerbs> | Mmm. We're hardly aiming to create the next Bioshock. |
23:34 | <@MyCatVerbs> | Aye, true 'dat. |
23:36 | <@gnolam> | ... aaand now there's some sort of RGB/BGR fuckup. |
23:39 | <@MyCatVerbs> | gnolam: whatever the bug is, put an option somewhere in the menus to switch it on deliberately. Stoner mode! :D |
23:40 | <@gnolam> | Ah. |
23:40 | <@gnolam> | BMP is the only format natively supported by SDL. And it's BGR. |
23:40 | <@gnolam> | And SDL refuses to convert its pixels, despite the whole abstracted structure thingy. |
23:41 | < McMartin> | (a) Use SDL_image |
23:41 | < Derakon> | McM beat me to it. |
23:41 | < Derakon> | SDL_image can load more image formats. Build it with libpng handy so you can support PNG images. |
23:41 | < McMartin> | (b) LoadBMP should give a properly configured structure |
23:42 | < McMartin> | (b) (1) The data structure in it will not be arbitrarily copyable to other-formated structures; use ConvertSurface or just blit it to something marked AnyFormat |
23:42 | < McMartin> | (b) (2) I have totally used LoadBMP on a little-endian machine with no trouble. |
23:44 | < Derakon> | Indeed, about half the point of the SDL is that it's cross-platform. |
23:44 | < Derakon> | (The other half being that it's comparatively easy to work with) |
23:45 | <@gnolam> | Define "properly configured". |
23:45 | < Derakon> | When you draw it, the pixels are in the right order. |
23:45 | < McMartin> | "If MS Paint says the pixel is blue, blitting the result of LoadBMP should make that pixel blue" |
23:45 | <@gnolam> | I do not draw it. I need to create textures from it. :P |
23:45 | <@gnolam> | Which means that I apparently have to convert it pixel by pixel, which is a fucking PITA. |
23:46 | < McMartin> | Create a new Surface with SDL_ConvertSurface. |
23:46 | < McMartin> | UQM and Sable both basically do this, though Sable uses PNGs to do it with and UQM uses an internal buffer of known format. |
23:47 | <@gnolam> | AFAICT, SDL_ConvertSurface is basically a glorified for loop, since you still have to go through the ordeal of determining the pixel ordering for yourself. |
23:50 | < McMartin> | Glories include MMX/SSE, so, ou should still win. |
23:50 | < McMartin> | OpenGL also requires you to specify a pixel ordering *anyway*, and there's a SurfaceFormat structure anyway |
23:51 | < McMartin> | Which you need to be very careful with because different OSes and graphics cards have *very* different ideas about what an internal texture should look like. |
23:51 | < McMartin> | If this isn't for an assignment or something, I seriously recommend looking at UQM's code (GPL2). |
23:51 | < McMartin> | One moment while I find the link |
23:51 | < McMartin> | This was also awesome, IIRC, because some graphics cards actually lie about their capabilities or which options they accept |
23:53 | < McMartin> | But it is absolutely possible to use an SDL_Surface as an OpenGL texture directly. |
23:56 | < McMartin> | Search for "TFB_GL_Unscaled_ScreenLayer" |
23:56 | <@gnolam> | Your search - TFB_GL_Unscaled_ScreenLayer - did not match any documents. |
23:57 | < McMartin> | Er |
23:57 | | KBot [~karma.bot@Nightstar-28221.neoplus.adsl.tpnet.pl] has joined #Code |
23:57 | < McMartin> | Voice me, please. |
23:57 | | mode/#Code [+o McMartin] by TheWatcher |
23:57 | <@McMartin> | The search was within a web page Blargh helpfully stripped. |
23:57 | <@TheWatcher> | No ;P |
23:57 | <@McMartin> | http://sc2.svn.sourceforge.net/viewvc/sc2/trunk/sc2/src/sc2code/libs/graphics/sd l/opengl.c?revision=2825&view=markup |
23:57 | <@McMartin> | Search for that string in that page. |
23:58 | | KarmaBot [~karma.bot@Nightstar-29187.neoplus.adsl.tpnet.pl] has quit [Ping Timeout] |
23:58 | <@gnolam> | And SDL_ConvertSurface did absolutely fuck-all. |
23:59 | <@McMartin> | Then it's in the right format in the first place. =P |
23:59 | <@McMartin> | Make sure you've got your pitch set right, as well. |
23:59 | <@gnolam> | Which means I have to do it by hand. Which means pain in the gluteus maximus. |
23:59 | <@McMartin> | It is not the case that a 320-pixel-wide BMP necessarily has point (x, y) at x+(320*y) |
--- Log closed Thu Apr 23 00:00:12 2009 |