Saturday, 2023-06-10

*** ghostmansd <ghostmansd!~ghostmans@broadband-109-173-83-100.ip.moscow.rt.ru> has quit IRC00:00
*** ghostmansd <ghostmansd!~ghostmans@broadband-109-173-83-100.ip.moscow.rt.ru> has joined #libre-soc00:00
vaino[m]little question, is the svp implementation in microwatt at the stage as described in the wiki? I'm wondering since this link https://git.libre-soc.org/?p=libreriscv.git;a=blob;f=openpower/sv_analysis.py;hb=HEAD is dead on this page https://libre-soc.org/openpower/sv/implementation/ (under 4.1.)00:06
lkclvaino[m], someone needs to do the work. if you're interested i don't mind putting in an NLnet Grant request for it00:10
lkcl(by "interested" i mean "interested and getting paid to do it")00:10
*** josuah <josuah!~josuah@46.23.94.12> has quit IRC01:17
programmerjakelkcl: I'd like to change the required version of pytest to 7.3.1 and pytest-xdist to 3.3.1 since we have to install from pip anyway and 3.x is ancient and ieee754fpu has required at least 6.0 for over a year and because with the plugin I wrote we don't have the running out of memory issue anymore02:08
programmerjake(those are the versions CI is currently using)02:09
programmerjakehttps://git.libre-soc.org/?p=ieee754fpu.git;a=blob;f=pyproject.toml;h=267ae9af7d6f7a6cb20043c7f6289b3d53213f59;hb=658d12765b103405f7965a0d3c5e399446654686#l202:10
programmerjakeI'm planning on adding a similar pyproject.toml with the pytest config to openpower-isa.git to always enable the plugin02:10
programmerjake(it's only used by pytest, so users don't need it unless they want to run tests using pytest)02:11
programmerjakethat >=6.0 version requirement was committed may 202202:13
programmerjakecreated a branch containing the openpower-isa part of the proposed changes, for details, see https://bugs.libre-soc.org/show_bug.cgi?id=1100#c304:26
programmerjakeimportant part: running pytest with SILENCELOG unset with 8 threads uses 9.46GiB ram on my system on the pytest7 branch and generates 5.8G of output log files in test-out/04:26
programmerjakethis is with fmv/fcvt and utf-8 tests re-enabled04:27
*** toshywoshy <toshywoshy!~toshywosh@ptr-377wf33o3bnthuddmycb.18120a2.ip6.access.telenet.be> has quit IRC07:08
*** toshywoshy <toshywoshy!~toshywosh@ptr-377wf33o3bnthuddmycb.18120a2.ip6.access.telenet.be> has joined #libre-soc07:08
lkclprogrammerjake, as long as you also update the devscripts - and check them - that will work really well.09:04
lkclupdating *only* the CI forces me into the position of having to do it09:05
lkcl*i* run tests using pytest.09:05
lkcltherefore it's important09:05
lkclwhy was 6.0 chosen for ieee754fpu?09:08
lkcl(that decision should not have been made arbitrarily without a full review of the consequences of installing a different version than the project default)09:09
lkclyou see how that works?10:05
lkclarbitrary decisions on which software version is used have ramifications for project management and maintainability10:05
lkclthey have to be consistent - for everyone10:06
lkclso10:06
lkcllet's go through it (logic-walk-through)10:06
lkcl* debian/10 has pytest 3.3 which uses far more memory than 3.2.510:07
lkcl* therefore we have to use pip3 for installing pytest (sigh)10:07
lkclwhich i did here: https://git.libre-soc.org/?p=dev-env-setup.git;a=commitdiff;h=b5eeac6cae7ba11b75edff61ac4111b57edc7fbd10:07
lkcl* with it no longer being possible to use the default in debian/10 *a* version can be picked10:08
lkcl* that version should be CONSISTENT across CI and the reproducible-build software-installation scripts10:08
*** ghostmansd[hexch <ghostmansd[hexch!~ghostmans@broadband-109-173-83-100.ip.moscow.rt.ru> has joined #libre-soc10:10
lkclso i don't actually mind at all what version is installed for pytest (and submoduls), as long as they're consistently used, and as long as they are specific versions10:12
lkclallowing the version to change arbitrarily to latest-and-greatest breaks the entire concept "reproducible"!10:12
*** ghostmansd <ghostmansd!~ghostmans@broadband-109-173-83-100.ip.moscow.rt.ru> has quit IRC10:13
lkclghostmansd[hexch, moornin :)10:29
*** ghostmansd[hexch <ghostmansd[hexch!~ghostmans@broadband-109-173-83-100.ip.moscow.rt.ru> has quit IRC11:22
*** ghostmansd[m] <ghostmansd[m]!~ghostmans@broadband-109-173-83-100.ip.moscow.rt.ru> has quit IRC11:27
*** ghostmansd[m] <ghostmansd[m]!~ghostmans@176.59.174.15> has joined #libre-soc11:27
*** ghostmansd <ghostmansd!~ghostmans@176.59.174.15> has joined #libre-soc11:31
*** ghostmansd <ghostmansd!~ghostmans@176.59.174.15> has quit IRC12:00
*** ghostmansd <ghostmansd!~ghostmans@176.59.174.15> has joined #libre-soc12:23
*** ghostmansd[hexch <ghostmansd[hexch!~ghostmans@82.144.74.239> has joined #libre-soc12:34
*** ghostmansd <ghostmansd!~ghostmans@176.59.174.15> has quit IRC12:34
*** ghostmansd[hexch <ghostmansd[hexch!~ghostmans@82.144.74.239> has quit IRC13:07
*** ghostmansd[hexch <ghostmansd[hexch!~ghostmans@82.144.74.239> has joined #libre-soc13:19
*** ghostmansd[hexch <ghostmansd[hexch!~ghostmans@82.144.74.239> has quit IRC13:46
*** ghostmansd <ghostmansd!~ghostmans@82.144.74.239> has joined #libre-soc13:49
*** ghostmansd <ghostmansd!~ghostmans@82.144.74.239> has quit IRC13:54
*** ghostmansd <ghostmansd!~ghostmans@82.144.74.239> has joined #libre-soc13:59
*** ghostmansd <ghostmansd!~ghostmans@82.144.74.239> has quit IRC14:32
*** ghostmansd <ghostmansd!~ghostmans@82.144.74.239> has joined #libre-soc14:32
ghostmansdlkcl, I think I've found the solution which fits all our needs: https://bugs.libre-soc.org/show_bug.cgi?id=1094#c9214:33
ghostmansdhell 95 comments in task already, that's crazy14:33
ghostmansd20 LoC; perhaps 5-10 more with some cleanup and if registry is not global but per-class, but still impressive. And covers every damn class, regardless of whether it's Node, builtin, or anything else.14:35
ghostmansdThe only thing I'd like to have is that these functions can be bound inside the class, as methods, without the need to pass the visitor class too. But all my attempts failed, and inspect module's magic is mentioned as fragile.14:39
*** josuah <josuah!~josuah@46.23.94.12> has joined #libre-soc14:44
*** ghostmansd <ghostmansd!~ghostmans@82.144.74.239> has quit IRC15:11
*** ghostmansd <ghostmansd!~ghostmans@176.59.174.15> has joined #libre-soc15:39
*** ghostmansd <ghostmansd!~ghostmans@176.59.174.15> has quit IRC15:57
*** ghostmansd[m] <ghostmansd[m]!~ghostmans@176.59.174.15> has quit IRC16:00
*** ghostmansd[m] <ghostmansd[m]!~ghostmans@176.59.162.32> has joined #libre-soc16:03
*** ghostmansd <ghostmansd!~ghostmans@176.59.162.32> has joined #libre-soc16:15
lkcli did say "if lots of lines equals bad"! :)16:47
lkclghostmansd, https://realpython.com/python-metaclasses/16:54
lkclsearch "One possible solution is a custom metaclass. "16:54
lkcldoes it work creating entirely new registry dicts?16:57
lkclit does!17:01
ghostmansdlkcl, sorry, I don't get what you ask17:02
ghostmansdif you ask whether I used metaclasses -- yes, I did :-)17:03
ghostmansdPushed the new implementation to master17:05
ghostmansdIt takes more lines, but most of them are checks and convenience wrappers17:05
lkclhttps://bugs.libre-soc.org/show_bug.cgi?id=1094#c10217:07
lkclta-daaa, a per-class (even as classes not instances) registry.17:07
lkclneeds overriding of __new__ not __init__17:07
lkcl" these functions can be bound inside the class, as methods, without the need to pass the visitor class too"...17:08
lkclehhhm... ehmehmehm...17:08
lkcli mis-read that, and even re-reading it, it doesn't quite make sense yet17:09
lkclhttps://sbcode.net/python/visitor/#visitorvisitor_conceptpy17:10
lkclline 67, is that any good?17:10
lkcloh god i just had an awful idea (if i know what you are referring to)17:11
lkclin the metaclass __new__ which derives from type, *dig in* to the dictionary of functions/properties and override/redirect them (!)17:12
ghostmansdOverriding __init__ is fine: you'll end up with 1 registry per metaclass instance (which is a class) too.17:14
lkclok17:14
ghostmansdAnother option would be editing ns in __new__17:15
lkclyes that was what i said (in different words). muhahaha17:16
ghostmansdBut this would either need "_registry" field or some stuff like f"__{name}_registry" so that it can be used later as cls._registry or cls.__registry.17:16
lkclthat's so totally evil17:16
ghostmansdWell, this caaaaaan be simplified to 1 method if we drop Visitor[XXX] stuff17:17
ghostmansdbecause Visitor.__init_subclass__ is sufficient for just "goddamn edit any our subclass"17:17
ghostmansdBut it doesn't allow such tricks, that's just a convenience wrapper so that for the most simple scenarios users don't have to create their damn metaclasses17:18
ghostmansdcf. new impl, I think it's mostly fine17:18
lkclyeah i love it17:18
ghostmansdcan be cut further, if we drop checks and some meat from metaclasses, but I think it's for better UX17:19
ghostmansd(whatever this means)17:19
lkcl:)17:19
ghostmansdwhat I love is that the decorator binds the stuff to an actual object17:19
lkclthe Visitor[xxx] kinda just feels like it would be useful.  and list(Visitor) should DoTheRightThing as well17:19
ghostmansdand the name can be whataver we like17:20
lkclyeah that's very cool17:20
ghostmansd"object" in Python sense, I mean, a type, but that's object too17:20
ghostmansdI feel we kinda reinvented pattern matching, though :-)17:20
ghostmansd(that's somewhat weird in Python, BTW: https://peps.python.org/pep-0636/)17:20
lkclurrr that....17:21
ghostmansddonnerwetter they finally got case keyword!17:21
lkclPython-Version:17:21
lkcl    3.1017:21
lkclBLECH17:21
ghostmansdcheck the syntax, that really blows the mind17:21
ghostmansdtotally alienish :-)17:21
ghostmansdbut the concept is cool, I bet they have some uses for it17:22
lkclyyeah python is going to shit because Guido's input was being ignored17:22
lkclenough that he went "ok that's enough" and quit17:22
ghostmansdit's for exact matches, and we need a better flexibility where the users arbitrarily define the stuff17:22
ghostmansd> and quit17:22
ghostmansdIIRC he had some debates around some PEP17:23
ghostmansdah yes, this one https://peps.python.org/pep-0572/17:23
ghostmansdhttps://lwn.net/Articles/759654/17:23
ghostmansdactually it seems this was HIS PEP17:24
ghostmansdfuck that's a brutal syntax17:24
ghostmansda good idea to resign after it :-)17:25
ghostmansdso now they have match/case, :=, what's next?...17:25
ghostmansdx = 1, 2  # Sets x to (1, 2)17:26
lkclmap filter and reduce should all have been added to all iterables17:26
ghostmansd(x := 1, 2)  # Sets x to 117:26
ghostmansdso brutal17:26
lkclx.map(function)17:26
lkclthat's going to cause absolute chaos17:26
ghostmansdwell they have experience with chaos, don't they?...17:27
ghostmansdI recall this (in)glorious str/bytes/unicode battle17:27
ghostmansdand other stuff which broke in Python317:27
ghostmansdso they, ahem, are not new to causing an absolute havoc17:27
lkclthere's been something... how can i put this... "wrong-in-the-mind" with the python software devs for some time.17:28
ghostmansdI'd say with many SW devs :-)17:28
lkcl:)17:28
lkcli have a sneaking suspicion it's related to mirror-neuron atrophy17:28
ghostmansdbut the exact definition of "wrong-in-the-mind" obviously differs with the particular person you ask :-)17:28
lkcla side-effect of which is a complete inability to empathise17:28
ghostmansd:-D17:29
ghostmansdI remember such stuff from Dexter17:29
lkcl"how would you feel if that happened to you?" and they literally are unable to understand the question17:29
ghostmansdthe best definition of maniac17:29
lkclyes there's a standing joke in debian that if you pick any 5 debian developers you get an average of 10 mental disorders :)17:30
ghostmansd:-D17:30
ghostmansdthat's kinda common for people in this profession, I bet even I have something, even though still manage to hide it undiagnosed!17:31
lkclthe mirror-neuron atrophy is a peer-reviewed study.  "power corrupts" because they are never challenged, never get a chance to empathise17:31
lkcljust "telling people what to do"17:31
lkcland the result is quite literally that the mirror-neurons, which are what allow you to "put yourself in someone else's shoes", atrophy17:32
lkclok afk need to walk about17:33
ghostmansdOK, see you later17:34
ghostmansdI'll continue working on walking :-)17:34
lkcl:)17:34
ghostmansdso we'll be both walking in some way :-D17:34
*** ghostmansd[hexch <ghostmansd[hexch!~ghostmans@broadband-109-173-83-100.ip.moscow.rt.ru> has joined #libre-soc19:36
*** ghostmansd[hexch <ghostmansd[hexch!~ghostmans@broadband-109-173-83-100.ip.moscow.rt.ru> has quit IRC19:39
*** ghostmansd <ghostmansd!~ghostmans@176.59.162.32> has quit IRC19:39
*** ghostmansd[hexch <ghostmansd[hexch!~ghostmans@broadband-109-173-83-100.ip.moscow.rt.ru> has joined #libre-soc19:40
*** ghostmansd[hexch is now known as ghostmansd19:40
*** ghostmansd[m] <ghostmansd[m]!~ghostmans@176.59.162.32> has quit IRC19:40
*** ghostmansd[m] <ghostmansd[m]!~ghostmans@broadband-109-173-83-100.ip.moscow.rt.ru> has joined #libre-soc19:42
ghostmansdlkcl, I just thought: perhaps if we had a way to construct path, we could perhaps establish hooks on components (kinda similar to xpath in lxml2).19:44
ghostmansdNot sure if this is needed, but perhaps could find some uses. Not that I'm suggesting to implement it. In fact, I have no idea how to handle node names in a good way.19:45
ghostmansdOr, rather, how to handle them at all.19:45
ghostmansdlkcl, a short TL;DR on paths. I don't see a better choice for handling paths. The thing is that approach where the path is property or field of nodes fails, cf. comment 106. If you see an option how to handle this -- I'll change the code.21:26
ghostmansdStill, if indices are permitted, why paths aren't?21:27
ghostmansdFor us "path" is just the name of the visitable, that's not a full path.21:27
ghostmansdThe actual concatenation is done via your idea (stack + pop). Not inside the walk.21:28
ghostmansdThe thing is that I need to move forward, and printing element path along with its value is perfect for debugging what entities lack the walk methods.21:29
lkclindices are a known-pattern for Visitors (cf what jacob said)23:34
lkclok let's stick with it for now, and think of something later.23:34

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