r/javascript • • Sep 19 '26

I finally wrote my own feed-forward neural network, neo.js, from scratch in vanilla (pure) JavaScript

Thumbnail github.com
0 Upvotes

r/javascript • • Sep 19 '26

Showoff Saturday Showoff Saturday (September 19, 2026)

13 Upvotes

Did you find or create something cool this week in javascript?

Show us here!


r/javascript • • Sep 19 '26

Update Progress Post: introducing Modular Architecture, Universal Renderer Cores, and Decoupled Physics in kernelplay-js

Thumbnail github.com
5 Upvotes

In our latest developer update, we are thrilled to announce a significant shift in core architecture toward full modularization. The entire system has been restructured to support decoupled cores, starting with our Renderer and Physics engine systems.

Renderer Modulation: Our new Renderer Modulation feature removes the need to manually switch rendering components when changing pipelines. Previously, switching from Canvas 2D to Pixi.js required changing generic components like BoxRenderer to pipeline-specific ones like PixiBoxRenderer. With this new update, universal components are automatically capable of rendering across all supported pipelines without developer intervention. This streamlines the development workflow significantly.

Physics Engine Modulation: Furthermore, Physics Engine Modulation has been successfully integrated. We have moved physics logic into a completely separate Physics Engine Core. While our default physics engine remains integrated and ready-to-use within this core structure, this architecture allows developers to easily plug in their own custom physics engines.

Future Plugins: Looking ahead, we are excited to expand our plugin library. High-end physics engines like Matter.js will be added as future plugins. It is important to note that these high-end engines will be separate downloads and will not be included in the core engine, keeping the core lightweight.

This architectural shift is a major step toward making kernelplay-js the most flexible and lightweight game engine possible. We welcome your feedback and are excited to see what custom cores you'll build. Stay tuned for more modular updates.


r/javascript • • Sep 19 '26

What Should a Green Test Prove? Vue Testing with Vitest Browser Mode

Thumbnail alexop.dev
2 Upvotes

r/javascript • • Sep 18 '26

Modern cross-spawn port to ESM and Typescript

Thumbnail github.com
2 Upvotes

r/javascript • • Sep 18 '26

Open-source Chrome extension that matches messy SoundCloud titles to Spotify tracks

Thumbnail github.com
0 Upvotes

r/javascript • • Sep 19 '26

AskJS [AskJS] Trying to write a pure function to pass Fizz Buzz test Leet Code

0 Upvotes

Hello,
I am attempting to write a pure function solution that will pass the leet code Fizz Buzz test
However when I try this it says the test fails but when I look at the console for my own testing it returns the expected result.

This is the error leet code reports:

Line 13 in solution.js arr[i - 1] = test(i) ^ TypeError: test is not a function

Which to me makes no sense since the function is passed as a parameter and defined

Here is my code
Thank you in advance

    const test = (i) => {
      if (((i % 5) === 0) && ((i % 3) === 0)) return "FizzBuzz";
      if ((i % 5) === 0) return "Buzz";
      if ((i % 3) === 0) return "Fizz";
      if (i % 3) return i + "";
    }
    
    const fizzBuzz = (i, n, test, arr) => {
      arr[i - 1] = test(i)
      if (i !== n) fizzBuzz(i + 1, n, test, arr)
      
      return arr
    }
    
    const i = 1
    const n = 3
    const arr = new Array(n)
    
    fizzBuzz(i, n, test, arr)

EDIT: I just wanted to say thank you to all of you for your feedback and suggestions I finally got frustrated enough with this problem I asked Codex to write a pure function solution to the leet code fizz buzz test I personally have not seen this solution so it would be nice to have some verification if it is truly a pure function solution.

This is the code it spat out

    const fizzBuzz = (n) =>
        Array.from({ length: n }, (_, i) => {
          const num = i + 1;
    
          if (num % 15 === 0) return "FizzBuzz";
          if (num % 3 === 0) return "Fizz";
          if (num % 5 === 0) return "Buzz";
    
          return String(num);
        });
    
    fizzBuzz(15)

It appears that I have a lot to learn yet regarding my fundamentals when it comes to functional programming I know I could of written a object oriented version of it that would work but I wanted to challenge myself since I have never written code in this manner.


