zlacker

[parent] [thread] 23 comments
1. chatma+(OP)[view] [source] 2025-12-02 21:58:21
JS has the fastest, most robust and widely deployed sandboxing engines (V8, followed closely by JavaScriptCore which is what Bun uses). It also has TypeScript which pairs well with agentic coding loops, and compiles to the aforementioned JavaScript which can run pretty much anywhere.
replies(4): >>otterl+E1 >>mrcsha+34 >>parent+7q >>lockni+7r
2. otterl+E1[view] [source] 2025-12-02 22:07:03
>>chatma+(OP)
Note that "sandboxing" in this case is strictly runtime sandboxing - it's basically like having a separate process per event loop (as if you ran separate Node processes). It does not sandbox the machine context in which it runs (i.e. it's not VM-level containment).
replies(2): >>Brass_+X5 >>Murome+26
3. mrcsha+34[view] [source] 2025-12-02 22:21:12
>>chatma+(OP)
> It also has TypeScript which pairs well with agentic coding loops

The language syntax has nothing to do with it pairing well with agentic coding loops.

Considering how close Typescript and C# are syntactically, and C#'s speed advantage over JS among many other things would make C# the main language for building Agents. It is not and that's because the early SDKs were JS and Python.

replies(2): >>chamom+x7 >>wiseow+C8
◧◩
4. Brass_+X5[view] [source] [discussion] 2025-12-02 22:32:23
>>otterl+E1
When you say runtime sandboxing, are you referring to JavaScript agents? I haven't worked all that much with JavaScript execution environments outside of the browser so I'm not sure about what sandboxing mechanics are available.
replies(1): >>otterl+M9
◧◩
5. Murome+26[view] [source] [discussion] 2025-12-02 22:32:44
>>otterl+E1
Running it in a chroot or a scoped down namespace is all your need most of the time anyways.
◧◩
6. chamom+x7[view] [source] [discussion] 2025-12-02 22:42:01
>>mrcsha+34
Typescript is probably generally a good LLM language because - static types - tons and tons of training data

Kind of tangent but I used to think static types were a must-have for LLM generated code. But the most magical and impressively awesome thing I’ve seen for LLM code generation is “calva backseat driver”, a vscode extension that lets copilot evaluate clojure expressions and generally do REPL stuff.

It can write MUCH cleaner and more capable code, using all sorts of libraries that it’s unfamiliar with, because it can mess around and try stuff just like a human would. It’s mind blowingly cool!!

replies(1): >>miguel+GG
◧◩
7. wiseow+C8[view] [source] [discussion] 2025-12-02 22:50:08
>>mrcsha+34
> C#'s speed advantage over JS among many other things would make C# the main language

Nobody cares about this, JS is plenty fast for LLM needs. If maximum performance was necessary, you're better off using Go because of fast compiler and better performance.

replies(2): >>mrcsha+ib >>mrsmrt+wC1
◧◩◪
8. otterl+M9[view] [source] [discussion] 2025-12-02 22:58:03
>>Brass_+X5
https://nodejs.org/api/vm.html

