((((sandro.net))))
Manuntençao para Pcs
quinta-feira, 1 de outubro de 2026
Show HN: Yantra – an LALR(1) parser generator for C++ https://ift.tt/z0xqAn4
Show HN: Yantra – an LALR(1) parser generator for C++ Yantra is a C++ parser generator: lexer, parser, and AST walker all generated from one tool.
It builds the whole AST first, then walks it. Most LALR parser generators (Yacc, Bison, Lemon) run your semantic actions during parsing, as each rule reduces, bottom-up. That means at the time a rule's action runs, you don't yet know what its parent looks like. This pushes a lot of grammars toward hand-built AST classes and a separate walking pass whenever you need to look ahead into siblings or defer a decision until more context is available. On the other hand, Yantra always builds the whole AST first, then walks it top-down in a separate pass, calling your semantic actions as it goes. A parent rule's action can run before its children are visited. A single grammar can define more than one walker. For example, one that emits C++, another that emits Java, from the same parse. The AST and the walker classes are both generated for you. A small example (full version, with compile commands, in the README): start := expr;
expr := expr(a) PLUS expr(b)
%{
std::cout << "Adding" << std::endl;
%}
expr := NUMBER(N)
%{
std::cout << "Number: " << N.text << std::endl;
%}
NUMBER := "\d+";
PLUS := "\+";
WS := "\s+"!;
Running this on "1 + 2 + 3" prints: Adding
Number: 1
Adding
Number: 2
Number: 3
The outer "Adding", the root of the tree, prints first, before either of its children. That's only possible because the whole tree exists before any action runs. Some other things about it: integrated lexer with mode support (for things like nested comments), an optional amalgamated single-file output mode with a generated main(), C++23, MIT licensed. It's young (0.5.1, pre-1.0) and single-maintainer, so treat it as early.
I'd rather know what breaks than have it look more finished than it is. Known gaps are listed at
https://github.com/TantrixAuto/yantra/blob/main/docs/known_l... Repo: https://github.com/TantrixAuto/yantra Feedback and questions are all welcome. I'll be around. https://github.com/TantrixAuto/yantra September 30, 2026 at 11:30PM
quarta-feira, 30 de setembro de 2026
Show HN: A small side project for even colour scales https://ift.tt/KPfL5xm
Show HN: A small side project for even colour scales I am no developer but a designer. For a side project I needed a colour palette in which any hue looks about equally light and colorful at any shade as any other hue in shades. It was hard to create this palette with typical color pickers in HSB or HSL, even when I tried to do it systematically. Some shades just seemed brighter or more colourful than others. I also couldnt find any other tool that could do it the way i wanted. So I fell down a rabbit hole and built a small tool to solve it. Its a bit over engineered now but I had fun doing it and really does the job for me now. It uses no framework and is tiny, which I like. You can read more about it here
colours.viesual.net/about Maybe its useful to anyone else. Happy for feedback! https://ift.tt/fCKUg1j September 30, 2026 at 04:02AM
Show HN: Layout – Order food anywhere with AI https://ift.tt/L8qU0Gj
Show HN: Layout – Order food anywhere with AI Layout lets you order food anywhere with AI. Text it what you want, like "iced americano from Starbucks," and it builds the cart at the restaurant, sends you the total, and securely places the order. Works at almost any restaurant in the US over SMS, the iOS app, or any MCP client like ChatGPT. Developers can integrate our infrastructure into their own platforms at developer.layout.link. https://layout.link/ September 30, 2026 at 05:55AM
Show HN: Using 2D DFT, dithering, etc. to maximize eInk manga image quality https://ift.tt/moJ5q3I
Show HN: Using 2D DFT, dithering, etc. to maximize eInk manga image quality Kindle Comic Converter optimizes black & white (or color) comics and manga for E-ink ereaders like Kindle, Kobo, ReMarkable, and more. Pages display in fullscreen without margins, with proper fixed layout support. Output works great in KOReader. Full details on what KCC does is in the readme with plenty of photos! KCC has been under continuous development since 2012 and has code sign on both Windows and macOS. Also available on Linux. -the current kcc dev https://ift.tt/qCRiEFm September 28, 2026 at 12:39PM
terça-feira, 29 de setembro de 2026
Show HN: A goal tracker that looks like a 1983 terminal, drawn in Swift https://ift.tt/G0gnloN
Show HN: A goal tracker that looks like a 1983 terminal, drawn in Swift https://ift.tt/WqbPdM5 September 29, 2026 at 05:45AM
Show HN: Museum of Numbers https://ift.tt/PIb3KXe
Show HN: Museum of Numbers https://ift.tt/gUb2iKx September 26, 2026 at 02:36PM
Show HN: Pac-Bench – How well can models one-shot a Pac-Man game? https://ift.tt/A9TxUGz
Show HN: Pac-Bench – How well can models one-shot a Pac-Man game? Benchmarks how well Harness+models can create a Pac-Man game from a single prompt: “Create a Pac-Man game in a single HTML page” Each model gets one shot — no follow-up prompts or fixes. https://jonclegg.github.io/pacman-bakeoff/ September 28, 2026 at 07:43PM
Assinar:
Postagens (Atom)
DJ Sandro
http://sandroxbox.listen2myradio.com