zlacker

[parent] [thread] 39 comments
1. hoppp+(OP)[view] [source] 2025-12-02 21:55:18
It's fine but why is Js a good language for agents? I mean sure its faster than python but wouldn't something that compiles to native be much better?
replies(4): >>chatma+L >>AstroB+g1 >>aizk+WS >>ramoz+wE1
2. chatma+L[view] [source] 2025-12-02 21:58:21
>>hoppp+(OP)
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+p2 >>mrcsha+O4 >>parent+Sq >>lockni+Sr
3. AstroB+g1[view] [source] 2025-12-02 22:00:31
>>hoppp+(OP)
It's widespread and good enough. The language just doesn't matter that much in most cases
replies(1): >>moron4+59
◧◩
4. otterl+p2[view] [source] [discussion] 2025-12-02 22:07:03
>>chatma+L
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_+I6 >>Murome+N6
◧◩
5. mrcsha+O4[view] [source] [discussion] 2025-12-02 22:21:12
>>chatma+L
> 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+i8 >>wiseow+n9
◧◩◪
6. Brass_+I6[view] [source] [discussion] 2025-12-02 22:32:23
>>otterl+p2
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+xa
◧◩◪
7. Murome+N6[view] [source] [discussion] 2025-12-02 22:32:44
>>otterl+p2
Running it in a chroot or a scoped down namespace is all your need most of the time anyways.
◧◩◪
8. chamom+i8[view] [source] [discussion] 2025-12-02 22:42:01
>>mrcsha+O4
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+rH
◧◩
9. moron4+59[view] [source] [discussion] 2025-12-02 22:47:44
>>AstroB+g1
This is one of those, "in theory, there's no difference between theory and practice. In practice, there is" issues.

In their, quality software can be written in any programming language.

In practice, folks who use Python or JavaScript as their application programming language start from a position of just not carrying very much about correctness or performance. Folks who use languages like Java or C#, do. And you can see the downstream effects of this in the difference in the production-grade developer experience and the quality of packages on offer in PIP and NPM versus Maven and NuGet.

replies(3): >>AstroB+4g >>drzaiu+gp >>justat+LT
◧◩◪
10. wiseow+n9[view] [source] [discussion] 2025-12-02 22:50:08
>>mrcsha+O4
> 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+3c >>mrsmrt+hD1
◧◩◪◨
11. otterl+xa[view] [source] [discussion] 2025-12-02 22:58:03
>>Brass_+I6
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+8c >>Brass_+Kf >>sheeps+4i
◧◩◪◨
12. mrcsha+3c[view] [source] [discussion] 2025-12-02 23:09:02
>>wiseow+n9
> 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+ct1
◧◩◪◨⬒
13. Jarred+8c[view] [source] [discussion] 2025-12-02 23:09:31
>>otterl+xa
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
◧◩◪◨⬒
14. Brass_+Kf[view] [source] [discussion] 2025-12-02 23:37:40
>>otterl+xa
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).

◧◩◪
15. AstroB+4g[view] [source] [discussion] 2025-12-02 23:39:24
>>moron4+59
That's not a fair comparison. In your example, you're talking about the average of developers in a language. In this situation, it's specific developers choosing between languages. Having the developers you already have choose language A or B makes no difference to their code quality (assuming they're proficient with both)
replies(1): >>moron4+kv
◧◩◪◨⬒
16. sheeps+4i[view] [source] [discussion] 2025-12-02 23:53:20
>>otterl+xa
Doesn’t Bun use JavaScriptCore though? Perhaps their emulation, rather implementation, leans more towards security.
◧◩◪
17. drzaiu+gp[view] [source] [discussion] 2025-12-03 00:57:34
>>moron4+59
As a developer that switches between java, python and typescript every day I think this is fairly myopic opinion. Being siloed to one lang for long enough tends to brings out our tribalistic tendencies, tread carefully.

I've seen codebases of varying quality in nearly every language, "enterprise" and otherwise. I've worked at a C# shop and it was no better or worse than the java/kotlin/typescript ones I've worked at.

You can blame the "average" developer in a language for "not caring ", but more likely than not you're just observing the friction imposed by older packaging systems. Modern languages are usually coupled with package managers that make it trivial to publish language artifacts to package hubs, whereas gradle for example is it's own brand of hell just to get your code to build.

