logoalt Hacker News

mccoybtoday at 5:47 PM5 repliesview on HN

This language, README, website has been written by AI agents.

At one point, the author may have written a fair bit of code by hand (starting with a Crafting Interpreters project, and then adapting it recently using agents?). The commit history is very confusing.

The design of the VM is nearly identical to the clox interpreter in Crafting Interpreters. There's also a bit of Lua inspiration mixed in the instruction encoding.

Who is this language for? Who is the audience, and what does the author intend to convey to them?

There's a ton of features -- are they used consistently? We have function overloading and traits. We have optional type annotations and effects -- the effects are handled with a (fragile) multi-shot continuation implementation (at least copy Leijen or libmprompt! that code is out there, free to use, and robust!)

There are two parallel type inference systems in `src/types`. The type system which the language actually uses is not consistent yet (see e.g. `inference.c`: "recursive type: bind anyways")

With that being said, I'd take the cross platform claims with an extreme grain of salt ...


Replies

mrkeentoday at 9:13 PM

The polymorphism looks a little half-missing as well (checker.c):

  /* generalize: check if vars in t are free (not bound in env).
   For now, a simplified version that just returns the type as-is. */
  CkType *ck_generalize(CkTypeEnv *env, CkType *t) {
So the identity func (id x = x) stays a monotype?

Also, I'm not seeing any more or less safety in this code than the surrounding code:

  /* thread-safe version that returns allocated string */
  static char *type_to_str_alloc(CkType \*t) {
    char buf[512];
    type_to_buf(t, buf, sizeof buf);
    return xs_strdup(buf);
  }
Are multiple type-checking threads blasting through this at the same time?

The most interesting claim that this file makes is that it does HM-inference as well as subtyping. I'm smart enough to parrot "that's undecidable" even if I'm too dumb to know why.

HM is hard enough without taking the sizeof pointers and mallocing every few lines.

timcobbtoday at 5:59 PM

> There are two parallel type inference systems in `src/types`

Oooof brutal. I agree it is remarkable people release stuff like this.

kmosertoday at 7:49 PM

> With that being said, I'd take the cross platform claims with an extreme grain of salt ...

Given that it's written in C (and assuming it actually compiles), I'm likely to believe the cross-platform claim.

show 1 reply
mccoybtoday at 6:01 PM

If the author sees this, I don't mean to be harsh! It's possible I'm mistaken: I'm just going off of a few "smells"

Very impressive if I'm wrong (hopefully some of the comments help you prune some of these smells, if you wish)

potsandpanstoday at 9:50 PM

Heads up folks: this comment appears to be 100% ai generated according to pangram.