Discussion
Mog: A Programming Language for AI Agents
steve_adams_86: I like the looks of this, and the idea behind it, but TypeScriot via Deno is an audited language with a good security model, a good type system, and sandboxing in an extremely well-hardened runtime. It's also a language that LLMs are exceptionally well-trained on. What does Mog offer that's meaningfully superior in an agent context?I see that Deno requires a subprocess which introduces some overhead, and I might be naive to think so, but that doesn't seem like it would matter much when agent round-trip and inference time is way, way longer than any inefficiency a subprocess would introduce. (edit: I realized in some cases the round-trip time may be negligible if the agent is local, but inference is still very slow)I admittedly do prefer the syntax here, but I'm more so asking these questions from a point of pragmatism over idealism. I already use Deno because it's convenient, practical, and efficient rather than ideal.
stillpointlab: One thing that comes to mind, more of a first reaction than a considered opinion, is the complexity of V8 getting in the way. JavaScript and Typescript present a challenge to language implementors.There is something to be said about giving AIs a clean foundation on which to build their own language. This allows evolution of such systems to go all the way into the compiler, beyond tooling.
FireInsight: I looked at the brainrotty name[1] and instantly assumed AI slop, but I'm glad the website was upfront about that.[1] https://www.merriam-webster.com/slang/mog
gozzoo: How is Mog different than Mojo?
0cf8612b2e1e: I cannot comment on the new language, but Typescript is a huge spec. Yes, it has guardrails, but there is a lot of complexity. Something purpose built to enable embedding allows it to be used in more contexts. Maybe I want a Mog plugin for my latest video game. Embedding JS is possible, but no fun.
libre-man: Don't know if others have this issue, but for me I can't scroll on Firefox.
Garlef: Awesome!A few questions:- Is there a list of host languages?- Can it live in the browser? (= is JS one of the host languages?)
belisarius222: The host is written in Rust, with `extern "C"`, which makes it able to be loaded as a C library by programs written in other languages. Most languages have support for this.It's also designed to be run in an event loop. I've tested this with Bun's event loop that runs TypeScript. I haven't tried it with other async runtimes, but it should be doable.As for the browser, I haven't tried it, but you might be able to compile it to WASM -- the async stuff would be the hardest part of that, I suspect. Could be cool!
saithound: > When asking people to write code in a language, these restrictions could be onerous. But LLMs don't care, and the less expressivity you trust them with, the better.But LLMs very much do care. They are measurably worse when writing code in languages with non-standard or non-existent operator precedence. This is not surprising given how they learn programmming.
andreybaskov: It's a legitimate question to ask about any new language post AI - given there is no training dataset, any other language would work better with AI.The bigger problem is maintainability over the long term, Deno is built by Node.js creator and is maintained for half a decade now, that's hard to compete with. In a way it's much more about social trust rather than particular syntax.
verdverm: I'd also add all the other things that users expect around a language:- GitHub syntax highlighting- IDE integrations, LSP- Modules and dependency managementI don't see an agent first language becoming a thing while humans are still ultimately responsible.
jjice: Firefox 148.0 MacOS Tahoe - I'm able to scroll.
RealMrNida: Nice language design. The MCP ecosystem is becoming a good test bed for new tooling — I've been building MCP servers lately and the variety of use cases is broader than I expected.Just shipped one for freelance talent sourcing so founders can hire from inside Claude/Cursor without context-switching: https://github.com/xXMrNidaXx/hire-from-claude — interesting contrast to systems-level tooling like Mog. Would love to see a Mog-based MCP server eventually.
zelphirkalt: Argument 1 ("Syntax Only an AI Could Love") sounds dubious. I am probably not alone in being paranoid enough, to always put those parentheses, even if I am 90% sure, that there is operator precedence. In lispy languages the ambiguity never even arises, and I put many parentheses, and I like it that way, because it enables great structural editing of code. No implicit type coercion has also been part of normal for-human programming languages (see SMLNJ for example).> There's also less support in Mog for generics, and there's absolutely no support for metaprogramming, macros, or syntactic abstraction.OK that does immediately make it boring, I give them that much.
mkl: > it's intended to minimize foot-guns to lower the error rate when generating Mog code. This is why Mog has no operator precedence: non-associative operations have to use parentheses, e.g. (a + b) * c.Almost all the code LLMs have been trained on uses operator precedence, so no operator precedence seems like a massive foot-gun.