whitequark[m] changed the topic of #glasgow to: glasgow interface explorer · code https://github.com/GlasgowEmbedded/glasgow · logs https://freenode.irclog.whitequark.org/glasgow · discord https://1bitsquared.com/pages/chat · production https://www.crowdsupply.com/1bitsquared/glasgow · CrowdSupply campaign is FUNDED
jstein has quit [Quit: quit]
egg|anbo|egg_ has joined #glasgow
FFY00_ has quit [Remote host closed the connection]
FFY00_ has joined #glasgow
umarcor has quit [Ping timeout: 246 seconds]
umarcor has joined #glasgow
umarcor has quit [Read error: Connection reset by peer]
umarcor has joined #glasgow
egg|anbo|egg_ has quit [Remote host closed the connection]
egg|anbo|egg_ has joined #glasgow
egg|anbo|egg_ has quit [Remote host closed the connection]
PyroPeter_ has joined #glasgow
PyroPeter has quit [Ping timeout: 256 seconds]
PyroPeter_ is now known as PyroPeter
GNUmoon has quit [Ping timeout: 268 seconds]
emberian_z_ has quit [Ping timeout: 245 seconds]
emberian_z has joined #glasgow
GNUmoon has joined #glasgow
umarcor has quit [Read error: Connection reset by peer]
umarcor has joined #glasgow
feldim2425 has quit [Ping timeout: 276 seconds]
feldim2425 has joined #glasgow
egg|anbo|egg_ has joined #glasgow
bvernoux has joined #glasgow
egg|anbo|egg_ has quit [Remote host closed the connection]
rafaelmartins_ is now known as rafaelmartins
kmehall has quit [Read error: Connection reset by peer]
kmehall has joined #glasgow
<d1b2> <zx64> Is there a plan to add some form of lazy loading to the glasgow cli? e.g. commenting out the line from .applet import all from cli.py takes the no-op invocation time of python -m glasgow.cli down from 3.3 seconds to 1.2 seconds. Python 3.8 on Windows seems to spend an awful lot of time on nt.stat and winreg.OpenKey which seems to be partly attributed to the mimetypes module pulled in by aiohttp.
<jpa-> https://pypi.org/project/lazy-import/ might be one way to do that, it automatically loads the module first time it is actually accessed
<d1b2> <Attie> @zx64 i don't believe so... at present py3.8.2 on Linux takes ~550ms to run python -m glasgow.cli, so it's interesting to hear it's so much slower on your system / Windows
<d1b2> <Attie> doing a simple swap to use lazy-import (i.e: %s/^from \([^ ]\+\) import \(.\+\)$/\2 = lazy_module('\1.\2')/gc in vim) reduces startup to ~280ms
<d1b2> <Attie> ... but this also breaks glasgow run --help - i.e: no modules are listed
<d1b2> <Attie> (modules/applets)
<d1b2> <Attie> ... oh, actually this breaks everything, because of how the applets are loaded - e.g: glasgow run uart --help fails
<modwizcode> Yeah
<modwizcode> There's no way that's going to work properly
<d1b2> <Attie> [ could have sworn it worked just now, much to my surprise! ]
<d1b2> <Attie> so, in summary... no plans to do this, and it would require quite deep rework of how the applets are designed to put into practice
<modwizcode> incedentally what does %s in your vim command there do?
GNUmoon has quit [Remote host closed the connection]
<agg> % is short for 1,$ i.e. "operate on the entire file", and s is the substitute command
GNUmoon has joined #glasgow
<agg> so %s is "on the whole file, perform this substitution"
<modwizcode> oh I'm dumb I was looking at those two functions independently somehow
<d1b2> <zx64> You can also combo that with :bufdo (and autowrite) to apply it to multiple files.
<modwizcode> I should really learn to use vim instead of ignoring it
<d1b2> <Attie> % is "whole file", s/.../.../ is the regex, g is global (i.e: multiple matches per line), c is confirm (i.e: ask before doing replace)
pepijndevos has quit [Excess Flood]
pepijndevos has joined #glasgow
bvernoux1 has joined #glasgow
bvernoux has quit [Ping timeout: 245 seconds]
roybatty2019 has quit [Quit: WeeChat 3.0.1]
bvernoux1 has quit [Quit: Leaving]
bvernoux has joined #glasgow
GNUmoon has quit [Ping timeout: 268 seconds]
aquijoule__ has joined #glasgow
aquijoule_ has quit [Remote host closed the connection]
happycube has quit [Ping timeout: 246 seconds]
happycube has joined #glasgow
thaytan has quit [Excess Flood]
thaytan has joined #glasgow
bvernoux has quit [Quit: Leaving]
Eli2_ has joined #glasgow
Eli2 has quit [Ping timeout: 264 seconds]
GNUmoon has joined #glasgow