frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

What I Always Wanted to Know about Second Class Values

https://dl.acm.org/doi/epdf/10.1145/3759427.3760373
16•todsacerdoti•2h ago

Comments

kazinator•1h ago
I feel that this work, and that other one it references which proposes modeling first and second class values with type, are simply ignorant of the massive amount of research that had been done in this area in decades past.

I'm actually astonished you can still publish anything on this stuff: papers that talk about upward funargs and show trivial Lisp lambda code, like it's 1973.

The stack/heap dichotomy dictating second class vs first class is wrongheaded; we already have results which show that the distinction between stack and heap is artificial and phony.

For instance oh, Richard Stallman's 1980 work, the "Phantom Stacks" paper. The following two italicized paragraphs are an excerpt:

The key to reducing the impact of a stack on the complexity of the system is to realize that a stack really is not a sort of object that lives in memory, but a way of allocating memory among other objects. It need not have any existence, except in the "mind" of some part of the system which is allocating memory, for some length of time. If the data which is stored in the stack looks like ordinary Lisp objects, then most of the Lisp system will be able to deal with it properly without having to be aware that there is a stack.

One consequence of making the stack not recognizable as a stack is that the garbage collector won't know it is a stack. It will compactify, reorder or reallocate it willy nilly. But the stack's contents, valid accessible Lisp objects, will be preserved in meaning by the garbage collection, just like all such Lisp objects. So no harm is done, as long as we realize that the stack isn't a stack any more. The area of memory which used to be a stack is now part of the heap.

Chicken Scheme, famously, implements an idea from Henry Baker of bump allocating all objects on the stack. All function calls create new frames, and so do function returns: function returns are actually compiled into calls to the continuation and therefore are new function calls with new frames on the stack. When the stack reaches a certain limit, it is rolled back. All objects on it that are still reachable (including lambda environments) are moved to the heap at that moment.

So according to the present paper, objects must be transparently switching from the second class to the first class --- and that is incompatible with the idea of treating them as different types.

skybrian•4m ago
Other languages (such as Go) try to keep objects on the stack rather than the heap to avoid putting pressure on the garbage collector, increasing performance. (This seems more important from a practical perspective than supporting continuations?)

But Go doesn't distinguish them using the type system either. New versions of Go sometimes do better escape analysis, keeping more objects on the stack, and that doesn't break any programs.

moring•28m ago
Sorry for being ignorant of the basics, but how does the following work?

> However, seg-ments of code that are provably free of garbage collection > have deterministic timing and can satisfy hard timing con-straints, as they > are certainly not interrupted by garbage collection.

You are only ever "certainly not interrupted" if you turn off interrupts, which requires a high level of privileges. And not being interrupted still does not mean you have uncontended access to main memory or shared caches, which is a relevant factor for hard real-time. Nor do you have uncontended access to execution facilities (e.g. multipliers or floating-point ALUs), but at least for those you might be able to find an upper bound even for contended access.

stmw•9m ago
Some may argue that the real problem here is the unstated assumption of wanting to have a garbage collector in the first place.

The Reviewer Isn't the Bottleneck

https://rishi.baldawa.com/posts/review-isnt-the-bottleneck/
1•timbray•31s ago•0 comments

Apple in 2025: The Six Colors report card

https://sixcolors.com/post/2026/02/2025reportcard/
1•akyuu•1m ago•0 comments

Show HN: ContextForge now supports Cursor IDE – persistent AI memory

https://contextforge.dev/blog/contextforge-now-supports-cursor-ide-persistent-ai-memory-everywhere
1•alfredoizjr•1m ago•0 comments

Show HN: A2UI for Elixir/Phoenix/LiveView

https://github.com/actioncard/a2ui-elixir
1•maxekman•1m ago•0 comments

Reasoning boosts search relevance 15-30%

https://softwaredoug.com/blog/2025/10/06/how-much-does-reasoning-improve-search-quality
1•gmays•2m ago•0 comments

Specimen Gallery – CC0 transparent specimen PNGs organized by taxonomy

