Hacker News

Top stories

Live mirror
30 storiesupdated just nowView source snapshot
  1. Android 17 is the first since 3.x to add new APIs without releasing to the AOSP(grapheneos.social ↗)
    321comments
  2. Science Is Open Software(jepedersen.dk ↗)
    15comments
  3. SDCC – Small Device C Compiler(sourceforge.net ↗)
    4comments
  4. Cloudflare Quick Tunnels(cloudflare.com ↗)
    262comments
  5. Saving another 100TB of RAM(cloudflare.com ↗)
    57comments
  6. How to Write with an LLM(sockpuppet.org ↗)
    292comments
  7. Why building a Rust LSP is hard(rust-glancer.github.io ↗)
    9comments
  8. Show HN: LiveWorld – Every 24/7 YouTube live camera on one globe(liveworld.info ↗)
    28comments
  9. Xcode 27.1 Beta Release Notes(developer.apple.com ↗)
    75comments
  10. The first new cat species discovered in 100 years(nationalgeographic.com ↗)
    77comments
  11. Show HN: Cactus Needle 3: 8-29MB automation models can match DeepSeek V4 Flash(cactuscompute.com ↗)
    79comments
  12. Photon-Emission-Guided Laser Fault Injection Enables RP2350 Secure Debug(ledger.com ↗)
    61comments
  13. OpenJev(openjev.com ↗)
    249comments
  14. The Farnese letter(simonklee.dk ↗)
    5comments
  15. How OpenAI Used Its Own LLMs to Design Its Jalapeño Chip(ieee.org ↗)
    67comments
  16. Cache-to-Cache: Direct Semantic Communication Between LLMs (2025)(arxiv.org ↗)
    12comments
  17. LispBM is a concurrent Lisp for microcontrollers with message passing(lispbm.com ↗)
    2comments
  18. Claude Code now reads AGENTS.md if there is no Claude.md(claude.com ↗)
    203comments
  19. Cyclomatic Complexity in C#(ndepend.com ↗)
    15comments
  20. Minimal Phone 2(minimalcompany.com ↗)
    196comments
  21. Goroutine Leak Profiles(go.dev ↗)
    discuss
  22. Typesafe-computer-use drives a Mac toward a goal for 1/50th of a cent per step(github.com/awlevin ↗)
    discuss
  23. Warez: The Infrastructure and Aesthetics of Piracy (2021)(archive.org ↗)
    37comments
  24. Alibaba open-sources AI model that can detect cancer and nearly 150 conditions(scmp.com ↗)
    8comments
  25. How SpaceX streamlined the Raptor engine(construction-physics.com ↗)
    51comments
  26. Inside ZCode: Silently uploading your Git history to the cloud(ferstar.org ↗)
    94comments
  27. Two parallel neural ectoderm progenitors contribute to the developing brain(newscientist.com ↗)
    60comments
  28. C++26: Trivial infinite loops are no longer undefined behaviour(sandordargo.com ↗)
    212comments
  29. The Implications of Linguistic Illegibility for LLM Security(arxiv.org ↗)
    22comments
  30. North Korean nuclear test sets off years of earthquakes(science.org ↗)
    156comments

Show HN: Make a rectangle – a puzzle game

23 pointsby 11y agogithub.com
25 comments
11y agoHN ↗

The mods asked me to repost my puzzle game. Someone appreciates something I made. I want to cry. :)

11y agoHN ↗

How does this game work? What am I supposed to be doing? Do you mind providing a short description? I could not manage to find one.

11y agoHN ↗

Try moving the pieces so they make a rectangle. :)

11y agoHN ↗

I think `make a rectangle!` is easier to understand than make a box :)

11y agoHN ↗

Thanks! That might have confused people. I changed the title.

11y agoHN ↗

I assume the goal is to make a rectangle? Does it have to be a square?

11y agoHN ↗

Rectangle, not possible to make a square. (Count the area and try and find integer width & height that fits)

11y agoHN ↗

But two squares is possible (8x8 with a negative 2x2 anywhere inside, including at the center)

11y agoHN ↗

Yes, the goal is to make a rectangle. It cannot be one giant square as there are 60 (5 x 12) mini squares.

11y agoHN ↗

In safari I am able to rotate a pice by clicking, but I can only do it once for each piece. I am not sure if it is even still possible to complete it this way.

11y agoHN ↗

Oh no. Thanks for the error report. I just re-prod the bug and will work on a fix. Sorry about that.

It took me a while to get it working on Android and desktop. I need to get better at making things cross platform.

11y agoHN ↗

So I made a rectangle and nothing happened. Is it supposed to, or am I meant to simply bask in my quadrilateral glory?

11y agoHN ↗

Is that not enough satisfaction!? What more do you want?

11y agoHN ↗

Bask!

Thanks for the suggestion. I should add a screenshot function or something.

There are thousands of solutions so I couldn't figure out a good way to detect if the user was finished. Much to learn I have. :)

11y agoHN ↗

Edges with smoothing, and counting inside. If you only have 4 edges, then you win

11y agoHN ↗

You'd probably have to check algorithmically. Starting from the top-left most piece, have they (reasonably fuzzily) covered the 6x10 grid proceeding down and right? If so, yay! You can also check for things like too much overlap, but checking if there is a piece covering each of the centers of the relative grid should be sufficient.

My first solution: http://i.imgur.com/rV2Ueow.png

edit: It also was not clear up front that I could click to rotate/flip the pieces, until I did it by accident.

11y agoHN ↗

edit: It also was not clear up front that I could click to rotate/flip the pieces, until I did it by accident.

This explains why I couldn't solve it... I was feeling rather stupid seeing all the people solving it with 1,000's of solutions but I couldn't find one.

Thanks! :P

11y agoHN ↗

This was always one of my favourite puzzle games growing up. I had a plastic copy of it that I would spend hours rearranging.

For those who aren't familiar with this puzzle, the goal is to take the 12 pieces and make a 10x6 rectangle. The 12 pieces are known as Pentominos, and each one is a unique arrangement of 5 squares connected on the edges. There are more than 2000 different ways to arrange the pieces into a 10x60 rectangle.

It's a lot of fun!

11y agoHN ↗

Yes! Some Donald Knuth person even published an algorithm for it. :)

11y agoHN ↗

Same here. I kept notebook full of solutions I have found. My favourite trick was to use sets of 2 pieces placed next to each other that could be flipped without need to rearange other pieces. This way I could get 2 slightly different solutions in one shot.

11y agoHN ↗

same here! there are also lots of solutions for the 12x5 rectangle, and two for the 20x3

11y agoHN ↗

Wow, people are solving it fast! Took me a few hours the first time. Granted I was 10. :)

11y agoHN ↗

feedback: would be more satisfying if the pieces snapped to a grid. also are they not flippable? i couldn't find any way to do that.

11y agoHN ↗

Currently the game is too complex, so it's not satisfying for an average user

It might be a good idea to turn it into a game where it starts easy, gets harder, and you can share the level you achieved and brag about it (like 1 2 3 4 5 6 7, the level could be stored in localStorage so a user can continue fresh from that same level later on, with a different random pieceset)

Edit: Just checked the code, impressive :) - I assumed the game and pieces were randomly generated