frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Canopy It's a fast rust CLI that prints directory trees

https://github.com/hnpf/canopy
1•virexdev•1h ago

Comments

virexdev•1h ago
FAQ

[?] why did you make this?

[!] i wanted a small, fast, rust-based tree-like tool that was actually fun to build and mess with. while working on it i hit a bunch of interesting challenges: ownership issues, error handling, unicode alignment, and even building a simple interactive terminal UI. this is mostly a hobby project, but i think it’s a nice little learning playground too.

[?] what makes it interesting?

[X] unicode tree drawing

[X] lining up box-drawing characters without breaking alignment on weird filenames was way harder than i expected.

i ended up manually building each “branch” and tracking whether a node was the last child so the vertical lines stop correctly.

[X] sorting, filtering, and recursion

combining recursion with sorting and filtering forced me to rethink my borrow/ownership approach. i rewrote the traversal several times before it felt clean.

[X] recursive by default.

handling deep directory trees and large file counts pushed me to keep everything efficient and avoid blocking the UI.

[X] error handling

dealing with unreadable directories, permission issues, and broken symlinks taught me a lot about thiserror / anyhow and why good context matters.

[X] interactive mode (TUI) making a “simple” TUI ended up being more work than adding features.

handling input, redraw logic, and state transitions was its own adventure.

[+] small code walkthrough;

[+] building the tree

build_tree() recursively walks the filesystem, filters entries, applies optional glob patterns, sorts everything, and decreases max_depth to control recursion. ownership gets tricky fast.

[+] printing trees

print_tree() handles branches, connectors, colors, and size info. getting the “last child” logic wrong instantly ruins the visuals.

[+] collapsing single-child directories collapse_tree() merges directories with only one child to keep the output clean. mutating the structure while recursing was its own headache.

[+] interactive TUI built using ratatui + crossterm. arrow keys move selection, enter opens files, backspace goes up. separating state (current_path, entries, selected) massively simplified things.

[?] how to try it head over to: https://github.com/hnpf/canopy

Arc Raiders Loot Cheat Sheet

https://arcraidersmap.pro/guides/arc-raiders-cheat-sheet
1•dond1986•1m ago•1 comments

After years of saying no, Tesla reportedly adding Apple CarPlay to its cars

https://arstechnica.com/cars/2025/11/after-years-of-saying-no-tesla-reportedly-adding-apple-carpl...
1•JumpCrisscross•1m ago•0 comments

Tesla Is Working to Add Apple CarPlay in Bid to Boost Vehicle Sales

https://www.bloomberg.com/news/articles/2025-11-13/tesla-is-working-to-add-apple-carplay-in-bid-t...
1•JumpCrisscross•1m ago•0 comments

LLM as a Resonance-Holographic Field of Meanings

https://habr.com/en/articles/961126/
1•jerlendds•1m ago•0 comments

Electric Vehicle Range Prediction Models: A Review

https://www.mdpi.com/2032-6653/16/11/607
1•PaulHoule•5m ago•0 comments

Build apps with any modality input, reasoning, and any modality

https://github.com/8090-inc/xrx-core
1•amitav1•7m ago•0 comments

'Tiny' AI model beats LLMs at logic test

https://www.nature.com/articles/d41586-025-03379-9
2•bookofjoe•9m ago•1 comments

Psychophysical Laws into Gear A New Approach to the Combination Problem

https://www.researchgate.net/publication/263491208_Kicking_the_Psychophysical_Laws_into_Gear_A_Ne...
1•jerlendds•11m ago•0 comments

Is Tesla about to surrender to Apple CarPlay

https://www.theverge.com/news/820065/tesla-apple-carplay-develop-phone-mirror
1•raw_anon_1111•12m ago•0 comments

UMAP Projections of Animals to 2D

https://duhaime.s3.amazonaws.com/apps/umap-zoo/index.html
1•abhgh•13m ago•0 comments

Archer to Turn Hawthorne Airport into 'Grand Central Station for Air Taxis'

https://www.flyingmag.com/archer-hawthorne-airport-air-taxi-hub/
1•jaredwiener•16m ago•0 comments

Scientists Reveal How the Maya Predicted Eclipses for Centuries

https://www.sciencealert.com/scientists-reveal-how-the-maya-predicted-eclipses-for-centuries
1•rguiscard•19m ago•0 comments

As Aquifers Dry Up, Tehran Rations Water and Calls for Rain Prayers

https://www.nytimes.com/2025/11/09/world/middleeast/iran-water-rationing-drought.html
1•bookofjoe•20m ago•1 comments

Tour of a pattern matcher: expression and pattern expansion

https://crumbles.blog/posts/2025-11-09-extensible-match-front-end.html
1•todsacerdoti•22m ago•0 comments

Upwork: Humans with AI Agents Outperform Solo Agents by 70 Percent

https://investors.upwork.com/news-releases/news-release-details/upwork-humanagent-productivity-in...
1•phyzix5761•26m ago•1 comments

US, Argentina Reach Deal to Open Markets on Key Goods

https://www.bloomberg.com/news/articles/2025-11-13/us-argentina-reach-deal-to-open-their-markets-...
2•wslh•27m ago•0 comments

Build and Launch an iOS App in a Day

https://www.swiftviews.app
1•ajagatobby•29m ago•3 comments

Apple Mini Apps Partner Program

https://developer.apple.com/programs/mini-apps-partner/
7•soheilpro•30m ago•1 comments

Understanding AI Fraud Detection and Prevention Strategies

https://www.digitalocean.com/resources/articles/ai-fraud-detection
1•teleforce•35m ago•0 comments

One Watt Amp That Changed the Industry [video]

https://www.youtube.com/watch?v=xp8GuSTo8Os
1•vgeek•35m ago•0 comments

OpenAI lost a court battle against the New York Times

https://www.businessinsider.com/openai-new-york-times-copyright-infringement-lawsuit-chatgpt-logs...
3•bbzjk7•36m ago•0 comments

Spectral rendering, part 2: Real-time rendering

https://momentsingraphics.de/SpectralRendering2Rendering.html
2•todsacerdoti•38m ago•0 comments

Europol takes down more than 1k malicious servers in Operation Endgame

https://www.scworld.com/news/europol-takes-down-more-than-1000-malicious-servers-in-operation-end...
1•Bender•40m ago•0 comments

Canonical expands total coverage for Ubuntu LTS releases to 15 years

https://ubuntu.com/blog/canonical-expands-total-coverage-for-ubuntu-lts-releases-to-15-years-with...
2•mobilio•44m ago•1 comments

Show HN: I'm a CEO Coding with AI – Here's the Air Quality iOS App I Built

4•ahaucnx•47m ago•2 comments

Reactorcore's Revshare System

https://reactorcoregames.github.io/Reactorcores-Revshare-System/
2•reactorcore3•48m ago•1 comments

Make the Web Human Again

https://random-blog.bearblog.dev/make-the-web-human-again/
1•cmmcmm•48m ago•0 comments

The Pursuit of Wonder

https://seths.blog/2025/11/the-pursuit-of-wonder/
1•herbertl•49m ago•0 comments

Moving V8 to only flat strings

https://docs.google.com/document/u/0/d/1mgeH9Kii0K09so4EReZUn6ua9efqRNA2ZaUfBQ-0z7c/mobilebasic
3•tambourine_man•50m ago•0 comments

Cisco's Intent to Acquire NeuralFabric

https://blogs.cisco.com/news/building-the-future-of-enterprise-ai-ciscos-intent-to-acquire-neural...
1•jimt1234•50m ago•0 comments