@movq@www.uninformativ.de Mu (µ)ās startup latency appears to be ~10ms on my machine:
$ time ./bin/mu ./foo.mu
real 0m0.011s
user 0m0.004s
sys 0m0.006s
@lyse@lyse.isobeef.org to be fair, thatās nothing, really
the logo used to be way larger and occupied the entire header, up to obfuscating the menu at my computerā¦
I do have a nitpick though, the logo isnāt transparent so it will look off in dark themes.
I assume you made the thing load quickly, didnāt you?
Thatās the problem with Python. If you have a couple of files to import, it will take time.
I want this to be reasonably fast on my old Intel NUC from 2016 (Celeron N3050 @ 1.60GHz) and I already notice that the program startup takes about 95 ms (or 125 ms when there are no .pyc files yet). Thatās still fine, but it shows that Iāll have to be careful and keep this thing very small ā¦
Python 3.14 will bring lazy imports, maybe that can help in some cases.
I can track usersā feeds now
@prologic@twtxt.net Iād happily write API documentation for go.yarn.social/client
@movq@www.uninformativ.de the āwriting a Yarn clientā thought goes all the way back to my ānovaburstā days in Yarn.social, but with the other pod apparently being gone, thereās no proof of it, except on everyoneās minds.
@movq@www.uninformativ.de Thatās cool! I also like the name of your library. :-) I assume you made the thing load quickly, didnāt you?
@prologic@twtxt.net No, thatās Python/curses on Linux. š
@movq@www.uninformativ.de Is this on yout little toy OS? š¤
Btw, @shinyoukai@neko.laidback.moe, thatās a super cool logo on your yarnd. I like it a lot!
It just doesnāt look aligned properly:
Could be a yarnd issue, though, it might not expect a logo this large. Just wildguessing, no idea.
git add everything!? Is it not enough for the file(s) to be already checked in from the get go?
@shinyoukai@neko.laidback.moe Because you might not want to commit all changed files in a single commit. I very often make use of this and create several commits. In fact, I like to git add --patch to interactively select which parts of a file go in the next commit. This happens most likely when refactoring during a feature implementation or bug fix. I couldnāt live without that anymore. :-)
If you have a much more organized way of working where this does not come up, you can just git commit --all to include all changed files in the next commit without git adding them first. But new files still have to be git added manually once.
@shinyoukai@neko.laidback.moe Do we now need ad filters in twtxt clients, too? O_o I hope not! Personally, I cannot stand the āSent with my crappy $phone/$appā e-mail footers.
But congrats on your client. :-)
os.UserConfigDir() up until a few seconds ago! I always implemented that myself.
@shinyoukai@neko.laidback.moe Yeah, they donāt truly support XDG. In fact, I looked in the Go stdlib source code to notice all the differences and shortcomings.
os.UserCacheDir(), it seems that the Go devs hasn't acknowledged the $XDG_DATA_DIR yet
@lyse@lyse.isobeef.org You could always take a peek at the Go source
Posted from mikuru/0.0.3 @ NetBSD amd64
os.UserConfigDir() up until a few seconds ago! I always implemented that myself.
@lyse@lyse.isobeef.org the funny thing about it? Thereās os.UserCacheDir(), it seems that the Go devs hasnāt acknowledged the $XDG_DATA_DIR yet
@shinyoukai@neko.laidback.moe Cool, I didnāt know about os.UserConfigDir() up until a few seconds ago! I always implemented that myself.
@movq@www.uninformativ.de Thanks! Iāll have a look at SnipMate. Currently, Iām (mis)using the abbreviation mechanism to expand a code snippet inplace, e.g.
autocmd FileType go inoreab <buffer> testfunc func Test(t *testing.T) {<CR>}<ESC>k0wwi
or this monstrosity:
autocmd FileType go inoreab <buffer> tabletest for _, tt := range []struct {<CR> name string<CR><CR><BS>}{<CR> {<CR> name: "",<CR><BS>},<CR><BS>} {<CR> t.Run(tt.name, func(t *testing.T) {<CR><CR>})<CR><BS>}<ESC>9ki<TAB>
But this of course has the disadvantage that I still have to remove the last space or tab to trigger the expansion by hand again. Itās a bit annoying, but better than typing it out by hand.
@movq@www.uninformativ.de Vim 9 (script) From Outer Space
@lyse@lyse.isobeef.org Well, I used SnipMate years ago (until 2012). IIRC, itās more than just āinsert a bit of text hereā, it can also jump to the correct next location(s) and stuff like that. Donāt remember why I stopped using it.
Then I used nothing for a long time. Just before Christmas, I made my own plugin (⦠of course ā¦), which does everything I need at the moment (and nothing more).
It can insert simple templates and then jump to the next location:
https://movq.de/v/67cdf7c827/sisni%2Dpython.mp4
And replace a string after insertion:
https://movq.de/v/67cdf7c827/sisni%2Dheader.mp4
(Itās not public (yet?) and it also uses vim9script, so I guess it wouldnāt work on your system.)
lldb or gdb š
@prologic@twtxt.net Debugging this stuff on bare metal hardware (without an underlying OS) is a nightmare. š¤£
@movq@www.uninformativ.de Yeah. I had that in my Python implementation and was really missing that.
@movq@www.uninformativ.de I see. Yeah, all the Unicode stuff certainly doesnāt help here, thatās for sure.
Maybe āspeedcursesā could be a name. Or just select any Palatinate curse. ;-)
lldb or gdb š
@prologic@twtxt.net Oh yeah, I bet it is horrible to troubleshoot.
tt URLs View now automatically selects the first URL that I probably are going to open. In decreasing order, the URL types are:
@lyse@lyse.isobeef.org That sounds useful. š¤
@lyse@lyse.isobeef.org Iām toying with the idea of making a widget/window system on top of Pythonās ncurses. Iāve never really been happy with the existing ones (like urwid, textual, pytermgui, ā¦). I mean, theyāre not horrible, itās mostly the performance thatās bugging me ā I donāt want to wait an entire second for a terminal program to start up.
Not sure if Iāll actually see it through, though. Unicode makes this kind of thing extremely hard. š«¤
pwgen --no-capitalize --no-numerals 5 and since that already showed up in DDG search results, I simply appended the last two, which yielded nothing on DDG and Google).
@lyse@lyse.isobeef.org Bwahaha. š¤£
@lyse@lyse.isobeef.org I can tell you this right now, writing assembly / machine code is fucking hard work⢠š Iām sure @movq@www.uninformativ.de can affirm 𤣠And when it all goes to shit⢠(which it does often), man is debugging fucking hard as hell! Without debug symbols I canāt use the regular tools like lldb or gdb š
@prologic@twtxt.net Yeah, the parser part is what I typically enjoy. Havenāt really looked into code generation itself.
Iām currently looking at your µ commits from the last few days. Holy cow! :-)
println(1, 2) was bring printed as 1 2 in the bytecode VM and 1 nil when natively compiled to machine code on macOS. In the end it turned out the machine code being generated / emitted meant that the list pointers for the rest... of the variadic arguments was being slot into a register that was being clobbered by the mu_retain and mu_release calls and effectively getting freed up on first use by the RC (reference counting) garbage collector š¤¦āāļø
@lyse@lyse.isobeef.org Yeah I remember you said some days back that your interest in compilers was rekindled by my work on mu (µ) š
println(1, 2) was bring printed as 1 2 in the bytecode VM and 1 nil when natively compiled to machine code on macOS. In the end it turned out the machine code being generated / emitted meant that the list pointers for the rest... of the variadic arguments was being slot into a register that was being clobbered by the mu_retain and mu_release calls and effectively getting freed up on first use by the RC (reference counting) garbage collector š¤¦āāļø
@prologic@twtxt.net Tada, congratulations! I find that rather interesting, thanks for telling us. :-)
@movq@www.uninformativ.de How about āQuongsiā? I generated the first five letters with pwgen --no-capitalize --no-numerals 5 and since that already showed up in DDG search results, I simply appended the last two, which yielded nothing on DDG and Google).
What kind of project is it? Maybe we can help you find a name or nudge you in the right direction.
@lyse@lyse.isobeef.org True !
@prologic@twtxt.net In my opinion, the integrity isnāt lost. The same input data always result in the same output hash, no matter when you calculate the hashes. Itās true that a corrupt database contents yields to corrupt hashes, but then you have a whole bigger problem than just receiving different hashes. :-D
@zvava@twtxt.net By hashing definition, if you edit your message, it simply becomes a new message. Itās just not the same message anymore. At least from a technical point of view. As a human, personally I disagree, but thatās what Iām stuck with. Thereās no reliable way to detect and ācorrectā for that.
Storing the hash in your database doesnāt prevent you from switching to another hashing implementation later on. As of now, message creation timestamps earlier than some magical point in time use twt hash v1, messages on or after that magical timestamp use twt hash v2. So, a message either has a v1 or a v2 hash, but not both. At least one of them is never meaningful.
Once you āupgradeā your database schema, you can check for stored messages from the future which should have been hashed using v2, but were actually v1-hashed and simply fix them.
If there will ever be another addressing scheme, you could reuse the existing hash column if it supersedes the v1/v2 hashes. Otherwise, a new column might be useful, or perhaps no column at all (looking at location-based addressing or how it was called). The old v1/v2 hashes are still needed for all past conversation trees.
In my opinion, always recalculating the hashes is a big waste of time and energy. But if it serves you well, then go for it.
@zvava@twtxt.net The problem you now then is you lose integrity of the message content if you compute the hashes at runtime rather than on the way in. So if your message content or database becomes corrupt in any way, so do your hashes.
@prologic@twtxt.net Take 2
@lyse@lyse.isobeef.org packaging yarnd wasnāt that easy after all, I also apparently have to patch some things over and supply the minified assets some way or another
@shinyoukai@neko.laidback.moe The CSS 404ing highlights the improvability of the content to noise ratio. :-)
@movq@www.uninformativ.de The asshats are everywhere. Luckily, it has been rather quiet so far. But of course, I now jinxed it.
@shinyoukai@neko.laidback.moe Very cool! š
@prologic@twtxt.net next in line: saltyd, yarnc, and other stuff I host
@shinyoukai@neko.laidback.moe Nice! š
@movq@www.uninformativ.de Thanks! š
@prologic@twtxt.net This is a really cool project, thatās for sure. š
@lyse@lyse.isobeef.org ⦠I was about to write āit really is worse where you liveā, then I heard the first bang out on the street. š¤£
@shinyoukai@neko.laidback.moe Nah itās more like thereās a lot of repeated code, because when you go from source language to intermediate representation to machine code, well you just end up writing a lot of the same patterns over and over again. I need to dedupe this I think.
@kiwu@twtxt.net Ooof š¢ Thatās rough!
@prologic@twtxt.net code generation on demand or something?
@movq@www.uninformativ.de Iāve managed to bring a simple āHello World!ā in mu (µ) (at least on macOS / Darwin / ARM64) down to ~86KB (previously ~146KB) š„³
@movq@www.uninformativ.de I think I can get binaries even smaller with a bit more work and effort š¤ But yeah still working on the native code generation (at least for macOS targets)