code logs -> 2009 -> Sun, 03 May 2009< code.20090502.log - code.20090504.log >
--- Log opened Sun May 03 00:00:57 2009
00:12 AnnoDomini [AnnoDomini@Nightstar-7062.neoplus.adsl.tpnet.pl] has quit [Quit: EvilDarkLord, on 4e: "Oh good, they kept the dumpstat."]
00:17 * Derakon mutters at the building icon and text on this page, which are supposed to be side-by-side. http://derakon.dyndns.org/~chriswei/games/c221/cheatsheet.html
00:28 somnolence [~somnolenc@Nightstar-3790.hsd1.ca.comcast.net] has quit [Client exited]
01:00 You're now known as TheWatcher[T-2]
01:02 Vornicus [~vorn@Nightstar-3614.dyn.optonline.net] has quit [Quit: This computer has gone to sleep]
01:02 Attilla_ [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has quit [Connection reset by peer]
01:02 Attilla [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has joined #code
01:02 mode/#code [+o Attilla] by ChanServ
01:03 SmithKurosaki [~Jenn@Nightstar-7213.cpe.net.cable.rogers.com] has joined #code
01:05 You're now known as TheWatcher[zZzZ]
01:10
<@Consul>
Here's a general comp-sci question that I don't remember if I've asked already: Can it be possible for an interpreted "scripting" type of language to operate real time?
01:11
<@Consul>
I suppose Csound is already like that, except with Csound, all you're really doing is stringing together "opcodes" that are pre-written in C.
01:16
<@Derakon>
Define "real time"?
01:16
<@Consul>
I guess I would mean "suitable for real-time audio DSP development", since that's what I'm interested in.
01:20
<@Derakon>
So, very low-latency, high-speed code?
01:20
<@Consul>
I guess so.
01:20
<@Consul>
Actually, I shouldn't say that. Yes, that's right. That's what I should say.
01:21
<@Derakon>
Honestly I don't know. I don't really do any work that demands that kind of fast response time.
01:23
<@gnolam>
Consul: depends on the real-time support of the OS.
01:23
<@gnolam>
+underlying
01:24
<@Consul>
On Linux with an RT kernel?
01:24
<@Consul>
Which the recent kernel version finally got sorted out again.
01:24
<@gnolam>
Unless the OS is real-time, no interpreter in the world is going to give you hard real-time.
01:24
<@Consul>
Well, softsynths don't need hard-real time. Soft is okay.
01:30
<@gnolam>
Well, then go for it. :)
01:31
<@Consul>
Oh, I'm in no position to create a new language.
01:31
<@Consul>
I was just asking a hypothetical question.
01:32
<@gnolam>
But choose your language well. A garbage collector kicking in at an inopportune moment can really ruin your day here.
01:34
<@Consul>
Well, here's where choices in goal are important. If one (not me! Not now, anyway) is wanting to make an audio DSP scripting language, techniques for memory management and GC and data structures can be made specific to the task at hand.
01:40
<@Consul>
Or I could be talking out of my ass. I don't know yet.
01:55 Vornicus [~vorn@Nightstar-3614.dyn.optonline.net] has joined #code
01:55 mode/#code [+o Vornicus] by ChanServ
02:03
<@gnolam>
They can.
02:03
<@gnolam>
But it's not trivial. :)
02:03 * Vornicus wonders what They can do.
02:03
<@Derakon>
Consul's considering what would be required to make a realtime scripting language for audio DSP.
02:04
<@Derakon>
Specifically the feasibility of saying "Okay, I need this kind of memory management and GC for this section of code".
02:04
<@Vornicus>
Aha
02:05
<@Consul>
Stop talking as if I'm qualified to create a new language. :-P
02:05
<@gnolam>
Not so much "this section of code" as "this application", but yeah. Definitely feasible. I seem to recall a paper on real-time GCing a while back...
02:05
<@Derakon>
Hey, no worries.
02:05
<@Consul>
All I was asking is if it's possible. The consensus seems to be "yes."
02:05
<@Derakon>
You have any idea how many completely unqualified people discuss what would be needed to make a videogame?
02:05
<@Derakon>
Theorycrafting is fun.
02:06
<@Consul>
Well, I suppose one way to become qualified is to dive in head-first and get anything to work.
02:06
<@gnolam>
In my experience, they then show up at your local programming forum and go "Hi! I've never programmed a game before. In fact, I've never programmed at all before. I'm going to make a MMORPG..."
02:07
<@Consul>
That's kinda how I feel sometimes.
02:08
<@Consul>
Every time I start to think I'm getting to know something about programming, McMartin or ToxicFrog pull the rug out from under me. :-)
02:08
<@gnolam>
Diving in head first is actually the best way to learn.
02:08
<@Derakon>
Agreed.
02:09
<@Derakon>
It can be pretty painful sometimes, though. :)
02:09
<@gnolam>
Yeah. Try to make a MMORPG on your first attempt and you'll break your neck.
02:09
<@Derakon>
s/on your first attempt//
02:09
<@Consul>
Heh
02:12
<@Vornicus>
This said making a multiplayer game is easier in many ways than making a single player game.
02:13
<@Derakon>
...how do you figure?
02:19
<@Consul>
Just out of curiosity, if one wanted to make a new language, where would he or she start?
02:29
<@Vornicus>
Der: a single player game, you have to define the AI of other agents in the game; a multiplayer game you don't have to write any AI, which is good when you're aiming at something less like Geemers and more like, say, Protoss.
02:31
<@Derakon>
Oh, you mean pure multiplayer, PvP only.
02:31
<@Vornicus>
Indeed.
02:33
<@Vornicus>
As far as creating a language goes. 1. decide what paradigm and approximate syntax you'd like.
02:34
<@Vornicus>
2. look at other languages in the field that might do the job; see if you can adapt or use straight one of these languages.
02:36 * Vornicus pokes at Python
02:37
<@Vornicus>
I have an object. I need to add an attribute to it, and the name of the attribute is a string.
02:37
<@Derakon>
setattr?
02:37 * Vornicus tries it.
02:38
<@Vornicus>
AttributeError: 'object' object has no attribute 'setattr'
02:38
<@Derakon>
Er, setattr is a builtin.
02:38
<@Derakon>
It lets you set attributes on objects.
02:38
<@Vornicus>
Ah
02:38
<@Derakon>
setattr(object, name, value)
02:39
<@Derakon>
And getattr(object, name) to get attributes out. In general, if you're using these a lot, something is wrong.
02:39
<@Vornicus>
Right now I'm reading in a file.
02:39
<@Derakon>
(But I needed them in Fusillade for something, which is why I know about them)
02:42 * Vornicus then needs to use the data for more standard things.
02:47 Consul [~consul@Nightstar-3183.dsl.sfldmi.ameritech.net] has quit [Quit: Leaving]
02:50 Consul [~consul@Nightstar-3183.dsl.sfldmi.ameritech.net] has joined #code
02:50 mode/#code [+o Consul] by ChanServ
02:50
<@Consul>
Well, that was a most interesting sound driver crash.
02:50
<@Consul>
I think it's time to gather some data together for a bug report.
02:58 Attilla [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has quit [Connection reset by peer]
02:58 Attilla [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has joined #code
02:58 mode/#code [+o Attilla] by ChanServ
03:03 Attilla [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has quit [Connection reset by peer]
03:03 Attilla_ [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has joined #code
03:09 Consul [~consul@Nightstar-3183.dsl.sfldmi.ameritech.net] has quit [Quit: Leaving]
03:10 Consul [~consul@Nightstar-3183.dsl.sfldmi.ameritech.net] has joined #code
03:10 mode/#code [+o Consul] by ChanServ
03:10 gnolam [lenin@Nightstar-1382.A163.priv.bahnhof.se] has quit [Quit: Z?]
03:31
<@Vornicus>
This is not working.
03:31
<@Vornicus>
setattr(character, key.strip(), val.strip())
03:31
<@Vornicus>
AttributeError: 'object' object has no attribute 'player'
03:32
<@Derakon>
Weird. It's supposed to add the attribute if it's missing.
03:42
<@Vornicus>
Turns out object() doesn't like that.
03:43
<@Vornicus>
so I inherited from object() and that accepted it.
03:43
<@Vornicus>
class Character(object): pass
03:43
<@Vornicus>
character = Character()
03:53 Attilla_ [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has quit [Ping Timeout]
03:53 Attilla [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has joined #code
03:53 SmithKurosaki [~Jenn@Nightstar-7213.cpe.net.cable.rogers.com] has quit [Ping Timeout]
04:08 Syloqs-AFH [Syloq@ServicesAdmin.Nightstar.Net] has quit [Ping Timeout]
04:11 Syloqs_AFH [Syloq@Admin.Nightstar.Net] has joined #code
04:13 Syloqs_AFH is now known as Syloqs-AFH
04:28
<@Consul>
You know, 64-bit archs have been around long enough that devs should have caught up by now.
04:28
<@Consul>
Looks like I can't use RealPlayer until I reinstall 32-bit Jaunty.
04:28
<@Derakon>
...you want to use RealPlayer?
04:29
<@Consul>
And of course, the dumbasses at the BBC have all of their radio streaming use RealPlayer
04:29
<@Derakon>
Ah.
04:29
<@Consul>
Otherwise, I wouldn't care.
04:30
<@Consul>
How many years have we had 64-bit home PCs now? Four or so? More?
04:30
<@Consul>
But I guess if it ain't Intel, it ain't real.
04:31
<@Consul>
Or ain't worth bothering with.
04:36 Consul [~consul@Nightstar-3183.dsl.sfldmi.ameritech.net] has quit [Quit: Leaving]
04:40 Consul [~consul@Nightstar-3183.dsl.sfldmi.ameritech.net] has joined #code
04:40 mode/#code [+o Consul] by ChanServ
04:47 Attilla [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has quit [Quit: <Insert Humorous and/or serious exit message here>]
05:14 Syloqs-AFH [Syloq@ServicesAdmin.Nightstar.Net] has quit [Ping Timeout]
05:22 Syloqs_AFH [~Syloq@Admin.Nightstar.Net] has joined #code
05:23 Syloqs_AFH is now known as Syloqs-AFH
05:26 Syloqs-AFH [~Syloq@ServicesAdmin.Nightstar.Net] has quit [Ping Timeout]
05:35 Syloqs_AFH [~Syloq@Admin.Nightstar.Net] has joined #code
05:36 Syloqs_AFH is now known as Syloqs-AFH
05:45 Syloqs-AFH [~Syloq@ServicesAdmin.Nightstar.Net] has quit [Ping Timeout]
05:48 Syloqs_AFH [~Syloq@Admin.Nightstar.Net] has joined #code
05:49 Syloqs_AFH is now known as Syloqs-AFH
05:54 Syloqs_AFH [Syloq@Admin.Nightstar.Net] has joined #code
05:55 Syloqs-AFH [~Syloq@ServicesAdmin.Nightstar.Net] has quit [Ping Timeout]
05:55 Syloqs_AFH is now known as Syloqs-AFH
06:00 Syloqs-AFH [Syloq@ServicesAdmin.Nightstar.Net] has quit [Ping Timeout]
06:09 KBot [~karma.bot@Nightstar-29726.neoplus.adsl.tpnet.pl] has joined #Code
06:09 KarmaBot [~karma.bot@Nightstar-7062.neoplus.adsl.tpnet.pl] has quit [Ping Timeout]
06:12 KBot is now known as KarmaBot
06:50
<@McMartin>
Man. Getting Haskell to do Integer -> Integer square root was far harder than it should have been.
06:52 * Vornicus just has isinteger which goes return i = int(i), and issquare which goes isinteger(sqrt(i))
06:55
<@McMartin>
The problem is that Haskell doesn't permit you to sqrt an Integer, and doesn't do autocasting since it plays merry Hell with type inference
06:56
<@McMartin>
So if i is, in fact, an integer becuase it was generated by a range operator, you aren't allowed to directly sqrt it.
07:06 Derakon is now known as Derakon[AFK]
07:32 AnnoDomini [AnnoDomini@Nightstar-29726.neoplus.adsl.tpnet.pl] has joined #Code
07:32 mode/#code [+o AnnoDomini] by ChanServ
08:29 Vornicus [~vorn@Admin.Nightstar.Net] has quit [Quit: Leaving]
09:59 You're now known as TheWatcher
10:37 Rhamphoryncus [~rhamph@Nightstar-7184.ed.shawcable.net] has quit [Quit: Rhamphoryncus]
13:17 gnolam [lenin@Nightstar-1382.A163.priv.bahnhof.se] has joined #Code
13:17 mode/#code [+o gnolam] by ChanServ
13:18 Attilla [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has joined #code
13:18 mode/#code [+o Attilla] by ChanServ
14:18 simontwo [~simon@Nightstar-28088.diogenes.hacklab.dk] has joined #code
16:04 Syloqs_AFH [Syloq@Admin.Nightstar.Net] has joined #code
16:05 Syloqs_AFH is now known as Syloqs-AFH
17:17 You're now known as TheWatcher[afk]
17:34 Derakon[AFK] is now known as Derakon
17:35 Syloqs-AFH [Syloq@ServicesAdmin.Nightstar.Net] has quit [Connection reset by peer]
17:37 Syloqs_AFH [Syloq@Admin.Nightstar.Net] has joined #code
17:38 Syloqs_AFH is now known as Syloqs-AFH
18:09 Vornicus [~vorn@ServicesOp.Nightstar.Net] has joined #code
18:09 mode/#code [+o Vornicus] by ChanServ
19:47 Attilla [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has quit [Connection reset by peer]
19:48 Attilla [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has joined #code
19:48 mode/#code [+o Attilla] by ChanServ
20:02 You're now known as TheWatcher
20:32 Derakon is now known as Derakon[AFK]
21:15 Rhamphoryncus [~rhamph@Nightstar-7184.ed.shawcable.net] has joined #code
21:47
<@gnolam>
Oh for fuck's sake.
21:47
<@gnolam>
stderr is apparently Scary and Complicated.
21:47
<@gnolam>
So /of course/, you write your own Win32 functions for debug output instead.
21:48 * gnolam headdesks.
21:58
<@MyCatVerbs>
gnolam: was ist das?
22:01
<@Vornicus>
It's murdering time.
22:01
<@TheWatcher>
?
22:02
<@TheWatcher>
gnolam: which compiler are you using?
22:03
<@gnolam>
MyCatVerbs: What Vorn said. :P
22:04
<@gnolam>
TheWatcher: MSVS2005. Why?
22:04
<@TheWatcher>
Just so's I know which to avoid, really.
22:05 * Vornicus thinks this isn't msvs2005 but the nutbars who are writing the code.
22:06
<@gnolam>
What Vorn said, yet again.
22:06
<@TheWatcher>
Ah, 'kay
22:06 * gnolam is now in a stabby mood.
22:07
<@McMartin>
The only place it wouldn't be is if they're trying to use the equivalent of strerror.
22:07
<@McMartin>
Which requires some man-2 bullshit to handle right in Windows.
22:07
<@McMartin>
(Or, of course, if the program doesn't have a console at all, but since you bring up stderr, I assume this is not the case.)
22:08
<@McMartin>
In the cases where you don't, OutputDebugString is, in fact, your best friend ever.
22:10
<@gnolam>
BTW, this is a cross-platform project...
22:10
<@McMartin>
That doesn't necessarily mean you don't have "log.cpp" or whatever in in the platform-specific dir.
22:11
<@McMartin>
If he's just using WriteFile for no reason, yeah, stabbings.
22:13
<@gnolam>
WriteFile? Pahahah.
22:13
<@McMartin>
I don't have my Win32 book handy to look up the right name for the one that actually requires a pile of extra garbage to not leak memeory, but I think it's something like GetSystemMessage.
22:14
<@McMartin>
Which allocates memory from a heap that is not the one malloc and free talk to.
22:14
<@gnolam>
You see, when /his/ code encounters an error, it calls throwError(). This is what throwError looks like:
22:14
<@gnolam>
void throwError(const char* msg)
22:14
<@gnolam>
{
22:14
<@gnolam>
LPCWSTR __msg = convertChartoLPCWSTR (msg);
22:14
<@gnolam>
LPCWSTR __title = L"ERROR!%!";
22:14
<@gnolam>
MessageBox(NULL, __msg , __title, MB_OK);
22:14
<@gnolam>
exit (1);
22:14
<@gnolam>
}
22:14
<@Vornicus>
it messagebox's.
22:14
<@Vornicus>
Sweet.
22:14
<@gnolam>
It messageboxes and exits. In a horribly convoluted way.
22:15
<@McMartin>
That's not very convoluted.
22:15
<@McMartin>
Well, no more so than Win32 demands.
22:15
<@McMartin>
He's converting the message to UTF-16, because that's what Win32 function calls take when they aren't in Windows 95 compatibility mode
22:15
<@McMartin>
And then he calls one function and quits.
22:16
<@gnolam>
Eceptions? Return values? Who needs 'em!
22:16
<@TheWatcher>
For Win32 code, that's positively straighforward
22:16
<@McMartin>
gnolam: I think the problem here may be *why* he's doing this, not what's being done.
22:16
<@McMartin>
The code there isn't the shortest it could possibly be, but it's arguably more correct if the goal is in fact "put up an error box, die".
22:17
<@McMartin>
... I'm wrong, he fucked it up.
22:17
<@McMartin>
Those should be LPCTSTRs, and he should declare title with _T("ERROR").
22:17
<@McMartin>
(Likewise, the conversion should be a "to-tstring".
22:18
<@gnolam>
And I'm not posting the convertChartoLPCWSTR function, which, incidentally, leaks memory.
22:18
<@McMartin>
That way the code works blindly in both Win32 mode and Win9x code.
22:18
<@McMartin>
gnolam: He fails there because there are Win32 functions for exactly this.
22:18
<@McMartin>
You know my rant about wxWidgets and how it is less a widget library and more a mechanism for testing compiler error generation?
22:18
<@McMartin>
Window's TSTR madness is essentially wx's mechanic done as well as it can be.
22:19
<@McMartin>
Which isn't very well~
22:19
<@McMartin>
Given that he doesn't know about how to do conversion to whatever strings kernel32.dll is using by default this time right, he should have just kept msg as a char * and called MessageBoxA.
22:19
<@McMartin>
But based on your rant, this is not only being called in the case of fatal errors.
22:21
<@McMartin>
(Also, depending on project settings, his code won't compile, because he's assuming MessageBox will always be MessageBoxW)
22:41
<@gnolam>
And oh joy of joys.
22:41
<@gnolam>
Someone else has committed non-compiling code.
22:41
<@McMartin>
Hot
22:41
<@gnolam>
So. That's 2 out of 3 other team members I want to kill.
22:42
<@McMartin>
No buildbot to scream at them?
22:43
<@McMartin>
(Incidentally, what variety of "cross-platform" is this? Is it source-cross-platform, as in something written to use SDL or Qt? Or something more like SDL or Qt themselves where there's a jillion makefiles, one per platform?)
22:52
<@gnolam>
Something that uses SDL.
22:55 Rhamphoryncus [~rhamph@Nightstar-7184.ed.shawcable.net] has quit [Quit: Rhamphoryncus]
22:59 AnnoDomini [AnnoDomini@Nightstar-29726.neoplus.adsl.tpnet.pl] has quit [Quit: It is estimated that approximately one percent of the general population are psychopaths. They are overrepresented in prison systems, politics, law enforcement agencies, law firms, and in the media.]
23:01 * McMartin takes a moment to eye strerror_r.
23:02
<@McMartin>
"If the thread-safe version of this function fails, it sets the following global variables"
23:03
<@Vornicus>
uh...huh.
23:05
<@gnolam>
:)
23:06
<@McMartin>
All this time I'd been assuming that nobody used the thread-safe POSIX APIs merely because they're a comparative pain in the ass
23:08 * gnolam ponders semaphore-based game loops.
23:08
<@McMartin>
Make sure you don't really need a condition variable, but you often don't.
23:08
<@McMartin>
And condition variables are bitches, so if you can get away with a semaphore, go nuts
23:09 * Vornicus examines, bonks his head. Don't want to do all this stuff 6 times. Rejiggers his character sheet calculator thing to use a list of ability scores.
23:11
<@McMartin>
Oh, wait, I was wrong
23:12
<@McMartin>
POSIX is slippery, and demands that its library do things that look like C but aren't.
23:12
<@McMartin>
(errno is a thread-local variable even though it's an assignable lvalue of type int with global scope)
23:13
<@McMartin>
Objection withdrawn, sort of
--- Log closed Mon May 04 00:00:11 2009
code logs -> 2009 -> Sun, 03 May 2009< code.20090502.log - code.20090504.log >