Bun claims this feature is for running untrusted code (https://bun.com/reference/node/vm), while Node says "The node:vm module is not a security mechanism. Do not use it to run untrusted code." I'm not sure whom to believe.

replies(3): >>Jarred+nb >>Brass_+Ze >>sheeps+jh
◧◩◪
9. mrcsha+ib[view] [source] [discussion] 2025-12-02 23:09:02
>>wiseow+C8
> Nobody cares about this

And that was my point. The choice of using JS/TS for LLM stuff was made for us based on initial wave of SDK availabilities. Nothing to do with language merits.

replies(1): >>wratho+rs1
◧◩◪◨
10. Jarred+nb[view] [source] [discussion] 2025-12-02 23:09:31
>>otterl+M9
The reference docs are auto generated from node’s TypeScript types. node:vm is better than using the same global object to run untrusted code, but it’s not really a sandbox
◧◩◪◨
11. Brass_+Ze[view] [source] [discussion] 2025-12-02 23:37:40
>>otterl+M9
It's interesting to see the difference in how both treat the module. It feels similar to a realm which makes me lean by default to not trusting it for untrusted code execution.

It looks like Bun also supports Shadow Realms which from my understanding was more intended for sandboxing (although I have no idea how resources are shared between a host environment and Shadow Realms, and how that might potentially differ from the node VM module).

◧◩◪◨
12. sheeps+jh[view] [source] [discussion] 2025-12-02 23:53:20
>>otterl+M9
Doesn’t Bun use JavaScriptCore though? Perhaps their emulation, rather implementation, leans more towards security.
13. parent+7q[view] [source] 2025-12-03 01:14:35
>>chatma+(OP)
Not to mention the saturation of training data
14. lockni+7r[view] [source] 2025-12-03 01:23:11
>>chatma+(OP)
> It also has TypeScript which pairs well with agentic coding loops, (...)

I've heard that TypeScript is pretty rough on agentic coding loops because the idiomatic static type assertion code ends up requiring huge amounts of context to handle in a meaningful way. Is there any truth to it?

replies(2): >>miguel+jG >>aizk+ZR
◧◩
15. miguel+jG[view] [source] [discussion] 2025-12-03 03:51:43
>>lockni+7r
Not sure where you heard this but general sentiment is the opposite.

There was recently a conference which was themed around the idea that typescript monorepos are the best way to build with AI

replies(1): >>lockni+SY
◧◩◪
16. miguel+GG[view] [source] [discussion] 2025-12-03 03:56:23
>>chamom+x7
Clojure is such an underrated language for vibe coding for this very reason.

Makes me wonder what a theoretical “best possible language for vibe coding” would look like

replies(1): >>justat+jZ
◧◩
17. aizk+ZR[view] [source] [discussion] 2025-12-03 06:20:00
>>lockni+7r
I think this is contingent on the skill of the human reviewing the AI's code.
◧◩◪
18. lockni+SY[view] [source] [discussion] 2025-12-03 07:31:35
>>miguel+jG
> Not sure where you heard this but general sentiment is the opposite.

My personal experience and anecdotal evidence is in line with this hypothesis. Using the likes of Microsoft's own Copilot with small simple greenfield TypeScript 5 projects results in surprisingly poor results the minute you start leaning heavily on type safety and idiomatic techniques such as branded types.

> There was recently a conference which was themed around the idea that typescript monorepos are the best way to build with AI

There are also flat earth conferences.

replies(2): >>conart+V31 >>miguel+Kb4
◧◩◪◨
19. justat+jZ[view] [source] [discussion] 2025-12-03 07:36:06
>>miguel+GG
whoa, instant upgrade. thanks!
◧◩◪◨
20. conart+V31[view] [source] [discussion] 2025-12-03 08:15:37
>>lockni+SY
It's especially tricky since monorepos are an obvious antipattern to begin with. They're a de-separation of concerns: an encouragement to blur the unit boundaries, not write docs, create unstable APIs (updating all usages at once when they change), and generally to let complexity spread unchecked.
◧◩◪◨
21. wratho+rs1[view] [source] [discussion] 2025-12-03 11:10:34
>>mrcsha+ib
This has always been the case. The Java and C# ecosystems prioritise stability and scale. They wait for ideas to prove themselves in other languages like Erlang, Python, Go, Scala, and so on, and then adopt the successful ones. Last-mover advantage. That said, there are some caveats. Java is still missing value types, while C# has moved quickly with async/await rather than adopting models like goroutines or virtual threads, which can sometimes limit concurrency ergonomics for the developer.
◧◩◪
22. mrsmrt+wC1[view] [source] [discussion] 2025-12-03 12:27:19
>>wiseow+C8
>If maximum performance was necessary, you're better off using Go because of fast compiler and better performance.

That's not true, if anything, C# is faster and also compiles fast enough.

https://benchmarksgame-team.pages.debian.net/benchmarksgame/...

replies(1): >>igouy+Sm2
◧◩◪◨
23. igouy+Sm2[view] [source] [discussion] 2025-12-03 16:39:45
>>mrsmrt+wC1
C# AOT "compiles fast enough" compared to Go or are you looking at C# JIT ?

https://benchmarksgame-team.pages.debian.net/benchmarksgame/...

◧◩◪◨
24. miguel+Kb4[view] [source] [discussion] 2025-12-04 03:47:14
>>lockni+SY
Hate to say it but this sounds like a skill issue. The reason Typescript monorepos are gaining popularity for building with AI is because of how powerful TS's inference system is. If you are writing lots of types you are doing it wrong.

You declare your schema with a good TS ORM then use something like TRPC to get type inference from your schemas in your route handlers and your front end.

You get an enforced single source of truth that keeps the AI on track with a very small amount of code compared to something like Java.

This really only applies to full stack SAAS apps though.

[go to top]