Hacker News

New stories

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

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

1 pointsby 45m agogithub.com
1 comments
45m 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.