HNHacker News
TopNewBestAskShowJobs

mingodad

420 karma · joined March 31, 2015

submissionscomments
mingodad··on Show HN: Yantra – an LALR(1) parser generator for C++
For people interested on this topic I strongly recommend to also look at Ben Hanson https://github.com/BenHanson/parsertl17 and based on it I've created an online LALR(1) playground here https://mingodad.github.io/parsertl-playground/playground/ where you have around 350 non trivial. grammars to experiment (select one from the `Examples` dropdown and then click `Parse` to see a parse tree for the input in `Input`, it also generates EBNF to generate nice navigable railroad diagrams on https://www.bottlecaps.de/rr/ui .
mingodad··on LuaJIT 3.0 proposed syntax extensions
For others interested in alternative syntax to the Lua VM/API sometime ago I've created LJS https://github.com/mingodad/ljs and also https://github.com/mingodad/ljsjit, I've also included an utility lua2ljs program based on the Lemon parser and re2c that convert Lua scripts to LJS with line by line synchronization https://github.com/mingodad/ljs/tree/master/lua2ljs, to test it I've also translated a few non trivial projects (https://github.com/mingodad/ZeroBraneStudioLJS , https://github.com/mingodad/raptorjit-ljs, https://github.com/mingodad/snabb-ljs, https://github.com/mingodad/premake-core/tree/ljs, https://github.com/mingodad/CorsixTH-ljs).

I'm proud of it and thankfull to the Lua/Luajit projects.

mingodad··on Free SQL→ER diagram tool, runs in the browser, nothing uploaded
I'm using https://github.com/ondras/wwwsqldesigner and I think that's worth taking it in account for comparison.
mingodad··on How to run Qwen 3.5 locally
I'm still a bit confused because it says "All uploads use Unsloth Dynamic 2.0" but then when looking at the available options like for 4 bits there is:

IQ4_XS 5.17 GB, Q4_K_S 5.39 GB, IQ4_NL 5.37 GB, Q4_0 5.38 GB, Q4_1 5.84 GB, Q4_K_M 5.68 GB, UD-Q4_K_XL 5.97 GB

And no explanation for what they are and what tradeoffs they have, but in the turorial it explicitly used Q4_K_XL with llama.cpp .

I'm using a macmini m4 16GB and so far my prefered model is Qwen3-4B-Instruct-2507-Q4_K_M although a bit chat but my test with Qwen3.5-4B-UD-Q4_K_XL shows it's a lot more chat, I'm basically using it in chat mode for basic man style questions.

I understand that each user has it's own specific needs but would be nice to have a place that have a list of typical models/hardware listed with it's common config parameters and memory usage.

Even on redit specific channels it's a bit of nightmare of loot of talk but no concrete config/usage clear examples.

I'm floowing this topic heavilly for the last 3 months and I see more confusion than clarification.

Right now I'm getting good cost/benefit results with the qwen cli with coder-model in the cloud and watching constantly to see when a local model on affordable hardware with enviroment firendly energy comsumption arrives.

mingodad··on Coccinelle: Source-to-source transformation tool
There is also https://sparse.docs.kernel.org/ that can be used to help refactoring C code.
mingodad··on OpenAI declares 'code red' as Google catches up in AI race
Interesting enough today I found that https://huggingface.co/openai/gpt-oss-20b when downloaded an running locally and asked:

====

when have you been built?

I’m a GPT‑4‑based model that OpenAI released on March 14 2023. The underlying training data goes up to early 2023, and the model was trained in the months leading up to that release. If you’re asking about the ChatGPT product that ships the model to users, it went live in November 2022 and has since received updates (GPT‑3.5, GPT‑4, etc.) that keep it current.

====

But when supposedly running it from https://huggingface.co/chat/models/openai/gpt-oss-20b:

====

when have you been built?

I’m a language model created by OpenAI. The current generation (GPT‑4) that powers this chat was first released in March 2023 and has been updated and fine‑tuned up through the end of 2024. My training data runs up to the beginning of June 2025, so I’m built on knowledge available up to that point.

====

And that makes me thinking that although https://huggingface.co/chat claims to be using the models available to public at https://huggingface.co , it doesn't seems to be true and I raised this question here https://huggingface.co/ggml-org/gpt-oss-20b-GGUF/discussions... , https://github.com/huggingface/inference-playground/issues/1... and https://github.com/ggml-org/llama.cpp/discussions/15396#disc... .

