*** openpowerbot <openpowerbot!~openpower@94-226-187-44.access.telenet.be> has quit IRC | 01:16 | |
*** toshywoshy <toshywoshy!~toshywosh@ptr-377wf33o3bnthuddmycb.18120a2.ip6.access.telenet.be> has quit IRC | 01:16 | |
*** toshywoshy <toshywoshy!~toshywosh@ptr-377wf33o3bnthuddmycb.18120a2.ip6.access.telenet.be> has joined #libre-soc | 01:17 | |
*** openpowerbot <openpowerbot!~openpower@94-226-187-44.access.telenet.be> has joined #libre-soc | 01:49 | |
*** cesar <cesar!~cesar@2001:470:69fc:105::76c> has joined #libre-soc | 03:20 | |
*** ghostmansd[m] <ghostmansd[m]!~ghostmans@91.205.168.99> has quit IRC | 09:29 | |
*** ghostmansd[m] <ghostmansd[m]!~ghostmans@91.205.168.99> has joined #libre-soc | 09:30 | |
*** lxo <lxo!~lxo@gateway/tor-sasl/lxo> has quit IRC | 11:25 | |
*** lxo <lxo!~lxo@gateway/tor-sasl/lxo> has joined #libre-soc | 12:10 | |
*** markos_ <markos_!~markos_@user/markos/x-1838887> has quit IRC | 12:23 | |
*** ghostmansd[m] <ghostmansd[m]!~ghostmans@91.205.168.99> has quit IRC | 13:29 | |
*** ghostmansd[m] <ghostmansd[m]!~ghostmans@91.205.168.99> has joined #libre-soc | 13:30 | |
*** markos_ <markos_!~markos_@static062038151250.dsl.hol.gr> has joined #libre-soc | 13:38 | |
*** markos_ <markos_!~markos_@user/markos/x-1838887> has joined #libre-soc | 13:38 | |
*** ghostmansd[m] <ghostmansd[m]!~ghostmans@91.205.168.99> has quit IRC | 13:44 | |
*** ghostmansd[m] <ghostmansd[m]!~ghostmans@176.59.42.196> has joined #libre-soc | 13:45 | |
*** markos_ <markos_!~markos_@user/markos/x-1838887> has quit IRC | 14:16 | |
lkcl | ghostmansd[m], moornin(ish). just so you know, i have difficulty expressing my understanding and use of visitor-walkers, it's highly subconscious and also more "experiment-by-actually-doing" | 14:35 |
---|---|---|
ghostmansd[m] | Hi Luke | 14:58 |
ghostmansd[m] | My understanding of visitors is close to "wtf are visitors" | 14:58 |
ghostmansd[m] | So you're already several steps ahead | 14:58 |
ghostmansd[m] | On arguments again. db.*Visitor is not intended to be reused, that's just concrete implementations of visiting pattern for some shitty CLI script. | 14:59 |
ghostmansd[m] | So basically they can do whatever they want :-) | 15:00 |
ghostmansd[m] | The way I imagined it that folks just inherit core.Visitor and do whatever they want. | 15:08 |
ghostmansd[m] | But basically what you've described actually makes me think I did it correctly. Because I indeed created a set of new classes which grab the arguments and have some special logic around these arguments. | 15:11 |
ghostmansd[m] | The only problem is that extra() manager doesn't have record instance, so I either have to keep it on my own or pass it via arguments into the core methods (visit). | 15:11 |
lkcl | > "wtf are visitors" | 15:35 |
lkcl | :) | 15:35 |
lkcl | unfortunately i've only ever developed one Visitor-walker API myself, and yes i made the mistake of tying the API directly to the format of the data | 15:36 |
lkcl | > folks just inherit core.Visitor | 15:36 |
lkcl | ah no. | 15:36 |
lkcl | that way lies madness, because it begins to try to be "all things to all uses" | 15:37 |
lkcl | Visitor APIs (and their use) is very much a strict "Model - View - Controller" pattern | 15:38 |
lkcl | where the Visitor ties all those three together | 15:38 |
lkcl | sorry | 15:39 |
lkcl | where the *Visitor-walker* ties all those three together | 15:39 |
lkcl | the API needs to be *implicit*, i.e. if thinking of using ABCMeta as a Base class, that's the literal polar opposite of what's needed. | 15:50 |
lkcl | now, when we *create* some Visitors | 15:51 |
*** markos_ <markos_!~markos_@62.74.16.126> has joined #libre-soc | 15:51 | |
*** markos_ <markos_!~markos_@user/markos/x-1838887> has joined #libre-soc | 15:51 | |
lkcl | that's an entirely different matter | 15:51 |
lkcl | what we will find is (as you're already encountering), most of the Visitors pretty much need to do exactly the same kind of thing | 15:51 |
lkcl | therefore it *looks* like the Visitor class *must* be inherited: a "true" Visitor-walker is however completely abstracted from the data it walks. | 15:52 |
lkcl | which is why i was recommending pyomo's visitor-walker code because it has matured (and is, for the most part, abstracted-out) | 15:53 |
*** markos_ <markos_!~markos_@user/markos/x-1838887> has quit IRC | 15:58 | |
*** ghostmansd[m] <ghostmansd[m]!~ghostmans@176.59.42.196> has quit IRC | 16:01 | |
*** ghostmansd[m] <ghostmansd[m]!~ghostmans@176.59.42.123> has joined #libre-soc | 16:02 | |
*** markos_ <markos_!~markos_@62.74.16.126> has joined #libre-soc | 16:03 | |
*** markos_ <markos_!~markos_@user/markos/x-1838887> has joined #libre-soc | 16:03 | |
*** markos_ <markos_!~markos_@user/markos/x-1838887> has quit IRC | 16:11 | |
*** ghostmansd[m] <ghostmansd[m]!~ghostmans@176.59.42.123> has quit IRC | 16:17 | |
*** ghostmansd[m] <ghostmansd[m]!~ghostmans@91.205.168.99> has joined #libre-soc | 16:17 | |
ghostmansd[m] | > most of the Visitors pretty much need to do exactly the same kind of thing | 16:26 |
ghostmansd[m] | Yes exactly. That's where I cannot manage to tie Jacob's suggestion with context manager! | 16:26 |
ghostmansd[m] | Because basically the traversing is the same, it's only just we might want to skip some nodes or handle them specifically. | 16:27 |
ghostmansd[m] | So I think that the main idea from http.parser and pyomo is OK: have separate methods for before/on/after but let the caller handle the logic. | 16:28 |
ghostmansd[m] | Sorry, almost all day from the phone, so it's difficult to type or read long passages. | 16:33 |
*** ghostmansd[m] <ghostmansd[m]!~ghostmans@91.205.168.99> has quit IRC | 17:00 | |
*** ghostmansd[m] <ghostmansd[m]!~ghostmans@176.59.164.160> has joined #libre-soc | 17:02 | |
*** ghostmansd[m] <ghostmansd[m]!~ghostmans@176.59.164.160> has quit IRC | 17:07 | |
lkcl | yes, the pyomo visitor-api handles that by returning "None" if it should not be modified | 17:17 |
lkcl | 140 data = acceptChildResult(self, node, data, child_result, child_idx): | 17:17 |
*** ghostmansd[m] <ghostmansd[m]!~ghostmans@91.205.168.99> has joined #libre-soc | 17:40 | |
*** markos_ <markos_!~markos_@62.74.16.126> has joined #libre-soc | 17:51 | |
*** markos_ <markos_!~markos_@user/markos/x-1838887> has joined #libre-soc | 17:51 | |
programmerjake | something in the link below broke ci (>= 10 failed tests): | 22:59 |
programmerjake | https://git.libre-soc.org/?p=openpower-isa.git;a=commitdiff;h=7ffad8f720232648146ca618080752da2a7c3398;hp=6e34bc28b293991a94bb125f9cb6fc13c7203ac1 | 22:59 |
*** mx08 <mx08!~mx08@user/mx08> has quit IRC | 23:04 | |
*** mx08 <mx08!~mx08@user/mx08> has joined #libre-soc | 23:05 | |
*** markos_ <markos_!~markos_@user/markos/x-1838887> has quit IRC | 23:31 |
Generated by irclog2html.py 2.17.1 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!