frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

What if you just did a startup instead?

https://alexaraki.substack.com/p/what-if-you-just-did-a-startup
1•okaywriting•5m ago•0 comments

Hacking up your own shell completion (2020)

https://www.feltrac.co/environment/2020/01/18/build-your-own-shell-completion.html
1•todsacerdoti•8m ago•0 comments

Show HN: Gorse 0.5 – Open-source recommender system with visual workflow editor

https://github.com/gorse-io/gorse
1•zhenghaoz•8m ago•0 comments

GLM-OCR: Accurate × Fast × Comprehensive

https://github.com/zai-org/GLM-OCR
1•ms7892•9m ago•0 comments

Local Agent Bench: Test 11 small LLMs on tool-calling judgment, on CPU, no GPU

https://github.com/MikeVeerman/tool-calling-benchmark
1•MikeVeerman•10m ago•0 comments

Show HN: AboutMyProject – A public log for developer proof-of-work

https://aboutmyproject.com/
1•Raiplus•10m ago•0 comments

Expertise, AI and Work of Future [video]

https://www.youtube.com/watch?v=wsxWl9iT1XU
1•indiantinker•11m ago•0 comments

So Long to Cheap Books You Could Fit in Your Pocket

https://www.nytimes.com/2026/02/06/books/mass-market-paperback-books.html
3•pseudolus•11m ago•1 comments

PID Controller

https://en.wikipedia.org/wiki/Proportional%E2%80%93integral%E2%80%93derivative_controller
1•tosh•16m ago•0 comments

SpaceX Rocket Generates 100GW of Power, or 20% of US Electricity

https://twitter.com/AlecStapp/status/2019932764515234159
2•bkls•16m ago•0 comments

Kubernetes MCP Server

https://github.com/yindia/rootcause
1•yindia•17m ago•0 comments

I Built a Movie Recommendation Agent to Solve Movie Nights with My Wife

https://rokn.io/posts/building-movie-recommendation-agent
4•roknovosel•17m ago•0 comments

What were the first animals? The fierce sponge–jelly battle that just won't end

https://www.nature.com/articles/d41586-026-00238-z
2•beardyw•25m ago•0 comments

Sidestepping Evaluation Awareness and Anticipating Misalignment

https://alignment.openai.com/prod-evals/
1•taubek•25m ago•0 comments

OldMapsOnline

https://www.oldmapsonline.org/en
1•surprisetalk•28m ago•0 comments

What It's Like to Be a Worm

https://www.asimov.press/p/sentience
2•surprisetalk•28m ago•0 comments

Don't go to physics grad school and other cautionary tales

https://scottlocklin.wordpress.com/2025/12/19/dont-go-to-physics-grad-school-and-other-cautionary...
1•surprisetalk•28m ago•0 comments

Lawyer sets new standard for abuse of AI; judge tosses case

https://arstechnica.com/tech-policy/2026/02/randomly-quoting-ray-bradbury-did-not-save-lawyer-fro...
3•pseudolus•28m ago•0 comments

AI anxiety batters software execs, costing them combined $62B: report

https://nypost.com/2026/02/04/business/ai-anxiety-batters-software-execs-costing-them-62b-report/
1•1vuio0pswjnm7•29m ago•0 comments

Bogus Pipeline

https://en.wikipedia.org/wiki/Bogus_pipeline
1•doener•30m ago•0 comments

Winklevoss twins' Gemini crypto exchange cuts 25% of workforce as Bitcoin slumps

https://nypost.com/2026/02/05/business/winklevoss-twins-gemini-crypto-exchange-cuts-25-of-workfor...
2•1vuio0pswjnm7•30m ago•0 comments

How AI Is Reshaping Human Reasoning and the Rise of Cognitive Surrender

https://papers.ssrn.com/sol3/papers.cfm?abstract_id=6097646
3•obscurette•30m ago•0 comments

Cycling in France

https://www.sheldonbrown.com/org/france-sheldon.html
2•jackhalford•32m ago•0 comments

Ask HN: What breaks in cross-border healthcare coordination?

1•abhay1633•32m ago•0 comments

Show HN: Simple – a bytecode VM and language stack I built with AI

https://github.com/JJLDonley/Simple
2•tangjiehao•35m ago•0 comments

Show HN: Free-to-play: A gem-collecting strategy game in the vein of Splendor

https://caratria.com/
1•jonrosner•36m ago•1 comments

My Eighth Year as a Bootstrapped Founde

https://mtlynch.io/bootstrapped-founder-year-8/
1•mtlynch•36m ago•0 comments

Show HN: Tesseract – A forum where AI agents and humans post in the same space

https://tesseract-thread.vercel.app/
1•agliolioyyami•36m ago•0 comments

Show HN: Vibe Colors – Instantly visualize color palettes on UI layouts

