<cr1901_modern>
Not sure how to pass *args to Resource.family() without doing the exact same check for name and number that Resource.family is _already_ doing
<cr1901_modern>
And checked w/ my own demo (synthesis and programming)
_whitelogger has joined #m-labs
_whitelogger has joined #m-labs
rohitksingh_work has joined #m-labs
<_whitenotifier-3>
[nmigen] whitequark commented on issue #143: Support silkscreen references (and other information) in platform definitions - https://git.io/fjPIT
<_whitenotifier-3>
[m-labs/nmigen] whitequark pushed 3 commits to master [+0/-0/±6] https://git.io/fjPII
kmehall has quit [Remote host closed the connection]
kmehall has joined #m-labs
<_whitenotifier-3>
[nmigen] programmerjake opened issue #144: allow multiple processes to run at same simulated time - https://git.io/fjPIX
<_whitenotifier-3>
[nmigen] whitequark commented on issue #144: allow multiple processes to run at same simulated time - https://git.io/fjPID
jcreedon has quit [Quit: Ping timeout (120 seconds)]
jcreedon has joined #m-labs
<_whitenotifier-3>
[nmigen-boards] cr1901 synchronize pull request #20: dev.spi: Update SPIResources to accept a name and direction. - https://git.io/fji4p
<cr1901_modern>
whitequark: What you suggested results in a syntax error
<cr1901_modern>
My guess is you can't start a function with a var number of positional arguments
<cr1901_modern>
but I indeed tried that
<whitequark>
cr1901_modern: I actually checked it before suggesting and it does not
<whitequark>
well
<whitequark>
you remove the second *
<whitequark>
are you sure you haven't misread my comment?
<cr1901_modern>
misread comment
<_whitenotifier-3>
[nmigen-boards] cr1901 synchronize pull request #20: dev.spi: Update SPIResources to accept a name and direction. - https://git.io/fji4p
<_whitenotifier-3>
[m-labs/nmigen-boards] whitequark pushed 1 commit to master [+0/-0/±1] https://git.io/fjPtc
<_whitenotifier-3>
[m-labs/nmigen-boards] cr1901 11971f1 - dev.spi: Update SPIResources to accept a name and direction.
<_whitenotifier-3>
[nmigen-boards] whitequark closed pull request #20: dev.spi: Update SPIResources to accept a name and direction. - https://git.io/fji4p
proteusguy has quit [Remote host closed the connection]
jcreedon has quit [Read error: Connection reset by peer]
<_whitenotifier-3>
[nmigen] programmerjake commented on issue #141: tracer.get_var_name returns None instead of default on pypy3 - https://git.io/fjPqF
<sb0>
hmm, looks like crap. you get stupid messages like "this package may be automatically uninstalled" (maybe such a basic operation works, maýbe not???) and then after trying pyqt5 it wouldn't find the qt dll...
<sb0>
*"may be able to be automatically uninstalled"
<_whitenotifier-3>
[nmigen] whitequark commented on issue #141: tracer.get_var_name returns None instead of default on pypy3 - https://git.io/fjPm3
jcreedon1 has quit [Ping timeout: 245 seconds]
jcreedon1 has joined #m-labs
<_whitenotifier-3>
[nmigen] programmerjake opened issue #145: pypy3 support tracking issue - https://git.io/fjPmC
awygle has quit [Ping timeout: 276 seconds]
awygle has joined #m-labs
<cr1901_modern>
sb0: I've never used it. My impression is that it's analogous to homebrew on Mac, but I use msys2 so much that I never really got started w/ Chocolately
<sb0>
does msys2 let you run native GUI applications or do you need a X server?
<cr1901_modern>
the former
<cr1901_modern>
Incidentally you can install a slightly-out-of-date version of msys2 (or Git from Windows, also based on msys2) from Chocolately- from June 2018? So it;'s like a hierarchy of package managers lol.
<sb0>
yeah, you can even install conda...
<sb0>
is bash working well with msys2?
<cr1901_modern>
Works wonderfully, I use it as my main shell 95% of the time
<cr1901_modern>
I suggest pairing it w/ ConEmu or similar
<cr1901_modern>
msys2 provides a minimum environment w/ the cygwin.dll for those few tools (like bash) that _just_ require POSIX crap that Windows doesn't offer. The idea is that once you bootstrap those few tools, nothing else you compile depends on cygwin.dll at all.
<sb0>
ah, it's using cygwin?
<cr1901_modern>
A few provided packages do. This includes bash IIRC.
<cr1901_modern>
(The idea being it's really not possible to compile bash on Windows without a full POSIX layer)
<cr1901_modern>
Actually, on my machine, "ldd" points to "msys-2.0.dll"
<cr1901_modern>
serves the same purpose as cygwin.dll
<cr1901_modern>
But the idea is that you don't link to it unless absolutely necessary
<cr1901_modern>
sb0: Re: the PyQt5 comment, does that reflect Chocolately?
<cr1901_modern>
PyQt5 has been well-behaved for me on msys2 IME. Although I think the msys2 Python can be a bit quirky
<sb0>
I have a rather negative opinion of cygwin.
<sb0>
wondering how hard it would be to reimplement a bash-compatible shell that doesn't use cygwin
<cr1901_modern>
midipix is the answer to that, but
<cr1901_modern>
I have a few reasons why I don't use it
<whitequark>
cygwin is fucking garbage
<whitequark>
msys2 is not quite as bad as cygwin
<cr1901_modern>
And like I said, 95% of the stuff in msys2 doesn't like to cygwin
<sb0>
what's the issue with midipix?
<cr1901_modern>
Well, two technical reasons:
<sb0>
well, an ideal solution to the windows software problem does not involve cygwin at all
jcreedon15 has joined #m-labs
<cr1901_modern>
1. I have a lot of infrastructure already invested in msys2.
<cr1901_modern>
2. I don't agree with one of their core philosophies that "every single POSIX program is actually a native GUI executable, not a command line one"
<whitequark>
wait, what?
awygle has quit [Ping timeout: 252 seconds]
<cr1901_modern>
Yes, you need special programs to talk to command line apps
jcreedon1 has quit [Ping timeout: 272 seconds]
<whitequark>
in what sense?
awygle has joined #m-labs
<cr1901_modern>
If you're a GUI executable, you won't get the command line stdio/stdout normally. So you invoke all programs through a symlink that will give you stdio/stdout
<cr1901_modern>
it's supposed to be seamless; I think it's gross
<whitequark>
interesting
<sb0>
I don't see a big issue with that; it's quite similar to running programs in a terminal emulator on linux, no?
<cr1901_modern>
sb0: Tbh, I don't see the analogy. Anyways, as long as the integration is seamless, I probably won't care.
<cr1901_modern>
Windows 7 will be dead in 6 months anyway, so any symlink woes (there are a number of bugs w/ it on Windows 7) will be moot
<cr1901_modern>
So I need to upgrade antwat
awygle has quit [Quit: No Ping reply in 180 seconds.]
<cr1901_modern>
sb0: Oh right, third technical reason- midipix is source only for now, and some sources aren't on a public facing server. You can ask midipix for credentials for the private parts in IRC (#midipix).
<cr1901_modern>
You will need a few hours to build it on a Linux machine, but last I did it... it was painless once I had the private repos locally
<sb0>
some sources?
<sb0>
binary repositories?
<cr1901_modern>
No, it's actual sources
<sb0>
why?
<cr1901_modern>
B/c alpha quality
<cr1901_modern>
according to them
<cr1901_modern>
Oh wait, I misunderstood your q I think
<cr1901_modern>
Are you asking whether midipix has binary repos?
<cr1901_modern>
Or are you asking specifically on what I mean by "some sources"
<cr1901_modern>
Idk if midipix has binary repos right now. I would hope as hell w/ all the software they talk about porting, they would/will soon :P.
<cr1901_modern>
"Some sources" just refers to some parts of midipix core not being on a public-facing server until it matures.
<cr1901_modern>
whitequark: Are you awake? Want to knock out the other Resource.family stuff since we've worked out the kinks?
<whitequark>
cr1901_modern: okay
<cr1901_modern>
Awesome! So first off, thoughts on doing Resource.family for PMODs?
<whitequark>
how would that work?
* cr1901_modern
takes a look... honestly seems to work fine as-is.
<cr1901_modern>
For some reason thought there was a default name
<cr1901_modern>
spiflash and uart are a few line changes. Do you want to change those or leave them as is?
<whitequark>
sure, let's change
<cr1901_modern>
Doing that right now.
<cr1901_modern>
Other thing I wanted to add was a new PMOD resource (type1A, basically 8-pin GPIO). I know the PMODs aren't very useful right now, but I feel like there's something that can improved about them.
<cr1901_modern>
Because it's still boilerplate to create them manually :P
<whitequark>
if it's in the spec, add it of course
<cr1901_modern>
So on spiflash, changing to *args seems a little tricky, because you need access to *args to concatenate _2x and _4x
<cr1901_modern>
Whereas in the other resources, we pass *args straight to family without touching it
<whitequark>
hmm
<whitequark>
maybe we can just add name_suffix to Resource.family?
<cr1901_modern>
works for me. Defaults to none and it can be used _in conjunction_ with default_name, correct?
<cr1901_modern>
Just to be clear
<cr1901_modern>
I know there are other I/Os throughout omigen designs besides spiflash and spiRAM that use suffixes, but don't remember them offhand. It'll be minimally invasive I think.
<whitequark>
yes
<cr1901_modern>
Oh right...
<cr1901_modern>
I just realized that the Mercury UART can also be refactored into a UARTResource
<cr1901_modern>
as long as I use the "conn:num"
<cr1901_modern>
syntax*
<cr1901_modern>
As a style guidelines, should users prefer the "conn" kwarg to Pins() before resorting to "conn:num" syntax and then only use "conn:num" syntax as a fallback
<whitequark>
yes
<cr1901_modern>
(On Mercury, the UART is bound to connector pins)
<cr1901_modern>
Good to know
<cr1901_modern>
Okay UARTResource is fixed, want me to add the name_suffix and I'll port over SPIFlash
<whitequark>
yeah
<cr1901_modern>
Alright, PR incoming in a few
<cr1901_modern>
if name_suffix:
<cr1901_modern>
This works; we don't want the "_" unless name_suffix is defined. Can you think of anything better?
<cr1901_modern>
Feel like a creative "".join will make this a one liner
<whitequark>
does that actually work?
<whitequark>
for the other case
<whitequark>
anyway i'd do `name_suffix = "_" + name_suffix`
<whitequark>
and then unconditionally concat it in the following lines
<cr1901_modern>
name_suffix takes default of "" (if you want it to be None, now's the time). "" is false in Python, so it would just skip adding it if undefined.
<cr1901_modern>
if empty*
<whitequark>
that's fine I guess
<cr1901_modern>
That said, I like your idea better so I'm using it :P
<cr1901_modern>
Okay that's implemented, now to test w/ SPIFlash in nmigen_boards
<cr1901_modern>
then I'll make a PR
<whitequark>
needs tests too
* cr1901_modern
nods
<cr1901_modern>
How do I run a single test case from the command line, if I supply "python3 -m unittest"?
<_whitenotifier-3>
[nmigen-boards] cr1901 synchronize pull request #24: dev: Refactor resource groups to use Resource.family. - https://git.io/fjPnb
<_whitenotifier-3>
[m-labs/nmigen-boards] whitequark pushed 1 commit to master [+0/-0/±2] https://git.io/fjPcY
<_whitenotifier-3>
[m-labs/nmigen-boards] cr1901 a7eeec2 - dev: Refactor resource abstractions to use Resource.family.
<_whitenotifier-3>
[nmigen-boards] whitequark closed pull request #24: dev: Refactor resource groups to use Resource.family. - https://git.io/fjPnb
<cr1901_modern>
Nice, refactor done
<cr1901_modern>
whitequark: When you get the chance, any final feedback on Mercury? It should be done now. I'll do PMODs a bit later, a bit distracted now.
mtrbot-ml has quit [Remote host closed the connection]
mtrbot-ml has joined #m-labs
rohitksingh has quit [Ping timeout: 245 seconds]
rohitksingh has joined #m-labs
rohitksingh has quit [Remote host closed the connection]