frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

I went back to Linux and it was a mistake

https://www.theverge.com/report/875077/linux-was-a-mistake
1•timpera•27s ago•1 comments

Octrafic – open-source AI-assisted API testing from the CLI

https://github.com/Octrafic/octrafic-cli
1•mbadyl•1m ago•1 comments

US Accuses China of Secret Nuclear Testing

https://www.reuters.com/world/china/trump-has-been-clear-wanting-new-nuclear-arms-control-treaty-...
1•jandrewrogers•2m ago•0 comments

Peacock. A New Programming Language

1•hashhooshy•7m ago•1 comments

A postcard arrived: 'If you're reading this I'm dead, and I really liked you'

https://www.washingtonpost.com/lifestyle/2026/02/07/postcard-death-teacher-glickman/
2•bookofjoe•8m ago•1 comments

What to know about the software selloff

https://www.morningstar.com/markets/what-know-about-software-stock-selloff
2•RickJWagner•12m ago•0 comments

Show HN: Syntux – generative UI for websites, not agents

https://www.getsyntux.com/
3•Goose78•13m ago•0 comments

Microsoft appointed a quality czar. He has no direct reports and no budget

https://jpcaparas.medium.com/ab75cef97954
2•birdculture•13m ago•0 comments

AI overlay that reads anything on your screen (invisible to screen capture)

https://lowlighter.app/
1•andylytic•14m ago•1 comments

Show HN: Seafloor, be up and running with OpenClaw in 20 seconds

https://seafloor.bot/
1•k0mplex•14m ago•0 comments

Tesla turbine-inspired structure generates electricity using compressed air

https://techxplore.com/news/2026-01-tesla-turbine-generates-electricity-compressed.html
2•PaulHoule•16m ago•0 comments

State Department deleting 17 years of tweets (2009-2025); preservation needed

https://www.npr.org/2026/02/07/nx-s1-5704785/state-department-trump-posts-x
2•sleazylice•16m ago•1 comments

Learning to code, or building side projects with AI help, this one's for you

https://codeslick.dev/learn
1•vitorlourenco•16m ago•0 comments

Effulgence RPG Engine [video]

https://www.youtube.com/watch?v=xFQOUe9S7dU
1•msuniverse2026•18m ago•0 comments

Five disciplines discovered the same math independently – none of them knew

https://freethemath.org
4•energyscholar•18m ago•1 comments

We Scanned an AI Assistant for Security Issues: 12,465 Vulnerabilities

https://codeslick.dev/blog/openclaw-security-audit
1•vitorlourenco•19m ago•0 comments

Amazon no longer defend cloud customers against video patent infringement claims

https://ipfray.com/amazon-no-longer-defends-cloud-customers-against-video-patent-infringement-cla...
2•ffworld•20m ago•0 comments

Show HN: Medinilla – an OCPP compliant .NET back end (partially done)

https://github.com/eliodecolli/Medinilla
2•rhcm•23m ago•0 comments

How Does AI Distribute the Pie? Large Language Models and the Ultimatum Game

https://papers.ssrn.com/sol3/papers.cfm?abstract_id=6157066
1•dkga•23m ago•1 comments

Resistance Infrastructure

https://www.profgalloway.com/resistance-infrastructure/
3•samizdis•28m ago•1 comments

Fire-juggling unicyclist caught performing on crossing

https://news.sky.com/story/fire-juggling-unicyclist-caught-performing-on-crossing-13504459
1•austinallegro•28m ago•0 comments

Restoring a lost 1981 Unix roguelike (protoHack) and preserving Hack 1.0.3

https://github.com/Critlist/protoHack
2•Critlist•30m ago•0 comments

GPS and Time Dilation – Special and General Relativity

https://philosophersview.com/gps-and-time-dilation/
1•mistyvales•33m ago•0 comments

Show HN: Witnessd – Prove human authorship via hardware-bound jitter seals

https://github.com/writerslogic/witnessd
1•davidcondrey•33m ago•1 comments

Show HN: I built a clawdbot that texts like your crush

https://14.israelfirew.co
2•IsruAlpha•35m ago•2 comments

Scientists reverse Alzheimer's in mice and restore memory (2025)

