--- Log opened Thu Oct 07 00:00:07 2010 |
00:09 | | Vornicus-Latens is now known as Vornicus |
00:09 | | * Vornicus returns, points McM up about 6 hours ago. |
00:13 | <@McMartin> | Yes, this is true! |
00:14 | <@McMartin> | Actually, fullscreening old DOS apps on a 16:9 monitor also does this |
00:16 | <@Vornicus> | Well yes, but Wii actually corrects the aspect ratio and makes squares square. |
00:16 | <@McMartin> | Not on the main menu it doesn't~ |
00:17 | <@Vornicus> | No, on the main menu, the "screens" become widescreen too -- but the font widths are corrected. |
00:17 | <@McMartin> | Let me rephrase |
00:17 | <@McMartin> | If you lie about what kind of screen you have, the fonts are in fact distorted |
00:18 | <@Vornicus> | Well yes. |
00:18 | <@McMartin> | The rectangles that are the channel windows are defined as % width though, basically, so lying or not they'll look the same on the screen |
00:19 | | * Vornicus randomly tries to think if there's anything else to add to Kaura's deck simulation tool. Has pretty much run out of ideas. |
00:41 | | Derakon[AFK] is now known as Derakon |
00:45 | | Attilla [Some.Dude@Nightstar-a4bfbc02.threembb.co.uk] has quit [Ping timeout: 121 seconds] |
01:02 | | kwsn is now known as kwsn\radio-land |
01:07 | | gnolam [lenin@Nightstar-38637aa0.priv.bahnhof.se] has quit [[NS] Quit: Z?] |
01:15 | | Anno[Laptop] [annodomini@Nightstar-56dfa451.adsl.tpnet.pl] has quit [[NS] Quit: leaving] |
01:51 | | Rhamphoryncus [rhamph@Nightstar-473f8685.abhsia.telus.net] has joined #code |
02:59 | | Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has joined #code |
03:26 | | celticminstrel [celticminstre@Nightstar-f8b608eb.cable.rogers.com] has joined #code |
03:53 | < celticminstrel> | I don't quite get the "loss" values in the SDL pixel formats... |
04:12 | <@ToxicFrog> | Context? |
04:20 | < celticminstrel> | The SDL_PixelFormat struct? |
04:20 | < celticminstrel> | Am I right in thinking that the [RGBA]loss and [RGBA]shift values can be deduced from the [RGBA]mask values? |
04:21 | <@ToxicFrog> | "The mask fields allow us to isolate each color component, the shift fields tell us the number of bits to the right of each component in the pixel value and the loss fields tell us the number of bits lost from each component when packing 8-bit color component in a pixel." |
04:21 | <@ToxicFrog> | And yes. |
04:22 | < celticminstrel> | I'm still not quite sure what the loss is. |
04:23 | <@ToxicFrog> | http://sdl.beuc.net/sdl.wiki/SDL_PixelFormat - check out the example at the end |
04:24 | <@ToxicFrog> | Say you have a 5551 16-bit format; the RGB loss is 3 each (5 bits per channel means you lose the low 3 bits) and the A loss is 7. |
04:26 | < celticminstrel> | In that case, the red channel would be left-shifted by three? Meaning it's effectively always a multiple of 8? |
04:26 | <@ToxicFrog> | Yes. |
04:27 | <@ToxicFrog> | Per the example I linked, you & it with mask, then >> it shift and << it loss. |
04:27 | < celticminstrel> | Can't help wondering why they don't just subtract loss from shift and do away with loss, but whatever. |
04:28 | <@ToxicFrog> | Because then you have to do annoying things with mask to figure out how many bits of precision you really have. |
04:29 | | Alek [omegaboot@Nightstar-8f41d887.il.comcast.net] has quit [[NS] Quit: moving...] |
04:29 | < celticminstrel> | A slightly related question is how 3-byte pixel formats should be extracted from the pixel array; 1-byte, 2-byte, and 4-byte formats I presume means I can just treat the array as a Uint8[], Uint16[], Uint32[] respectively, but there is no Uint24 type. |
04:30 | < celticminstrel> | Treat it as a byte array and shift the first byte left 16 and the second left 8? |
04:30 | < celticminstrel> | And then just or those together with the third byte? |
04:34 | <@ToxicFrog> | I think so, yeah |
04:34 | <@ToxicFrog> | That said, you will make life much easier if you just stick to 32-bit RGBA 8888. |
04:34 | < celticminstrel> | Would I need to worry about endianness though? |
04:34 | <@ToxicFrog> | Probably! |
04:35 | < celticminstrel> | Yes, that's probably what I'll do in practice, but I feel I should cover the 24-bit possibility just in case it's needed. |
04:36 | <@ToxicFrog> | What are you building, anyways? |
04:36 | < celticminstrel> | SDL wrappers. Eventually I'll be making a game with this. |
04:39 | <@ToxicFrog> | For what language? |
04:39 | < celticminstrel> | C++ |
04:39 | <@ToxicFrog> | Or are you just making a simpler C API for it? |
04:39 | <@ToxicFrog> | Aah |
04:39 | < celticminstrel> | Yeah, I'm trying to simplify it a bit. |
04:39 | <@ToxicFrog> | (just checking that you are aware that there's already a bunch of C++ wrappers for SDL) |
04:39 | < celticminstrel> | I did do a cursory search first. |
04:40 | < celticminstrel> | I say "cursory" because it went long enough to find one wrapper... which turned out to be incomplete. |
04:41 | <@ToxicFrog> | http://www.libsdl.org/libraries.php?order=name&category=19&completed=100&os=-1&m atch_name=&perpage=50 |
04:41 | <@ToxicFrog> | libsdl.org says 20 C++ wrappers for SDL that are 100% complete on at least one OS. |
04:42 | <@ToxicFrog> | That said, not all of them are complete wrappers; some of them are wrappers, replacements or upgrades for specific SDL subsystems rather than the entire library. |
04:51 | < celticminstrel> | Eh, none of them strike me as stellar... though STLucid isn't bad. I'll definitely use it as inspiration, if not as a basis. |
04:51 | | * ToxicFrog nods |
04:51 | <@ToxicFrog> | As far as pixel formats go, my recommendation to stick with 32-bit is based on a few things: |
04:51 | <@ToxicFrog> | - it's the only lossless format |
04:52 | <@ToxicFrog> | - you can easily upconvert any assets you load to it because of this (SDL may even do this automatically when set up right, can't remember) |
04:52 | <@ToxicFrog> | - it's really easy to work with from C (one uint32_t per pixel, one uint8_t per channel) |
04:52 | < celticminstrel> | I can upconvert using SDL_ConvertSurface with a manually populated SDL_PixelFormat, right? |
04:53 | <@ToxicFrog> | - anyone running your games will almost certainly be optimized for 8888 RGBA as well; this is especially noticeable on certain integrated graphics cards which have even worse than normal performance in 24 and 16 bit modes |
04:54 | < celticminstrel> | The only place I'd be slightly worried, then, is for the actual screen... and I doubt that'd be a problem anyway since everyone these days should be able to support 32-bit RGBA colour. |
04:55 | | cpux [chatzilla@Nightstar-c978de34.dyn.optonline.net] has quit [[NS] Quit: ChatZilla 0.9.86 [Firefox 3.6.10/20100914125854]] |
04:55 | <@McMartin> | (SDL may even do this automatically when set up right, can't remember) |
04:55 | < celticminstrel> | Well, I can still do it manually just to make sure. |
04:55 | <@McMartin> | It will, but it will do it on *every blit*. If you're caching resources for repeated blits, SDL_DisplayFormatAlpha'ing is a way to do it once and forever. |
04:56 | <@McMartin> | If you're building a backbuffer up, then letting it be handled on its own will handle it. |
04:56 | < celticminstrel> | And if I'm upconverting everything I suppose I don't even need to worry about the existence of the SDL_PixelFormat struct (except possibly to support indexed colour). |
04:56 | <@ToxicFrog> | celticminstrel: your output surface damn well should be 32-bit, or video drivers will kill your family, your dog, and your performance. |
04:56 | <@McMartin> | TF: Generally, your output surface is whatever SDL_CreateVideo returns |
04:58 | <@ToxicFrog> | Right. But that is controlled at least partially by SDL_SetVideoMode. |
04:59 | < celticminstrel> | Isn't there some caveat that it returns the closest available if the requested mode is unavailable? |
04:59 | <@ToxicFrog> | My point is more that while you can ask for pixel depths other than 32-bit, in this day and age doing so generally hurts more than it helps on both the developer and player side. |
04:59 | <@ToxicFrog> | Yes. |
04:59 | | cpux [chatzilla@Nightstar-c978de34.dyn.optonline.net] has joined #code |
05:00 | <@McMartin> | Actually, no. |
05:00 | < celticminstrel> | I could work around that by always maintaining an offscreen buffer... but that might be inefficient. |
05:00 | <@McMartin> | It will secretly autoconvert by default |
05:00 | < celticminstrel> | Huh? |
05:00 | <@McMartin> | You have to set SDL_ANYFORMAT |
05:00 | <@McMartin> | To get "what the screen really supports" |
05:00 | <@McMartin> | And if you're maintaining an offscreen buffer have it be the whole screen and blit it once per frame. |
05:01 | <@McMartin> | This is what UQM does, it's totally a reasonable strat |
05:01 | < celticminstrel> | Wait, so if it does the shadow conversion I don't even need to worry about the offscreen buffer? |
05:01 | < celticminstrel> | s/if/since/ |
05:04 | <@McMartin> | If it does the shadow conversion is secretly *is* an offscreen buffer presenting as the screen. |
05:07 | < celticminstrel> | So really all I need to do is "force" the shadow conversion by not allowing SDL_ANYFORMAT to be passed. |
05:07 | <@McMartin> | But do have SDL_DOUBLEBUF and SDL_SWSURFACE, yeah. |
05:07 | <@McMartin> | Then you draw to the "screen", and calling SDL_Flip both renders the frame at top of vsync and "clears the screen" for your next go. |
05:07 | < celticminstrel> | That sentence means "don't disallow those two", or "force those two"? |
05:08 | <@McMartin> | Explicitly set those flags when you call InitVideo, and don't set ANYFORMAT. |
05:08 | < celticminstrel> | Is there any reason to ever not set those flags? |
05:09 | <@McMartin> | If you've got a window that's reasonably small and where you're going to be doing accelerated blits, setting HWSURFACE and ANYFORMAT (DOUBLEBUF optional) may let you exploit 2d acceleration on the graphics card. |
05:13 | < celticminstrel> | How small is "reasonably small"? Less than, say, 640x480? |
05:40 | < celticminstrel> | ...hello? |
05:46 | | Zed__ [Zed@Nightstar-556ea8b5.or.comcast.net] has quit [Ping timeout: 121 seconds] |
05:53 | <@McMartin> | Yeah, that'd definitely count. |
06:23 | | Stalker [Z@26ECB6.A4B64C.298B52.D80DA0] has quit [Ping timeout: 121 seconds] |
06:24 | | celticminstrel [celticminstre@Nightstar-f8b608eb.cable.rogers.com] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!] |
06:39 | | Derakon is now known as Derakon[AFK] |
06:52 | | Stalker [Z@3A600C.A966FF.5BF32D.8E7ABA] has joined #code |
06:55 | | ToxicFrog [ToxicFrog@ServerAdministrator.Nightstar.Net] has quit [Connection reset by peer] |
07:06 | | Orthia [orthianz@Nightstar-4a37b8a9.xnet.co.nz] has joined #code |
07:08 | | Zed [Zed@Nightstar-556ea8b5.or.comcast.net] has joined #code |
07:11 | | You're now known as TheWatcher |
07:20 | | kaura [kaura@Nightstar-fd82400d.snfc21.sbcglobal.net] has joined #code |
07:32 | | kwsn\radio-land is now known as kwsn |
08:04 | | Stalker [Z@3A600C.A966FF.5BF32D.8E7ABA] has quit [Ping timeout: 121 seconds] |
08:05 | | * TheWatcher eyes |
08:07 | <@TheWatcher> | So, the guy from yesterday? He's doing foo=chr(144)+chr(195) and the like, so he "can create a block of assembled assembly in pythin memory that he should be able to call". |
08:10 | <@Vornicus> | What |
08:10 | <@Vornicus> | Kill him with a brick. |
08:11 | < simon_> | hmm |
08:12 | < simon_> | if e(x,y) is the edit distance between x and y and e(A,B) is low and e(B,C) is low, then e(A,C) should be low, too, right? |
08:12 | <@McMartin> | Tell him he can't match the ABI that way and wait for him to come up with the next question. |
08:12 | <@TheWatcher> | Vorn: nah, waste of a brick~ |
08:13 | < simon_> | but if e(A,B) is high and e(B,C) is high, then e(A,C) might be either high or low. |
08:13 | <@Vornicus> | TW: halfbrick then. |
08:13 | <@Vornicus> | simon_: assuming there's a long way between low and high, then yeah. |
08:14 | <@Vornicus> | but if the "high" minimum is less than twice the "low" maximum, then the accumulated distance can be high. |
08:14 | < simon_> | I'm trying to come up with some optimizations for comparing a bunch of files. one is that it could be cool to insert texts into a graph and only compare some texts initially, to avoid the O(n^2) comparisons. |
08:16 | < simon_> | so since I can't conclude anything for e(A,C) based on e(A,B) being high and e(B,C) being high, maybe I can conclude gradually more as I know more about the relationship between several nodes... |
08:16 | < simon_> | hm |
08:16 | < simon_> | this is probably useless unless I look at actual edit distances. |
08:17 | < simon_> | I want to see if people copy answers in programming assignments. |
08:18 | | You're now known as TheWatcher[afk] |
08:18 | < simon_> | I thought I'd go with hamming distance on lexical tokens, except some things would be cool with a partial parse tree, e.g. switching some specific, larger code chunks could have a low edit distance. |
08:39 | | Anno[Laptop] [annodomini@Nightstar-dc98e0f1.adsl.tpnet.pl] has joined #code |
09:04 | | kaura [kaura@Nightstar-fd82400d.snfc21.sbcglobal.net] has quit [Ping timeout: 121 seconds] |
09:10 | < simon_> | I wonder, which programming language has the most lexical analysers for other languages defined? some language for some VM, perhaps? |
09:12 | | kwsn [kwsn@31356A.5FD175.2259B6.DFACD4] has quit [Ping timeout: 121 seconds] |
09:12 | <@Vornicus> | By "lexical analyser" do you mean "this program examines the code of another program and fiddles with it"? If so, my money is on perl. |
09:15 | < simon_> | Vornicus, yup, spits out a list of tokens. |
09:17 | < simon_> | here's another question: does anyone know of a tool that visualizes weighted graphs in such a way that the visual distance between vertices is related to the weight of the edge between them? |
09:18 | <@Vornicus> | graphviz can do it, but it's not necessarily going to be good. |
09:19 | < simon_> | nah, ok. I'll check it out. |
09:20 | | Vornicus is now known as Vornicus-Latens |
09:53 | | You're now known as TheWatcher |
09:53 | | gnolam [lenin@Nightstar-38637aa0.priv.bahnhof.se] has joined #code |
09:56 | | Orthia [orthianz@Nightstar-4a37b8a9.xnet.co.nz] has quit [Ping timeout: 121 seconds] |
09:57 | | Tarinaky [Tarinaky@Nightstar-f349ca6d.plus.com] has joined #code |
10:07 | | Anno[Laptop] [annodomini@Nightstar-dc98e0f1.adsl.tpnet.pl] has quit [[NS] Quit: Going elsewhere.] |
10:30 | | * TheWatcher has come to the conclusion that he actually really likes git, at least for private version control |
10:30 | <@McMartin> | Anything dramatic, or just a "hey, this is working and it's clean, go it" kind of thing? |
10:30 | | * McMartin had the latter a few months back. |
10:31 | <@TheWatcher> | The latter, plus "hey, I'm using a version control system and I haven't lost the will to live yet" (the response I had from using other,s especially cvs and snv) |
10:32 | <@TheWatcher> | *svn |
10:33 | <@McMartin> | heh |
10:35 | < simon_> | TheWatcher, I really like git for just managing anything. like web directories. |
10:46 | | Orthia [orthianz@Nightstar-cdbbb7d0.xnet.co.nz] has joined #code |
10:47 | | Anno[Laptop] [annodomini@F67919.F326B3.98D923.BDA7B6] has joined #code |
11:35 | < gnolam> | I've thought about giving Mercurial a whirl (with git still being broken under Windows). |
11:36 | < gnolam> | But eh. There's just no real compelling reason to do it when I have a working SVN setup. |
11:39 | < Rhamphoryncus> | I much prefer when other projects use DVCS. Much easier to develop patches when you get to use version control too |
11:40 | <@TheWatcher> | gnolam: other than svn being the work of the devil? >.> |
11:40 | < Rhamphoryncus> | For local work.. unfortunately most formats I want (like opendoc) aren't version control friendly :( |
11:41 | < Rhamphoryncus> | And I want it for backups as much as I do version control, which means finding a third-party to host a copy. I don't know of one at the moment |
11:43 | < gnolam> | TheWatcher: I've never had any problems with it. |
12:12 | | Anno[Laptop] [annodomini@F67919.F326B3.98D923.BDA7B6] has quit [[NS] Quit: Yay, Windows. <_<] |
12:15 | | gnolaptop [wintermute@Nightstar-0f80f991.eduroam.liu.se] has joined #code |
12:21 | | Orthia [orthianz@Nightstar-cdbbb7d0.xnet.co.nz] has quit [Client closed the connection] |
12:23 | | Tarinaky [Tarinaky@Nightstar-f349ca6d.plus.com] has quit [Connection closed] |
12:35 | | cpux is now known as shade_of_cpux |
12:37 | | Orthia [orthianz@Nightstar-cdbbb7d0.xnet.co.nz] has joined #code |
12:37 | | Orthia [orthianz@Nightstar-cdbbb7d0.xnet.co.nz] has quit [Connection reset by peer] |
12:37 | | shade_of_cpux [chatzilla@Nightstar-c978de34.dyn.optonline.net] has quit [[NS] Quit: ChatZilla 0.9.86 [Firefox 3.6.10/20100914125854]] |
12:41 | | Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has quit [Connection closed] |
12:45 | | Orthia [orthianz@Nightstar-cdbbb7d0.xnet.co.nz] has joined #code |
12:51 | | Orthia [orthianz@Nightstar-cdbbb7d0.xnet.co.nz] has quit [Client closed the connection] |
12:58 | | Orthia [orthianz@Nightstar-cdbbb7d0.xnet.co.nz] has joined #code |
13:04 | | Orthia [orthianz@Nightstar-cdbbb7d0.xnet.co.nz] has quit [Client closed the connection] |
13:11 | | Orthia [orthianz@Nightstar-cdbbb7d0.xnet.co.nz] has joined #code |
13:15 | | Orthia [orthianz@Nightstar-cdbbb7d0.xnet.co.nz] has quit [Client closed the connection] |
13:29 | | Orthia [orthianz@Nightstar-cdbbb7d0.xnet.co.nz] has joined #code |
13:29 | | Orthia [orthianz@Nightstar-cdbbb7d0.xnet.co.nz] has quit [Client closed the connection] |
13:31 | | kwsn [kwsn@31356A.5FD175.2259B6.DFACD4] has joined #code |
13:38 | | Orthia [orthianz@Nightstar-cdbbb7d0.xnet.co.nz] has joined #code |
13:42 | | kwsn [kwsn@31356A.5FD175.2259B6.DFACD4] has quit [[NS] Quit: ] |
13:46 | | Orthia [orthianz@Nightstar-cdbbb7d0.xnet.co.nz] has quit [Client closed the connection] |
13:51 | | gnolaptop [wintermute@Nightstar-0f80f991.eduroam.liu.se] has quit [[NS] Quit: Gone] |
13:52 | | Orthia [orthianz@Nightstar-cdbbb7d0.xnet.co.nz] has joined #code |
13:52 | | Orthia [orthianz@Nightstar-cdbbb7d0.xnet.co.nz] has quit [Client closed the connection] |
13:53 | | You're now known as TheWatcher[d00m] |
14:01 | | Orthia [orthianz@Nightstar-cdbbb7d0.xnet.co.nz] has joined #code |
14:01 | | Orthia [orthianz@Nightstar-cdbbb7d0.xnet.co.nz] has quit [Connection reset by peer] |
14:09 | | Orthia [orthianz@Nightstar-cdbbb7d0.xnet.co.nz] has joined #code |
14:09 | | Orthia [orthianz@Nightstar-cdbbb7d0.xnet.co.nz] has quit [Client closed the connection] |
14:17 | | Orthia [orthianz@Nightstar-cdbbb7d0.xnet.co.nz] has joined #code |
15:15 | | You're now known as TheWatcher[afk] |
15:28 | | Stalker [Z@3A600C.A966FF.5BF32D.8E7ABA] has joined #code |
15:32 | | Anno[Laptop] [annodomini@Nightstar-dc98e0f1.adsl.tpnet.pl] has joined #code |
15:36 | | ToxicFrog [ToxicFrog@ServerAdministrator.Nightstar.Net] has joined #code |
15:36 | | mode/#code [+o ToxicFrog] by Reiver |
15:59 | | Tarinaky [Tarinaky@Nightstar-f349ca6d.plus.com] has joined #code |
16:00 | | Orthia [orthianz@Nightstar-cdbbb7d0.xnet.co.nz] has quit [Ping timeout: 121 seconds] |
16:09 | | Stalker [Z@3A600C.A966FF.5BF32D.8E7ABA] has quit [Ping timeout: 121 seconds] |
16:48 | | Tarinaky [Tarinaky@Nightstar-f349ca6d.plus.com] has quit [Connection closed] |
17:11 | | Stalker [Z@26ECB6.A4B64C.298B52.D80DA0] has joined #code |
17:18 | | KarmaBot [karma.bot@Nightstar-c8453cc1.80-203-16.nextgentel.com] has quit [Ping timeout: 121 seconds] |
17:21 | | Attilla [Some.Dude@Nightstar-c78f15e9.threembb.co.uk] has joined #code |
17:21 | | mode/#code [+o Attilla] by Reiver |
17:48 | | You're now known as TheWatcher |
18:02 | | Attilla [Some.Dude@Nightstar-c78f15e9.threembb.co.uk] has quit [[NS] Quit: ] |
18:25 | | Tarinaky [Tarinaky@Nightstar-f349ca6d.plus.com] has joined #code |
18:35 | | Tarinaky [Tarinaky@Nightstar-f349ca6d.plus.com] has quit [Connection closed] |
18:55 | | Vornicus-Latens is now known as Vornicus |
18:56 | | Rhamphoryncus [rhamph@Nightstar-473f8685.abhsia.telus.net] has quit [Client exited] |
19:43 | | aoanla [AndChat@Nightstar-2e99373c.range81-129.btcentralplus.com] has joined #code |
21:42 | | aoanla [AndChat@Nightstar-2e99373c.range81-129.btcentralplus.com] has quit [[NS] Quit: ] |
22:26 | | Attilla [Some.Dude@Nightstar-5ed44ea8.threembb.co.uk] has joined #code |
22:26 | | mode/#code [+o Attilla] by Reiver |
22:35 | < Anno[Laptop]> | I'm trying to enact a console in Java, using JTextField. I'd like it to act like a normal console concerning input and output, provided it has focus or something like that. |
22:36 | < Anno[Laptop]> | Output is easy to do, since that's what JTF is for. Input sorta baffles me - any ideas how to go about it? |
22:37 | < Anno[Laptop]> | Mostly I'd like to be able to intercept characters as they are inputted. |
22:46 | | * Anno[Laptop] mucks around with a DocumentListener. |
23:35 | | celticminstrel [celticminst@Nightstar-f8b608eb.cable.rogers.com] has joined #code |
23:45 | | You're now known as TheWatcher[T-2] |
23:55 | | You're now known as TheWatcher[zZzZ] |
23:55 | | shade_of_cpux [chatzilla@Nightstar-c978de34.dyn.optonline.net] has joined #code |
23:56 | | shade_of_cpux is now known as cpux |
23:59 | | kaura [kaura@Nightstar-fd82400d.snfc21.sbcglobal.net] has joined #code |
--- Log closed Fri Oct 08 00:00:12 2010 |