00:16
toshywoshy has quit [Ping timeout: 250 seconds]
00:17
toshywoshy has joined #amaranth-lang
00:18
Degi has quit [Ping timeout: 250 seconds]
00:18
Degi has joined #amaranth-lang
00:40
<
cr1901 >
Is there a way to use inner functions inside an FSM to introduce a set of parameterizable states to the FSM? When I try to do naively, like:
00:41
<
cr1901 >
I get: If is not permitted directly inside of FSM; it is permitted
00:41
<
cr1901 >
inside of FSM State
00:42
<
tpw_rules >
where is there an If in that example?
00:42
<
cr1901 >
I oversimplified
00:43
<
tpw_rules >
i can't see why that wouldn't work
00:43
<
tpw_rules >
it works with loops and the control flow in python is the same. you might have removed the problem in your oversimplification
00:45
<
cr1901 >
Ohhh, I see... nevermind, this is my fault. I called a closure instead of passing it into a function
00:45
<
tpw_rules >
i remember filing bugs about detection of those types of errors but i don't remember any of the details
00:45
<
tpw_rules >
not really sure what that means but good to know it's working
00:45
<
cr1901 >
the closure has an m.If() context, but no m.State() context
00:46
<
cr1901 >
So if I call the closure outside of an m.State() context manager, but
_inside_ an m.FSM() context manager, the function dies
00:46
<
tpw_rules >
well yes
00:46
<
tpw_rules >
that's what the error message is describing
00:46
<
cr1901 >
I wanted a "you added parentheses when you intended to pass a Callable"
00:47
<
cr1901 >
which typing is
_supposed_ to catch, but hey, I guess it's out to lunch
00:47
<
tpw_rules >
what typing
00:47
<
cr1901 >
"from typing import Union, Callable"
00:48
<
tpw_rules >
that doesn't do anything. you have to run an external typechecker or use IDE features or whatever
00:48
<
tpw_rules >
nothing in the language uses those objects
00:48
<
cr1901 >
Oh goodie...
00:49
<
tpw_rules >
mypy might be what you want. not really into type annotations myself though i prob should be...
01:09
<
_whitenotifier-9 >
[YoWASP/yosys] whitequark 03cda06 - Update dependencies.
02:20
cesar has joined #amaranth-lang
02:21
jfng[m] has joined #amaranth-lang
11:24
mindw0rk has quit [Read error: Connection reset by peer]
12:44
nyanotech has quit [Quit: No Ping reply in 180 seconds.]
12:45
nyanotech has joined #amaranth-lang
12:59
mindw0rk has joined #amaranth-lang
13:11
mindw0rk has quit [Ping timeout: 240 seconds]
15:24
balrog has quit [Quit: Bye]
15:27
balrog has joined #amaranth-lang
15:56
mindw0rk has joined #amaranth-lang
16:01
mindw0rk has quit [Ping timeout: 268 seconds]
16:01
mindw0rk has joined #amaranth-lang
16:06
mindw0rk has quit [Ping timeout: 240 seconds]
16:08
mindw0rk has joined #amaranth-lang
16:20
mindw0rk has quit [Ping timeout: 240 seconds]
16:27
mindw0rk has joined #amaranth-lang
16:32
mindw0rk has quit [Ping timeout: 265 seconds]
16:45
mindw0rk has joined #amaranth-lang
16:49
mindw0rk has quit [Ping timeout: 240 seconds]
16:53
mindw0rk has joined #amaranth-lang
19:42
<
_whitenotifier-9 >
[amaranth-lang/amaranth] psentee 0681cb7 - pyproject: relax pyvcd requirement to include 0.4.
19:43
<
_whitenotifier-9 >
[amaranth-lang/amaranth-lang.github.io] whitequark 86f5ab0 - Deploying to main from @ amaranth-lang/amaranth@0681cb77b16cb4ddab5da92e7b226d3511ac8476 🚀
21:50
GenTooMan has quit [Ping timeout: 250 seconds]
21:54
GenTooMan has joined #amaranth-lang