frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Benzene at 200

https://www.chemistryworld.com/opinion/benzene-at-200/4021504.article
82•Brajeshwar•2h ago•37 comments

Working on databases from prison

https://turso.tech/blog/working-on-databases-from-prison
468•dvektor•5h ago•285 comments

Getting free internet on a cruise, saving $170

https://angad.me/blog/2025/getting-free-cruise-internet/
8•humanperhaps•19m ago•3 comments

ZjsComponent: A Pragmatic Approach to Reusable UI Fragments for Web Development

https://arxiv.org/abs/2506.11016
31•lelanthran•2h ago•19 comments

Show HN: Zeekstd – Rust Implementation of the ZSTD Seekable Format

https://github.com/rorosen/zeekstd
130•rorosen•21h ago•21 comments

OpenTelemetry for Go: Measuring overhead costs

https://coroot.com/blog/opentelemetry-for-go-measuring-the-overhead/
21•openWrangler•2h ago•7 comments

Show HN: dk – A script runner and cross-compiler, written in OCaml

https://diskuv.com/dk/help/latest/
26•beckford•3h ago•2 comments

Use Copilot Agent Mode in Visual Studio (Preview)

https://learn.microsoft.com/en-us/visualstudio/ide/copilot-agent-mode?view=vs-2022
11•nsoonhui•9h ago•1 comments

Darklang Goes Open Source

https://blog.darklang.com/darklang-goes-open-source/
60•stachudotnet•2h ago•17 comments

The Renegade Richard Foreman

https://yalereview.org/article/jennifer-krasinski-richard-foreman
5•prismatic•1h ago•3 comments

Nanonets-OCR-s – OCR model that transforms documents into structured markdown

https://huggingface.co/nanonets/Nanonets-OCR-s
189•PixelPanda•11h ago•49 comments

Salesforce study finds LLM agents flunk CRM and confidentiality tests

https://www.theregister.com/2025/06/16/salesforce_llm_agents_benchmark/
108•rntn•3h ago•54 comments

Adding public transport data to Transitous

https://www.volkerkrause.eu/2025/06/14/transitous-adding-data.html
11•todsacerdoti•2d ago•0 comments

Is gravity just entropy rising? Long-shot idea gets another look

https://www.quantamagazine.org/is-gravity-just-entropy-rising-long-shot-idea-gets-another-look-20250613/
191•pseudolus•17h ago•173 comments

Start your own Internet Resiliency Club

https://bowshock.nl/irc/
433•todsacerdoti•10h ago•237 comments

Infracost (YC W21) is hiring software engineers (GMT+2 to GMT-6)

https://infracost.io/join-the-team
1•aliscott•5h ago

Maya Blue: Unlocking the Mysteries of an Ancient Pigment

https://www.mexicolore.co.uk/maya/home/maya-blue-unlocking-the-mysteries-of-an-ancient-pigment
44•DanielKehoe•2d ago•12 comments

Show HN: Socket-call – Call socket.io events like normal JavaScript functions

https://github.com/bperel/socket-call
30•bperel•6h ago•12 comments

Quantum mechanics provide truly random numbers on demand

https://phys.org/news/2025-06-quantum-mechanics-random-demand.html
12•bookofjoe•2d ago•14 comments

Occurences of swearing in the Linux kernel source code over time

https://www.vidarholen.net/contents/wordcount/#fuck*,shit*,damn*,idiot*,retard*,crap*
87•microsoftedging•2d ago•149 comments

Why SSL was renamed to TLS in late 90s (2014)

https://tim.dierks.org/2014/05/security-standards-and-name-changes-in.html
452•Bogdanp•1d ago•203 comments

Mathematical Illustrations: A Manual of Geometry and PostScript

https://personal.math.ubc.ca/~cass/graphics/text/www/
32•Bogdanp•3h ago•9 comments

Jokes and Humour in the Public Android API

https://voxelmanip.se/2025/06/14/jokes-and-humour-in-the-public-android-api/
235•todsacerdoti•17h ago•130 comments

A Framework for Characterizing Emergent Conflict Between Non-Coordinating Agents [pdf]

https://paperclipmaximizer.ai/Unaware_Adversaries.pdf
17•ycombiredd•2d ago•2 comments

Modifying an HDMI dummy plug's EDID using a Raspberry Pi

https://www.downtowndougbrown.com/2025/06/modifying-an-hdmi-dummy-plugs-edid-using-a-raspberry-pi/
272•zdw•1d ago•74 comments

Childhood leukemia: how a deadly cancer became treatable

https://ourworldindata.org/childhood-leukemia-treatment-history
261•surprisetalk•1d ago•75 comments

Real-time CO2 monitoring without batteries or external power

https://news.kaist.ac.kr/newsen/html/news/?mode=V&mng_no=47450
102•gnabgib•19h ago•28 comments

Mechanisms for Detection and Repair of Puncture Damage in Soft Robotics [pdf]

https://smr.unl.edu/papers/Krings_et_al-2025-ICRA.pdf
14•PaulHoule•2d ago•0 comments

