• v.1.0.0-beta.5 60852f13e6

    v.1.0.0-beta.5 Pre-release

    abiwab released this 2026-07-26 10:26:43 +02:00 | 0 commits to main since this release

    Release Notes - v1.0.0-beta.5

    Cleaning up the codebase

    Hi! Let's cut right to the chase: this beta 5 is about making sure the whole engine actually holds together reliably.

    As a solo developer working on Gram and learning as I go, the project has quietly turned into a pretty sizable monorepo (parser, kitchen, analyzer, renderer, cli, lsp, format). Recently, I ran into a — reportedly — classic problem: tweaking a line in one package would randomly break something else three packages away.

    Before adding any more features or syntax additions, I thought it would be preferable to stop and build a proper safety net. So for this release, I spent some time digging through the codebase, fixing edge cases, and locking down test suites and golden files across every package.

    Along with all that internal cleanup, this release packs many changes covering a brand-new code formatter, interactive Gantt charts right in VS Code, SSRF security guards, full rendering parity between Markdown, HTML, and printable HTML (gram print), and some long-overdue unit fixes for French recipes.


    Formatting & VS Code Tools

    • Standalone Formatter (@gram-lang/format): Extracted the formatting logic into its own package with 13 canonical rules. gram format in the CLI and Format on Save in VS Code now use the exact same engine.
    • Frontmatter Safety: gram format won't mess with casing inside frontmatter metadata blocks anymore (so emails like Jean@Example.com stay as-is).
    • Spacing Cleanup: Fixed #cookware at line starts being misread as section headers, and enforced exactly one blank line before ## Section titles.
    • VS Code Gantt View: You can now open a real-time Gantt chart panel right inside VS Code to inspect your recipe timelines while typing.

    Parser & Syntax Fixes

    • Sigil Swallow Bug: Fixed a nasty bug where bare mentions like @ingredient or #cookware without {} swallowed subsequent items or timers further down the line.
    • TextMate Highlighting: Aligned the VS Code syntax highlighter so it stops matching names at @, #, ~, ^, and &, fixing color bleed across lines.
    • Fraction Edge Cases: Fixed decimal numerators (1.5/2 no longer gets truncated to 0.5) and properly rejected zero denominators (1/0 no longer turns into null/Infinity).
    • Headerless Recipes: Fixed LSP crashes and missing symbols on recipes that don't start with a ## Section header.

    Engine & Calculation Fixes

    • ALAP Scheduling across Empty Sections: Empty or comment-only sections no longer mess up ALAP timing for following steps.
    • Named Track Chaining: Chaining steps on the same passive track (~_oven{...}) no longer triggers false conflict warnings.
    • Indirect Cycles: The compiler now catches indirect circular dependencies between sections and warns you about them.
    • Scaling Fixes: gram scale now scales cookware properly, eliminates float rounding noise like 110.00000000000001, and rejects extreme multipliers cleanly instead of crashing.
    • Timer Warnings: Unrecognized time units now produce proper warnings instead of fake durations.

    CLI & Security Hardening

    • SSRF Protection in gram import: gram import now refuses to fetch local or private addresses (localhost, internal IPs, cloud metadata), even across HTTP redirects.
    • API Key Isolation: Fixed a bug where an API key could leak to the wrong provider if multiple keys were set in your environment.
    • Safer DB Enrichment: gram db enrich rejects physically impossible AI suggestions (like absurd densities) and won’t claim success if nothing was written to disk.
    • Clean Terminal Output: Invalid DB entries now print warnings to stderr instead of stdout, so piping gram build | jq works reliably again.

    French Unit Fixes

    • livre: Now uses the French metric pound (500g) instead of the imperial pound (453.59g).
    • tasse: Now uses the French cup (250mL) instead of the US liquid cup (236.58mL).
    • quart: "Un quart d'heure" is no longer misidentified as a liquid quart volume in French recipes.
    • pinte: Emits an explicit unknown-unit warning instead of guessing a wrong number.
    • Language Awareness: language: in .gram/config.yaml now actually drives unit resolution and supermarket category sorting.

    Rendering & Parity

    • Full Format Parity: Markdown (toMarkdown), HTML, and printable HTML (toPrintHTML/gram print) now show the exact same information:
      • Markdown recipes now include full nutrition tables.
      • Recipe comments render as numbered footnotes in both Markdown and print output.
      • Gross vs. net weight notes (e.g. "1 avocado" vs usable flesh) show up everywhere.
      • Mixed unit warnings ("100g" + "1 cup") are grouped consistently across all exports.
    • XSS Neutralization: Raw HTML tags (< and &) are now escaped in toMarkdown and timing tooltips.
    • Print View Fixes: Fixed sodium showing up in grams instead of milligrams in print view (toPrintHTML), and fixed blank nutrition warnings.

    Language Server Resilience

    • No More Editor Crashes: A malformed ingredients.yaml, a remote workspace, or a failed background reload will no longer crash the entire VS Code extension session.
    • Fresh Buffer Operations: Formatting, renames, and code actions now operate directly on live editor state rather than stale disk files.

    What's Next?

    I feel like taking the time to do this cleanup was absolutely necessary at this stage. It actually gives me much more confidence for everything I want to implement after the V1 launch.

    On a more personal note, I have to say that I'm having an absolute blast building Gram. Watching this project come to life, mature, and become more robust and genuinely useful makes me happier than ever ☺️

    I feel like the feature set for the official V1 launch is now complete. Obviously, there are a million more features I want to add in the future, but I'm forcing myself to stay disciplined and stick to this first major milestone. It's certainly not 100% perfect, but when I look back at where this project started compared to where it is today... it feels pretty great!

    My main goal now is to prepare for the official V1 release: revamp the documentation homepage to introduce Gram better, and iron out the last few bugs that I may find.

    The next steps will arrive very quickly. I've already populated the backlog (over on Projects) with plenty of issues and big features planned to make Gram even more powerful down the road.

    Until then, please give beta.5 a spin, don't hesitate to share the project with people around you and let me know if you run into anything! À bientôt !

    Downloads
  • v.1.0.0-beta.4 2fc547a9e1

    v.1.0.0-beta.4 Pre-release

    abiwab released this 2026-07-23 10:26:29 +02:00 | 101 commits to main since this release

    Release Notes - v1.0.0-beta.4

    It's About Time !

    Welcome to beta 4! For this release, I focused entirely on one of the trickiest parts of the Gram engine: time and retro-planning.

    After testing the parser against a bunch of real-world recipes, I realized the timing logic was a bit opaque, and sometimes even completely wrong... So, I decided it was time (no pun intended) to rethink how it should work in a real kitchen environment. The calculations are now much more robust, and more importantly, they finally align with reality. The documentation has been updated to reflect all this!

    Smarter Passive Timers

    The way Passive Timers (~_) interact has changed. You should really start naming them, because their names now dictate how they are scheduled:

    • Different Names (Parallel): Putting one prep in the fridge for 1h and another for 20min? No problem, they overlap.
    • Same Name (Sequential): Baking something in the "Oven" at 180°C for 30min, THEN at 160°C for 1h? If they share the exact same name, Gram automatically sequences them. No more overlapping baking steps breaking the space-time continuum!

    Visualizing Time: Gantt Chart & Tooltips

    Previously, section retro-planning (like ## Section ~{-2h}) was mostly just there to look pretty in the code. It didn't really impact the engine's core scheduling. Well, now it does! The parser strictly uses these offsets to compute the timeline.

    To prove all this math works, I finally added a Gantt Chart view to the Playground. It's a feature I've talked about since the early stages of this project, and building it is exactly what helped me realize the old timing calculations were way off 😅. You can now visually check your recipe's timeline, see exactly how your retro-planning offsets shift the steps, and debug everything at a glance.

    Bonus: In the HTML preview, hovering over any time badge will now reveal a detailed tooltip breaking down exactly how that specific time was calculated (Active, Prep, Total). It's incredibly useful for understanding the parser's underlying logic!

    Just-In-Time Prep (ALAP)

    Gram now uses ALAP (As Late As Possible) scheduling. Instead of prepping things early and leaving them sitting on the counter, the engine pushes passive timers backwards from the end of the recipe. It calculates the exact moment to start a prep so it's ready just-in-time.
    (Side note: cookTime is now called idleTime everywhere. It just makes more sense).


    What's changed

    • Core API: runPipeline is now exported from @gram-lang/cli to make programmatic usage way easier.
    • Strict Timelines: Section retro-planning (e.g. ## Section ~{-2h}) now enforces a strict signed-duration syntax. Oh, and you can use d (days) as a unit now!
    • Fractions: Fixed bugs where scaled fractions looked weird. Things like 0.5 will now cleanly render as 1/2.
    • Shopping Lists: The shopping list now correctly preserves your recipe's original ingredient alias instead of forcing the database's canonical name.

    What's Next?

    I have to admit, I've had a bad habit of constantly wanting to add "just one more feature" before the V1 launch, which keeps pushing the release back. It's time for some discipline: no new features for now.

    If you're curious about what's coming later, I've added a list of ideas I want to implement to the repository's Projects tab (and more will be added soon).

    Instead, my entire focus is shifting to a massive codebase review and optimization pass for beta.5. The project has grown significantly, so this is going to be a huge undertaking, but it's now or never. I really hope (and strongly intend) for beta.5 to be the final beta before the stable V1 release!

    Until then, please drop by the playground, test the Gantt chart, and try to break the timeline! À plus 🖖

    Downloads
  • v.1.0.0-beta.3 a1d9bf4ff1

    v.1.0.0-beta.3 Pre-release

    abiwab released this 2026-07-14 16:00:38 +02:00 | 164 commits to main since this release

    Cleaning up a few messes left behind by the beta.2 release! Everything should be running smoothly again with this quick maintenance update.

    What's Changed:

    • Fixed accurate line number reporting for syntax errors in gram check.
    • Downgraded the minimum VS Code version requirement to 1.75.0.
    • Automated npmjs packages publication in CI.
    • Improved documentation clarity.
    Downloads
  • v.1.0.0-beta.2 13ad2aaa3b

    v.1.0.0-beta.2 Pre-release

    abiwab released this 2026-07-13 19:42:42 +02:00 | 179 commits to main since this release

    Release Notes - v1.0.0-beta.2

    Preparing for a final release, Marketplace, and npm!

    The final push is officially on! Since the last release, I've hit pause on new features to conduct a massive architectural audit and stress test of the entire project.

    Preparing the engine for this milestone is only half the battle. I also needed to ensure the codebase was flawlessly secure and polished before its grand debut. While they aren't available just yet, the 1.0 launch will mark the official publication of the core packages on npmjs and the release of the VSCode extension on the Marketplace. First impressions matter!

    Speaking of grand debuts, the project finally has an official home: gram-lang.org is live!

    Massive Testing & A Peek into the Future

    The number of automated tests has been drastically increased across the board to ensure the engine is rock-solid. As part of this,a strict, language-agnostic conformance suite has been introduced. It will make things much easier if (or when...) this project is eventually migrated to Rust!

    In the meantime, the entire monorepo has been upgraded to TypeScript 7, which already brings massive speed benefits to the toolchain.

    API Documentation & Dev Experience

    For the developers out there, a comprehensive "API Reference" section has been added to the documentation. It covers the programmatic APIs of the parser, kitchen, analyzer, renderer, and i18n packages, making it easier than ever to integrate Gram into your own tools and applications.


    What's New & What's Changed

    Syntax Enhancements (Yes, Breaking Changes Again...)

    I know, I know, more syntax changes. But I promise these make the language significantly more ergonomic:

    • The Temperature Sigil (^): I am saying goodbye to the ° sigil. While typing ° is super easy on my native AZERTY keyboard, I realized it is an absolute nightmare to type on a standard US QWERTY keyboard! To make Gram truly universal, temperatures now use the ^ sigil (e.g., ^{180C}).
    • Passive Timers (~_): The passive timer marker has been changed from ~& to ~_. This fixes a cognitive inconsistency: the & symbol is strictly used as a reference marker everywhere else in the language, so using it for background timers was confusing.
    • Fractions: The parser now natively supports mixed-number ASCII fractions (like 1 1/2) as well as Unicode vulgar fractions (like ½ or ¾).

    CLI Upgrades, Polish & Security

    • Tolerant Ingredient Database: Previously, a single invalid entry in your ingredients.yaml would hard-crash the entire CLI. Now, the parser is tolerant: it skips the corrupted line, loads all valid entries, and displays a clean warning, making manual editing much safer!
    • Accented Ingredients Fix: Fixed a frustrating bug where non-Latin or accented characters (like crème fraîche) in ingredient names were incorrectly stripped out, causing custom densities to be silently ignored. Unicode is now fully supported!
    • Massive CLI Speedups: gram format now processes your files concurrently, and gram db sync uses a new length-based pre-filtering algorithm to drastically speed up similarity searches.
    • Global Verbose Flag: Added a --verbose (or --debug) flag to all CLI commands to print full stack traces when you need to troubleshoot.
    • Strict Type Safety: A crusade against any types in the compiler resulted in the eradication of over 240 of them and the introduction of strict discriminated unions. The engine's determinism is now mathematically proven.
    • Unified Diagnostics: gram check and the Language Server now share a single, unified warning severity map. By default, the CLI will only fail on actual structural errors (use --strict if you want the old, unforgiving behavior).
    • VSCode Extension Speed: Fixed some race conditions with completions and added debouncing. Also, editing your ingredients.yaml now live-reloads diagnostics in the editor without needing a restart!
    • Security Hardening: .env files are now written with strict 0600 permissions. Strict runtime Zod validation for configurations has also been added, and gram import has been hardened with timeouts and payload limits to protect against bad AI responses.
    • Deterministic HTML: The HTML renderer no longer uses Math.random() for footnote anchor IDs, ensuring the output is perfectly byte-stable.

    What's Next?

    I think the final release will be ready very soon.

    Thank you for following along on this journey (even if I'm probably talking to an empty room!). If you want to chat or break the new syntax, feel free to drop by the repository. A bientôt ! 🤙

    Downloads
  • v.1.0.0-beta.1 875128ed00

    v.1.0.0-beta.1 Pre-release

    abiwab released this 2026-07-05 18:57:37 +02:00 | 235 commits to main since this release

    Release Notes - v1.0.0-beta.1

    The Documentation Overhaul & Perfecting Parity

    Welcome to the second beta of Gram! Since the last release which introduced the CLI and completed the initial ecosystem, my primary focus has been entirely on one massive, long-overdue task: The Documentation.

    I've completely rewritten the documentation from scratch and migrated it to Vitepress. During this exhaustive review of every single Gram feature, I uncovered several inconsistencies and edge-case bugs in how the core engine behaved compared to how it should behave.

    Taking the time to fix all of these means we've now achieved total parity between the documentation and the engine. What you read is (hopefully) exactly what Gram does.

    On a more personal note, the documentation is now fully translated into French, my native language. While this might not fundamentally change the project for most users, it was an important milestone for me to have the language explained in my own mother tongue!

    The New Integrated Playground

    The legacy standalone playground is gone. In its place is a brand-new, advanced Vue 3 Playground integrated directly into the Vitepress documentation site.
    It natively uses the official VSCode grammar (via Shiki) to ensure 100% consistency with your local environment. It's also been substantially upgraded with new features, letting you instantly test recipe scaling, Baker's Math etc. Additionally, the HTML Preview view has been completely redesigned. It is now much more pleasant to read and provides significantly more information at a single glance.

    You can try it out here: https://abiwab.codeberg.page/gram/play

    A Much Smarter Scaling Engine

    One of the biggest internal upgrades in this release is the new centralized ScaleEngine inside @gram/kitchen. Scaling recipes (--scale) and computing Baker's Percentages is now vastly more robust and safe.
    The engine now validates your scale targets before computing anything—it will explicitly reject fixed ingredients (@=), relative quantities, or mismatched units with a clear error instead of silently returning corrupted math. A sub-recipe's own total (e.g. "2 lemons") is now a valid scale target itself!


    What's New & What's Changed

    Culinary Terminology Alignment (Breaking Changes)

    To make Gram more intuitive for cooks and less confusing for developers, I've aligned the internal API and terminology with actual culinary concepts:

    • Timers: We no longer use computer-science terms like "Synchronous" and "Asynchronous".
      • Regular timers (~{10min}) are now Active timers (requires the cook's attention).
      • Background timers (~&{2h}) are now Passive timers (idle time like resting or baking).
      • Note for Tool Builders: The AST node property isAsync has been renamed to isPassive, and CSS classes have been updated accordingly.
    • Physical Engine: Internal analyzer APIs have been renamed for clarity. For example, enableMassNormalization is now enableMassStandardization, and enableYieldManagement is now enableYieldCalculation.

    Syntax Enhancements

    • Bare Preparations: You no longer need to add empty quantity braces to attach a preparation to an ingredient or cookware. You can now write @butter(melted) or #pan(20cm) completely naturally.

    Under the Hood Bug Fixes

    • Shopping List Aggregation: unit_weight conversions (e.g. @avocado{1}) are now handled perfectly with Yield calculations. The shopping list now correctly regroups entries by canonical IDs—merging aliased ingredients (e.g., beurre and butter) and cross-unit quantities (e.g. 100g and 1 cup) into a single gram total!
    • Baker's Math Fixes: Fixed the @* auto-detection and added strict safety checks to prevent relative-quantity ingredients from being used as the 100% base.

    You might have noticed Gram now sports a shiny new orange logo. Why an orange? It's actually a nostalgic callback to the very first programming project I built many, many years ago. I recently stumbled upon that old asset and figured it was a perfect fit for a food-related project like this one. Simple as that!


    What's Next?

    The documentation was the last major mountain to climb before V1, and I'm thrilled it's finally done.

    Moving forward, my focus will shift almost entirely to bug hunting and optimizations. I might slip in one more small feature—something in the same vein as "relative quantities"—but I haven't decided yet whether that will land before the stable V1 release or in a future update.

    To the massive crowd of exactly zero people currently using this alongside me: thank you for your unwavering support! I know I'm basically talking to myself in an empty room right now since the project is still very under the radar, but building Gram has been an incredibly fun ride. If you somehow stumbled upon this repository, feel free to drop a star, break the code, and say hi. Cheers! 🤙

    Downloads
  • v.1.0.0-beta.0 0d3452652a

    v.1.0.0-beta.0 Pre-release

    abiwab released this 2026-06-29 12:13:00 +02:00 | 333 commits to main since this release

    Release Notes - v1.0.0-beta.0

    The Missing Piece: Gram CLI and the Road to V1

    The whole ecosystem is finally coming to life. I'm introducing the official Gram CLI—the final piece of the puzzle that connects the language syntax, parser, kitchen analyzer, and ingredient database all together.

    Gram has finally reached a state that feels truly functional—at least, I hope so! All the core components are talking to each other, hopefully creating a unified recipe management system without too many hiccups. Hitting this milestone marks the transition into the beta phase. From here on out, my focus will shift to hunting down the inevitable bugs, fine-tuning the current features, and polishing the overall experience to get everything ready for the final v1.0.0 release.

    Say Hello to the Official Gram CLI (@gram/cli)

    The new CLI is, for now, the most practical tool for managing, compiling, and interacting with your recipes straight from the terminal.

    Project & Recipe Management

    • gram init: Scaffold a workspace (including AI provider setup).
    • gram import: Scrape and translate recipes from any URL into native .gram syntax.
    • gram build / scale / diff: Compile, scale (with visual diffs), or view a semantic "git diff" of your recipes.
    • gram format & watch: Auto-format your code and run a real-time validation daemon.
    • gram print & export: Generate print-ready HTML or markdown versions.
    • gram cook: Your terminal cooking assistant, complete with a step-by-step interface and live background timers.
    • gram shop: Generate smart shopping lists sorted by supermarket aisles.
    • gram view: Render recipes beautifully right in your terminal.
    • gram suggest: Find recipes based on your fridge's contents using an alias-aware search engine.

    AI-Powered Database

    • gram db sync & merge: Automatically track new ingredients or integrate external community databases.
    • gram db lint: Clean up semantic duplicates and plural mistakes.
    • gram db enrich: Use AI to fetch missing nutrition facts, densities, tags, and categories.

    The Next-Gen VS Code Experience & Language Server

    I've completely overhauled the VS Code Extension, which now ships with a full Language Server (LSP) built right in.

    • Dynamic Live Preview & Macros: A real-time WebView panel renders your recipe as you type. It also integrates a Macros panel, and hovering over any ingredient reveals its complete nutritional table.
    • Smart Autocompletion & Navigation: You'll get contextual suggestions for ingredients, intermediate declarations, and canonical units. I've also added advanced navigation features like Go to Definition, Find All References, and Rename Symbol (fingers crossed they work smoothly on your projects).
    • Intelligent Assistance: The extension now provides real-time diagnostics, CodeLens actions, and Quick Fixes. It even uses fuzzy matching to suggest corrections for misspelled ingredients based on your database.

    What's New & What's Changed

    Language Evolution (Breaking Changes)

    The core grammar has gotten some updates to be a bit more intuitive and permissive.

    • Syntax Adjustments: I've made a few symbol changes to make the grammar cleaner and easier to read. Here is a quick before/after comparison:
    Feature Before (v0.10.0) Now (v1.0.0-beta)
    Single-word ingredients, cookware & intermediates @salt{} @salt (braces are optional)
    Temperatures !{200°C} °{200°C}
    Async Timers ~{10min}& ~&{10min}
    Retroplanning {T-2d} ~{-2d}
    Aliases [alias] :alias
    • Top-Level Support: You can now write comments and recipe steps globally, anywhere in the document (even before the first ## Section).
    • Identity Refinement: The @gram/compiler package has been renamed to @gram/kitchen to better fit the Gram language vibe. Visual tooling, documentation, and example recipes have all been updated to match these new grammar rules.

    Under the Hood Improvements

    • Architecture & Performance: I've wrapped up a major architecture refactoring and ESM migration, which brings some nice performance bumps and cleaner code across the monorepo.
    • Nutrition Standardization: The salt output field in NutritionMetrics has been renamed to sodium to align perfectly with the ingredient database schema.
    • General Polish: I've also pushed a ton of smaller fixes, tweaks, and overall improvements across the board to ensure everything runs as smoothly as possible.

    A Personal Note

    Reaching this beta is a pretty big deal for me. After all these months of thinking, designing, and coding, seeing everything click together into something somewhat functional is incredibly rewarding. Gram started as an idea, and now it's a real tool that actually works! I know there's still a lot to improve and refine (and probably quite a few edge cases I haven't thought of yet), but this is a huge step forward, and I'm genuinely excited to see where it goes from here. Cheers 🤙

    Downloads
  • v.0.10.1-alpha b9f934d30c

    v.0.10.1-alpha Pre-release

    abiwab released this 2026-06-14 19:57:36 +02:00 | 450 commits to main since this release

    Release Notes - v0.10.1

    A small maintenance update to keep the project's foundations clean and fast:

    • Housekeeping: Completely cleaned up and updated all project dependencies.
    • Turborepo: Implemented Turborepo to significantly speed up and simplify the workspace build process.

    (No new features or breaking changes in this release).

    Downloads
  • v.0.10.0-alpha 498f234812

    v.0.10.0-alpha Pre-release

    abiwab released this 2026-06-14 15:06:01 +02:00 | 451 commits to main since this release

    Release Notes - v0.10.0

    Building a Solid Foundation: Bun, Zod, and Safety First

    This release focuses on reinforcing the core architecture before expanding the feature set any further. If v0.9.0 was about cleaning up the codebase, v0.10.0 is about making sure the system is robust, strictly typed, and safe from runtime crashes.

    Going All-In on Bun

    I have fully committed to the Bun ecosystem. The entire project has been migrated to a full Bun workspace environment (using workspace:* dependencies). To ensure the compiler output remains absolutely predictable as we evolve, I've also introduced Bun snapshot testing. We'll now know immediately if a future code change inadvertently alters the output structure.

    Say Hello to Zod

    I've added Zod to the stack to strictly validate data at runtime. Previously, if you fed the system some questionable or malformed data, it might crash spectacularly deep down the compilation pipeline. Now, Zod acts as a strict bouncer at the door: it catches invalid data early, ensures strict AST typing, and prevents silent failures.

    Expanding the @gram Ecosystem

    The architectural split I started in the previous release continues. Keeping the core lean is the goal, so I've created two new packages:

    • @gram/i18n: Unit translations and normalizations used to be awkwardly duplicated between the compiler and the analyzer. They now live in their own centralized internationalization package.
    • @gram/renderer: HTML and Markdown generation have been extracted into this new dedicated package. The core compiler shouldn't be the one worrying about DOM elements and formatting tags.

    What's New & what's Fixed

    Mathematics & Fractions

    • Aggregation Bug Fixed: There was a pesky bug where composite child ingredients using fractions (e.g., @zest{1/2}) were aggressively aggregating to a flat 0 in the final shopping list. A new unified getNumericQty utility now safely extracts numeric values across the entire codebase to prevent this.
    • Smart Fractions Formatting: Decimal values strictly below 1 (e.g., 0.5, 0.25) will now format cleanly as standard fractions (1/2, 1/4) in the shopping list. Meanwhile, values 1 and above will keep their standard decimal formatting (like 1.5 kg).

    Under the Hood Improvements

    • AST Refactoring: The Abstract Syntax Tree (AST) processing has been significantly refactored. Recipe elements are now identified via standardized constants across the system to prevent typos and improve maintainability.
    • Consistent Warnings: The warning system has been entirely standardized to provide reliable and helpful error messages across all tools.
    • Cleaner Build Pipeline: Improved parser stability and stripped out some complex, legacy build workarounds that were previously required for web environments.
    Downloads
  • v.0.9.0-alpha 9178bad434

    v.0.9.0-alpha Pre-release

    abiwab released this 2026-06-07 19:16:56 +02:00 | 473 commits to main since this release

    Release Notes - v0.9.0-alpha

    Cleaning up the Kitchen: Scopes & Architecture

    This release focuses heavily on restructuring the project to make it sustainable, modular, and ready for long-term development.

    Wait... Where did v0.8.0 go?

    If you were looking for the v0.8.0 release notes, don't blink—you didn't miss them! In the process of setting up Changesets to automate my workflow, the tool looked at the sheer volume of updates, structural revamps, and package migrations, and essentially said: "This is too big for a single step, we are skipping straight to v0.9.0." Consider it a kitchen accident where the dough rose twice as fast as expected. Let's call it a feature, not a bug!

    Moving to Scoped Packages

    All packages have now been migrated under a unified npm scope: @gram/. Whether you are using the parser, the compiler, or the playground, everything is now cleanly organized under @gram/parser, @gram/compiler, etc.

    A Major Architectural Split: Introducing @gram/analyzer

    In the previous release, I reclassified features like mass unification, yield management, and nutritional information calculation as experimental. Taking this a step further, I realized that bundling this complex analytical logic directly inside the core compiler was a mistake.

    To keep the compiler fast and lean, I have extracted all analyzer logic into its own dedicated package: @gram/analyzer.

    🚨 Breaking Change: The core compiler no longer ships with a built-in ingredients database. If you rely on nutritional estimation, mass normalization, or yield management, you will now need to explicitly provide your own ingredients data to the new analyzer package.


    What's New

    Refining the Syntax & "Mise en Place"

    • Removing Ingredient States: I have decided to remove the ingredient states syntax (@ingredient:state{}). While the original intent was to help organize a richer ingredients database, real-world usage proved it was far too confusing and verbose to write.
    • Cleaner Section Summaries: Pure flow instructions—like mentioning an ingredient just to say "remove from heat" or "re-insert"—without quantities (@&ingredient{}) are now excluded from section-level ingredient summaries. This keeps your section-level mise en place lists perfectly clean while preserving separate measured portions.
    • Semantic Temperatures: The GRAM syntax now natively accepts semantic temperatures. You can now write intuitive instructions like Cook on !{low heat} without being forced to specify exact Celsius or Fahrenheit degrees.
    • French Culinary Units: Unit resolution has been improved to seamlessly handle French kitchen aliases (e.g., translating tsp to càc).

    Under the Hood Improvements

    • Mass Calculation Fixes: Fixed multiple edge-case bugs with mass calculations. Following up on the previous release, explicitly empty ingredient masses now safely count as exactly 0 to avoid breaking total weight equations.
    • Streamlined Maintenance: I have completely stripped out /dist folders from the main repository tracking and migrated the entire project's versioning workflow to Changesets. This will make tracking modifications, maintaining a clean root changelog, and shipping predictable updates significantly easier going forward.
    Downloads
  • v.0.7.0-alpha 0985b49997

    v.0.7.0-alpha Pre-release

    abiwab released this 2026-05-11 02:10:36 +02:00 | 487 commits to main since this release

    Release Notes - v0.7.0-alpha

    A Quick Note on Transparency

    First, up until now, I have often used 'we' when talking about Gram, making it sound like there's a whole kitchen brigade behind the project. In reality, I'm the only chef in this particular kitchen. Going forward, I’ll be using 'I' to better reflect the solo nature of this endeavor.

    Secondly, in the last release, I promised a blog post detailing my long-term vision for Gram. I have to admit that I haven't found the time to write it properly. However, this delay has been a blessing in disguise. Over the last three months, taking a step back allowed me to reassess certain features and future directions. I also took the time to migrate around 200 of my personal recipes into the .gram format. This real-world stress test highlighted a few blind spots and necessary tweaks to the syntax.

    The vision post will happen eventually, but right now, my priority is focusing on the code.

    What's New

    Over the last two releases, I introduced systems for mass unification, yield management, and nutritional information calculation, all powered by the creation of an underlying ingredient database.

    After some reflection, I realized that while this feature is highly promising, it requires more time and refinement before it becomes truly robust and relevant. Because of this, I have decided to separate these systems behind feature flags.

    These features are now officially classified as Experimental. They are disabled by default, but can easily be toggled on via CompilerOptions in the API or through the new "Experimental Features" menu in the Playground.

    Enhancements & Fixes

    • Negligible Mass Support: Ingredients declared with explicitly empty braces (e.g., @salt{}) are now assigned a mass of 0g. This allows the Total Mass calculation of a recipe to complete successfully without requiring exact weights for things like arbitrary seasonings or dusting flour.
    • Native Unit Localization (i18n): Unit translation has been centralized in a new i18n.ts file. This includes added support for standard French culinary abbreviations.
    • Nutrition Coverage Safety: The nutrition panel in the Playground will now automatically hide if any ingredient in the recipe is missing macro data or has an undetermined mass. This prevents the display of misleading or partial nutritional calculations.
    • Documentation Update: The official documentation has been updated to reflect recent syntax changes and newly added features.
    Downloads