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
jjsuperpower has joined #amaranth-lang
dyniec has quit [Quit: WeeChat 4.0.2]
lf has quit [Ping timeout: 245 seconds]
lf has joined #amaranth-lang
jjsuperpower has quit [Ping timeout: 255 seconds]
Degi_ has joined #amaranth-lang
Degi has quit [Ping timeout: 246 seconds]
Degi_ is now known as Degi
Charles34 has joined #amaranth-lang
Charles34 has quit [Quit: Quit]
SpaceCoaster_ has joined #amaranth-lang
SpaceCoaster has quit [Ping timeout: 255 seconds]
SpaceCoaster_ is now known as SpaceCoaster
skipwich has quit [Quit: DISCONNECT]
skipwich has joined #amaranth-lang
Wanda[cis] has quit [Quit: Idle timeout reached: 172800s]
muddassir_ali_71 has joined #amaranth-lang
<muddassir_ali_71> Can anybody tell me how I can mask my memory by bytes (means i want to read and write by bytes)
<muddassir_ali_71> Hello everyone
<muddassir_ali_71> My memory is actually a word addressable
galibert[m] has joined #amaranth-lang
<galibert[m]> You define the granularity when you create the write port
adamgreig[m] has quit [Quit: Idle timeout reached: 172800s]
nelgau_ has quit [Read error: Connection reset by peer]
nelgau has joined #amaranth-lang
nelgau has quit [Read error: Connection reset by peer]
nelgau has joined #amaranth-lang
<whitequark[cis]> good evening everyone, it is time for our weekly meeting
<whitequark[cis]> we have one item on the agenda today, RFC #27: Allow overriding Value operators https://github.com/zyp/amaranth-rfcs/blob/override-value-operators/text/0028-override-value-operators.md#allow-overriding-value-operators
<whitequark[cis]> let's take a roll call first. who's attending today?
* cr1901 raises hand
zyp[m] has joined #amaranth-lang
<zyp[m]> o/
Chips4MakersakaS has joined #amaranth-lang
<Chips4MakersakaS> o/
jfng[m] has joined #amaranth-lang
<jfng[m]> o/
<Chips4MakersakaS> Catherine: you linked to RFC #28, not RFC #27.
<zyp[m]> #28 is correct
<whitequark[cis]> s/27/28/
<whitequark[cis]> yeah, sorry; typo
<Chips4MakersakaS> +!
<Chips4MakersakaS> +1
<whitequark[cis]> sorry, what do you mean by that?
<Chips4MakersakaS> Just acknowledged that I saw the correction...
<whitequark[cis]> does anyone attending have any comments on the RFC text?
<cr1901> I like everything about this RFC as-is and don't think it makes sense to make Value an ancestor of ValueCastable as an alternative. Not too keen on adding an req() method in the future, but this is a visceral reaction.
<whitequark[cis]> Value would not ever be an ancestor of ValueCastable
<whitequark[cis]> a common ancestor is not entirely off the table but unlikely
<cr1901> Well that's what the alternatives say. s/ancestor/common ancestor/ if you want
<cr1901> Alternative seems like a lot of work for little gain just to make it play nice w/ Python's default behavior
<whitequark[cis]> these are two very different options
<whitequark[cis]> having Value an ancestor of ValueCastable would completely break the point of ValueCastable
<whitequark[cis]> having a common ancestor (empty class that does nothing) merely goes against our policy for interface classes
<Chips4MakersakaS> LGTM
<whitequark[cis]> jfng?
<jfng[m]> what operations are covered by this RFC ? does it include all binary operations with reflected operands ?
<zyp[m]> yes
<cr1901> >Extra logic required around every Value operator. <-- Not that I am particularly worried, but will checking for the existence of reflected ops matter perf-wise for large amaranth designs?
<whitequark[cis]> probably not; you don't spend that much time calling arithmetic ops
<whitequark[cis]> it's mostly some of the quadratic algorithms in the backend slowing us down
<whitequark[cis]> any more questions or comments?
<jfng[m]> is this also relevant for comparisons (e.g. `__lt__`) ?
<zyp[m]> yes
<cr1901> Presumably this is the end of the meeting?
<whitequark[cis]> we should still vote
<whitequark[cis]> if there are no further comments, please respond with your proposed disposition: close or merge
<jfng[m]> merge
<whitequark[cis]> my vote is merge
<whitequark[cis]> cr1901 Chips4Makers (aka Staf Verhaegen)
<Chips4MakersakaS> merge
<galibert[m]> What happens if you binout between two ValueCastable?
<galibert[m]> s/binout/binop/
<galibert[m]> (sorry, didn't think about the impact of the dst change yesterday, was out shopping)
<zyp[m]> this RFC only applies to Value
<whitequark[cis]> I think that depends on whether they have the same ancestor or not, right? zyp
<zyp[m]> I mean, the added checks in this RFC happens in Value
<galibert[m]> So you can't use it for the typing checks between two enums?
<galibert[m]> you can't add two fixed point, etc?
<zyp[m]> you can, but you don't need this RFC to do so
<zyp[m]> this is particularly about Value and ValueCastable interop
<galibert[m]> Ah, to pick up the missing left-association?
<cr1901> merge
<zyp[m]> interop between different value-castables would be handled by the operators checking if they understand the other type and returning NotImplemented if not
<galibert[m]> Ok, I don't see the complete picture, but whatever
<galibert[m]> Or does that mean there is no binop possible between two ValueCastable or even a ValueCastable and a Value in the first place? as_value() is used only on .eq of Signal and friends?
<zyp[m]> binops with Value and ValueCastable does .as_value() by default
<zyp[m]> and IIRC ValueCastable has no operators by default
<whitequark[cis]> yes
<galibert[m]> Ok, so imagine you want to implement a one-hot enum which refuses that you add to it. It can intercept Value and ValueCastable on the right through operator overloading, and Value to the left with the new rfc. But not ValueCastable to the left, right?
<zyp[m]> that would depend on how the operator is implemented in the other ValueCastable, yes
<zyp[m]> if it's not implemented or returns NotImplemented for that particular other, python would defer to the reflected op
<galibert[m]> Ahm, so you need to hope it delegates and does not call as_value() itself then
<galibert[m]> s/Ahm/Ah/, s/as_value/as\_value/
<zyp[m]> correct
<galibert[m]> Something to put in the docs somewhere, good manners for interop
<zyp[m]> as I see it, there's no general solution to your problem, because you don't know which of the two value castables should have the higher priority
<zyp[m]> unlike Value vs ValueCastable, where it's reasonable to expect the latter knows better if it implements the operator at all
Wanda[cis] has joined #amaranth-lang
<Wanda[cis]> galibert[m]: for `ValueCastable` on `ValueCastable`, this simply follows normal Python operator rules, which are covered by Python documentation
<galibert[m]> Wanda: in normal python you don't often have to interop in the numerical operators space between different libraries, while ValueCastables are going to be everywhere
<whitequark[cis]> I don't know that they're going to be so common in third party libraries
<whitequark[cis]> ValueCastable is still an advanced feature that provides language extensibility; its overuse is bound to cause problems, and generally you'd want most to come from amaranth.lib
<whitequark[cis]> fairly few people write new Python numerics either, for similar reasons
<galibert[m]> they all use numpy :-)
<whitequark[cis]> in any case, galibert, your disposition: merge or close? the meeting ran out of time
<galibert[m]> merge
<galibert[m]> perfect is the enemy of good
<whitequark[cis]> thanks! RFC #28 will be merged.
<whitequark[cis]> a doc improvement doesn't depend on the RFC process anyway
<galibert[m]> For sure
<_whitenotifier> [rfcs] whitequark commented on pull request #28: Add RFC to allow overriding Value operators - https://github.com/amaranth-lang/rfcs/pull/28#issuecomment-1785773563
<_whitenotifier> [rfcs] whitequark reviewed pull request #28 commit - https://github.com/amaranth-lang/rfcs/pull/28#discussion_r1376623517
<_whitenotifier> [rfcs] whitequark closed pull request #28: Add RFC to allow overriding Value operators - https://github.com/amaranth-lang/rfcs/pull/28
<_whitenotifier> [amaranth-lang/rfcs] whitequark pushed 2 commits to main [+2/-0/±0] https://github.com/amaranth-lang/rfcs/compare/4fbed5faf416...278305234a72
<_whitenotifier> [amaranth-lang/rfcs] zyp 80e9f22 - Add RFC to allow overriding Value operators.
<_whitenotifier> [amaranth-lang/rfcs] whitequark 2783052 - Add RFC to allow overriding Value operators (#28)
<_whitenotifier> [amaranth-lang/amaranth-lang.github.io] whitequark pushed 1 commit to main [+1/-0/±21] https://github.com/amaranth-lang/amaranth-lang.github.io/compare/e2c04e44f579...20617d1b3247
<_whitenotifier> [amaranth-lang/amaranth-lang.github.io] whitequark 20617d1 - Deploying to main from @ amaranth-lang/rfcs@278305234a72ca1afde92c1ad7ed8c999fe42368 🚀
<_whitenotifier> [amaranth-lang/rfcs] whitequark pushed 1 commit to main [+1/-0/±0] https://github.com/amaranth-lang/rfcs/compare/278305234a72...a3edeebfa490
<_whitenotifier> [amaranth-lang/rfcs] whitequark a3edeeb - Merge RFC #28: Add RFC to allow overriding Value operators
<Wanda[cis]> nice, that unblocks some things
<_whitenotifier> [amaranth] whitequark reviewed pull request #929 commit - https://github.com/amaranth-lang/amaranth/pull/929#discussion_r1376686126
<_whitenotifier> [amaranth] whitequark reviewed pull request #929 commit - https://github.com/amaranth-lang/amaranth/pull/929#discussion_r1376686028
<_whitenotifier> [amaranth] whitequark reviewed pull request #929 commit - https://github.com/amaranth-lang/amaranth/pull/929#discussion_r1376685644
<_whitenotifier> [amaranth] zyp reviewed pull request #929 commit - https://github.com/amaranth-lang/amaranth/pull/929#discussion_r1376714313
<_whitenotifier> [amaranth] whitequark reviewed pull request #929 commit - https://github.com/amaranth-lang/amaranth/pull/929#discussion_r1376716626
<_whitenotifier> [amaranth] whitequark commented on pull request #929: ast: allow overriding Value operators. - https://github.com/amaranth-lang/amaranth/pull/929#issuecomment-1785947080
<whitequark[cis]> one extremely cursed possibility that lets us not have .req is to have .eq(reflected=True)
<whitequark[cis]> you can query a method for which kwargs it accepts
<whitequark[cis]> this is basically overloading by method arguments but in Python (I did say it's extremely cursed didn't I?)
<whitequark[cis]> so: Value.eq(a, b) calls type(b).eq(b, a, reflected=True) if... actually, I have a slightly less ugly idea
<zyp[m]> that sounds like a lot of pain to save a name
<whitequark[cis]> well
<whitequark[cis]> people seem to really hate the name req
<whitequark[cis]> so if we ever face a situation where we have to add it, that's an option if we reach an impasse over the naming
<galibert[m]> eq_r ?
<zyp[m]> could call it reflected_eq and it'll never collide with anything
<galibert[m]> (I don’t personally care about the naming)
<whitequark[cis]> I'm partial to reflected_eq or eq_reflected
<zyp[m]> for a moment I was wondering what I did to suddenly break all the tests…
<_whitenotifier> [amaranth] github-merge-queue[bot] created branch gh-readonly-queue/main/pr-929-1c3227d95626f9c7bd11c82da9d2f760113a4589 - https://github.com/amaranth-lang/amaranth
<_whitenotifier> [amaranth-lang/amaranth] github-merge-queue[bot] pushed 1 commit to main [+0/-0/±3] https://github.com/amaranth-lang/amaranth/compare/1c3227d95626...879601380d1f
<_whitenotifier> [amaranth-lang/amaranth] zyp 8796013 - ast: allow overriding Value operators.
<_whitenotifier> [amaranth] github-merge-queue[bot] deleted branch gh-readonly-queue/main/pr-929-1c3227d95626f9c7bd11c82da9d2f760113a4589 - https://github.com/amaranth-lang/amaranth
<_whitenotifier> [amaranth] whitequark closed pull request #929: ast: allow overriding Value operators. - https://github.com/amaranth-lang/amaranth/pull/929
<_whitenotifier> [amaranth] whitequark opened pull request #948: CI: adjust the `required` job to never be skipped - https://github.com/amaranth-lang/amaranth/pull/948
<whitequark[cis]> zyp: fantastic!! what's the plan next, fixed point numbers?
vegard_e[m] has joined #amaranth-lang
<vegard_e[m]> either that or async/await simulator interface
<_whitenotifier> [amaranth] codecov[bot] commented on pull request #948: CI: adjust the `required` job to never be skipped - https://github.com/amaranth-lang/amaranth/pull/948#issuecomment-1785981154
<zyp[m]> or what I actually should do next is probably get more of my migen code ported over to amaranth…
<_whitenotifier> [amaranth] github-merge-queue[bot] created branch gh-readonly-queue/main/pr-948-879601380d1f484729f440996ab6fe346f639079 - https://github.com/amaranth-lang/amaranth
<_whitenotifier> [amaranth-lang/amaranth] github-merge-queue[bot] pushed 1 commit to main [+0/-0/±1] https://github.com/amaranth-lang/amaranth/compare/879601380d1f...e55dec9615ad
<_whitenotifier> [amaranth-lang/amaranth] whitequark e55dec9 - CI: adjust the `required` job to never be skipped.
<_whitenotifier> [amaranth] whitequark closed pull request #948: CI: adjust the `required` job to never be skipped - https://github.com/amaranth-lang/amaranth/pull/948
<_whitenotifier> [amaranth] github-merge-queue[bot] deleted branch gh-readonly-queue/main/pr-948-879601380d1f484729f440996ab6fe346f639079 - https://github.com/amaranth-lang/amaranth
<_whitenotifier> [amaranth-lang/amaranth-lang.github.io] whitequark pushed 1 commit to main [+0/-0/±36] https://github.com/amaranth-lang/amaranth-lang.github.io/compare/20617d1b3247...612024a5a29a
<_whitenotifier> [amaranth-lang/amaranth-lang.github.io] github-merge-queue[bot] 612024a - Deploying to main from @ amaranth-lang/amaranth@e55dec9615adfaf6558738930889c74713a3f109 🚀
mindw0rk has quit [Ping timeout: 240 seconds]
mindw0rk has joined #amaranth-lang
nelgau has quit [Ping timeout: 240 seconds]
<cr1901> I like the reflected decorator approach
RobTaylor[m] has joined #amaranth-lang
<RobTaylor[m]> <whitequark[cis]> "people seem to really hate the..." <- I am understand that, seems like something to do with requirements 😂
cyrozap_ has joined #amaranth-lang
esden_ has joined #amaranth-lang
benreynwar_ has joined #amaranth-lang
benreynwar has quit [Ping timeout: 264 seconds]
esden has quit [Ping timeout: 264 seconds]
urja has quit [Ping timeout: 264 seconds]
cyrozap has quit [Ping timeout: 264 seconds]
yuriks has quit [Ping timeout: 264 seconds]
esden_ is now known as esden
benreynwar_ is now known as benreynwar
urja has joined #amaranth-lang
yuriks has joined #amaranth-lang
peepsalot has quit [Quit: Connection reset by peep]
peepsalot has joined #amaranth-lang