Whole-known-network
<p>i like that the MSDN example for using FormatMessage is using printf to handle the error returned by it</p>
<p><span class="h-card" translate="no"><a href="https://mastodon.social/@whitequark" class="u-url mention">@<span>whitequark</span></a></span> just a small joke about using man for windows syscalls</p>
<p><span class="h-card" translate="no"><a href="https://masto.ai/@iaotsam" class="u-url mention">@<span>iaotsam</span></a></span> what</p>
<p><span class="h-card" translate="no"><a href="https://mastodon.social/@whitequark" class="u-url mention">@<span>whitequark</span></a></span> why not just<br />man 2 CloseHandle<br />?</p>
<p>i also figured out that WinNT allocates three standard I/O handles, but Wine allocates six of them for some reason, which is mildly interesting</p>
<p>the windows nt equivalent of Lucky Star episode 1 is a 15 minute discussion i've just had on whether you should be using</p><p> if (hFile != INVALID_HANDLE_VALUE)<br /> CloseHandle(hFile);</p><p>or </p><p> CloseHandle(hFile);</p><p>which involved disassembling kernelbase.dll and ntoskrnl.exe</p><p>(the answer is that you should use the former because CloseHandle retains last error code iff the result is STATUS_SUCCESS)</p>
<p>Now, since *I'm* the one writing this LISP, I do get to make some changes. The main thing I wanted to change, as it's the #1 thing that infuriates me writing LISP, is parentheses. This "LISP" has a syntax where each line (as separated by newlines or commas) implicitly has () around it. Meanwhile, {} and [] are shorthand, for</p><p>{x,y,z} => '((x)(y)(z))</p><p>[x,y,z] => (make-array [(x),(y),(z)])</p><p>In other words {} is functions (quoted lists) and [] is array literals.</p><p>Is this still a LISP? I don't care!</p>
<p>Save an extra 10% on the Fanatical Play on the Go Bundle Elite Collection with our code <a href="https://www.gamingonlinux.com/2025/04/save-an-extra-10-on-the-fanatical-play-on-the-go-bundle-elite-collection-with-our-code/" target="_blank" rel="nofollow noopener" translate="no"><span class="invisible">https://www.</span><span class="ellipsis">gamingonlinux.com/2025/04/save</span><span class="invisible">-an-extra-10-on-the-fanatical-play-on-the-go-bundle-elite-collection-with-our-code/</span></a></p><p><a href="https://mastodon.social/tags/SteamDeck" class="mention hashtag" rel="tag">#<span>SteamDeck</span></a> <a href="https://mastodon.social/tags/Fanatical" class="mention hashtag" rel="tag">#<span>Fanatical</span></a> <a href="https://mastodon.social/tags/Gaming" class="mention hashtag" rel="tag">#<span>Gaming</span></a> <a href="https://mastodon.social/tags/PCGaming" class="mention hashtag" rel="tag">#<span>PCGaming</span></a> <a href="https://mastodon.social/tags/Linux" class="mention hashtag" rel="tag">#<span>Linux</span></a> <a href="https://mastodon.social/tags/SteamOS" class="mention hashtag" rel="tag">#<span>SteamOS</span></a></p>
<p>Anyway, now I have a LISP interpreter written in Rust.</p><p><a href="https://github.com/mcclure/lisp0-experiment/tree/2025-04-07" target="_blank" rel="nofollow noopener" translate="no"><span class="invisible">https://</span><span class="ellipsis">github.com/mcclure/lisp0-exper</span><span class="invisible">iment/tree/2025-04-07</span></a></p><p>It's a very minimal "MVP"; the language currently lacks:</p><p>- Variable scopes<br />- Loops<br />- Conditionals<br />- Floating point numbers<br />- Errors lack backtraces or line numbers (and cannot be recovered from)</p><p>It has</p><p>- One global scope<br />- Ints, strings, arrays and hashtables<br />- Tail recursion<br />- File I/O</p><p>But math and recursion means it's Turing complete. Which means it's sufficient to use it for a AOC problem!</p>