frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Show HN: Write Go code in JavaScript files

https://www.npmjs.com/package/vite-plugin-use-golang
96•yar-kravtsov•8h ago•31 comments

Show HN: MyraOS – My 32-bit operating system in C and ASM (Hack Club project)

https://github.com/dvir-biton/MyraOS
211•dvirbt•17h ago•44 comments

Show HN: MCP Agent Mail, Like Gmail for Coding Agents

https://github.com/Dicklesworthstone/mcp_agent_mail
2•eigenvalue•1h ago•0 comments

Show HN: Helium Browser for Android with extensions support, based on Vanadium

https://github.com/jqssun/android-helium-browser
56•jqssun•15h ago•23 comments

Show HN: Write JavaScript code that Runs on RUST hits 1M req/s

https://shyam20001.github.io/rsjs/
4•StellaMary•4h ago•1 comments

Show HN: Shadcn/UI theme editor – Design and share Shadcn themes

https://shadcnthemer.com
131•miketromba•1d ago•40 comments

Show HN: Learn Basic Chess Movements

https://www.minichessgames.com/?hn
6•patrickdavey•14h ago•0 comments

Show HN: HanView -Effortless Learning Chinese on Wallpapers

https://github.com/klemperer/HanView
2•mapedia•2h ago•0 comments

Show HN: Diagram as code tool with draggable customizations

https://github.com/RohanAdwankar/oxdraw
248•RohanAdwankar•1d ago•57 comments

Show HN: LLM Rescuer – Fixing the billion dollar mistake in Ruby

https://github.com/barodeur/llm_rescuer
91•barodeur•3d ago•14 comments

Show HN: Create-LLM – Train your own LLM in 60 seconds

https://github.com/theaniketgiri/create-llm
44•theaniketgiri•1d ago•31 comments

Show HN: The Legal Embedding Benchmark (MLEB)

https://huggingface.co/blog/isaacus/introducing-mleb
3•ubutler•16h ago•0 comments

Show HN: AI that uses image context to translate and redraw manga

https://www.aifandom.app/home.html
4•Shawn1991•11h ago•0 comments

Show HN: Osync – A Git and rsync tool for local syncing and backups

https://github.com/Kena-Njonge/osync
2•kirurik•11h ago•0 comments

Show HN: Chonky – a neural text semantic chunking goes multilingual

https://huggingface.co/mirth/chonky_mmbert_small_multilingual_1
40•hessdalenlight•2d ago•4 comments

Show HN: I Built DevTools for Blazor (Like React DevTools but for .NET)

https://blazordevelopertools.com/
8•joe-gregory•21h ago•2 comments

Show HN: MacOS Live Screensaver – A screensaver that plays live video streams

https://github.com/hauxir/macos-live-screensaver
63•hauxir•6d ago•42 comments

Show HN: Random Makers – Show HN and Product Hunt, but Faster and Not Corporate

https://makers.random.gg/
18•waynerd•1d ago•1 comments

Show HN: Git for LLMs – A context management interface

https://twigg.ai
101•jborland•3d ago•36 comments

Show HN: Deta Surf – An open source and local-first AI notebook

https://github.com/deta/surf
137•mxek•4d ago•39 comments

Show HN: Tommy – Turn ESP32 devices into through-wall motion sensors

https://www.tommysense.com
104•mike2872•3d ago•80 comments

Show HN: Nostr Web – decentralized website hosting on Nostr

https://nweb.shugur.com
101•karihass•4d ago•34 comments

Show HN: A fast, privacy-first image converter that runs in browser

https://imageconverter.dev/
45•wainguo•3d ago•38 comments

Show HN: OpenSnowcat – A fork of Snowplow to keep open analytics alive

https://opensnowcat.io/
75•joaocorreia•3d ago•18 comments

Show HN: AI bookmarking app for people who hate AI

https://tryeyeball.com/
3•quinto_quarto•22h ago•0 comments

Show HN: Hermes – Self-hosted video downloader

https://github.com/TechSquidTV/Hermes
6•TechSquidTV•17h ago•0 comments

Show HN: Dictly – Local, real‑time voice‑to‑text for macOS (sub‑100ms, no cloud)

https://dictly.app/
9•JannikJung•1d ago•2 comments

Show HN: Guided EMDR Therapy App to Heal Inner Trauma

https://myemdr.app/start
2•positive-minds•1d ago•0 comments

Show HN: Cuq – Formal Verification of Rust GPU Kernels

https://github.com/neelsomani/cuq
94•nsomani•4d ago•63 comments

Show HN: Katakate – Dozens of VMs per node for safe code exec

https://github.com/Katakate/k7
124•gbxk•5d ago•53 comments
Open in hackernews

Show HN: Write Go code in JavaScript files

https://www.npmjs.com/package/vite-plugin-use-golang
96•yar-kravtsov•8h ago
I built a Vite plugin that lets you write Go code directly in .js files using a "use golang" directive. It compiles to WebAssembly automatically.

Comments