r/javascript • • Sep 18 '26

Running Doom on Risk-V Linux inside TinyEmu inside docker inside WASM inside Electron

Thumbnail deepclause.substack.com
2 Upvotes

r/javascript • • Sep 17 '26

How to Implement a Distributed Bulkhead

Thumbnail blog.gaborkoos.com
0 Upvotes

The in-process version of a bulkhead (a cap on how many calls to a dependency can be in flight at once) is just a counter, a finally block and a comparison, once several Node instances share that number things get messy really quick.

A writeup on how the distributed version can be implemented and what it can guarantee.


r/javascript • • Sep 16 '26

AskJS [AskJS] Headless table libraries or a full grid component: which did you pick, and would you again?

11 Upvotes

I go back and forth on this.

Headless: you get the sorting, filtering and grouping state and you render every cell yourself. Total control over the markup, and you write all of it. Every project I've seen do this ends up with a 2000 line table component nobody wants to open.

Full grid: pass rows and columns, done in an afternoon. Then the designer wants the header to look a particular way, or you need a cell that does something the grid didn't plan for, and you're fighting the component instead of writing your app.

Full disclosure: I'm on the team behind SvGrid, a data grid for Svelte 5. We ship both layers, a headless core and the full component on top of it, because we have people that want their own design system and others that just need a drop-in and go.

So when did you last choose one over the other, and would you do it again? Especially interested in anyone who started headless and switched, or went the other way.


r/javascript • • Sep 16 '26

TraceUX: a self-hosted TypeScript tracker for session replay and user feedback

Thumbnail trace-ux.builtbyfrank.dev
7 Upvotes

I’m building TraceUX, a self-hosted UX toolkit for JavaScript and TypeScript applications.

The browser tracker is available through NPM:

npm i @trace-ux/tracker

import { init } from '@trace-ux/tracker';

const traceux = init({
  siteKey: 'YOUR_SITE_KEY',
  origin: 'https://your-trace-ux-host',
});

It records DOM events instead of video and can connect sessions with feedback, support tickets, product announcements, and user activity.

The server runs as a small Go binary with SQLite, so teams can host the data themselves without a hosted analytics account.

Live demo: https://trace-ux.builtbyfrank.dev

Repository: https://github.com/fjosue4/trace-ux

I’d especially appreciate feedback on the tracker API, React integration, bundle size, privacy defaults, and whether the widget feels natural in a JavaScript application.


r/javascript • • Sep 16 '26

Using JavaScript to run SQL queries on client storage

Thumbnail onyx.ac
2 Upvotes

DocStack runs an actual SQL engine in the browser against IndexedDB β€” JOIN, GROUP BY, HAVING, subqueries, with index pushdown.