https://specimen.gallery/
1•eclectic_mind05•5m ago•1 comments

Show HN: An AI system that pushes political reform

https://twitter.com/AshtonBars/status/2031082203418079664
1•sagebowsystem•5m ago•0 comments

Price-Checking Zerocopy's Zero Cost Abstractions

https://jack.wrenn.fyi/blog/price-check/
1•todsacerdoti•5m ago•0 comments

Uber reported to the state that I was fired for "annoying a coworker."

https://anon-ex-uber.medium.com/uber-reported-to-the-state-that-i-was-fired-for-annoying-a-cowork...
1•anon-ex-uber•5m ago•0 comments

Things I've Done with AI

https://sjer.red/blog/2026/built-with-ai/
2•shepherdjerred•6m ago•0 comments

Ask HN: What apps have you created for your own use?

1•koconder•6m ago•2 comments

Sam Kriss on AI's false starts, doomsday scenarios, and eccentric proponents

https://harpers.org/2026/03/general-interest-agents-of-chaos-sam-kriss-will-stephenson-future-ai/
2•YPGolyadkin•8m ago•0 comments

Ask HN: How does one review code when most of the code is written by AI?

2•daemon_9009•8m ago•0 comments

Code-review-graph: persistent code graph that cuts Claude Code token usage

https://github.com/tirth8205/code-review-graph
1•tirthkanani•8m ago•1 comments

Latent Context Compilation: Distilling Long Context into Compact Portable Memory

https://arxiv.org/abs/2602.21221
1•PaulHoule•9m ago•0 comments

AluminatiAI – per-job GPU cost tracking (Nvidia-smi shows watts, not dollars)

1•AluminatiAi•9m ago•0 comments

Hono js

https://hono.dev/
2•dtj1123•9m ago•0 comments

Code-review-graph: persistent code graph that cuts Claude Code token usage

1•tirthkanani•10m ago•0 comments

Andrew Ng Just Dropped Context Hub – GitHub for AI Agent Knowledg

https://github.com/andrewyng/context-hub
2•v-mdev•11m ago•0 comments

Toni Schneider (New Bluesky CEO) - Coming Off the Bench for Bluesky

https://toni.org/2026/03/09/coming-off-the-bench-for-bluesky/
3•aghuang•11m ago•0 comments

Software Architecture in the Era of Agentic AI

https://www.exploravention.com/blogs/soft_arch_agentic_ai/
2•walterbell•12m ago•0 comments

An Economic Analysis of a Drug-Selling Gang's Finances [pdf]

https://pricetheory.uchicago.edu/levitt/Papers/LevittVenkateshAnEconomicAnalysis2000.pdf
1•paulpauper•13m ago•0 comments

Agent Session Kit (ASK) – Git guardrails for AI-assisted coding workflows

https://github.com/qarau/agent-session-kit
1•qarau•13m ago•2 comments

Teenagers report for duty as Croatia reinstates conscription

https://www.bbc.com/news/articles/c93j2l32lzgo
2•tartoran•14m ago•0 comments

Show HN: LocalConvert –browser-based file converter using ffmpeg.wasm no uploads

1•Gokul_Raj_R•14m ago•0 comments

Advice for (Berkeley) Ph. D. students in math (2013)

https://blogs.ams.org/mathgradblog/2013/06/25/advice-berkeley-ph-d-students-math-bjorn-poonen/
1•paulpauper•14m ago•0 comments

Billionaires are a danger to themselves and (especially) us

https://pluralistic.net/2026/03/09/autocrats-of-trade-2/
4•Refreeze5224•15m ago•0 comments

Show HN: SimpleStats – Server-side Laravel analytics, immune to ad blockers

https://simplestats.io/blog/server-side-analytics-laravel
1•Sairahcaz2k•15m ago•1 comments

They Solved AI Hallucinations

https://www.youtube.com/watch?v=1ONwQzauqkc
3•neilellis•15m ago•0 comments

Show HN: TV Next – the uncluttered TV Tracking app you've been looking for

1•dmehers•15m ago•0 comments