Torch.ts – building PyTorch in TypeScript from scratch to learn

Building PyTorch in TypeScript draws fire — “job bait?” and “AI wrote this” vibes

TLDR: A developer shared a tiny TypeScript “PyTorch” learning project that does basic math, with plans to add more. Commenters pounced, accusing job-hunting and AI ghostwriting, while the creator said it’s about learning — spotlighting the friction between public learning and gatekeeping in tech.

Torch.ts promises a DIY spin on PyTorch — the popular AI toolkit — built in TypeScript (the web-friendly cousin of JavaScript). It’s currently a small library that crunches number grids and does basic math like matrix multiplication and adding, with the creator 13point5 teasing “autograd” (automatic math for training models) soon. That gentle pitch turned into a stormy thread.

The hottest reactions? Suspicion and snark. One commenter side-eyed the motive with a blunt “Is this just to get hired?” while another declared the repo is basically “2–3 array access functions,” calling it nowhere near PyTorch. The spiciest dunk came from tfsh, who claimed they spent more time reading the repo than the author spent coding, added “there’s no substance,” and tossed in shade that “even an LLM from 2022 would do better,” with a jab that it looked like Claude (an AI) wrote it.

The vibes: “resume bait,” “AI ghostwriting,” and a pile-on over what counts as share-worthy. Meanwhile, the author kept it chill, saying they’re learning fundamentals and adding features soon. The bigger drama is the age-old tech debate: build-in-public enthusiasm vs gatekeeping. Today’s lesson? Post your baby project, and the internet might bring pitchforks — or patience.

Key Points

  • Torch.ts is presented as a simple, learning-focused reimplementation of PyTorch-like tensor operations in TypeScript.
  • Installation is performed with “npm install,” and the project runs via “npm start.”
  • The example shows matrix multiplication using a Tensor class and the matmul method.
  • Broadcasting addition is demonstrated by adding a 1D tensor to a 2D tensor.
  • Element-wise functions (exp, log, sqrt, neg) and arithmetic methods (add, sub, mul, div) are provided.

Hottest takes

“will be adding an autograd engine soon” — 13point5
“Are these posts just made to have a better chance of being hired?” — fleshmonad
“there’s no substance at all here… even an LLM from 2022 would do better” — tfsh
Made with <3 by @siedrix and @shesho from CDMX. Powered by Forge&Hive.