/srv/irclogs.ubuntu.com/2012/02/26/#ubuntu-uk.txt

=== KK is now known as Guest31313
czajkowskimorning08:37
AlanBello/08:37
MyrttiI feel so happy, I've got some Yorkshire tea again and I don't need to ration it or succumb to poor substitutes08:38
Myrttitea ♥08:38
* czajkowski feels like she has a hangover but wasn't drinks 08:43
czajkowski*drinking08:43
czajkowskiso not fair08:43
daubersMorning09:26
popeyuuhhhhhhhhhhh09:54
daubersMORNING POPEY, HOW'S YOUR HEAD?10:21
popeyindeed10:24
brobostigongood morning everyone.10:28
dauberso/10:32
brobostigono/10:32
ali1234i wish there was a way to write wordpress plugins in python...10:45
MartijnVdSali1234: well there's http://www.csh.rit.edu/~jon/projects/pip/11:10
MartijnVdS"""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
ali1234heh awesome11:10
ali1234probably a bit to much of a hack though11:10
MartijnVdSali1234: https://metacpan.org/module/Python + https://metacpan.org/module/PHP11:11
MartijnVdSali1234: Then you can use Perl as well!11:11
ali1234nooooooo11:11
ali1234http://nooooooooooooooo.com/11:12
MartijnVdShttp://tvtropes.org/pmwiki/pmwiki.php/Main/BigNo11:12
MartijnVdSali1234: http://wiki.theory.org/YourLanguageSucks11:44
ali1234that's a quite comprehensive list11:47
ali1234they missed out "java has no unsigned types"11:51
MartijnVdSWho needs unsigned types anyway!11:52
gordonjcpaha11:54
gordonjcpI see a dichotomy11:54
gordonjcpC constrains you to doing many tasks manually, for example, (...) manually specifying the type of your variables, etc. Modern languages offset this with type inference11:55
gordonjcpokay, fair point, but11:55
gordonjcpPython: as a dynamic language, there's no convenient way to statically check for misspelled variable names11:55
gordonjcpwhich do you want?11:55
ali1234i don't think all of that was written by one person :)11:55
gordonjcpstatic typing that makes it easy to check for incorrectly-specified variables because you declare them at the start?11:55
gordonjcpor duck typing11:55
gordonjcpboth suck, btw11:56
ali1234lol11:56
gordonjcpPython sucks11:56
gordonjcpunfortunately, it's like a car engine11:56
gordonjcpcar engines suck11:56
gordonjcpthey're noisy, smelly, complicated and they run on dangerous fuel and emit toxic gases11:56
gordonjcpthey're also currently the best solution to the problem that they solve11:56
gordonjcpthe key here is that every possible alternative sucks just a little bit more in some crucial area11:57
ali1234most languages have some thing that they are the "best" at doing that thing11:57
ali1234except for perl11:57
MartijnVdSPerl is supposed to best at processing text12:09
MartijnVdS(files)12:10
daubersHmm... Mum and dads iMac has a dying LCD panel12:23
MartijnVdSThey didn't pray to St Steve enough? ;)12:26
daubersIt's one of the first white single panel jiggers12:27
MartijnVdSthe "light fixture" ones?12:28
MartijnVdShttp://en.wikipedia.org/wiki/File:IMac_G4_sunflower7.png12:28
daubersNah, one of these http://en.wikipedia.org/wiki/IMac_%28Intel-based%29#Polycarbonate_iMac12:28
MartijnVdSAww those aren't old yet are they?12:29
directhexSMASH TEH ZOMBIEZ! INTO ATOMS!12:34
directhexMartijnVdS: early 2006 is old, yes12:34
MartijnVdSdirecthex: I've just revived a P4 from '02, works fine12:44
directhexdoesn't mean it isn't old12:44
MartijnVdSdoesn't mean it should break down :)12:44
directhexplus, LCD panels have the old "CCFL backlights have a finite lifespam" issue12:44
MartijnVdStrue12:45
cliftontslifespam?12:54
MartijnVdScliftonts: Yes, a life of canned meat.12:54
cliftontsthe shorter the better. Spam is horrid!12:54
popeyAfternoon all.13:55
cliftontsAfternoon popey13:58
jacobwafternoon14:37
hamitronhi jacobw14:51
hamitron:)14:51
hamitronheck it is warm *pants*14:51
* daubers puts the beefs in the oven14:55
popeycan someone reproduce bug  941464 on 12.04?14:56
lubotu3Launchpad bug 941464 in shotwell (Ubuntu) "Flicker when importing photos" [Undecided,New] https://launchpad.net/bugs/94146414:56
ali1234yes, but not nearly that bad15:07
ali1234slow computer?15:07
jacobwits oddly warm for february15:08
jacobwlike, 291 kelvin15:08
penguin42do you often measure the temperature of your home in kelvin?15:09
penguin42and more to the point, how low does your aircon go?15:09
jacobwi don't how to get the unicode character for celsius, so i quoted kelvin15:10
MartijnVdS°15:10
MartijnVdSright-alt shift 0, space for me15:10
MartijnVdSå (right-alt shift 0, a)15:10
jacobw°_°15:10
ali1234 15:10
MartijnVdS◕ ◡ ◕15:11
ali1234that's put my keyboard into overwrite mode15:11
MartijnVdSnah the characters are double-wide15:11
ali1234oh NOT 0 on the numeric keypad °15:11
MartijnVdSMatt Smith will be on Top Gear tonight15:13
MartijnVdS(for all Doctor Who fans)15:13
brobostigon:) \o/15:13
ali1234hmm15:18
ali1234i've got a question15:18
ali1234i'm writing a voting system for wordpress15:18
MartijnVdSanother one?15:18
ali1234yes15:18
ali1234this one is different15:18
ali1234it has to import a playlist from youtube, and each video is one of the possible things you can vote on15:19
MartijnVdSooh the joys of the gdata apis15:19
ali1234yeah15:19
ali1234anyway i've got that importing part done15:19
ali1234now i need some tables to store the imported playlists15:19
MartijnVdSIKEA.15:20
ali1234so my question is that15:20
ali1234what names to use for the tables?15:20
MartijnVdSI'd store votes keyed on the youtube playlist id + video id (so a video can be used in multiple playlists)15:20
ali1234yes i'm going to15:20
ali1234but i can't call the top table "playlists" because playlists are the things on youtube15:21
MartijnVdS"playlists", "playlist_videos", "video_votes"?15:21
ali1234when i suck a playlist into the DB, i want to call it something else in the code15:21
MartijnVdSyt_playlists15:21
ali1234so "playlists" needs a better name15:21
MartijnVdSroster? ballot?15:21
ali1234but i can't call it "votes" because that clashes with the votes per video table15:21
ali1234ah yes those are good. just what i was looking for, thanks15:21
MartijnVdSand "ballot-items"? (a bit weird, but understandable)15:22
ali1234well it's only videos, so that one can just be called videos15:22
ali1234there won't be any funtions for dealing with individual videos on youtube, only locally15:23
ali1234but in the admin page there will be a list of importable playlists, and a list of playlists already imported15:23
ali1234so i wanted a different name to make that clearer that they were different15:24
ali1234when i've got this done i have to figure out how to enable facebook and youtube logins :(15:27
ali1234hmm is it possible to do a switcheroo on youtube videos?16:20
ali1234like you upload an innocuous video, wait for someone to embed it, then swap it for something foul16:20
ali1234i'm guess you wouldn't be able to get the same video ID16:21
popeyunlikely16:22
ali1234could probably do something with the video description and maybe annotations16:23
ali1234i'll be sure to take a copy of the former and disable the latter :)16:23
penguin42ali1234: Hmm on a similar theme I wonder if it's possible to design a video that looks very different at different resolution levels16:24
ali1234like they do with gifs?16:25
ali1234encoding might ruin the effect, should be possible with lossless formats though16:26
czajkowskiand home18:00
AlanBellyay18:17
AlanBellthat was a nice afternoon :)18:17
czajkowskiyup just in18:21
czajkowskitrain dealys but a lovely day18:21
matttyeah, very good day out18:27
czajkowskimattt: were you at the game?18:27
matttyah, our tickets never arrived but luckily they sorted it out at the ticket office18:29
matttanother loss for the irish tho :(18:29
DJonesAlanBell: Did you wear the hat?18:33
AlanBellI did18:33
DJonesExcellent18:34
czajkowskimattt: so close18:34
davmor2Hello all18:41
moreatidavmor2: yo18:43
=== daftykin1 is now known as daftykins
davmor2moreati hey dude hows life18:46
moreatican't complain, coughing much less18:46
daftykins\o/19:02
opt1muso/19:02
jacobwanyone know how to convert an nk2 file to csv without using windows?19:04
jacobwthere's a few freeware windows programs available that don't run in wine19:04
jacobwnk2 is outlook autocomplete19:04
daftykinshrmm19:04
daftykinsi know the little blighter well from supporting Outlook19:05
daftykinsiirc addresses are readable in it right?19:05
jacobwthis is just a social task thank goodness19:05
daftykinsah19:05
daftykinsi'm running 'dows if you would like me to run it19:06
jacobwnope, binary19:06
daftykinshuh?19:06
daftykinsoic19:06
daftykinscould've sworn i slapped it in Wordpad at some point and read addresses ;D19:07
ali1234if you send me the nk2 i'll figure it out :)19:08
ali1234or use this http://code.google.com/p/debunk2/wiki/fileformat19:08
jacobwaah, that's useful19:09
jacobwhmm py < 2.519:10
ali1234nk2parser.py looks like it should be ok19:12
ali1234just skip the gui19:12
Azelphuranyone here any good at munin?19:12
Azelphurmunin plugins, specifically19:13
ali1234youtube gdata api sucks :(19:14
jacobwhow so?19:14
ali1234they can't decide if they are using camelcase or not19:14
ali1234spent 10 minutes debugging, noticed this element is all lower case for no reason19:14
jacobwhehe19:14
ali1234playlistId vs videoid19:15
jacobw:|19:15
jacobwannoying19:15
daftykins;/19:15
ali1234extremely19:15
daftykinsconsistency fail19:15
ali1234i fully expect to find commentID or something as well19:15
ali1234or maybe CommentID19:15
ali1234luckily i don't care about comments19:16
ali1234also, they nest namespaces inside namespace to make it as annoying as possible19:16
ali1234it takes 3 lines of PHP just to get the videoid19:16
ali1234i need to check that every video is embeddable as well19:18
* daubers ponders spending an hour understanding AVR19:21
StevenRdaubers: Automatic Voltage Regulation?19:24
penguin42the things that aren't PICs19:30
daubersStevenR: Atmel chips19:31
daubersWorking with embedded C is seemingly a lot more complex than normal c19:31
* penguin42 only did a few instructions of ASM on an AVR before getting bored19:33
StevenRdaubers: aww. Safer though.19:33
penguin42daubers: 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 where19:38
dauberspenguin42: Yup, those ways generally :) You're also forced to do masking stuff sometimes19:40
penguin42masking stuff - where?19:40
daubersReading pin values and setting pin modes19:41
penguin42nod19:41
daubersProbably get used to it after a while, it's a bit of a logical stumbling block for me at the moment19:42
daubersReally need to buy a programmer and built a little test board19:49
ali1234embedded C more complex?19:50
daubersmaybe complex is the wrong term19:50
ali1234tbh, don't bother19:51
daubersless intuitive maybe :)19:51
ali1234just use assembler for most things19:51
penguin42daubers: http://www.treblig.org/beebavr.html   :-)19:52
penguin42heck that was a while ago19:53
ali1234can i nest classes in php?19:54
ali1234boo, php sucks19:56
ali1234i'm going to just make classes for everything that do everything19:57
ali1234i don't care if it makes it slow19:57
mgdmI don't know any language in which you can nest classes (apart from that anonymous inner inanity in java)19:58
ali1234yeah that's exactly what i wanted lol19:59
ali1234a class that's only valid to be used inside another class19:59
mgdmyou can nest functions, for reasons I've never quite understood19:59
ali1234i'm pretty sure python can do it, could be wrong19:59
ali1234yeah nested functions are the best19:59
ali1234https://github.com/ali1234/vhs-teletext/blob/master/vbi.py#L88 is why nested functions20:00
ali1234_inner has no use at all outside that function20:01
ali1234it only exists to be supplied to fminbound, which needs a function to call over and over to optimize the result20:01
ali1234i could have used a lambda, except in python lambdas can only be expressions20:02
ali1234but even apart from that it would still make the code a mess20:02
ali1234anyhooo....20:03
mgdmyou get lambdas/closures in PHP now20:03
mgdmI've not yet had cause to use one except for playing, though20:03
daftykinsfasthosts are a bit cheeky, they ask you pay £5 per domain to hide the registration info of them20:03
ali1234what's the python equivalent of myarray = [Foo(x) for x in y]20:03
ali1234(trolololo)20:03
ali1234er, i mean php :)20:04
mgdmheh20:04
mgdmthere aren't generators, yet :)20:04
ali1234i am so spoiled by python20:04
jacobwpython is amazing20:05
mgdmthough you could maybe do array_map(function($x) { ... }, $y); which is about as close as you'd get20:05
ali1234can i do new MyClass($x) instead of a function?20:06
ali1234or do i have to make a factory to do that?20:06
mgdmprobably not, the first argument is a callback20:06
mgdmhttp://uk3.php.net/manual/en/language.pseudo-types.php#language.types.callback20:06
mgdmalthough! there might be a way, using this insane magic method thing20:07
ali1234http://soup.johl.io/post/228737228/I-had-a-problem-so-I-thought20:07
ali1234i'm getting close to trashing this code and just writing some python that injects everything directly into wordpress database from the command line20:08
ali1234then just shell it from a BFB in the admin panel20:08
mgdmthere was going to be an __invoke magic method but i'm not sure if it got added or not20:08
ali1234hmm20:11
ali1234maybe i could write a python script that fetches the gdata, turns it into json, and then load that into php20:11
ali1234php is fairly good at json, right?20:12
mgdmwhat is it you're doing?20:12
gordonjcp<3 libsndfile20:12
mgdmand yeah, json_decode works for the most part20:12
ali1234mgdm: i am writing a video vote plugin for wordpress. yes, another one20:12
mgdmheh20:12
ali1234it has to fetch the playlists owned made by a user20:12
ali1234then check that all the videos are embeddable20:12
ali1234then in the admin panel you pick one20:13
ali1234then the users of the site vote for the "best" video out of that list20:13
ali1234so it has to parse youtube gdata xml20:13
ali1234verify it all20:13
ali1234stick it in a database20:13
ali1234and then after that's all done, the rest is relatively easy20:13
gordonjcpali1234: seems like a lot of hard work20:14
mgdmI did a pile of that sort of thing at work, but used simpleXML for basically all of it20:14
ali1234yeah, i;m using simpleXML. it totally sucks20:14
mgdmheh20:14
gordonjcpsince no matter what gets voted the site admins are going to put the one they want in20:14
gordonjcpwhy not just fake it?20:15
ali1234gordonjcp: lol i told them they should just pick themselves but no20:15
ali1234apparently they have some principles or something20:15
gordonjcphttp://www.thedailymash.co.uk/animals/animals-headlines/blue-peter-viewers-wanted-to-name-cat-%27pisswizard%27-20070921414/20:15
gordonjcpcomme ca20:15
jacobwlol @ principals or something20:15
ali1234so i think i'm going to do that20:18
ali1234just make a couple of python scripts to fetch the gdata, decimate it, and output json20:18
ali1234then 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 about20:18
AlanBellDJones: https://plus.google.com/109175303602657131317/posts/TvSCAupXmfL the hat20:21
DJones\o/ nice one20:22
DJonesAlanBell: http://a1.sphotos.ak.fbcdn.net/hphotos-ak-snc7/418657_10151234586535532_639205531_22732896_557897907_n.jpg20:29
AlanBell\o/20:29
popeyis that  you DJones ?20:31
DJonesThe one with the hat, Yep20:31
DJones(Just narrowing down the chance you thought I was the one with the headscarf)20:32
popeyheh20:32
popeywow, you don't look like the image I had in my head.20:32
popeythis is a good thing20:33
DJonesHeh20:33
czajkowskiaye I thought you were some 20 something kid on here20:33
DJonesNah, I'm probably the 2nd oldest in the channel behind theopensourcer20:34
matttDJones: nice hat20:38
DJonesmattt: Thanks, had it or one similar for 25 years20:39
matttDJones: wow, you don't look THAT old :D20:39
DJonesBut I do feel that old & more20:40
brobostigoni would like a hat, similer to the one, tom baker used to wear as dr who.20:40
matttDJones: sounds like you need to drink more whiskey20:40
DJonesMaybe have shot in between the southern comfort & jack daniels20:42
mattt:)20:43
daftykinsDJones: very Indiana Jones there sir20:43
DJonesdaftykins: Its not often you can go to a fancy dress party & wear your normal clothes20:44
daftykinsXD20:44
DJonesProbably more Mick Dundee than Indiana though, thats where I started wearing the hats20:45
daftykins:)20:46
bigcalm_lappyEllo peeps :)20:46
daftykinsheya20:47
daftykinsnot sure i look good in any hat, i'd love to try a 50s type though :>20:47
bigcalm_lappy3 days without cable internet is becoming a bore20:49
daftykinsis your service down?20:51
bigcalm_lappydaftykins: went down at 8.20am on Friday. I think the engineers looked at it Friday afternoon then decided to take the weekend off20:52
DJonesdaftykins: I used to wear one like this for college http://ecx.images-amazon.com/images/I/41%2BENAb0BXL._SX342_.jpg20:52
daftykinsis it virgin media?20:52
bigcalm_lappyVM are the only cable company left in the UK20:52
bigcalm_lappy(yes)20:52
daftykinsi think there's an isle of wight one actually :D but ok!20:53
daftykinsis the 'modem' failing to sync?20:53
bigcalm_lappyHeh20:53
daftykinsi 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 reconnected20:54
jacobwlol20:54
mgdmIIRC there's KCOM in Hull as well, ut they might only do DSL20:54
daftykins(their modem sync light was constantly flashing)20:54
daftykinsever since then i've considered that as a course of action if i see a VM service going quirky :D20:55
bigcalm_lappymgdm: I think they only have DSL in Hull20:55
jacobwiirc Kingston don't do cable20:55
jacobwKingston == KCOM me hinks20:55
jacobw+t20:55
mgdmYeah, they rebranded20:55
bigcalm_lappydaftykins: Calling the support line gives me a recorded message saying the whole of my region is affected20:56
daftykinsah20:58
daftykinswell you could paintbrush the whole region i guess..20:58
daftykins:)20:59
ali1234yay21:22
ali1234does php have something like python's "if __name__ == '__main__'"21:22
mgdmnot really21:23
ali1234i have to put my test code in a different file?21:23
ali1234well, i finally got xpath and array_map to behave21:24
mgdmwell, is it always going to be run from the cLi?21:24
mgdmor will it run live from a webserver and be tested from CLI?21:24
ali1234no, only when i'm testing it21:24
ali1234yeah, that21:24
mgdmif (php_sapi_name() == 'cli')21:24
mgdmmight work21:24
ali1234also, why does it complain about Use of undefined constant parse_video - assumed 'parse_video' in ...21:25
ali1234when i passed it to array_map...21:25
mgdmunquoted string, at a giuess21:25
ali1234oh, callback should be quoted?21:25
mgdmcallbacks in PHP are poassed as strings, they're not just bare function references21:25
mgdm(sadly)21:25
ali1234blah21:25
ali1234but it still works anyway, just prints an annoying warning21:26
mgdmwell, they're strings except when they're arrays of strings, and except when they're closures21:26
mgdm*ahem*21:26
ali1234i've seen array($object, "function_name") used, now i think about it21:27
mgdmaye21:27
ali1234which is pretty bad21:27
* bigcalm_lappy throws an exception at mgdm21:29
* mgdm catches it and retrhows it back at bigcalm_lappy 21:30
* bigcalm_lappy die()s21:30
ali1234raise is so much more civilized21:31
* bigcalm_lappy has a horrible feeling of dejavu21:32
ali1234ok, i finally managed to write some php code that i am relatively happy with21:32
ali1234tomorrow i rewrite my plugin code to use it :)21:32
bigcalm_lappyali1234: does it call a python script?21:32
ali1234no, i decided to not let PHP beat me21:33
bigcalm_lappy:)21:33
bigcalm_lappymgdm: native web server in php 5.4. Who thought that would be a good idea?21:33
mgdmbigcalm_lappy: same as WEBrick in Ruby, or whatever21:34
mgdmbigcalm_lappy: NOT FOR PRODUCTION USE21:35
ali1234why does print True; print "1"?21:35
bigcalm_lappymgdm: So they say, bet some nutters will be lazy enough though21:35
bigcalm_lappyecho var_dump(TRUE);21:35
mgdmali1234: casting true to a string gives you '1';21:35
ali1234how is that ever useful?21:36
bigcalm_lappymgdm: was that ; a muscle memory?21:36
mgdmbut false is empty string!21:36
mgdmwho knows21:36
mgdmbigcalm_lappy: pretty much21:36
mgdmI know the language is insane, but I make money from using it, so meh21:37
bigcalm_lappySame here21:37
bigcalm_lappyYay money21:37
bigcalm_lappyWould 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 same21:39
ali1234how do i forcibly cast an object to a string?21:40
ali1234strval()?21:40
mgdmdepends what you expect the result to be21:41
mgdmif your object has a __toString() method, you can do (string) $obj and get back whatever that does21:41
ali1234i'm getting [id] => SimpleXMLElement Object (   [0] => 1hXDDGm27rE ) and i want [id] => 1hXDDGm27rE21:42
mgdmOh, just (string) $obj21:42
ali1234excellent :)21:43
mgdmnext time I do Python I'll probably be in asking stupid questions; turn about is fair play, etc ;-)21:44
mgdm(not that you're asking stupid questions :p021:44
AzelphurI'm playing PHP too atm :D21:44
Azelphurmaking a munin plugin \o/21:44
mgdmI didn't know munin was PHP21:45
Azelphurmgdm: it's not, it'll run anything from the command line21:45
* gordonjcp is playing with C, libjack, libsamplerate and libortp21:45
mgdmAzelphur: ah21:45
AzelphurUsing PHP because I depend on PHP libraries though21:45
gordonjcpand wireshark, and tcpreplay, and indeed tcprewrite21:45
Azelphurhehe21:46
mgdmgordonjcp: what are you doing? That's cooler than what I'm u pto21:46
Azelphurindeed21:46
gordonjcpmgdm: something distinctly suspect21:46
gordonjcppossibly related to a week-long course on RoIP I went on earlier21:46
mgdmah ha :D21:46
mgdmsounds intriguing21:47
gordonjcpand a lack of inclination to fork out 8 grand for a Radio-over-IP server21:47
ali1234related to GPS thingy from last week?21:47
gordonjcpnot entirely21:47
mgdmgordonjcp: are you going to that thing on march th e8th?21:47
gordonjcpmgdm: the NXP thing?21:47
mgdmaye21:47
gordonjcpyes, if they ever tell me where it is21:47
mgdmi registered, but it occurs to me I have nfI where it is, or when21:48
mgdmah, not just me, then21:48
mgdmbah22:20
* mgdm really needs to learn puppet or chef or something and set up a new server build22:20
mgdmand then replace that box that i just killed22:21
=== Hornet- is now known as Hornet
daftykinsmgdm: murderer!22:53
directhexmoo23:04
ali1234DJones: unity crashed so i started up gnome-panel23:19
ali1234this isn't the gnome-shell fallback thing23:19
ali1234it's real gnome-panel23:19
ali1234well, sort of23:19
ali1234it supports panels on all monitors and you can move them around23:22
ali1234yeah... so new gnome classic is actually pretty good23:39
ali1234just needs some work on the theme side to make it look a bit less rough23:39
ali1234all the functionality is there though23:39
ali1234hmm all my compiz settings have been reset23:43
ali1234no more zoom or grid23:43
ali1234in fact no keyboard shortcuts work at all23:44

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!