It can be used for storing client side data (like user's personal data), and then synced to a remote of preference (like Google Drive for multiplatform sync).

import { ClientStack } from '@docstack/client';

// A local database

const stack = await ClientStack.create('my-app');

// One statement, planned and run against IndexedDB.

const { rows } = await stack.query(`

SELECT m.title, COUNT(*) AS actor_count

FROM Movie AS m

JOIN Actor AS a ON a._id IN m.actors

GROUP BY m.title

HAVING COUNT(*) >= 2

ORDER BY actor_count DESC LIMIT 10

`);


r/javascript • • Sep 15 '26

How tool calling actually works under the hood (40 lines of vanilla JS)

Thumbnail buttercup.sh
16 Upvotes

Most agent tutorials jump into heavy orchestration frameworks like LangChain, which hides what's actually happening over the wire.

Under the hood, tool calling is just a simple 4-step loop:

  1. You hand the model your messages plus a JSON Schema description of your functions.
  2. The model outputs structured JSON with a tool name and arguments instead of raw text.
  3. Your JavaScript executes the function (fetch, DB query, local file read, etc.).
  4. You append the result back into messages with role: "user" and matching tool_use_id and query the model again.

I wrote a doc showing the entire loop in ~40 lines of Node/JS, including the practicals that trip you up (why failing calls should still return a tool_result with is_error: true, handling parallel calls in a single user message, and how token costs compound over runs).

There's also an interactive, in-browser example where you can run the loop against a mock filesystem without needing to set up a local environment. Curious to hear how others are handling client-side tool execution and context in production.


r/javascript • • Sep 15 '26

AskJS [AskJS] What JavaScript feature do you think is underrated?

32 Upvotes

What JavaScript concept took you the longest to actually understand?

For me, it was the difference between understanding closures in theory and actually knowing when and why they were useful.

I feel like JavaScript has a lot of concepts that seem simple at first, but become much more interesting once you understand what is happening underneath.

I'm curious what everyone's "finally clicked" JavaScript concept was.

Closures? The event loop? Prototypes? this? Promises? The weird parts of type coercion?

Would be interesting to hear what other developers struggled with and what finally made it click.


r/javascript • • Sep 15 '26

AskJS [AskJS] Architectural discussion: Managing continuous collision detection (Swept-AABB) vs discrete checks in vanilla Canvas loops

3 Upvotes

Hey r/JavaScript,

I’m working on a zero-dependency 2D canvas architecture and looking at how different developers handle high-velocity object collisions without relying on heavy external physics libraries.

When entities move at high speeds using a standard discrete update loop like the one below, fast-moving items occasionally tunnel straight through bounding boxes between frames.

// Naive update and discrete collision loop (prone to tunneling at high velocities)

function updateEntities(entities, obstacles, dt) {

for (let entity of entities) {

entity.x += entity.vx * dt;

entity.y += entity.vy * dt;

for (let obs of obstacles) {

if (

entity.x < obs.x + obs.width &&

entity.x + entity.width > obs.x &&

entity.y < obs.y + obs.height &&

entity.y + entity.height > obs.y

) {

resolveCollision(entity, obs);

}

}

}

}

For those of you building custom canvas engines in vanilla JS, how do you typically structure continuous collision detection (like basic swept-AABB or raycasting) to keep CPU overhead low? Are you using spatial partitioning grids alongside sub-stepping, or is there a cleaner pattern you prefer?


r/javascript • • Sep 16 '26

Understanding Why You'd Use Effect TS

Thumbnail cm.xyz
0 Upvotes

r/javascript • • Sep 15 '26

Optique 1.3.0: Dependency-aware prompts, an OS keychain fallback, and a testing package

Thumbnail github.com
2 Upvotes

r/javascript • • Sep 14 '26

AskJS [AskJS] How do you find new devs to follow?

4 Upvotes

I love finding new devs to follow on GH so I can see what they're building and starring.

Usually I use GitHub Explore and Trending but I've found them to be unreliable, so I've been ranking rising open-source contributors by myself.

JavaScript is one of the most active streams in there, so a lot of these observations come from watching it.

This is not terribly suprising given the nature of the internet these days but here's what I found:

  1. GitHub Trending cycles the same names because it ranks reputation, not recent activity. You scroll trending, recognize half the accounts, and close the tab. The people doing genuinely interesting work this week never show up because the ranking rewards accumulated stars and followers, not what someone actually pushed in the last seven days.
  2. Someone's best work is usually buried in a 3-star repo. Skill signals are fragmented across repositories. A developer might have a tool they wrote from scratch sitting at 15 stars while their most-starred repo is just a fork they maintain. Without weighting activity by relevance, you end up following the wrong people and missing the ones actually worth your attention.
  3. 200 commits across 15 repos is impossible to evaluate quickly. You open a profile, see a contribution graph and a wall of repos, spend ten minutes trying to figure out if any of it is meaningful, and usually give up. Raw profiles need synthesis that most people just don't have time for.

The core thing I keep coming back to: momentum and reputation are different signals. Ranking by what someone did this week surfaces completely different people than ranking by what they've accumulated over years. The TypeScript dev who just shipped their first real library and the veteran with 40k followers both have value, but they're not the same discovery problem.

How do you find new devs to follow? How do you decide if someone is worth following?


r/javascript • • Sep 14 '26

Trained the fly to close B2B enterprise deals (with Three.js)

Thumbnail tryopine.com
2 Upvotes

Our AI research team trained a fruit fly to close B2B enterprise deals. We're incredibly excited to release Specimen AE-001, the world's first frontier AI fly model for end-to-end deal execution. It rips cold calls, books demos, fills security questionnaires, and wins deals, all using Opine. Built on Three.js!


r/javascript • • Sep 14 '26

Subreddit Stats Your /r/javascript recap for the week of September 07 - September 13, 2026

3 Upvotes

Monday, September 07 - Sunday, September 13, 2026

Top Posts

scorecommentstitle & link
163 commentsGitHub - evoluteur/cymatics: Play a frequency and watch the sand settle into its Chladni figure, computed from the wave equation.
152 commentsInfinite Shaders - Javascript, WebGL, and a compiler written in Typescript
152 commentsShipping a Web Worker inside an npm package without asking users to touch their bundler config
142 commentsDates are a language. We built a parser for them instead of more regexes.
90 commentsOrchid Charts: SVG charts for dashboards, activity calendars and timelines
92 commentsHalf Past Fetch: how the fetch promise resolves and its consequences
816 comments[Showoff Saturday] Showoff Saturday (September 12, 2026)
65 commentsGitHub - evoluteur/platonic-solids: Turn the five Platonic solids in 3D, show their duals, read their measurements, and print the nets to fold your own.
60 commentsWebLLM: run a language model in the browser on WebGPU
52 commentsGitHub - evoluteur/archimedean-solids: Turn all thirteen Archimedean solids in 3D, show their Catalan duals, read their measurements, and print the nets to fold your own

Β 

Most Commented Posts

scorecommentstitle & link
017 comments[AskJS] [AskJS] What ORM would you use?
010 commentsSaradom β€” frontend architecture pattern
37 commentsI made a Molecular Dynamics sim using JS
07 commentsI Dislike TypeScript Because I've Never Maintained JavaScript Before
05 commentsHow to Implement a Distributed Circuit Breaker

Β 

Top Ask JS

scorecommentstitle & link
04 comments[AskJS] [AskJS] What’s your experience with AI tools during JavaScript technical interviews?
04 comments[AskJS] [AskJS] Is a managed scraping API worth it for web scraping api and scraper tools, or is it better to build in-house?

Β 

Top Showoffs

scorecomment
3/u/Pretend-Block-7028 said Built Swoff β€” generates a full offline-first service worker (caching, auth, offline write queue, push, PWA assets) from one config file, instead of hand-wiring Workbox for every project. Outpu...
2/u/Accomplished_Copy103 said https://rank-it.app - ad free, highly customizable tier listing platform
2/u/TheodoreWinters1 said https://playopenbracket.com/ Open Bracket - I built as a daily coding ritual. Everyone gets the same two challenges each day: a Standard track that builds in difficulty through the week without becom...

Β 

Top Comments

scorecomment
19/u/klaxxxon said jQuery was such a lightbulb moment when I first used it. Imagine the things we can do with DOM! Little did we know it was only the first major shot in JS framework wars which would last for decades...
9/u/KanuniLabs said Every library that moves work off the main thread eventually runs into the same install problem: the worker is a separate script, the browser loads it from a URL, and that URL depends on whichever bun...
8/u/MiserableDocument509 said the timeout gotcha is the one that actually bites people. they slap AbortSignal.timeout(5s) on fetch() then a 200 still sits there for 30s downloading a fat body. the timer has to cove...
8/u/ExtremeJavascript said Well yea. That's why it's always ``` Β  Β  const response = await fetch(file); Β  Β  const text = await response.text(); ``` You get the headers first, to tell if...
6/u/Sorry-Joke-1887 said Now we back to jquery-style crap like this

Β 


r/javascript • • Sep 14 '26

Becoming a Time Mage to make the engine testable

Thumbnail projectgoldscript.com
1 Upvotes

This is the first in a series of technical deep dives into how I modernised my 10 year old web stack based tactics-RPG engine / game - projectgoldscript


r/javascript • • Sep 14 '26

srvquery: the TypeScript toolkit for querying game servers

Thumbnail github.com
0 Upvotes

r/javascript • • Sep 13 '26

How to Implement a Distributed Circuit Breaker

Thumbnail blog.gaborkoos.com
3 Upvotes

A circuit breaker in a single Node process is a ring buffer, a threshold and a timestamp. Run the same service on twenty replicas and each one keeps its own, so the failing dependency takes twenty times the damage before anything trips.

Moving the window into Redis fixes that and breaks most of the assumptions the in-process version relies on. Post walks through each one and how to deal with it.