Hacker News

New stories

Live mirror
30 storiesupdated just nowView source snapshot
  1. LensVLM: Selective Context Expansion for Compressed Visual Representation OfText(arxiv.org)
    discuss
  2. Consciousness may have evolved separately from pure intelligence(psypost.org)
    1comments
  3. Python Enhancement Proposal 823: None-aware access operators(python.org)
    discuss
  4. The worst VGA monitor ever made – Tandy VGM-225(youtube.com)
    discuss
  5. Understanding Tetrode Screen Current(robkalmeijer.nl)
    discuss
  6. Six-year-old breaks women's world Rubik's Cube record [video](youtube.com)
    discuss
  7. An extension that finds things you've never searched, from your own history(microsoftedge.microsoft.com)
    discuss
  8. It's not your imagination – dating has gotten more combative lately(vox.com)
    1comments
  9. Moderna announced that their cancer mRNA vaccine succeeded in a late-stage trial(bbc.com)
    discuss
  10. Sign Up for Tweet.app(tweet.app)
    discuss
  11. SpaceX given unique access to classified DoD space tracking data, sources say(breakingdefense.com)
    discuss
  12. Treating the APK as a database: a decompiler 269x faster than JADX(medium.com/droidasc)
    discuss
  13. Katamari Object Library(andrew-boylan.com)
    5comments
  14. Book Review: Steve Jobs in Exile by Geoffrey Cain(lapcatsoftware.com)
    discuss
  15. antigravity-seo: Go engine and token-efficient SEO audits for Antigravity CLI(github.com/angelotc)
    discuss
  16. Meta's New Muse AI Agent Read My Private Messages. I Never Asked It To(inc.com)
    discuss
  17. Tattoos as a risk factor for lymphoma: a population-based case–control study(thelancet.com)
    discuss
  18. Level Designers Will Love My Engine, Here's Why [video](youtube.com)
    discuss
  19. Eric Schmidt on the era of AI warfare(economist.com)
    discuss
  20. OpenAI agent 'infiltrated' Australian government website, PM says(bbc.com)
    2comments
  21. DoorDash's $131.5M Settlement with the City of New York(doordash.com)
    discuss
  22. 'Rex Jr.' Could Be Most Important T. Rex Ever Discovered(cowboystatedaily.com)
    discuss
  23. TSA is rolling out a new scanner – it could be a headache for carry-on travelers(independent.co.uk)
    discuss
  24. Contrastive Language Models(contrastive-lm.notion.site)
    2comments
  25. Trump White House Press Ban Matches 1933 Nazi Law(flyingpenguin.com)
    discuss
  26. Universities Must Reinvent Themselves for the Intelligent Age(time.com)
    discuss
  27. Nori LLM: Achieving Over 1M tok / s(noriagentic.com)
    discuss
  28. An Undercover Google Analyst Infiltrated a Notorious Supply-Chain Hacking Gang(wired.com)
    discuss
  29. A 13-Year-Old Has Been Cured of DIPG, the Deadliest Childhood Brain Cancer(imapac.com)
    1comments
  30. ThinkingCap-Qwen3.8-27B: the same answers, 37% less thinking(bottlecapai.com)
    discuss

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

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