frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Show HN: I saw this cool navigation reveal, so I made a simple HTML+CSS version

https://github.com/Momciloo/fun-with-clip-path
2•momciloo•19m ago•0 comments

Show HN: Stacky – certain block game clone

https://www.susmel.com/stacky/
2•Keyframe•23m ago•0 comments

Show HN: A toy compiler I built in high school (runs in browser)

https://vire-lang.web.app
2•xeouz•45m ago•1 comments

Show HN: Look Ma, No Linux: Shell, App Installer, Vi, Cc on ESP32-S3 / BreezyBox

https://github.com/valdanylchuk/breezydemo
266•isitcontent•20h ago•33 comments

Show HN: I spent 4 years building a UI design tool with only the features I use

https://vecti.com
365•vecti•22h ago•166 comments

Show HN: If you lose your memory, how to regain access to your computer?

https://eljojo.github.io/rememory/
338•eljojo•23h ago•209 comments

Show HN: Kappal – CLI to Run Docker Compose YML on Kubernetes for Local Dev

https://github.com/sandys/kappal
17•sandGorgon•2d ago•5 comments

Show HN: Nginx-defender – realtime abuse blocking for Nginx

https://github.com/Anipaleja/nginx-defender
3•anipaleja•2h ago•0 comments

Show HN: R3forth, a ColorForth-inspired language with a tiny VM

https://github.com/phreda4/r3
80•phreda4•19h ago•15 comments

Show HN: Smooth CLI – Token-efficient browser for AI agents

https://docs.smooth.sh/cli/overview
94•antves•2d ago•70 comments

Show HN: MCP App to play backgammon with your LLM

https://github.com/sam-mfb/backgammon-mcp
3•sam256•4h ago•1 comments

Show HN: Slack CLI for Agents

https://github.com/stablyai/agent-slack
52•nwparker•1d ago•11 comments

Show HN: BioTradingArena – Benchmark for LLMs to predict biotech stock movements

https://www.biotradingarena.com/hn
27•dchu17•1d ago•12 comments

Show HN: Artifact Keeper – Open-Source Artifactory/Nexus Alternative in Rust

https://github.com/artifact-keeper
154•bsgeraci•1d ago•64 comments

Show HN: ARM64 Android Dev Kit

https://github.com/denuoweb/ARM64-ADK
18•denuoweb•2d ago•2 comments

Show HN: I'm 75, building an OSS Virtual Protest Protocol for digital activism

https://github.com/voice-of-japan/Virtual-Protest-Protocol/blob/main/README.md
7•sakanakana00•5h ago•1 comments

Show HN: I built Divvy to split restaurant bills from a photo

https://divvyai.app/
3•pieterdy•5h ago•1 comments

Show HN: Gigacode – Use OpenCode's UI with Claude Code/Codex/Amp

https://github.com/rivet-dev/sandbox-agent/tree/main/gigacode
19•NathanFlurry•1d ago•9 comments

Show HN: XAPIs.dev – Twitter API Alternative at 90% Lower Cost

https://xapis.dev
3•nmfccodes•2h ago•1 comments

Show HN: I Hacked My Family's Meal Planning with an App

https://mealjar.app
2•melvinzammit•7h ago•0 comments

Show HN: I built a free UCP checker – see if AI agents can find your store

https://ucphub.ai/ucp-store-check/
2•vladeta•8h ago•2 comments

Show HN: Micropolis/SimCity Clone in Emacs Lisp

https://github.com/vkazanov/elcity
173•vkazanov•2d ago•49 comments

Show HN: Daily-updated database of malicious browser extensions

https://github.com/toborrm9/malicious_extension_sentry
14•toborrm9•1d ago•8 comments

Show HN: Compile-Time Vibe Coding

https://github.com/Michael-JB/vibecode
10•michaelchicory•9h ago•3 comments

Show HN: Falcon's Eye (isometric NetHack) running in the browser via WebAssembly

https://rahuljaguste.github.io/Nethack_Falcons_Eye/
6•rahuljaguste•19h ago•1 comments

Show HN: Horizons – OSS agent execution engine

https://github.com/synth-laboratories/Horizons
24•JoshPurtell•1d ago•5 comments

Show HN: Slop News – HN front page now, but it's all slop

https://dosaygo-studio.github.io/hn-front-page-2035/slop-news
17•keepamovin•10h ago•6 comments

