--- Log opened Wed Jan 20 00:00:16 2010 |
00:08 | | Derakon[work] [Derakon@Nightstar-1ffd02e6.ucsf.edu] has quit [[NS] Quit: Leaving] |
00:37 | | Bobsentme [Bobsentme@Nightstar-79f8b1cd.livnmi.sbcglobal.net] has quit [NickServ (GHOST command used by Bobsentme_)] |
00:37 | | Bobsentme [Bobsentme@Nightstar-79f8b1cd.livnmi.sbcglobal.net] has joined #code |
00:37 | | Bobsentme [Bobsentme@Nightstar-79f8b1cd.livnmi.sbcglobal.net] has quit [NickServ (GHOST command used by Bobsentme_)] |
00:38 | | 963AAARAU [Bobsentme@Nightstar-79f8b1cd.livnmi.sbcglobal.net] has joined #code |
00:38 | | Bobsentme [NSwebIRC@051596.69129A.C96753.910884] has joined #code |
00:47 | | Derakon [Derakon@Nightstar-5abd3ac9.ca.comcast.net] has joined #code |
00:47 | | mode/#code [+o Derakon] by Reiver |
00:57 | | * McMartin can remove the Insufficiently Fluffy Kitten errors from his company's product. |
00:57 | <@McMartin> | The features that were hidden from the user we now will admit exist, and so that means the messages related to them don't need to be obfuscated nonsense~ |
01:02 | < Bobsentme> | hehehe |
01:04 | < Bobsentme> | Ok, so passing variables from JavaScript to PHP is a gigantic pain in the ass. |
01:04 | < Bobsentme> | I see that PHP has a clone node function, but I don't think it works the same way as JavaScript's (ie: dynamically adding elements to a form when a user clicks a button). Anyone got any ideas? |
01:08 | | chintimin [zag@Nightstar-d0088b95.or.comcast.net] has quit [Ping timeout: 121 seconds] |
01:09 | < celticminstrel> | Um... use Javascript, not PHP? |
01:09 | <@ToxicFrog> | Bobsentme: PHP probably isn't running on the client, so it _can't_ modify the page like that |
01:10 | <@ToxicFrog> | PHP runs on the server and generates the page to send to the browser; JS runs in the browser and modifies the page as the user is viewing it |
01:10 | <@ToxicFrog> | (unless you're getting all AJAXy) |
01:10 | < Bobsentme> | ok |
01:10 | <@McMartin> | (Even then, but then the client is making extra requests to the server.) |
01:10 | < Bobsentme> | I was afraid of that. But may have found a solution. |
01:13 | | Attilla [Attilla@FBC920.A5C359.03F0E2.BEA842] has quit [Ping timeout: 121 seconds] |
01:17 | | MyCatVerbs [mycatverbs@Nightstar-f43ca811.blueyonder.co.uk] has quit [Ping timeout: 121 seconds] |
01:26 | | Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has joined #code |
01:38 | | Attilla [Attilla@FBC920.81F6E9.6632EA.A0BB54] has joined #code |
01:38 | | mode/#code [+o Attilla] by Reiver |
01:49 | <@Derakon> | As a general rule, you do this kind of thing by inserting hidden form fields into the page. |
01:49 | <@Derakon> | Careful when going PHP -> Javascript, though, to make certain you've properly escaped your values. |
02:15 | | * Bobsentme nods. |
02:18 | < Bobsentme> | My biggest problem right now is figuring out the onload issue. |
02:19 | < Bobsentme> | I've seperated out the clonenodes into 2 seperate functions. One that displays more rows for adding NEW authors, and one that adds more rows for adding EXISTING authors. |
02:20 | < Bobsentme> | Problem is, whichever onload is loaded last, is whatever the buttons add. So, if onload = cloneNew; is the last onload, clicking "Add Existing Authors" displays blank text fields, just like the "Add New Author" button. |
02:27 | < Bobsentme> | I believe it's a silly problem, but my lack of experience and knowledge of javascript is making things difficult. |
02:30 | <@Derakon> | So you have two buttons to add new rows? |
02:30 | <@Derakon> | Or only one? |
02:32 | < Bobsentme> | nevermind, I'm making something overly difficult again. |
02:32 | <@Derakon> | :) |
02:32 | | * Bobsentme quietly places a check box and a simple function to see if it's checked. |
02:35 | < Bobsentme> | my biggest problem in coding, I've found, is my ability to go "Oooooh, shiny!" instead of making thigns work. |
02:42 | < Bobsentme> | oi, maybe the other way was better. |
02:43 | < Bobsentme> | Also, I hate Javascript. |
02:43 | | Zedidiah [zag@Nightstar-d0088b95.or.comcast.net] has joined #code |
02:45 | <@McMartin> | Yes |
02:48 | < gnolam> | That means you're still sane. |
02:48 | <@McMartin> | Or are a compiler writer~ |
02:48 | <@McMartin> | GTK and friends treat JS as if it were an assembly language and compile sane languages *to* it |
02:48 | < Bobsentme> | heh |
02:48 | < celticminstrel> | JavaScript is almost as good as Python. |
02:49 | <@ToxicFrog> | Javascript is actually ok as a language. The problem is that no two browsers have the same API or runtime environment for it. |
02:49 | <@ToxicFrog> | And if you're not working in a browser, there's probably a language better suited to what you're doing. |
02:49 | < celticminstrel> | Hehe. |
02:49 | <@ToxicFrog> | So JS only gets used in environments that are made of liquid pain. |
02:51 | | * Derakon snerks at TASVideos, where someone's been poking around in a pirate/hack game that ports Sonic the Hedgehog to the NES (with disasterous results). |
02:52 | <@Derakon> | He discovered that it's 4 megabits because they duplicated everything in the game for every level...and there's a bunch of unused stuff. Like speed shoes. They decided not to put those into any of the levels. |
02:52 | <@Derakon> | Despite this being Sonic. Nominally. |
02:52 | <@ToxicFrog> | Link? |
02:52 | | Attilla [Attilla@FBC920.81F6E9.6632EA.A0BB54] has quit [Connection reset by peer] |
02:52 | < celticminstrel> | You mean 4 megabytes? |
02:53 | <@Derakon> | There's not really anything more than what I just described, unless you want to see the run itself. |
02:53 | <@Derakon> | Here's the submission: http://tasvideos.org/forum/viewtopic.php?t=8996&postdays=0&postorder=asc&start=0 |
02:53 | <@Derakon> | (Side note: Sonic is replaced by crudely-altered Mario sprites) |
02:53 | <@Derakon> | Celticminstrel: no, I meant 4 megabits. |
02:53 | <@Derakon> | Remember: NES. |
02:54 | <@Derakon> | Super Metroid, an SNES game, had as one of its main selling features a 24-megabit cartridge. |
02:57 | | gnolam [lenin@Nightstar-38637aa0.priv.bahnhof.se] has quit [[NS] Quit: z?] |
03:07 | < Bobsentme> | Ok, here's my code: http://pastebin.starforge.co.uk/103 |
03:07 | < Bobsentme> | My problem is the "onload = " events at the bottom of the page. |
03:08 | < Bobsentme> | err...lines 38 and 29 |
03:08 | < Bobsentme> | dammit. 38 and 39. |
03:09 | < Bobsentme> | Both buttons do exactly what the last onload event tells them to do. I have no idea how to implement a work around / clean it up to make each button do it's unique function. |
03:09 | < Bobsentme> | I've tried a single function with if statements, but that failed miserably. |
03:09 | < Bobsentme> | anyone got a suggestion? |
03:10 | < Bobsentme> | (and if I don't respond, it's because my boss is making me go smoke) |
03:10 | <@Derakon> | You can only have one onload event, AIUI. |
03:10 | <@Derakon> | But why are you using onload here? |
03:10 | <@Derakon> | Second question: why are you creating MySQL connections in Javascript? |
03:10 | <@Derakon> | That's just asking for an injection attack. |
03:11 | <@Derakon> | Oh, wait, that's in a PHP tag. My bad. |
03:13 | <@Derakon> | Anyway, so make the onload be a function that calls cloneNew and cloneOld. |
03:23 | < Bobsentme> | So, one function that calls both will keep them from overwriting? |
03:24 | <@Derakon> | Well, let me put it this way. Say you have some code that says "a = 1; a = 2;" What is the value of a at the end? |
03:24 | < Bobsentme> | 2. |
03:24 | <@Derakon> | Right. |
03:24 | <@Derakon> | onload is a variable that contains code to run when the page loads. |
03:24 | < Bobsentme> | point taken. |
03:26 | < Bobsentme> | I think the onload issue could be worked around if I could properly setup an if statement to check the elementID. |
03:27 | < Bobsentme> | That'd cut the lines of javascript code in half. |
03:27 | <@Derakon> | if (element.id == 'foo') { ... } else { ... } |
03:27 | <@Derakon> | I think that's the syntax. |
03:27 | <@Derakon> | It's been about a year since I did major Javascript work so I'm a bit rusty. |
03:28 | < Bobsentme> | no worries. more than I knew. |
03:30 | < Bobsentme> | do i send the element.id through the function? |
03:30 | < Bobsentme> | nevermind, misread the above. |
03:37 | | Vornicus is now known as Phas |
03:41 | | Zedidiah [zag@Nightstar-d0088b95.or.comcast.net] has quit [Ping timeout: 121 seconds] |
03:50 | | Bobsentme [NSwebIRC@051596.69129A.C96753.910884] has quit [[NS] Quit: Page closed] |
03:53 | | Bobsentme [NSwebIRC@051596.69129A.C96753.910884] has joined #code |
03:59 | | Bobsentme [NSwebIRC@051596.69129A.C96753.910884] has quit [Ping timeout: 121 seconds] |
04:01 | | Kazriko [kaz@Nightstar-e09690fa.client.bresnan.net] has quit [[NS] Quit: Leaving] |
04:01 | | kaz_ [kaz@Nightstar-e09690fa.client.bresnan.net] has joined #code |
04:01 | | kaz_ is now known as Kazriko |
04:01 | | Bobsentme [NSwebIRC@051596.69129A.C96753.910884] has joined #code |
04:02 | < Bobsentme> | well, the debugger was a bust. Literally |
04:29 | | * Bobsentme bangs head |
04:29 | < Bobsentme> | got it working. But wrapping my brain around it hurts. |
04:29 | < Bobsentme> | I'm so printing this code out and stomping on it later. |
04:31 | | celticminstrel [celticminstre@Nightstar-f8b608eb.cable.rogers.com] has quit [[NS] Quit: *hums* Can't stay now!] |
04:39 | < Bobsentme> | I love it when a project manager is nothing more than a parrot. >.> |
04:39 | < Bobsentme> | Professor who assigned this project to me on Thursday: "Ok, you've got a week. Go for it" |
04:39 | < Bobsentme> | e-mail from Project manager today: "Your deadline for this is Friday" |
04:40 | < Bobsentme> | Hey Project Manager, thanks for waiting 4 days to tell me my project is due in 3. I really appreciate it. |
04:45 | < Bobsentme> | ok, so now that I've got the javascript / buttons doing exactly what I want, I have to find a way to send the data into a php page. |
04:45 | < Bobsentme> | preferably without crashing a browser. |
04:46 | | * Bobsentme grabs his voodoo stones |
04:58 | | gnolam [lenin@Nightstar-38637aa0.priv.bahnhof.se] has joined #code |
06:58 | | Derakon is now known as Derakon[AFK] |
07:13 | < Bobsentme> | gah. |
07:13 | < Bobsentme> | Have I mentioned how much I hate Javascript? |
07:14 | < Bobsentme> | 3 hours, and I've gotten nowhere with trying to send variables anywhere. |
07:25 | | Phas is now known as Vornicus |
07:45 | | MyCatVerbs [mycatverbs@Nightstar-f43ca811.blueyonder.co.uk] has joined #code |
07:45 | | mode/#code [+o MyCatVerbs] by Reiver |
07:48 | < Bobsentme> | anyone know how to break out of a javascript loop in FF? |
07:50 | < Vornicus> | break; should get you out of the loop. |
08:01 | < Bobsentme> | yeah..I kinda mean one that I'm stuck in inside a browser. |
08:02 | < Bobsentme> | brb, gotta crash the browser |
08:05 | < Vornicus> | Yeah, infinite browser looping is Bad, it means you've done it wrong. |
08:06 | | Bobsentme [NSwebIRC@051596.69129A.C96753.910884] has quit [Ping timeout: 121 seconds] |
08:15 | | AnnoDomini [annodomini@Nightstar-54cf2c56.adsl.tpnet.pl] has joined #code |
08:15 | | mode/#code [+o AnnoDomini] by Reiver |
08:46 | | Bobsentme [NSwebIRC@051596.69129A.C96753.910884] has joined #code |
08:50 | | Vornicus is now known as Vornicus-Latens |
08:56 | | Rhamphoryncus [rhamph@Nightstar-a62bd960.abhsia.telus.net] has quit [Client exited] |
09:04 | | MyCatVerbs [mycatverbs@Nightstar-f43ca811.blueyonder.co.uk] has quit [Ping timeout: 121 seconds] |
09:39 | | You're now known as TheWatcher |
10:05 | < Bobsentme> | Morning Tw |
10:07 | <@TheWatcher> | 'lo |
10:16 | | Zedidiah [zag@Nightstar-d0088b95.or.comcast.net] has joined #code |
10:39 | | Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has quit [Connection closed] |
10:45 | | Tarinaky_ [jes55@Nightstar-203b3f66.le.ac.uk] has joined #code |
10:45 | < Tarinaky_> | Does anyone know if it's possible to change the install prefix of a Linux binary without recompiling it? |
10:46 | | MyCatVerbs [mycatverbs@Nightstar-3b2c2db2.bethere.co.uk] has joined #code |
10:46 | | mode/#code [+o MyCatVerbs] by Reiver |
10:47 | <@TheWatcher> | Tarinaky_: depends. If it's set up to load resources from within the prefix path, /possibly/ not (you could try a `strings <binary> | grep 'prefix'` to see whether it contains the path anywhere) |
10:48 | <@TheWatcher> | If it's standalone, no supporting resources, sure, it should work fine |
10:48 | <@TheWatcher> | just move it |
10:48 | < Tarinaky_> | The program starts but the problem is it's looking for syntax highlighting rules in /usr/share/ |
10:49 | <@TheWatcher> | Hm. you can't shambolic link the appropriate directory into there? |
10:49 | < Tarinaky_> | I don't have admin access. |
10:50 | <@TheWatcher> | Yeah, re-configure/compile time then :/ |
10:50 | < Tarinaky_> | If I did I'd have installed the libraries I needed to compile it and not had this problem >.> |
10:50 | < Tarinaky_> | Problem is - I can't compile it because I don't have needed libraries. |
10:50 | < Tarinaky_> | >.< |
10:51 | <@TheWatcher> | What're you using, Andre Simon's highlight? |
10:51 | < Tarinaky_> | No. Geany. |
10:52 | <@TheWatcher> | The text editor? |
10:52 | < Tarinaky_> | YEs. |
10:52 | <@TheWatcher> | Hm |
10:53 | <@TheWatcher> | Okay, so I guess the real problem is that you don't have the /headers/ for the libraries, rather than not having the libraries themselves |
10:53 | < Tarinaky_> | Yup. |
10:54 | < Tarinaky_> | If it helps, the path is in the string dump. |
10:54 | <@TheWatcher> | What linux distro are you on? |
10:54 | < Tarinaky_> | Not entirely sure. |
10:54 | < Tarinaky_> | i686 binaries work though. |
10:55 | < Tarinaky_> | SuSE I think. |
10:56 | <@TheWatcher> | hm, I wonder if I could make a static linked binary that'd work for you, a moment |
10:57 | < Tarinaky_> | I'm trying to edit the binary to see if that fixes it >.> |
10:58 | <@TheWatcher> | what'd you like the prefix to be, idly? |
10:59 | < Tarinaky_> | /home/j/jes55/local/ |
10:59 | <@TheWatcher> | okay, let me poke at things |
10:59 | < Tarinaky_> | Nope. Segfault. Figures. |
11:02 | <@MyCatVerbs> | Tarinaky_: if you changed the length of the string then you probably broke a pile of jump tables. |
11:02 | <@MyCatVerbs> | You -could- in theory substitute another string of the same length. Perhaps put a symlink in /tmp? :) |
11:02 | <@MyCatVerbs> | (Don't do that. Build a new binary with the correct path in instead.) |
11:03 | <@MyCatVerbs> | I love how ispell considers "foobar" to be correct but "antidisestablishmentarianism" wrong. |
11:04 | < Tarinaky_> | Yeah. I figured something like that but I decided to try it as a "What;s the worst that could happen?" thing. |
11:04 | < Tarinaky_> | Admitedly the worst is it trashes my entire /home/ directory but there's nothing that's not mirrored. |
11:04 | < Tarinaky_> | ^^ |
11:05 | <@MyCatVerbs> | Replacing built-in strings with other built-in strings of exactly identical length is an old tradition, you know. :) |
11:05 | < Tarinaky_> | I know. |
11:06 | < Tarinaky_> | Dating back to when man built stonehenge or when moses typed up the 10 commandments in vi (shortly after God handed down a tablet with the vi source code) |
11:08 | <@MyCatVerbs> | Surprisingly enough, Bill Joy doesn't actually have a Unix beard. |
11:09 | < Tarinaky_> | Bill Joy? |
11:09 | <@MyCatVerbs> | vi's author. |
11:09 | < Tarinaky_> | Ah. |
11:09 | <@MyCatVerbs> | Big honcho at Sun Microsystems for a while now, he's done a lot of other stuff too. |
11:09 | <@MyCatVerbs> | But vi's the thing that warrants his sainthood. :) |
11:09 | < Tarinaky_> | I'm going to have to move soon. Apparently this computer lab will be in use in ~ half an hour. |
11:09 | < Tarinaky_> | Shall I move now or...? |
11:10 | <@MyCatVerbs> | Ah, beans. |
11:10 | < Tarinaky_> | BRB. |
11:10 | <@MyCatVerbs> | I'd leg it and grab a cup of tea, but your choice. |
11:10 | < Tarinaky_> | There're other computers. |
11:10 | <@MyCatVerbs> | Have fun, anyways. |
11:10 | | Tarinaky_ [jes55@Nightstar-203b3f66.le.ac.uk] has quit [Connection closed] |
11:23 | | Tarinaky_ [jes55@Nightstar-203b3f66.le.ac.uk] has joined #code |
11:23 | < Tarinaky_> | I am back! |
11:24 | <@MyCatVerbs> | Salutations! :) |
11:24 | < Tarinaky_> | MyCatVerbs, Had any luck compiling? :x |
11:25 | <@TheWatcher> | Tarinaky_: I think you got your nicks mixed ;P |
11:25 | < Tarinaky_> | >.< |
11:25 | <@TheWatcher> | Also, yes, link in PM |
11:25 | < Tarinaky_> | What PM? |
11:25 | <@MyCatVerbs> | Er, me compiling? |
11:25 | < Tarinaky_> | I think you got your nicks mixed ^^ |
11:25 | < Tarinaky_> | MyCatVerbs, Sorry. |
11:25 | <@MyCatVerbs> | I'm not compiling anything that I'm aware of. :D |
11:25 | | Attilla [Attilla@FBC920.81F6E9.6632EA.A0BB54] has joined #code |
11:25 | | mode/#code [+o Attilla] by Reiver |
11:30 | | * Bobsentme compiles MyCatVerbs into a MyCodeVerbs |
11:30 | < Bobsentme> | there. He's executable now. :) |
11:30 | < Tarinaky_> | Annoying. I hate swapping between text editors because you end up doing silly things, |
11:31 | < Tarinaky_> | Like going into 'insert mode' in a text editor that doesn't have an insert mode >.> |
11:50 | <@MyCatVerbs> | It's always been possible to execute me. |
11:50 | <@MyCatVerbs> | I'm chmod'd 755. |
11:50 | <@MyCatVerbs> | It's just that my shebang line is scary. |
11:50 | <@MyCatVerbs> | Tarinaky_: forced to switch from g?vim to... in-browser textarea or something? |
11:51 | < Tarinaky_> | Nah. I have gvim. |
11:52 | < Tarinaky_> | Just after using gvim for any length I'll sit down at home and do silly things :w |
11:52 | <@MyCatVerbs> | Use gvim at home too, then? |
11:52 | <@MyCatVerbs> | If you're not using gvim at home because you use Windows at home then I have good news for you. ;) |
11:53 | <@MyCatVerbs> | I can't think of any other particularly good reason not to stick with vi. |
11:53 | < Tarinaky_> | No. I use geany because it has slightly better syntax highlighting. |
11:53 | < Tarinaky_> | Plus I prefer tabs. |
11:53 | < Tarinaky_> | Tabs are good. |
11:53 | <@MyCatVerbs> | Huh, okay. |
11:54 | <@MyCatVerbs> | Personally I'd far rather have my Lovecraftian keybindings than tabs, but each to their own. |
11:54 | <@TheWatcher> | That's why I use emacs >.> |
11:55 | <@MyCatVerbs> | TheWatcher: me too. For some odd reason, that hasn't stopped me from continuing to advocate that everybody else should use vi. :) |
11:55 | <@TheWatcher> | That's... unusual. |
11:56 | <@MyCatVerbs> | Perhaps it's maliicious. :D |
11:56 | <@MyCatVerbs> | *malicious, d'oh. |
11:58 | < Tarinaky_> | Eugh. I really need to streamline my input system :/ |
12:00 | | Bobsentme [NSwebIRC@051596.69129A.C96753.910884] has quit [Ping timeout: 121 seconds] |
12:00 | <@TheWatcher> | Hmm? |
12:02 | < Tarinaky_> | It's a mess of switches and redundant code. |
12:02 | | * TheWatcher passes Tarinaky_ the refactoring cannon. |
12:03 | < Tarinaky_> | How can I reset a single file in git? |
12:03 | < Tarinaky_> | I'd read the manual but I haven't set my manpath right >.> |
12:03 | <@TheWatcher> | http://www.kernel.org/pub/software/scm/git/docs/user-manual.html ¬¬ |
12:04 | < Tarinaky_> | Yeah. Firefox doesn't work with any speed on here >.> |
12:05 | <@TheWatcher> | `git checkout HEAD^ path/to/file` then? |
12:07 | | Tarinaky_ [jes55@Nightstar-203b3f66.le.ac.uk] has quit [Connection closed] |
12:08 | | Tarinaky_ [jes55@Nightstar-203b3f66.le.ac.uk] has joined #code |
12:08 | < Tarinaky_> | Wow. The close button closes. Who'd have thought that >.< |
12:09 | < Tarinaky_> | Need to figure out how to refactor the input code so as not to be such a mess though :/ |
12:10 | < Tarinaky_> | Also. Can't work here. Too many distractions Gah >.< |
12:10 | < Tarinaky_> | I'm going to go find a quiet place and work on paper if I have to >.> |
12:10 | | Tarinaky_ [jes55@Nightstar-203b3f66.le.ac.uk] has quit [Client closed the connection] |
12:21 | | AbuDhabi [annodomini@Nightstar-9d3229ea.adsl.tpnet.pl] has joined #code |
12:23 | | AnnoDomini [annodomini@Nightstar-54cf2c56.adsl.tpnet.pl] has quit [Ping timeout: 121 seconds] |
13:38 | < gnolam> | Issue 543045: Be more frugal with goats in these challenging economic times. (Closed) |
13:39 | < gnolam> | (http://codereview.chromium.org/543045 ) |
13:39 | <@TheWatcher> | ... |
13:41 | <@TheWatcher> | the fuck?! |
13:57 | < 963AAARAU> | so I can still abuse the sheep, right? |
14:29 | <@MyCatVerbs> | 963AAARAU: croeso i cymru. |
14:29 | <@MyCatVerbs> | *Cymru. |
14:36 | | Tarinaky_ [jes55@Nightstar-203b3f66.le.ac.uk] has joined #code |
14:36 | < Tarinaky_> | Back. All the normally not-busy labs were booked out. |
14:36 | < Tarinaky_> | All of them :/ |
14:36 | < Tarinaky_> | This made me sad. |
14:37 | <@MyCatVerbs> | Bummer. |
14:37 | < Tarinaky_> | This one's free now. |
14:37 | < Tarinaky_> | So I can actually do some work for a little while before I have to leave. |
14:38 | <@MyCatVerbs> | I take it that the rooms are being booked out by exams? |
14:39 | < Tarinaky_> | No. |
14:39 | < Tarinaky_> | Open day. |
14:39 | < Tarinaky_> | There're secondary school kids debriefing on bottle rockets in one room. |
14:39 | <@MyCatVerbs> | Ah! Why aren't you scaring the twerpy little sixth formers, then? |
14:39 | < Tarinaky_> | This room had some I-science thingie going on. |
14:40 | < Tarinaky_> | MyCatVerbs, Because they won't let me anywhere near them? |
14:40 | < Tarinaky_> | :p |
14:40 | | * TheWatcher nods sagely |
14:40 | < Tarinaky_> | Anyway. I did some thinking about how to 1: Implement creatures and 2: refactor input code. |
14:40 | <@TheWatcher> | It's a good idea to carefully screen the undergrads you let near open day visitors |
14:40 | <@MyCatVerbs> | Well, next time they're going through corridors, shuffle past sobbing that you need more caffeine. |
14:40 | <@TheWatcher> | ZOMBIE FLASH MOB! |
14:40 | < Tarinaky_> | The annoying part is I think I'm going to have to do this simultaneously. |
14:41 | <@MyCatVerbs> | TheWatcher: now that'd rule. |
14:41 | < Tarinaky_> | Which is the sortof thing I want to avoid doing if I can help it :/ |
14:42 | <@MyCatVerbs> | Why would you be doing both simultaneously? |
14:42 | < Tarinaky_> | Movement. |
14:42 | < Tarinaky_> | The biggest mess in the input subsystem is movement. |
14:42 | <@MyCatVerbs> | I can't see how you could possibly have a sane design if input handling and the simulation are wound up in each other so tightly that they aren't separated as modules |
14:43 | < Tarinaky_> | Well. At present 'simulation' is two variables. iPlayerX and iPlayerY. |
14:43 | | * TheWatcher suspects that Tarinaky wants to make the player a creature, and thus expose the same interface for movement as other creatures? |
14:43 | < Tarinaky_> | I don't have an interface for creatures atm. |
14:44 | < Tarinaky_> | The input subsystem is such a mess that it'll take -ages- to replace all the different bits of it to use the creature array instead of iPlayerX and iPlayerY. |
14:45 | < Tarinaky_> | And I can't neaten up the input subsystem without a uniform way of doing movement in all eight directions. |
14:45 | < Tarinaky_> | :x |
14:45 | < Tarinaky_> | And even if I did I'd still have to replace most of it anyway >.< |
14:45 | < Tarinaky_> | Ohh! The ickle kiddies are leaving! |
14:46 | < Tarinaky_> | Anyway. Yeah. I fail >.< |
14:46 | < Tarinaky_> | I also need to work out htf do arrange my input system so that it doesn't turn into a mess. |
14:47 | < Tarinaky_> | The best I could come up with is a map of function pointers indexed by the different key constants. |
14:47 | < Tarinaky_> | Which isn't exactly neat >.< |
14:47 | < Tarinaky_> | Mostly because I always forget how to do function pointers. |
14:48 | < Tarinaky_> | I have a basic class hierachy for entities in the game sketched out though. Which is good. |
14:50 | | * TheWatcher positions his fingers, eyes the suggestion his brain was about to come out with, decides it'd be a much better idea all around if he worked on this documentation over here |
14:52 | < Tarinaky_> | Is this because I'm a bad programmer or because your idea's bad? |
14:53 | <@TheWatcher> | It's because my suggestion involves not inconsiderable amounts of code |
14:56 | < gnolam> | [15:43] <Tarinaky_> Well. At present 'simulation' is two variables. iPlayerX and iPlayerY. |
14:56 | < gnolam> | ... not even wrapped inside a structure of some kind? >_< |
15:00 | < Tarinaky_> | They're members of a class. |
15:00 | < Tarinaky_> | The guide said not to model the PC as a creature at first. |
15:01 | < Tarinaky_> | Since the emphasis is on getting something running. |
15:06 | < Tarinaky_> | Anyway. I'm mostly wanting some confirmation on whether my idea for input is right or not :x |
15:12 | < gnolam> | Function pointers are a bad idea. |
15:13 | < gnolam> | I'd go for some kind of message passing system. |
15:13 | < Tarinaky_> | Message passing? |
15:14 | < gnolam> | But at least replace the function pointers with functors or functonoids. C++ and function pointers... don't really get along. |
15:21 | < Tarinaky_> | Don't the objects in a container have to be the same type? |
15:22 | < Tarinaky_> | By which I mean, the same size. |
15:24 | <@MyCatVerbs> | Broadly, yes. |
15:25 | < Tarinaky_> | So I'm not entirely sure how this'd be useful :x |
15:25 | <@MyCatVerbs> | You can quite happily have containers of references or pointers to objects of a common supertype. |
15:25 | < Tarinaky_> | Ahhh. |
15:26 | < Tarinaky_> | So I could have a map of an abstract class and derive specific cases for the different keys? |
15:27 | <@MyCatVerbs> | You also shouldn't rely on two distinct types having exactly the same size unless the standard defines them as being identically sized. (e.g. intptr_t and void*). |
15:28 | < Tarinaky_> | Yeah. I wasn't. |
15:28 | < Tarinaky_> | But I gotta run soon so quickly. |
15:28 | <@MyCatVerbs> | I was just pointing it out to be paranoid. |
15:28 | < Tarinaky_> | A map of key constants to an abstract class would be valid? |
15:29 | < Tarinaky_> | And I could happily populate it with derived functors (with a common interface ofc) |
15:29 | < Tarinaky_> | Yes/no? |
15:29 | <@MyCatVerbs> | Uh, you can quite happily have things like vector<Animal*> and stuff Duck and Mongoose pointers into it, assuming that you have a supertype relationship in place. |
15:30 | < Tarinaky_> | And by supertype you mean "Duck and Mongoose both inherit from Animal" right? |
15:30 | <@MyCatVerbs> | Yes. |
15:30 | < Tarinaky_> | Awesome! |
15:30 | <@MyCatVerbs> | You're asking if you can have a map from, what to what? |
15:30 | < Tarinaky_> | I'd got it into my head I couldn;t, lol. |
15:30 | <@MyCatVerbs> | You can't have vector<Animal> and necessarily put Duck and Mongoose into it. |
15:30 | < Tarinaky_> | Ah. |
15:30 | <@MyCatVerbs> | You can have vector<Animal*> and put *Duck and *Mongoose into it. |
15:31 | < Tarinaky_> | :/ Problem is. Where do I put my instantiated functors? |
15:31 | <@MyCatVerbs> | Define "functor"? |
15:31 | < Tarinaky_> | Class that's just a wrapper for a function. |
15:31 | < Tarinaky_> | I think the language defines a functor as a function that overloads operator() |
15:32 | <@MyCatVerbs> | You can override operator()!? |
15:32 | < Tarinaky_> | Yes. |
15:32 | < Tarinaky_> | I've never done it but the documentation says explicitly that you can. |
15:33 | <@MyCatVerbs> | Are you sure that's portable? |
15:33 | < Tarinaky_> | It's in the standard. |
15:33 | <@MyCatVerbs> | Wow. |
15:33 | <@MyCatVerbs> | Didn't know that. |
15:34 | < Tarinaky_> | But yeah. If I have a bunch of ints corresponding to the different keys in curses mapped to pointers to classes that contain a function that specifies what it should do when that key is pressed. |
15:34 | < Tarinaky_> | Wait... |
15:35 | | * Tarinaky_ facepalms. |
15:35 | < Tarinaky_> | I can instantiate it in the declaration. |
15:37 | < Tarinaky_> | Right. I need to leave now. |
15:38 | < Tarinaky_> | I just need to come up with a way of reducing the eight different movement directions into a single function >.> |
15:38 | < Tarinaky_> | Later. |
15:38 | | Tarinaky_ [jes55@Nightstar-203b3f66.le.ac.uk] has quit [Connection closed] |
16:19 | | Derakon[AFK] [Derakon@Nightstar-5abd3ac9.ca.comcast.net] has quit [Ping timeout: 121 seconds] |
17:35 | | Rhamphoryncus [rhamph@Nightstar-a62bd960.abhsia.telus.net] has joined #code |
18:16 | | MyCatVerbs [mycatverbs@Nightstar-3b2c2db2.bethere.co.uk] has left #code ["ERC Version 5.3 (IRC client for Emacs)"] |
18:16 | | MyCatVerbs [mycatverbs@Nightstar-3b2c2db2.bethere.co.uk] has joined #code |
18:16 | | mode/#code [+o MyCatVerbs] by Reiver |
18:43 | | Vornicus-Latens is now known as Vornicus |
18:50 | | MyCatVerbs [mycatverbs@Nightstar-3b2c2db2.bethere.co.uk] has left #code ["ERC Version 5.3 (IRC client for Emacs)"] |
20:11 | | * PinkFreud eyes the documentation for perlipc |
20:11 | < PinkFreud> | # If a second child dies while in the signal handler caused by the |
20:11 | < PinkFreud> | # first death, we won't get another signal. So must loop here else |
20:11 | < PinkFreud> | # we will leave the unreaped child as a zombie. And the next time |
20:11 | < PinkFreud> | # two children die we get another zombie. And so on. |
20:12 | < PinkFreud> | ... since when does George Romero use perl? |
20:12 | < PinkFreud> | :P |
20:13 | | * Tarinaky groans... meeemmmrryyyyyy. Threaaadddtaaaablleeee meeemmrrryyy. |
20:13 | | * Tarinaky lurches towards PinkFreud. |
20:13 | < PinkFreud> | oh crap. someone didn't reap their dead child. |
20:14 | < Tarinaky> | My parents should totally have reaped me as a child, lol. |
20:14 | < PinkFreud> | lol |
20:18 | | * 963AAARAU walks in, then backs sloowwwwly away from the room |
20:18 | | 963AAARAU is now known as Bobsentme |
20:18 | < Tarinaky> | It's too late. |
20:18 | < Tarinaky> | You're already infected. |
20:19 | | * PinkFreud sends zombie Tarinaky towards Bobsentme |
20:19 | < Tarinaky> | Before you know it you'll be one of the walking dead - coding in C++ - like the rest of us. |
20:19 | < Bobsentme> | going to reap...errr...pick up the kids from school |
20:19 | < PinkFreud> | lol |
20:37 | < gnolam> | Heh. |
20:39 | < gnolam> | I remember how I got Strange Looks from passers-by when discussing concurrency labs. |
20:40 | < gnolam> | "So, then we kill all the children." |
20:40 | < gnolam> | "Wait, what if their parent is still alive?" |
20:40 | < gnolam> | Etc. |
20:41 | < PinkFreud> | lol |
20:41 | < Namegduf> | Haha. |
20:41 | < AbuDhabi> | You engage the parent in mortal combat, then the kids die from lack of parental support. |
20:45 | < PinkFreud> | AbuDhabi: sounds like Doom for System Administration |
20:47 | < Tarinaky> | Shooting zombie processes with shotguns. Occasionally you have to chaingun users who go over their disk-usage quota. |
20:47 | <@McMartin> | If you kill the parent, the orphaned children turn into zombies. |
20:59 | | * ToxicFrog throttles VHDL |
21:00 | <@ToxicFrog> | I went through "else if", "elseif", and "elif" before looking it up and finding out that it uses "elsif" |
21:00 | < AbuDhabi> | That throws VHDL newbies, I've found. |
21:01 | <@ToxicFrog> | I've been away from it for a while. |
21:01 | <@ToxicFrog> | ...huh. Cool. |
21:01 | <@ToxicFrog> | if up_bar = '1' then |
21:01 | <@ToxicFrog> | ..code.. |
21:01 | <@ToxicFrog> | else |
21:02 | <@ToxicFrog> | ..equivalent code because I made a typo.. |
21:02 | <@ToxicFrog> | end |
21:02 | <@ToxicFrog> | Resulted in an 'up_bar is never used' warning. |
21:11 | < gnolam> | VHDL's entire syntax is, to borrow your expression, full of spiders. |
21:15 | <@jerith> | VHDL is not a programming language and treating it like one leads to pain. |
21:15 | <@jerith> | The problem is that it *looks* like one. |
21:49 | < gnolam> | And that it's inconsistent. |
21:49 | < gnolam> | A decent language shouldn't have you swearing over syntax niggles after weeks of usage. |
21:50 | | AbuDhabi [annodomini@Nightstar-9d3229ea.adsl.tpnet.pl] has quit [[NS] Quit: Zzz.] |
22:21 | | Derakon[work] [Derakon@Nightstar-1ffd02e6.ucsf.edu] has joined #code |
22:25 | < Derakon[work]> | So I finally got everything lined up to check if the new versions of the libraries would still cause the program to crash, I set up a long-running experiment and went to lunch...and when I got back, I discovered it'd crashed about ten minutes after I'd left. |
22:25 | < Derakon[work]> | But! |
22:25 | < Derakon[work]> | It was not the standard crash. |
22:25 | < Derakon[work]> | I think either this was a "slide position is out of bounds" error, or a "lost connection to one of the computers" error. |
22:26 | | SmithKurosaki [Smith@Nightstar-a68aafef.dsl.teksavvy.com] has quit [Connection reset by peer] |
22:26 | < Derakon[work]> | Both of which should be fixable. |
22:26 | <@TheWatcher> | Yay |
22:26 | < Derakon[work]> | Doesn't mean the old crash isn't still lurking, mind. |
22:26 | < Derakon[work]> | But at least the program runs with all the tweaked dependencies. |
22:28 | <@TheWatcher> | Progress! |
23:05 | | You're now known as TheWatcher[T-2] |
23:08 | | You're now known as TheWatcher[zZzZ] |
--- Log closed Thu Jan 21 00:00:56 2010 |