◧◩
18. parent+Sq[view] [source] [discussion] 2025-12-03 01:14:35
>>chatma+L
Not to mention the saturation of training data
◧◩
19. lockni+Sr[view] [source] [discussion] 2025-12-03 01:23:11
>>chatma+L
> 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+4H >>aizk+KS
◧◩◪◨
20. moron4+kv[view] [source] [discussion] 2025-12-03 01:53:05
>>AstroB+4g
These are statements these developers will make themselves. They will say they don't like more strictly typed languages because they feel constrained and slowed down in development. They will argue that the performance hit is worth the trade offs.
◧◩◪
21. miguel+4H[view] [source] [discussion] 2025-12-03 03:51:43
>>lockni+Sr
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+DZ
◧◩◪◨
22. miguel+rH[view] [source] [discussion] 2025-12-03 03:56:23
>>chamom+i8
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+401
◧◩◪
23. aizk+KS[view] [source] [discussion] 2025-12-03 06:20:00
>>lockni+Sr
I think this is contingent on the skill of the human reviewing the AI's code.
24. aizk+WS[view] [source] 2025-12-03 06:23:12
>>hoppp+(OP)
TS is enormous, has endless training data, and can interact with virtually anything on the Internet these days. Also, strong typing is very very useful for AI coding context.
replies(1): >>justat+g01
◧◩◪
25. justat+LT[view] [source] [discussion] 2025-12-03 06:33:59
>>moron4+59
perhaps many of those 'Folks who use languages like Java or C#'

do so because a boss told them 'thats the way we deal with correctness and performance around here'

the fact that their boss made that one decision for them does not somehow transmit the values behind the one decision.

◧◩◪◨
26. lockni+DZ[view] [source] [discussion] 2025-12-03 07:31:35
>>miguel+4H
> 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+G41 >>miguel+vc4
◧◩◪◨⬒
27. justat+401[view] [source] [discussion] 2025-12-03 07:36:06
>>miguel+rH
whoa, instant upgrade. thanks!
◧◩
28. justat+g01[view] [source] [discussion] 2025-12-03 07:37:31
>>aizk+WS
> strong typing is very very useful for AI coding context

what makes you think so?

I believe strong typing is very very useful for human coding,

I'm not convinced its so 'very very' for agents.

replies(1): >>matwoo+C41
◧◩◪
29. matwoo+C41[view] [source] [discussion] 2025-12-03 08:15:13
>>justat+g01
When I've use agents with TS, failing tests due to typing seems to help the agent get to the correct solution. Maybe it's not required though.
replies(1): >>tubthu+9a1
◧◩◪◨⬒
30. conart+G41[view] [source] [discussion] 2025-12-03 08:15:37
>>lockni+DZ
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.
◧◩◪◨
31. tubthu+9a1[view] [source] [discussion] 2025-12-03 08:45:36
>>matwoo+C41
What do you mean by "failing tests", are you talking about runtime code? TypeScript erases all types at compile so these wouldn't affect tests. Unless you meant "compile errors" instead.

I've noticed LLMs just slap on "as any" to solve compile errors in TypeScript code, maybe this is common in the training data. I frequently have to call this out in code review, in many cases it wasn't even a necessary assertion, but it's now turned a variable into "any" which can cause downstream problems or future problems

replies(1): >>matwoo+Bc1
◧◩◪◨⬒
32. matwoo+Bc1[view] [source] [discussion] 2025-12-03 08:59:27
>>tubthu+9a1
My code has tests and the LLM wrote more tests.

I tell the LLM to include typing on any new code.

The agent is running the test harness and checking results.

◧◩◪◨⬒
33. wratho+ct1[view] [source] [discussion] 2025-12-03 11:10:34
>>mrcsha+3c
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.
◧◩◪◨
34. mrsmrt+hD1[view] [source] [discussion] 2025-12-03 12:27:19
>>wiseow+n9
>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+Dn2
35. ramoz+wE1[view] [source] 2025-12-03 12:37:15
>>hoppp+(OP)
The answer is typescript is a much simpler and more pleasant developer experience than any other language. These are products they need to, and often originate from, fast churn of code/features.

Otherwise they’d be building these types of things in Rust.

replies(1): >>airstr+KI1
◧◩
36. airstr+KI1[view] [source] [discussion] 2025-12-03 13:07:52
>>ramoz+wE1
Surely you jest
replies(1): >>ramoz+nL1
◧◩◪
37. ramoz+nL1[view] [source] [discussion] 2025-12-03 13:26:06
>>airstr+KI1
I wrote the comment while waiting on a 50min rust build pipeline
replies(1): >>airstr+Wc4
◧◩◪◨⬒
38. igouy+Dn2[view] [source] [discussion] 2025-12-03 16:39:45
>>mrsmrt+hD1
C# AOT "compiles fast enough" compared to Go or are you looking at C# JIT ?

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

◧◩◪◨⬒
39. miguel+vc4[view] [source] [discussion] 2025-12-04 03:47:14
>>lockni+DZ
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.

◧◩◪◨
40. airstr+Wc4[view] [source] [discussion] 2025-12-04 03:51:22
>>ramoz+nL1
And I wrote mine waiting for my shuttle back from the moon to Earth
[go to top]