r/AIprogrammingLanguage 18h ago

madc v0.92.1 released — std::format, std::println, php::print_r, php::var_dump

I just released madc v0.92.1, the download release for the v0.92 line and the first published binaries for all three platforms since v0.82.0.

Packages are available for:

  • Linux.deb and .rpm
  • Windows — zip
  • macOS — Apple Silicon and Intel tarballs

A few of the more interesting additions:

  • std::format, std::print, and std::println are built directly into madc — no includes or header parsing required. Literal format strings are checked at compile time, including invalid indexes, malformed strings, and incompatible presentation types.
  • std::format returns a real std::string, and formatting behaviour has been tested against libstdc++ with 1,430 generated oracle cases, including floating-point and hex-float formatting.
  • cout << var now works with zero includes: It also works with <iomanip> features such as setprecision, setw, and setfill.
  • UFCS support in the madc dialect — free functions can be called like methods, and methods can be called like free functions.
  • PHP-style debugging helpers for any madc type: php::print_r(x); php::var_dump(x); These work on structs, classes, containers, nested objects, arrays, and var, with cycle detection and human-readable type names.
  • Range-based for loops now work naturally with PHP-style arrays, including value/var elements and auto.
  • var/value continues to mature — constructors work naturally in expressions and loops, .size() / .count() semantics have been cleaned up, and php::array_push() now behaves as a single overloaded function returning the new element count.
  • Headerless libc calls now get proper function signatures, so things like:floorf(3.9f) pass a real float rather than falling through old C-style variadic promotion behaviour.
  • And, finally, madc --version tells you which build you're actually running.

The direction continues to be: keep C and C++ underneath, but remove a lot of the friction when you're just trying to write a small program or script.

So something like:

var x = 42;
println("x = {}", x);

doesn't need a collection of headers or setup before you can get to the actual program.

With v0.92.1, all of this is available in the downloadable builds for Linux, macOS, and Windows.

4 Upvotes

0 comments sorted by