frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Show HN: LocalGPT – A local-first AI assistant in Rust with persistent memory

https://github.com/localgpt-app/localgpt
193•yi_wang•6h ago•70 comments

Haskell for all: Beyond agentic coding

https://haskellforall.com/2026/02/beyond-agentic-coding
91•RebelPotato•6h ago•23 comments

SectorC: A C Compiler in 512 bytes (2023)

https://xorvoid.com/sectorc.html
283•valyala•14h ago•55 comments

Software factories and the agentic moment

https://factory.strongdm.ai/
221•mellosouls•17h ago•377 comments

LLMs as the new high level language

https://federicopereiro.com/llm-high/
89•swah•4d ago•164 comments

The Architecture of Open Source Applications (Volume 1) Berkeley DB

https://aosabook.org/en/v1/bdb.html
21•grep_it•5d ago•1 comments

Speed up responses with fast mode

https://code.claude.com/docs/en/fast-mode
177•surprisetalk•14h ago•175 comments

Roger Ebert Reviews "The Shawshank Redemption"

https://www.rogerebert.com/reviews/great-movie-the-shawshank-redemption-1994
8•monero-xmr•2h ago•0 comments

Hoot: Scheme on WebAssembly

https://www.spritely.institute/hoot/
188•AlexeyBrin•20h ago•36 comments

LineageOS 23.2

https://lineageos.org/Changelog-31/
27•pentagrama•2h ago•3 comments

Brookhaven Lab's RHIC concludes 25-year run with final collisions

https://www.hpcwire.com/off-the-wire/brookhaven-labs-rhic-concludes-25-year-run-with-final-collis...
79•gnufx•13h ago•61 comments

Stories from 25 Years of Software Development

https://susam.net/twenty-five-years-of-computing.html
188•vinhnx•17h ago•18 comments

Vocal Guide – belt sing without killing yourself

https://jesperordrup.github.io/vocal-guide/
350•jesperordrup•1d ago•104 comments

Substack confirms data breach affects users’ email addresses and phone numbers

https://techcrunch.com/2026/02/05/substack-confirms-data-breach-affecting-email-addresses-and-pho...
44•witnessme•3h ago•13 comments

Wood Gas Vehicles: Firewood in the Fuel Tank (2010)

https://solar.lowtechmagazine.com/2010/01/wood-gas-vehicles-firewood-in-the-fuel-tank/
42•Rygian•2d ago•16 comments

Show HN: I saw this cool navigation reveal, so I made a simple HTML+CSS version

https://github.com/Momciloo/fun-with-clip-path
96•momciloo•14h ago•22 comments

First Proof

https://arxiv.org/abs/2602.05192
141•samasblack•16h ago•83 comments

uLauncher

https://github.com/jrpie/launcher
15•dtj1123•4d ago•0 comments

Start all of your commands with a comma (2009)

https://rhodesmill.org/brandon/2009/commands-with-comma/
599•theblazehen•3d ago•217 comments

Al Lowe on model trains, funny deaths and working with Disney

https://spillhistorie.no/2026/02/06/interview-with-sierra-veteran-al-lowe/
111•thelok•16h ago•24 comments

Vouch

https://twitter.com/mitchellh/status/2020252149117313349
95•chwtutha•5h ago•26 comments

Show HN: A luma dependent chroma compression algorithm (image compression)

https://www.bitsnbites.eu/a-spatial-domain-variable-block-size-luma-dependent-chroma-compression-...
42•mbitsnbites•3d ago•6 comments

The AI boom is causing shortages everywhere else

https://www.washingtonpost.com/technology/2026/02/07/ai-spending-economy-shortages/
330•1vuio0pswjnm7•21h ago•538 comments

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

https://openciv3.org/
912•klaussilveira•1d ago•277 comments

FDA intends to take action against non-FDA-approved GLP-1 drugs

