<byteit101>
I have two questions: 1) is it possible to change state machine states from outside of a state machine, and 2) Is it possible to wire up a reset signal in a submodule to a different signal?
<whitequark>
1) do you mean outside of `with m.FSM():`?
<whitequark>
right now you can only add an intermediate signal and wait on it in the other FSM
<whitequark>
or otherwise react to it
<byteit101>
Ah, ok
ydnatag has joined #amaranth-lang
<byteit101>
side note: I've created a "literal" pre-processor for test benches and elaborations yesterday. ie: transforming python `if foo:` to `with m.If(foo):` and so forth. Is that a sort of thing that would be helpful to others?
<whitequark>
it's something that Amaranth is actively avoiding
<whitequark>
it's easy to make such a preprocessor; what is hard is making an antiquotation mechanism to enable metaprogramming with it
<byteit101>
fair enough, but this is so much more readable!
<whitequark>
what is "readable"?
<byteit101>
if's look like an if
<whitequark>
I find that having to backtrack to see if an if means one thing or a completely different one makes it hard to read code!
<whitequark>
for the same reasons Amaranth doesn't override <=
<byteit101>
for heavily metaprogrammed things I could see that
<whitequark>
ultimately I think there is a lot of value in simplicity and keeping the heavily metaprogrammed things the same, fundamentally, as the most basic ones
<whitequark>
otherwise you end up with people unable to understand the former, if they didn't write it
<whitequark>
this is actually an argument against what you're suggesting even if it would have antiquotation
<whitequark>
though the lack of antiquotation makes it essentially a non-starter
<byteit101>
Don't most metaprogramming/macro systems have the same syntax in both places, C/C++ being a notable exception?
<whitequark>
if you consider templates C++'s metaprogramming system then it counts as well
<cr1901>
What is antiquotation?
<whitequark>
cr1901: do you know what quasiquotation is?
<whitequark>
byteit101: anyway, Amaranth isn't a macro system, it's a language embedded in another language
<cr1901>
whitequark: I've heard of it from Scheme, but I don't quite understand it.
<whitequark>
oh, actually, Python has quasiquotation for strings now
<whitequark>
f" is quasiquote, { is antiquote
<whitequark>
i.e. an antiquote undoes the quasiquote
<whitequark>
and lets you insert code into what is otherwise data
<cr1901>
aaaaaaah
<cr1901>
interesting :o
<whitequark>
you could imagine with amaranth: being a quasiquote, and (something else) being an antiquote, in the same way
<whitequark>
except there's no (something else) that would work
<whitequark>
or at least, I never found a satisfying option
<cr1901>
Btw, what is the character after "imagine"? My client's rendering it as... well garbage, and I assume "Unicode unknown char" is not intended to be amaranth's quasiquote :D
ydnatag has quit [Quit: Connection closed for inactivity]
<byteit101>
What's the default case? m.Case() with no args?
<whitequark>
m.Default() is strongly preferred
<byteit101>
Ah excellent
Guest7578 has joined #amaranth-lang
<d1b2>
<20goto10> Are there any particular areas that contributors can help with the documentation?
Guest7578 has quit [Client Quit]
<whitequark>
not at the moment, I think
Guest7535688999 has joined #amaranth-lang
Guest7535688999 has quit [Client Quit]
<byteit101>
I would have said FSM and switch/case/default, as those aren't documented in the official documentation at all
<whitequark>
yeah. the thing is that i have a specific way in which i want the documentation to be written
<whitequark>
this wouldn't normally be a problem but i've also had a chronic pain condition that left me essentially unable to work for three years or so (closer to five realistically)
<whitequark>
and communicating exactly what i want to see in the documentation (or code for that matter) is often more work than doing it yourself, which i already can't do