code logs -> 2006 -> Sat, 02 Dec 2006< code.20061201.log - code.20061203.log >
--- Log opened Sat Dec 02 00:00:22 2006
00:06 EvilDarkLord [althalas@Nightstar-17046.a80-186-184-83.elisa-laajakaista.fi] has quit [Ping Timeout]
00:17 EvilDarkLord [althalas@Nightstar-17046.a80-186-184-83.elisa-laajakaista.fi] has joined #code
00:33 Janus [~Cerulean@Nightstar-10302.columbus.res.rr.com] has quit [Quit: Jouets de Dieu, jouets de jouets, et les jouets de me, fait naître Clairvoire.]
01:00 Takyoji [~Takyoji@Nightstar-25280.dhcp.roch.mn.charter.com] has joined #code
01:12
<@McMartin>
http://bugs.uqm.stack.nl/show_bug.cgi?id=926
01:12
<@McMartin>
;_;
01:13 Janus [~Cerulean@Nightstar-10302.columbus.res.rr.com] has joined #Code
01:15
< Janus>
Heh... it seems there's a large difference between '/n' and '/0'. What a discriminating pallette stdio.h has.
01:16
<@McMartin>
\n and \0, sir~
01:18
< Janus>
(won't be receiving a tip at this table.)
01:24
< Takyoji>
Grr, I just officially filled my harddrive
01:24
< Takyoji>
80GB
01:26
< Janus>
What percentage of it is PG-13?
01:26
< Takyoji>
xD
01:27
< Takyoji>
A lot of it is just programs
01:27
< Takyoji>
then some of my sister's music she doesn't remove
01:27
< Takyoji>
then SimCity 4 which takes up about 2.4GB
01:28
< Takyoji>
Then the rest is porno
01:28
< Takyoji>
j/k about the porno part
01:28
< Janus>
Mm-hm.
01:35 Vornicus-Latens is now known as Vornicus
01:47
< Takyoji>
Well.. I suppose some of it is also ROMs
01:52
< MyCatOwnz>
Takyoji: ROMs for illegal hentai games also count as porno, silly.
01:53
< Takyoji>
No they don't.. they're games!
01:58
< Takyoji>
See, here's a quality family picture I came across in my pile of files on my computer. It's not pornographic: http://i15.photobucket.com/albums/a368/takyoji/untitled1.jpg (Buzzlightyear gone wild! :D)
01:59
< Takyoji>
xD
02:04
< MyCatOwnz>
Takyoji: cuuuute!
02:04
< Takyoji>
Indeed. It's the fun, new, and exciting buzzlightyear for all the little boys and girls :D
02:21
< Takyoji>
yee, I have an installation disc for Ubuntu done
02:38 Janus [~Cerulean@Nightstar-10302.columbus.res.rr.com] has quit [Quit: Let's use our cannons to blow up those stupid ships! "Too bad.. I kind of liked that one."]
03:16 MyCatOwnz [~mycatownz@Nightstar-379.dsl.in-addr.zen.co.uk] has quit [Quit: Swiped from the best with pride!]
03:19 Reiver is now known as ReivOut
03:32 McMartin [~mcmartin@Nightstar-10284.dsl.pltn13.pacbell.net] has quit [Quit: for justice]
03:59
< Vornicus>
Random pondering
03:59
< Vornicus>
So, you can make a stack with push/pop, and a queue with the same push and "pull"
03:59
< Vornicus>
Is there a short p-word that you can use for the fourth operation, pushing at the wrong end?
04:04
<@ToxicFrog>
Not that I can think of offhand, and I'm not looking through all 36,422 p-words in /usr/share/dict/words to find one~
04:05
< Vornicus>
...place?
04:18
<@ToxicFrog>
Perhaps.
04:30 Safyra_Away [Safyra@Nightstar-25904.ok.ok.cox.net] has joined #code
04:31 Stephenie [Safyra@Nightstar-25904.ok.ok.cox.net] has quit [Ping Timeout]
05:05 ReivOut [~reaverta@IRCop.Nightstar.Net] has quit [Ping Timeout]
05:26 Takyoji [~Takyoji@Nightstar-25280.dhcp.roch.mn.charter.com] has quit [Quit: Leaving]
05:41 Janus [~Cerulean@Nightstar-10302.columbus.res.rr.com] has joined #code
05:43
< Janus>
... Boy, is this ever the lot of a questionaire, does anyone know Mingw32 well?
05:55 McMartin [~mcmartin@Nightstar-10284.dsl.pltn13.pacbell.net] has joined #code
05:55 mode/#code [+o McMartin] by ChanServ
06:23 McMartin [~mcmartin@Nightstar-10284.dsl.pltn13.pacbell.net] has quit [Operation timed out]
06:31 McMartin [~mcmartin@Nightstar-9740.dsl.pltn13.pacbell.net] has joined #code
06:31 mode/#code [+o McMartin] by ChanServ
06:57 Janus [~Cerulean@Nightstar-10302.columbus.res.rr.com] has quit [Quit: Jouets de Dieu, jouets de jouets, et les jouets de me, fait naître Clairvoire.]
07:03 Reiver [~reaverta@IRCop.Nightstar.Net] has joined #Code
07:03 mode/#code [+o Reiver] by ChanServ
07:10 You're now known as TheWatcher
07:41
< Vornicus>
Okay, so
07:42
< Vornicus>
I'm writing a db schema for, well, Settlers of Catan.
07:43
< Vornicus>
So I have a harbor, which allows you to trade a resource for other resources more efficiently than usual.
07:43
< Vornicus>
And a harbor points at two potential locations for cities, known as sites
07:44
< Vornicus>
Now, I need a name for a location that has a harbor pointing at it
07:45 MyCatOwnz [~mycatownz@Nightstar-379.dsl.in-addr.zen.co.uk] has joined #code
07:47
<@McMartin>
"port"?
07:47
< Vornicus>
....perfect
07:53
<@McMartin>
And now, puppies. http://static.flickr.com/59/212057188_03a9fc60c6_o.jpg
07:54
< Vornicus>
puppy!
08:27 Vornicus is now known as Vornicus-Latens
08:50
<@McMartin>
Hmm. BWA doesn't run in WINE.
08:50
<@McMartin>
Here's what I got as a result. This may be of interest to TF. http://www.stanford.edu/~mcmartin/misc/bwapwnt.png
08:52 timelady [~romana@Nightstar-13567.lns1.adl2.internode.on.net] has joined #Code
09:00 timelady [~romana@Nightstar-13567.lns1.adl2.internode.on.net] has quit [Quit: run away! run away!]
09:01 timelady [~romana@Nightstar-13567.lns1.adl2.internode.on.net] has joined #Code
09:21 MyCatOwnz [~mycatownz@Nightstar-379.dsl.in-addr.zen.co.uk] has quit [Quit: Off for the day, back tomorrow afternoon.]
09:52 timelady [~romana@Nightstar-13567.lns1.adl2.internode.on.net] has quit [Quit: run away! run away!]
10:00 AnnoDomini [~fark.off@Nightstar-29713.neoplus.adsl.tpnet.pl] has joined #Code
10:53 You're now known as TheWatcher[afk]
11:58 AnnoDomini [~fark.off@Nightstar-29713.neoplus.adsl.tpnet.pl] has quit [Ping Timeout]
12:04 AnnoDomini [~fark.off@Nightstar-7063.neoplus.adsl.tpnet.pl] has joined #Code
13:13 Thaqui [~Thaqui@Nightstar-18234.jetstream.xtra.co.nz] has quit [Client exited]
14:08 Reiver is now known as ReivZzz
16:23 Safyra_Away is now known as Stephenie
17:52 Takyoji [~Takyoji@Nightstar-25280.dhcp.roch.mn.charter.com] has joined #code
17:53
< Takyoji>
Apparently I'm trying to execute a MySQL query for inserting something, although it doesn't insert anything to the table nor display an error
17:53
< Takyoji>
mysql_query("INSERT INTO SS_products (categoryID, name, description, Price, picture, thumbnail, brief_description, list_price, altpage) VALUES('$category', '$title', '$description', '$price', '$filename', '$basename', '$thumbnail', '$description', '$price', '$alternate')",$con); is what I'm using
17:54
< Takyoji>
but it apparently isn't doing anything
18:00
< Takyoji>
ideas?
18:07
< EvilDarkLord>
I suggest dropping the declarations of what you are inserting and just going by order: insert into ss_products values (column1, column2,...)
18:08
< Takyoji>
That's what I tried before
18:08
< EvilDarkLord>
Hmm.
18:08
< EvilDarkLord>
Is price an integer?
18:08
< Takyoji>
and there's about 8 of them that aren't used
18:08
< Takyoji>
yes
18:09
< EvilDarkLord>
I think you are trying to insert it as a literal string instead of a number there.
18:09
< EvilDarkLord>
Ditto for any other numbers - I think they should not have enclosing ' '.
18:09
< Takyoji>
I guess the price row is "float"
18:09
< Takyoji>
ah k
18:11
< EvilDarkLord>
How are you inserting these? Some web form or directly through the mysql console or something else?
18:11
< Takyoji>
Yes
18:11
< EvilDarkLord>
Yes to which one? :)
18:11
< Takyoji>
I have it ran through the "htmlspecialchars", to MySQL
18:12
< Takyoji>
to prevent errors
18:12
< EvilDarkLord>
Ah. So the mysql_query PHP function?
18:12
< Takyoji>
yes
18:12
< Takyoji>
when $con equals mysql_connect()
18:13
< EvilDarkLord>
Okay. When you're doing testing I suggest either making sure it tosses you an error (don't remember how) or doing it directly in the mysql console as that gives you some useful errors when troubleshooting.
18:14
< EvilDarkLord>
Afaik mysql_query doesn't automatically tell you what went wrong.
18:15
< Takyoji>
so try "echo mysql_error();" or what?
18:15
< EvilDarkLord>
Hm. I think you'll find useful examples in the relevant part of the php manual.
18:16
< EvilDarkLord>
Which can either be googled easily or downloaded.
18:16
< Takyoji>
"You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'product, test, , test, test.jpg, , test, , )' at line 1"
18:16
< EvilDarkLord>
Yay, genenric syntax error for the win.
18:17
< EvilDarkLord>
*generic
18:17
< EvilDarkLord>
Gnargh. What is the exact query you tried?
18:17
< Takyoji>
"Column count doesn't match value count at row 1"
18:17
< EvilDarkLord>
Aha.
18:18
< Takyoji>
so?
18:18
< EvilDarkLord>
That explains much. You need to insert one value per column, simply enough.
18:19
< Takyoji>
But I already am, right?
18:19
< EvilDarkLord>
You are inserting one value in every column, even ones that are NULL or empty strings?
18:19
< Takyoji>
because I don't have multiple ones inserted into on column
18:19
< Takyoji>
I believe so
18:20
< Takyoji>
So I need to fix the structure of the table?
18:20
< EvilDarkLord>
It's hard to tell without more information. I'd need the exact layout of the table and the exact query you just tried to perform.
18:21
< EvilDarkLord>
Feel free to paste both.
18:22
< EvilDarkLord>
You could make the php function echo out the query for simplicity.
18:23
< Takyoji>
INSERT INTO SS_products (categoryID, name, description, Price, picture, thumbnail, brief_description, list_price, altpage) VALUES (92, Test product, test, , test, test.jpg, , test, ,)
18:23
< EvilDarkLord>
Ah.
18:23
< EvilDarkLord>
Hm.
18:23
< Takyoji>
brb
18:23
< EvilDarkLord>
You have a few parts there with ", ,".
18:24
< EvilDarkLord>
You should put something between those commas, whatever is an appropriate default value for the column.
18:24
< EvilDarkLord>
In fact, I think you can use the keyword DEFAULT.
18:24
< EvilDarkLord>
But if not, try "" or NULL as appropriate.
18:25
< Takyoji>
k
18:28
< Takyoji>
Actually I do have every string in single quotes
18:28
< Takyoji>
I actually ment: VALUES ('92', 'Test product', 'test', '', 'test', 'test.jpg', '', 'test', '','')
18:29
< EvilDarkLord>
Hmm.
18:30
< EvilDarkLord>
I'm counting nine named columns but ten values.
18:31
< EvilDarkLord>
Please tell me if this is correct or whether I'm being tired and stupid again.
18:32
< Takyoji>
umm
18:33
< Takyoji>
yea, I have one too many
18:34
< Takyoji>
Also, I'm trying to get Ubuntu working on my computer but apparently it freezes now once it gets to the desktop
18:35
< EvilDarkLord>
I tried to get it working earlier on my laptop but it froze before getting to the desktop.
18:36
< EvilDarkLord>
I seem to remember 6.06 working though, so maybe I should try that.
18:36
< Takyoji>
It was inputted correctly now
18:36
< EvilDarkLord>
Goody.
18:36
< Takyoji>
I'm using it on an old Hewlett Packard computer
18:37
< Takyoji>
Made for Windows 98 SE
18:38
< Takyoji>
I'm running a memory check
18:38
< Takyoji>
any suggested alternatives then?
18:38
< Takyoji>
xubuntu?
18:38
< Takyoji>
Linux?
18:39
< EvilDarkLord>
Apart from Ubuntu I've only tried SuSE that worked pretty much out of the box.
18:39
< Takyoji>
ahh
18:40
<@ToxicFrog>
I've had consistently good results with Fedora, but I've never tried installing it on anything older than a P1/133.
18:44 * EvilDarkLord downloads Ubuntu 6.06 in hopes of just installing and upgrading right after.
18:44
< Takyoji>
ahh
18:44
< Takyoji>
And what the hell.. I think I just heard an european ambulance siren.. and I'm in America
18:44
<@ToxicFrog>
(Fedora 5 and 6, in particular, tend to Just Work for me)
19:19
< Takyoji>
w007p13, I'm able to get it to the Shell
19:19
< Takyoji>
for ubuntu
19:20
< Takyoji>
It's just taking a while since its reading constantly from the installation disc
19:26 Takyoji [~Takyoji@Nightstar-25280.dhcp.roch.mn.charter.com] has quit [Quit: Leaving]
19:40 You're now known as TheWatcher
19:58 AnnoDomini is now known as Saurivir
19:58 EvilDarkLord is now known as Martivir
20:04 ToxicFrog [~ToxicFrog@Admin.Nightstar.Net] has quit [Ping Timeout]
20:07 ToxicFrog [~ToxicFrog@Admin.Nightstar.Net] has joined #code
20:07 mode/#code [+o ToxicFrog] by ChanServ
20:11 ToxicFrog [~ToxicFrog@Admin.Nightstar.Net] has quit [Ping Timeout]
20:12 ToxicFrog [~ToxicFrog@Admin.Nightstar.Net] has joined #code
20:12 mode/#code [+o ToxicFrog] by ChanServ
20:13 Takyoji [~Takyoji@Nightstar-25280.dhcp.roch.mn.charter.com] has joined #code
20:14
< Takyoji>
So a single quote and double quote is all I need to worry about when inserting into a MySQL database, right?
20:14
< Vornicus-Latens>
and newlines
20:14
< Takyoji>
So adding slashes before them would be the solution?
20:15
< Vornicus-Latens>
I don't know, is backslash an escape in MySQL? The standard uses Pascal-style quote escaping
20:16
< Vornicus-Latens>
Most db connection libraries have a function like "sql_escape" or something that escapes a string so that it is safe for use in a query to the appropriate database
20:17
< Martivir>
mysql_real_escape_string in php.
20:22
< Takyoji>
But how do I use the command?
20:23
< Vornicus-Latens>
I don't know. Possibly you should read the manual
20:23
< Martivir>
$string = mysql_real_escape_string($string)
20:23
< Martivir>
Also, RTFM is a good start.
20:30
< Takyoji>
I just wasn't understanding properly
20:30
< Takyoji>
I was checking in on php.net
20:31
< Takyoji>
just didn't understand
20:31
< Vornicus-Latens>
okay, so
20:32
< Vornicus-Latens>
I have this pile of tables, like, 20 of them
20:32
< Takyoji>
but the example helped
20:33
< Vornicus-Latens>
and all these tables, taken together, make a single game state.
20:33
< Vornicus-Latens>
...but I need to be able to handle multiple games.
20:34
< Martivir>
Okay...
20:34
< Martivir>
Make one table that has rows of games ordered by game_id.
20:35
< Vornicus-Latens>
I got that far
20:35
< Martivir>
And then make a game_id column everywhere you need to in the other tabls.
20:35
< Martivir>
*tables
20:35
< Vornicus-Latens>
I now need to figure out where to put the game_id in the existing tables - putting it in a lot of places doesn't feel right
20:35
< Martivir>
Ah.
20:35
< Martivir>
Could you give the table names and I can make a rough guess?
20:36
< Vornicus-Latens>
one moment.
20:39 ToxicFrog [~ToxicFrog@Admin.Nightstar.Net] has quit [Ping Timeout]
20:40 ToxicFrog [~ToxicFrog@Admin.Nightstar.Net] has joined #code
20:40 mode/#code [+o ToxicFrog] by ChanServ
20:44
< Vornicus-Latens>
http://pastie.caboo.se/25451
20:45 ToxicFrog [~ToxicFrog@Admin.Nightstar.Net] has quit [Ping Timeout]
20:45
< Vornicus-Latens>
...try again, it screwed up some formatting
20:47 ToxicFrog [~ToxicFrog@Admin.Nightstar.Net] has joined #code
20:47 mode/#code [+o ToxicFrog] by ChanServ
20:48 * Martivir eyes that. Um, FK?
20:48
< Vornicus-Latens>
Foreign Key
20:48
< Martivir>
Oh duh.
20:50 ToxicFrog [~ToxicFrog@Admin.Nightstar.Net] has quit [Ping Timeout]
20:51
< Martivir>
So... site and region are structures containing several robbers, ports etc?
20:51
< Vornicus-Latens>
Er
20:51
< Vornicus-Latens>
...do you know Settlers of Catan?
20:52
< Martivir>
...right.
20:52
< Vornicus-Latens>
If not I can explain, but if you do, that's the game I'm making.
20:53
< Martivir>
I'm thinking that all the map elements should have a game_id as well as the player table, if any.
20:53
< Martivir>
Player-owned items can then be accessed via that.
20:55 * Martivir has a closer look. Hm.
20:57 Chalcedon [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code
20:57 mode/#code [+o Chalcedon] by ChanServ
20:57 [0]ToxicFrog [~ToxicFrog@Admin.Nightstar.Net] has joined #code
20:58
< Vornicus-Latens>
okay, so player, region, site, possibly path, harbor, robber
21:00
< Martivir>
Hrm. What data is contained in development_card?
21:00
< Martivir>
Is this a static table for representing the effects of each card, or is it to keep track of what cards each player owns?
21:00
< Vornicus-Latens>
data in development_card is just who owns it (player), what kind of card it is (development_card_type), and whether it has been revealed or not.
21:00
< Martivir>
Ah.
21:01
< Vornicus-Latens>
at game start, development_card is populated with 25 cards with player = null.
21:02
< Martivir>
Hmm. If you make region dependent on game number the robber will not need to be as far as I can see.
21:02
< Vornicus-Latens>
okay.
21:02
< Martivir>
Er. What's the difference between region and site?
21:02
< Vornicus-Latens>
a region is a single tile of terrain
21:03
< Vornicus-Latens>
a site is a single vertex in the tile grid; you can place settlements on a site.
21:03
< Martivir>
Aha.
21:03
< Vornicus-Latens>
and a path is a single /edge/ in the tile grid, going between two sites. you can place a road on a path.
21:05
< Martivir>
And regions will have varying terrain in every game, yes?
21:05
< Vornicus-Latens>
Right.
21:06
< Vornicus-Latens>
At game start, regions will be populated with either a standard layout (such as that on the back of the manual for Settlers) or a random layout.
21:08
< Vornicus-Latens>
As will harbor. site, path, farm, signpost, port, etc, will be populated with a standard layout.
21:10
< Martivir>
What kind of representation are you using for determining where a given region is?
21:10
< Martivir>
Or a site, for that matter.
21:10
< Vornicus-Latens>
I haven't figured that out yet; I will likely give X/Y coordinates.
21:11
< Vornicus-Latens>
normalized such that all locations are integers.
21:13
< Martivir>
Are you keeping track of players over several games?
21:14
< Vornicus-Latens>
No. A player is the combination of a user, a game, and game-specific player information (turn order, piece color)
21:16
< Martivir>
Okay. As far as I can see you should be able to make things work well if you key region, site and player to game_id.
21:16
< Vornicus-Latens>
I'm trying to figure out how you got path and harbor out of that.
21:17
< Vornicus-Latens>
also development card
21:17
< Martivir>
Hrm. Isn't dev card keyed only to player and card type?
21:17
< Martivir>
(And card type doesn't change over games)
21:18
< Vornicus-Latens>
dev card may not be owned by /any/ player
21:18
< Vornicus-Latens>
unless you intend to calculate what cards can be drawn by checking to see what cards have already been drawn.
21:19
< Martivir>
That seems straightforward enough. If player is not null.
21:19
< Vornicus-Latens>
okay
21:19
< Martivir>
Oh, wait.
21:19
< Martivir>
I can see your point.
21:19
< Martivir>
There are several dev cards of each type?
21:19
< Vornicus-Latens>
Yes
21:20
< Vornicus-Latens>
14 soldier, 2 monopoly, 2 year of plenty, 2 road building, 1 chapel, 1 university of catan, 1 governor's house, 1 market, 1 library
21:21
< Martivir>
Path is linked directly to player which is in turn linked to game. Can't you get them in that way?
21:21
< Vornicus-Latens>
Path's player can be null. A player owns a path if he has a road on it.
21:21
< Martivir>
Oh, bugger. I'm mixing up roads and paths.
21:21
< Martivir>
Sorry. In that case, it is certainly linked to game_id.
21:22
< Martivir>
...wait.
21:22
< Vornicus-Latens>
(but once you say a player owns a path, you don't need another place to put any information about roads)
21:22
< Stephenie>
Hey does anyone know where Ben went? *pouts*
21:22
< Saurivir>
Martivir! Will save!
21:22
< Stephenie>
erm nevermind found him
21:22
< Vornicus-Latens>
He was around in another channel, um, half an hour ago.
21:22
< Vornicus-Latens>
and is here, but hasn't said anything lately
21:23
< Stephenie>
his name is different
21:23 * Stephenie prods the 0 in front of it
21:23
< Stephenie>
my pm wouldnt work it said no such channel i was flipping o.o
21:24
< Martivir>
Hrm. Is there anything else paths are used for beside roads?
21:25
< Vornicus-Latens>
Not that I'm aware of.
21:25
< Martivir>
If not, I'd be kind of tempted to make roads themselves use game_id.
21:25
< Vornicus-Latens>
But roads require the information of paths, which appears to need generation at the beginning of the game.
21:25
< Vornicus-Latens>
You can only make a road on an existing path.
21:27 [0]ToxicFrog is now known as ToxicFrog
21:27
< Martivir>
Isn't there a set of three roads around each and every tile?
21:28
< Vornicus-Latens>
Each tile has six paths and six sites around it.
21:28
< Martivir>
...right. Brainfart, that was.
21:28
< Vornicus-Latens>
however it shares paths with another tile, and sites with two other tiles.
21:30
< Martivir>
The simplest representation would seem to be linking them to two instances of site_id.
21:31
< Martivir>
Then you don't even need game_id since the sites already have that.
21:31
< Vornicus-Latens>
Right, that's what signpost does; it's really a many-to-many relationship, and since it's not directed it's a problem when trying to write queries that check the nature of nearby paths
21:31 Chalcy [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code
21:31 mode/#code [+o Chalcy] by ChanServ
21:32 Chalcedon [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has quit [Ping Timeout]
21:34
< Martivir>
Oh yes. Do you have some idea of how to best measure "Longest path" and such?
21:35
< Martivir>
In theory you might be able to solve the direction problem by inserting two rows for each road, but I am unsure.
21:35
< Vornicus-Latens>
Unfortunately that's graph theory so I can't do it in a regular SQL statement; I'm writien a procedure.
21:36
< Martivir>
The last one - harbors. I can't remember their function, would you enlighten me?
21:37
< Martivir>
Oh, right.
21:37
< Vornicus-Latens>
Normally, you can trade 4 of a single resource for 1 of any other resource
21:37
< Martivir>
Those. yes.
21:37
< Martivir>
Weren't they linked to tiles?
21:37
< Vornicus-Latens>
if you build a settlement on a harbor, you get a better trade ratio - non-specific harbors improve all your trades to 3:1, specific harbors improve trades that send out that specific resource to 2:1
21:38 * Martivir goes to find a SoC map.
21:38
< Vornicus-Latens>
A harbor is printed on a sea tile, but it only gives the harbor ability to two of the sites by that tile.
21:39
< Martivir>
Could you link them to sites then?
21:39
< Vornicus-Latens>
right now, harbor links to sites via the port table.
21:41
< Martivir>
Hmm. Maybe harbor could link sites directly to the given resource?
21:42
< Martivir>
Although granted, this could give you problems when displaying the map.
21:43
< Vornicus-Latens>
Yeah, I'm trying to figure out how to solve the display problem
21:43
< Martivir>
Is the set of harbors the same in every game?
21:44
< Vornicus-Latens>
The available harbor tiles are always the same; the locations of these harbors are not.
21:44
< Martivir>
Right.
21:45
< Martivir>
I'm inclined to make harbor game-dependent but for some reason that seems a bad idea.
21:46
< Martivir>
Er, port.
21:47
< Martivir>
Hmm. If you had a way of solving the display problem harbors could be just a nullable column in site.
21:47 * Martivir flails.
21:49
< Vornicus-Latens>
Port is just harbor2site; site is most likely game-dependent, harbor might be. I don't think port should be, but it should have an integrity check: SELECT count(*) FROM harbor NATURAL JOIN port NATURAL JOIN site WHERE harbor.game_id != site.game_id should return 0
21:51
< Martivir>
Hmm. How does NATURAL JOIN work again? I've only used LEFT, RIGHT, INNER, OUTER.
21:52
< Vornicus-Latens>
natural join is an inner join; it uses some magic, a NATURAL JOIN b is a JOIN b ON (a.field == b.field for field in intersection(fields(a), fields(b)));
21:55
< Vornicus-Latens>
essentially it tries to guess the relationship between the two tables and uses that as the join condition; if your database's fields are properly named, you get the join you wanted.
21:56
< Martivir>
Heh.
21:57
< Vornicus-Latens>
(good database discipline for the use of natural joins is to make your primary key names "foo_id" instead of just "id".)
21:58
< Martivir>
(Quite. I'll have to remember this for the future, as I do tend to give intelligent names to my ids)
22:01
< Martivir>
Okay. Harbor (unless you can work site magic), player, region, site, and possibly path (unless you can work site magic) are game_id dependent.
22:01
< Vornicus-Latens>
okay.
22:02
< Vornicus-Latens>
is robber?
22:03
< Vornicus-Latens>
or, perhaps, is robber a piece of information in a table that specifically holds information about individual games?
22:04
< Martivir>
Now there's a thought. There is only one per game, after all.
22:04
< Martivir>
It could fit snugly beside game_name and such things, yes.
22:04
< Vornicus-Latens>
yes.
22:05
< Vornicus-Latens>
time to grab lunch.
22:05
< Vornicus-Latens>
back in a bit.
22:11
< Martivir>
Right you are. Sorry it took me a while to catch up on the rules and stuff.
22:15 Chalcy [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has quit [Ping Timeout]
22:16 Chalcedon [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code
22:16 mode/#code [+o Chalcedon] by ChanServ
22:26 Thaqui [~Thaqui@219.88.92.ns-5027] has joined #code
22:26
< Vornicus-Latens>
okay.
22:26 You're now known as TheWatcher[afk]
22:29 * Vornicus-Latens fiddles
22:29
< Vornicus-Latens>
regions, sites, harbors need coordinates.
22:32
< Martivir>
Does the map vary in size with player count?
22:33
< Vornicus-Latens>
The map can vary in size, yes, and in topology.
22:33
< Martivir>
So you could have, say, an L-shaped map?
22:34
< Vornicus-Latens>
Yes; in Seafarers you can even have maps with noncontinuous land.
22:35
< Martivir>
http://unicornsrest.org/reference/catan/maps/map.cgi
22:36
< Vornicus-Latens>
I actually have that set up on my dining room table right now.
22:36
< Martivir>
Nifty.
22:36
< Vornicus-Latens>
...well, not that one specifically, it's building it dynamically.
22:36
< Vornicus-Latens>
But
22:37
< Martivir>
So the leftmost part of that would be x=0 and the bottom part would be y=0.
22:37
< Vornicus-Latens>
Or something to that effect
22:38 * Martivir fiddles at that.
22:43
< Vornicus-Latens>
probably the top left will be the origin, though
22:43
< Vornicus-Latens>
well, the origin that I'll be using
22:44
< Martivir>
Fair enough.
22:44
< Martivir>
All the same really.
22:44
< Vornicus-Latens>
yeah
22:46
< Martivir>
The y direction looks straightforward - the coordinates are nicely spaced half a tile apart.
22:47
< Vornicus-Latens>
X direction is just 1/4 a tile. I'll apply an appropriate transform when I get there.
22:47
< Martivir>
Right.
22:47 You're now known as TheWatcher
22:49
< Vornicus-Latens>
hm, let me see
22:52 * Vornicus-Latens stops cutting bait, starts fishing.
22:53
< Martivir>
Heh. Database finishing?
22:53
< Vornicus-Latens>
It's done enough that I can start coding the actual bits that describe the game.
22:54
< Martivir>
Is this going to be a web application or a desktop game?
22:54
< Vornicus-Latens>
web
22:54
< Martivir>
Arright. what are you building it on in terms of language?
22:54
< Vornicus-Latens>
Ruby.
22:55
< Martivir>
vorn.dyndns.org/?
22:55
< Vornicus-Latens>
Is my personal machine, yes.
22:56
< Vornicus-Latens>
And probably where it will be hosted for alpha
22:58 Chalcedon [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has quit [Ping Timeout]
22:58 Chalcedon [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code
22:58 mode/#code [+o Chalcedon] by ChanServ
23:01 * Vornicus-Latens hasn't decided a name though
23:01 Vornicus-Latens is now known as Vornicus
23:01
< Martivir>
WebCatan :)
23:01
< Vornicus>
:P
23:01
< Saurivir>
MyProject.
23:01
< Vornicus>
...by the way, do I know you?
23:01
< Saurivir>
Martivir == EvilDarkLord.
23:01
< Vornicus>
aha
23:02
< Vornicus>
and Saurivir is?
23:02
< Saurivir>
AnnoDomini.
23:02
< Vornicus>
aha
23:02 mode/#code [+oooooo Ev3 Martivir Saurivir TheWatcher ToxicFrog Vornicus] by Vornicus
23:02
<@Martivir>
Woot.
23:02 mode/#code [+oov Takyoji Thaqui Stephenie] by Vornicus
23:04
<@Saurivir>
We've changed nicks for gamage. :)
23:04 * Martivir sads at all the domains already taken.
23:09 Chalcy [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code
23:09 mode/#code [+o Chalcy] by ChanServ
23:10 Chalcedon [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has quit [Ping Timeout]
23:15
<@Martivir>
Say, Vorn, do you have much experience doing web programming with Ruby?
23:16
<@Vornicus>
No. That's why I'm working in an established realm.
23:20 You're now known as TheWatcher[T-2]
23:20
<@Vornicus>
(also, I haven't found a thing on teh intarnewbs that does C&KoC)
23:24 You're now known as TheWatcher[zZzZ]
23:29 * ToxicFrog perpetrates a gruesome slaughter in Spellforce. Unfortunately, it's of his own troops...
23:29
<@Vornicus>
heh
23:29
<@Vornicus>
How is Spellforce, and what's it for?
23:30
<@ToxicFrog>
How it is: excellent, but the lack of baby seals to combine with my trollish hunting forces (they use clubs!) makes me sad.
23:31
<@ToxicFrog>
What it's for: windows systems with rather more uber graphics hardware than I have.
23:31
<@Vornicus>
heh
23:31 ReivZzz is now known as Reiver
23:35
<@ToxicFrog>
While there is a certain amusement in watching a group of hunters club a bear to death and drag it back to base, I want my baby seals, dammit.
23:37
<@ToxicFrog>
As a side note of interest, it uses Lua extensively and the in-game console is simply an interface to the Lua terp.
23:42
<@Vornicus>
heh
23:58 Martivir is now known as EvilDarkLord
23:58 Saurivir is now known as AnnoDomini
--- Log closed Sun Dec 03 00:00:22 2006
code logs -> 2006 -> Sat, 02 Dec 2006< code.20061201.log - code.20061203.log >