frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

OpenCiv3: Open-source, cross-platform reimagining of Civilization III

https://openciv3.org/
418•klaussilveira•5h ago•94 comments

The Waymo World Model

https://waymo.com/blog/2026/02/the-waymo-world-model-a-new-frontier-for-autonomous-driving-simula...
770•xnx•11h ago•465 comments

Show HN: Look Ma, No Linux: Shell, App Installer, Vi, Cc on ESP32-S3 / BreezyBox

https://github.com/valdanylchuk/breezydemo
137•isitcontent•5h ago•15 comments

Monty: A minimal, secure Python interpreter written in Rust for use by AI

https://github.com/pydantic/monty
131•dmpetrov•6h ago•54 comments

Dark Alley Mathematics

https://blog.szczepan.org/blog/three-points/
37•quibono•4d ago•2 comments

Show HN: I spent 4 years building a UI design tool with only the features I use

https://vecti.com
241•vecti•8h ago•116 comments

A century of hair samples proves leaded gas ban worked

https://arstechnica.com/science/2026/02/a-century-of-hair-samples-proves-leaded-gas-ban-worked/
63•jnord•3d ago•4 comments

Microsoft open-sources LiteBox, a security-focused library OS

https://github.com/microsoft/litebox
309•aktau•12h ago•153 comments

Sheldon Brown's Bicycle Technical Info

https://www.sheldonbrown.com/
309•ostacke•11h ago•84 comments

Show HN: If you lose your memory, how to regain access to your computer?

https://eljojo.github.io/rememory/
168•eljojo•8h ago•124 comments

Why I Joined OpenAI

https://www.brendangregg.com/blog/2026-02-07/why-i-joined-openai.html
38•SerCe•1h ago•34 comments

Hackers (1995) Animated Experience

https://hackers-1995.vercel.app/
391•todsacerdoti•13h ago•217 comments

An Update on Heroku

https://www.heroku.com/blog/an-update-on-heroku/
314•lstoll•12h ago•230 comments

Show HN: R3forth, a ColorForth-inspired language with a tiny VM

https://github.com/phreda4/r3
48•phreda4•5h ago•8 comments

I spent 5 years in DevOps – Solutions engineering gave me what I was missing

https://infisical.com/blog/devops-to-solutions-engineering
107•vmatsiiako•10h ago•34 comments

How to effectively write quality code with AI

https://heidenstedt.org/posts/2026/how-to-effectively-write-quality-code-with-ai/
181•i5heu•8h ago•128 comments

Understanding Neural Network, Visually

https://visualrambling.space/neural-network/
233•surprisetalk•3d ago•30 comments

Introducing the Developer Knowledge API and MCP Server

https://developers.googleblog.com/introducing-the-developer-knowledge-api-and-mcp-server/
14•gfortaine•3h ago•0 comments

I now assume that all ads on Apple news are scams

https://kirkville.com/i-now-assume-that-all-ads-on-apple-news-are-scams/
971•cdrnsf•15h ago•414 comments

Learning from context is harder than we thought

https://hy.tencent.com/research/100025?langVersion=en
141•limoce•3d ago•79 comments

FORTH? Really!?

https://rescrv.net/w/2026/02/06/associative
40•rescrv•13h ago•17 comments

PC Floppy Copy Protection: Vault Prolok

https://martypc.blogspot.com/2024/09/pc-floppy-copy-protection-vault-prolok.html
8•kmm•4d ago•0 comments

I'm going to cure my girlfriend's brain tumor

https://andrewjrod.substack.com/p/im-going-to-cure-my-girlfriends-brain
42•ray__•2h ago•11 comments

Evaluating and mitigating the growing risk of LLM-discovered 0-days

https://red.anthropic.com/2026/zero-days/
34•lebovic•1d ago•11 comments

Show HN: Smooth CLI – Token-efficient browser for AI agents

https://docs.smooth.sh/cli/overview
76•antves•1d ago•57 comments

The Oklahoma Architect Who Turned Kitsch into Art

https://www.bloomberg.com/news/features/2026-01-31/oklahoma-architect-bruce-goff-s-wild-home-desi...
18•MarlonPro•3d ago•4 comments

