--- Log opened Mon Mar 17 00:00:44 2014 |
00:04 | <&McMartin> | Oh, it's that one |
00:05 | <&McMartin> | That's some kind of bot or social media equivalent of sig virus |
00:05 | <&McMartin> | Word for word we've gotten it four or five times |
00:05 | <&McMartin> | mac: I will grant that there is a *little* bit of grey here thanks to society having some doublethink. |
00:06 | <&McMartin> | But that's for things like "It is unreasonable to say that red-light cameras cannot pick you out of a crowd if you're walking by" + "The government should not be compiling a giant dossier on everywhere you walk" |
00:07 | <&McMartin> | And if you allow the former, you admit the latter, these days. You didn't used to because databases were not that good~ |
00:36 | <~Vornicus> | Man. I remember back when I worked at resmark and we got a new project manager and he asked whether we could really store all this information in the database and I looked at our usage and said "10,000 times over... on a phone." |
00:36 | <~Vornicus> | (he was kind of old-school) |
01:33 | | himi [fow035@Nightstar-v37cpe.internode.on.net] has quit [Ping timeout: 121 seconds] |
01:47 | | himi [fow035@Nightstar-v37cpe.internode.on.net] has joined #code |
01:47 | | mode/#code [+o himi] by ChanServ |
01:56 | <@Alek> | R, even better: the arabic translates to Warning. |
01:59 | <&McMartin> | THE LARGE SHIP IS APPROACHING AT FULL THROTTLE ACCORDING TO THE DATA IT IS IDENTIFIED AS "BUTSUTEKKAI" NO REFUGE |
02:17 | <~Vornicus> | Ikaruga/ |
02:19 | <&McMartin> | Pretty much |
02:20 | <&McMartin> | I'm basically imagining people inspired to randomly join IRC channels to spam the WARNING WARNING WARNING stuff from shmups |
02:20 | <&McMartin> | Because it carries about as much information |
02:20 | <~Vornicus> | (it is kind of shocking how much I know about shmups despite, you know, not playing them) |
02:21 | <~Vornicus> | (though I did have to look up how to spell that because I was like, "ikuraga? irakuga? uh...") |
02:22 | <&McMartin> | While it's common to name fighter ships after birds, the Japanese Grosbeak and Lady Amherst's Pheasant are kind of unusual choices |
02:22 | <&McMartin> | Then you realize they are *seed-eaters*. |
02:32 | | VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has quit [[NS] Quit: Program Shutting down] |
03:10 | | Turaiel[Offline] is now known as Turaiel |
03:53 | | Derakon is now known as Derakon[AFK] |
04:44 | | Reivthia [orthianz@Nightstar-7sn5i0.callplus.net.nz] has quit [Ping timeout: 121 seconds] |
04:47 | | Orthia [orthianz@Nightstar-7sn5i0.callplus.net.nz] has joined #code |
04:47 | | mode/#code [+o Orthia] by ChanServ |
05:10 | | Kindamoody[zZz] is now known as Kindamoody |
05:23 | | celticminstrel [celticminst@Nightstar-mhtogh.dsl.bell.ca] has quit [[NS] Quit: KABOOM! It seems that I have exploded. Please wait while I reinstall the universe.] |
05:34 | | Red_Queen [Z@Nightstar-484uip.cust.comxnet.dk] has joined #code |
05:34 | | mode/#code [+o Red_Queen] by ChanServ |
05:49 | | Orthia [orthianz@Nightstar-7sn5i0.callplus.net.nz] has quit [Ping timeout: 121 seconds] |
05:50 | | Turaiel is now known as Turaiel[Offline] |
05:50 | | Orthia [orthianz@Nightstar-7sn5i0.callplus.net.nz] has joined #code |
05:50 | | mode/#code [+o Orthia] by ChanServ |
06:12 | | Erik [8f610223@Nightstar-obfcgl.mibbit.com] has quit [Ping timeout: 121 seconds] |
06:12 | | Orthia [orthianz@Nightstar-7sn5i0.callplus.net.nz] has quit [Ping timeout: 121 seconds] |
06:13 | | Orthia [orthianz@Nightstar-7sn5i0.callplus.net.nz] has joined #code |
06:13 | | mode/#code [+o Orthia] by ChanServ |
06:40 | | RichyB [RichyB@Nightstar-c6u.vd5.170.83.IP] has quit [[NS] Quit: Gone.] |
06:43 | | Red_Queen [Z@Nightstar-484uip.cust.comxnet.dk] has quit [Ping timeout: 121 seconds] |
06:43 | | RichyB [RichyB@Nightstar-c6u.vd5.170.83.IP] has joined #code |
06:49 | | Kindamoody is now known as Kindamoody|afk |
07:06 | | Erik [8f610223@Nightstar-fsq7h2.mibbit.com] has joined #code |
07:15 | | Orthia [orthianz@Nightstar-7sn5i0.callplus.net.nz] has quit [Ping timeout: 121 seconds] |
07:17 | | Orthia [orthianz@Nightstar-7sn5i0.callplus.net.nz] has joined #code |
07:17 | | mode/#code [+o Orthia] by ChanServ |
07:38 | | mac is now known as macdjord |
08:23 | | AverageJoe [evil1@Nightstar-fb1kt4.ph.cox.net] has joined #code |
08:42 | | himi [fow035@Nightstar-v37cpe.internode.on.net] has quit [Ping timeout: 121 seconds] |
08:53 | | AverageJoe [evil1@Nightstar-fb1kt4.ph.cox.net] has quit [[NS] Quit: Leaving] |
08:54 | | macdjord is now known as macdjord|slep |
08:55 | | himi [fow035@Nightstar-v37cpe.internode.on.net] has joined #code |
08:55 | | mode/#code [+o himi] by ChanServ |
09:23 | | Kindamoody|afk is now known as Kindamoody |
09:56 | | mode/#code [+o RichyB] by ChanServ |
10:07 | | Orthia [orthianz@Nightstar-7sn5i0.callplus.net.nz] has quit [Ping timeout: 121 seconds] |
10:18 | | Thalasleep [thalass@Nightstar-bk3u2d.bigpond.net.au] has joined #code |
10:18 | | Thalasleep is now known as Thalass |
10:19 | | mode/#code [+o Thalass] by ChanServ |
10:24 | | Syka [the@Nightstar-ikj.hk5.127.1.IP] has joined #code |
10:25 | | Syka is now known as NSGuest58219 |
10:25 | | Orthia [orthianz@Nightstar-7sn5i0.callplus.net.nz] has joined #code |
10:25 | | mode/#code [+o Orthia] by ChanServ |
10:32 | < Xon> | http://xkcd.com/1343/ |
10:32 | < Xon> | > The most ridiculous offender of all is the sudoers man page, which for 15 years has started with a 'quick guide' to EBNF, a system for defining the grammar of a language. 'Don't despair', it says, 'the definitions below are annotated.' |
10:32 | < Xon> | rofl |
10:43 | <~Vornicus> | What. |
10:43 | <~Vornicus> | Man, teach me to not look at the title text, that's /the craziest/ |
10:49 | <@RichyB> | http://man.he.net/man5/sudoers |
10:49 | <@RichyB> | â for reference, Randal Munroe is not exaggerating in this case. |
10:50 | <@RichyB> | The sudoers man page hides the handful of paragraphs about what the semantics of its language are amid PAGES AND PAGES of verbose over-explanation of how to write a LALR parser for it. |
10:51 | | Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Connection reset by peer] |
10:51 | < Xon> | RichyB, >.< |
11:07 | <@TheWatcher> | I suspect the rationale for it is "If you don't have either the knowledge or perseverence to read all this, you shouldn't be editing the sudoers file"~ |
11:11 | | himi [fow035@Nightstar-v37cpe.internode.on.net] has quit [Ping timeout: 121 seconds] |
11:12 | <@RichyB> | TheWatcher, still irksome; that attitude doesn't even begin to work. |
11:13 | <@RichyB> | People still have to get stuff done even though the documentation is bewildering and insane, so they just do it with a massively-incomplete understanding, and they guess. |
11:16 | | Shiz [mark@Nightstar-3hueb6.shiz.me] has quit [Ping timeout: 121 seconds] |
11:21 | | Shiz [mark@Nightstar-3hueb6.shiz.me] has joined #code |
11:25 | <@TheWatcher> | Oh, yeah, I know |
11:26 | <@TheWatcher> | But it's the sort of attitude that would not remotely surprise me |
11:40 | | * Tarinaky pouts at Python |
11:40 | <@Tarinaky> | "TypeError: __str__ returned non-string (type NoneType)" |
11:40 | <@Tarinaky> | Oh wait. |
11:40 | <@Tarinaky> | I'm a herp. |
11:52 | <@RichyB> | Tarinaky, you forgot the return statement, didn't you? |
11:52 | <@Tarinaky> | I might have been trying to print >.< |
11:52 | <@RichyB> | All Python methods without an explicit return value implicitly return None. |
11:52 | <@RichyB> | â¦printing is an unfriendly thing to do in a __str__ method. :) |
12:01 | | Kindamoody is now known as Kindamoody|out |
12:46 | | * Tarinaky glares at Python |
12:46 | <@Tarinaky> | Okay... now why is this print statement doing nothing. |
12:50 | < HearingEarDog> | Is it getting called? |
12:50 | <@Tarinaky> | Yes. |
12:51 | < HearingEarDog> | Is it sending to the device that you can see? |
12:51 | <@Tarinaky> | Probably not. |
12:51 | < HearingEarDog> | Try stderr or something. |
12:52 | <@Tarinaky> | I've gotten rid of the print statement and added stuff to the failed assert I'm trying to interrogate |
12:54 | <@Tarinaky> | Which... isn't helpign :/ |
12:56 | | NSGuest58219 [the@Nightstar-ikj.hk5.127.1.IP] has quit [Ping timeout: 121 seconds] |
12:56 | <@Tarinaky> | Okay. So I'm reading in a malformed csv file. My parsing code for that seems to be working as well as it can: if it can't make immediate sense of an entry it just discards it. |
12:56 | <@Tarinaky> | However the start of the csv file also has a bunch of '0' data entries along the top because it takes a while for the hardware it's from to wake up. |
12:57 | <@Tarinaky> | So I'm iterating over my list of read-in data and removing any with a 0 in the time attribute |
12:57 | <@Tarinaky> | My unittest, is testing that having performed this iteration over the list; there should be no entries with 0 in the time. |
12:57 | <@Tarinaky> | Except there is. |
12:58 | <@Tarinaky> | So now I am bemused. |
13:01 | <@Tarinaky> | Apparently it works if I use a list comprehension |
13:01 | <@Tarinaky> | Because Python *jazzhands* |
13:02 | <@RichyB> | pastebin the code that's misbehaving. |
13:02 | <@Tarinaky> | I can't get my clipboard to playnice with vim. |
13:03 | <@RichyB> | I will be very surprised if you've found a bug in Python itself that manifests differently based on whether you generate values with a loop or a list comprehension. |
13:03 | <@Tarinaky> | I wasn't implying it was a bug. |
13:03 | <@Tarinaky> | I was implying it was a feature |
13:03 | <@RichyB> | Heh. |
13:04 | <@Tarinaky> | for x in list: \n if condition(x): \n list.remove(x) |
13:04 | <@Tarinaky> | vs list[:] = [x for x in list if condition(x)] |
13:04 | | * Tarinaky finds list comprehensions too 'clever' and tries to avoid them >.< |
13:06 | <@Tarinaky> | And I have no idea how to implement the other condition( ) I need to be stripping on. |
13:08 | <@RichyB> | list.remove() in a loop is terrible, it has to copy all the items down. |
13:08 | <@RichyB> | Also it has to walk the list up to the first incidence of x. |
13:09 | <@Tarinaky> | I'm open to suggestions. |
13:09 | <@RichyB> | But the actual issue is that your code there is broken because you're trying to modify a list while iterating it. |
13:09 | < Erik> | Also it looks to me as though the first is removing things that pass the condition, the second is listing things that pass the condition. |
13:09 | <@Tarinaky> | How do I modify a list and iterate over it at the same time? |
13:10 | <@RichyB> | list[:] = [x for x in list if not condition(x)] # doesn't have that problem, because the entire list comprehension is evaluated first, *then* the result of that is used to replace the list's entire contents by the slice assignment |
13:10 | <@Tarinaky> | Erik: Correct, but it's assigning the new list to the same memory as the old list. |
13:10 | <@RichyB> | Tarinaky, you don't. In general, you can not walk mutable data structures at the same time as modifying them except under extremely specific circumstances. |
13:10 | <@RichyB> | Take a copy. |
13:11 | < Erik> | RichyB: for example, having the list be ordered, starting at top, adding at end? |
13:11 | <@Tarinaky> | That's dumb. And I still have to call remove on an element in the middle instead of just removing the bit I'm pointing to now. |
13:11 | < Xon> | Tarinaky, the alternative is to select what matches and add it to a new list |
13:12 | < Xon> | rather than removing from the existing list |
13:12 | <@RichyB> | You are suffering a misconception about how the remove method works. It does not walk up the list from the point where you are sat right now, it walks up the list from the beginning anyway. |
13:12 | <@Tarinaky> | RichyB: Yes. Which is dumb. There isn't a removeWhatImPointingAtNow method. |
13:12 | <@RichyB> | That would be a bad idea to implement. |
13:13 | <@Tarinaky> | It's what I really need :/ |
13:13 | <@RichyB> | No, it's not. What you really need is: l = filter(lambda x: not(condition(x)), l) |
13:14 | < Xon> | ^++ |
13:14 | <@Tarinaky> | How do I implement the condition that this number can't be too different from the previous number? |
13:16 | <@RichyB> | Tarinaky, filtered = []; for (x0, x1) in zip(values, values[1:]): if not dissimilar(x0, x1): filtered.append(x0) |
13:18 | <@Tarinaky> | Hash-tag Things I hate Python for. |
13:19 | < Erik> | Yeah, that does look a little too clever and compact |
13:20 | < Xon> | filtered = []; for x in list: \n if not condition(x): \n filtered.add(x) |
13:20 | < Xon> | that'll work =p |
13:20 | < Xon> | (or should) |
13:20 | <@Tarinaky> | Xon: No, it won't. Because condition depends on X_n and X_n-1. |
13:20 | < Erik> | I think it's the multivariate loop over a zip in particular that I would have made worder |
13:21 | < Erik> | *wordier |
13:22 | < Xon> | Tarinaky, stash x_n-1 in a variable and update it every loop then. otherwise use an indexed for loop so you can easily get X_n, X_n-1 or X_n+1 |
13:23 | < Xon> | aka something like; "for for idx, val in enumerate(list):" |
13:24 | < Xon> | but fundementally; modifying the collection you are iterating over is a bad idea |
13:24 | < Xon> | creating a new list isn't particularely hard or costly |
13:24 | < Erik> | filtered = [list[0]]; for i in range(1, len(list)): \n if NotTooDifferentFrom(list[i], list[i-1]): \n filtered.append(list[i]) |
13:24 | <@Tarinaky> | No. But it's easier on my head. |
13:25 | <@Tarinaky> | Because I'm having a hard time debugging this. |
13:26 | < Xon> | heh |
13:26 | < Xon> | a single statement/expression which does so too much can be a pain to debug. |
13:27 | <@Tarinaky> | http://pastebin.com/dZdFiCUs |
13:32 | <@Tarinaky> | I hate Python's cleverness so much. -.- |
13:35 | | SmithKurosaki [SmithKurosa@Nightstar-dh5.prl.119.199.IP] has joined #code |
13:35 | <@Tarinaky> | Oh. I see. My test is broken. |
13:35 | < SmithKurosaki> | Hello all :) |
13:37 | <@Tarinaky> | Python makes me long for pointers. |
13:38 | <@Tarinaky> | ValueError: list.remove(x): x not in list |
13:38 | <@Tarinaky> | Wat |
13:38 | < SmithKurosaki> | Heh |
13:38 | < SmithKurosaki> | What you working on? |
13:39 | <@Tarinaky> | SmithKurosaki: http://pastebin.com/9wiTymBU |
13:40 | < SmithKurosaki> | Not 100% sure what its for, but cool :) |
13:40 | <@Tarinaky> | I don't understand how it can be failing to remove elements that it's taken /from/ the thing it's removing from. |
13:40 | < Erik> | "for i in range(len(gps_list)" and then "gps_list[i-1]" |
13:41 | < Erik> | that will ask for the negative-first (i.e. last) element at one point |
13:41 | <@Tarinaky> | True. |
13:41 | <@Tarinaky> | But that wouldn't cause the problem I have currently. |
13:57 | | * Tarinaky sighs. I am so fucked. |
14:04 | < SmithKurosaki> | :( |
14:26 | | Erik [8f610223@Nightstar-fsq7h2.mibbit.com] has quit [[NS] Quit: Going home] |
14:52 | <@gnolam> | Tarinaky: you're iterating over a list you're deleting elements from. |
14:54 | <@gnolam> | This is Not Allowed. |
15:12 | <@ErikMesoy> | My mother has somehow gotten her computer into a state where Facebook works in IE but not in Firefox. >_> |
15:12 | | SmithKurosaki [SmithKurosa@Nightstar-dh5.prl.119.199.IP] has quit [Ping timeout: 121 seconds] |
15:12 | <@gnolam> | Nuke her Firefox profile. |
15:13 | <@gnolam> | (Well, you might want to keep bookmarks and suchlike) |
15:15 | <@ErikMesoy> | Then what would I be nuking? History? because the firefox help page on deleting profile has bookmarks as the first thing it mentions |
15:17 | <@TheWatcher> | The solution here is to disable IE. You'll be doing your mother a favour. |
15:17 | <@ErikMesoy> | TheWatcher: this is why nerds can't have nice things |
15:31 | <@gnolam> | ErikMesoy: everything else. |
15:31 | <@Azash> | ErikMesoy: Alt - Bookmarks - Show all bookmarks |
15:31 | <@Azash> | Import and backup - Export as HTML |
15:32 | <@gnolam> | I'm not talking about going through the interface here; I'm talking about nuking everything in the actual profile dir. |
15:32 | <@Azash> | Yes, but if you want to make sure you keep your bookmarks, especially if it (apparently) also involves deleting those |
15:33 | <@Azash> | Exporting bookmarks is bookmarks only, so importing them back in should do nothing to your profile settings |
15:34 | <@Azash> | You might need to move some of them around, though, Firefox imports everything into the bookmarks menu, including folders like the bookmarks toolbar so you need to move those to the right place manually after |
15:34 | <@gnolam> | Bookmarks are stored in places.sqlite, with a backup in bookmarkbackups/. But you can also export/import by hand, as Azash pointed out. |
15:34 | <@Azash> | Ah, good to know |
15:35 | <@Azash> | I have a very large collection of bookmarks for youtube music as well as miscellanea so I make it a habit to export to a file in my dropbox out of habit, but that does make it easier since it can be automated |
15:35 | <@gnolam> | places.sqlite also stores history and some other stuff though, but nothing that should be able to screw up an install. |
15:36 | <@gnolam> | (http://kb.mozillazine.org/Places.sqlite ) |
15:53 | <@ErikMesoy> | Thanks, will report if it works |
15:55 | | Thalass [thalass@Nightstar-bk3u2d.bigpond.net.au] has quit [Ping timeout: 121 seconds] |
16:19 | | q[o_O]p [theeaznon@Nightstar-i370o1.sfldmi.sbcglobal.net] has joined #code |
16:22 | | macdjord|slep is now known as macdjord |
16:33 | | q[o_O]p [theeaznon@Nightstar-i370o1.sfldmi.sbcglobal.net] has left #code [] |
16:33 | | q[o_O]p [theeaznon@Nightstar-i370o1.sfldmi.sbcglobal.net] has joined #code |
16:38 | < q[o_O]p> | oh god.... reading old logs... lol |
17:07 | <@Azash> | http://i.imgur.com/HqvQfue.png |
17:09 | < q[o_O]p> | ? |
17:24 | <@froztbyte> | Azash: roflrofl |
17:24 | <@froztbyte> | Azash: that's /actually/ good |
17:26 | | Orthia [orthianz@Nightstar-7sn5i0.callplus.net.nz] has quit [Ping timeout: 121 seconds] |
17:26 | < q[o_O]p> | !ping |
17:27 | <@macdjord> | !pong |
17:32 | < q[o_O]p> | bored |
17:59 | < Shiz> | stop hacking me |
18:04 | < q[o_O]p> | ? |
18:34 | | q[o_O]p is now known as HotShot |
19:42 | | Kindamoody|out is now known as Kindamoody |
20:33 | | Orthia [orthianz@Nightstar-7sn5i0.callplus.net.nz] has joined #code |
20:33 | | mode/#code [+o Orthia] by ChanServ |
20:35 | <&McMartin> | re: iterating over a list that one is deleting elements from: hilariously, Java and C++ allow this in exactly opposite situations |
20:35 | <&McMartin> | A std::list will let you delete any element that you don't have an iterator pointing at right now |
20:36 | <&McMartin> | Java will let you delete only through the iterator. |
20:38 | | Kindamoody is now known as Kindamoody[zZz] |
21:15 | < HotShot> | i forgot whats the difference between $$1 and $1 in mirc? |
21:17 | <@Tamber> | $ |
21:17 | | * Tamber ducks. |
21:18 | | * HotShot slaps Tamber around a bit with a large $ |
21:20 | | Orthia [orthianz@Nightstar-7sn5i0.callplus.net.nz] has quit [Ping timeout: 121 seconds] |
21:22 | | himi [fow035@Nightstar-v37cpe.internode.on.net] has joined #code |
21:22 | | mode/#code [+o himi] by ChanServ |
21:22 | | Vornicus [vorn@ServerAdministrator.Nightstar.Net] has joined #code |
21:22 | | mode/#code [+qo Vornicus Vornicus] by ChanServ |
21:31 | <@Alek> | if I recall correctly, $$1 asks for the input if it is not provided. $1 just silently uses empty input if there is none. |
21:31 | <@Alek> | it's been a few years, but that's what I remember. |
21:32 | <@Alek> | no, my bad. |
21:33 | <@Alek> | $$ forces the command to only execute IF AND ONLY IF the input is provided. adding ? to $ or $$ makes it ask for the input if it isn't provided. |
21:39 | | himi [fow035@Nightstar-v37cpe.internode.on.net] has quit [Ping timeout: 121 seconds] |
21:47 | | Red_Queen [Z@Nightstar-484uip.cust.comxnet.dk] has joined #code |
21:47 | | mode/#code [+o Red_Queen] by ChanServ |
21:53 | | Vornicus [vorn@ServerAdministrator.Nightstar.Net] has quit [[NS] Quit: Leaving] |
22:01 | | VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has joined #code |
22:12 | | himi [fow035@Nightstar-v37cpe.internode.on.net] has joined #code |
22:12 | | mode/#code [+o himi] by ChanServ |
22:32 | | Red_Queen [Z@Nightstar-484uip.cust.comxnet.dk] has quit [Ping timeout: 121 seconds] |
23:03 | | himi [fow035@Nightstar-v37cpe.internode.on.net] has quit [Ping timeout: 121 seconds] |
23:58 | | Thalass [thalass@Nightstar-bk3u2d.bigpond.net.au] has joined #code |
23:58 | | mode/#code [+o Thalass] by ChanServ |
--- Log closed Tue Mar 18 00:00:00 2014 |