26 Jul 2024 |
| mr.martin changed their display name from mr.martin to mr.martin#0. | 13:55:26 |
| mr.martin changed their display name from mr.martin#0 to mr.martin. | 13:55:28 |
| mindw0rk joined the room. | 14:29:23 |
| @libera_jn:catircservices.org left the room. | 14:31:02 |
| @libera_jn:catircservices.org joined the room. | 15:21:51 |
| @libera_jn:catircservices.org left the room. | 15:21:52 |
| mickey_0001 joined the room. | 17:09:56 |
Rob Taylor | Catherine: i hacked up a patch last night to allow the use of Annotated[] in data.Flow members, for those users who wish to have full type checking available for their codebase. Would it be of interest if I finish that up properly, and would that require an RFC? Thanks!
e.g.
class Command(data.Struct):
class Kind(enum.Enum):
SET_ADDR = 0
SEND_DATA = 1
valid: Annotated[Value, unsigned(1)]
kind: Kind
#
params: Annotated[Value, data.UnionLayout({
"set_addr": data.StructLayout({
"addr": unsigned(32)
}),
"send_data": data.StructLayout({
"byte": unsigned(8)
})
})]
| 18:00:56 |
| frgo joined the room. | 19:09:53 |
Rob Taylor | a different option for these users would be a docs addition where to use @no_type_check, but I think that doesn't work with classes in mypy still (works with pyright>1.1.347 though) | 19:49:24 |
Rob Taylor | In reply to @rob_chipflow:matrix.org a different option for these users would be a docs addition where to use @no_type_check, but I think that doesn't work with classes in mypy still (works with pyright>1.1.347 though) oh no. pyright also doesnt honour @no_type_check on classes | 20:25:31 |
| stormwoodpecker changed their display name from stormwoodpecker to stormwoodpecker#0. | 22:05:15 |
| stormwoodpecker changed their display name from stormwoodpecker#0 to stormwoodpecker. | 22:05:16 |
| frgo left the room. | 22:18:23 |
| frgo joined the room. | 22:19:52 |
Catherine | In reply to @rob_chipflow:matrix.org
Catherine: i hacked up a patch last night to allow the use of Annotated[] in data.Flow members, for those users who wish to have full type checking available for their codebase. Would it be of interest if I finish that up properly, and would that require an RFC? Thanks!
e.g.
class Command(data.Struct):
class Kind(enum.Enum):
SET_ADDR = 0
SEND_DATA = 1
valid: Annotated[Value, unsigned(1)]
kind: Kind
#
params: Annotated[Value, data.UnionLayout({
"set_addr": data.StructLayout({
"addr": unsigned(32)
}),
"send_data": data.StructLayout({
"byte": unsigned(8)
})
})]
that would require an RFC and the RFC would have to comprehensively cover the use cases for typing rather than just address one papercut | 22:46:51 |
Rob Taylor | In reply to @whitequark:matrix.org that would require an RFC and the RFC would have to comprehensively cover the use cases for typing rather than just address one papercut hmm, its more about users actually being able to write code with a type checker enabled | 22:47:35 |
Rob Taylor | rather than typing for amaranth overall | 22:47:47 |
Rob Taylor | its only view/struct/union that breaks | 22:48:03 |
Rob Taylor | happy to write that up though | 22:48:09 |
Rob Taylor | currently even switching to basic doesnt work with pyright :( | 22:48:55 |
Rob Taylor | (i.e. the only solution i have right now is to # type ignore) | 22:50:17 |
Catherine | @rob_chipflow:matrix.org: please read all of https://github.com/amaranth-lang/rfcs/pull/11 first, as the reasons that RFC was closed would have to be addressed first | 23:06:19 |
Rob Taylor | In reply to @whitequark:matrix.org @rob_chipflow:matrix.org: please read all of https://github.com/amaranth-lang/rfcs/pull/11 first, as the reasons that RFC was closed would have to be addressed first will do! | 23:06:35 |
| @_discord_295736408688033792:catircservices.org left the room. | 23:09:07 |
Rob Taylor | Yep, think i can answer all that, went through PEP 649 and PEP 563 a few times yesterday (both accepted now) | 23:11:49 |
Rob Taylor | I'll see what I can pull together | 23:11:59 |
Catherine | oh, they are accepted? that's actually kind of disappointing | 23:21:05 |
Catherine | wait no 649 is fine | 23:21:58 |
Catherine | okay, I re-read 649, this is in fact a good way to implement them and should not have negative effects on us | 23:25:31 |