mingodad··on So you wanna build a local RAG?
I did an experiment while learning about LLMs and llama.cpp consisting in trying to use create a Lua extension to use llama.cpp API to enhance LLMs with agent/RAG written in Lua with simple code to learn the basics and after more than 5 hours chatting with https://aistudio.google.com/prompts/new_chat?model=gemini-3-... (see the scrapped output of the whole session attached) I've got a lot far in terms of learning how to use an LLM to help develop/debug/learn about a topic (in this case agent/RAG with llama.cpp API using Lua).

I'm posting it here just in case it can help others to see and comment/improve it (it was using around 100K tokens at the end and started getting noticeable slow but still very helpful).

You can see the scrapped text for the whole seession here https://github.com/ggml-org/llama.cpp/discussions/17600

mingodad··on AI documentation you can talk to, for every repo
I've asked to index my project https://github.com/mingodad/parsertl-playground and the result https://deepwiki.com/mingodad/parsertl-playground seems to be reasonable good (still going through in more detail but overall impressive).
mingodad··on I write type-safe generic data structures in C
https://github.com/mingodad/cfront-3
mingodad··on I write type-safe generic data structures in C
Here I've got it to work with recent compilers/OSs https://github.com/mingodad/cfront-3
mingodad··on Ask HN: What are you working on? (May 2025)
I'm collecting a collection of PEG grammars here https://mingodad.github.io/cpp-peglib and Yacc/Lex grammars here https://mingodad.github.io/parsertl-playground/playground both are wasm based playgrounds to test/develop/debug grammars.

The idea is to improve the tooling to work with grammars, for example generating railroad diagrams, source, stats, state machines, traces, ...

On both of then select one grammar from "Examples" then click "Parse" to see a parse tree or ast for the content in "Input source", then edit the grammar/input to test new ideas.

There is also https://mingodad.github.io/plgh/json2ebnf.html to generate EBNF for railroad diagram generation form tree-sitter grammars.

Any feedback, contribution is welcome !

mingodad··on Show HN: SQLite JavaScript - extend your database with JavaScript
There is also https://github.com/ricomariani/CG-SQL-author that has a powerful stored procedure capabilities that can be transpiled to C/Lua/..., you can try it in your browser here https://mingodad.github.io/CG-SQL-Lua-playground .
mingodad··on Show HN: Vaev – A browser engine built from scratch (It renders google.com)
There is also https://sciter.com/ that the author tried to find finance to make it opensource but couldn't find enough supporters.
mingodad··on Show HN: A Database Written in Golang
I do have a big collection of LALR(1) grammars to test/study/develop/document here https://mingodad.github.io/parsertl-playground/playground/ including sqlite, tidb, vites, postgresql, mysql, ...
mingodad··on TinyCompiler: A compiler in a week-end
Not exactly the same but here https://github.com/robertoraggi/cplusplus there is one person serious effort to create a C++-23 compiler front end.
mingodad··on TinyCompiler: A compiler in a week-end
But if otherwise anyone want to try with Yacc/Lex I have an online interpreter/editor with more than 250 examples to try/study at https://mingodad.github.io/parsertl-playground/playground/ and just included a grammar for tinycompiler there (select "Tinycompiler parser" from "Examples" then click "Parse" to see a parse tree for the content in "Input source").
mingodad··on Servo's progress in 2024
No one mention Opera before adopting webkit/blink it was lightweight and fast. And even it's source code appeared in some places after a leak.
mingodad··on Supercharge SQLite with Ruby Functions
Also available with LUA http://lua.sqlite.org/index.cgi/doc/tip/doc/lsqlite3.wiki#db...
mingodad··on Some programming language ideas
Using the same idea there is https://datadraw.sourceforge.net/ and https://github.com/google/rune using it.

DataDraw is an ultra-fast persistent database for high performance programs written in C. It's so fast that many programs keep all their data in a DataDraw database, even while being manipulated in inner loops of compute intensive applications. Unlike slow SQL databases, DataDraw databases are compiled, and directly link into your C programs. DataDraw databases are resident in memory, making data manipulation even faster than if they were stored in native C data structures (really). Further, they can automatically support infinite undo/redo, greatly simplifying many applications.

