mathstodon.xyz is one of the many independent Mastodon servers you can use to participate in the fediverse.
A Mastodon instance for maths people. We have LaTeX rendering in the web interface!

Server stats:

2.8K
active users

#vim9script

0 posts0 participants0 posts today
Wolf<p>At last night’s <span class="h-card" translate="no"><a href="https://hachyderm.io/@mug" class="u-url mention" rel="nofollow noopener noreferrer" target="_blank">@<span>mug</span></a></span> meeting we looked at a lot of different solutions to <a href="https://hachyderm.io/tags/adventofcode" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>adventofcode</span></a> day 1 in many different languages. Two that were very interesting to me were <a href="https://hachyderm.io/tags/Zig" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Zig</span></a> and <a href="https://hachyderm.io/tags/haskell" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>haskell</span></a>. The way these two languages worked was really quite fascinating. After seeing real code in these two languages, I can tell they are not for me; but they were interesting and illuminating nonetheless. </p><p>There was a solution entirely in <a href="https://hachyderm.io/tags/SQL" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SQL</span></a>. Another in <a href="https://hachyderm.io/tags/vim9script" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>vim9script</span></a>. Another in <a href="https://hachyderm.io/tags/swiftlang" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>swiftlang</span></a> <a href="https://hachyderm.io/tags/swift" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>swift</span></a> (I don’t think that one’s in the repo yet). I wrote several implementations myself. The one I felt most proud of is <a href="https://hachyderm.io/tags/Python" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Python</span></a> with the core written in <a href="https://hachyderm.io/tags/rustlang" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>rustlang</span></a> <a href="https://hachyderm.io/tags/rust" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>rust</span></a> tied together with <a href="https://hachyderm.io/tags/PyO3" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>PyO3</span></a>. The one I felt was maybe the best tool for the job was entirely based on <a href="https://hachyderm.io/tags/pandas" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>pandas</span></a>. As I said in a previous post, I tried to solve it in <a href="https://hachyderm.io/tags/polars" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>polars</span></a>, but the API exposed by Polars at least as far as I could tell, made it no better than simple lists in Python. I need to get deeper knowledge here. </p><p>The repo lives here: <a href="https://github.com/MichiganUnixUserGroup/MUG-2025-03-11-Advent-of-Code" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">github.com/MichiganUnixUserGro</span><span class="invisible">up/MUG-2025-03-11-Advent-of-Code</span></a>.</p>
Seve_py :vim: :python:<p>AFAIK, there's only one existing Vim plugin for buffer checksums, and it's quite old, relying heavily on terminal tools. I've developed a newer version using Vim9Script and the V language. Contributions and ideas are welcome. <a href="https://fosstodon.org/tags/Vim" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Vim</span></a> <a href="https://fosstodon.org/tags/VLang" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>VLang</span></a> <a href="https://fosstodon.org/tags/Checksum" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Checksum</span></a> <a href="https://fosstodon.org/tags/Programming" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Programming</span></a> <a href="https://fosstodon.org/tags/vim9script" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>vim9script</span></a> <br><a href="https://github.com/sevehub/vchecksum.vim" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">github.com/sevehub/vchecksum.v</span><span class="invisible">im</span></a></p>
Wolf<p><a href="https://hachyderm.io/tags/Vim" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Vim</span></a> <a href="https://hachyderm.io/tags/NeoVim" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>NeoVim</span></a> I found what was replacing all my argument lists with underscores: argtextobj.vim. This is one of my favorite plugins. It hasn’t been touched in 15 years, though. Probably something changed in the editor itself that broke it. I could abandon it; I could fix it; or I could rewrite it. I asked my friend what language it should be rewritten in. He said <a href="https://hachyderm.io/tags/vim9script" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>vim9script</span></a> of course! I disagreed. That would only work in Vim. <a href="https://hachyderm.io/tags/lua" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>lua</span></a> would only work in NeoVim. Maybe <a href="https://hachyderm.io/tags/vimscript" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>vimscript</span></a> from just before 9. Maybe <a href="https://hachyderm.io/tags/Python" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Python</span></a>. Maybe <a href="https://hachyderm.io/tags/rustlang" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>rustlang</span></a>. All three of those would run in both. I kinda don’t want to use VimScript, but that’s technically the correct choice.</p><p>Of course it would be waaay easier if it used the <a href="https://hachyderm.io/tags/lsp" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>lsp</span></a>. Otherwise you’re parsing patterns and brackets and strings. Not sure such a solution works in plain old Vim. </p><p>What does the <a href="https://hachyderm.io/tags/fediverse" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>fediverse</span></a> say?</p>
VimLinks<p>If you'd like to convert some of your Vim scripts and configuration to vim9script, this tool could be a useful starting point: <a href="https://github.com/ubaldot/vim9-conversion-aid" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">github.com/ubaldot/vim9-conver</span><span class="invisible">sion-aid</span></a></p><p><a href="https://hachyderm.io/tags/vim" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>vim</span></a> <a href="https://hachyderm.io/tags/vim9" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>vim9</span></a> <a href="https://hachyderm.io/tags/vim9script" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>vim9script</span></a></p>
Woland Azel<p>I wrote an emoji plugin for Vim in vim9script.</p><p>Check it out:<br><a href="https://github.com/wolandark/vim-ez-emoji" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">github.com/wolandark/vim-ez-em</span><span class="invisible">oji</span></a></p><p>Its nothing fancy, just two compiled functions consist of a load of abbreviations.<br>Does the job and is pretty quick.</p><p><a href="https://mastodon.social/tags/vim" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>vim</span></a> <a href="https://mastodon.social/tags/vimplugin" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>vimplugin</span></a> <a href="https://mastodon.social/tags/Vim9" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Vim9</span></a> <a href="https://mastodon.social/tags/vim9script" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>vim9script</span></a></p>