code logs -> 2011 -> Thu, 06 Oct 2011< code.20111005.log - code.20111007.log >
--- Log opened Thu Oct 06 00:00:07 2011
00:17 Attilla [Some.Dude@Nightstar-f29f718d.cable.virginmedia.com] has quit [Ping timeout: 121 seconds]
00:26 RichardBarrell [mycatverbs@Nightstar-3b2c2db2.bethere.co.uk] has quit [Client closed the connection]
00:43 You're now known as TheWatcher[T-2]
00:45 You're now known as TheWatcher[zZZZ]
00:45 You're now known as TheWatcher[zZzZ]
00:55 Derakon[AFK] is now known as Derakon
01:07 Vash [Vash@Nightstar-f03c5637.sd.cox.net] has joined #code
01:25 Vash [Vash@Nightstar-f03c5637.sd.cox.net] has quit [Ping timeout: 121 seconds]
01:29 Vash [Vash@Nightstar-f03c5637.sd.cox.net] has joined #code
01:40 Vash [Vash@Nightstar-f03c5637.sd.cox.net] has quit [[NS] Quit: I <3Lovecraft<3 Vorn!]
02:22 gnolam [lenin@Nightstar-202a5047.priv.bahnhof.se] has quit [[NS] Quit: Z?]
02:32 Kindamoody[zZz] is now known as Kindamoody
04:18
< McMartin>
Ugh. So, I've been having to work with COM and GObject lately, both of which are terrible.
04:18
< McMartin>
Very common, and kind of annoying, is the IUnknown::QueryInterface() method, which COM uses to do type interrogation and shift interfaces around, since it's both reflective and has strong typing
04:19
< McMartin>
It also doesn't believe in return values, which makes it very inconvenient to use, so I'm making some wrapper methods to make life easier
04:19
< McMartin>
It is requiring every fiber of my will to not call the QueryInterface wrapper "COMcast"
04:56
< Vornicus>
D:
05:37 kwsn is now known as kw-sleep-n
05:48 Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has joined #code
06:20 celticminstrel [celticminst@Nightstar-5d22ab1d.cable.rogers.com] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!]
06:54 Derakon is now known as Derakon[AFK]
07:04 Kindamoody is now known as Kindamoody|afk
09:19 Attilla [Some.Dude@Nightstar-f29f718d.cable.virginmedia.com] has joined #code
09:28 You're now known as TheWatcher
09:39
< jerith>
http://thedailywtf.com/Articles/Caught.aspx
09:44
< McMartin>
I disbelieve~
09:45
< jerith>
I can see that being carefully calculated and then all the parameters hardcoded or something.
10:37 Rhamphoryncus [rhamph@Nightstar-14eb6405.abhsia.telus.net] has quit [Client exited]
10:48 You're now known as TheWatcher[afk]
11:29 kw-sleep-n is now known as kwsn
11:56 Kindamoody|afk is now known as Kindamoody
13:27 Kindamoody is now known as Kindamoody|out
13:29 gnolam [lenin@Nightstar-202a5047.priv.bahnhof.se] has joined #code
13:32 Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has quit [Connection closed]
13:35 celticminstrel [celticminst@Nightstar-5d22ab1d.cable.rogers.com] has joined #code
14:03
< gnolam>
So many Steve Jobs jokes, so little time...
14:10 teuanjo [teuanjo@Nightstar-5b7a5549.rev.vodafone.pt] has joined #code
14:11 teuanjo [teuanjo@Nightstar-5b7a5549.rev.vodafone.pt] has quit [[NS] Quit: IRC webchat at http://irc2go.com/]
14:15
< gnolam>
"Do not joke about Steve Jobs's death, it's not PC."
15:01
< jerith>
Nice.
15:02
< kwsn>
well... PC did do him in >_>
15:03
< kwsn>
(Pancritic cancer) >_>
15:09 AnnoDomini [annodomini@60F158.737D66.CA1918.CC7562] has joined #code
15:11
< gnolam>
... cancer that transcends criticism?
15:15
< Lingerance>
So hipster cancer?
15:18
< AnnoDomini>
I have nothing against giving hipsters cancer.
15:19
< kwsn>
hehe
15:38 * gnolam stabs Python and Python installers.
15:41
< kwsn>
:P
15:46
< gnolam>
They fail at supporting multiple Python installations. :P
15:48 celticminstrel [celticminst@Nightstar-5d22ab1d.cable.rogers.com] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!]
16:10 * AnnoDomini hates on websites which require absurdly diverse passwords.
16:11 * ToxicFrog hates on websites that limit passwords to 8 characters and reject email addresses with + in them
16:11 * Tamber hates on websites that 'validate' anything to the left of the @
16:17 AnnoDomini [annodomini@60F158.737D66.CA1918.CC7562] has quit [[NS] Quit: leaving]
17:21
< gnolam>
At least it's not mandating absurdly diverse /and less secure/ passwords *cough*Handelsbanken*cough*.
17:23
< gnolam>
Specifically: a password, 8-12 characters long, with at least one lowercase letter, one uppercase letter and at least two digits.
17:23
< gnolam>
>_<
17:24
< Attilla>
but digits are less secure than letters :O
17:41
< gnolam>
Mandating "must contain digits" is ok (/sort of/) since it increases the search space per character. But someone must've thought "hey, if mandating one makes it more secure... then mandating /two/ makes it twice as secure!".
17:58
< Fantastic_Phox>
There should be no mandation at all. Strong recommendations, yes
18:04
< gnolam>
Thus the "sort of".
18:08 * gnolam glaraghaeuoagls.
18:14
< gnolam>
It shouldn't be this hard to distribute a goddamned program.
18:15
< gnolam>
FOR FUCK'S SAKE
18:15
< gnolam>
Fuck it, looks like I'm going to have to ditch Python altogether and rewrite the entire goddamn thing in C++.
18:16
< gnolam>
N GANGEAHGHGE
18:22
< Attilla>
you have seen the light
18:25 You're now known as TheWatcher
18:25
< gnolam>
No, I have seen the RED MIST OF FUCK YOU AND DIE PYTHON
18:42
< gnolam>
I AM INCLUDING THE GODDAMN MSVC DLLS SO WHAT THE HELL ARE YOU COMPLAINING ABOUT
18:42 * gnolam rages
18:51
< gnolam>
Install Python on the target machine and it works. Uninstall it and it ceases to work. W.T.F.
19:00
< gnolam>
And as usual, there is no actually /helpful/ help available.
19:00
< gnolam>
It's just "you're not bundling the MSVC DLLs, perform these steps to do that". Which I'm doing, but it doesn't fucking work.
19:14
< gnolam>
FGNNSH
19:20
< kwsn>
FGNNSH?
19:21 Kindamoody|out is now known as Kindamoody
19:24
< gnolam>
Sound of extreme frustration as expressed by randomly mashing the keyboard.
19:28
< gnolam>
FINALLY
19:29
< gnolam>
It works inside the Matrix at least.
19:29
< gnolam>
That just took... let's see... 5 hours.
19:33 * ToxicFrog fiddles with LuaPilot
19:34
<@ToxicFrog>
I really need to get around to implementing scatter and reduce.
19:34
<@ToxicFrog>
And possibly loosening the restrictions on gather, if I can.
20:00 Kindamoody is now known as Kindamoody[zZz]
20:41 Derakon [chriswei@Nightstar-f68d7eb4.ca.comcast.net] has joined #code
20:41
< Derakon>
Thoughts on this thing? http://pastebin.com/J5prq6Na
20:41
< Derakon>
Basically I have a library I have to talk to that accepts a handle and returns an error for every single call.
20:42
< Derakon>
So I want to automate the process of including the handle and processing the error.
20:43
< Derakon>
But it feels pretty hackish to examine a module like this and toss its functions into a class instance by directly modifying its __dict__.
20:51
< Fantastic_Phox>
Oh, that's cool.
20:52
< Fantastic_Phox>
Instructor for an introductory C++ programming class mandates that everyone use Netbeans. He fails to give any directions on how to install it, and the necessary compilers.
20:52 * Fantastic_Phox goes to read shit
20:53
< Fantastic_Phox>
If I've got MinGW installed for a different IDE, I should be able to use the existing installation, no?
20:53
< Derakon>
Presumably.
20:54
< Fantastic_Phox>
Ah, but I'd probably have to get additional libraries
20:54
< Fantastic_Phox>
Damn
20:54 * Fantastic_Phox tries, anyways
20:55 * Derakon takes a moment to be amused, again, at the fact that he's routing around the university's IRC block via SSH.
20:55
< Fantastic_Phox>
I've done it a few times
20:55
< Derakon>
(SSHing onto my home computer and using irssi from there)
20:56
< Fantastic_Phox>
Even if they knew you were doing it, I don't think they would care. Policy exists to allow loopholes
20:56
< Fantastic_Phox>
Not that they could block SSH traffic, anyways, without causing serious collateral issues elsewhere
20:59
< Derakon>
Yeah.
20:59
< Derakon>
It's mostly just irritating.
20:59
< Derakon>
I'd rather use a different client.
21:00
< Fantastic_Phox>
Configure your home computer as a proxy and use something like Putty to access it?
21:00
< Fantastic_Phox>
I never had any luck doing that, but it's a little outside of my field of experience
21:01
< Derakon>
Uh. Isn't PuTTY just another telnet/SSH client?
21:02
< Derakon>
I'm using the built-in SSH in OSX.
21:03
< Fantastic_Phox>
Ah. Then, stick with that, I'd say
21:03
< Derakon>
(Also PuTTY would imply that Windows was getting involved at some point, which it is'nt)
21:03
< Derakon>
Er, isn't.
21:03
< Derakon>
Heh.
21:03
< Fantastic_Phox>
Ha, success. Looks like I even had the c++ libraries already.
21:13 * Derakon eyes his PG&E bill.
21:13
< Derakon>
Apparently there's a minimum bill on gas usage.
21:13
< Derakon>
I could increase my gas use by 70% and still pay the same bill...
21:14
< Derakon>
I think.
21:14
< Fantastic_Phox>
Ha, do so.
21:14
< Fantastic_Phox>
Use the excess gas to power an electrical generator, and cut your electrical bill
21:14
< Derakon>
I also apparently used 243kWH of electricity...
21:14 * Derakon goes to see if that's realistic.
21:16
< Derakon>
I guess so.
21:17
< Derakon>
Surprising that that's still $30.
21:24
< Fantastic_Phox>
8 cents a kilowatt hour, here. Sounds about the right price, after distribution
21:24
< Fantastic_Phox>
My parents' place is rural. 75% of their bill is distribution
21:31
< gnolam>
243 kilowatt henry?
21:32 * Tamber throws an hour at gnolam
21:33
< Derakon>
Oh, right, lowercase 'h'. My mistake.
21:35 celticminstrel [celticminst@Nightstar-5d22ab1d.cable.rogers.com] has joined #code
21:35
< gnolam>
http://niemann.blogs.nytimes.com/2011/09/30/log-in/
21:56 AnnoDomini [annodomini@60F158.737D66.CA1918.CC7562] has joined #code
21:57 * Derakon snerks as he names a variable "numNums".
21:57
< Derakon>
(It's the number of numbers to allocate!)
21:58
< Namegduf>
That makes perfect sense
21:58
< Namegduf>
I don't mind seeing it or working with it
21:58
< Namegduf>
But whenever I'm naming a variable and something like that, where a variable is named after its own prefix, happens
21:58
< Namegduf>
I feel compelled to somehow break it
21:58
< Namegduf>
numNumbers or something
21:58 * Derakon nods.
21:58
< Derakon>
This is just for some test code anyway. It won't be in production.
21:58
< Namegduf>
Ah.
22:01
< gnolam>
Coding in Ewok?
22:02
< AnnoDomini>
He's obviously not coding in Tusken Raider.
22:04
< AnnoDomini>
http://chanarchive.org/4chan/tg/9646
22:09
< McMartin>
I'm not sure numNums is any worse than COM_cast
22:09
< Namegduf>
COM_cast offends me due to mixing naming styles
22:10
< Namegduf>
Although naming your varables COM_CAST I guess would be even worse
22:10
< Namegduf>
Really I guess there's no good way to use something non-constant prefixed with COM_
22:15
< McMartin>
Well, it's dynamic_cast, but for COM objects, and COM is an acronym
22:16 * AnnoDomini names all his variables COM_cast. All of them.
22:16
< Namegduf>
McMartin: So com_cast
22:16
< Namegduf>
Or at least COM_Cast
22:16
< Namegduf>
Either you're capitalising or you're not
22:17
< Derakon>
Or expand the COM acronym~
22:18
< McMartin>
As a rule you have to do this a lot, and it's already a template -_-
22:19 * McMartin hasn't yet decided whether COM or GObject is worse
22:19
< AnnoDomini>
GObject sounds like a class name.
22:19
< McMartin>
More or less.
22:19
< McMartin>
It's the completely insane object system that Gtk and GNOME use built mostly out of the C Preprocessor
22:19
< AnnoDomini>
In one Uni class, we had classes named CStar, CCircle, CWhatever.
22:20
< Namegduf>
I take prefixing significant numbers of things with stuff as a hint that either the prefix is redundant or I need to use better namespacing
22:20
< Namegduf>
It still happens sometimes, though.
22:21
< Derakon>
So is COM::cast better?
22:22
< gnolam>
The one decent use of that awful Hungarian 'C' prefix is when you're writing a HUD class.
22:23
< McMartin>
Derakon: Not really.
22:23
< McMartin>
Since the whole point here is to replace IUnknown::QueryInterface
22:23
< celticminstrel>
Yay, everything works... except for exporting to bitmap, that is.
22:24
< Derakon>
What's your renderer, CM?
22:24
< celticminstrel>
Hm?
22:24
< Derakon>
SDL? OpenGL?
22:24
< celticminstrel>
Oh, OpenGL.
22:24
< Derakon>
Jetblade has a functional export-rendered-view-to-image system. A moment.
22:25
< celticminstrel>
I haven't investigated the actual cause of the issue, but while the export "works" the resulting file is invalid.
22:25 Rhamphoryncus [rhamph@Nightstar-14eb6405.abhsia.telus.net] has joined #code
22:25
< Derakon>
Oh, okay.
22:29 celticminstrel is now known as celmin|away
22:31 AnnoDomini [annodomini@60F158.737D66.CA1918.CC7562] has quit [[NS] Quit: leaving]
22:32
< McMartin>
Elch. Actually, com_cast isn't any less inconvenient.
22:32 * McMartin mutters at C++'s lack of type inference.
22:35 * Derakon demonstrates to himself that he could still pass the C portion of the CS60 course he took in college. >.>
22:36
< Derakon>
Well, the first assignment or so anyway.
22:36
< Derakon>
(Read: I made a linked-list struct)
22:36
< Derakon>
This seems like such a hack, but argh.
22:37
< Derakon>
The problem is that one of the third-party functions I want to call takes a char** argument, by which it returns a 1D array of data that I, the client, had previously handed to it.
22:37
< Derakon>
And getting this to mesh cleanly with Python seems to be beyond me.
22:38
< Derakon>
So instead I'm trying to write my own C library that handles allocation and deallocation of buffers and wraps around these functions.
22:40 * Fantastic_Phox facedesks at his lab. spacing points equally along a curve, and finding the length and angle from one end. Kind of a classic problem. The math's not hard, but my description of the steps required is incomprehensible.
22:48
< Fantastic_Phox>
Ugh, and it doesn't even reflect how I'm really going to be doing it
22:48
< Fantastic_Phox>
What a hassle. I hate writing things in plain english.
22:49
< Fantastic_Phox>
I'll just code, then describe. Much easier
23:16 celmin|away is now known as celticminstrel
23:31
< celticminstrel>
So apparently the compiler is inserting gads of padding between all the elements of the bitmap header, for some reason.
23:31
< celticminstrel>
s/elements/fields/
23:32
< celticminstrel>
There should be no padding at all, correct?
23:32
< McMartin>
celticminstrel: Aha, struct alignment
23:32
< McMartin>
No, without compiler commands, stuff in a struct gets spread out so that each pointer is aligned with its pointer width
23:32
< celticminstrel>
I even had #pragma pack(push,2) and it didn't do anything.
23:32
< McMartin>
Pretty sure you want pack 1.
23:33
< celticminstrel>
...well, it was 2 in wingdi.h or whatever the header was.
23:33
< celticminstrel>
But I'll try 1 then.
23:33
< celticminstrel>
And I suppose apply it to both structs instead of just the one.
23:34
< celticminstrel>
I'm assuming that if using the Windows structs on a Windows compiler the alignment will be correct.
23:35
< celticminstrel>
GLUI annoyingly has backspace and delete reversed.
23:37
< celticminstrel>
Pack 1 didn't seem to help; I'll try __attribute__((packed)).
23:37
< celticminstrel>
Or whatever it is.
23:41
< celticminstrel>
I think it's just ignoring my instructions...
23:42
< celticminstrel>
Wait a second, I'm doing something wrong here. Maybe it's working better than I thought.
23:44
< celticminstrel>
Okay, there's less padding than I though, but there's still padding.
23:44
< Lingerance>
Try ordering them from largest size'd element to smallest. The compiler will usually put them on an address that's divisible by their size if it can.
23:46
< Derakon>
Gotta love how you can add a new file to a project, thereby causing an old file to stop compiling correctly.
23:46
< Derakon>
Go go accurate compilation error codes.
23:47
< celticminstrel>
Wait, there's no padding.
23:47
< celticminstrel>
I think I'm using the wrong size for a long.
23:47
< celticminstrel>
Either that or every long is being allocated double space, which seems infinitely less likely.
23:47
< Lingerance>
... and that is why I use stdint.h for all my integers now
23:49
< celticminstrel>
32 bits = 4 bytes doesn't it?
23:49
< McMartin>
Yes
23:49
< Lingerance>
Y
23:50
< celticminstrel>
...it looks like the long is 8 bytes.
23:50
< celticminstrel>
Except Windows makes it 4.
23:50
< Derakon>
The definition of "long" is, IIRC, up to the compiler.
23:50
< celticminstrel>
Well, MinGW on Windows.
23:50
< McMartin>
int and long are Whatever The Fuck They Want.
23:50
< Derakon>
What do you get from "sizeof(long)"?
23:50
< celticminstrel>
DWORD and LONG are supposed to be four bytes, right?
23:50
< McMartin>
Uh
23:51
< McMartin>
long is 4 or 8 depending.
23:51
< McMartin>
int is 2, 4, or 8, depending
23:51
< McMartin>
The only requirement is that sizeof(short) <= sizeof(int) <= sizeof(long)
23:51
< Derakon>
And sizeof(char) == 1.
23:51
< McMartin>
Often 8 is "long long", but sometimes not!
23:51
< McMartin>
Especially when targeting 64-bit architectures, which MinGW does not do, but.
23:52
< Derakon>
I remember some friends who were writing a program to calculate interstellar distances as part of some programming competition.
23:52
< Derakon>
They discovered that the distances involved exceeded the precision they had allocated for their distance numbers.
23:52
< celticminstrel>
Well, Wikipedia uses uint32_t for the bmp headers, so I'll follow its example.
23:52
< celticminstrel>
.
23:52
< Derakon>
So they put "typedef int long long;" at the top of the program.
23:52
< celticminstrel>
...that's not actually possible, is it?
23:53
< McMartin>
I don't know if you can do it with typedef, but you can certainly do it with #define.
23:53
< Derakon>
Maybe it was #define.
23:53
< celticminstrel>
Ah yes, #define could do it.
23:53
< Derakon>
And you can do all kinds of horrible things to the language if you really want to.
23:55
< celticminstrel>
Looks like my header is working.
23:55
< Derakon>
\o/
23:55
< celticminstrel>
And for Windows I'm just typedef'ing the windows.h stuff (and made sure to use the same field names in my version, of course), so it should be fine there as well.
--- Log closed Fri Oct 07 00:00:02 2011
code logs -> 2011 -> Thu, 06 Oct 2011< code.20111005.log - code.20111007.log >

[ Latest log file ]