Show HN: Local task classifier and dispatcher on RTX 3080

https://github.com/resilientworkflowsentinel/resilient-workflow-sentinel
25•Shubham_Amb•1d ago•2 comments

Show HN: Fitspire – a simple 5-minute workout app for busy people (iOS)

https://apps.apple.com/us/app/fitspire-5-minute-workout/id6758784938
2•devavinoth12•13h ago•0 comments

Show HN: I built a RAG engine to search Singaporean laws

https://github.com/adityaprasad-sudo/Explore-Singapore
4•ambitious_potat•14h ago•4 comments
Open in hackernews

Show HN: Tsbro – TypeScript for the browser, no build step

https://github.com/stagas/tsbro
39•stagas•6mo ago

Comments

Tade0•6mo ago
I'm wondering if it would be useful/possible to run the compilation in a service worker that would intercept requests for *.ts and compile them in the worker?

I've seen an alternative approach, where the TS code is sent for compilation to a dedicated server - dismissed that idea as over engineered, but then I learned that the swc WASM package clocks in at over 5MB.

I love the name BTW.

carl_dr•6mo ago
That is how this works.

> tsbro solves this by completely bypassing the browser's import system using synchronous XHR, transpile with swc wasm and a sophisticated ESM-to-CJS transpiler so that synchronous require is used everywhere:

Tade0•6mo ago
Yes, but it's doing all that locally. When I ran the code it downloaded a 5MB file, namely https://esm.sh/@swc/wasm-web@1.13.2/wasm_bg.wasm.

It's also not using a service worker.

altbdoor•6mo ago
I've tried this before, with a service worker[1] that intercepts TS/X-ish requests, and directing them over to sucrase[2] to compile to JS, before being loaded by the browser. Unfortunately sucrase seems to be no longer maintained.

[1]: https://github.com/altbdoor/sucrase-build-iife

[2]: https://github.com/alangpierce/sucrase

stagas•6mo ago
Thanks for this! I gave it a shot and it works[1].

[1] https://github.com/stagas/tssw

vendiddy•6mo ago
I usually feel more concern whenever more features get stuffed into the browser.

It is an accumulation of complexity that, for backwards compatibility, we get stuck with.

The browser should be simple.

If the focus just stayed on making wasm better for web development, folks can use any language they want and the API surface area can stay small.

Imustaskforhelp•6mo ago
Now, I am all for it except the fact that I've heard that some people have actually recommended the wayland protocol + wasm to be a better alternative really.

And I personally feel like (I may be wrong) that at the end your proposal and the wayland proposal might be the same..

The problem with wayland protocol/your proposal is the fact that such things have already been tried (java applets) and they were insecure, and accessibility was a mess, so reverting back to it does feel like a massive chaos since javascript was created to solve that problem..

I am not a js advocate, honestly I wish that ephemeral running of apps cross platform becomes genuinely easy (in my mind nix-shell comes) There is htmx which is nice too I guess but I think I still need some js to sprinkle in some more interactivity/animations.

Astro with htmx / islands architecture kinda feels the best, imagine using svelte/vue/react and htmx+golang in the same project..

pjc50•6mo ago
I think what people want is the ability to write in another language while retaining first class access to the DOM without too much performance penalty, and not a boxed-in arrangement like applets.
vendiddy•6mo ago
This is exactly what I want!

This will also allow the wider community to innovate rather than waiting on standards bodies to decide what the think is best.

nikisweeting•6mo ago
How does this differ from esm.sh/tsx?
Foorack•6mo ago
It doesn't send source code to esm.sh, but does it locally in the browser
nikisweeting•6mo ago
does esm.sh/tsx send source to their servers? I was under the impression it uses a rust-based wasm compiler in the browser locally https://swc.rs/#features
stagas•6mo ago
In their docs[0]:

> Your source code is sent to the server, compiled, cached at the edge, and served to the browser as a JavaScript module.

[0]: https://esm.sh/#tsx

nikisweeting•6mo ago
ah ok, thanks
spankalee•6mo ago
Synchronous XHR is a really bad way to do this. The performance will be terrible for anything but the smallest module graphs.

But the TypeScript compiler API is synchronous, so there's a problem.

What you want to do is asynchronously walk the import graph, resolving import specifiers along the way with something like es-module-lexer or TypeScript's light parser, then when all the input files are collected, pass them through a compiler host to the compiler.

