HNHacker News
TopNewBestAskShowJobs

badsectoracula

8,808 karma · joined August 13, 2009

Mail me at badsector@runtimeterror.com
submissionscomments
badsectoracula··on Fine-tuning an LLM to write docs like it's 1995
TBH i actually haven't tried that at all (or "skills" in general since my PC isn't fast enough for doing much more than chatbot-style interactions with maybe the occasional -custom- MCP server to let it access files, external data, etc -- i'd love to get a second PC that i can use for LLMs, among other stuff, but that's far in the future).

Out of curiosity i just tried having the LLM generate a document describing the style, then (after a memory reset) i asked it to use the document and it did more or less the same job, however the document also had an example and the example seemed to do most of the "real job" of describing the style because at first the function docs that were generated were prefixed with 4 spaces - like the example in the doc (but the example in the doc had four spaces for indentation) and after i edited the doc to remove the spaces the function docs it generated were like those generated in the transcript i linked above.

Which makes me think that the example is the better approach (since the doc also had an example) and perhaps the best is to give an example with clarifications about the parts the example doesn't cover (like using a 80 line character limit).

FWIW when i wanted the LLM to write some new C source + header files some time ago, i also pointed it to an existing pair of C/H files to use for the code style and it worked fine, so at least in my experience examples seem to work very good.

badsectoracula··on Fine-tuning an LLM to write docs like it's 1995
I've heard about this but i prefer to avoid anything cloud based (not just for AI but in general). I try to avoid relying on stuff i have little to no control over.
badsectoracula··on Fine-tuning an LLM to write docs like it's 1995
Yes, TBH one of the reasons i want to try and finetune my own is to teach it stuff that now i have to explain before anything can be done :-P.

Unfortunately i only have a 24GB GPU - and an AMD one at that - so there isn't much i can do on that front. Supposedly a 24GB GPU is enough for finetuning a 24B model with 4bit QLoRA, though when i tried it with some finetuning app (in an official docker container) it barfed at Mistral's weird template or something and i lost interest after that.

badsectoracula··on Fine-tuning an LLM to write docs like it's 1995
The information about finetuning is interesting (it is something i'd like to do myself at some point, though i'll wait until i can do it with local hardware :-P). However FWIW LLMs are generally good at following a specific style when given examples.

As an example i asked Devstral Small 2 to write some docs for my LIL scripting language in the following style (this is copied from the DirectDraw documentation, edited to be text friendly):

    IDirectDraw7::CreateClipper
    ---------------------------

    The IDirectDraw7::CreateClipper method creates a DirectDrawClipper object. 

        HRESULT CreateClipper(
        DWORD dwFlags,
        LPDIRECTDRAWCLIPPER FAR *lplpDDClipper,
        IUnknown FAR *pUnkOuter
        );

    Parameters

    * dwFlags - Currently not used and must be set to 0. 
    
    * lplpDDClipper - Address of a variable to be set to a valid
        IDirectDrawClipper interface pointer if the call succeeds.
        
    * pUnkOuter - Allows for future compatibility with COM aggregation features.
        Presently, however, this method returns an error if this parameter is
        anything but NULL. 
        
    Return Values

    If the method succeeds, the return value is DD_OK.

    If it fails, the method can return one of the following error values: 

    * DDERR_INVALIDOBJECT
    * DDERR_INVALIDPARAMS
    * DDERR_NOCOOPERATIVELEVELSET
    * DDERR_OUTOFMEMORY

    Remarks

    The DirectDrawClipper object can be attached to a DirectDrawSurface and used
    during IDirectDrawSurface7::Blt, IDirectDrawSurface7::BltBatch, and
    IDirectDrawSurface7::UpdateOverlay operations.

    To create a DirectDrawClipper object that is not owned by a specific
    DirectDraw object, use the DirectDrawCreateClipper function.

    Requirements 

    Windows NT/2000: Requires Windows 2000.
    Windows 95/98: Requires Windows 98.
    Header: Declared in ddraw.h. 

    See Also

    IDirectDrawSurface7::GetClipper, IDirectDrawSurface7::SetClipper
