Better HN
topnewbestaskshowjobs
Log inSign up

selfboot

12 karma · joined May 16, 2017 (9y ago) · 48 submissions

https://selfboot.cn
Submissions

comment 9mo ago · link · parent

Hi HN,

I’ve always loved Simon Tatham’s puzzle collection — especially Bridges, Slitherlink, and Signpost. I’ve been playing them for years on desktop and Android.

Recently I decided to port the collection to iOS with a more modern native UI and some usability improvements, while keeping the original puzzle generation logic intact.

The core puzzle engines are still Simon’s original C implementations. I built a thin Swift layer around them and focused mostly on:

Native SwiftUI interface

Better touch interactions

Dark mode

Offline support

Fast puzzle generation

Clean, minimal UI (no ads)

A few technical notes:

The puzzle logic runs as compiled C modules bridged into Swift

Puzzle state is serialized/deserialized to allow undo/redo

I implemented a custom rendering layer to support dynamic grid scaling

All puzzles are generated locally (no backend)

One thing I found interesting is how well the original C codebase is structured — it’s surprisingly modular for something that supports so many puzzle types.

I tried to stay faithful to the original mechanics while improving the mobile UX.

Would love feedback, especially from anyone familiar with the original project or who has thoughts on puzzle UI design.

App link: https://apps.apple.com/us/app/simon-puzzles/id6756353841

Thanks Simon for building such a timeless collection.

comment 10mo ago · link · parent

My blog: https://selfboot.cn/en Side Project: https://puzzles-game.com/ and vibe coding app: https://apps.apple.com/us/app/simon-puzzles/id6756353841

comment 1y ago · link · parent

To be honest, the function is a bit simple, and Claude code should be able to do better.

I have also built games using Cursor, and I have to say that the current AI is really strong.

https://puzzles-game.com/

comment 1y ago · link · parent

very cool ~ I recently made a puzzle game, https://puzzles-game.com/, which is also adapted to different screens and adds numeric keyboard support, which is somewhat similar to what you mentioned in your blog

comment 1y ago · link · parent

A deep dive into the creation process and internal structure of SSTable files in LevelDB. This article takes a problem-driven approach to analyze how SSTable achieves high read/write performance through mechanisms like block storage, index optimization, and filters. It focuses on the implementation details of the TableBuilder class, including the construction of DataBlocks, IndexBlocks, and FilterBlocks, as well as engineering techniques like index key optimization and compression strategies. Through source code analysis, it demonstrates how LevelDB solves key problems in large-scale data storage, quickly locating data blocks, reducing unnecessary disk I/O, and balancing storage space with query efficiency. With concrete code examples and flowcharts, the article helps readers deeply understand the ingenious design of the SSTable file format and the core implementation principles of LevelDB as a high-performance key-value storage engine.

comment 1y ago · link · parent

I have been trying for a long time but can't figure out how to play this game. Is there anyone who can give me some ideas?

The rules of the game are simple: jump over a piece to remove the jumped piece. Try to remove all pieces except one. Drag a piece to an empty space to move it. The target position must be exactly two holes away from the starting piece, the directions must be orthogonal, and there must be a piece in the middle hole. But I always end up with a few pieces that are far apart and can't be solved. What's the idea of playing this kind of game?

comment 1y ago · link · parent

The original Simon Tathamʼs Portable Puzzle Collection has been a favourite of logic-puzzle lovers for decades, but it was written for the desktop environments of its time. This project brings those timeless games into the 21-st-century browser while preserving every rule, control and challenge you already know.

8.

A modern puzzle games collection written with AI(puzzles-game.com ↗)

2 points · by selfboot · 1y ago · 1 comment

comment 1y ago · link · parent

