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

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`);
Show HN: dk – A script runner and cross-compiler, written in OCaml

I've always found it cool to be in roles where I can help a younger generation learn skills to have a bright future. That role is something I do in a few ways (as a parent, robotics mentor, school board advisor and Sunday school teacher) and I suspect most HN readers share the same role and appreciation. And for developing software skills, it was obvious that both the students and I had to have a productive software environment where we could work together. That theme of experienced/inexperi

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

Hello,

I would like to share a Rust implementation of the Zstandard seekable format I've been working on.

Regular zstd compressed files consist of a single frame, meaning you have to start decompression at the beginning. The seekable format splits compressed data into a series of independent frames, each compressed individually, so that decompression of a section in the middle of an archive only requires zstd to decompress at most a frame's worth of extra data, instead of the entire arch

11h | Hacker news

Buscar