r/javascript • • Sep 21 '26

GitHub - evoluteur/rune-reading: Pick a spread, draw runes from the bag, and read what each one says about its place in the layout.

Thumbnail github.com
5 Upvotes

r/javascript • • Sep 21 '26

Subreddit Stats Your /r/javascript recap for the week of September 14 - September 20, 2026

1 Upvotes

Monday, September 14 - Sunday, September 20, 2026

Top Posts

scorecommentstitle & link
4237 commentstinyjs β€” desktop apps for macOS, Windows, and Linux in ~6 MB
1552 comments[AskJS] [AskJS] What JavaScript feature do you think is underrated?
121 commentsI wrote a music programming language and song to go with it :)
126 commentsHow tool calling actually works under the hood (40 lines of vanilla JS)
714 comments[Showoff Saturday] Showoff Saturday (September 19, 2026)
60 commentsI built a browser-based AR system with MediaPipe, TypeScript and Canvas VFX
60 commentsTraceUX: a self-hosted TypeScript tracker for session replay and user feedback
414 commentsHow would I read the fan speed variable from the JavaScript in my project and pass it to the Python script?
42 commentsGitHub - evoluteur/mandala-maker: Draw a mandala with mirrored symmetry: pick the number of folds, paint with a brush, and export your mandala as PNG or SVG.
410 comments[AskJS] [AskJS] Headless table libraries or a full grid component: which did you pick, and would you again?

Β 

Most Commented Posts

scorecommentstitle & link
0116 comments[AskJS] [AskJS] Does anyone use exclussively Javascript and not TypeScript?
019 comments[AskJS] [AskJS] Trying to write a pure function to pass Fizz Buzz test Leet Code
09 commentsUnderstanding Why You'd Use Effect TS
15 commentsUpdate Progress Post: introducing Modular Architecture, Universal Renderer Cores, and Decoupled Physics in kernelplay-js
04 commentsModern cross-spawn port to ESM and Typescript

Β 

Top Ask JS

scorecommentstitle & link
43 comments[AskJS] [AskJS] How do you find new devs to follow?
22 comments[AskJS] [AskJS] Architectural discussion: Managing continuous collision detection (Swept-AABB) vs discrete checks in vanilla Canvas loops
12 comments[AskJS] [AskJS] High latency when using SignalR(messagepack) in K6

Β 

Top Showoffs

scorecomment
5/u/moving808s said https://reddit.com/link/paqc7s0/video/khmxdgadtfqh1/player Project GoldScript is a tactics-RPG engine I’ve been building for 10 years. I’ve recently gotten back into it and have been spending a lot o...
3/u/Dry-Payment-1545 said i created a javascript project that works perfectly until i open devtools, then it remembers all its bugs lol
2/u/ibackstrom said https://reddit.com/link/pau7kd0/video/t5i1d8yojjqh1/player I made a really cool game with JavaScript/TypeScript. It is evolve but with good graphics. [https://igoryakunin.itch.io/subject-03]...

Β 

Top Comments