Twin – A Textmode WINdow Environment

https://github.com/cosmos72/twin
132•kim_rutherford•21h ago•26 comments

Datalog in Rust

https://github.com/frankmcsherry/blog/blob/master/posts/2025-06-03.md
312•brson•1d ago•38 comments
Open in hackernews

Show HN: Socket-call – Call socket.io events like normal JavaScript functions

https://github.com/bperel/socket-call
30•bperel•6h ago
Hello HN,

I built a Typescript library (named socket-call, for lack of a more sexy name) whose goal is to be able to call socket.io events as regular functions.

So you declare your server-side like so:

  ...
  const listenEvents = (services: UserServices) => ({
    // Add your events here, the name of the event is the name of the function
    login: async (username: string) => {
      services._socket.data.user = { username };
      console.log(`User ${username} logged in`);
      setInterval(() => {
        // Calling an event that's handled client-side
        services.showServerMessage(`You're still logged in ${username}!`)
      }, 1000);
      return `You are now logged in ${username}!`;
    },
  });
and then on the client side you call them like normal async Javascript functions (and you can also create client-side event handlers):

  ...
  const user = socket.addNamespace<UserEmitEvents, UserListenEvents>(
    '/user'
  );
  
  // Calling an event that's declared server-side
  user.login(username.value).then((message) => {
    console.log('Server acked with', message);
  });
  
  // Handling an event that is sent by the server
  user.showServerMessage = (message) => {
    console.log('Server sent us the message', message);
  }

I use this library for my own projects and would be interested to receive feedback about it :-)

Comments

klabb3•4h ago
This appears to me like the NATS ”request-response” pattern. They also have first-class support for this in their client libs. Under the hood, they create and subscribe to an ephemeral topic where servers can send the response to. (Perhaps even streamed multiple responses but you’d need to double check that.) They also have websocket support btw, so it can be used by web browsers.
chrisweekly•4h ago
I like the ergonomics, this looks like it could be useful. Thanks for sharing!
benpacker•3h ago
You can do with with trpc WebSocket transport
dataviz1000•47m ago
trpc has the benefit of being highly adopted, supported, and with a community.
xixixao•2h ago
Convex[0] also gives you type-safe persistence (in addition to type-safe web-socket communication).

[0] https://docs.convex.dev/quickstart/script-tag

ossobuco•2h ago
I don't know, socket.io already feels like an unnecessary abstraction to me, and this is another abstraction on top of it. I generally dislike APIs that hide what's happening under "magic" abstractions, plus this seems leaky, as it abstracts on socket.io but requires you to know how it works.
imtringued•1h ago
socket.io is probably one of the most unnecessary libraries on this planet. Websockets are already as simple as possible.

In fact, websockets work so well I use them as a generic TCP replacement, because the message oriented transport model gives me 99% of what I need with the exception of custom message types. Leaving that out was a massive letdown to me, because you now need to carry a way to identify the message type inside the body, rather than just throwing the message itself into the appropriate protocol parser (e.g. a schema based binary format).

JonnyReads•1h ago
I have to admit I've never tried to use web sockets without socket.io. Are they really as simple as you claim?
efilife•57m ago
Same here. I guess we'll just have to try

It doesn't look difficult at all now I look at it https://javascript.info/websocket

korkybuchek•37m ago
> socket.io is probably one of the most unnecessary libraries on this planet. Websockets are already as simple as possible.

Eh... While I agree that socket.io is one of those libraries you could probably "write" in an afternoon, and Websockets are simple, there are a couple of things that are kinda painful to rewrite time after time:

  - keepalives to detect dead sockets
  - reconnection logic with backoff
  - ability to switch to long-polling for weird environments
  - basic multiplexing/namespacing
andoando•19m ago
And automatic json parsing of messages
dataviz1000•26m ago
That is awesome! I see you use Proxy which is a very cool way to achieve this. [0] I saw this approach using Proxy when hacking VSCode's ipc where they use it define services from ipc channels/ [1]

I did something similar using VSCode's core ipc / rpc which only requires a transport (protocol) to implement {send, onMessage}. I use it in a Chrome extension so I have to implement my own socket.io and port message passing protocols. Some of the benefits are being able to send a message from MAIN world of an injected content script (if you want to intercept all fetch and XMLHttpRequest requests, for example) through a tunnel in the isolated world content script to the side panel which could theoretically tunnel it to a server over socket.io. If I have a Math service, for example, that only adds two numbers, it can be called from anywhere in the system with `await mathService.add(1,1);` with mathServer being dependency injected using constructor(@IMathService private readonly mathService: IMathService). This is how VSCode manages calling code across hundreds of different isolated JavaScript runtime environments.

What I did was a bit overkill and likely trpc would have been good enough if I knew about it when I started.

[0] https://github.com/bperel/socket-call/blob/e0076d7887397a92a...

[1] https://github.com/microsoft/vscode/blob/24c0ff16c250f2b39ee...