hshdhdhehd•6h ago
Like it. Especially the how to use it and when to use it guidance.
nsonha•6h ago
seems like an unintuitive idea that could have only come from someone infected by react/vercel. The natural way that most would think about this is just write go in a go file and have an import attribute or macro
yar-kravtsov•6h ago
Fair take! Though, this was literally built as a joke in response to @ibuildthecloud's tweet. Sometimes the dumbest ideas are the most fun to prototype.
iamsaitam•5h ago
Are there vaccines for these infected? I hope we can stop the spread /s
foreigner•6h ago
Reminds me of this toy I made some years ago: https://www.npmjs.com/package/polyglot-tag
b_e_n_t_o_n•6h ago
Hah. Back in the day I wrote a plugin to convert Lua files into a module that ran via one of the JS lua vms. Good fun.
smashah•6h ago
funny but this is going to become extremely popular.
pjmlp•6h ago
Cool hack, just use JavaScript.
kitd•5h ago
The author explains why you might want to use Go instead at the end of the readme.
onion2k•5h ago
I don't think any of the use cases suggested really make sense though. For a compute-intense task like audio or video processing, or for scientific computing where there's likely to be a requirement to fetch a ton of data, the browser is the wrong place to do that work. Build a frontend and make an API that runs on a server somewhere.

As for cryptography, trusting that the WASM build of your preferred library hasn't introduced any problems demonstrates a level of risk tolerance that far exceeds what most people working in cryptography would accept. Besides, browsers have quite good cryptographic APIs built in. :)

tgv•5h ago
> For a compute-intense task

The browser often runs on an immensely powerful computer. It's a waste to use that power only for a dumb terminal. As a matter of fact, my laptop is 6 years old by now, and considerably faster than the VPS on which our backend runs.

I let the browser do things such as data summarizing/charting, and image convolution (in Javascript!). I'm also considering harnassing it for video pre-processing.

pjmlp•5h ago
You can take advantage of that power via WebGPU, or WebGL if the browser is not yet up to it.
preommr•4h ago
> For a compute-intense task like audio or video processing, or for scientific computing where there's likely to be a requirement to fetch a ton of data, the browser is the wrong place to do that work.

... I mean... elaborate?

Everytime I've heard somebody say this, it's always a form of someone stuck in the 90s/00s where they have this notion that browsers showing gifs is the ceiling and that real work can only happen on the server.

Idk how common this is now, but a a few years ago (~2017) people would show projects like figma tha drew a few hundred things on screen and people would be amazed. Which is crazy, because things like webgl, wasm, webrtc, webaudio are insanely powerful apis that give pretty low level access. A somewhat related idea are people that keep clamoring for dom access in wasm because, again, people have this idea that web = webpage/dom, but that's a segway into a whole other thing.

chrisweekly•2h ago
great points, agreed

also "segway" is a scooter, "segue" is a narrative transition

Cthulhu_•5h ago
99 times out of a hundred, sure. But sometimes you need better performance or a library that isn't available in JS.
pjmlp•5h ago
WebGPU or WebGL is the answer.
dgb23•2h ago
I second that, having just relatively recently used the native browser APis for image processing. While it felt a bit awkward to use, it served its purpose pretty well.

If I needed more, I would probably not use Go anyways, but a sharper tool instead.

hollowturtle•5h ago
Better performance? For javascript code that calls into native platform apis provided by the browser it's been alteady proven that performance is an order of magnitude better than calling into wasm and doing all the sheningans to move bytes from and to wasm
ramses0•1h ago
Or even "use server.physics.go", which is where my mind went to (and where I've messed around with language interoperability with tinygo before).

This is such a wonderfully blursed and "smooth" implementation!

h33t-l4x0r•5h ago
How big is it? Is it smaller than imagemagick wasm?
foofoo12•3h ago
How big is imagemagick wasm?
montakaoh•5h ago
we need to go deeper
tkzed49•4h ago
Beautiful. Minor feedback: rather than having a "use golang" directive, just allow imports of .go files. This is more idiomatic for JS bundlers.
whizzter•1h ago
Should also help with syntax highlighting.
halapro•1h ago
Definitely not a minor feedback, there's no reason to write go in a .js file. Vite/rollup are perfectly able to "load" certain file types and parse them however you like.
CamouflagedKiwi•20m ago
That would also avoid the problem with this syntax, that it's not a valid Go file (it doesn't start with `package ...` and I don't think a bare top-level string is valid), which lots of editors will be pretty unhappy about.
zikani_03•4h ago
Looks interesting and good use case for introducing folks to extending web apps with WASM functionality.

Used a similar technique using tinygo wasm builds (without Vite ofcourse) on toy project where WASM based functionality acted as a fallback if the API wasn't available or user was offline - found it an interesting pattern.

liampulles•4h ago
Just be careful with this backend-code-in-frontend stuff. If it's needed for some computationally expensive logic that is logically client side, then fine. But be wary of letting the client dictate business rules and having open-for-anything APIs (GraphQL is particularly prone to this).

I've seen teams do this in the wild more than once.

nesarkvechnep•52m ago
REST is the solution to this but it's reduced to JSON RPC over HTTP nowadays.
lisbbb•59m ago
I'm guessing this only works on back end? If yes, then why not just write the back end in Go if you're so fond of the language? It's not like Golang lacks the libraries to do web stuff. Would it be like some shop that is all React, Angular, or some other?
phpdave11•24m ago
It compiles the Go code to WASM, so it can be used browser side.