frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Sony BMG copy protection rootkit scandal

https://en.wikipedia.org/wiki/Sony_BMG_copy_protection_rootkit_scandal
1•basilikum•1m ago•0 comments

The Future of Systems

https://novlabs.ai/mission/
2•tekbog•1m ago•1 comments

NASA now allowing astronauts to bring their smartphones on space missions

https://twitter.com/NASAAdmin/status/2019259382962307393
2•gbugniot•6m ago•0 comments

Claude Code Is the Inflection Point

https://newsletter.semianalysis.com/p/claude-code-is-the-inflection-point
2•throwaw12•7m ago•1 comments

Show HN: MicroClaw – Agentic AI Assistant for Telegram, Built in Rust

https://github.com/microclaw/microclaw
1•everettjf•7m ago•2 comments

Show HN: Omni-BLAS – 4x faster matrix multiplication via Monte Carlo sampling

https://github.com/AleatorAI/OMNI-BLAS
1•LowSpecEng•8m ago•1 comments

The AI-Ready Software Developer: Conclusion – Same Game, Different Dice

https://codemanship.wordpress.com/2026/01/05/the-ai-ready-software-developer-conclusion-same-game...
1•lifeisstillgood•10m ago•0 comments

AI Agent Automates Google Stock Analysis from Financial Reports

https://pardusai.org/view/54c6646b9e273bbe103b76256a91a7f30da624062a8a6eeb16febfe403efd078
1•JasonHEIN•14m ago•0 comments

Voxtral Realtime 4B Pure C Implementation

https://github.com/antirez/voxtral.c
1•andreabat•16m ago•0 comments

I Was Trapped in Chinese Mafia Crypto Slavery [video]

https://www.youtube.com/watch?v=zOcNaWmmn0A
1•mgh2•22m ago•0 comments

U.S. CBP Reported Employee Arrests (FY2020 – FYTD)

https://www.cbp.gov/newsroom/stats/reported-employee-arrests
1•ludicrousdispla•24m ago•0 comments

Show HN: I built a free UCP checker – see if AI agents can find your store

https://ucphub.ai/ucp-store-check/
2•vladeta•29m ago•1 comments

Show HN: SVGV – A Real-Time Vector Video Format for Budget Hardware

https://github.com/thealidev/VectorVision-SVGV
1•thealidev•31m ago•0 comments

Study of 150 developers shows AI generated code no harder to maintain long term

https://www.youtube.com/watch?v=b9EbCb5A408
1•lifeisstillgood•31m ago•0 comments

Spotify now requires premium accounts for developer mode API access

https://www.neowin.net/news/spotify-now-requires-premium-accounts-for-developer-mode-api-access/
1•bundie•34m ago•0 comments

When Albert Einstein Moved to Princeton

https://twitter.com/Math_files/status/2020017485815456224
1•keepamovin•35m ago•0 comments

Agents.md as a Dark Signal

https://joshmock.com/post/2026-agents-md-as-a-dark-signal/
2•birdculture•37m ago•0 comments

System time, clocks, and their syncing in macOS

https://eclecticlight.co/2025/05/21/system-time-clocks-and-their-syncing-in-macos/
1•fanf2•38m ago•0 comments

McCLIM and 7GUIs – Part 1: The Counter

https://turtleware.eu/posts/McCLIM-and-7GUIs---Part-1-The-Counter.html
2•ramenbytes•41m ago•0 comments

So whats the next word, then? Almost-no-math intro to transformer models

https://matthias-kainer.de/blog/posts/so-whats-the-next-word-then-/
1•oesimania•42m ago•0 comments

Ed Zitron: The Hater's Guide to Microsoft

https://bsky.app/profile/edzitron.com/post/3me7ibeym2c2n
2•vintagedave•45m ago•1 comments

UK infants ill after drinking contaminated baby formula of Nestle and Danone

https://www.bbc.com/news/articles/c931rxnwn3lo
1•__natty__•46m ago•0 comments

Show HN: Android-based audio player for seniors – Homer Audio Player

https://homeraudioplayer.app
3•cinusek•46m ago•2 comments

Starter Template for Ory Kratos

https://github.com/Samuelk0nrad/docker-ory
1•samuel_0xK•48m ago•0 comments

LLMs are powerful, but enterprises are deterministic by nature

2•prateekdalal•51m ago•0 comments

Make your iPad 3 a touchscreen for your computer

https://github.com/lemonjesus/ipad-touch-screen
2•0y•56m ago•1 comments

Internationalization and Localization in the Age of Agents

https://myblog.ru/internationalization-and-localization-in-the-age-of-agents
1•xenator•57m ago•0 comments

Building a Custom Clawdbot Workflow to Automate Website Creation

https://seedance2api.org/
1•pekingzcc•59m ago•1 comments

Why the "Taiwan Dome" won't survive a Chinese attack

https://www.lowyinstitute.org/the-interpreter/why-taiwan-dome-won-t-survive-chinese-attack
2•ryan_j_naughton•1h ago•0 comments

Xkcd: Game AIs

https://xkcd.com/1002/
2•ravenical•1h ago•0 comments
Open in hackernews

FizzBuzz Through Monoids

https://entropicthoughts.com/fizzbuzz-through-monoids
16•kqr•8mo ago

Comments

lgas•8mo ago
I wrote a similar implementation a while back[1]. The major difference is that mine only allows rules of the form "n is divisible by m" whereas the one from the post allows arbitrary predicates over n. Wouldn't be that hard to update though.

[1] https://gist.github.com/lgastako/d4fa392cbe85cbfae7dfa5e18c1...

throwaway81523•8mo ago
Code is a little too fancy though it's easy to fall into that temptation with Haskell. Particularly though, using the Monoid instance on strings ties you to concatenating the strings together. There was an example the other day where the strings had to be separated by spaces and terminated by an exclam point ("Fizz Buzz!"). My solution used lists straightforwardly instead of Monoids. It goes to 110 instead of 100 since 105 is 3*5*7.

    import           Data.List (intercalate)

    fizzle :: Int -> String
    fizzle n =
        let ws = [(3,"Fizz"),(5,"Buzz"),(7,"Bazz")]
            a = [s | (d,s) <- ws, n`rem`d == 0]
        in case a of []        -> show n
                     otherwise -> intercalate " " a ++ "!"

    main = mapM_ (putStrLn . fizzle) [1..110]
kqr•8mo ago
Another way to do it would be

    newtype Words = Words { getWords :: String }

    instance Semigroup Words where
      Words a <> Words b = Words (a <> " " <> b)

    instance Monoid Words where
      mempty = Words mempty

    fizzbuzz i =
      maybe (show i) (<> "!") . fmap getWords . mconcat $
        [ Words "fizz" <$ guard (rem i 3 == 0)
        , Words "buzz" <$ guard (rem i 5 == 0)
        ]
but at this point I agree lists might be more clear.
theamk•8mo ago
it always amazes me how Haskell uses the very complex approaches for a very simple problem. Do you want a design that generalizes to zork? Here it is:

    def fizzbuzz(i):
        return "".join((["fizz"] if (i % 3) == 0 else []) + 
                       (["buzz"] if (i % 5) == 0 else [])
                      ) or str(i)
 
    for i in range(1, 101):
        print(fizzbuzz(i))
here is "indication of good modularity" with no monoid in sight, and we did not have to import 3 extra libraries either.