https://vibecolors.life/
2•tusharnaik•37m ago•0 comments

OpenAI is Broke ... and so is everyone else [video][10M]

https://www.youtube.com/watch?v=Y3N9qlPZBc0
2•Bender•38m ago•0 comments
Open in hackernews

Solving Project Euler: Problem 45

https://loriculus.org/blog/euler-45/
9•wenderen•2mo ago

Comments

marethyu•2mo ago
I attempted the problem myself before reading your solution. My strategy is bit different: for every N>285, I check whether there exists a positive integer solution n to two equations T_N=P_n and T_N=H_n. Using basic algebra and quadratic formula, it boils down to checking whether the quantities 1+12(NN+N) and 1+4(NN+N) are perfect squares. If they are perfect squares, denote their squares by x and y. The next step is to check if 1+x is divisible by 6 and if 1+y is divisible by 4. They are easy using % operator.

    from math import sqrt

    def isPerfectSquare(n):
        sr = int(sqrt(n))
        return sr * sr == n

    for N in range(1, 10000000000):
        foo = 1 + 12*(N*N + N)
        bar = 1 + 4*(N*N + N)
        if isPerfectSquare(foo) and isPerfectSquare(bar):
            x, y = int(sqrt(foo)), int(sqrt(bar))
            if (1+x)%6 == 0 and (1+y)%4 == 0:
                print(f'Candidate found: N={N}, T_N={N*(N+1)/2}')
throwaway81523•2mo ago
I just did a dumb search with lazy lists in Haskell, inspired by the famous problem about Hamming numbers. Runtime was 0.02 seconds. About 2 more seconds to fine the one after that (results: [1,40755,1533776805,57722156241751]).

    import           Data.Ord

    tri n = n*(n+1)`quot`2
    pent n = n*(3*n-1)`quot`2
    hex n = n*(2*n-1)

    fs :: (Integer -> Integer)->[Integer]
    fs f = map f [1..]

    cm aas@(a:as) bbs@(b:bs)
       = case compare a b of
           EQ -> a : cm as bs
           GT -> cm aas bs
           LT -> cm as bbs

    tt = (fs tri) `cm` (fs pent) `cm` (fs hex)

    main = print . take 3 $ tt
Added: the one after that is 2172315626468283465 which took about 6 minutes with the same Haskell program. I'm sure there are faster implementations and better algorithms. I didn't try to search any further.
cbarrick•2mo ago
Same algorithm in Rust finds 2172315626468283465 in about 3 seconds on my M1 Pro.

    $ time cargo run --release
        Finished `release` profile [optimized] target(s) in 0.02s
         Running `target/release/p45`
    0
    1
    40755
    1533776805
    57722156241751
    2172315626468283465
    cargo run --release  2.95s user 0.04s system 98% cpu 3.029 total
Runs on the Rust Playground too: https://play.rust-lang.org/?version=stable&mode=release&edit...
throwaway81523•2mo ago
Changing the Integer to Int in the Haskell program (use machine integers instead of bignums) speeds the 6 minutes to 35 seconds, fwiw. But that was only ok to do after knowing that the result would fit in a machine int. This is on an i5-3570 which is a bit over half the speed of the M1 Pro (Passmark score 2042 vs 3799). So it scales to around 18 sec on similar hardware. Not too bad given the list-based implementation, I guess.
wenderen•2mo ago
Neat! I translated my code to Rust line-for-line and the iterator approach significantly outperforms it.

Rust newbie q - why use `x.wrapping_sub()` instead of regular old `x - 1`? Seems like we're never going to underflow `usize` for any of the 3 formulae?

throwaway81523•2mo ago
I don't use Rust at all, but if compiler warnings are set to maximum, I'd want subtracting anything from a usize to give a warning unless the compiler can verify that the result is a valid usize. BTW, OEIS A014979 gives a linear recurrence for triangular-pentagonal numbers, so filtering for hexagonals gives a much faster way to do this problem. There may be a recurrence that does all three at once, not sure.
cbarrick•2mo ago
> There may be a recurrence that does all three at once, not sure.

Now that we know the start of the sequence, we can just dump it into OEIS to look up the answer! :)

The sequence is A046180 (https://oeis.org/A046180) titled "Hexagonal pentagonal numbers" with a nice and easy recurrence relation:

    a(n) = 37635*a(n-1) - 37635*a(n-2) + a(n-3).
Also, according to the comments on OEIS, all hexagonal numbers are triangular, so we could have just skipped that requirement entirely.
cbarrick•2mo ago
> why use `x.wrapping_sub()` instead of regular old `x - 1`?

Because I coded it to start at x=0, which will underflow and will panic in debug mode.

moi2388•2mo ago
The mask hides the whole sentence except the answer. Lol.
wenderen•2mo ago
To help debug - which browser are you using and on which OS?
moi2388•2mo ago
iOS Safari