code logs -> 2007 -> Wed, 28 Mar 2007< code.20070327.log - code.20070329.log >
--- Log opened Wed Mar 28 00:00:58 2007
00:01 Thaqui [~Thaqui@Nightstar-12000.jetstream.xtra.co.nz] has joined #code
00:01 mode/#code [+o Thaqui] by ChanServ
00:17 Jo}{n is now known as EvilDarkLord
--- Log closed Wed Mar 28 00:45:44 2007
--- Log opened Wed Mar 28 00:45:49 2007
00:45 TheWatcher[afk] [~chris@Nightstar-29731.dsl.in-addr.zen.co.uk] has joined #code
00:45 Irssi: #code: Total of 20 nicks [8 ops, 0 halfops, 0 voices, 12 normal]
00:46 Irssi: Join to #code was synced in 28 secs
00:46 Sy [Syloq@Nightstar-8008.hsd1.or.comcast.net] has left #code []
00:58 ReivSLEP [~reaverta@IRCop.Nightstar.Net] has joined #Code
00:58 Syloq [Syloq@Admin.Nightstar.Net] has joined #code
01:00 ReivSLEP is now known as Reiv
01:54 * Raif eats it.
02:18 McMartin[TheCity] is now known as McMartin
02:22 Thaqui [~Thaqui@Nightstar-12000.jetstream.xtra.co.nz] has left #code [Leaving]
02:25 gnolam [Lenin@Nightstar-13557.8.5.253.se.wasadata.net] has quit [Quit: Z?]
02:46 Chalcedon [Chalceon@Nightstar-2422.dialup.ihug.co.nz] has joined #code
02:46 mode/#code [+o Chalcedon] by ChanServ
03:02 Chalcedon [Chalceon@Nightstar-2422.dialup.ihug.co.nz] has quit [Quit: gone]
03:10 Janus [~Cerulean@Nightstar-10302.columbus.res.rr.com] has quit [Quit: Jouets de Dieu, jouets de jouets, les jouets de me, na?tre Clair enfant voire.]
04:23 Chalcedon [Chalceon@Nightstar-6532.dialup.ihug.co.nz] has joined #code
04:23 mode/#code [+o Chalcedon] by ChanServ
04:27 Vornicus-Latens [~vorn@Admin.Nightstar.Net] has quit [Ping Timeout]
04:32 Vornicus-Latens [~vorn@67.50.40.ns-3674] has joined #code
04:33 Chalcy [Chalceon@Nightstar-6532.dialup.ihug.co.nz] has joined #code
04:33 mode/#code [+o Chalcy] by ChanServ
04:34 ChalcyGone [Chalceon@Nightstar-6532.dialup.ihug.co.nz] has joined #code
04:34 Chalcedon [Chalceon@Nightstar-6532.dialup.ihug.co.nz] has quit [Killed (NickServ (GHOST command used by ChalcyGone))]
04:35 Chalcy [Chalceon@Nightstar-6532.dialup.ihug.co.nz] has quit [Killed (NickServ (GHOST command used by ChalcyGone))]
04:35 ChalcyGone is now known as Chalcedon
04:57 Chalcedon [Chalceon@Nightstar-6532.dialup.ihug.co.nz] has quit [Quit: gone]
05:00 Reiv is now known as ReivClass
07:42 MahalWork is now known as Mahal
07:42 Mahal is now known as MahalWork
07:42 MahalWork is now known as Mahal
07:44
<@Raif>
Vorn: Halflife 2 had dynamic skeletal... and some very cool interpolation techniques.
07:45 ReivClass is now known as Reiv
10:10 Vornicus-Latens is now known as Vornicus
11:00 Thaqui [~Thaqui@Nightstar-12000.jetstream.xtra.co.nz] has joined #code
11:00 mode/#code [+o Thaqui] by ChanServ
12:22 AnnoDomini [~farkoff@Nightstar-29600.neoplus.adsl.tpnet.pl] has quit [Ping Timeout]
12:22 KBot [~karma.bot@Nightstar-29708.neoplus.adsl.tpnet.pl] has joined #Code
12:23
< KBot>
KarmaBot v1.19. online and ready. Type "!help commands" for command list.
12:23 KarmaBot [~karma.bot@Nightstar-29600.neoplus.adsl.tpnet.pl] has quit [Ping Timeout]
12:23 KBot is now known as KarmaBot
12:27 AnnoDomini [~farkoff@Nightstar-29708.neoplus.adsl.tpnet.pl] has joined #Code
12:27 mode/#code [+o AnnoDomini] by ChanServ
13:30 AnnoDomini [~farkoff@Nightstar-29708.neoplus.adsl.tpnet.pl] has quit [Killed (NickServ (GHOST command used by AbuDhabi))]
13:30 AnnoDomini [~farkoff@Nightstar-29490.neoplus.adsl.tpnet.pl] has joined #Code
13:31 KarmaBot [~karma.bot@Nightstar-29708.neoplus.adsl.tpnet.pl] has quit [Ping Timeout]
13:39 KarmaBot [~karma.bot@Nightstar-29490.neoplus.adsl.tpnet.pl] has joined #Code
13:40
< KarmaBot>
KarmaBot v1.19. online and ready. Type "!help commands" for command list.
13:56
< AnnoDomini>
"How many C programmers does it take to change a lightbulb?" "None. They forgot to declare it."
13:56
< AnnoDomini>
:P
14:09 AnnoDomini [~farkoff@Nightstar-29490.neoplus.adsl.tpnet.pl] has quit [Ping Timeout]
14:10 KBot [~karma.bot@Nightstar-29165.neoplus.adsl.tpnet.pl] has joined #Code
14:10 KarmaBot [~karma.bot@Nightstar-29490.neoplus.adsl.tpnet.pl] has quit [Ping Timeout]
14:12 KarmaBot [~karma.bot@Nightstar-29165.neoplus.adsl.tpnet.pl] has joined #Code
14:12
< KarmaBot>
KarmaBot v1.19. online and ready. Type "!help commands" for command list.
14:13 KBot [~karma.bot@Nightstar-29165.neoplus.adsl.tpnet.pl] has quit [Ping Timeout]
14:14 AnnoDomini [~farkoff@Nightstar-29165.neoplus.adsl.tpnet.pl] has joined #Code
14:14 mode/#code [+o AnnoDomini] by ChanServ
16:30 Reiv is now known as ReivZzz
16:40 * Vornicus fiddles with database stuff.
16:55 Reiv [~reaverta@IRCop.Nightstar.Net] has joined #Code
16:57 * ToxicFrog fiddles with a set of Lua functions for packing and unpacking binary data
16:57 * Reiv ponders if there'd somehow be a way to tie 'middle click' to a keyboard combo.
16:57 ReivZzz [~reaverta@IRCop.Nightstar.Net] has quit [Ping Timeout]
16:58
< ToxicFrog>
Hmm. I have bcdfimsuxz, what else do I need?
17:01
< Vornicus>
TF: expand those, would you.
17:01
< ToxicFrog>
(that's boolean, character (synonym for s1), double, float, signed int, bitmask, string/arbitrary data, unsigned int, skip, null-terminated/padded string
17:01
< Vornicus>
http://docs.python.org/lib/module-struct.html
17:02
< ToxicFrog>
Yeah, I'm avoiding the "let's have eighteen different characters for 'int'" thing.
17:03
< Vornicus>
http://www.ruby-doc.org/core/classes/Array.src/M002245.html
17:03
< ToxicFrog>
Instead you just append the width you want.
17:03
< ToxicFrog>
Ie,
17:03
< ToxicFrog>
Ie, 's124' is a 124-character string, 'u4' is a uint32_t, 'i2' is a signed short, etc.
17:03
< Vornicus>
AH
17:03
< ToxicFrog>
This also means you can read 24-bit ints with u3 and i3.
17:04
< Vornicus>
That is more sensical by half.
17:04
< ToxicFrog>
Which python's struct() does not permit, tsk tsk.
17:04
< Reiv>
Apparently "Middle Mouse Button Keyboard Shortcut Binding XP" is not a very useful string to search for in Google.
17:04
< Reiv>
Then again, maybe 4AM is a bad time to become obsessed with fixing a problem like this.
17:05
< ToxicFrog>
'sN' reads exactly N bytes; 'zN' reads exactly N bytes, but returns only the data up to the first nul; 'z' reads up to the first nul.
17:05
< ToxicFrog>
And so forth.
17:06
< Vornicus>
But by the same token, there are no less than four floating point types.
17:06
< ToxicFrog>
There are?
17:06
< Vornicus>
float, double, long double, and quad.
17:06
< ToxicFrog>
...bugger.
17:06
< Vornicus>
The latter two are rare, but I have seen at least one program that does long doubles.
17:06
< ToxicFrog>
And with those, you can't just specify an arbitrary width.
17:07
< ToxicFrog>
(I only need floats for this, but someone else will almost certainly want doubles)
17:07
< Vornicus>
Eh. Not a big deal; they're rare enough that most languages do not handle them.
17:08
< ToxicFrog>
I'm actually writing this for libss1edit, but it's generally useful enough that I'll release it as a seperate lib.
17:08
< ToxicFrog>
And small enough that I probably will actually document and release it.
17:08
< ToxicFrog>
Bah, the Python one doesn't support booleans or bitmasks either.
17:09
< Vornicus>
Python doesn't really know what a bitmask is. I don't know why it doesn't support booleans though
17:09 * Reiv arg.
17:10
< Reiv>
Is it really so impossible to imagine that someone out there hasn't written a program to get a keyboard shortcut that acts as a middle-mouse-button-click?
17:10
< ToxicFrog>
('bN' is basically 'uN', then it returns (val ~= 0))
17:11
< Vornicus>
~=?
17:11
< ToxicFrog>
Lua's inequality operator.
17:11
< Vornicus>
ah
17:11
< ToxicFrog>
Equivalently (not (val == 0))
17:12
< ToxicFrog>
Reiv: I don't even know if binding keystrokes to mouse clicks is generally possible in windows, although it should be.
17:12
< ToxicFrog>
You may be looking in the wrong places, though. Look for macro software, then create a macro of middle-click and bind it.
17:13
< ToxicFrog>
Vornicus: Lua doesn't know what a bitmask is, but I still want to be able to extract one from binary files.
17:13
< ToxicFrog>
It returns it as a list of booleans.
17:14
< Vornicus>
ah
17:16
< ToxicFrog>
For that matter, python's struct() will read pointers, but not bitmasks?
17:16
< ToxicFrog>
Weirdness.
17:16
< Vornicus>
I don't quite get that.
17:17 * ToxicFrog ponders the Ruby one
17:17
< ToxicFrog>
Ok, I'm totally ganking @
17:17
< ToxicFrog>
And this has made me aware I need some way to specify endianness.
17:19
< Vornicus>
Python's does pretty good on that one.
17:19
< ToxicFrog>
How does it handle it?
17:19
< Vornicus>
First character in a pack string defines the endianness.
17:20
< Vornicus>
If it is in @ = < > !
17:20
< Vornicus>
In the doc I sent you, it's about 2/3 of the way down the page.
17:22
< ToxicFrog>
Hmm. I'll probably steal that, too.
17:22
< ToxicFrog>
Mine distinguishes between width and count, too.
17:22
< ToxicFrog>
u3,4 is four 24bit unsigned ints.
17:22
< Vornicus>
That's pretty cool.
17:23
< ToxicFrog>
Putting it in front looks better - 4u3 - but then we have to mandate whitespace between format specifiers.
17:23
< Vornicus>
I prefer your way, I think
17:23
< ToxicFrog>
To me, u3,4 looks like a range of 3 to 4.
17:23
< ToxicFrog>
Whereas 4u3 looks like 4*u*3
17:24
< Vornicus>
u3*4
17:24
< ToxicFrog>
That works.
17:24 * ToxicFrog updates the formal grammar
17:26
< ToxicFrog>
FORMAT = ALIGN FIELD FORMAT | e
17:26
< ToxicFrog>
ALIGN = '=' | '<' | '>' | e
17:26
< ToxicFrog>
FIELD = typechar WIDTH COUNT
17:26
< ToxicFrog>
WIDTH = integer | e
17:26
< ToxicFrog>
COUNT = '*' integer | e
17:26
< ToxicFrog>
...whoops
17:26
< ToxicFrog>
FORMAT = ALIGN FIELDS
17:26
< ToxicFrog>
FIELDS = FIELD FIELDS | e
17:27
< ToxicFrog>
Although that still looks weird to me. u(3*4) instead of 4(u3). Maybe I'll just have it accept both.
17:29 * ToxicFrog also picks a for align-to, which will be necessary for the resource file handler
17:30
< ToxicFrog>
So, now we have: data types boolean, float, double, signed int, bitmask, string/data, unsigned int, cstring
17:31
< ToxicFrog>
And control types endianness, seek-offset, align-width, and skip/pad
17:31
< ToxicFrog>
...hmm.
17:31 * ToxicFrog fiddles
17:32
< ToxicFrog>
Ok, @ is absolute seek, + is relative seek forward, - is relative seek backward
17:32
< Vornicus>
+ is a synonym for skip?
17:32
< ToxicFrog>
x is equivalent to + when reading, except that it actually reads (and discards) data, and will thus work on non-seekable streams
17:33
< ToxicFrog>
When writing, + is 'call :seek()', x is 'write nulls'
17:33
< Vornicus>
aha
17:35
< ToxicFrog>
('xN' thus becomes equivalent to 'zN',"")
17:35
< ToxicFrog>
(but is more convenient)
17:36
< ToxicFrog>
The idea here is that when calling destruct(), you can pass it either a string (which it treats as a buffer) or something else, which it will assume is a file-like object and use :read() and :seek() on and so forth.
17:37
< ToxicFrog>
And thus it will work on any file- (or, as long as you don't try to seek, stream-) -like object, as long as it uses the same API as Lua's io library.
17:38
< ToxicFrog>
For construct(), if the first argument is the format string, it constructs and returns a buffer; otherwise it once again assumes it's a file-object and tries to talk to it directly.
17:39
< ToxicFrog>
So you can go, say, construct(fout, "z124u4", "LG RES file v3", toc_offs) and it will drop the data directly into the file.
17:50
< Vornicus>
Arg! I also want to make an X-Com-alike! I should stop gaming, or something.
17:54
< Reiv>
Vorn: Tell you what.
17:54
< Reiv>
Finish Settlers of Catan.
17:54
< Reiv>
Then, look into that X-Com remake folks are working on, see if there's Any Hope For It.
17:54
< Reiv>
And then
17:54
< Reiv>
Set up a project to remake Master of Orion.
17:54
< Vornicus>
Heh
17:55
< Reiv>
(I'm assuming it's source code is Horribly Arcane and Unable To Be Cracked?)
17:55
< Vornicus>
heh
17:55
< Vornicus>
I'm not going to break open the MoO source code, that would not be kosher.
17:57
< Reiv>
1) No?
17:58 Reiver [~reiver@Nightstar-28072.ubs-dsl.xnet.co.nz] has quit [Ping Timeout]
17:58
< Reiv>
2) I was more thinking along the lines of if you wanted to get a carbon-copy-esque game, it would at least let you see what things did which without exhaustive statistical testing.
17:58
< Vornicus>
Actually the "physics" of MoO are pretty clear.
18:00
< Vornicus>
The map generation - what rarity various planets and stars are - and the exact population growth function are the only things I don't know yet.
18:04
< Vornicus>
oh, and the exact mechanics of how a race's tech tree is chosen.
18:05 Reiver [~reiver@Nightstar-28072.ubs-dsl.xnet.co.nz] has joined #Code
18:07 * Vornicus fiddles with his database design.
18:22 gnolam [Lenin@Nightstar-13557.8.5.253.se.wasadata.net] has joined #Code
18:22 mode/#code [+o gnolam] by ChanServ
18:37 * Vornicus fiddlefiddles
18:38
<@AnnoDomini>
* Rome burnsburns.
19:50 gnolam [Lenin@Nightstar-13557.8.5.253.se.wasadata.net] has quit [Quit: Reboot]
20:09 gnolam [Lenin@Nightstar-13557.8.5.253.se.wasadata.net] has joined #Code
20:10 mode/#code [+o gnolam] by ChanServ
20:28 Mahal is now known as MahalShower
20:45 MahalShower is now known as Mahal
20:55 Mahal is now known as MahalWork
21:05
< Vornicus>
gnarg. ORMs that essentially demand you follow their rules suck.
21:23
<@gnolam>
ORMs?
21:24
< Vornicus>
Object-Relational Models
21:25
< Vornicus>
The thing you use to talk to a database and turn the stuff you get from there into language objects.
21:25
<@gnolam>
Ah. Never encountered the abbreviation before.
21:49
< MyCatVerbs>
Mappings!
21:49
< MyCatVerbs>
gnolam: I am led to believe that it is the most insanely difficult PITA going. Or something.
21:49
< Vornicus>
Mappings, yeah
21:50
< Vornicus>
And, it is a very hard problem. So far the easiest one I've dealt with is Ruby on Rails' ActiveRecord, which still demands you put in a lot of stuff, it can't just read your schema files and make all the relationships go.
21:50
< MyCatVerbs>
AFAIK, the problem is that OO often leads people to build structures which resemble interestingly-shaped graphs, while RDMSes are amenable to rather flatter storage systems?
21:51
< MyCatVerbs>
The wierd thing is that this problem is probably easier in a shit language like C++ than a useful one like Ruby. Huh.
21:53
< Vornicus>
The current batch of ORMs have two problems.
21:53
< MyCatVerbs>
Jah?
21:54
< Vornicus>
1. they assume too much about your schema
21:54
< Vornicus>
2. they don't ask the schema enough.
21:54
< Vornicus>
So ActiveRecord, for instance, ignores foreign key relationships.
21:54
< MyCatVerbs>
...what? Those both sound like implementation details, rather than essential complexity. Are you *sure* that's not just the tip of an iceberg?
21:55
< Vornicus>
These are the tip of the iceberg, but they're the problems I see in front of me.
21:55
< MyCatVerbs>
Ook.
21:55
< Vornicus>
I can't evaluate any other problems of the relationships without getting this crap out of the way.
21:56
< MyCatVerbs>
Ook. :/
21:57
<@gnolam>
MyCatVerbs: oh, I know what it is. I just hadn't come across the abbreviation of it. :)
21:57
< MyCatVerbs>
gnolam: What others are there?
21:58
< Vornicus>
AR /is/ kinda nice, it has stuff that lets a database table act as a tree... but I still have to tell it everything about the relationships in my tables, and if I don't use /its specific table scheme/ I have to tell it everything about everything in my tables.
22:04
< Vornicus>
And Ruby does have the right kinds of toys in it - openable classes means that it, technically, should be able to figure out the tables at startup and add the appropriate methods to the classes in question.
22:05
< Vornicus>
It's just... too bad that more power is not being driven into making the orm understand more about the underlying database so I don't have to say things twice.
22:33 MyCatVerbs [~mycatownz@Nightstar-13709.lurkingfox.co.uk] has quit [Client exited]
22:37 gnolam [Lenin@Nightstar-13557.8.5.253.se.wasadata.net] has quit [Quit: Reinstalling OS.]
23:08 MyCatVerbs [~mycatownz@Nightstar-13709.lurkingfox.co.uk] has joined #code
23:57 Chalcedon [Chalceon@Nightstar-1800.dialup.ihug.co.nz] has joined #code
23:57 mode/#code [+o Chalcedon] by ChanServ
--- Log closed Thu Mar 29 00:00:59 2007
code logs -> 2007 -> Wed, 28 Mar 2007< code.20070327.log - code.20070329.log >