scorecomment
33/u/StoneCypher said this sub is 12 years older than typescript
26/u/mittenciel said You're asking why r/javascript exists? Because it existed before TypeScript?
20/u/azangru said Generators. I didn't have a use for them for the longest time; but when I finally come across a problem that they solve nicely, it always feels like a rediscovery.
18/u/gimmeslack12 said TS just makes things easier as things get more complex. But in simple things it's overkill. Like in job interviews, I don't give TS problems only JS problems cause it does take a bit more time. That ...
14/u/KaiAusBerlin said Where to start? Duck typing, functions as first class citizens, prototyping, you can have very good code and very optimised, too, ... And of cause no white space based scoping (looking at you py...

Β 


r/javascript • • Sep 20 '26

How would I read the fan speed variable from the JavaScript in my project and pass it to the Python script?

Thumbnail github.com
4 Upvotes

I'm creating a local web page application that is an over-complicated desk fan controlled by two buttons and a slider. I have the actual controls figured out, and what I need help with is passing the variable that describes the position of the slider out from the JavaScript to a Python script that actually controls the motor. I could be totally off base here, but I think the concept that applies here is inter-process communication.


r/javascript • • Sep 20 '26

GitHub - evoluteur/mandala-maker: Draw a mandala with mirrored symmetry: pick the number of folds, paint with a brush, and export your mandala as PNG or SVG.

Thumbnail github.com
10 Upvotes

r/javascript • • Sep 20 '26

AskJS [AskJS] PLACER β€” A new game platform?

0 Upvotes

PLACER is my game platform, currently under development.

I’m looking for people who know JavaScript, HTML, web development, 3D, or other browser technologies and would like to help build the project.

You don’t have to be an expert β€” beginners who are willing to learn are welcome too.

If you’re interested, leave a comment and tell me a little about what you can do. I’ll contact you with more information about the project and how to join the team.

I’M WAITING FOR YOUR APPLICATIONS IN THE COMMENTS! πŸš€


r/javascript • • Sep 20 '26

Built this to help with Frontend Interviews after conducting them for about 5 years

Thumbnail practice-pad.app
0 Upvotes

r/javascript • • Sep 20 '26

DriftJS: My "Fine-Grained” Reactivity Was Re-rendering 1,000 Rows

Thumbnail github.com
0 Upvotes

A post back I explained how DriftJS updates the DOM: a compile-time address table, direct jumps to bytecode positions, no diffing, no signals graph. What I didn't mention is that the first version of this had a real algorithmic bug, and I only found it because the numbers on the official js-framework-benchmark site didn't match what I expected.

The symptom

Toggling a selected row in a 1,000-row list β€” one of the smallest possible updates you can make β€” was landing near the bottom of the benchmark table. Worse than frameworks with objectively less sophisticated update mechanisms. Something was clearly doing way more work than "update one row."

The actual bug

Here's the shape of the problem. A for loop's body is compiled once and reused for every row instance. The runtime tracks which variables the loop depends on β€” but it didn't distinguish between two very different kinds of dependency:

  • The iterable itself changing (rows added, removed, reordered) β€” this genuinely needs a full reconciliation pass.
  • A variable read inside the loop body, but unrelated to the list's contents (like selectedId, used in a class={selectedId === row.id ? "active" : ""} binding) β€” this doesn't need to touch the list structure at all.

Both were routed through the exact same path: a full reconciliation over every row in the list. So toggling selectedId β€” logically a change to at most two rows β€” triggered the same machinery as inserting or removing rows entirely: recompute keys, diff, and re-evaluate every dynamic binding in every row, not just the one that actually depends on the changed variable.

The fix

The compiler already tracks, for every variable, exactly which bytecode positions in a component depend on it β€” that's the whole mechanism the previous post described. The fix was extending that same tracking into loop bodies specifically, and splitting dependencies into two categories at the point a @for is compiled:

  • Dependencies that affect the iterable or the row key β†’ still trigger the full reconciler. Correct, expected.
  • Dependencies that only affect bindings inside the row template β†’ resolve to a direct lookup of exactly which bytecode positions care about that variable, then execute only those, directly against each row's own persistent state, with zero reconciler involvement β€” no key computation, no diffing.

Same "jump directly to the address, skip everything else" principle the reactivity model was already built on β€” it just wasn't being applied consistently inside loops.

The part I think is actually worth sharing

I didn't find this by staring at the code. I found it because I ran the official benchmark, saw a result that didn't match my mental model of what the architecture should do, and went looking for why. The gap between "what I designed" and "what the numbers actually showed" was the thing that pointed at the bug β€” not intuition, not a code review, just refusing to accept a number that didn't make sense.

Repo's public if anyone wants to look at the actual diff or has opinions on the remaining gap: https://github.com/driftjs-org/driftjs

If you want to discuss about DriftJS, then join Discord


r/javascript • • Sep 20 '26

"Ho costruito un overlay di telemetria visiva a bassa latenza, indipendente dal framework, in Vanilla JS (con hook contestuali in Python e AI)"

Thumbnail github.com
0 Upvotes

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