Skip to content

Parts of cesanta/elk published as theMackabu/ant under MIT license #75

Description

@byko3y

Some parts are reproduced verbatim, the author did not even try to hide the traces. For example:
https://github.com/theMackabu/ant/blob/42e2fdb00d8b5ae39cd07a96caf77627e418ab8b/include/internal.h#L29
struct fs reproduces part of the fields and all constants with their values:

elk/elk.c

Lines 47 to 67 in a9bb856

uint8_t tok; // Last parsed token value
uint8_t consumed; // Indicator that last parsed token was consumed
uint8_t flags; // Execution flags, see F_* constants below
#define F_NOEXEC 1U // Parse code, but not execute
#define F_LOOP 2U // We're inside the loop
#define F_CALL 4U // We're inside a function call
#define F_BREAK 8U // Exit the loop
#define F_RETURN 16U // Return has been executed
jsoff_t clen; // Code snippet length
jsoff_t pos; // Current parsing position
jsoff_t toff; // Offset of the last parsed token
jsoff_t tlen; // Length of the last parsed token
jsoff_t nogc; // Entity offset to exclude from GC
jsval_t tval; // Holds last parsed numeric or string literal value
jsval_t scope; // Current scope
uint8_t *mem; // Available JS memory
jsoff_t size; // Memory size
jsoff_t brk; // Current mem usage boundary
jsoff_t gct; // GC threshold. If brk > gct, trigger GC
jsoff_t maxcss; // Maximum allowed C stack size usage
void *cstk; // C stack pointer at the beginning of js_eval()

https://github.com/theMackabu/ant/blob/42e2fdb00d8b5ae39cd07a96caf77627e418ab8b/src/ant.c
Reproduces uint8_t lookahead(struct js *js) from

elk/elk.c

Lines 547 to 554 in a9bb856

static inline uint8_t lookahead(struct js *js) {
uint8_t old = js->tok, tok = 0;
jsoff_t pos = js->pos;
js->consumed = 1;
tok = next(js);
js->pos = pos, js->tok = old;
return tok;
}

And many others, lots of functions from elk.c are copied into src/ant.c with different degrees of additional modifications, for example:
mkscope(struct js *js)
jsval_t js_block(struct js *js, bool create_scope)`
jsoff_t lkp(struct js *js, jsval_t obj, const char *buf, size_t len)

I'm not a copyright owner for your project, so it's for you to decide what to do.

Activity

cpq commented on Mar 19, 2026

@cpq
Member

@byko3y thank you!

HumanBodyMacAndCheese commented on Jun 14, 2026

@HumanBodyMacAndCheese

Not affiliated with either Elk or the other project, but how did you find that?

LukeGary462 commented on Jun 16, 2026

@LukeGary462

I would defer to @thaMakbu, but I assume an AI coding agent lifted the code and reproduced in the offending project. see the agent related markdown file in the repository.

https://github.com/theMackabu/ant/blob/master/AGENTS.md

Not proof, but I think a resonable possibility for unintentional license violation due to AI tooling.

byko3y commented on Jun 16, 2026

@byko3y
Author

Exactly, AI coding. Today lots of kids just vibe code something and call the code their own. It is not a secret that AI is not inventing any code — it's copy-pasting existing fragments. Like if you'd copy pasted some random code directly from github and called it "my code" — I'm not sure whether asking someone else to do the same can be considered "unintentional", it's rather "irresponsible". In a similar way some irresponsible employees used to copy GPL code into proprietary software.
How did I find this out? I just asked LLM "what is the origin of this source code?" — and just like that, it told me "hey, that's pretty much verbatim https://github.com/cesanta/elk plus some additional functions".If you scan newer repositories on github in a similar way you will find lots of license violations.

theMackabu commented on Jun 17, 2026

@theMackabu

Hi everyone,

I want to understand and address this correctly. My agent previously did reproduce parts of elk, and that shouldn't have happened. There are more safeguards in place to prevent it from ever copying code verbatim again.

I have identified some overlapping code and removed it, the engine was subsequently rewritten post 0.5 a couple of months ago noting this issue, and the current codebase should contain none of the material in question. Any tree-walking has been replaced with a bytecode interpreter and a fork of MIR.

theMackabu commented on Jun 17, 2026

@theMackabu

All pre-bytecode releases have had their binary assets removed as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @cpq@LukeGary462@theMackabu@byko3y@HumanBodyMacAndCheese

        Issue actions