mingodad··on Lua is so underrated
But I implemented a warning/error for variable shadowing.
mingodad··on Lua is so underrated
No changes to "global by default" and no checking are made to type annotations. The idea was to be able to convert any existing Lua code automatically and get it working as before like I did with some non trivial projects like:

- https://github.com/mingodad/CorsixTH-ljs - https://github.com/mingodad/ZeroBraneStudioLJS

mingodad··on Lua is so underrated
I've made changes to the Lua/LuaJIT lexer/Parser to have a C like syntax and a program to convert Lua syntax to LJS syntax you can see it in the repositories shown bellow, the C api and language semantics remain the same.

- https://github.com/mingodad/ljs

- https://github.com/mingodad/ljs-5.4

- https://github.com/mingodad/ljs-5.1

- https://github.com/mingodad/ljsjit

- https://github.com/mingodad/raptorjit-ljs

- https://github.com/mingodad/CorsixTH-ljs

- https://github.com/mingodad/snabb-ljs

- https://github.com/mingodad/ZeroBraneStudioLJS

mingodad··on Removing global state from LLD, the LLVM linker
Also for C/C++ binaries with debug info gdb is one of the ingredients used to show where and how much globals exists:

gdb -batch -ex "info variables" -ex quit --args binary-to-examine

mingodad··on Removing global state from LLD, the LLVM linker
I did the same for tinycc here https://github.com/mingodad/tinycc and used Netbeans IDE that has great refactoring options for C/C++/Java.

Benchmarking the reentrant result showed it to be around 5% slower.

Now I'm trying to redo it again but this time scripting the refactoring using sparse https://github.com/lucvoo/sparse to parse and using it's error messages with with line/column to guide the refactoring, I already got an initial script that performs some initial transformations and is repeatable, but more work need to be done, mainly enhance/extend the info that sparse provide while parsing the code.

mingodad··on Why I love Rust for tokenising and parsing
The lemon tool that is used by SQLite can output the grammar as SQL database that you can manipulate. There is https://github.com/ricomariani/CG-SQL-author that goes way beyond and you'll need to create the Rust generation, you can play with it here with a Lua backend https://mingodad.github.io/CG-SQL-Lua-playground/ .

Also I'm collecting several LALR(1) grammars here https://mingodad.github.io/parsertl-playground/playground/ that is an Yacc/Lex compatible online editor/interpreter that can generate EBNF for railroad diagram, SQL, C++ from the grammars, select "SQLite3 parser (partially working)" from "Examples" then click "Parse" to see the parse tree for the content in "Input source".

I also created https://mingodad.github.io/plgh/json2ebnf.html to have a unified view of tree-sitter grammars and https://mingodad.github.io/lua-wasm-playground/ where there is an Lua script to generate an alternative EBNF to write tree-sitter grammars that can later be converted to the standard "grammar.js".

mingodad··on CIL: C Intermediate Language
Have a look at http://ecere.org/ they already have it working.
mingodad··on CIL: C Intermediate Language
See also https://melt.cs.umn.edu/ableC/ that has a similar goal.
mingodad··on Tbsp – treesitter-based source processing language
I've added more non trivial grammars Javascript, Java, Kotlin, PHP, C, CPP, Rust, Ruby, CSS, HTML, Python using a quickjs script to convert "src/grammar.json" to an EBNF understood by https://mingodad.github.io/lua-wasm-playground/ (the script is here https://github.com/mingodad/plgh/blob/main/json2ebnf-lua.js).
mingodad··on Tbsp – treesitter-based source processing language
Also there was several requests to create a more formal grammar to describe the grammars but the tree-sitter developers doesn't like the idea and reject then.

But some people did nice attempts like https://github.com/eatkins/tree-sitter-ebnf-generator that I also adapted and exposed it here https://mingodad.github.io/lua-wasm-playground/ to allow play with it online (select "Tree-sitter-ebnf-generator" from examples then click "Run" to see a "grammar.js" generated from the content in "Input Text (arg[1])").

mingodad··on Tbsp – treesitter-based source processing language
I simple ignore then as right now they doesn't seen relevant in most grammars to generate an usable railroad diagram.
Page 1 of 6Next →