Show HN: Slack CLI for Agents

https://github.com/stablyai/agent-slack
38•nwparker•1d ago•9 comments

Claude Composer

https://www.josh.ing/blog/claude-composer
102•coloneltcb•2d ago•69 comments

How virtual textures work

https://www.shlom.dev/articles/how-virtual-textures-really-work/
25•betamark•12h ago•23 comments

Planetary Roller Screws

https://www.humanityslastmachine.com/#planetary-roller-screws
36•everlier•3d ago•8 comments
Open in hackernews

Pure vs. Impure Iterators in Go

https://jub0bs.com/posts/2025-05-29-pure-vs-impure-iterators-in-go/
45•ingve•8mo ago

Comments

tapirl•8mo ago
Be careful there are bugs and design flaws in Go iterators: https://go101.org/blog/2025-03-15-some-facts-about-iterators...
jub0bs•8mo ago
Your post does show that iterators are somewhat of a leaky abstraction, but I'm not sure I would go as far as calling some of their infelicities "bugs". Whether those infelicities matter in practice is a moot point.
tapirl•8mo ago
The bug is confirmed: https://github.com/golang/go/issues/71685
jub0bs•8mo ago
Ok, that is annoying. I hope it gets fixed soon.
euroderf•8mo ago
Great! How about iterators on trees ? Multiple options to provide.
pansa2•8mo ago
> Most iterators provide the ability to walk an entire sequence [...] Calling the iterator again walks the sequence again.

> "Single-use iterators" break that convention, providing the ability to walk a sequence only once.

This seems similar to the difference between an "iterable" and an "iterator" in Python (and between `IEnumerable` and `IEnumerator` in C#).

A Python list `l = [1, 2, 3]` is an iterable, and you can do `for v in l: print(v)` multiple times. But `iter(l)` is an iterator and `for v in i: print(v)` will only work once.

catlifeonmars•8mo ago
This is the same in JavaScript. There is “pure” Iterable protocol which produces an “impure” Iterator. Interestingly , for loops in JavaScript do not work directly with Iterators; to use in a for loop you must wrap an Iterator in an Iterable
codr7•8mo ago
Java is the same if I remember correctly, always felt like a design failure to me.
masklinn•8mo ago
It's especially dumb for Java, because Iterator could just have been a subtype of Iterable. That's basically what Python does, the iterator protocol requires also being an iterable[0]. And Rust just blanket implements IntoIterator for every Iterator without asking.

At least it's pretty easy to wrap an iterator in JS:

  {[Symbol.iterator]: () => it}
[0] which in the rare case you implement an iterator entirely by hand will be a trivial `return self`, so much so that `collection.abc.Iterator` just provides that)
masklinn•8mo ago
It's more between repeatable iterables and one-shot iterables (of which iterators are a subset, as iterators are iterable). For instance a file is an iterable, but (unless it's seekable and you rewind it) it'll only let you iterate once.

Basically what Go calls an iterator most other language call an iterable. Because it uses internal iteration, Go doesn't hand out iterators (save through iter.Pull).

catlifeonmars•8mo ago
- My initial thought is that the performance implication (e.g. escaping to the heap) of impure iterators is an implementation detail and seems like a good candidate for a future compiler optimization.

- impure iterators are strictly more powerful than pure iterators in that they can be resumed but do not have to be. If I wanted to pick one pattern for consistent behavior across all iterators it would be this one.

gregwebs•8mo ago
Not all impure iterators can be resumed. But any pure iterator can be converted to a resumable iterator with a generic conversion function.
catlifeonmars•8mo ago
> any pure iterator can be converted to a resumable iterator with a generic conversion function.

Makes sense

> Not all impure iterators can be resumed

How do you mean? In my head resuming an iterator is just partially unrolling a loop.

nine_k•8mo ago
An impure iterator can panic, so you can't resume?
shubhjain•8mo ago
Are the wordings "pure" vs "impure" suitable here, or should it have been "stateless" vs "stateful"?
jub0bs•8mo ago
"Stateless" does not seem as strong as "pure", and purity is what I'm after. What about an iterator that maintains no state but prints to the screen? You could describe it as a "stateless", but not as "pure".