Hacker News

New stories

Live mirror
30 storiesupdated just nowView source snapshot
  1. DoorDash's Settlement with the City of New York(doordash.com)
    discuss
  2. 'Rex Jr.' Could Be Most Important T. Rex Ever Discovered(cowboystatedaily.com)
    discuss
  3. TSA is rolling out a new scanner – it could be a headache for carry-on travelers(independent.co.uk)
    discuss
  4. Contrastive Language Models(contrastive-lm.notion.site)
    discuss
  5. Trump White House Press Ban Matches 1933 Nazi Law(flyingpenguin.com)
    discuss
  6. Universities Must Reinvent Themselves for the Intelligent Age(time.com)
    discuss
  7. Nori LLM: Achieving Over 1M tok / s(noriagentic.com)
    discuss
  8. An Undercover Google Analyst Infiltrated a Notorious Supply-Chain Hacking Gang(wired.com)
    discuss
  9. A 13-Year-Old Has Been Cured of DIPG, the Deadliest Childhood Brain Cancer(imapac.com)
    discuss
  10. ThinkingCap-Qwen3.8-27B: the same answers, 37% less thinking(bottlecapai.com)
    discuss
  11. China's Approach to AI(madeinchinajournal.com)
    discuss
  12. Show HN: Tokenhush – keeps your secrets out of what Claude Code sends(github.com/fregie)
    discuss
  13. 16GB iPod Nano 3G Upgrade(tuckerosman.com)
    discuss
  14. OpenAI's Next Marketing Stunt(youtube.com)
    discuss
  15. Show HN: How long do I need to work at my salary before I can coast, or retire?(github.com/karmanyaahm)
    1comments
  16. Ask HN: I just talked to an AI-obsessed client, and I need a shower afterwards
    1comments
  17. Moggi, a statically typed, purely functional language on JVM, .NET and PHP(github.com/moggi-lang)
    1comments
  18. Free 3D CAD designing/modeling software(silviaai.dev)
    discuss
  19. Chinese authorities reportedly in possession of F-35 components in Hong Kong(cnbc.com)
    discuss
  20. Show HN: Built-in APM for vibe-coded apps so your AI can fix them(oncroft.net)
    discuss
  21. Muse Charm(meta.com)
    3comments
  22. The AI Build-Out Is Becoming the Biggest Economic Bet in U.S. History(wsj.com)
    3comments
  23. What the Labs Kept Secret: The German Wiki and RubyGems Hacks [video](youtube.com)
    discuss
  24. Sync Alexa Lists to Apple Reminders(github.com/ow)
    1comments
  25. Cursor launches bots that watch code from pull request to production(cursor.com)
    discuss
  26. Two-dimensional billiards are Turing complete(crm.cat)
    discuss
  27. Show HN: I made Jev moderate Discord servers(frolleks.site)
    1comments
  28. PersistentWindows – persists window positions on some events for Windows(github.com/kangyu-california)
    1comments
  29. We Run Kaizen on AI(kznconsulting.com)
    discuss
  30. Show HN: SocatUI A task manager for Socat tunnels(github.com/esurharun)
    discuss

Moggi, a statically typed, purely functional language on JVM, .NET and PHP

1 pointsby 50m agogithub.com
1 comments
50m agoHN ↗

Moggi 0.1.0-alpha is released today.

Moggi is a statically typed, purely functional programming language with strict evaluation. It has algebraic data types, GADTs, pattern matching, type classes, type inference, Generic Deriving, and an IO monad. It targets the JVM, .NET, and PHP, with typed FFI for existing Java, .NET, and PHP libraries.

The first release also includes a REPL, LSP, VS Code extension, moogle (code search), mogdoc (documentation generation), and a growing standard library.

A small example:

```moggi data Shape = Circle Double | Rect Double Double deriving Show

class Area a where area :: a -> Double

instance Area Shape where area shape = case shape of Circle r -> 3.141592653589793 * r * r Rect w h -> w * h

data Reading = Reading { label :: String, shape :: Shape }

render :: Reading -> String render reading = let thisShape = reading.shape in reading.label <> ": " <> show (area thisShape)

main :: IO () main = do putStrLn (render (Reading { label = "unit circle", shape = Circle 1.0 })) putStrLn (render (Reading { label = "3x4", shape = Rect 3.0 4.0 }))

This is an alpha release: the language and APIs are still evolving, and the standard library is still a work in progress.

I'd particularly like feedback from people interested in functional languages, type systems, compilers, and language/runtime interoperability.