code logs -> 2010 -> Sun, 04 Apr 2010< code.20100403.log - code.20100405.log >
--- Log opened Sun Apr 04 00:00:45 2010
00:13 AnnoDomini [annodomini@Nightstar-860ad5f2.adsl.tpnet.pl] has quit [[NS] Quit: leaving]
00:21 Zed [Zed@Nightstar-d7ade99d.or.comcast.net] has quit [Client closed the connection]
00:21 Zed [Zed@Nightstar-d7ade99d.or.comcast.net] has joined #code
00:29 Alek [omegaboot@Nightstar-7ff8f4eb.il.comcast.net] has joined #code
00:39
< Alek>
frak.
00:40
< Alek>
a (non-upgrade) copy of 7Ultimate is $320.
00:40
< Alek>
thank Goddess for Tigerdirect is what I say. >_>
00:40
< Alek>
$180 for an OEM.
00:40
< Alek>
next week. next week.
00:41
< Alek>
meanwhile, I'm told I should just install a trial for now. yeah, well, I can't find one, dangit.
00:41
< Alek>
also, are Upgrade copies just for upgrading from trial, or from Vista, or can you use one from XP?
00:44
< Alek>
my bad, $190. still good. >_>
00:49
< Alek>
bah. ttyl.
00:49
< Alek>
wish me luck.
00:49 Alek [omegaboot@Nightstar-7ff8f4eb.il.comcast.net] has quit [[NS] Quit: ]
02:42 celticminstrel [celticminstre@Nightstar-f8b608eb.cable.rogers.com] has quit [Operation timed out]
02:43 celticminstrel [celticminstre@Nightstar-f8b608eb.cable.rogers.com] has joined #code
03:00 cpux [Moo@Nightstar-20a84089.dyn.optonline.net] has quit [Client closed the connection]
03:02 cpux [Moo@Nightstar-20a84089.dyn.optonline.net] has joined #code
03:36 Vornacious [NSwebIRC@Nightstar-92f21938.ct.comcast.net] has joined #code
03:39
< Vornacious>
So I got bored. r = sec(theta + pi/3*floor(3*theta/pi) - pi/6)
03:43 Attilla [Attilla@FBC920.173C5E.203556.7F1065] has quit [Connection reset by peer]
04:00 * cpux counters with (e^(2*pi*i/theta))^theta
04:01
< celticminstrel>
...
04:02 celticminstrel [celticminstre@Nightstar-f8b608eb.cable.rogers.com] has quit [[NS] Quit: *hums* Can't stay now!]
04:02
< Vornacious>
Niiice.
04:49 * Vornacious tries to figure out why Wolfram Alpha doesn't manage to render that correctly.
05:02
< Vornacious>
(mine, that is)
05:20 * Vornacious fiddles. database schema for, uh, cards. Possibly (but not necessarily) distinct.
05:23
< Vornacious>
Or, more precisely: there are many duplicate cards in the list; I need to be able to express this sensibly, without horribly breaking normalizations, and with being able to collect deck lists from the database without having to specify each individual card...
05:25 * Vornacious still thinks he's screwed up the description.
05:30
<@Kazriko>
er, have a table for each type of card, then have a many to many link between the deck and card table with a number indicating quantity?
05:31
<@Kazriko>
so if this were magic, you would have deck 1 link to mountain card, quantity 12 or some such.
05:33
< Vornacious>
Right, but then when a card is drawn I have several places I need to update to say what jsut happened -- decrement the number of mountains in the deck, increment in the hand.
05:33
< Vornacious>
Or, even worse, I have to switch to individual-card work.
05:37
<@Kazriko>
ah, so the database would be updated live...
05:38
<@Kazriko>
I thought you were just tracking. heh
05:38
<@Kazriko>
you probably want the deck to be in some order if you're drawing items...
05:39
< Vornacious>
...which would require individual cards.
05:39
<@Kazriko>
if the cards are in a certain order then you need individual cards...
05:40
<@Kazriko>
In which case you'd have a table with some sort of id, a card id, a location id, and an order it is in that location.
05:40
<@Kazriko>
it becomes a pain if you ever pull one out of the middle.
05:40
<@Kazriko>
but you could just update the location and order to draw a card.
05:41
<@Kazriko>
databases are a pain for that sort of thing...
05:41
<@Kazriko>
where you have a set order...
05:42
< Vornacious>
I don't actually /care/ what order it is, really - the order overall is never published, just what card is drawn next.
05:42
<@Kazriko>
ok. a card to location table with unique ids, individual cards.
05:43
<@Kazriko>
location could be deck 1, hand 1, deck 2, hand 2, or a deck in a completely different game.
05:43
<@Kazriko>
or discard, or...
05:44
<@Kazriko>
each row is just an instance of a card. *shrug*
05:44
<@Kazriko>
You could do the counting way, but that implies updating it in two locations instead of just moving the card.
05:46
< Vornacious>
Right. Looks like my best bet is to persistent-store the deck as card counts (so I can see and modify counts at, approximately, will), and then for an individual game I break out the individual cards, and then... figure out how to update a random row to draw a card.
05:47
<@Kazriko>
well, you would just pull all the cards in the deck, pick one at random, and update the one it picked.
05:48
<@Kazriko>
so you're not drawing a mountain, you're drawing that particular mountain and updating it.
05:48
< Vornacious>
probably, yeah.
05:48
< Vornacious>
Can't really see it happening in one query unless I go completely triggerhappy.
05:49 Rhamphoryncus [rhamph@Nightstar-8931f88f.abhsia.telus.net] has joined #code
05:51
<@Kazriko>
well...
05:51
<@Kazriko>
is there a random aggregate function in your sql?
05:51
< Vornacious>
I could check, one moment
05:52
<@Kazriko>
update table set location = <blah2> where cardid = (select random(cardid) from table where location = <blah>)
05:52
<@Kazriko>
group by location on that inner one I guess.
05:54
<@Kazriko>
http://wiki.postgresql.org/wiki/Aggregate_Random
05:54
< Vornacious>
sqlite does not but does have an aggregate function registration tool; postgresql doesn't have one either. I guess you could pull order by random() limit 1 or something...
05:54
< Vornacious>
or that.
05:54
<@Kazriko>
Any way that works.
05:56
< Vornacious>
though doing it in a one-query step doesn't really give a good opportunity to say "hey this is the one you drew!" unless I get the row I updated back or something. Dunno if things do that.
05:57
<@Kazriko>
update doesn't. Hmm. Can you make it a function and set the result of the first one to be what is output...
05:57 * Kazriko usually does that sort of thing in python.
05:59 Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has joined #code
05:59
< Vornacious>
It's a possibility.
06:02
< Vornacious>
am I weird? I ignore ORMish stuff so I can mangle the database directly.
06:02
<@Kazriko>
I have a friend who does that...
06:02
<@Kazriko>
Denubis...
06:03
<@Kazriko>
I've seen him parse webpages in postgresql...
06:03
< Vornacious>
I'm pretty sure that's actually masochism.
06:03
<@Kazriko>
Even though SQL is by far the most useful language they taught my in college, it still doesn't feel natural to do everything in it to me.
06:04
<@Kazriko>
Only in the last year did i actually start using a language they taught in college for my job.
06:04
<@Kazriko>
other than sql.
06:04
<@Kazriko>
took 7 years of working before I ran into a use for one of them.
06:05
< Vornacious>
The language of choice at the local community college is Javascript.
06:07
< Vornacious>
Which is a pretty damn practical choice if I ever saw one.
06:25
<@Kazriko>
They taught us C++ in the first year, branching out to Java, Delphi, SQL, and Lisp.
06:25
<@Kazriko>
Ah, and Cobol, over in the CISB class.
06:26
<@Kazriko>
I knew C and Pascal beforehand, and learned Python on my own.
06:26
<@Kazriko>
Professionally, I used Perl, PHP, C, Python, C#, and SQL...
06:26
<@Kazriko>
ah, and ladder logic, and function block.
06:26
<@Kazriko>
IEC61131...
06:27
<@Kazriko>
Only last year I got into a project using C++
06:27
<@Kazriko>
oh, Visual basic too at work, maintaining a legacy program. :(
06:29
<@Kazriko>
Ah, I usually mangle the database directly at work. Only recently have I gotten into ORM stuff.
06:29
<@Kazriko>
through Django.
06:30
< Vornacious>
I tried Django and found it very much lacking
06:30
< Vornacious>
This was 2007 or so though
06:34
< Vornacious>
It didn't seem to have any sensible documentation as to how to start -- I couldn't, for instance, figure out how to get the skeletal structure of the site together the way I could in Rails.
06:36
< Vornacious>
(though Rails and Ruby in general soured on me when I discovered that I had to modify existing classes to make my new ones act correctly.)
06:42
< Vornacious>
bedtime.
06:44 Vornacious [NSwebIRC@Nightstar-92f21938.ct.comcast.net] has quit [[NS] Quit: Page closed]
07:16 Tarinaky [Tarinaky@Nightstar-f349ca6d.plus.com] has joined #code
08:55 AnnoDomini [annodomini@Nightstar-860ad5f2.adsl.tpnet.pl] has joined #code
08:55 mode/#code [+o AnnoDomini] by Reiver
09:23 AnnoDomini [annodomini@Nightstar-860ad5f2.adsl.tpnet.pl] has quit [Ping timeout: 121 seconds]
09:25 AnnoDomini [annodomini@Nightstar-55e0e691.adsl.tpnet.pl] has joined #code
09:25 mode/#code [+o AnnoDomini] by Reiver
10:49 You're now known as TheWatcher
11:15 Orthia [orthianz@Nightstar-720fa3d0.xnet.co.nz] has joined #code
11:20 Serah [Z@3A600C.A966FF.5BF32D.8E7ABA] has quit [Ping timeout: 121 seconds]
12:03 Rhamphoryncus [rhamph@Nightstar-8931f88f.abhsia.telus.net] has quit [Client exited]
12:20 * AnnoDomini wonders how to evoke exception number 10.
12:26
<@AnnoDomini>
I'm trying to make exceptions happen. I'm sorta clueless at how to make a jump to an invalid TSS.
13:29 Attilla [Attilla@FBC920.482E2D.C07227.ACD044] has joined #code
13:29 mode/#code [+o Attilla] by Reiver
14:01 cpux [Moo@Nightstar-20a84089.dyn.optonline.net] has quit [Client closed the connection]
14:07 celticminstrel [celticminstre@Nightstar-f8b608eb.cable.rogers.com] has joined #code
15:05 Zed [Zed@Nightstar-d7ade99d.or.comcast.net] has quit [Ping timeout: 121 seconds]
15:22 Serah [Z@26ECB6.A4B64C.298B52.D80DA0] has joined #code
15:22 Orthia [orthianz@Nightstar-720fa3d0.xnet.co.nz] has quit [Client closed the connection]
15:29 Orthia [orthianz@Nightstar-720fa3d0.xnet.co.nz] has joined #code
15:34 Zed [Zed@Nightstar-d7ade99d.or.comcast.net] has joined #code
16:13 Orthia [orthianz@Nightstar-720fa3d0.xnet.co.nz] has quit [Connection reset by peer]
16:41 hobbitprog [hobbit@Nightstar-c7528f30.ok.cox.net] has joined #code
17:17 cpux [Moo@Nightstar-20a84089.dyn.optonline.net] has joined #code
17:37 hobbitprog [hobbit@Nightstar-c7528f30.ok.cox.net] has quit [[NS] Quit: Konversation terminated!]
18:38 Searh [Z@26ECB6.A4B64C.298B52.D80DA0] has joined #code
18:38 Zed_ [Zed@Nightstar-d7ade99d.or.comcast.net] has joined #code
18:38 Netsplit *.net <-> *.split quits: @jerith, Zed, Tarinaky, @Kazriko, Serah, RichardBarrell, @AnnoDomini
18:40 RichardBarrell [mycatverbs@Nightstar-58acb782.cable.virginmedia.com] has joined #code
18:40 Tarinaky [Tarinaky@Nightstar-f349ca6d.plus.com] has joined #code
18:41 AnnoDomini [annodomini@Nightstar-55e0e691.adsl.tpnet.pl] has joined #code
18:41 mode/#code [+o AnnoDomini] by Reiver
18:41 jerith [jerith@Nightstar-bf52129d.slipgate.za.net] has joined #code
18:41 mode/#code [+o jerith] by Reiver
18:42 Kazriko [kaz@Nightstar-e09690fa.client.bresnan.net] has joined #code
18:42 mode/#code [+o Kazriko] by Reiver
19:51 Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has quit [Connection closed]
20:16 Zed_ [Zed@Nightstar-d7ade99d.or.comcast.net] has quit [Client closed the connection]
20:16 Zed_ [Zed@Nightstar-d7ade99d.or.comcast.net] has joined #code
20:24 gnolam [lenin@Nightstar-38637aa0.priv.bahnhof.se] has joined #code
21:48 RichardBarrell [mycatverbs@Nightstar-58acb782.cable.virginmedia.com] has quit [Ping timeout: 121 seconds]
22:02 cpux is now known as cpux[eatingham]
22:35 Tarinaky [Tarinaky@Nightstar-f349ca6d.plus.com] has quit [Client closed the connection]
23:09 Orthia [orthianz@Nightstar-88bb5c0b.xnet.co.nz] has joined #code
23:18 Searh [Z@26ECB6.A4B64C.298B52.D80DA0] has quit [Ping timeout: 121 seconds]
23:33 AnnoDomini [annodomini@Nightstar-55e0e691.adsl.tpnet.pl] has quit [[NS] Quit: Exit lite, enter nite.]
23:57 Serah [Z@3A600C.A966FF.5BF32D.8E7ABA] has joined #code
--- Log closed Mon Apr 05 00:00:46 2010
code logs -> 2010 -> Sun, 04 Apr 2010< code.20100403.log - code.20100405.log >