IRC Logs for #circuits Saturday, 2014-03-08

prologicwe mirrot the repos on github00:03
prologicbut git mirroring doesn't really work all that well00:03
prologictbh I'd rather contributors contribute via our supported mercurial/bitbucket repos00:04
prologiclet's face it00:04
prologicGit is a complicated PITA00:04
spaceonePITA?00:06
spaceoneah00:06
spaceoneno00:06
spaceonehg is pita00:06
prologicsee this is precisely what I mean00:07
prologicI find Git a Pain to use00:07
prologicyou find Hg a pain to use00:07
prologicit's a matter of personal subjective experience00:07
prologicand truth be told00:07
spaceoneyep00:07
prologicI went from CVS -> SVN -> Git00:07
prologicand finally Hg00:07
prologic:)00:07
prologicI just find Mercurial/Hg's CLI far mroe intuiative than Git00:07
prologicI sometimes (and so do several of my collagues) feel like Git develoeprs wanted to make Git's CLI as hard as possible to use00:07
prologicso be so-called elite/nerdy00:08
spaceone:D00:08
prologic:)00:08
prologicIf the CLI is not intuitive it makes it a) hard to use b) hard to learn c) hard to remember to do the simplest things00:08
prologic_every single time_ I'm forced to use Git00:09
prologicI have to Google00:09
spaceonehmm what things do you do?00:09
prologicAnyway00:09
prologicwe do have github mirrors00:09
prologicbut I find it's not that great00:09
spaceonecommit,push,rebase,pull,merge00:09
prologicand it's not perfect00:09
prologicyeah commit and pull work msotly the same way00:10
prologicbut hardly anything else does00:10
prologichttp://stackoverflow.com/questions/1450348/git-equivalents-of-most-common-mercurial-commands00:11
spaceonehmm, doesnt contain much diffs00:14
spaceonebut i saw the github mirror00:15
spaceonethats nice00:15
spaceoneprologic: do you mirror it once a month?00:17
prologicI try to mirror it quite often00:18
prologicbut I think it's a bit out-of-date atm00:18
prologicI need to delete the -dev repo00:18
spaceonewant to make branches00:18
spaceone?00:18
prologicyeah see that's the other thing too00:18
prologicI _do not_ want to use git branches00:19
spaceoneshould i fork dev or non-dev?00:19
prologicthey make the repository very messy00:19
prologici.e: git named branches00:19
prologicdon't "git branch"00:19
prologicfor the love of god :)00:19
spaceone:D00:19
prologicI'm changing the dev processes for circuits00:19
prologicand will have the docs/sources/dev/process.rst updated soon00:19
prologicbasically the work flow will be something like this00:20
prologicPickup an issue00:20
prologicFork/Clone the repo00:20
prologicHack your changes/fixes as a new head00:20
prologicrebase your chnages on top of upstream regularly00:20
prologicoptionally bookmark your head (mercurial only)00:20
prologicwhen done, push to your github/bitbucket personal fork/clone (i.e: not named branch)00:21
prologicsubmit a PR00:21
prologicwait for review/comments possibly doing minor fixes/alterations00:21
spaceoneok00:21
prologicClone, Hack, Pull Request00:21
prologicAnd I still don't mind if you a PR contains multiple commits00:22
prologicyou don't _have_ to squash to a single commit00:22
prologicBasically I prefer and always have00:22
prologicOne logical tangible commit per change00:22
prologicYou have to be able to track history00:22
prologicbisect trees00:22
prologicetc00:22
prologicsquashing unnecessarily is sometimes very unhelpful and counter intuitive00:23
spaceoneso, i can have multiple commits for one ticket having meaningfull messages?00:24
prologic(circuits)00:24
prologicprologic@daisy00:24
prologicSat Mar 08 10:24:3300:24
prologic~/circuits00:24
prologic$ hg push github00:24
prologicpushing to git+ssh://git@github.com:circuits/circuits.git00:24
prologic["git-receive-pack 'circuits/circuits.git'"]00:24
prologicsearching for changes00:24
prologicno changes found00:24
prologicgithub mirror is up-to-date00:24
prologicspaceone, yes00:24
spaceoneok00:24
prologicThe problem basically comes to do tracking history00:25
prologicand figuring out what a person did00:25
prologicif the commit is too large00:25
prologicand contains lots of unrelated changes00:25
spaceoneyes00:25
prologicthen it's otherwise useless as it's whole00:25
prologiclogical/tangible changes per commit00:25
spaceonecode cleanup in separate commits00:25
spaceonealways ticket number in commit message00:25
prologicyes that too00:26
prologicI forgot to mention :)00:26
prologiccommit must finally say either00:26
prologicSee Issue #12300:26
prologicor Fixes Issue #12300:26
spaceonebut must also describe the change?!00:26
prologicI'm trying to migrate to uses the releases sphinx ext from 3.0 onwards00:26
prologicfrom the Fabric project00:26
prologicbut having troubles getting it work work right now00:27
prologicit'll make maintaining release notes and a change log much easier00:27
prologicwell usually just something as simple as00:27
prologic<summary> Fixes Issue #<id>00:27
prologicwith optional extra details two new lines below00:28
prologicbut hopefully that's rare :)00:28
prologicspaceone, it would be good if you could fix one or two of the circuits.web bugs you posted00:41
spaceonei can't guarantee atm because i need to learn for the final exams00:42
spaceonei probably will have a look at Do00:43
spaceoneS00:43
prologicnps00:50
spaceoneprologic: does filter=True still exists?01:10
spaceoneis it recommended to replace the arg by event.stop?01:18
prologicno01:19
prologicit was replaced by event.stop()01:19
spaceoneah okay01:19
prologicwhich simply sets an internal flag on the event object01:19
spaceoneok01:19
prologicgreatly simplifying how event handlers are sorted and handled01:20
spaceoneyep01:20
spaceonewhy does a parent registers at a child and not the other way round?01:20
prologiceh?01:22
spaceoneregisters himself*01:22
prologicI don't understand01:22
prologiccomponents are registered in the relationships you define01:23
prologicvia .register(other)01:23
spaceonelike Child().register(parent)01:23
prologicor + or +=01:23
prologicbut their respective event handlers are cached and filtered up to the manager01:23
spaceoneinstead of parent.register(Child())01:23
prologicbecause you are registered a component to a manager01:23
prologice.g:01:23
prologicChild().register(manager)01:23
prologicthere is always a central overarching manager01:24
prologicusually the top-level component in the graph/tree01:24
prologicand it's also done this way so that01:24
prologicmanager += Child()01:24
prologicworks as expected01:24
spaceoneok, yes01:24
spaceonesemms nice syntax01:24
prologicit is01:25
prologicthat's why we have it01:25
prologicand also01:25
prologic(Chidl1() + Chidl2()).run()01:25
prologicalso works as expected01:25
prologicas does01:25
prologicmanager += (Child1() + Child2())01:25
prologicwe did this to keep expression equivilance01:25
spaceonehm?01:25
prologici.e: component composition01:25
spaceonewhere is the manager in the 1st examoke01:25
spaceoneexample?01:25
prologic(Chidl1() + Chidl2()).run()01:26
prologicthe manager is Chidl1() in this case01:26
spaceone ok01:26
prologicChild101:26
prologic|-Child201:26
prologicis what the graph ends up being here01:26
spaceoneand when Child1()01:26
spaceoneand when Child1() + Child2() + Child3()01:26
prologicwith the 2nd example01:26
prologic manager += (Child1() + Child2())01:26
prologicit becomes01:26
prologicmanager01:26
prologic|-Child101:26
prologic  |-Child201:26
spaceoneok01:27
spaceoneso in my example child3 is sub of child2?01:27
prologicyeap01:27
spaceonegood01:27
prologicexpressions are evaluated from left to right01:27
prologicjust like in Python01:27
prologicit's just syntactic sugar for .regsiter() calls01:27
prologicbut once you start composing complex systems made up of many many componnets01:28
prologicyou'll find yourself quickly starting to use + and +=01:28
spaceoneyes01:28
prologicbecause a) it makes sense and b) it's easier to type01:28
prologicanyway bbs01:28
prologicgotta build a chicken coop/house01:28
spaceone^^01:29
pdurbinprologic: heh. nice01:30
spaceonewhich priority is executed first? 1.0 or 0.0 ?01:30
prologichigher01:32
spaceoneok01:32
spaceonei remember01:32
prologicbut be aware01:32
prologicevent priority is reversed01:32
prologicnew feature in 3.001:32
prologicyou can do:01:32
prologicself.fire(foo(), priority=-2)01:32
prologiclower the higher the priority01:32
prologicdon't ask :)01:33
spaceonehmm01:33
prologicstupid heapq implementation details01:33
spaceonedon't really know when to use this01:33
prologicit needs to be fixed one day01:33
prologicbut I don't see many users using it tbh01:33
prologicit was asked for and was quite trivial to add01:33
prologicso there is01:33
prologicevent handler priority01:33
prologicand event priority01:33
prologicme neither01:33
spaceonewhat will fire(event, priority=0.5) do?01:33
prologicunless you're doing some non-hard real-time stuff01:33
spaceonefiring all events higher than 0.5?01:34
prologicso it uses a heapq internally01:34
prologicso if you have01:34
prologicevent_a at 001:34
prologicevent_b at -101:34
prologicfiring event_c at -2 will put it higher than event _b01:34
prologicso the order of events can be changed somewhat01:35
prologicit's not strictly FIFO anymore01:35
prologicif you use the priority kwarg01:35
spaceoneso better not use it01:38
prologicwell01:38
prologicit's there01:38
prologicit works01:38
prologicI don't really see a use-case for it myself01:39
prologicbut someone did want and did use this01:39
prologicso *meh* :)01:39
spaceoneuhm btw. can i see if there exists a handler for a specific event?01:39
prologicit was like 5 lines of code to change01:39
prologicyes01:39
prologic.handlers()01:39
spaceoneok01:39
prologicbut this gets a list of event handlers for _that_ component01:40
prologiceither class or instance01:40
prologicso if you wanted a way to query the entire registered system01:40
prologicyou'd have to patch .handlers() to walk the tree/graph01:40
prologicwhich might actually be a nice idea01:40
prologicfile an issue for it and submit a pr if you want this :)01:40
spaceoneok01:40
prologicI think it could be nice01:40
prologicperhaps the logic could be01:41
prologiclook in ourself first01:41
spaceoneand is it useful to limit that to channel names?01:41
prologicif not found01:41
prologicfind the root manager if not ourself01:41
prologicand traverse the graph/tree01:41
spaceoneif i write this, should i make a new method for it?01:42
prologicwell .handlers() and .events()01:42
prologiconly gives you a list of things01:42
prologichang on lemme double check01:42
prologichttp://circuits.readthedocs.org/en/latest/api/circuits.core.html#circuits.core.components.BaseComponent.handlers01:43
prologichttp://circuits.readthedocs.org/en/latest/api/circuits.core.html#circuits.core.components.BaseComponent.events01:43
prologicperhaps both need a recursve=True kwarg01:43
prologicto walk the tree/graph if there is one01:43
prologicand maybe we need a query() api/call01:43
prologicto find an event handler for a given event/handler01:43
prologicactually01:44
prologicthere is already .getHandlers()01:44
prologicwhich already takes an event object and optional channel name01:44
prologichttp://circuits.readthedocs.org/en/latest/api/circuits.core.html#circuits.core.Manager.getHandlers01:44
prologicit's only used internally though01:45
prologicnot sure if we should leave it public01:45
spaceonewhat is meant by exclude globals?01:53
spaceonethe getHandlers functions seems to be exactly what is am serching for01:54
spaceone_globals are core event handler?01:54
spaceonene | ok                                                                                                                                                     │02:19
spaceone28.intersys       │02:40:10     @prologic | but this gets a list of event handlers for _that_ component                                                                                            │02:19
spaceone29.Woodfighter    │02:40:14     @prologic | either class or instance                                                                                                                               │02:19
spaceonesorry02:19
spaceonehttps://github.com/spaceone/circuits/commit/583b61bff45f86e9f29b9bd490cd5697c5bb001302:20
spaceonehttps://github.com/spaceone/circuits/commit/608ff4a2709344d721f7f6203ccfa5ae6959ef0f02:20
prologicno global event handlers are those that listen to evrything02:37
prologiceither02:37
prologic@handler()02:37
prologicor @handler(channel="*")02:37
prologici.e: Debugger sets up a global event handler02:37
prologicto listen to all events and logs them02:37
prologicregardless of what they are or what channel they apeared on02:38
spaceoneok02:39
spaceonethere is a kwarg named exclude_globals02:40
spaceonethis is if i see correctly broken02:41
spaceonebecause previously all * handlers are appended02:42
spaceonecan you verify this?02:46
spaceoneah, there is * for channels and for events02:49
*** Myke_ has joined #circuits03:16
*** patx has quit IRC03:20
*** patx has joined #circuits03:30
prologicyeah :)03:45
prologicit should work or the test would fail :)03:45
prologichopefully it's covered by unit tests :)03:45
*** Myke_ has quit IRC06:41
*** limansk has quit IRC07:15
prologicspaceone, ping?07:42
prologicif you submit those changes as PR's go the github repo07:42
prologicI'll review/accept them07:42
prologicand merge (hopefully) back nito the main branch over at bitbucket.org/circuits/circuits :)07:42
*** LeuX has joined #circuits08:49
*** prologic_ has joined #circuits08:51
*** prologic has quit IRC08:56
*** LeuX_ has quit IRC08:56
*** Osso has joined #circuits10:29
*** zleap has joined #circuits10:47
*** violla has joined #circuits10:53
*** zleap has quit IRC11:23
*** violla has quit IRC11:27
*** Osso has quit IRC11:31
*** irclogger_ has joined #circuits14:43
*** prologic has joined #circuits14:44
*** prologic has joined #circuits16:01
*** Guest99731 has joined #circuits16:02
*** Osso has joined #circuits16:10
*** expedic has joined #circuits16:46
*** expedic has quit IRC17:24
*** zleap has joined #circuits18:42
*** Osso has quit IRC19:21
spaceoneGuest99731: i currently have a look at the namespace package thing19:22
spaceonewe don't have a chance to get that working if we want to maintain the possibility of 'from circuits import Event'19:23
spaceoneinstead of from circuits.core import Event19:24
spaceoneeven copying the __init__.py wouldn't work because the circuits.core import is not allowed then19:37
*** zleap has quit IRC20:16
*** pavelspb has joined #circuits21:08
*** pavelspb has quit IRC21:15
spaceonecircuits.__init__ could be adapted to only import circuits.core (which every namespace package would have to copy). Then in circuits.core.__init__ the attributes (Event, ...) could be added to circuits21:35
spaceonee.g. http://circuits.codepad.org/LknIev2k21:51
spaceonehmm, i am not sure if this is correct23:11
prologicspaceone, yes you are quite right23:34
prologicthis has been my conclusion as well23:34
prologicif you do come up with an elegant approach23:34
prologicI'm all ears23:34
spaceonehmm… ^^23:43
prologicspaceone, hmm23:48
prologicre your first pull request23:48
prologicand some issues you created23:48
prologicit would probably be good if the commit message also mentioned or fixed related issues23:48
prologic:)23:48
prologicbut all good23:48
spaceonei didn't know why the event wasn't fired23:49
prologicoh that issue23:59
prologic#66?23:59
spaceoneyes23:59
spaceonei fixed #6723:59

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