Catherine[m] changed the topic of #amaranth-lang to: Amaranth hardware definition language · weekly meetings on Mondays at 1700 UTC · code https://github.com/amaranth-lang · logs https://libera.irclog.whitequark.org/amaranth-lang · Matrix #amaranth-lang:matrix.org
Degi_ has joined #amaranth-lang
Degi has quit [Ping timeout: 250 seconds]
Degi_ is now known as Degi
crzwdjk has joined #amaranth-lang
Degi has quit [Ping timeout: 250 seconds]
Degi has joined #amaranth-lang
nak has joined #amaranth-lang
Guest40 has joined #amaranth-lang
Guest40 has quit [Client Quit]
alanvek[m] has joined #amaranth-lang
pbsds[m]1 has joined #amaranth-lang
GenTooMan has quit [Ping timeout: 272 seconds]
GenTooMan has joined #amaranth-lang
GenTooMan has quit [Ping timeout: 264 seconds]
GenTooMan has joined #amaranth-lang
<d1b2> <chuckmcm> Random data byte, I'm going through the Amaranth startup/tutorial and noting things which may or may not be bugs. I'll note them here to keep a record.
<d1b2> <chuckmcm> Environment: Linux. I've got two systems do evaluation, one is on 18.04, the other on 22.04. Both are using icebreaker's as their eventual target hardware.
<d1b2> <chuckmcm> Starting with the the 18.04 system, I downloaded the did the configure/make/make-install for python 3.11.4 targets with exec-prefix=$HOME/.local/ and prefix=$HOME/.local/ doing it this way requires no sudo privledges and avoids a clash with system python.
<d1b2> <chuckmcm> I added sqlite3 just because. I don't believe it was required.
<whitequark[cis]> is the system python too old on 18.04?
<d1b2> <chuckmcm> I added an alias to bash_aliases to map python=>python3
<d1b2> <chuckmcm> system python is 3.6.9 (for v3) python => python 2.7.17
<d1b2> <chuckmcm> Created a virtual python environment and installed latest amaranth-lang into it.
<d1b2> <chuckmcm> Created counter.py from the tutorial (definition of UpCounter), created counter-sim.py for simulation
<d1b2> <chuckmcm> Initially simulation failed because the example code doesn't import the definition of UpCounter. Added line from counter.py import UpCounter to fix that error.
<d1b2> <chuckmcm> Initial simulation run fails with return _compile(pattern, flags).search(string) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: expected string or bytes-like object, got 'NoneType'
<whitequark[cis]> that's... interesting
<d1b2> <chuckmcm> The failure appears to trigger in part because of this regular expression? File "/freenas/home/cmcmanis/arm-experiments/projects/amaranth/quarterhorse/lib/python3.11/site-packages/amaranth/sim/pysim.py", line 94, in __init__ if re.search(r"[ \t\r\n]", var_name): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
<whitequark[cis]> oh
<whitequark[cis]> you need to install a git revision of amaranth
<d1b2> <chuckmcm> Is it a branch? cmcmanis@quarterhorse:amaranth$ git status On branch main Your branch is up to date with 'origin/main'. nothing to commit, working tree clean cmcmanis@quarterhorse:amaranth$
<d1b2> <chuckmcm> Checked and did a git pull to fast-forward to current, changes to data.py and test_lib_data.py (and readme)
<whitequark[cis]> oh, then that seems like a new issue
<whitequark[cis]> could you make short reproducer example please and post it on the issue tracker?
<d1b2> <chuckmcm> Sure. It is literally the code from the start of the tutorial, will post it there.
<whitequark[cis]> full text of the error would be welcome as well
<d1b2> <chuckmcm> will add both of course.
<whitequark[cis]> we test all of the examples against Python 3.11 so I'm not sure what's going on here
<_whitenotifier-6> [amaranth] ChuckM opened issue #844: Building tutorial code fails with type error - https://github.com/amaranth-lang/amaranth/issues/844
<d1b2> <chuckmcm> Note cockpit error here is possible that I'm missing something "silly" but don't worry about telling me I'm clueless, I'm all about the learning new things.
<whitequark[cis]> so... your code succeeds for me
<whitequark[cis]> ah, I wasn't using 3.11; let me fix that
<whitequark[cis]> uh. I think I can't install 3.11 locally due to Debian being Debian
<d1b2> <chuckmcm> Always annoying right?! This is why I went the whole configure/make/make install into my local exec path.
<whitequark[cis]> lemme just do some crimes...
<d1b2> <chuckmcm> I'll do my next walk and be back in a bit.
<Wanda[cis]> works here on 3.11.3
<Wanda[cis]> but... this looks like a failure in the tracer code, right?
<Wanda[cis]> which we fixed a while ago
<whitequark[cis]> yeah
<whitequark[cis]> I'm confused
<Wanda[cis]> hmmm
<whitequark[cis]> that's why I suggested using the git release
<Wanda[cis]> non-editable outdated install?
<Wanda[cis]> whoa since when do individual Python versions get logos
<whitequark[cis]> huh?
<Wanda[cis]> ... since 3.10 apparently
<whitequark[cis]> fantastic
<Wanda[cis]> we just compiled a 3.11.4, also works correctly
<whitequark[cis]> yeah I got Python 3.11 to work here, works fine
<Wanda[cis]> Chuck: we'd bet on an outdated install stuck in the virtualenv somehow; try installing the amaranth repo checkout inside the venv again? (with something like `pip install --editable <path to repo>`)
<d1b2> <vipqualitypost> those python version logos are neat
jjsuperpower has joined #amaranth-lang
<d1b2> <chuckmcm> So would running python setup.py install from the root of the git tree after a pull/fast-forward of current count as a re-install?
<whitequark[cis]> yes, though i would suggest using pip install [--editable] . instead, setup.py is deprecated
<d1b2> <chuckmcm> well that was less than helpful
<whitequark[cis]> your python install is missing ctypes
<Wanda[cis]> (you probably need to instal libffi-dev from apt and reconfigure/recompile Python)
<Wanda[cis]> s/instal/install/, s//`/, s//`/
<Wanda[cis]> lol the fancy formatting... really doesn't fare well through the double bridge
<whitequark[cis]> we'll have a less cursed bridge setup soon
<_whitenotifier-6> [amaranth] ChuckM commented on issue #844: Building tutorial code fails with type error - https://github.com/amaranth-lang/amaranth/issues/844#issuecomment-1644800136
<_whitenotifier-6> [amaranth] ChuckM closed issue #844: Building tutorial code fails with type error - https://github.com/amaranth-lang/amaranth/issues/844
<d1b2> <chuckmcm> Okay, loop closed. Issue updated
<d1b2> <chuckmcm> Continuing on the journey ...