Thursday, June 18, 2026

New Significant Fixes

The Crack main repository hasn't been very active for a while.  This has been primarily due to my involvement in other projects, a number of which make use of the language.  But the 1.7 release, specifically, has been blocked by one particular bug literally for several years -- I simply haven't had enough consecutive productive hours to focus on it.

But I'm happy to say that in the past two days I have fixed both that bug and another.  Both had extremely simple fixes, literally one or two lines of code.  Finding the problem, of course, is another matter.  The Crack executor is as magnificent a beast as has ever emerged from the twisted, steaming cauldron of my mind, and I'm sure it's been several years since I last engaged this beast beyond a superficial level.  So I feel rather proud that I'm still able to ferret out it's deepest imperfections when presented with a reproducible error case.

Both bugs were related to class instances -- constant, static, global structures that constitute Crack's RTTI mechanism.  

The older one ("older" as in "known longer") was a naming collision in Generic class instance global variables.  It results in a massive dump of the LLVM IR code for the program along with an assertion failure indicating an "uninitialized global" (without naming the global, of course).  This was caused by passing the current parser context to the function that generates the class instance for a new generic, which is meant to accept the context of the new generic class (more specific typing would have prevented this). 

I encountered the newer bug while trying to debug the older one.   It turns out that when you forward declare an appendage, the "appendage" flag of the reused TypeDef object created during processing of the forward declaration wasn't getting updated.

With these issues crushed, and a number of new features in the standard library, I now feel inspired to get to a 1.7 release.  There are still quite a few test failures that have crept in over the years to debug, but I don't expect they're anything major.  Time to move to the next milestone!

Sunday, November 2, 2025

Fresh Upgrades

The autoconf setup has been updated and a new version of crack.regex2 has been introduced which uses libpcre2 (libpcre3 is actually an older library that is EOL and being removed from distros).

These changes are as yet unreleased but are available in the latest git codebase.

Friday, January 17, 2020

Crack 1.6 Released

We are pleased to report the release of crack 1.6.  This version focuses on a few features that I have wanted to add to the language for a long time:

The "is not" operator ("!is")

This fixes a long-standing wart.  Up until 1.5, the only way to check if an object is "not identical" to another object was to negate the result of "is".  Since this is a very common thing to do when verifying that an object is not null, the codebase was scattered with code like "if (!(x is null))" which is as painful to read as it is to type.

1.6 adds the "!is" operator (which is simply syntactic sugar for "!(a is b)").

Safe Navigation 

It's not uncommon to have a sequence of field dereferences where you want to check every step along the way for null and return a null (of the type of the final dereference) if one of those dereferences fails the check.  Many modern languages support doing this in a very lightweight form using the "safe navigation" operator.  Crack is now among them.  So we can now say:

x := foo?.bar()?.baz;  # x is null if foo, foo.bar() or
                       # foo.bar().baz is null

Attribute Accessors

It is useful to be able to use the same syntax for field access whether a field is being accessed directly or via a method (i.e. a "getter" or "setter"). Crack 1.6 now provides this by allowing you to define accessor methods:

class Person {
    # We would normally just define "String name" as our field
    # unless we needed to do something special but this 
    # illustrates the usage of the feature.
    String __name;
    String oper .name() { return __name }
    String oper .name=(String val) { return __name = val }
}

cout `$(person.name)\n`;
person.name = 'Frodo';

There's also the usual round of bug fixes and smaller features.

So check it out at http://crack-lang.org

Happy hacking!

Tuesday, July 2, 2019

Crack 1.5 Released!

After a very long time (during which I've mostly been working on MAWFS) I'm finally getting around to releasing a new version of Crack.  This is mostly just bug fixes on 1.4, but there are a few new big features:

  • Lambdas.  You can now create a function as an expression, for example: lambda int(int a, int b) { return a + b }
  • Auto imports.  You can now put all of your commonly used imports in an auto-import file and have them be imported on demand by any modules that need them.
  • Experimental new command line processing.
Look for a new docker image in another day or two.

Enjoy!

Friday, July 27, 2018

Crack 1.4 Released!

I am pleased to announce the release of Crack 1.4.  The latest release includes:

  • The RawPtr class (for breaking reference cycles)
  • Function elision (let's you remove a function from a derived context at compile-time)
  • Fixed event handling in termui.
  • Fixed memory management in EventManager
  • Minor enhancements to NML HTML generation.
  • Fixed assertion failure when dereferencing an undefined forward class.

Download from here.
Happy cracking!

Thursday, March 22, 2018

Crack 1.3 Released!

I'm happy to announce the release of Crack 1.3.

1.3 mainly includes lots of fixes to keep things working on the latest versions of Debian Linux.  However, it also includes a few enhancements to crack.io and crack.net.comm2.

Enjoy!

Friday, December 15, 2017

Crack 1.2 Released!

I am pleased to announce the release of Crack 1.2. In addition to a number of bug fixes, 1.2 adds a number of new features that have been accumulating for the past few months, including:


  • The @cvars annotation (which autogenerates constructors to initialize a subset of instance variables)
  • The Functor.Wrap classes, which simplify the import requirements for wrapping functions as functors.
  • Support for relative imports.
  • Enhancements for protobufs, crypto (AES-SIV and CMAC support), the comm2 communications module and annotations.
Enjoy!