News for hackers. Stuff that matters.

skimdesk

Re:Muse Code and Muse Spark 1.2 on Wednesday August 05, 2026 @11:20PM (#49192028)
So that's why Muse (the mind map tool) recently changed its name to Allume [0].

[0]: https://allume.com/allume-faq/

There was research on this published by Activision [1]. Spawning fake enemies behind the users back, inside walls, etc.

The players who react to fake enemies self-identify as cheaters.

[1]: https://www.activision.com/cdn/research/hallucinations

For a very simple API, warp [1].

[1]: https://github.com/seanmonstar/warp

If you're into horror comedy movies, be sure to check out Rare Exports [1]. It combines some of the folklore with the commercial father christmas.

[1]: https://en.m.wikipedia.org/wiki/Rare_Exports:_A_Christmas_Ta...

Re: on Sunday November 05, 2023 @03:24PM (#38155278)
Really fun!

I have been experimenting with similar idea myself. I was curious on how you handle instantiating the terminal state for new clients. Seems like you're storing a buffer [0] of past output, and replaying that?

[0] https://github.com/ekzhang/sshx/blob/91c82d46cde4d1ffa0ae34e...

Hi HN.

ScaleSocket is a command line tool that lets you to wrap any STDIO capable script or binary, and serve it over websockets. Clients then connect to rooms (channels) which have an unique URL (wss://example.com/exampleroom). Connecting to a room spawns a new process of the wrapped script. Subsequent websocket connections to the same room share the process.

I built ScaleSocket in order to be able to build multiplayer back-ends quickly. In the past, I have been experimenting with websocketd [1] to stream a command line application to the browser. It seemed to me that using that approach, i.e. spawning a process and streaming it over websockets, would make a nifty back-end for browser based multiplayer games. ScaleSocket takes that one step further, by supporting shared backend processes.

It's a pleasant approach to get started with, since no lobby server or netcode is required for making a multiplayer backend. ScaleSocket has been my prototyping tool for multiplayer games for some time now.

[1] https://news.ycombinator.com/item?id=9050970

It's similar to running netcat in server mode, wrapping a script. It's even closer to doing that using websocat [1], whereby one does not have to do the websocket header juggling.

The main difference is that while netcat or websocat will spawn a new process for each connecting client, ScaleSocket has a concept of rooms (channels). For a room, a process is spawned once only. All clients connecting to the same room are routed to the same process. This is not straight forward to do using the forementioned tools.

There's a small comparison page [2] where I have mentioned some alternative tools.

[1] https://github.com/vi/websocat

[2] https://www.scalesocket.org/man/comparison

Re:Textual Web: TUIs for the Web on Thursday September 07, 2023 @11:39PM (#37428954)
I've been developing a websocket server that lets multiple users connect to the same command-line app.

I wrote a short example [1] that exposes a TUI game on the web. In theory, hot-seat terminal games should be playable over the web with this.

My current challenge has been around refreshing the screen for late joiners. I need to save some of the ANSI escape history and replay it to clients, or ask the application to redraw itself. If anyone has ideas on how to approach this i'm all ears.

[1] https://www.scalesocket.org/man/examples/terminal

Re:When deployments are easy, code becomes simpler on Wednesday September 06, 2023 @02:54PM (#37409461)
We've used dbmate[1] outside of the Django/alembic ecosystem.

[1] https://github.com/amacneil/dbmate

Re:Show HN: Command palette-style Git client on Tuesday August 15, 2023 @07:30AM (#37132616)
I was eager to try this. The screenshots had me convinced the workflow would resemble Alfred/Spotlight. Be careful of guessing your users workflows - there are a lot of ways using git. It seems opening the commit window stages all changes. I'm used to working with patches (`-p`), so in in it's current form it wont suit my workflow.
Re:Internet Search Tips on Saturday July 22, 2023 @08:21AM (#36825608)
Another useful Google search trick not mentioned in the article is numeric range queries.

You can use two numbers separated by two dots to represent all numbers in the range.

For example, a search for

  taki 100..200
gives me results for taki 183.

This is useful when you can't remember an exact year or number.

Re:For probabilities, use Fermi numbers, not words on Sunday July 02, 2023 @03:40PM (#36564898)
Consider a sentence like "We will finish project x next week with 75% probability".

I'm not sure it is any more clear than "It is probable that we will finish project x next week".

The point estimate is of little value unless we know how it was made. In this case "Jim just came up with a number".

Instead of talking of probability, an estimate of the number of days/hours/tasks would seem more grounded and easier to come up with.

In this case I'd go for, "We will finish project x after we have completed four days worth of work".

Shameless plug for Doctave [0], which offers a solid way to combine markdown and OpenAPI specs into a documentation site.

It's a hosted SaaS, so it's technically not a static-site generator, but it's an alternative to the above.

[0]: https://www.doctave.com/

Re:Vickrey Auction on Thursday June 29, 2023 @02:35PM (#36524770)
Facebook's ad platform famously uses the Vickrey–Clarke–Groves auction [0]. In theory it rewards advertisers for bidding for ads using their true valuation, or rather, the lifetime value of a customer.

In practice, it's a lot more convoluted, but the basic principle is fascinating.

[0]: https://en.m.wikipedia.org/wiki/Vickrey%E2%80%93Clarke%E2%80...

Combining Swagger (OpenAPI) with Markdown prose was what prompted us to build Doctave [0]. Jekyll does a good job, but breaks down once you need more bells and whistles, such as search and versioning.

It's early, but worth checking out.

[0]: https://doctave.com/

Now this is the "headphones for my eyes" I have been waiting for.

I wonder if combining an ebook with a contextual audio track (does this exist?), would work as well as combining an audiobook with visuals (a movie).

They should have branded it as "headphones for your eyes". To me, this seems like the closest analogy of what the value of the product is.
There's Dokku [0] which supports buildpacks (and containers). Would love to hear more from anyone runnkng a business on it.

[0] https://dokku.com/

Re:Halton Sequence on Tuesday May 30, 2023 @03:32PM (#36129463)
See also Weyl sequences for generating samples from a discrete uniform distribution.

https://en.wikipedia.org/wiki/Weyl_sequence

So first, alter server state before transmission by spawning hallucinations (human-like bots) in places not visible to human players (inside walls, unusual angles, far in the horizon). To the client, they all look like human players. At least in memory.

The players who react or interact with these hallucinations are likely cheating.

This flips the roles, and the hard task of correctly determining "human like" behaviour is now on the cheaters.

Re:Literate Programming: Articles on Thursday May 18, 2023 @12:16PM (#35990197)
One more tool to accomplish this is lmt [0] which, despite minimal documentation, is quite pleasing to use.

[0] https://github.com/driusan/lmt

Re:Ditching TypeScript for JavaScript on Sunday May 07, 2023 @04:04PM (#35855108)
For smaller applications, an acceptable middle ground is using the TS language server[0] and JSDoc[1] comments.

Writing

  // @ts-check
  /** @type {number} */
  let x;
works very well for example in VSCode. The JSDoc comments are not as convenient as Typescript, but otherwise the experience is almost the same. The language server correctly keeps track of the types for me.

[0]: https://www.typescriptlang.org/docs/handbook/intro-to-js-ts.... [1]: https://jsdoc.app/

I built a small websocket server [0] that helps me write simple multiplayer backends. It spawns a process for the first client in a room, and routes subsequent clients to the same process.

[0]: https://scalesocket.org

Re:Pytest Tips and Tricks on Thursday March 23, 2023 @04:30PM (#35280909)
Also, run your tests in watch mode using entr or pytest-watch [0] for faster feedback.

[0] https://pypi.org/project/pytest-watch/

Re:Dragonfly Is Production Ready (and we raised $21M) on Tuesday March 21, 2023 @12:31PM (#35248580)
Seems to be Redis/Memcached API-compatible. Can I use it as a drop-in replacement?

Older »