whitequark[cis] changed the topic of #amaranth-lang to: Amaranth hardware definition language · weekly meetings: Amaranth each Mon 1700 UTC, Amaranth SoC each Fri 1700 UTC · code https://github.com/amaranth-lang · logs https://libera.irclog.whitequark.org/amaranth-lang · Matrix #amaranth-lang:matrix.org
jn_ has joined #amaranth-lang
jn_ has joined #amaranth-lang
jn_ is now known as jn
<Wanda[cis]> the last line doesn't actually test anything, since no flip is happening there
<Wanda[cis]> also ... holy shit this is an actual gopher server?
mindw0rk has quit [Ping timeout: 264 seconds]
mindw0rk has joined #amaranth-lang
lf_ has quit [Ping timeout: 260 seconds]
lf has joined #amaranth-lang
<cr1901> Wanda[cis]: Yes, re: actual Gopher server
<cr1901> Wanda[cis]: I'm not sure what you mean when "a non-member would be nice too" then. If I change it to "self.g = Signature({"h": In(1)})", then a flip _should_ happen. 1/2
<cr1901> But you want a test case for a plain member to make sure "nothing _bad_ happens to it". Is a flip "bad" in this case :P?
<cr1901> Basically, I'm having a parse fail/bad day today :P
<Wanda[cis]> well, g is clearly a non-member of the signature
<Wanda[cis]> except the last line doesn't involve FlippedInterface at all, so it's not really testing anything
<Wanda[cis]> (you could test flipped(ifsub).g instead, which would be a valid test)
<Wanda[cis]> likewise, your test on "f" doesn't actually go through FlippedInterface __getattr__ logic, I'd instead check if ifsub.a.f is still a Signal and not a FlippedInterface or an error
<Wanda[cis]> basically: you need to ensure the tests you're writing actually involve the logic you're modifying
<Wanda[cis]> (the ones that use ifsub.signature also don't, since they test FlippedSignature logic instead)
<Wanda[cis]> yeah, that'd do it
<Wanda[cis]> a little redundant, but eh
<cr1901> More coverage :)
<cr1901> (I was reading something about 100% coverage and Goodhart's Law a few days ago)
<_whitenotifier-f> [amaranth] cr1901 commented on pull request #954: FlippedInterface should propagate flipped to subinterfaces. - https://github.com/amaranth-lang/amaranth/pull/954#issuecomment-1813648447
<_whitenotifier-f> [amaranth] wanda-phi reviewed pull request #954 commit - https://github.com/amaranth-lang/amaranth/pull/954#discussion_r1395100508
<_whitenotifier-f> [amaranth] wanda-phi commented on issue #934: Allow `isinstance()`/`issubclass()` to work between Interface and FlippedInterface - https://github.com/amaranth-lang/amaranth/issues/934#issuecomment-1813732999
Degi has quit [Ping timeout: 246 seconds]
Degi_ has joined #amaranth-lang
Degi_ is now known as Degi
<jer_emy[m]> does anyone use the SSH remote build functionality that appears to be in the build system? If so, do you have any examples of how to activate it (as opposed to a local build)
notgull has quit [Ping timeout: 246 seconds]
notgull has joined #amaranth-lang
eigenform has quit [Server closed connection]
eigenform has joined #amaranth-lang
omnitechnomancer has quit [Quit: Idle timeout reached: 172800s]
vegard_e[m] has quit [Quit: Idle timeout reached: 172800s]
ravenslofty[m] has quit [Quit: Idle timeout reached: 172800s]
bob_twinkles[m] has quit [Quit: Idle timeout reached: 172800s]
Ekho has quit [Server closed connection]
Ekho has joined #amaranth-lang
leptonix has quit [Server closed connection]
leptonix has joined #amaranth-lang
<whitequark[cis]> sure, I do
sorear has quit [Server closed connection]
sorear has joined #amaranth-lang
lf has quit [Quit: https://quassel-irc.org - Komfortabler Chat. Überall.]
urja has quit [Read error: Connection reset by peer]
urja has joined #amaranth-lang
indy has quit [Server closed connection]
indy has joined #amaranth-lang
jfng[m] has joined #amaranth-lang
<jfng[m]> what is the rationale behind using `sorted()` to iterate `SignatureMembers` ? determinism ?
<jfng[m]> i find preserving insertion order helpful to convey developer intent (e.g. i'd prefer `["data", "rdy", "ack"]` over `["ack", "data", "rdy"]`)
<galibert[m]> not all python versions preserve insertion order
<galibert[m]> Don't remember when that changed
<jfng[m]> jfng[m]: > <@jfng:matrix.org> what is the rationale behind using `sorted()` to iterate `SignatureMembers` ? determinism ?
<jfng[m]> > i find preserving insertion order helpful to convey developer intent (e.g. i'd prefer `["data", "rdy", "ack"]` over `["ack", "data", "rdy"]`)
<galibert[m]> Ok, it started in 3.7
<jfng[m]> yes for CPython at least, but otherwise, one could use `collections.OrderedDict` ?
<galibert[m]> Nah, it's de-facto in 3.6, de-jure en 3.7
<galibert[m]> There are some subtle differences left, but the guarantee is for both now
<jfng[m]> also, it seems that `OrderedDict` comparisons are order-sensitive, which may not be desirable
zyp[m] has joined #amaranth-lang
<zyp[m]> I would guess that the need for sorting is partially for comparison between interfaces that are compatible but defined in different orders
electronic_eel has quit [Server closed connection]
electronic_eel has joined #amaranth-lang
trabucayre has quit [Server closed connection]
trabucayre has joined #amaranth-lang
<whitequark[cis]> <zyp[m]> "I would guess that the need..." <- yes
<jfng[m]> in this case, could the sorting be done in `__eq__()` ?