<vup>
I am currently trying to write a layer that builds on top of nmigen and adds some (useful for me) features. For that I wanted to create a wrapper around `Module`. This is however impossible because the `__init_subclass__` raises. Is inheriting from `Module` just never supported? (I can of course just patching out `__init_subclass__` from `Module`, but that feel very dirty)
_whitelogger has joined #nmigen
cesar has joined #nmigen
cesar has quit [Ping timeout: 272 seconds]
_whitelogger has joined #nmigen
<whitequark>
inheriting from nmigen classes (with a few exceptions) is intentionally not supported
<whitequark>
if you do that, your code *will* break
<whitequark>
instead, wrap them.
<whitequark>
you don't need inheritance to wrap something, you can proxy calls
<whitequark>
this inverts the relationship between our codebases and allows us to change the interface and implementation without breakage
<vup>
hmm well I mean if I just proxy using getattr it doesn't really help, but I understand
<vup>
I guess I will probably need a "proper" wrapper at some point anyways
cesar has joined #nmigen
_whitelogger has joined #nmigen
cd has quit [Quit: leaving]
cd1 has joined #nmigen
cd1 is now known as cd
_whitelogger has joined #nmigen
Degi_ has joined #nmigen
Degi has quit [Ping timeout: 252 seconds]
Degi_ is now known as Degi
_whitelogger has joined #nmigen
cesar has quit [Read error: Connection reset by peer]
lkcl has quit [Ping timeout: 264 seconds]
lkcl has joined #nmigen
nak has quit [Ping timeout: 272 seconds]
cesar has joined #nmigen
cesar has quit [Remote host closed the connection]
cesar has joined #nmigen
nak has joined #nmigen
_whitelogger has joined #nmigen
bob_twinkles has quit [*.net *.split]
DX-MON has quit [*.net *.split]
cr1901 has quit [*.net *.split]
peepsalot has quit [*.net *.split]
chiastre has quit [*.net *.split]
trabucayre has quit [*.net *.split]
agg has quit [*.net *.split]
electronic_eel has quit [*.net *.split]
sorear has quit [*.net *.split]
V has quit [*.net *.split]
Stary has quit [*.net *.split]
sen has quit [*.net *.split]
nyanotech has quit [*.net *.split]
Lofty has quit [*.net *.split]
cesar has quit [Ping timeout: 265 seconds]
cr1901 has joined #nmigen
Lofty has joined #nmigen
nyanotech has joined #nmigen
agg has joined #nmigen
electronic_eel has joined #nmigen
trabucayre has joined #nmigen
DX-MON has joined #nmigen
V has joined #nmigen
peepsalot has joined #nmigen
sen has joined #nmigen
bob_twinkles has joined #nmigen
chiastre has joined #nmigen
sorear has joined #nmigen
Stary has joined #nmigen
bob_twinkles has quit [*.net *.split]
DX-MON has quit [*.net *.split]
cr1901 has quit [*.net *.split]
peepsalot has quit [*.net *.split]
chiastre has quit [*.net *.split]
trabucayre has quit [*.net *.split]
agg has quit [*.net *.split]
V has quit [*.net *.split]
electronic_eel has quit [*.net *.split]
sorear has quit [*.net *.split]
sen has quit [*.net *.split]
Stary has quit [*.net *.split]
Lofty has quit [*.net *.split]
nyanotech has quit [*.net *.split]
cr1901 has joined #nmigen
bob_twinkles has joined #nmigen
sen has joined #nmigen
nyanotech has joined #nmigen
DX-MON has joined #nmigen
trabucayre has joined #nmigen
Lofty has joined #nmigen
V has joined #nmigen
chiastre has joined #nmigen
agg has joined #nmigen
peepsalot has joined #nmigen
Stary has joined #nmigen
sorear has joined #nmigen
electronic_eel has joined #nmigen
<lkcl>
whitequark: you saw, i am considering doing a (very limited) subset of the nmigen API sufficient to auto-generate c code? (Liskov Substitution Principle)
<lkcl>
we have a massive (proven) body of work - the Power ISA decoder - which is needed elsewhere and i'm certainly not rewriting / duplicating it
<lkcl>
easiest way: a drop-in API-compatible alternative that outputs c
<lkcl>
the other option would, instead of a total ground-up replacement, would be to (carefully) implement the AST node-walker functions (the ones that output rtlil) with versions that output c, instead
cesar has joined #nmigen
<lkcl>
although, like you pointed out above, i'm wary of doing that because it effectively treads on the internal options available to you (i.e. may have implied "support")
* lkcl
still pondering on that one
<whitequark>
lkcl: the nmigen language (the stuff currently described on https://nmigen.info/nmigen/latest/lang.html and the stuff not yet described there) is a part of public API and you're free to reimplement it
<whitequark>
there's an aspect where implementations may diverge
<whitequark>
so long as this is your *private* implementation that aspect is unimportant
<whitequark>
if you're going to publish it and advertise it as something nmigen-compatible it becomes important
<whitequark>
so it's best to coordinate if you have that in your plans
_whitelogger has joined #nmigen
lleo has joined #nmigen
aquijoule_ has quit [Remote host closed the connection]
_whitelogger has joined #nmigen
<lkcl>
whitequark, everything we do is public, never private
<lkcl>
oh: nlnet RFP? :)
<whitequark>
lkcl: RFP sent and money received
<lkcl>
(on the c-generator, we're looking at maybe 8-10 months out, btw)
<lkcl>
fantastic
<zignig_>
lkcl: fyi gmt +8 .wa.au.
<whitequark>
lkcl: regarding the c-generator, there is a difference between having code in public and actively promoting it
* zignig_
waves to whitequark.
<whitequark>
basically, the difference between "here's what we use for task X" and "here's what you should use for task X"
<whitequark>
former? reimplement any of our APIs as much as you want no problem
<whitequark>
latter? coordination is ideal
<lkcl>
whitequark: ah yeah, got it. well, the idea is, it'll auto-generate code that ends up in the linux kernel
<lkcl>
(for emulation of instructions that would be insane to put in hardware, even with nmigen)
<lkcl>
OpenPOWER is mmmmental. NINE hundred and fifty instructions expected of a "RISC" system!
<whitequark>
lkcl: as long as the use of the nmigen API itself stays roughly within your project, we're completely unconcerned with exactly what you're doing there, and, since you're implementing a public API, you're covered by our stability/evolution guarantees
<whitequark>
so go aheda
<whitequark>
if all you need is generate that code for linux? sure, no problem at all
<lkcl>
appreciated.
<whitequark>
since it will not affect language evolution in any way
<whitequark>
and that's our main concern
<lkcl>
however... the openpower-isa project is now independent, and the other idea (which has been picked up by someone with Formal Mathematical Proof expertise)
<lkcl>
is to also add a translator that auto-generates Sail proofs
Lord_Nightmare2 is now known as Lord_Nightmare
bvernoux has joined #nmigen
bvernoux has quit [Remote host closed the connection]
bvernoux1 has joined #nmigen
bvernoux1 has quit [Remote host closed the connection]
bvernoux has joined #nmigen
bvernoux has quit [Client Quit]
nak has quit [Read error: Connection reset by peer]
nak_ has joined #nmigen
nak_ is now known as nak
Ekho has joined #nmigen
lleo has left #nmigen [Leaving]
Lord_Nightmare has quit [Remote host closed the connection]