This is what the Lit team's Playground Elements do, which compile files on a worker for embeddable interactive code samples: https://github.com/google/playground-elements

rafram•6mo ago
> But the TypeScript compiler API is synchronous, so there's a problem.

But it doesn't use DOM APIs, so you can run it in a worker without any issue. Monaco (the embeddable distribution of VSCode) does that.

The even bigger issue is that the TypeScript compiler is gigantic — like 10 MB, which is just a nonstarter for something you'd need to embed in every page of your site.

spankalee•6mo ago
The compiler is about 730k compressed, not 10 MB. You can also lazy load it so that you show code before being able to run it.

Being in a worker only causes the synchronous fetches to not block the main thread. It's still terrible for performance as you lose all ability to load files in parallel.

It's really not that difficult to pre-traverse the import graph and fire off as many parallel fetches as the browser will allow.

rafram•6mo ago
> The compiler is about 730k compressed

Thanks, you're right, I was looking at the unminified version. Minified is 3.4 MB uncompressed, 730 KB compressed. That's still crazy considering that you could avoid it by compiling your code on the server (which can be extremely fast if you disable type-checking) rather than shoving that responsibility onto your user's browser. Might be reasonable for a big web application with megabytes of other scripts, but not for a normal website.

spankalee•6mo ago
Oh, I wouldn't use something like this for the main code of a page. You should absolutely just compile and bundle the TS once, rather than on every page load.

But there are cases where you want to be able to run arbitrary TypeScript in the browser - in our case it was inline editable code samples - and for that running the TS compiler efficiently in a worker is great, and 730k isn't that bad. You probably also have 500kB - 1MB for a decent code editor too.

rafram•6mo ago
That's totally fair. The OP seems to be intended for your main page logic:

> TypeScript is still second-class citizen with regards to browser adoption, there is a proposal to fix that, but until then we have to use tooling, bundlers, build steps that are an impediment for when you want to quickly create a short demo or PoC.

(Of course, just for "a short demo or PoC," but will anyone be motivated to rip it out before that's no longer feasible?)

So I assumed you were talking about something similar. But using this approach to compile user code makes a lot of sense.

Zardoz84•6mo ago
Read the last paragraph
WorldMaker•6mo ago
Sychronous XHR also seems a symptom here of compiling Typescript to CommonJS which as a very synchronous module system is also the wrong module system to choose for a browser application. All the modern browsers support ESM great and asynchronously load them just fine.
spankalee•6mo ago
The compiler API has nothing to do with the module format for the compiler itself.

The issue is that the CompilerHost and LanguageServiceHost interfaces expect a synchronous filesystem API, and downstream from that the compiler internals all expect synchronous access to files.

There's a very long standing issue open to make the API async, but I'm pretty sure it's obsolete now in the face of the tsgo work.

stagas•6mo ago
As per another commenter's suggestion, I gave it a shot using a Service Worker and it looks like it works as well[1].

[1]: https://github.com/stagas/tssw

ohnoesjmr•6mo ago
Is there a solution to get ts compiler embeddable into c++ project that uses v8, so it could compile the code on the fly?

Seems tsc itself requires node, but surely an api that takes a ts file as a string and returns a ts file as a string should be possible?

teaearlgraycold•6mo ago
Perhaps you could use or build a C interface for swc, a TS compiler written in rust.
Imustaskforhelp•6mo ago
they could use swc-wasm-web as tsbro also uses swc-wasm-web
teaearlgraycold•6mo ago
Hot damn
orta•6mo ago
tsc's code is mostly the type-checker, you want to look for a "transpiler" here, so embedding either swc, esbuild, sucrase or the like to handle the process of converting for you. I've never heard of one written in C++ but that may exist.
silverwind•6mo ago
swc exists as wasm which any browser should be able to execute.
simulo•6mo ago
If you are interested in TypeScript for the browser, you might also like --erasableSyntaxOnly option of typescript >5.8. The only tool needed for it is the typescript compiler itself, so toolchain is kept to a minimum.
catapart•6mo ago
Neat! I've been working on a custom element for running tests in the browser, and was thinking of wiring up swc to prevent having to compile the tests from ts before running them. This library seems like it would serve better than trying to maintain something myself!
stagas•6mo ago
If you like this and are interested in a less hacky way, I've also implemented it using a Service Worker[1] that intercepts and transpiles modules on-the-fly.

[1]: https://github.com/stagas/tssw