=== KK is now known as Guest31313 [08:37] morning [08:37] o/ [08:38] I feel so happy, I've got some Yorkshire tea again and I don't need to ration it or succumb to poor substitutes [08:38] tea ♥ [08:43] * czajkowski feels like she has a hangover but wasn't drinks [08:43] *drinking [08:43] so not fair [09:26] Morning [09:54] uuhhhhhhhhhhh [10:21] MORNING POPEY, HOW'S YOUR HEAD? [10:24] indeed [10:28] good morning everyone. [10:32] o/ [10:32] o/ [10:45] i wish there was a way to write wordpress plugins in python... [11:10] ali1234: well there's http://www.csh.rit.edu/~jon/projects/pip/ [11:10] """To that end, I've written a Python extension for PHP. In short, this extensions allows the Python interpretter to be embedded inside of PHP (think of PHP as the parent language with Python as its child). This allows native Python objects to be instantiated and manipulated from within PHP. There is also initial support for accessing PHP functions and data from within the embedded Python environment.""" [11:10] heh awesome [11:10] probably a bit to much of a hack though [11:11] ali1234: https://metacpan.org/module/Python + https://metacpan.org/module/PHP [11:11] ali1234: Then you can use Perl as well! [11:11] nooooooo [11:12] http://nooooooooooooooo.com/ [11:12] http://tvtropes.org/pmwiki/pmwiki.php/Main/BigNo [11:44] ali1234: http://wiki.theory.org/YourLanguageSucks [11:47] that's a quite comprehensive list [11:51] they missed out "java has no unsigned types" [11:52] Who needs unsigned types anyway! [11:54] aha [11:54] I see a dichotomy [11:55] C constrains you to doing many tasks manually, for example, (...) manually specifying the type of your variables, etc. Modern languages offset this with type inference [11:55] okay, fair point, but [11:55] Python: as a dynamic language, there's no convenient way to statically check for misspelled variable names [11:55] which do you want? [11:55] i don't think all of that was written by one person :) [11:55] static typing that makes it easy to check for incorrectly-specified variables because you declare them at the start? [11:55] or duck typing [11:56] both suck, btw [11:56] lol [11:56] Python sucks [11:56] unfortunately, it's like a car engine [11:56] car engines suck [11:56] they're noisy, smelly, complicated and they run on dangerous fuel and emit toxic gases [11:56] they're also currently the best solution to the problem that they solve [11:57] the key here is that every possible alternative sucks just a little bit more in some crucial area [11:57] most languages have some thing that they are the "best" at doing that thing [11:57] except for perl [12:09] Perl is supposed to best at processing text [12:10] (files) [12:23] Hmm... Mum and dads iMac has a dying LCD panel [12:26] They didn't pray to St Steve enough? ;) [12:27] It's one of the first white single panel jiggers [12:28] the "light fixture" ones? [12:28] http://en.wikipedia.org/wiki/File:IMac_G4_sunflower7.png [12:28] Nah, one of these http://en.wikipedia.org/wiki/IMac_%28Intel-based%29#Polycarbonate_iMac [12:29] Aww those aren't old yet are they? [12:34] SMASH TEH ZOMBIEZ! INTO ATOMS! [12:34] MartijnVdS: early 2006 is old, yes [12:44] directhex: I've just revived a P4 from '02, works fine [12:44] doesn't mean it isn't old [12:44] doesn't mean it should break down :) [12:44] plus, LCD panels have the old "CCFL backlights have a finite lifespam" issue [12:45] true [12:54] lifespam? [12:54] cliftonts: Yes, a life of canned meat. [12:54] the shorter the better. Spam is horrid! [13:55] Afternoon all. [13:58] Afternoon popey [14:37] afternoon [14:51] hi jacobw [14:51] :) [14:51] heck it is warm *pants* [14:55] * daubers puts the beefs in the oven [14:56] can someone reproduce bug 941464 on 12.04? [14:56] Launchpad bug 941464 in shotwell (Ubuntu) "Flicker when importing photos" [Undecided,New] https://launchpad.net/bugs/941464 [15:07] yes, but not nearly that bad [15:07] slow computer? [15:08] its oddly warm for february [15:08] like, 291 kelvin [15:09] do you often measure the temperature of your home in kelvin? [15:09] and more to the point, how low does your aircon go? [15:10] i don't how to get the unicode character for celsius, so i quoted kelvin [15:10] ° [15:10] right-alt shift 0, space for me [15:10] å (right-alt shift 0, a) [15:10] °_° [15:10] [15:11] ◕ ◡ ◕ [15:11] that's put my keyboard into overwrite mode [15:11] nah the characters are double-wide [15:11] oh NOT 0 on the numeric keypad ° [15:13] Matt Smith will be on Top Gear tonight [15:13] (for all Doctor Who fans) [15:13] :) \o/ [15:18] hmm [15:18] i've got a question [15:18] i'm writing a voting system for wordpress [15:18] another one? [15:18] yes [15:18] this one is different [15:19] it has to import a playlist from youtube, and each video is one of the possible things you can vote on [15:19] ooh the joys of the gdata apis [15:19] yeah [15:19] anyway i've got that importing part done [15:19] now i need some tables to store the imported playlists [15:20] IKEA. [15:20] so my question is that [15:20] what names to use for the tables? [15:20] I'd store votes keyed on the youtube playlist id + video id (so a video can be used in multiple playlists) [15:20] yes i'm going to [15:21] but i can't call the top table "playlists" because playlists are the things on youtube [15:21] "playlists", "playlist_videos", "video_votes"? [15:21] when i suck a playlist into the DB, i want to call it something else in the code [15:21] yt_playlists [15:21] so "playlists" needs a better name [15:21] roster? ballot? [15:21] but i can't call it "votes" because that clashes with the votes per video table [15:21] ah yes those are good. just what i was looking for, thanks [15:22] and "ballot-items"? (a bit weird, but understandable) [15:22] well it's only videos, so that one can just be called videos [15:23] there won't be any funtions for dealing with individual videos on youtube, only locally [15:23] but in the admin page there will be a list of importable playlists, and a list of playlists already imported [15:24] so i wanted a different name to make that clearer that they were different [15:27] when i've got this done i have to figure out how to enable facebook and youtube logins :( [16:20] hmm is it possible to do a switcheroo on youtube videos? [16:20] like you upload an innocuous video, wait for someone to embed it, then swap it for something foul [16:21] i'm guess you wouldn't be able to get the same video ID [16:22] unlikely [16:23] could probably do something with the video description and maybe annotations [16:23] i'll be sure to take a copy of the former and disable the latter :) [16:24] ali1234: Hmm on a similar theme I wonder if it's possible to design a video that looks very different at different resolution levels [16:25] like they do with gifs? [16:26] encoding might ruin the effect, should be possible with lossless formats though [18:00] and home [18:17] yay [18:17] that was a nice afternoon :) [18:21] yup just in [18:21] train dealys but a lovely day [18:27] yeah, very good day out [18:27] mattt: were you at the game? [18:29] yah, our tickets never arrived but luckily they sorted it out at the ticket office [18:29] another loss for the irish tho :( [18:33] AlanBell: Did you wear the hat? [18:33] I did [18:34] Excellent [18:34] mattt: so close [18:41] Hello all [18:43] davmor2: yo === daftykin1 is now known as daftykins [18:46] moreati hey dude hows life [18:46] can't complain, coughing much less [19:02] \o/ [19:02] o/ [19:04] anyone know how to convert an nk2 file to csv without using windows? [19:04] there's a few freeware windows programs available that don't run in wine [19:04] nk2 is outlook autocomplete [19:04] hrmm [19:05] i know the little blighter well from supporting Outlook [19:05] iirc addresses are readable in it right? [19:05] this is just a social task thank goodness [19:05] ah [19:06] i'm running 'dows if you would like me to run it [19:06] nope, binary [19:06] huh? [19:06] oic [19:07] could've sworn i slapped it in Wordpad at some point and read addresses ;D [19:08] if you send me the nk2 i'll figure it out :) [19:08] or use this http://code.google.com/p/debunk2/wiki/fileformat [19:09] aah, that's useful [19:10] hmm py < 2.5 [19:12] nk2parser.py looks like it should be ok [19:12] just skip the gui [19:12] anyone here any good at munin? [19:13] munin plugins, specifically [19:14] youtube gdata api sucks :( [19:14] how so? [19:14] they can't decide if they are using camelcase or not [19:14] spent 10 minutes debugging, noticed this element is all lower case for no reason [19:14] hehe [19:15] playlistId vs videoid [19:15] :| [19:15] annoying [19:15] ;/ [19:15] extremely [19:15] consistency fail [19:15] i fully expect to find commentID or something as well [19:15] or maybe CommentID [19:16] luckily i don't care about comments [19:16] also, they nest namespaces inside namespace to make it as annoying as possible [19:16] it takes 3 lines of PHP just to get the videoid [19:18] i need to check that every video is embeddable as well [19:21] * daubers ponders spending an hour understanding AVR [19:24] daubers: Automatic Voltage Regulation? [19:30] the things that aren't PICs [19:31] StevenR: Atmel chips [19:31] Working with embedded C is seemingly a lot more complex than normal c [19:33] * penguin42 only did a few instructions of ASM on an AVR before getting bored [19:33] daubers: aww. Safer though. [19:38] daubers: In what way? Generally the things are you haven't got much in the way of libraries to play with and there may be rules on what you're allowed to write where [19:40] penguin42: Yup, those ways generally :) You're also forced to do masking stuff sometimes [19:40] masking stuff - where? [19:41] Reading pin values and setting pin modes [19:41] nod [19:42] Probably get used to it after a while, it's a bit of a logical stumbling block for me at the moment [19:49] Really need to buy a programmer and built a little test board [19:50] embedded C more complex? [19:50] maybe complex is the wrong term [19:51] tbh, don't bother [19:51] less intuitive maybe :) [19:51] just use assembler for most things [19:52] daubers: http://www.treblig.org/beebavr.html :-) [19:53] heck that was a while ago [19:54] can i nest classes in php? [19:56] boo, php sucks [19:57] i'm going to just make classes for everything that do everything [19:57] i don't care if it makes it slow [19:58] I don't know any language in which you can nest classes (apart from that anonymous inner inanity in java) [19:59] yeah that's exactly what i wanted lol [19:59] a class that's only valid to be used inside another class [19:59] you can nest functions, for reasons I've never quite understood [19:59] i'm pretty sure python can do it, could be wrong [19:59] yeah nested functions are the best [20:00] https://github.com/ali1234/vhs-teletext/blob/master/vbi.py#L88 is why nested functions [20:01] _inner has no use at all outside that function [20:01] it only exists to be supplied to fminbound, which needs a function to call over and over to optimize the result [20:02] i could have used a lambda, except in python lambdas can only be expressions [20:02] but even apart from that it would still make the code a mess [20:03] anyhooo.... [20:03] you get lambdas/closures in PHP now [20:03] I've not yet had cause to use one except for playing, though [20:03] fasthosts are a bit cheeky, they ask you pay £5 per domain to hide the registration info of them [20:03] what's the python equivalent of myarray = [Foo(x) for x in y] [20:03] (trolololo) [20:04] er, i mean php :) [20:04] heh [20:04] there aren't generators, yet :) [20:04] i am so spoiled by python [20:05] python is amazing [20:05] though you could maybe do array_map(function($x) { ... }, $y); which is about as close as you'd get [20:06] can i do new MyClass($x) instead of a function? [20:06] or do i have to make a factory to do that? [20:06] probably not, the first argument is a callback [20:06] http://uk3.php.net/manual/en/language.pseudo-types.php#language.types.callback [20:07] although! there might be a way, using this insane magic method thing [20:07] http://soup.johl.io/post/228737228/I-had-a-problem-so-I-thought [20:08] i'm getting close to trashing this code and just writing some python that injects everything directly into wordpress database from the command line [20:08] then just shell it from a BFB in the admin panel [20:08] there was going to be an __invoke magic method but i'm not sure if it got added or not [20:11] hmm [20:11] maybe i could write a python script that fetches the gdata, turns it into json, and then load that into php [20:12] php is fairly good at json, right? [20:12] what is it you're doing? [20:12] <3 libsndfile [20:12] and yeah, json_decode works for the most part [20:12] mgdm: i am writing a video vote plugin for wordpress. yes, another one [20:12] heh [20:12] it has to fetch the playlists owned made by a user [20:12] then check that all the videos are embeddable [20:13] then in the admin panel you pick one [20:13] then the users of the site vote for the "best" video out of that list [20:13] so it has to parse youtube gdata xml [20:13] verify it all [20:13] stick it in a database [20:13] and then after that's all done, the rest is relatively easy [20:14] ali1234: seems like a lot of hard work [20:14] I did a pile of that sort of thing at work, but used simpleXML for basically all of it [20:14] yeah, i;m using simpleXML. it totally sucks [20:14] heh [20:14] since no matter what gets voted the site admins are going to put the one they want in [20:15] why not just fake it? [20:15] gordonjcp: lol i told them they should just pick themselves but no [20:15] apparently they have some principles or something [20:15] http://www.thedailymash.co.uk/animals/animals-headlines/blue-peter-viewers-wanted-to-name-cat-%27pisswizard%27-20070921414/ [20:15] comme ca [20:15] lol @ principals or something [20:18] so i think i'm going to do that [20:18] just make a couple of python scripts to fetch the gdata, decimate it, and output json [20:18] then i don't have to write hundreds and hundreds of pages of php code to parse this junk to get the one or two lines i actually care about [20:21] DJones: https://plus.google.com/109175303602657131317/posts/TvSCAupXmfL the hat [20:22] \o/ nice one [20:29] AlanBell: http://a1.sphotos.ak.fbcdn.net/hphotos-ak-snc7/418657_10151234586535532_639205531_22732896_557897907_n.jpg [20:29] \o/ [20:31] is that you DJones ? [20:31] The one with the hat, Yep [20:32] (Just narrowing down the chance you thought I was the one with the headscarf) [20:32] heh [20:32] wow, you don't look like the image I had in my head. [20:33] this is a good thing [20:33] Heh [20:33] aye I thought you were some 20 something kid on here [20:34] Nah, I'm probably the 2nd oldest in the channel behind theopensourcer [20:38] DJones: nice hat [20:39] mattt: Thanks, had it or one similar for 25 years [20:39] DJones: wow, you don't look THAT old :D [20:40] But I do feel that old & more [20:40] i would like a hat, similer to the one, tom baker used to wear as dr who. [20:40] DJones: sounds like you need to drink more whiskey [20:42] Maybe have shot in between the southern comfort & jack daniels [20:43] :) [20:43] DJones: very Indiana Jones there sir [20:44] daftykins: Its not often you can go to a fancy dress party & wear your normal clothes [20:44] XD [20:45] Probably more Mick Dundee than Indiana though, thats where I started wearing the hats [20:46] :) [20:46] Ello peeps :) [20:47] heya [20:47] not sure i look good in any hat, i'd love to try a 50s type though :> [20:49] 3 days without cable internet is becoming a bore [20:51] is your service down? [20:52] daftykins: went down at 8.20am on Friday. I think the engineers looked at it Friday afternoon then decided to take the weekend off [20:52] daftykins: I used to wear one like this for college http://ecx.images-amazon.com/images/I/41%2BENAb0BXL._SX342_.jpg [20:52] is it virgin media? [20:52] VM are the only cable company left in the UK [20:52] (yes) [20:53] i think there's an isle of wight one actually :D but ok! [20:53] is the 'modem' failing to sync? [20:53] Heh [20:54] i was over at a friends in Brighton when theirs went down once, apparently the engineer went to the box outside the house on the wall and disconnected the coax connections, dusted them off with a paintbrush then reconnected [20:54] lol [20:54] IIRC there's KCOM in Hull as well, ut they might only do DSL [20:54] (their modem sync light was constantly flashing) [20:55] ever since then i've considered that as a course of action if i see a VM service going quirky :D [20:55] mgdm: I think they only have DSL in Hull [20:55] iirc Kingston don't do cable [20:55] Kingston == KCOM me hinks [20:55] +t [20:55] Yeah, they rebranded [20:56] daftykins: Calling the support line gives me a recorded message saying the whole of my region is affected [20:58] ah [20:58] well you could paintbrush the whole region i guess.. [20:59] :) [21:22] yay [21:22] does php have something like python's "if __name__ == '__main__'" [21:23] not really [21:23] i have to put my test code in a different file? [21:24] well, i finally got xpath and array_map to behave [21:24] well, is it always going to be run from the cLi? [21:24] or will it run live from a webserver and be tested from CLI? [21:24] no, only when i'm testing it [21:24] yeah, that [21:24] if (php_sapi_name() == 'cli') [21:24] might work [21:25] also, why does it complain about Use of undefined constant parse_video - assumed 'parse_video' in ... [21:25] when i passed it to array_map... [21:25] unquoted string, at a giuess [21:25] oh, callback should be quoted? [21:25] callbacks in PHP are poassed as strings, they're not just bare function references [21:25] (sadly) [21:25] blah [21:26] but it still works anyway, just prints an annoying warning [21:26] well, they're strings except when they're arrays of strings, and except when they're closures [21:26] *ahem* [21:27] i've seen array($object, "function_name") used, now i think about it [21:27] aye [21:27] which is pretty bad [21:29] * bigcalm_lappy throws an exception at mgdm [21:30] * mgdm catches it and retrhows it back at bigcalm_lappy [21:30] * bigcalm_lappy die()s [21:31] raise is so much more civilized [21:32] * bigcalm_lappy has a horrible feeling of dejavu [21:32] ok, i finally managed to write some php code that i am relatively happy with [21:32] tomorrow i rewrite my plugin code to use it :) [21:32] ali1234: does it call a python script? [21:33] no, i decided to not let PHP beat me [21:33] :) [21:33] mgdm: native web server in php 5.4. Who thought that would be a good idea? [21:34] bigcalm_lappy: same as WEBrick in Ruby, or whatever [21:35] bigcalm_lappy: NOT FOR PRODUCTION USE [21:35] why does print True; print "1"? [21:35] mgdm: So they say, bet some nutters will be lazy enough though [21:35] echo var_dump(TRUE); [21:35] ali1234: casting true to a string gives you '1'; [21:36] how is that ever useful? [21:36] mgdm: was that ; a muscle memory? [21:36] but false is empty string! [21:36] who knows [21:36] bigcalm_lappy: pretty much [21:37] I know the language is insane, but I make money from using it, so meh [21:37] Same here [21:37] Yay money [21:39] Would it be wrong to use cURL to post some data from within a Symfony project? I haven't yet seen a native method for doing the same [21:40] how do i forcibly cast an object to a string? [21:40] strval()? [21:41] depends what you expect the result to be [21:41] if your object has a __toString() method, you can do (string) $obj and get back whatever that does [21:42] i'm getting [id] => SimpleXMLElement Object ( [0] => 1hXDDGm27rE ) and i want [id] => 1hXDDGm27rE [21:42] Oh, just (string) $obj [21:43] excellent :) [21:44] next time I do Python I'll probably be in asking stupid questions; turn about is fair play, etc ;-) [21:44] (not that you're asking stupid questions :p0 [21:44] I'm playing PHP too atm :D [21:44] making a munin plugin \o/ [21:45] I didn't know munin was PHP [21:45] mgdm: it's not, it'll run anything from the command line [21:45] * gordonjcp is playing with C, libjack, libsamplerate and libortp [21:45] Azelphur: ah [21:45] Using PHP because I depend on PHP libraries though [21:45] and wireshark, and tcpreplay, and indeed tcprewrite [21:46] hehe [21:46] gordonjcp: what are you doing? That's cooler than what I'm u pto [21:46] indeed [21:46] mgdm: something distinctly suspect [21:46] possibly related to a week-long course on RoIP I went on earlier [21:46] ah ha :D [21:47] sounds intriguing [21:47] and a lack of inclination to fork out 8 grand for a Radio-over-IP server [21:47] related to GPS thingy from last week? [21:47] not entirely [21:47] gordonjcp: are you going to that thing on march th e8th? [21:47] mgdm: the NXP thing? [21:47] aye [21:47] yes, if they ever tell me where it is [21:48] i registered, but it occurs to me I have nfI where it is, or when [21:48] ah, not just me, then [22:20] bah [22:20] * mgdm really needs to learn puppet or chef or something and set up a new server build [22:21] and then replace that box that i just killed === Hornet- is now known as Hornet [22:53] mgdm: murderer! [23:04] moo [23:19] DJones: unity crashed so i started up gnome-panel [23:19] this isn't the gnome-shell fallback thing [23:19] it's real gnome-panel [23:19] well, sort of [23:22] it supports panels on all monitors and you can move them around [23:39] yeah... so new gnome classic is actually pretty good [23:39] just needs some work on the theme side to make it look a bit less rough [23:39] all the functionality is there though [23:43] hmm all my compiz settings have been reset [23:43] no more zoom or grid [23:44] in fact no keyboard shortcuts work at all