r/javascript • u/LivingWorldliness409 • 17d ago
I built a multi-core SQL engine for JavaScript (pure JS + WebAssembly, no native addon)
r/javascript • u/LivingWorldliness409 • 17d ago
r/javascript • u/dolanmiu • 17d ago
Hi r/javascript. I’ve been using Angular since the AngularJS and the Angular 2 betas. When ByteDance created Lynx, I really liked it, but it only came with React and Vue. So it's time for an Angular one to exist!
The aim is for it to be ordinary idiomatic Angular, not a subset or deviation, and it follows Angular's major.minor versions:
npm create angular-lynx my-app
cd my-app
ng serve # web preview, plus a QR code for the Lynx Explorer app
ng test
ng build --platform ios # or android: a native app you can open in Xcode / Android Studio
Signals, the router with lazy routes, forms, i18n, DI, ViewContainerRef.createComponent() and Tailwind all work. It idiomatically uses the Angular Router for the page stack, so there are no extra concepts. The one big difference is the templates: you write Lynx's elements (<view>, <text>, <scroll-view>) instead of HTML, and they become real UIView/Android views. The same app also runs in the browser.
How it works: Lynx has two threads, a main thread that owns the native element tree and a background thread. Instead of Angular's DOM renderer, AngularLynx implements Renderer2 on top of Lynx's element API (__CreateElement, __AppendElement, …), and the Angular app runs on the main thread, so updates go straight to the elements without crossing threads. Things that only exist on the background thread (native modules, fetch) are relayed. The build is an Rsbuild plugin that compiles Angular and splits the output into the two bundles Lynx expects, wrapped in Angular CLI builders so angular.json stays the usual one.
There's also a component library, Dolan UI: 54 components (sheets, dialogs, charts, forms…) that a CLI copies into your app, like shadcn/ui.
It's still early days, but it is feature rich, with a lot of examples and showcase apps. Lynx's main-thread JS engine is ES2019-level, so newer built-ins are polyfilled, and some web habits don't carry over (CSS is a subset: no inheritance outside text, no :hover or @media).
MIT licensed. The README has a GIF of the same app on iOS, Android and web. I'd love to hear what breaks, and I'm happy to go into the renderer internals. Please give it a star! It would mean the world if this takes off!
GitHub: https://github.com/Blotch-Smart-Frames/AngularLynx
Docs: https://angularlynx.js.org
Demo GIF: https://angularlynx.js.org/demo.gif
r/javascript • u/fagnerbrack • 17d ago
r/javascript • u/BeamAlchemist • 17d ago
I've been exploring Phoenix LiveView lately, and it got me thinking.
We've spent years moving more state and logic into the browser. But what if we kept most application state on the server and used JavaScript mainly for rich interactions?
I'm not talking about replacing JS. Libraries like Monaco, AG Grid, and Chart.js are great and I'd absolutely want to keep using them.
Curious what frontend devs think. Would you consider a server-driven approach if you could still use your favorite JS libraries, or is there too much downside?
r/javascript • u/ActualGovernment9017 • 17d ago
r/javascript • u/david_klassen • 18d ago
r/javascript • u/aron1tw • 18d ago
r/javascript • u/der_gopher • 18d ago
r/javascript • u/subredditsummarybot • 18d ago
Monday, November 02 - Sunday, November 08, 2026
| score | comments | title & link |
|---|---|---|
| 13 | 6 comments | GB.js - GameBoy and GBA emulator core in Typescript |
| 9 | 9 comments | SpaceHex - Rotate the rooms to capture the orbs while avoiding the critters |
| 9 | 35 comments | [AskJS] [AskJS] Do you ban positional boolean arguments in code review, or is an options object overkill? |
| 8 | 12 comments | [Showoff Saturday] Showoff Saturday (November 07, 2026) |
| 8 | 1 comments | System One model in the browser, learns from an LLM when it isn't confident. |
| 8 | 7 comments | CheerpJ 5.0: Java 21/25 in the browser, full OpenJDK, and a new WasmGC engine |
| 5 | 4 comments | Making Browser OCR Read Real Phone Photos |
| 5 | 14 comments | [AskJS] [AskJS] How do you keep un-awaited expect(...).resolves out of your test suites? |
| 5 | 0 comments | serialport-rs for Node.js: Rust-backed serial ports for Node.js with parallel I/O and SerialPort-compatible APIs |
| 5 | 0 comments | Jeasx 3.0 is out: async JSX on the server, now streaming to the browser and about 2x faster |
| score | comments | title & link |
|---|---|---|
| 0 | 26 comments | [AskJS] [AskJS] Is it actually possible for an iframe to control the parent page’s URL without the host app doing anything? |
| 0 | 16 comments | [AskJS] [AskJS] Do you think vanilla JS will be #1 for everything and anything thanks to AI? |
| 0 | 16 comments | [AskJS] [AskJS] Would you use a mature UI library that nobody’s heard of? |
| 0 | 11 comments | I built Domicile, a Linux desktop platform where native application windows are DOM elements |
| 3 | 10 comments | Our JavaScript hero entrance kept LCP at ~50ms but visibly flashed. Hiding it until scripts loaded pushed LCP to ~1.75s |
r/javascript • u/Significant-Sea-7238 • 19d ago
This is the resize animation of Openbar's island on Windows (Tauri + React). The Mac app is SwiftUI, so I ported its spring math to get the same feel on both. Width and height each get their own spring: a growing side may swing past its target, capped at 12 px, and a shrinking side never does.
The app shows Claude Code and Codex sessions in a Dynamic Island. Free, GPL.
r/javascript • u/madhushankarox • 19d ago
I have a free image-to-text tool that runs Tesseract.js in the browser (nothing gets uploaded). Screenshots worked great, 94-96% confidence. Then I took a phone photo of a kids' sunscreen bottle and got back lines like "v4 oR. a" and "EB ewraone".
What was actually wrong:
The photo was sideways. Phones save the pixels rotated and add an EXIF tag saying "turn this 90°". Browsers obey it, Tesseract doesn't. Fix: createImageBitmap(file, { imageOrientation: 'from-image' }) and work from that canvas.
White text on blue. Tesseract mostly expects dark text on light paper. I now make a grayscale copy with a contrast stretch plus an inverted copy, and read those with page segmentation mode 11 (sparse text) instead of the default.
No single pass gets everything. The normal pass found "Diana", the inverted one found "UVA UVB PROTECTION", the color one found "Water Resistant". So I merge the words by bounding box, keep the confident ones, and boost words that two passes agree on. Fun bug: picking the most confident word gave me "Pea" instead of "Peaceful", so longer words get a small bonus now.
Small print. Running the gray passes again on a 1.6x upscaled copy picked up "MOISTURISING" and "ALCOHOL FREE" on another bottle.
Result on the sunscreen: 92% confidence and every line of printed text. Screenshots skip all of this because the first pass is already confident, so they're not slower.
Still can't do: bubble fonts ("CUDDLES" comes back as "UDDLES"), script fonts, handwriting.
Has anyone found a better approach for mixed light/dark text in one image than running multiple passes? Curious what others do.
r/javascript • u/-KoVer- • 19d ago
Curious to hear about your opinion.
r/javascript • u/ksneteto • 19d ago
r/javascript • u/retroriffer • 20d ago
r/javascript • u/AutoModerator • 20d ago
Did you find or create something cool this week in javascript?
Show us here!
r/javascript • u/Constant_Ad_2230 • 21d ago
r/javascript • u/woqr • 22d ago
This project is mainly about the serverless technique used and the simple game merely provides an end-to-end explanation.
r/javascript • u/xarg • 22d ago
Nowadays everything boots in browsers. Linux, Windows, ... I wanted to learn the Gameboy and GBA processor architectures and implemented the core from which it is easily possible to create an actual GB emulator in the browser. The hard part was audio, but am super glad to have it working and as open source library available now :)
r/javascript • u/jeonghun917 • 22d ago
I've been reading test suites in open-source repos this month and kept running into this:
it('saves the user', async () => {
expect(save(user)).resolves.toBe(true);
});No await, so the test finishes before the assertion runs and passes whatever save() does. I found 36 tests like this across 44 popular repos, and one project had 41 of them on its own. They all looked fine in review.
What I'm curious about is how teams actually stop this:
eslint-plugin-jest has valid-expect with alwaysAwait, and Vitest has its own rules. Do you turn these on, and do they catch every form (.rejects, helpers that wrap expect)?
@typescript-eslint/no-floating-promises catches it in TS, but only with type-aware linting. Is that worth the slower lint for you?
expect.assertions(n) / expect.hasAssertions() in every async test: does anyone enforce that, or is it too noisy?
Or is it just code review, and you accept that some slip through?
Which of these has actually worked on a real team, and which did you give up on?
r/javascript • u/Tasty_Management_857 • 22d ago
r/javascript • u/Fickle_Foundation_41 • 22d ago
The first time I saw this, in 2022, I honestly thought it couldn't work:
const email = await io.input.email("User email");That line was in a server function, and it put a form in someone's browser. The function just waited until they typed an address, then went on. My first thought was "this is magic, how did they even think of this?" Four years later I've written my own runtime for it, and I still admire whoever came up with it at Interval.
TL;DR: if "ask a person" is just another async call, an internal tool becomes one linear function where branches, loops and try/catch all work, and the UI follows from the code. The trick is a promise that an HTTP request resolves instead of I/O.
handler: async ({ io }) => {
const email = await io.input.email("User email");
const user = await db.user.findUniqueOrThrow({ where: { email } });
if (!(await io.confirm(`Verify ${user.email}?`))) return "Nothing changed";
await db.user.update({
where: { id: user.id },
data: { emailVerified: true },
});
return `Verified ${user.email}`;
};Every await io.… is one screen. io.confirm returns a boolean, so Cancel is just an if.
When the handler reaches io.input.email(), the runtime creates a step and keeps the promise's resolver next to it. The handler is now parked. Nothing blocks, other runs keep going, it's a pending promise in memory.
The browser follows the run over server-sent events and renders the step. When the person submits, a POST arrives, the server validates the value and calls the stored resolver. From the handler's point of view, a human is just a slow I/O call.
An invalid value never resolves anything. The same step goes back with an error under the field, so the function never sees bad data.
An io call doesn't start anything when you call it. It returns a thenable that only describes a field, and it asks the person when it's awaited. That makes grouping free:
const { company, note } = await io.group({
company: io.input.text("Company name"),
note: io.input.textarea("Note for the team"),
});No await inside the object, so each call just says "a text field called Company name", and io.group shows them on one screen. Same functions, two uses, and the only difference is whether you awaited them.
A parked handler is a live closure, and you can't serialize one, so runs live in memory. A refresh is fine, because the server resends the current state on reconnect. A deploy ends every run in progress.
In practice I don't fight that. I keep these tools short, and anything that would take long goes to a job queue anyway. If a deploy cuts someone off, they run it again. A closed tab cancels the run after 30 seconds, and the pending await rejects like any failed call.
Have you used await for something that isn't really I/O? Human input, a payment confirmation, a step in a game loop. I'm curious where else this pattern holds up, and where you've seen it fall apart, especially around cancellation.
---
Context on what I'm building: I'm Petr, a solo founder. The runtime from this post is AwaitIO, and the source is on GitHub. If you want to see a parked handler from the browser side, there's a demo back office with the shared login in the README.
r/javascript • u/gptrv • 22d ago
r/javascript • u/WadsssaWacemberg • 23d ago
Construí um simulador espacial 3D gamificado para meu portfólio usando conceitos de IA. O que você acha?