• v.0.6.0-alpha 282a442bdc

    v.0.6.0-alpha Pre-release

    abiwab released this 2026-01-18 15:05:46 +01:00 | 492 commits to main since this release

    Release Notes - v0.6.0

    What's New

    Database Overhaul

    The ingredient database has been migrated to a robust YAML-based structure sorted by category (data/*.yaml). About 900 ingredients were added.

    • Manual integration of verified data sources directly from ANSES CIQUAL (France) and USDA FoodData Central (USA), supplemented by AI for missing density, yield and tags only.
    • Multilingual support (English/French for now) for ingredient lookup.
    • Support for user-defined ingredients via data/user-defined.yaml.

    The database is not exhaustive; it's a long-term project. We aim to gradually expand it to include more international ingredients, as well as most of the classic ingredients used in recipes. Any help in completing it is welcome.

    Ingredient State Support

    Introduced syntax @ingredient:state{qty} to support calculating nutrition for raw/default vs cooked/dried/etc. ingredients (e.g., @tomato:canned{100g}).

    • Includes validation warnings if the requested state is unknown or missing data.

    Compiler Improvements

    • Validation: New warnings system for "Missing Ingredient" (not in DB) and "Missing Macros" (in DB but incomplete).
    • Partial Data Handling: The Nutrition Panel in the Playground is now hidden if data is incomplete, ensuring users are not misled by partial sums.
    • Playground UX
      • Replaced the syntax highlighter with a more robust solution (code-input) for better performance and editing experience.
      • Improved visual presentation of compiler warnings.

    Enhancements & Fixes

    • Logic:
      • Fixed mass calculations for intermediate preparations declared in sections.
      • Refactored shopping list aggregation for composite ingredients to be more accurate.
    • Documentation:
      • Comprehensive updates to documentation reflecting the new database structure, mass unification logic, and advanced features.
    • Fixed version numbering to sync with releases

    What's next

    We are nearing a first functional release, and no major syntax or structural logic changes are planned for the immediate future. My focus is now shifting toward the compiler to ensure as many edge cases and bugs as possible are fixed before the next release.

    Another key priority is the ingredient database; it will take some time to complete.

    I am currently preparing a post to better outline the future vision for gram, which will hopefully be available soon.

    Downloads
  • v.0.5.0-alpha 60bf0b0f81

    v.0.5.0-alpha Pre-release

    abiwab released this 2026-01-06 23:33:11 +01:00 | 522 commits to main since this release

    It compiles!

    With the syntax becoming stable, the focus is shifting towards the Compiler.
    The goal: instead of just parsing text, use the data to provide concrete help to the user. This update introduces logic to analyze ingredients and steps, enabling features like nutritional estimation, automatic mass conversions, and smart timings.

    Welcome to Codeberg! 🇪🇺

    First and foremost, GRAM has moved to Codeberg.
    This migration aligns with the values of open-source, ethical hosting, and community-driven development that drive this project. Born in France, Gram naturally supports Codeberg as a European platform dedicated to keeping software open and independent. We believe it is the perfect home for this project.


    Release highlights

    Mass Unification

    To help with calculations, the system now tries to convert ingredient quantities into grams (hence this project's name 😅)

    • Converts volumes (cups, ml...) to grams using average densities.
    • Distinguishes between Net Mass (what you eat) and Purchasing Mass (what you buy), accounting for waste (e.g., banana peels, egg shells — because we assume you don't eat those).
    • You can specify custom densities in the recipe Frontmatter if the defaults are not accurate enough.
    • New ingredients database: A basic internal database (Proof of Concept, generated by LLM for testing purposes) is used to help with these calculations. Note that data accuracy is not guaranteed yet.

    Nutritional Calculation

    The compiler can now estimate the nutritional value of a recipe (uses the new ingredients database).

    • Estimates Calories, Protein, Carbs, Sugar, Fat, Fiber, and Salt.
    • Define portions: 4 in your metadata to get per-serving metrics.

    Time Estimation

    The Playground now calculates and displays three distinct time metrics:

    • Active Time: The actual work time (stirring, chopping, trying not to burn anything).
    • Total Time: From start to finish, accounting for parallel background tasks.
    • Prep Time (Est.): An automated estimation of the "Mise en place" based on the number of ingredients and their preparations.

    There's more

    Playground

    • The preview mode has been updated with new icons and a cleaner design.
    • New panel now shows the nutritional breakdown with an "Estimate" confidence badge (when available)
    • New control to show/hide the calculated masses alongside the original text quantities.

    Documentation Overhaul

    The documentation has been completely restructured to make it easier to navigate:

    • Separated into Syntax, Compiler Features, and Technical internal docs.
    • Added diagrams to explain specific logic (like mass conversion).
    • Updated with recent syntax and features additions.

    Fixes

    • Comments and notes in playground (Markdown and preview) are now visually distinct and no longer mess up the step numbering sequence.
    • Fixed an issue where calculating percentages inside an alternative group (@A{}|@B{10% @A}) would fail.
    • The parser is now more robust and correctly handles the "Torture Test" without breaking a sweat.
    • Improved detection of ingredient modifiers and inline preparation notes.

    See you in the next release ! 🤙

    Downloads
  • v.0.4.0-alpha 752898b227

    v.0.4.0-alpha Pre-release

    abiwab released this 2026-01-04 19:14:32 +01:00 | 567 commits to main since this release

    Asynchronous tasks

    What's New

    Asynchronous Tasks Support

    You can now mark timers as asynchronous (background tasks) using the & modifier (e.g., ~{1h}&).

    • Compiler: Calculates precise totalTime vs activeTime metrics.
    • Playground: Visualize async tasks with specific styling (dashed borders, icon) in both Markdown and Preview modes.

    Synchronous timers represent active work that blocks the cook, while asynchronous timers (&) designate background tasks occurring in parallel. This distinction allows the compiler to accurately calculate real effort versus total duration and enables the generation of realistic Gantt charts.

    Playground Improvements

    • New AST View: Added a raw AST view mode to inspect the parser output.
    • UI: Improved view selection with a new dropdown menu.

    Bug Fixes

    • Fixed an issue where multiple composite ingredients would not aggregate correctly in the shopping list.

    Documentation

    • Added "Tips" across the documentation to better explain the philosophy behind timers, cookware, and relative quantities.
    Downloads
  • v.0.3.1-alpha b3ca5db058

    Pre-release

    Ghost released this 2026-01-03 14:27:52 +01:00 | 576 commits to main since this release

    Minor updates

    • Docs: Updated README.md files with correct Playground URLs following the workspace migration.
    • Examples: Refined recipe examples to better showcase GRAM features.

    Bug fix

    • Fixed composite ingredient aggregation. Sub-ingredient quantities are now correctly summed across multiple sections, ensuring accurate parent ingredient totals in the shopping list.
    Downloads
  • v.0.3.0-alpha 94a58d826f

    v.0.3.0-alpha Pre-release

    Ghost released this 2026-01-02 20:53:57 +01:00 | 581 commits to main since this release

    Architecture Refactor

    The project has been restructured to improve scalability, maintainability, and developer experience.

    Key Changes

    Major Restructuring

    • The project structure has been completely reorganized. All code modules are now located in a centralized packages/ directory.
      • packages/parser: Core parsing logic (formerly gram-parser).
      • packages/compiler: Compiler and graph logic (formerly gram-compiler).
      • packages/playground: The web-based IDE.
      • packages/vscode-extension: Visual Studio Code language support.
    • Workspace Management: The root package.json now acts as a workspace manager, allowing installation of all dependencies with a single npm install command.
    • Centralized Config: Introduced a shared tsconfig.base.json to ensure consistent TypeScript configuration across all packages.

    Separation of Parser & Compiler

    • Decoupled Architecture: The Compiler logic has been extracted from the Parser.
      • Parser (packages/parser): Strictly responsible for grammar definition (OhmJS) and generating the raw AST.
      • Compiler (packages/compiler): Responsible for semantic analysis, graph generation, and transforming the AST into usable artifacts (Shopping Lists, Instructions...).

    This separation allows tools (like linters or syntax highlighters) to use the lightweight parser without pulling in the heavy compiler logic.

    Developer Experience

    • Global Scripts: Added unified commands at the project root for easier workflow:
      • npm run build: Builds the core (parser & compiler).
      • npm run dev: Launches the Playground instantly.
    • Clean Output: Build scripts now feature friendly emojis and concise logging 🏗️ .
    • Examples Library: Created a dedicated examples/ folder at the project root.
      • These examples are automatically synced with the Playground during build.
      • The Playground now dynamically lists these examples in its dropdown menu.

    Fixes & Polish

    • Separated Parser and Compiler logic into distinct, clean packages with proper dependencies.
    • Updated README.md and CONTRIBUTING.md to reflect the new architecture.

    Changes Breakdown

    • Moved gram-parserpackages/parser
    • Moved gram-compilerpackages/compiler
    • Moved playgroundpackages/playground
    • Moved gram-vscode-extensionpackages/vscode-extension
    • Added tsconfig.base.json
    • Refactored root package.json scripts.

    How to test this release

    1. Clone the repo (or pull changes).
    2. Run npm install at the root.
    3. Run npm run build.
    4. Run npm run dev.
    5. Open http://localhost:3000 and try the playground.
    Downloads
  • v0.2.0-alpha f6612624cc

    v0.2.0-alpha Pre-release

    Ghost released this 2025-12-30 18:47:46 +01:00 | 596 commits to main since this release

    TypeScript Migration for gram-parser

    This refactor migrates the entire gram-parser codebase from JavaScript to TypeScript to enhance project robustness and maintainability.

    Key Changes:

    • TypeScript: Converted all source files to TypeScript (src/*.ts).
    • Strict Typing: Comprehensive interface definitions for the AST and internal compiler structures.
    • Build: Added a compilation step (npm run build) that generates JavaScript code and declaration files (.d.ts) in the dist/ directory.

    No changes were made to the .gram grammar itself.

    Downloads
  • v0.1.0 f611e81c7c

    Ghost released this 2025-12-28 21:28:39 +01:00 | 609 commits to main since this release

    🎉 Gram Alpha - Initial Release

    GRAM (General Recipe Abstract Markup) is a strictly typed, data-first recipe markup language designed for developers.

    This initial Alpha release introduces the language specification, the reference parser, and the essential tools to begin treating recipes as code.

    Key Features

    The GRAM Language

    GRAM captures the logic of cooking, not just the text:

    • Data vs. Narrative Separation: Clear distinction between ingredients, cookware, and instructions.
    • Advanced Quantity Management:
    • Mise en place: Automatic generation of aggregated Shopping Lists vs. step-by-step Section Lists.
    • Relative Quantities: Native support for percentages (e.g., Baker's Math).
    • References & Composites: Reuse prepared ingredients and smart aggregation (e.g., "Lemon Zest" + "Lemon Juice" = "1 Lemon" in the shopping list).

    The Ecosystem

    This release includes the core project components:

    • gram-parser: The reference parser (built on OhmJS) converting .gram files into a strict AST and rich JSON structure.
    • Playground: A simple web-based IDE to write, visualize, and debug your recipes in real-time (includes JSON view, AST Tree, and Markdown Render).
    • VSCode Extension: Syntax highlighting support for .gram files.

    Installation & Usage

    Quick Start

    Clone the repo and run the playground locally:

    git clone https://github.com/abiwab/gram.git
    cd gram-language/playground
    npm install
    npx serve
    

    Using the Parser

    const { parse } = require('gram-parser');
    const result = parse(myRecipeString);
    

    Documentation

    Comprehensive technical documentation is available in the docs/ folder, including:

    License

    This project is distributed under the GPL-3.0 license.


    Note

    : This is an Alpha version. The syntax and internal logic are subject to change. Feedback and contributions are highly welcome!

    Downloads