https://www.fda.gov/news-events/press-announcements/fda-intends-take-action-against-non-fda-appro...
121•randycupertino•9h ago•247 comments

The Scriptovision Super Micro Script video titler is almost a home computer

http://oldvcr.blogspot.com/2026/02/the-scriptovision-super-micro-script.html
8•todsacerdoti•6h ago•1 comments

The world heard JD Vance being booed at the Olympics. Except for viewers in USA

https://www.theguardian.com/sport/2026/feb/07/jd-vance-boos-winter-olympics
127•treetalker•1h ago•32 comments

Where did all the starships go?

https://www.datawrapper.de/blog/science-fiction-decline
172•speckx•4d ago•256 comments

Selection rather than prediction

https://voratiq.com/blog/selection-rather-than-prediction/
37•languid-photic•4d ago•20 comments

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

https://github.com/valdanylchuk/breezydemo
307•isitcontent•1d ago•39 comments
Open in hackernews

Iterative DFS with stack-based graph traversal (2024)

https://dwf.dev/blog/2024/09/23/2024/dfs-iterative-stack-based
39•cpp_frog•5mo ago

Comments

ad-astra•5mo ago
Thanks for sharing! I had come across similar kinds of issues on my annual LeetCode prep and this very clear articulation is very helpful. Props to the author for making this so easy to visualize.
dinobones•5mo ago
I’m surprised this isn’t a more common and well known issue.

I stumbled upon this issue when trying to convert a recursive DFS to iterative because my recursive DFS was running out of stack space.

The solution produced by this iterative version was wrong, completely different from the recursive implementation.

It’s fascinating how many primitive, basic algorithms are probably implemented incorrectly but work just well enough that no one ever cares or notices… reminds me of how so many text books have an incorrect or overflowing version of binary search.

pss314•5mo ago
reminds me of how so many text books have an incorrect or overflowing version of binary search.

Extra, Extra - Read All About It: Nearly All Binary Searches and Mergesorts are Broken https://research.google/blog/extra-extra-read-all-about-it-n...

imtringued•5mo ago
Why would it be a common issue?

People usually implement graph traversal first and only after that do they choose a FIFO queue for BFS or a stack for DFS as their data structure.

almostgotcaught•5mo ago
This is already the standard stack based DFS?

  def dfs(graph, source):
    n = len(graph)
    visited = set()
    stack = [source]
    
    while stack:
      node = stack.pop()
      if node in visited:
        continue 
      visited.add(node)
      for nbr in graph[node]:
        stack.append(nbr)
So I don't know what all the confusion is about...
nicoty•5mo ago
I implemented an iterative, stack-based DFS iterator in JS last year for a project that I didn't end up using it on. Maybe someone else can find some use of it: https://gist.github.com/nothingnesses/5f974a43a2da5d1d8a6b9c...
quibono•5mo ago
So... am I misunderstanding or is it enough to swap the iteration over the neighbours of a node and the visited check?

          for nbr in graph[node]:
            if not visited[nbr]:
into

          if node in visited: continue
          visited.add(node)
          for nbr in graph[node]:
              stack.append(nbr)
DannyBee•5mo ago
It should be enough :)
DannyBee•5mo ago
One thing to keep in mind (which the original cited article in this article gets right, but this article gets wrong) - there is no guarnateed unique ordering of children visitation for nodes with >1 child. The parts they copy from the original article talk about this correctly, the parts they didn't, don't :)

The DFS orderings where the children visitation is swapped, etc, are all still equally correct and valid. That is - a DFS algorithm that randomized the children order is still valid.

IE for example, if you change the "for nbr in graph[node]" line to "for nbr in reversed(sorted(graph[node]))", the resulting DFS ordering is still valid and correct.

If you want them in a specific ordering, you'd usually have to force them into it in the algorithm. It rarely makes sense to try to force the structure to be ordered (as they do here) for the algorithm.

This often hits people who use graphs with pointers, or multiple threads, or ...