https://www.sciencedaily.com/releases/2025/12/251224032354.htm
2•walterbell•38m ago•0 comments

Compiling Prolog to Forth [pdf]

https://vfxforth.com/flag/jfar/vol4/no4/article4.pdf
1•todsacerdoti•40m ago•0 comments

Show HN: Cymatica – an experimental, meditative audiovisual app

https://apps.apple.com/us/app/cymatica-sounds-visualizer/id6748863721
1•_august•41m ago•0 comments

GitBlack: Tracing America's Foundation

https://gitblack.vercel.app/
12•martialg•41m ago•1 comments

Horizon-LM: A RAM-Centric Architecture for LLM Training

https://arxiv.org/abs/2602.04816
1•chrsw•41m ago•0 comments
Open in hackernews

Ask HN: Can recursion be more useful than regular loops?

5•DenisDolya•2mo ago

Comments

rossdavidh•2mo ago
The times I've found it useful are for walking org charts or file folders, which are of unknown depth and match neatly into a recursive approach.
ArtRasel•2mo ago
Main Folder/ ├── Subfolder 1/ │ ├── File A │ └── Subfolder 1.1/ │ └── File B └── Subfolder 2/ └── File C
ArtRasel•2mo ago
Recursion vs Loops - Android Development Perspective

In Android development, both have their places, but recursion shines in specific scenarios:

Where recursion works better: • File System Traversal - Scanning nested app directories and external storage • View Hierarchy Processing - Traversing through complex ViewGroup structures • JSON/XML Parsing - Handling nested data structures from API responses

Practical Android Example: fun findAllImageFiles(dir: File): List<File> { val imageFiles = mutableListOf<File>() dir.listFiles()?.forEach { file -> if (file.isDirectory) { imageFiles.addAll(findAllImageFiles(file)) // Recursion } else if (file.isImageFile()) { imageFiles.add(file) } } return imageFiles }

When to prefer loops: • Performance-critical tasks (avoid StackOverflowError) • Simple iterations with known depth • Memory-constrained environments

Key Insight: Recursion provides cleaner code for tree-like structures, while loops are better for linear tasks. Choose based on data structure complexity rather than personal preference.

ArtRasel•2mo ago
fun findAllImageFiles(dir: File): List<File> { val imageFiles = mutableListOf<File>() dir.listFiles()?.forEach { file -> if (file.isDirectory) { imageFiles.addAll(findAllImageFiles(file)) // } else if (file.isImageFile()) { imageFiles.add(file) } } return imageFiles }
btilly•2mo ago
It depends on what you consider "more useful".

First, anything that you can do with recursion, you can do without. This is trivially obvious to anyone who knows that any Turing complete language can simulate any other, and therefore there is an equivalence of what they can do. And this is demonstrated in practice when you consider that every language with recursion, is ultimately implemented in machine language. Which doesn't have recursion.

That said, the concept of recursion can allow us to think about and solve problems that we would otherwise find challenging to think about. This is fundamental to how programming works. We build abstractions on top of lower primitives. These abstractions then make it easier to think about and solve our problems. We could have done the same thing without the abstraction. But it would have taken more work, and it would be harder for us to keep that well-organized.

The widespread popularity of languages with recursion demonstrates that it is a useful abstraction.

But let's pull back the curtain. What recursion does for us is allow us to organize our computation using the call stack. What we do implicitly using the call stack, can always be done instead using an explicit stack. The code looks different, but is actually equivalent.

The value of knowing how to do that is that we then can ask what happens if we choose to replace the stack with something else. For this example, let's add a caching layer on top of the recursion. This gives us a top-down dynamic programming algorithm. It is doing a depth-first search. If we replace the stack with a queue, we get a breadth-first search. If we replace it with the right priority queue instead, we get an A*-search. If we go back to the breadth-first search and optimize to throw away data as soon as we are done with it, we can get a bottom-up dynamic programming algorithm.

Therefore recursion is absolutely a valuable tool in your mental toolbox. But it becomes even more powerful if you know how to implement it with loops, and then know how to manipulate that, we can get a whole set of powerful tools that recursion alone does not give you.