This article delves into the implementation details of the high-performance LRU cache in LevelDB, covering its cache interface design, the LRUHandle data structure, doubly linked list optimizations, and sharding mechanism. By analyzing core designs like clever reference counting management, the dummy node technique, and lock sharding to reduce contention, it showcases the optimization strategies for an industrial-grade cache system. Combining code and diagrams, the article helps readers understand how LevelDB achieves a high-concurrency, high-performance cache and how these design techniques can be applied in their own projects.

comment 1y ago · link · parent

This article details the background and origins of MCP, its relationship with OpenAI Function Calling, and how to configure and use MCP Servers in Cursor. It explores practical scenarios like web automation, GitHub repository analysis, and chart generation. While MCP shows impressive capabilities in GitHub code analysis, web manipulation still has limitations. The article also highlights MCP's core constraint: its reliance on the LLM's function calling ability, which is affected by token limits. Although MCP offers a standardized solution for AI tool invocation, its practical value is currently limited, positioning it more as an experimental technology with hopes for significant improvements as model capabilities advance.

comment 1y ago · link · parent

This article provides an in-depth analysis of LevelDB's write mechanism, detailing the complete process from the Put interface to WAL logging and MemTable persistence.

Through source code analysis, it reveals how LevelDB achieves 400,000 writes per second throughput through core technologies like WriteBatch merging strategy, dual MemTable memory management, WAL sequential write optimization, and dynamic Level0 file throttling.

It also explores engineering details such as mixed sync write handling, small key-value merge optimization, and data consistency in exceptional scenarios, helping you master the design essence and implementation strategies of LevelDB's high-performance writing.

comment 1y ago · link · parent

If you’ve worked on any non-trivial C++ project, you’ve likely encountered process coredumps. A coredump is a mechanism where the operating system records the current memory state of a program when it encounters a severe error during execution.

There are many reasons why a C++ process might coredump, including:

Illegal Memory Access: This includes dereferencing null pointers, accessing freed memory, array bounds violations, etc. Stack Overflow: Caused by infinite recursion or large arrays allocated on the stack Segmentation Fault: Attempting to write to read-only memory or accessing unmapped memory regions Uncaught Exceptions: Program termination due to unhandled exceptions When encountering a coredump, we typically need to examine the core file for problem analysis and debugging. Analyzing core files can be challenging as it requires a deep understanding of C++’s memory model, exception handling mechanisms, and system calls.

Rather than focusing on core file analysis methods, this article will present several real-world cases to help developers proactively avoid these errors in their code.

comment 1y ago · link · parent

Zero front-end foundation, with cursor and claude 3.5 to implement a complete minesweeper game.

This Minesweeper game offers two game modes:

- *Classic Mode*: Traditional square grid minesweeper, identical to the one bundled with Windows. Each square is adjacent to eight neighboring squares (horizontally, vertically, and diagonally). - *Hexagonal Mode*: An innovative hexagonal grid minesweeper where each cell is a regular hexagon adjacent to six neighboring cells. This mode offers a fresh gaming experience, requiring players to adapt to new spatial relationships for logical deduction.

comment 1y ago · link · parent

Over the weekend, I used Cursor and Claude3.5 to create a complete maze game based on an existing maze generation library. You can try it at [Maze Game, Online Maze Generation](https://gallery.selfboot.cn/en/games/maze). It has comprehensive features, supporting various types of maze map generation and online maze gameplay using mouse controls.

Previously, when having Claude write code, I used well-known libraries with detailed documentation. AI models were already trained on these libraries, making it easy to write code.

However, this time, I used a [relatively obscure maze generation library](https://github.com/codebox/mazes) without documentation. Since the AI model had no knowledge of this library, getting AI to use it for my task was challenging.

comment 2y ago · link · parent

I have been using cursor and Claude3.5 to write some fun projects. Recently, I suddenly had the idea to quickly write a online sokoban game. So I took some time off on the weekend and used Claude3.5 to help me realize a complete box-pushing game.

It has many difficult levels built in, and also supports custom levels to share with friends.

Welcome to challenge!

12