IRC Logs for #circuits Sunday, 2013-05-12

*** koobs has quit IRC00:14
*** koobs has joined #circuits01:02
*** EasyMac_ has joined #circuits01:40
prologichey EasyMac_01:50
*** EasyMac_ has quit IRC02:17
*** ChanServ has quit IRC03:09
*** ChanServ has joined #circuits03:40
*** EasyMac_ has joined #circuits03:40
*** EasyMac_ has quit IRC06:05
*** ronny has joined #circuits06:19
*** ronny has quit IRC06:19
*** ronny has joined #circuits06:19
Romsterprologic, introduced me to crux i was already dabbling with Linux before crux. but not serious desktop use at that stage.08:39
Romsteramee2husky, oh hai08:42
Romsterwhen i have spare time prologic, feel worn out now and i not long jsut got home from another town.08:42
*** ronny has quit IRC10:47
*** Romster has quit IRC11:21
*** Romster has joined #circuits11:36
amee2huskyhehe14:33
*** EasyMac_ has joined #circuits15:00
*** EasyMac_ has quit IRC15:43
*** EasyMac_ has joined #circuits15:43
*** EasyMac_ has quit IRC15:59
*** ronny has joined #circuits16:05
*** ronny has quit IRC16:05
*** ronny has joined #circuits16:05
amee2huskyrhm... is there a way to flush a circuits.io.File component? like a file handle?16:08
*** ronny_ has joined #circuits16:13
*** ronny_ has quit IRC16:20
*** ronny has quit IRC19:31
*** Osso has joined #circuits20:59
*** jgiorgi has quit IRC21:03
prologicamee2husky: find an existing component eithout knowing its object reference?21:41
amee2huskyno, i have the component... i'm subclassing it21:42
amee2huskybut i want to flush any buffers so it gets written to the file handle21:42
amee2huskyi'm having a weird issue where my logger component works perfectly ... but only if the IRC bot component is running21:44
prologichmmm w didnt implement a Flush event did we?21:45
prologicChevk for me?21:45
amee2huskydunno, its not mentioned anywhere21:45
amee2huskylemme see21:45
prologicIm on the bys on my way to work!21:45
amee2huskycan't see Flush in dir(circuits.io)21:46
prologicOh yeah if the system isny running no components will do anything21:46
prologicunless you tick msnually21:46
amee2huskymmh, the live365 bot component is running21:46
prologickk21:46
amee2huskyand waiting for a Timer callback21:46
amee2huskyand in any event, i should see the "log file opened" message in the log21:47
prologicuse ._fd for now on the File instance21:47
prologicpaste the code?21:47
amee2huskyall of it in pastebins?21:48
prologicsure :(21:48
amee2huskyhttp://paste.debian.net/hidden/70f4eea3/  <<  logger.py21:48
amee2huskyhttp://paste.debian.net/hidden/9d24bbf8/  <<  ircbot.py21:49
amee2huskyhttp://paste.debian.net/hidden/1af06911/   <<  live365.py21:49
amee2huskyhttp://paste.debian.net/hidden/aa3849ae/   <<  test_daemon.py (main executable)21:50
amee2huskyhmm... if anything is missing tell me21:50
prologicLoggable isnt being used afaict21:51
prologicalso there is vircuits.app.log21:51
prologichmmm21:52
prologici dont see how your logger would work tbh ;)21:52
prologicit doesnt extend Loggable21:53
prologicalso register dont subclass21:53
amee2huskyclass IRCBot(Component, Loggable):21:53
amee2huskyyes it does  o.O21:53
prologicmake Loggable subclass Compnoent21:53
prologicand register it in init inside Log21:54
prologichmmm21:54
amee2huskythe logger works fine... i can see the messages on the terminal21:54
amee2huskythe print in logger.py:82 is getting reached21:54
prologici dont know how thatbwould work!21:54
prologictry what i said21:54
amee2huskybut if the IRC bot isn't being used, then i don't see any file output21:55
amee2huskyok, hang on21:55
prologicyoure tightly coupling logging eith the bot there21:55
prologicrather do21:55
amee2huskythen make the other two components only subclasses of Loggable?21:55
prologicclass zloffer(Componoenr)21:56
prologicerr Logger21:56
amee2huskylogging is going to be an integral function because i'm relying on it for debugging21:56
prologicno i mean dont subclass st all21:56
amee2huskyo.O21:56
amee2huskyall i want is a log() method that i can easily flop into other classes without copying the code around21:57
prologicno components need to know about other components or thrir "methods"21:57
amee2huskythats the whole purpose of Loggable. its not a component. the component is the Logger21:57
prologicyup21:57
prologicso create abcomponent21:57
prologicand tegister once21:57
prologicdone21:57
prologicthen every component can do21:58
amee2huskywhat i want to do is transform something butt ugly like     self.fire(Log(self.log_source, "blah that noone notices in a buttload of code goes here"), "logger")21:58
prologicself.fire(Log;...))21:58
amee2huskyinto     self.log("blah that is easily noticable")21:58
prologicooooh21:58
prologicyou want convenience methods?21:59
amee2huskyyes, thats what it says in the comment line :321:59
prologicok ok i get what youre trying to do22:01
prologicsorry!22:01
amee2huskyno problem >_>22:01
prologicso22:01
prologicsubclass Component22:01
prologicand use this new MyComponent everywhere22:01
prologicadd your convenirnce methods to that22:02
amee2huskymmh ok22:02
prologicbut be sure to not add state or other extra things22:02
prologicstill have a real Logger component however22:02
prologicbut subclass circuits.Component for that one22:03
prologici.e; use single inheritance22:03
prologicyou elnt get into trouble that wayn;)22:03
amee2huskyok, changed the class declarations like this:22:03
amee2huskyclass Loggable(Component):22:04
amee2huskyclass IRCBot(Loggable):22:04
amee2huskyclass Live365NowPlaying(Loggable):22:04
amee2huskyneed to change the name and move the files around so it looks nice, but still22:04
prologicyup22:04
amee2huskyseems to be getting the same issue22:04
amee2huskyi can even see the Write events22:05
prologicthen register a class Logger(circuits.Component);22:05
amee2husky<Write[logger.write] ('2013-05-13 00:05:19 [LOGGER:00]\t===== Opened log file =====\n' )>22:05
amee2huskythat never showed up in the log file22:05
prologichmmm22:06
prologicshow me the code now?22:07
amee2huskyok :322:08
amee2huskyhttp://paste.debian.net/hidden/656373ff/  <<  logger.py22:09
amee2huskyhttp://paste.debian.net/hidden/602b762e/  <<  ircbot.py22:09
amee2huskyhttp://paste.debian.net/hidden/67e79a17/  <<  live365.py22:09
amee2huskytest_daemon.py   didn't change22:10
prologichmmm ok22:16
prologicso do subsequents log entries get written?22:17
amee2huskymmh, subsequent?22:18
amee2huskyunless i run the IRC bot, NOTHING ends up in the log file22:18
amee2huskyi can see all the messages printed to stdout though22:19
prologicyeah of course22:19
amee2huskythe Write event gets fired, but somehow it doesn't seem to have any effect22:19
prologicalso your log entry in Logger init22:19
prologicwont be written22:20
prologicbecause the underlying File wont be ready yet22:20
prologicmove that to a ready hanfler22:20
amee2huskyactualy, it does get written  o.O22:20
amee2huskyi can see it in the file22:20
amee2huskybut i'll move it anyway22:20
prologicbut yeah this is correct behaviour22:21
prologicyou cant make a component react unless its part of a running system22:21
prologici.e its registeref tona running manager22:22
prologicthe top level where you .run()22:22
amee2huskymmh no output after moving all the fire() calls to ready() handlers22:25
prologici mean only move your first one22:26
prologicnot all ;)22:26
prologicRwady is fired once when any IO Component is ready to do IO22:27
prologicAlso22:27
amee2huskyi had a fire() call in live365's __init__ too22:27
amee2huskyoh err22:27
prologicAdd in the Debugger to your system to help debug your code and event fliw22:27
amee2huskybut in a normal component i can do it?22:27
amee2huskyi've been running with the debugger all the time22:28
amee2huskyotherwise i'd be hopelessly lost22:28
prologicahh i didnt notice22:28
prologicill be at work in 30-40mins22:29
prologici could write up a quick working sample with your convenience methods22:29
prologicbit hard on an iPad ;)22:29
amee2huskythe convenience methods shouldn't cause the problem writing to the file22:30
amee2huskyoh lol22:30
prologicI feel like youre still confused with a few concepts in circuits?22:30
prologicno they shoukdnt pgc22:31
prologicofc22:31
amee2huskycould be that i have an... unusual programming style for python. i haven't worked on much py code of other people22:31
amee2huskyso i more or less adopted the programming style i had before for it22:31
prologicnah its not that ;)22:32
prologicWhen i look at your code now22:32
prologici cant help but feel its necoming tightly coupled22:32
prologiccircuits wont stop you from writing tightly coupled code22:33
prologicbut its not the circuits way ;)22:33
amee2huskyi know i'm tieing the logging code into everything22:33
amee2huskybut that is intentional, because logging needs to be the last thing that dies if something goes wrong22:33
prologicnah the convenience methods are ok22:33
prologicwhen i het into work ill be able yo help better22:34
amee2huskythat logging facility is not for the payload messages... its more like an internal syslog22:34
amee2huskyhehe, ok22:34
prologiccan you put this into a bitbucket repo?22:34
amee2huskyerr, never used that before22:34
prologicso i can pull and fork?l22:34
amee2huskyi used github for a uni project but found it... creepy22:35
prologiccreate yourself a bitbucket acvount22:35
prologiccreate a ,ercurcial repo on bitbucket22:35
amee2huskyRomster: if you have 5 minutes, you want to tune in the FPS stream. like, right now. trust me.22:36
prologichg clone utl to your tepo22:36
prologicgd add22:36
prologichd commit22:36
amee2huskyo.O22:36
prologichg push22:36
amee2huskyRomster: rtsp://streams.de.timduru.org:554/fps.sdp22:36
amee2huskyok22:36
amee2huskyoh murr22:39
amee2huskythat was hysterical22:39
prologicyou have 30,ins to do this ;)22:39
amee2huskyalready signed up22:39
amee2huskyis there an activation mail coming?22:39
prologicand tidy up the code too ;)22:39
prologicill be in at work soon22:39
amee2huskyok, i have a repo22:40
Romsterweh mplayer wont run that for some reason no time to debug right now, i litearly have 20 mintes to be at work22:40
amee2huskymeh. the video they were playing is over anyway22:40
amee2huskyBlitz was raving in the kitchen to some children's song22:41
Romstermy time zone sucks22:41
amee2huskyi created the repo, now turning manpages trying to figure out how to get my stuff on there22:42
prologichg add22:43
prologichg commit22:44
prologichg push22:44
prologichg help22:44
prologichg committ --help22:44
prologichg clone22:44
amee2huskyyou're forgetting that i've never ever seen that hg thing in my life :>22:44
amee2huskyjust telling me the subcommands doesn't work22:44
prologicYour repos url will be like22:44
amee2huskyi'm reading the man page of "hg clone" trying to figure out how to use that22:45
prologichttp;//bitbucket.org/your_username/your_repo22:45
prologichg clone url22:46
prologiccd repo22:46
prologichg add file1 file2 ...22:46
prologichg commit22:46
amee2huskyin my project directory?22:47
prologichg push22:47
prologicyou will need a $HOME/.hfrc btw22:47
prologicwith at minimum22:47
prologic[ui]22:47
prologicuser = foo22:47
amee2huskythat explains why it keeps dieing with "no username supplied :>22:48
amee2huskyremote: added 1 changesets with 22 changes to 22 files22:49
amee2huskyi think it worked22:49
amee2huskyhttps://bitbucket.org/f320090/test22:49
prologic.hgrc on your home dir22:50
prologiccool ;)22:50
prologicnow tidy things up22:50
amee2husky.... did it work? :322:50
prologiccommit and push22:51
prologicill check it out shortly22:51
amee2huskyok22:51
prologicahh either make your repo public22:52
prologicor give me access22:52
amee2huskyhow?  o.O22:52
prologicsetting22:52
amee2huskysince nothing else is on there i can give you the password :P22:52
prologicbbs gotta walk now!22:53
prologiccheck the bitbucket repo ui22:53
prologicon the website22:53
amee2husky"invite your friends"?22:53
prologicthere is a settings button22:53
amee2huskythere is nothing that says settings22:53
prologicit looks like gears i think22:54
amee2huskyi have: get started, make changes and push, invite friends, get to work, overview, source, commits, pull requests, downloads, clone, fork, compare, pull request, weird eye shaped symbol22:54
amee2huskyooh, the gear22:55
amee2huskynot the settings :P22:55
prologiclol22:55
prologicok back soon22:55
prologicim sure youll figure it out!22:55
amee2huskyunchecked private repo22:55
amee2huskydid that work?22:55
amee2huskythe only mildly popular website i use on a regular basis (and actually like) is furaffinity and that has a design like from the early 2000s... don't get me started on a rant how intuitive i find 90% of the websites out there :>23:00
prologicoh no I couldn't agree more23:20
prologicback btw23:20
prologicI hate how complicated websites have become23:20
prologicit's so hard to find the simplest of things often23:20
prologicbut I do like bitbucket :)23:20
amee2huskyhehe23:20
prologicOk23:49
prologicI'm all done.23:49
prologicTurns out your code was/is fine.23:49
prologicMessy - but fine :)23:49
prologicpip install flake823:49
prologicflake8 module.py23:50
prologicmake it look nice :)23:50
prologicok23:50
prologicSo ...23:50
prologicYou discovered a bug in circuits.io.File for me :)23:50
prologicnot really a bug, but we missed listening to the Started event23:50
prologicI've fixed this23:50
prologiccd /path/to/circuits-dev23:50
prologichg puull -u23:50
prologicif you installed in development mode before - this is all you need to do23:50
amee2huskyO.O23:50
prologici.e: python setup.py develop23:50
prologicyou should only have to do that once to keep up-to-date23:51
prologichg pull -u your circuits-dev repo/copy23:51
amee2huskymmh ok23:53
amee2huskyhow do i tell if it worked?23:54
*** Osso has quit IRC23:55
prologicwell it should work now :)23:55
prologicI tested it here23:55
prologicpull and merge with my copy of your repo23:55
prologicI made a few minor tweaks23:56
prologichg pull https://bitbucket.org/prologic/test_amee2husky23:56
prologicand you may have to possibly23:56
prologichg merge23:56
prologicfollowed by a hg commit23:56
prologicin fact you will have to ;)23:56
amee2huskyhmm when i run it, it still doesn't work23:56
amee2huskyoh, ok23:56
prologicnah works fine here23:57
prologicdid you update your circuits-dev repo?23:57
prologicoh wait23:57
prologicI didn't push to upstream23:57
prologichang on :)23:57
amee2huskyhg commit says "nothing changed"23:57
prologicthere we go23:57
prologicupdate circuits now23:57
prologiccd /path/to/circuits-dev && hg pull -u23:57
amee2huskyyay, it works :D23:58
amee2huskyo.O23:59

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