whitequark[cis] changed the topic of #glasgow to: https://glasgow-embedded.org · digital interface explorer · https://www.crowdsupply.com/1bitsquared/glasgow · code https://github.com/GlasgowEmbedded/glasgow · logs https://libera.irclog.whitequark.org/glasgow · matrix #glasgow-interface-explorer:matrix.org · discord https://1bitsquared.com/pages/chat
<_whitenotifier-3> [glasgow] rcombs commented on pull request #548: applet.tas.n64: new applet - https://github.com/GlasgowEmbedded/glasgow/pull/548#issuecomment-2249085947
<_whitenotifier-3> [glasgow] whitequark commented on pull request #548: applet.tas.n64: new applet - https://github.com/GlasgowEmbedded/glasgow/pull/548#issuecomment-2249087886
<_whitenotifier-3> [glasgow] whitequark commented on pull request #548: applet.tas.n64: new applet - https://github.com/GlasgowEmbedded/glasgow/pull/548#issuecomment-2249090974
<_whitenotifier-3> [glasgow] rcombs synchronize pull request #548: applet.tas.n64: new applet - https://github.com/GlasgowEmbedded/glasgow/pull/548
<_whitenotifier-3> [glasgow] rcombs synchronize pull request #548: applet.control.n64: new applet - https://github.com/GlasgowEmbedded/glasgow/pull/548
<_whitenotifier-3> [glasgow] whitequark commented on pull request #548: applet.control.n64: new applet - https://github.com/GlasgowEmbedded/glasgow/pull/548#issuecomment-2249102471
<_whitenotifier-3> [glasgow] whitequark commented on pull request #548: applet.control.n64: new applet - https://github.com/GlasgowEmbedded/glasgow/pull/548#issuecomment-2249111045
<_whitenotifier-3> [glasgow] rcombs commented on pull request #548: applet.control.n64: new applet - https://github.com/GlasgowEmbedded/glasgow/pull/548#issuecomment-2249112032
<_whitenotifier-3> [glasgow] whitequark commented on pull request #548: applet.control.n64: new applet - https://github.com/GlasgowEmbedded/glasgow/pull/548#issuecomment-2249113378
<_whitenotifier-3> [glasgow] whitequark commented on pull request #548: applet.control.n64: new applet - https://github.com/GlasgowEmbedded/glasgow/pull/548#issuecomment-2249114943
redstarcomrade has joined #glasgow
<_whitenotifier-3> [glasgow] rcombs commented on pull request #548: applet.control.n64: new applet - https://github.com/GlasgowEmbedded/glasgow/pull/548#issuecomment-2249125990
<_whitenotifier-3> [glasgow] whitequark commented on pull request #548: applet.control.n64: new applet - https://github.com/GlasgowEmbedded/glasgow/pull/548#issuecomment-2249128425
<_whitenotifier-3> [glasgow] whitequark commented on pull request #548: applet.control.n64: new applet - https://github.com/GlasgowEmbedded/glasgow/pull/548#issuecomment-2249129606
<whitequark[m]> hm. does anyone get bothered by the startup latency of the glasgow CLI tool still
<_whitenotifier-3> [glasgow] isabelburgos opened pull request #638: applet.interface.swd_openocd: modify to use port groups - https://github.com/GlasgowEmbedded/glasgow/pull/638
<_whitenotifier-3> [glasgow] whitequark commented on pull request #548: applet.control.n64: new applet - https://github.com/GlasgowEmbedded/glasgow/pull/548#issuecomment-2249147561
<_whitenotifier-3> [glasgow] github-merge-queue[bot] created branch gh-readonly-queue/main/pr-638-30b9455b9bc33e727692a052fea2df40548a1bab - https://github.com/GlasgowEmbedded/glasgow
<_whitenotifier-3> [GlasgowEmbedded/glasgow] github-merge-queue[bot] pushed 1 commit to main [+0/-0/±1] https://github.com/GlasgowEmbedded/glasgow/compare/30b9455b9bc3...42c5f8c200a6
<_whitenotifier-3> [glasgow] whitequark closed pull request #638: applet.interface.swd_openocd: modify to use port groups - https://github.com/GlasgowEmbedded/glasgow/pull/638
<_whitenotifier-3> [glasgow] github-merge-queue[bot] deleted branch gh-readonly-queue/main/pr-638-30b9455b9bc33e727692a052fea2df40548a1bab - https://github.com/GlasgowEmbedded/glasgow
<_whitenotifier-3> [glasgow] whitequark synchronize pull request #586: [WIP] An applet for controlling a quad-SPI (QSPI/QPI) bus - https://github.com/GlasgowEmbedded/glasgow/pull/586
<_whitenotifier-3> [glasgow] rcombs commented on pull request #548: applet.control.n64: new applet - https://github.com/GlasgowEmbedded/glasgow/pull/548#issuecomment-2249181795
<_whitenotifier-3> [glasgow] whitequark commented on pull request #548: applet.control.n64: new applet - https://github.com/GlasgowEmbedded/glasgow/pull/548#issuecomment-2249184834
<_whitenotifier-3> [glasgow] whitequark synchronize pull request #586: [WIP] An applet for controlling a quad-SPI (QSPI/QPI) bus - https://github.com/GlasgowEmbedded/glasgow/pull/586
<_whitenotifier-3> [glasgow] whitequark synchronize pull request #586: [WIP] An applet for controlling a quad-SPI (QSPI/QPI) bus - https://github.com/GlasgowEmbedded/glasgow/pull/586
<_whitenotifier-3> [glasgow] whitequark synchronize pull request #586: [WIP] An applet for controlling a quad-SPI (QSPI/QPI) bus - https://github.com/GlasgowEmbedded/glasgow/pull/586
<_whitenotifier-3> [glasgow] whitequark synchronize pull request #586: [WIP] An applet for controlling a quad-SPI (QSPI/QPI) bus - https://github.com/GlasgowEmbedded/glasgow/pull/586
<_whitenotifier-3> [glasgow] rcombs commented on pull request #548: applet.control.n64: new applet - https://github.com/GlasgowEmbedded/glasgow/pull/548#issuecomment-2249220981
<_whitenotifier-3> [glasgow] isabelburgos opened pull request #639: applet.video.hub75_output: modify to use port groups - https://github.com/GlasgowEmbedded/glasgow/pull/639
<_whitenotifier-3> [glasgow] github-merge-queue[bot] created branch gh-readonly-queue/main/pr-639-42c5f8c200a619f16170dc9c6f8e5f6c8ee24948 - https://github.com/GlasgowEmbedded/glasgow
<_whitenotifier-3> [glasgow] isabelburgos opened pull request #640: applet.video.rgb_input: modify to use port groups - https://github.com/GlasgowEmbedded/glasgow/pull/640
<_whitenotifier-3> [glasgow] isabelburgos opened pull request #641: applet.audio.dac: modify to use port groups - https://github.com/GlasgowEmbedded/glasgow/pull/641
<_whitenotifier-3> [GlasgowEmbedded/glasgow] github-merge-queue[bot] pushed 1 commit to main [+0/-0/±1] https://github.com/GlasgowEmbedded/glasgow/compare/42c5f8c200a6...91a16d66d294
<_whitenotifier-3> [glasgow] github-merge-queue[bot] deleted branch gh-readonly-queue/main/pr-639-42c5f8c200a619f16170dc9c6f8e5f6c8ee24948 - https://github.com/GlasgowEmbedded/glasgow
<_whitenotifier-3> [glasgow] whitequark closed pull request #639: applet.video.hub75_output: modify to use port groups - https://github.com/GlasgowEmbedded/glasgow/pull/639
<_whitenotifier-3> [glasgow] github-merge-queue[bot] created branch gh-readonly-queue/main/pr-640-91a16d66d2942c19af997d2406f373e9bf9727bc - https://github.com/GlasgowEmbedded/glasgow
<_whitenotifier-3> [GlasgowEmbedded/glasgow] github-merge-queue[bot] pushed 1 commit to main [+0/-0/±1] https://github.com/GlasgowEmbedded/glasgow/compare/91a16d66d294...456ed7768dde
<_whitenotifier-3> [GlasgowEmbedded/glasgow] isabelburgos 456ed77 - applet.video.rgb_input: modify to use port groups
<_whitenotifier-3> [glasgow] github-merge-queue[bot] deleted branch gh-readonly-queue/main/pr-640-91a16d66d2942c19af997d2406f373e9bf9727bc - https://github.com/GlasgowEmbedded/glasgow
<_whitenotifier-3> [glasgow] whitequark closed pull request #640: applet.video.rgb_input: modify to use port groups - https://github.com/GlasgowEmbedded/glasgow/pull/640
redstarcomrade has quit [Read error: Connection reset by peer]
Stary has quit [Quit: ZNC - http://znc.in]
Fridtjof has quit [Quit: ZNC - http://znc.in]
Stary has joined #glasgow
Fridtjof has joined #glasgow
esden[m] has joined #glasgow
<esden[m]> I honestly was not bohtered by it before. (especially considering that I run it in a loop for hardware testing)
<esden[m]> But I guess I have the bitstreams pre generated... this is usually the biggest slowdown, and I am not sure what latency we are exactly talking about.
hl has quit [Quit: ZNC - https://znc.in]
hl has joined #glasgow
GNUmoon has joined #glasgow
whitequark[cis] has quit [Quit: Idle timeout reached: 172800s]
galibert[m] has quit [Quit: Idle timeout reached: 172800s]
<_whitenotifier-3> [glasgow] isabelburgos closed pull request #641: applet.audio.dac: modify to use port groups - https://github.com/GlasgowEmbedded/glasgow/pull/641
<gruetzkopf> that.. doesn't look like the ideal order
<_whitenotifier-3> [glasgow] isabelburgos opened pull request #642: applet.audio.yamaha_opx: modify to use port groups - https://github.com/GlasgowEmbedded/glasgow/pull/642
<_whitenotifier-3> [glasgow] isabelburgos opened pull request #643: applet.interface.analyzer: modify to use port groups - https://github.com/GlasgowEmbedded/glasgow/pull/643
<_whitenotifier-3> [glasgow] isabelburgos opened pull request #644: applet.memory.onfi: modify to use port groups - https://github.com/GlasgowEmbedded/glasgow/pull/644
balrog has quit [Quit: Bye]
n0p has quit [*.net *.split]
DragoonAethis has quit [*.net *.split]
dfriehs has quit [*.net *.split]
dos has quit [*.net *.split]
dustinm` has quit [*.net *.split]
n0p has joined #glasgow
dfriehs has joined #glasgow
dos has joined #glasgow
dustinm` has joined #glasgow
DragoonAethis has joined #glasgow
FFY00 has quit [Read error: Connection reset by peer]
FFY00 has joined #glasgow
<_whitenotifier-3> [glasgow] github-merge-queue[bot] created branch gh-readonly-queue/main/pr-642-456ed7768dde4f8c2efcbd05473841c1fce59e9e - https://github.com/GlasgowEmbedded/glasgow
<_whitenotifier-3> [glasgow] github-merge-queue[bot] created branch gh-readonly-queue/main/pr-643-ac997024825f6665b29b47e093c2e7de5983a7e0 - https://github.com/GlasgowEmbedded/glasgow
whitequark[cis] has joined #glasgow
<whitequark[cis]> gruetzkopf: why
<_whitenotifier-3> [GlasgowEmbedded/glasgow] github-merge-queue[bot] pushed 1 commit to main [+0/-0/±1] https://github.com/GlasgowEmbedded/glasgow/compare/456ed7768dde...ac997024825f
<_whitenotifier-3> [glasgow] whitequark closed pull request #642: applet.audio.yamaha_opx: modify to use port groups - https://github.com/GlasgowEmbedded/glasgow/pull/642
<_whitenotifier-3> [glasgow] github-merge-queue[bot] deleted branch gh-readonly-queue/main/pr-642-456ed7768dde4f8c2efcbd05473841c1fce59e9e - https://github.com/GlasgowEmbedded/glasgow
cr1901_ has quit [Read error: Connection reset by peer]
<_whitenotifier-3> [GlasgowEmbedded/glasgow] github-merge-queue[bot] pushed 1 commit to main [+0/-0/±1] https://github.com/GlasgowEmbedded/glasgow/compare/ac997024825f...4840cfe32180
<_whitenotifier-3> [glasgow] whitequark closed pull request #643: applet.interface.analyzer: modify to use port groups - https://github.com/GlasgowEmbedded/glasgow/pull/643
<_whitenotifier-3> [glasgow] github-merge-queue[bot] deleted branch gh-readonly-queue/main/pr-643-ac997024825f6665b29b47e093c2e7de5983a7e0 - https://github.com/GlasgowEmbedded/glasgow
cr1901 has joined #glasgow
<_whitenotifier-3> [glasgow] github-merge-queue[bot] created branch gh-readonly-queue/main/pr-644-4840cfe32180a7b1e0b0d060ce107aa1c572aa46 - https://github.com/GlasgowEmbedded/glasgow
attiegrande[m] has joined #glasgow
<attiegrande[m]> not really... faster is always nice, but I wouldn't put it high on the priorities right now...
<attiegrande[m]> is it bothering you? is a "quick fix" / workaround to just strip out all the applets you're not currently dealing with?
<whitequark[m]> that's a whole second!
<whitequark[m]> it could probably be more like 300-400 ms
<whitequark[m]> re: pregenerated bitstreams, we have caching now, so you should not end up hitting the bitstream generation more than once per config. and even if you did, running the same applet in a loop has always been supported
<whitequark[m]> s/supported/special-cased to be fast/
<_whitenotifier-3> [GlasgowEmbedded/glasgow] github-merge-queue[bot] pushed 1 commit to main [+0/-0/±1] https://github.com/GlasgowEmbedded/glasgow/compare/4840cfe32180...5cb118c5287b
<_whitenotifier-3> [glasgow] github-merge-queue[bot] deleted branch gh-readonly-queue/main/pr-644-4840cfe32180a7b1e0b0d060ce107aa1c572aa46 - https://github.com/GlasgowEmbedded/glasgow
<_whitenotifier-3> [glasgow] whitequark closed pull request #644: applet.memory.onfi: modify to use port groups - https://github.com/GlasgowEmbedded/glasgow/pull/644
<_whitenotifier-3> [glasgow] whitequark commented on pull request #641: applet.audio.dac: modify to use port groups - https://github.com/GlasgowEmbedded/glasgow/pull/641#issuecomment-2251484484
<attiegrande[m]> have you investigated where the time is spent?
<attiegrande[m]> (it's more like 1.2 - 1.5s for me...)
<whitequark[m]> it's O(n) where n = applet count because it loads the code for every applet
<whitequark[m]> in case you want to run --help
<attiegrande[m]> yeah, i suspected
<whitequark[m]> we have glasgow.support.lazy which can be used to delay that loading
<whitequark[m]> at fairly little cost
<whitequark[m]> or, well, may be able to delay it, depending on how argparse is built
<attiegrande[m]> worth parsing the required info into a cached blob, so we don't need to parse so much every time? i feel a little surprised it's so intensive
<whitequark[m]> how do you compute the cache key?
<whitequark[m]> that was my first instinct to build
<attiegrande[m]> that's indeed the tricky one... for "normal" installs, perhaps it's not required(?? 🙈), for editable installs, perhaps we get the startup penalty of no cache?
<attiegrande[m]> (is it even possible to differentiate?)
<attiegrande[m]> *not required -> no cache key required... just build the blob and call it a day
<attiegrande[m]> or check for version changes only
<whitequark[m]> what's a normal install?
<whitequark[m]> our instructions specifically tell everyone to use editable ones
<whitequark[m]> also, didn't you previously argue pretty hard against potential issues with bitstream caches?
<whitequark[m]> (I agreed back then which is why the bitstream cache is incredibly robust; I would like to apply the same rigor to help text caching)
<attiegrande[m]> i did, and i'm very pro robust caches... i was also keen for some thin cache management tool (e.g: just a clean would suffice, but is unnecessary - good job!)
<whitequark[m]> having the help text be outdated is pretty bad considering that you may end up missing a warning about data loss
<whitequark[m]> like, it's basically as bad as picking the wrong bitstream from the cache
<attiegrande[m]> "normal" installs is a tough one - as you say, we promote editable installs, and many / most people will likely want to make changes and thus it's not going to be the bonus for many
<attiegrande[m]> "normal" to me, is installing a versioned package from pypi or something... you don't expect any of the files to change, and if they do change the version should change too
<whitequark[m]> i'm also not super interested in building a complex caching layer which would not benefit me
<attiegrande[m]> ... again though, we don't (i don't think!) publish like that
<whitequark[m]> this isn't even something we ever plan to provide, currently
<attiegrande[m]> i honestly really like the one file for the whole applet ... how much benefit could we gain from pushing the argparse code to a separate file? (i don't _want_ to do that... just throwing ideas)
<whitequark[m]> how would that help?
<attiegrande[m]> (also trying hard to avoid us producing an alternative to argparse, which I know you've mentioned in the past)
<attiegrande[m]> less python to parse to startup - just the argument stuff, no applet machinery
<whitequark[m]> oh, i see
<whitequark[m]> that's still O(n) though the constant is less
<whitequark[m]> there's a solution
<whitequark[m]> make bare glasgow let you repeatedly enter commands while frontloading the startup latency
<whitequark[m]> the main issue with that is that currently our ^C handling is super fragile
<attiegrande[m]> another-another idea... which i'm not a fan of initially due to the probability of extra-extra complexity...
<attiegrande[m]> a daemon, which starts (if not already running) and handles providing the argument data only
<whitequark[m]> jruby calls this "shotgun"
<whitequark[m]> i've considered it. the problem is that your stdio becomes a nightmare
<whitequark[m]> like, imagine trying to use I/O redirection
<attiegrande[m]> oh no
<whitequark[m]> now imagine you're on windows.
<attiegrande[m]> my thinking is more basic - on startup produce a daemon which parses / gathers the whole argparse, and sticks around for a while
<attiegrande[m]> then on subsequent runs, transfer that argparse structure via RPC
<whitequark[m]> this is just a transient cache
<attiegrande[m]> yes, but we can watch for changes - quit or reparse
<whitequark[m]> and has the exact same problems as storing it in a file, just... more complex
<whitequark[m]> how
<attiegrande[m]> inotify or (hopefully) a windows alternative
<whitequark[m]> what will it use on windows exactly
<whitequark[m]> also, inotify can and will miss events by design
<whitequark[m]> (which is liable to happen if you git checkout)
<whitequark[m]> also, you can't actually reload modules into a running python process. like. you sort of can but in practice you cannot
<attiegrande[m]> hm, okay... is that [missing changes] related to moving / swapping files rather than altering them in place?
<whitequark[m]> so you end up with at least two levels of process management: daemon itself and the subprocesses it spawns to generate argparse stuff
<whitequark[m]> there is a fixed size buffer in the kernel
<whitequark[m]> if it overflows inotify drops changes on the floor
<attiegrande[m]> yeah, okay - ignore that one then...
<attiegrande[m]> oh huh, didn't know it was so fragile
<whitequark[m]> like many linux apis it's kind of garbage
<attiegrande[m]> 🙈
<attiegrande[m]> is it worth me giving the "argparse into a separate file" approach a try? just roughtly to evaluate the potential speedup?
<attiegrande[m]> seems like the best option discussed just now, but still "not brilliant"
<attiegrande[m]> i also wonder how much of the startup time is spent scanning the usb tree... do you have a feel for that? or might be worth me looking into?
dne has quit [Remote host closed the connection]
dne has joined #glasgow
<whitequark[m]> i feel like it's not a good use of your time
<whitequark[m]> it's just a lot of effort to do that
<attiegrande[m]> okay / true
<whitequark[m]> I'm thinking I could look into whether argparse can be combined with `lazy`
vegard_e[m] has joined #glasgow
<vegard_e[m]> `ReadDirectoryChangesW` is apparently the windows equivalent to inotify, I recently used this thing for a project: https://github.com/gorakhargosh/watchdog
<whitequark[m]> thank you, this is useful
duskwuff[m] has joined #glasgow
<duskwuff[m]> hot reloading Python applications is a fairly common ask in web development, and I suspect some of the libraries used for that could be reused/reworked for use here if you wanted to go down that road
<whitequark[m]> I've thought about this
<duskwuff[m]> I imagine some of them have already solved the cross-platform issues, at least
<whitequark[m]> it's well known to be unreliable in the general case, which is why I'm hesitating
<whitequark[m]> I know I could get it to mostly work
<whitequark[m]> "well known" as in "the python docs for `importlib.reload` tell you to not use it"
<duskwuff[m]> oh, I just mean to the extent of "detect that a file we care about has changed" not the actual process reloading
<whitequark[m]> oh! yeah, watchdog should solve that though
<whitequark[m]> you do still need to get a list of files though
<whitequark[m]> like, nobody stops you from haivng an applet whose help text depends on another applet
<whitequark[m]> and we have multiple in-tree applets which do this already
<whitequark[m]> i feel like not loading every applet until and unless --help is requested is the best option here, let me just see if i can implement it
<_whitenotifier-3> [glasgow] isabelburgos opened pull request #645: applet.audio.dac: modify to use port groups - https://github.com/GlasgowEmbedded/glasgow/pull/645
<_whitenotifier-3> [glasgow] isabelburgos closed pull request #645: applet.audio.dac: modify to use port groups - https://github.com/GlasgowEmbedded/glasgow/pull/645
<_whitenotifier-3> [glasgow] whitequark commented on pull request #645: applet.audio.dac: modify to use port groups - https://github.com/GlasgowEmbedded/glasgow/pull/645#issuecomment-2251555716
<_whitenotifier-3> [glasgow] isabelburgos opened pull request #646: applet.program.m16c: modify to use port groups - https://github.com/GlasgowEmbedded/glasgow/pull/646
<_whitenotifier-3> [glasgow] github-merge-queue[bot] created branch gh-readonly-queue/main/pr-646-5cb118c5287b712439d67c264a58c7019a709e58 - https://github.com/GlasgowEmbedded/glasgow
<_whitenotifier-3> [glasgow] isabelburgos commented on pull request #641: applet.audio.dac: modify to use port groups - https://github.com/GlasgowEmbedded/glasgow/pull/641#issuecomment-2251566626
<_whitenotifier-3> [GlasgowEmbedded/glasgow] github-merge-queue[bot] pushed 1 commit to main [+0/-0/±1] https://github.com/GlasgowEmbedded/glasgow/compare/5cb118c5287b...7a7c673d0d0e
<_whitenotifier-3> [glasgow] github-merge-queue[bot] deleted branch gh-readonly-queue/main/pr-646-5cb118c5287b712439d67c264a58c7019a709e58 - https://github.com/GlasgowEmbedded/glasgow
<_whitenotifier-3> [glasgow] whitequark closed pull request #646: applet.program.m16c: modify to use port groups - https://github.com/GlasgowEmbedded/glasgow/pull/646
<_whitenotifier-3> [glasgow] whitequark reopened pull request #641: applet.audio.dac: modify to use port groups - https://github.com/GlasgowEmbedded/glasgow/pull/641
<_whitenotifier-3> [glasgow] whitequark commented on pull request #641: applet.audio.dac: modify to use port groups - https://github.com/GlasgowEmbedded/glasgow/pull/641#issuecomment-2251570414
<_whitenotifier-3> [glasgow] github-merge-queue[bot] created branch gh-readonly-queue/main/pr-641-7a7c673d0d0ea3a8dd8c2d663e4bdaabd0ff85f7 - https://github.com/GlasgowEmbedded/glasgow
<_whitenotifier-3> [glasgow] whitequark opened pull request #647: docs: manual/community: recognize @isabelburgos' contributions - https://github.com/GlasgowEmbedded/glasgow/pull/647
<_whitenotifier-3> [GlasgowEmbedded/glasgow] github-merge-queue[bot] pushed 1 commit to main [+0/-0/±1] https://github.com/GlasgowEmbedded/glasgow/compare/7a7c673d0d0e...904f96fea4c1
<_whitenotifier-3> [GlasgowEmbedded/glasgow] isabelburgos 904f96f - applet.audio.dac: modify to use port groups
<_whitenotifier-3> [glasgow] github-merge-queue[bot] deleted branch gh-readonly-queue/main/pr-641-7a7c673d0d0ea3a8dd8c2d663e4bdaabd0ff85f7 - https://github.com/GlasgowEmbedded/glasgow
<_whitenotifier-3> [glasgow] whitequark closed pull request #641: applet.audio.dac: modify to use port groups - https://github.com/GlasgowEmbedded/glasgow/pull/641
<whitequark[m]> i think i have to dig into cpython sources here