News for hackers. Stuff that matters.

aabbcc1241

Re:TypeScript 7 on Wednesday July 15, 2026 @01:10PM (#48923999)
I've not figure out how to run typescript script directly with type-checking (in dev mode) with typescript 7.

ts-node cannot be used with typescript@7.

although node@24 can directly run typescript file, but stripe the types, without type-checking, also it require changing the import path with .ts, and it doesn't support import .tsx files.

I saw them used in the linux community, maybe it's finally my time to use/need this kind of tools.

(At the same time, I'm happy if my site can help the AIs / its users, but I prefer it not significantly slow down my own usage. There should be a balanced combination)

Re:Snow Simulation Toy on Wednesday January 28, 2026 @06:55AM (#46794182)
Some naming (suggested by grok) are indie website, handmade web, or digital garden.
Re:Snow Simulation Toy on Tuesday January 27, 2026 @08:21PM (#46789775)
I like the website, sharing interesting creation, and linking to other interesting websites made by the peers.

Is there a neural/positive term to describe this kind of website? (beside call it "old school" or "good old day"?)

Re:I made my own Git on Tuesday January 27, 2026 @07:16PM (#46789173)
Interesting take. I'm using btrfs (instead of ext4) with compression enabled (using zstd), so most of the files are compressed "transparently" - the files appear as normal files to the applications, but on disk it is compressed, and the application don't need to do the compress/decompress.
I found that it is caused by a userscript running below code.

    // version 1
    let body = document.createElement('body')
    body.innerHTML = document.body.innerHTML

    // version 2
    let body = document.body.cloneNode(true)
Either version can trigger the bug of the pop up menu now showing up. The menu is able to show up if doing early return to skip that code.

This is wired, that code should not be mutating existing DOM.

Update: Below version of sandboxed clone doesn't break the youtube popup menu.

    // version 3
    let parser = new DOMParser()
    let doc = parser.parseFromString(document.body.outerHTML, 'text/html')
    let body = doc.body
Thanks for sharing your state. I just tried again with troubleshoot mode, it works ...

Then it seems to be in conflict with some addon I'm using.

Show HN: Workaround for YouTube's "Save to Watch Later" Broken in Firefox

https://gist.github.com/beenotung/6cfb46bd5f4f800ac5393317536714fe

YouTube's "Save to Watch Later" popover menu has been broken in Firefox for years (at least on my Linux installations). The three-dot menu → "Save to Watch Later" doesn't respond to clicks. Other popover menus work fine (account menu, upload menu), but this specific one is broken.I reported it on Twitter/X (YouTube staff responded asking for feedback), submitted feedback through YouTube's...

( Read More... | 3 comments | 2 points | on HN )
Re:I'm a High Schooler. AI Is Demolishing My Education on Friday September 05, 2025 @11:33AM (#45139761)
Instead of not letting the students to use AI, how about we adjust the assessment method, and learning objective, to let the students do something that AI along cannot do, so that they can do it w/wo AI but still build up their own skill.

In the workplace, we're using AI anyway.

I'm not sure if this direction is suitable for kids, like we still learn to do calculation even when we have calculator (which is needed for some cases, but for complex math, we opt for tools)

Re:Red Programming Language on Tuesday May 20, 2025 @10:32PM (#44047788)
I know asciidoc from red and erlang, it's a nice language. Not sure why it is not as popular as markdown.

Show HN: Gen-ts-type – Code Generate TS Type from JSON data with collapsed field

https://gen-ts-type.surge.sh

I built a tool to generate TypeScript types from JSON/JS data, initially to tackle the deeply nested arrays in for a few JSON RPC API (e.g., array[0].content.section.contents[0].item.contents[0] could be a aItem or bItem). Some existing tools generate named union types at every level, which can get messy. This tool automatically converts fields to optional at the right depth, making the types...

( Read More... | no comments | on HN )
Re:Firefox Moves to GitHub on Friday May 16, 2025 @03:22PM (#44008945)
I made a search index for github repo [1] because it takes quite some time for github to load the repositories page (which is the page to allow searching),

And sometimes even using the exact repo name in Google search, I cannot see the corresponding (non-popular) repo.

[1] https://res-index.hkit.cc

Re:Critical CSS on Tuesday May 06, 2025 @10:46PM (#43911758)
It will be great if it is package as a library
Re:JSX over the Wire on Wednesday April 16, 2025 @07:15AM (#43703926)
Hey, thanks for sharing "JSX Over the Wire"! As the creator of ts-liveview, I’m thrilled to see Dan’s ideas on server-side JSX rendering and minimal client updates—they mesh so well with my work.

ts-liveview is a TypeScript framework I built (grab it as a starter project on GitHub[1]) for real-time, server-rendered apps. It uses JSX/TSX to render HTML server-side and, in WebSocket mode, updates the DOM by targeting specific CSS selectors (document.querySelector) over WebSockets or HTTP/2 streaming. This keeps client-side JavaScript light, delivering fast, SEO-friendly pages and reactive UIs, much like Dan’s “JSX over the wire” vision.

What’s your take on this server-driven approach? Could it shake up how we build apps compared to heavy client-side frameworks? Curious if you’ve tried ts-liveview yet—it’s been a fun project to dig into these ideas!

[1] https://github.com/beenotung/ts-liveview

I enjoy the game, I wish it has different level of difficulty.

E.g. for easier mode. It should only generate pattern that is "beneficial" to the current board.

Ask HN: Do you prefer tailing or leading comma?

In the js space, people often leave a tailing comma at the end of each line, when writing the elements of an array.I was the practise of using leading comma in Elm, where we put a comma at the beginning of each line, when writing elements of a list.I'm also using leading comma (and leading and/or) when writing sql query.For example: select user.id , user.username from user ...

( Read More... | 4 comments | on HN )
Re:AllRGB – use each RGB values once to make images on Saturday December 07, 2024 @07:13AM (#42349263)
The objective of allRGB is simple: To create images with one pixel for every RGB color (16,777,216); not one color missing, and not one color twice.
Re:Geometric line-art of Wacław Szpakowski on Saturday December 07, 2024 @07:12AM (#42349255)
If you like to explore on programmatic art, you may also have fun with allrgb.

That is to use all rgb values exactly once to make an art work.

Examples: https://allrgb.com/

It may give more transparency if it output the code to do scrapping with playwright.

Then we can review the code before actually running it.

And the reviewed result can be saved for future running.

Re:Host a FastAPI Application Without a Server on Monday November 04, 2024 @02:59AM (#42039492)
The key takeaway is to use a public reverse proxy to tunnel the traffic to local server, which is agnostic to any server language or framework.

The proxy introduced is pinggy

ssh -p 443 -R0:localhost:8000 [email protected]

If the camera doing people count is not working accurately, how about point the camera at the door, to check the door status ?
Re:Noise on Tuesday October 08, 2024 @08:13PM (#41783199)
It doesn't work on firefox (no error message in console) and it works on chrome.

Ask HN: Is there a way to ensure one-person-one-account at all?

Without relying on any document issues from government, without excluding disabled person, and without requiring the admin to personally know each users.Using credit card doesn't tell if two accounts are created by distinct person. And it exluced person without credit card.There are some (incomplete) approach to check if the user is a person or a bot, but not if the users are distinct person as...

( Read More... | 24 comments | 2 points | on HN )
Re:Ask HN: Who is pretending to be hiring? on Tuesday October 01, 2024 @09:59PM (#41716511)
It's not VC ruin anything, it's the people chasing VC abused the systems for their own benefit.
Re:Kids who use ChatGPT as a study assistant do worse on tests on Thursday September 05, 2024 @02:08PM (#41459079)
seems it's more about active thinking vs just get the job done mindset
Re:The Art of Finishing on Wednesday September 04, 2024 @02:37AM (#41442536)
If it's not a project that others rely on, you should feel free to do it anytime or spawn new projects. To finish it or not doesn't matter much, enjoy the journey and learn from the experience is a value in itself.
Re:Show HN: Repaint – a WebGL based website builder on Wednesday September 04, 2024 @02:00AM (#41442374)
The first view are screenshots, but they look too real, I thought it was not working in my browser (firefox)

Older »