Sunday, 2023-06-04

*** openpowerbot <openpowerbot!~openpower@94-226-187-44.access.telenet.be> has quit IRC01:16
*** toshywoshy <toshywoshy!~toshywosh@ptr-377wf33o3bnthuddmycb.18120a2.ip6.access.telenet.be> has quit IRC01:16
*** toshywoshy <toshywoshy!~toshywosh@ptr-377wf33o3bnthuddmycb.18120a2.ip6.access.telenet.be> has joined #libre-soc01:17
*** openpowerbot <openpowerbot!~openpower@94-226-187-44.access.telenet.be> has joined #libre-soc01:49
*** cesar <cesar!~cesar@2001:470:69fc:105::76c> has joined #libre-soc03:20
*** ghostmansd[m] <ghostmansd[m]!~ghostmans@91.205.168.99> has quit IRC09:29
*** ghostmansd[m] <ghostmansd[m]!~ghostmans@91.205.168.99> has joined #libre-soc09:30
*** lxo <lxo!~lxo@gateway/tor-sasl/lxo> has quit IRC11:25
*** lxo <lxo!~lxo@gateway/tor-sasl/lxo> has joined #libre-soc12:10
*** markos_ <markos_!~markos_@user/markos/x-1838887> has quit IRC12:23
*** ghostmansd[m] <ghostmansd[m]!~ghostmans@91.205.168.99> has quit IRC13:29
*** ghostmansd[m] <ghostmansd[m]!~ghostmans@91.205.168.99> has joined #libre-soc13:30
*** markos_ <markos_!~markos_@static062038151250.dsl.hol.gr> has joined #libre-soc13:38
*** markos_ <markos_!~markos_@user/markos/x-1838887> has joined #libre-soc13:38
*** ghostmansd[m] <ghostmansd[m]!~ghostmans@91.205.168.99> has quit IRC13:44
*** ghostmansd[m] <ghostmansd[m]!~ghostmans@176.59.42.196> has joined #libre-soc13:45
*** markos_ <markos_!~markos_@user/markos/x-1838887> has quit IRC14:16
lkclghostmansd[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 Luke14:58
ghostmansd[m]My understanding of visitors is close to "wtf are visitors"14:58
ghostmansd[m]So you're already several steps ahead14: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
lkclunfortunately 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 data15:36
lkcl> folks just inherit core.Visitor15:36
lkclah no.15:36
lkclthat way lies madness, because it begins to try to be "all things to all uses"15:37
lkclVisitor APIs (and their use) is very much a strict "Model - View - Controller" pattern15:38
lkclwhere the Visitor ties all those three together15:38
lkclsorry15:39
lkclwhere the *Visitor-walker* ties all those three together15:39
lkclthe 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
lkclnow, when we *create* some Visitors15:51
*** markos_ <markos_!~markos_@62.74.16.126> has joined #libre-soc15:51
*** markos_ <markos_!~markos_@user/markos/x-1838887> has joined #libre-soc15:51
lkclthat's an entirely different matter15:51
lkclwhat we will find is (as you're already encountering), most of the Visitors pretty much need to do exactly the same kind of thing15:51
lkcltherefore it *looks* like the Visitor class *must* be inherited: a "true" Visitor-walker is however completely abstracted from the data it walks.15:52
lkclwhich 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 IRC15:58
*** ghostmansd[m] <ghostmansd[m]!~ghostmans@176.59.42.196> has quit IRC16:01
*** ghostmansd[m] <ghostmansd[m]!~ghostmans@176.59.42.123> has joined #libre-soc16:02
*** markos_ <markos_!~markos_@62.74.16.126> has joined #libre-soc16:03
*** markos_ <markos_!~markos_@user/markos/x-1838887> has joined #libre-soc16:03
*** markos_ <markos_!~markos_@user/markos/x-1838887> has quit IRC16:11
*** ghostmansd[m] <ghostmansd[m]!~ghostmans@176.59.42.123> has quit IRC16:17
*** ghostmansd[m] <ghostmansd[m]!~ghostmans@91.205.168.99> has joined #libre-soc16:17
ghostmansd[m]> most of the Visitors pretty much need to do exactly the same kind of thing16: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 IRC17:00
*** ghostmansd[m] <ghostmansd[m]!~ghostmans@176.59.164.160> has joined #libre-soc17:02
*** ghostmansd[m] <ghostmansd[m]!~ghostmans@176.59.164.160> has quit IRC17:07
lkclyes, the pyomo visitor-api handles that by returning "None" if it should not be modified17: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-soc17:40
*** markos_ <markos_!~markos_@62.74.16.126> has joined #libre-soc17:51
*** markos_ <markos_!~markos_@user/markos/x-1838887> has joined #libre-soc17:51
programmerjakesomething in the link below broke ci (>= 10 failed tests):22:59
programmerjakehttps://git.libre-soc.org/?p=openpower-isa.git;a=commitdiff;h=7ffad8f720232648146ca618080752da2a7c3398;hp=6e34bc28b293991a94bb125f9cb6fc13c7203ac122:59
*** mx08 <mx08!~mx08@user/mx08> has quit IRC23:04
*** mx08 <mx08!~mx08@user/mx08> has joined #libre-soc23:05
*** markos_ <markos_!~markos_@user/markos/x-1838887> has quit IRC23:31

Generated by irclog2html.py 2.17.1 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!