And it did a fine job. I put the full transcript in[0] to check out. The neat bit is that it can even handle weird formats like a custom documentation format i have (which only exists in my PC because i haven't released it anywhere) for a "master document" that can then be converted to various other file types. I gave it an example of some code in that and asked it to convert the documentation to it (this is part of the transcript at the end). Then i copy/pasted the generated code to a new file (adding a few extra lines the doc system expects which weren't part of the example - BTW i did not had to modify the generated code at all) and from that i generated a CHM file[1]. FWIW here is a comparison with the DirectX page i copied[2] (though consider that the generated pages went through the doc format which forces its own style and the textual output in the transcript matches the given style better).

[0] https://app.filen.io/#/d/9f4c1225-3527-4f16-a522-0678342120c...

[1] http://runtimeterror.com/pages/iv/images/45f8df428afe4fe6b6a...

[2] http://runtimeterror.com/pages/iv/images/ee58032790a049d7e74...

badsectoracula··on KDE at 30
I don't really use Plasma itself (and soon i wont even be able to if the rumors of them dropping X11 support are to be believed) but i do use various KDE apps, like Krita (which i use for most painting stuff), Kate (my main programming editor, coupled with clangd for C/C++ programming), KolourPaint, Spectacle, Ghostwriter, etc and in general i find KDE/Qt apps to be more to my liking in their UX than anything based on Gtk (or at least Gtk3-or-later, Gtk2 stuff is for the most part fine).
badsectoracula··on Windows GOG DOS Games on M-Series Macs
Last time i checked (and DOSBox hasn't made an official release since then) the vanilla DOSBox isn't able to run the game i made for an MS-DOS game jam a few years ago[0] because it doesn't implement RDTSC properly (that the game uses for timing). All currently developed DOSBox forks work properly.

Also the forks add some additional niceties, e.g. DOSBox Staging has some very nice CRT filters that basically make games look almost like the real thing (i have some actual CRTs to compare). DOSBox-X has a GUI to setup options while the emulator is running which is very convenient.

[0] https://bad-sector.itch.io/post-apocalyptic-petra

badsectoracula··on Claude Opus 4.8
> "anthropos" just means "human" in ancient Greek

FWIW it means human in modern Greek too :-P

badsectoracula··on Gemini Omni
The physics engine glitching is very realistic :-P
badsectoracula··on Removable batteries in smartphones will be mandatory in the EU starting in 2027
When i wrote that comment i checked gsmarena and it looked to me that it cannot get the latest Android, meaning that even if it gets some minor version upgrade, it wont be long before that stops.
badsectoracula··on Removable batteries in smartphones will be mandatory in the EU starting in 2027
I did check gsmarena and it looked to me that it cannot get the latest Android.
badsectoracula··on IBM didn't want Microsoft to use the Tab key to move between dialog fields
I meant UI stuff like the desktop metaphor (Macintosh also had one but Win95's approach was more popular and mimicked in other environments), the start menu, the taskbar, etc, some newly introduced controls like tabs (i think OS/2 had tab-like controls/containers but they worked differently to those in Win95 and nowadays pretty much all tabs work like in Win95).
badsectoracula··on IBM didn't want Microsoft to use the Tab key to move between dialog fields
I know about the theme, i'm using Window Maker which uses a theme closer to NextStep and occasionally i hack on a toolkit[0] that has a Next-ish look (and feel, to some extent).

However i meant stuff like the desktop metaphor (Macintosh also had one but Win95's approach was more popular and mimicked in other environments), the start menu, the taskbar, etc, some newly introduced controls like tabs (i think OS/2 had tab-like controls/containers but they worked differently to those in Win95 and nowadays pretty much all tabs work like in Win95).

[0] https://i.imgur.com/yaU5OLn.png

badsectoracula··on What's in a GGUF, besides the weights – and what's still missing?
AFAIK[0] they are (usually) so-called "special" tokens - e.g <|turn> is token id 105 for the vocabulary Gemma4 uses. When you are tokenizing text you can either tokenize the "<|turn>" as a single token (105) or as a series of other tokens (236820, 236909, 887 and 236813 for the "<", "|", "turn" and ">" tokens) with the idea being that the model will treat "105" as the actual separator but can also use "<|turn>" as part of the content.

Though using text-based templates make this a bit tricky regardless. AFAIK llama.cpp tries to avoid this confusion by having their Jinja2 implementation use a custom string type that contains metadata about where characters "come from" so that it can distinguish between special tokens (which would be part of the Jinja2 template) and content (which would be either generated text or text given in by the user) - i.e. even if a string is "<|turn>" the metadata would be used to tell if it is meant to be tokenized as a special token or as a series of non-special tokens.

[0] i might be wrong, this is based on my understanding by messing around with the llama.cpp code, but i never implemented an LLM inference or training engine

badsectoracula··on What's in a GGUF, besides the weights – and what's still missing?
> not to be confused with the somewhat baffling llama_chat_apply_template exposed in the libllama API, which hardcodes a handful of chat formats directly in C++

As someone who is tinkering with a desktop-based inference app in FLTK[0], i wish this used the actual Jinja2 template parser llama.cpp uses (or there was another C function that did that since AFAICT for "proper" parsing you need to be able to pass a bunch of data to the template so it knows if you, e.g., do tool calling). Currently i'm using this adhocky function, but i guess i'll either write a Jinja2 interpreter or copy/paste the one from llama.cpp's code (depending on how i feel at the time :-P).

But yeah, GGUF's "all-in-one" approach is very convenient. And i agree that it feels odd to have the projection models as separate files - i remember when i first download a vision-capable model, i just grabbed whatever GGUF looked appropriate, then llama.cpp told me it couldn't do model and took me a bit to realize that i had to download an extra file. Literally my thought once i did was "wasn't GGUF supposed to contain everything?" :-P

[0] https://i.imgur.com/GiTBE1j.png

badsectoracula··on Linux gaming is faster because Windows APIs are becoming Linux kernel features
> the Windows binary works if you install its library dependencies (wine).

Yes but all it takes is an `apt-get install wine` or `zypper install wine` or `pacman -S wine` or your distro equivalent and if you are using a Linux distro with any sort of desktop functionality, 99% of the time wine will be there.

> Your distribution stopped distributing the dependencies, making them harder to find?

Yes, this is a big problem because these dependencies not only are harder to find but even if you track all of them (there is a chance they too have their own dependencies) you still need to figure out how to build and install them. And if they are old enough for distros to drop them, then chances are building them isn't going to be a straightforward `./configure && make && make install` ("straightforward" is very relative here :-P). And woe is you if there are conflicts with newer (yet API/ABI incompatible) versions of these libraries and/or their dependencies.

Of course since you have the source, technically you can make things work, but that doesn't make the process any less of a major PITA.

badsectoracula··on dBase: 1979-2026
Why not <= then? I'd expect both < and = to be available.
badsectoracula··on dBase: 1979-2026
I don't know about converting it to "high concurrent Go" or anything like that, but after searching a bit, i found some old PRG code for dBase III Plus someone posted in a googlegroup, gave it to Devstral Small 2 (local model) and asked it to convert it to C# and the conversion looked fine to me, using .NET's database functionality, etc. It is too long to post it though (also TBH the code had some questionable fields).

In general LLMs seem to be very good at translating between programming languages and something like PRG uses very straightforward syntax and concepts. The first attempt by the LLM did a mostly one-to-one conversion using the console but i asked it to convert it to Windows Forms and the code looked fine for that too, using appropriate controls for the fields like text, combobox or datetime pickers (though it used fixed coordinates for the controls so i'm not sure if that looked fine).

FWIW, i didn't try to run the code (i'm on Linux and i do not even have anything related to C# on my PC nor a DB to work with :-P) and chances are there might be some subtle mistakes, but it looked like a decent starting point. IME, at least with local models, converting code between languages in a piecemeal fashion is trivial even with weird/less common languages (you may need to put some instructions to the LLM on a few edge cases though). And IMO that approach would be the right way to do it instead of dumping the entire codebase to it and hoping for the best :-P

badsectoracula··on IBM didn't want Microsoft to use the Tab key to move between dialog fields
There is: this one.

Win95's UI was so incredibly influential that stuff introduced by it are still around to this day.

badsectoracula··on Days without GitHub incidents
There is Phorge which is a community fork.
badsectoracula··on Removable batteries in smartphones will be mandatory in the EU starting in 2027
Unfortunately it is from 2022, meaning no OS upgrades.

I think the next mandatory laws EU should pass is that manufacturers should either allow people to upgrade/replace the OS by themselves or provide mandatory upgrades for the next decade (i don't care how the manufacturers handle it, that's up to them, but the easiest way out of such a law is to allow people upgrade/replace the OS by themselves).

badsectoracula··on Removable batteries in smartphones will be mandatory in the EU starting in 2027
No 3.5mm jack though :-/
badsectoracula··on From CVS to Git, thirty years of source control
The thing with Subversion's native support for the feature is that it is, well, native. No workarounds (using a local svn repo is extremely clunky) or external tools needed, the feature is part of the normal official workflow.

The issue isn't that it was technically impossible to do this before, it is that it wasn't something available out of the box back when it mattered. The feature was added several years after Git's dominance and by that point few people cared about Subversion.

badsectoracula··on From CVS to Git, thirty years of source control
> What SVN didn't fix was the fundamental centralized model. You could not commit without a network connection. The repository was still a single server. "Working offline" meant "reading-only", you could browse history but not record any new work, and the day the server was down was the day the whole team waited.

FWIW this is how most projects work anyway. And IMO Subversion is still the best VCS when you have a lot of large binaries (the various extensions to Git like git-lfs are just hacks that graft a separate half-baked version control system to it and add further complexity to an already annoyingly complex system). I remember working at a gamedev company in early 2010s and out of curiosity i tried to put everything in the 250GB perforce workspace in a git repository only for git to choke and die before it managed to do anything. In comparison, ~5-6 years earlier i worked briefly at a game porting studio where every single game they had ported (which i'm almost certain went all the way back to the 90s), including all data and source (and these were AAA games, not tiny indie games), were into a single Subversion server.

Unfortunately Subversion lost the VCS fashion wars and nowadays it barely seems to have any development. I still use it for a few projects where i do have a lot of binary stuff, but most new things are in Git. I also have a bunch of stuff in Fossil (which also did handle binary files better than Git when i tested it years ago, though not as good as Subversion or P4) but nowadays i convert them to Git when i need to share because, well, pretty much everyone expects Git (and projects such as Codeberg and Forgejo make sharing and self-hosting easier).

Ironically the "fundamental issue" mentioned above was solved not too long ago with Subversion as nowadays you can have multiple "changelists" and each changelist is a full (hidden) SVN repository by itself, allowing you to do commits (as "shelving") and such locally and then push to remote when you're done. AFAIK changelists can also coexist (unlike Git where you can only work at one branch at each time). Unfortunately since Subversion is basically barely held together, only the command-line UI provides that functionality (at least in FLOSS clients) and even TortoiseSvn didn't seem to support it last time i checked.

badsectoracula··on Why TUIs are back
> which is really integrated into a programming language or part of the standard library.

Not a programming language, but the programming language: C. The toolkit needs to be available as a C API because that lets it a) provide stable API and ABI and b) provide bindings for multiple other languages without having to jump through hoops, especially for other compiled languages (binding Qt to Python might be easy, but bindings to something like, e.g. Free Pascal requires an intermediate C++ library that exposes a C API that itself can be used from Free Pascal - and applications need to distribute it that library too).

Unfortunately the vast majority of GUI toolkits are not writtne in C but in C++ or some other language that makes using them from anything than the developers' favorite language a pain. And really the only mainstream that is written in C is GTK which has a complete disregard for proper backwards compatibility.

(you may think that a library only needs to expose a C API but it can be written in any language, however for something that doesn't have any widespread availability, you may want to link to it statically - however that can be an issue with anything outside C/C++ - as an example i recently tried to make a FLTK backend[0] for Lazarus since FLTK is a C++ library that the devs encourage to link it statically and it would allow creating GUI programs that are self-contained binaries... but statically linking a C++ library -for which i had to first make a C wrapper- in a non-C/C++ turns out to be a PITA under Linux if you are not g++ as that does passes a bunch of magic flags to the linker and impossible under Windows - or at least msys2, so i gave up).

[0] https://i.imgur.com/W6XbLkr.png

badsectoracula··on Why TUIs are back
> You can't even display an image in a terminal without a non-standard terminal like Kitty or iTerm.

Sixels are supported by many terminals[0] (several of the terminals mentioned that do not support them are based on GNOME VTE for which support is in the works and, based on the bug tracker comments, it seems to be almost done).

This includes xterm which is probably the most "standard terminal" on X11 you can get.

[0] https://www.arewesixelyet.com/

badsectoracula··on Mistral built a $14B AI empire by not being American
FWIW i haven't used Claude or any other cloud-based LLM, only what i can run on my PC, so it could be that Claude is smart enough to follow the user's instructions, keep the equivalent of a mental state of what the user seems to want to do and only push back when it really makes sense whereas a small local LLM is too stupid to judge all that and Qwen3.6 errs on the side of being annoyingly cautious while Devstral Small 2 errs on the side of trusting the user being really okay with blowing their toes off :-P. As i wrote in my original reply, this is my personal preference and i prefer the LLM to just do what i ask.
badsectoracula··on Mistral built a $14B AI empire by not being American
I think there is a reason why people do that: trying to steer -those they consider- newbies away from patterns they consider bad, but at the same time this second-guessing can be annoying when you know what you want to do (especially when the original question isn't actually answered yet it comes up in search engine results...).

I can't say if it is a good reason in general, perhaps it is, but it certainly is something i personally find annoying. I think answers should provide an answer to the question asked and then, after that answer was given, they could also give pointers for whatever they consider a better approach and why - this is important, IMO, for a public forum where people of all backgrounds and goals can read the same stuff.

But either way, LLMs IMO should do/provide what they are asked without trying to second guess the user (or at least, there should be LLMs that act like that).

badsectoracula··on Mistral built a $14B AI empire by not being American
TBH sometimes i feel like i'm "emotionally attached" to Mistral's models because i always end up using them :-P. However that is because, as you wrote, their small models (i only use local stuff) are very strong. In fact i was trying Qwen3.6 27B recently and while it is nice that it can do tool calls during the reasoning process (i had it confirm its thoughts by writing Python code) it often ended up confusing itself (regardless of tool calls) during reasoning, ending up in loops where it questions itself over and over endlessly.

Devstral Small 2 however just works, for the most part. Qwen3.6 27B can probably handle more complex tasks (when i asked it as a test to write a function that checks for collision between two AABBs in C and gave it a tool to call Python code for confirmation, it actually wrote a Python script that writes C code with the tests, then calls GCC to compile the C code and runs the binary to run the tests, which is something Mistral's small models couldn't do) but i always felt i can just leave DS2 doing stuff in the background (or when i'm doing something else) and it'll produce something relatively useful whereas the little time i spent with Qwen3.6 27B it felt more "unstable" (and much slower, both because of literally slower inference and because of endless reams of text).

Recently i also started using Ministral 3B and 14B - these can do some reasoning too and for very simple stuff Ministral 3B is very fast (i actually didn't expect a 3B model to be anything more than novelty) and have some vision abilities (though they're quite mediocre at vision so i haven't found much use for this - passing something via GLM-OCR to extract all text and feed it to another model feels more practical).

Also as i wrote in another comment, every Mistral model i've tried never questioned me, which i certainly prefer

badsectoracula··on Mistral built a $14B AI empire by not being American
FWIW personally i prefer this. When i tried Qwen3.6 and asked it a few questions, while it did respond, it was ADAMANT i should do something else when i really wanted an answer to the question i made. It felt like when you search something and a stackoverflow answer about what you search for comes up and the most upvoted answer is about using/doing something else - when you want a specific answer to that specific question, not something else.

Meanwhile Devstral Small 2 just answers the damn question.

I don't want to have to convince my computer to do what i want it to do, i want from it to do what i ask it to.

badsectoracula··on Using coding assistance tools to revive projects you never were going to finish
Jokes on you, i'm running my local models on AMD :-P
← PreviousPage 6 of 34Next →