--- Log opened Fri May 15 00:00:55 2009 |
00:05 | | You're now known as TheWatcher[t-2] |
00:12 | | You're now known as TheWatcher[zZzZ] |
00:56 | | Vornicus-Latens is now known as Vornicus |
00:58 | <@Vornicus> | Okay. Section 2: Ability Scores. |
01:10 | | Namegduf [namegduf@86.6.85.ns-27218] has quit [Quit: Lost terminal] |
01:42 | | Namegduf [namegduf@86.6.85.ns-27218] has joined #code |
01:56 | | Attilla [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has quit [Quit: <Insert Humorous and/or serious exit message here>] |
03:20 | <@Vornicus> | Wheee, javascript and php at the same time |
03:22 | | NSGuest-463 [~cheng@Nightstar-5625.hsd1.ca.comcast.net] has quit [Ping Timeout] |
03:22 | <@McMartin> | What's in the box? |
03:22 | <@McMartin> | PAIN. |
03:22 | <@Vornicus> | I think I sprained something. |
03:23 | <@Vornicus> | I don't think it's the Gom Jabbar though |
03:25 | <@McMartin> | Also, hooray |
03:25 | | * McMartin learns how to use Haskell's rational number system. |
03:25 | <@McMartin> | Not only does it have infinite precision integers, it has infinite precision rationals |
03:25 | <@Derakon> | Neat trick, that. |
03:25 | <@MyCatVerbs> | Data.Ratio FTW. |
03:25 | <@McMartin> | Eeyep |
03:26 | <@McMartin> | However, it is important to remember that you can't just use % everywhere. |
03:26 | <@MyCatVerbs> | It's a library rather than part of the standard libs, but same difference. |
03:26 | <@McMartin> | Since Haskell lets you define new operators, it's even less of a difference than normal. |
03:26 | <@McMartin> | This also gave us the Tits Operator from Data.Bits. |
03:26 | <@Vornicus> | ...tits. |
03:26 | <@McMartin> | (.|.) |
03:26 | <@McMartin> | Bitwise Or. |
03:26 | <@Vornicus> | a...ha. |
03:27 | <@MyCatVerbs> | ...I've used Data.Bits in practical code, and I did not notice a Tits Operator. |
03:27 | <@Vornicus> | THat's a bit of cleavage. |
03:27 | <@McMartin> | So dubbed in here when I was posting UTF-8 code. |
03:27 | <@MyCatVerbs> | For one thing, you write it as (foo .|. bar), not ((.|.) foo bar), usually. :P |
03:27 | <@McMartin> | I think I was folding with it or something which is why it got parenthesized. |
03:27 | <@Derakon> | Folding with tits sounds painful. |
03:28 | <@MyCatVerbs> | Personally it reminds me of a single-finger salute. |
03:28 | <@McMartin> | That's "|" |
03:28 | <@MyCatVerbs> | Close-up photo thereof, with the tips of the adjacent knuckles just inside the shot. |
03:29 | | * Derakon disables his cache, reloads, still sees distinct symbols. |
03:29 | <@McMartin> | Project Euler has gotten my basic Haskell skills up quite neatly. |
03:29 | <@Derakon> | Mischan. |
03:29 | <@MyCatVerbs> | All arty and everything. Maybe it's a black-and-white photo. |
03:31 | <@MyCatVerbs> | McMartin: it's a good way to practice, I guess. Every now and then you see someone cross the lines of #haskell wondering aloud whether anyone has any ideas for a project they could tackle to get them going. I should reccomment trying Project Euler in future. |
03:32 | <@Derakon> | Project Euler's handy for getting your school-type problem solving skills up to snuff. |
03:32 | <@Derakon> | Nice self-contained problems that are often fairly straightforward to solve if you know the underlying principle (at least, until you've solved the 50 easiest or so). |
03:33 | <@McMartin> | The thing is, some of those for Haskell are things like "parse this file full of data and do something trivial" |
03:33 | <@McMartin> | The doing something trivial is fine, but getting the data in properly is excellent monad practice &c |
03:37 | <@Derakon> | And this is a fine example of "not all languages are well-suited to all problems." |
03:38 | <@MyCatVerbs> | Oi. Haskell's IO is trivial compared to C's. |
03:38 | <@Derakon> | Was I comparing Haskell to C? |
03:38 | <@MyCatVerbs> | Using IO is conceptually interesting, sure, but it's not interestingly difficult to make *use* of. |
03:39 | <@MyCatVerbs> | Derakon: no, I should be comparing against Perl instead. Haskell doesn't exactly fail hard there, either. |
03:41 | <@MyCatVerbs> | Most trivial text formats boil down to do { contents <- readFile "inputfile"; writeFile "outputFile" (process (lines contents)) } |
03:43 | | GeekSoldier [~Rob@Nightstar-8573.midstate.ip.cablemo.net] has quit [Connection reset by peer] |
03:43 | | GeekSoldier [~Rob@Nightstar-8573.midstate.ip.cablemo.net] has joined #code |
03:43 | | mode/#code [+o GeekSoldier] by ChanServ |
03:48 | <@MyCatVerbs> | Sometimes I wish for temporary amnesia while debugging. |
03:49 | <@MyCatVerbs> | If I could force myself to completely forget everything I thought I knew about a given chunk of code, I could re-read it exactly, as it's written, rather than as I'd meant to write it. |
03:49 | <@Derakon> | Heh. |
03:50 | <@Derakon> | Write code while drunk. Debug code while sober. |
03:50 | < Namegduf> | Sounds like a plan. |
03:50 | <@MyCatVerbs> | Namegduf: invading Russia during winter is a plan too, as is drinking from the goblet with the iocane powder in it. |
03:51 | <@MyCatVerbs> | Being a plan and being good are orthogonal concepts. :( |
03:51 | < Namegduf> | That is true. |
03:55 | <@McMartin> | MCV: Yeah, so, I busted out Parsec just for spite~ |
03:55 | <@McMartin> | Which is what let me get better hang of do-notation. |
03:57 | <@MyCatVerbs> | McMartin: ironically, I am convinced that Parsec hates me and I loathe its guts. That is mostly for personal reasons, however. |
03:58 | <@Derakon> | Caught Parsec and your girlfriend in bed together, huh? |
03:59 | <@MyCatVerbs> | I don't even satisfy the preconditions to be outraged for that reason. |
04:01 | <@MyCatVerbs> | But no, it's just that I've run into every possible bug and pitfall that one could concievably find with Parsec. All but one of them were my fault, but still. If you keep hitting your thumb over and over and over and over again, eventaully you cotton on to the idea that maybe you should stop using this particular hammer. |
04:02 | <@Derakon> | Heh. |
04:02 | <@Derakon> | Or get smaller thumbs~ |
04:07 | <@MyCatVerbs> | That's not so say that I do not use Parsec. I just treat it with extreme distrust at all times. |
06:02 | | Syloqs-AFH [Syloq@ServicesAdmin.Nightstar.Net] has quit [Connection reset by peer] |
06:16 | | AnnoDomini [AnnoDomini@Nightstar-29247.neoplus.adsl.tpnet.pl] has joined #Code |
06:16 | | mode/#code [+o AnnoDomini] by ChanServ |
06:56 | | Vornicus is now known as Vornicus-Latens |
07:33 | | Derakon is now known as Derakon[AFK] |
09:57 | | You're now known as TheWatcher |
11:01 | | AnnoDomini [AnnoDomini@Nightstar-29247.neoplus.adsl.tpnet.pl] has quit [Ping Timeout] |
11:07 | | AnnoDomini [AnnoDomini@Nightstar-29377.neoplus.adsl.tpnet.pl] has joined #Code |
11:07 | | mode/#code [+o AnnoDomini] by ChanServ |
11:57 | | Rhamphoryncus [~rhamph@Nightstar-7184.ed.shawcable.net] has quit [Quit: Rhamphoryncus] |
12:32 | | Orthia [~Orthianz@Nightstar-22434.xdsl.xnet.co.nz] has joined #Code |
12:34 | | Orthia is now known as Reivthia |
14:40 | | NSGuest-460 is now known as EvilDarkLord |
16:01 | | Attilla [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has joined #code |
16:01 | | mode/#code [+o Attilla] by ChanServ |
16:05 | | Syloqs_AFH [Syloq@Admin.Nightstar.Net] has joined #code |
16:06 | | Syloqs_AFH is now known as Syloqs-AFH |
17:44 | | Derakon[AFK] is now known as Derakon |
19:35 | | GeekSoldier [~Rob@Nightstar-8573.midstate.ip.cablemo.net] has quit [Ping Timeout] |
19:36 | | GeekSoldier [~Rob@Nightstar-8573.midstate.ip.cablemo.net] has joined #code |
19:36 | | mode/#code [+o GeekSoldier] by ChanServ |
19:59 | | Attilla [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has quit [Connection reset by peer] |
19:59 | | Attilla [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has joined #code |
19:59 | | mode/#code [+o Attilla] by ChanServ |
20:01 | | Attilla_ [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has joined #code |
20:01 | | Attilla [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has quit [Connection reset by peer] |
20:22 | | Rhamphoryncus [~rhamph@Nightstar-7184.ed.shawcable.net] has joined #code |
21:30 | | Vornicus-Latens is now known as Vornicus |
21:50 | | * Vornicus fiddles. |
21:51 | | AnnoDomini is now known as Rome |
21:51 | | * Rome burns. |
21:51 | | Rome is now known as AnnoDomini |
22:06 | | AnnoDomini [AnnoDomini@Nightstar-29377.neoplus.adsl.tpnet.pl] has quit [Quit: Juffo-Wup is a *candle*. It is filled with many *candy bars*.] |
22:08 | <@Vornicus> | Okay, I don't have any idea how to do this. |
22:08 | <@Derakon> | Build a neural network and painstakingly train it to do what you want. |
22:10 | < EvilDarkLord> | Figure out what you want to do in detail. |
22:10 | | * Derakon eyes today's The Daily WTF, which is neatly summed up in this line: "if (!this) return false;" |
22:17 | <@Vornicus> | This probably means my interface is still wrong. |
22:20 | | Namegduf_ [namegduf@86.6.85.ns-27218] has joined #code |
22:21 | <@Vornicus> | If I could, like, have the user drag scores to the slots, that would make my life easier. |
22:24 | <@Derakon> | What are you trying to do? |
22:26 | <@Vornicus> | Given a pile of scores, have the user place them into a pile of attributes. |
22:27 | <@Derakon> | Like you have 18, 14, 12, 10, 10, 8, 6, and you want to match them to STR, DEX, CON, INT, WIS, CHA? |
22:27 | <@Vornicus> | Yeah, but only six scores. |
22:27 | <@Derakon> | ...er, right. |
22:28 | <@Derakon> | You could have a set of six buttons next to each of the stats, and the user clicks the button corresponding to the value they want assigned to the stat. That would then also unassign that value from a stat that had previously claimed it. |
22:28 | <@Derakon> | A bit clunky, but it'd work and allow straightforward "whoops, I actually wanted that over here." |
22:29 | <@Vornicus> | Hm, radio buttons would work, but I'd have to handle the change... that's a javascript job, and I /think/ I can pull that off. |
22:29 | <@Derakon> | Yeah, Javascript. |
22:30 | <@Vornicus> | In fact... I think that will be perfect. |
22:30 | <@Derakon> | Onclick="assignStat(thisStatName, thisValueId)" which up which stats are matched to which value IDs (since you can have the same value twice)... |
22:31 | <@Vornicus> | THank you! |
22:31 | <@Derakon> | Er, "which checks up..." |
22:31 | <@Derakon> | No problem. :) |
22:32 | <@Derakon> | Actually, instead of doing the "check and unassign" setup, you could disable stat values from the other rows as they're used, and then have a reset button that wipes all the settings and re-enables the buttons. That'd probably be simpler. |
22:34 | | Namegduf [namegduf@86.6.85.ns-27218] has quit [Quit: Lost terminal] |
22:35 | | * TheWatcher eyes perl DBI |
22:37 | <@TheWatcher> | *facepalms* Or, it could just be me forgetting to pass in a variable to execute() |
22:37 | <@Derakon> | Heh. |
22:38 | <@Vornicus> | Der: How about instead of remove or disable/reset, I swap? |
22:39 | <@Vornicus> | This way I never end up in an invalid state? |
22:40 | <@Derakon> | That'd require you to assign stats from the get-go, though, which might be confusing. |
22:41 | <@Vornicus> | Not that confusing. |
22:55 | <@Derakon> | Well, give it a shot and see how well it works. |
22:57 | | * Vornicus tries to remember how to do this now. |
23:02 | <@Derakon> | I'd recommend using form buttons instead of radio buttons. |
23:03 | <@Derakon> | And when you click on a button, it calls swapStats(statIndex, valueIndex). |
23:03 | <@Derakon> | You have an array of values, and an array that maps stat to the index of the value of the stat. |
23:04 | <@Vornicus> | I think I can do radio buttons. |
23:04 | <@Vornicus> | Indeed from what I can tell it's the same thing except I only have to change stuff in one dimension. |
23:04 | | * Derakon shrugs. |
23:05 | <@Derakon> | I was figuring you'd have a div with text for the value of the stat so you could fit in whatever other modifiers you'd have...a moment, mockup time. |
23:06 | <@Vornicus> | RIght, there's a lot going on in my grid right now. |
23:10 | <@Derakon> | Something like this: http://derakon.dyndns.org/~chriswei/temp2/stats.html |
23:10 | <@Derakon> | Except you'd color the button that's currently assigned to the stat. |
23:10 | <@Vornicus> | Once I get the table together, you'll see what I mean. |
23:10 | <@Derakon> | Fair enough. |
23:43 | | Namegduf_ is now known as Namegduf |
23:59 | | Attilla_ is now known as Attilla |
--- Log closed Sat May 16 00:00:09 2009 |