frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Show HN: MBCompass – Android Compass App

https://github.com/MubarakNative/MBCompass
17•nativeforks•53m ago•1 comments

Show HN: Moon Phase Algorithms for C, Lua, Awk, JavaScript, etc.

https://github.com/oliverkwebb/moonphase
12•oliverkwebb•5h ago•4 comments

Show HN: Agno – A full-stack framework for building Multi-Agent Systems

https://github.com/agno-agi/agno
4•bediashpreet•3h ago•0 comments

Show HN: A small library for stack-trace-like error messages in Rust

https://docs.rs/errors_with_context/latest/errors_with_context/
3•AnyTimeTraveler•2h ago•0 comments

Show HN: I built an AI Agent that uses the iPhone

https://github.com/rounak/PhoneAgent
3•rounak•2h ago•0 comments

Show HN: Patio – Rent tools, learn DIY, reduce waste

https://patio.so
221•GouacheApp•1d ago•145 comments

Show HN: A Implementation of Alpha Zero for Chess in MLX

https://github.com/koogle/mlx-playground/tree/main/chesszero
63•jakobfrick•3d ago•12 comments

Show HN: PunchCard Key Backup

https://github.com/volution/punchcard-key-backup
137•ciprian_craciun•1d ago•45 comments

Show HN: Open-source P2P file transfer

https://github.com/nihaocami/berb
44•goodpanda•1d ago•20 comments

Show HN: Fontofweb – Discover Fonts Used on a Website or Websites Using Font(s)

https://fontofweb.com
63•sim04ful•1d ago•23 comments

Show HN: You2Aanki – Turn Videos into Anki Vocabulary Flashcards

https://you2anki.com/
5•isege•9h ago•3 comments

Show HN: SoloDB – A document database build on top of SQLite with JSONB

https://github.com/Unconcurrent/SoloDB
19•falsename•1d ago•5 comments

Show HN: AI Peer Reviewer – Multiagent system for scientific manuscript analysis

https://github.com/robertjakob/rigorous
107•rjakob•1d ago•86 comments

Show HN: I built an AI agent that turns ROS 2's turtlesim into a digital artist

https://github.com/Yutarop/turtlesim_agent
30•ponta17•1d ago•9 comments

Show HN: Onlook – Open-source, visual-first Cursor for designers

https://github.com/onlook-dev/onlook
222•hoakiet98•3d ago•82 comments

Show HN: Asdf Overlay – High performance in-game overlay library for Windows

https://github.com/storycraft/asdf-overlay
76•storycraft•2d ago•17 comments

Show HN: Smart Silence – Remind your iPhone to stay quiet in quiet places

https://testflight.apple.com/join/47CJ31VK
54•ebagsnave•4d ago•37 comments

Show HN: Icepi Zero – The FPGA Raspberry Pi Zero Equivalent

https://github.com/cheyao/icepi-zero
230•Cyao•4d ago•51 comments

Show HN: MCP Server SDK in Bash

https://github.com/muthuishere/mcp-server-bash-sdk
142•muthuishere•3d ago•36 comments

Show HN: Git-Add–Interactive with Enhancements

https://github.com/cwarden/git-add-interactive
73•xn•2d ago•36 comments

Show HN: W++ – A Python-style scripting language for .NET with NuGet support

https://github.com/sinisterMage/WPlusPlus
94•sinisterMage•2d ago•50 comments

Show HN: A site for YC rejection stories

https://ycrejection.com/
15•khalilosman123•1d ago•10 comments

Show HN: Lazy Tetris

https://lazytetris.com/
433•admtal•6d ago•148 comments

Show HN: Discordz – A simple Discord server directory

https://discordz.com
7•cuplis•21h ago•2 comments

Show HN: PgDog – Shard Postgres without extensions

https://github.com/pgdogdev/pgdog
307•levkk•6d ago•80 comments

Show HN: I wrote a modern Command Line Handbook

https://commandline.stribny.name/
443•petr25102018•3d ago•108 comments

Show HN: Donut Browser, a Browser Orchestrator

https://donutbrowser.com/
88•andrewzeno•3d ago•39 comments

Show HN: I made a Zero-config tool to visualize your code

https://staying.fun/en
134•lezhu•3d ago•46 comments

Show HN: An open-source megarepo turning hackers into frontier AI researchers

https://github.com/tanishqkumar/beyond-nanogpt
3•fizzbuzz07•17h ago•0 comments

Show HN: A new programming language inspired by Go, no LLVM

https://github.com/nature-lang/nature
79•hualaka•3d ago•88 comments
Open in hackernews

Show HN: Git-Add–Interactive with Enhancements

https://github.com/cwarden/git-add-interactive
73•xn•2d ago
I created a replacement for the perl git-add--interactive that adds a few enhancements:

- S to automatically split all hunks

- G to set a global filter on hunks to show

- A to automatically accept all hunks (after auto-splitting and global filter are applied)

Comments

Ayesh•2d ago
Congratulations on publishing this. I use `git add -p` quite a lot, and this project looks interesting!

I knew that you could place a `git-xyz` executable and you can call it as `git xyz`. I didn't know you could do it with flags !?!

A small video or some screenshots would help a lot. If you can record interactivity with ascii-cinema, that will be even better.

zacharytamas•2d ago
Since the OP is familiar with the Go ecosystem, they could probably use vhs[1] easily to programmatically create an interactive demo GIF. That has worked very well for me in the past.

[1]: https://github.com/charmbracelet/vhs

xn•2d ago
Good thinking. I added a vhs tape: https://github.com/cwarden/git-add--interactive/blob/main/RE...
xn•2d ago
Good idea. I'll try to throw something together.
sevg•2d ago
This looks neat!

I think it’ll fit nicely alongside scmpuff which I’ve been using for years (and at this point refuse to ever give it up): https://github.com/mroth/scmpuff

wapeoifjaweofji•2d ago
I've used `tig` for this sort of thing for well over a decade. `tig status` lets you see all files, interactively add things, whatever.
foobarbaz33•2d ago
Another tig user! Proof there are 1's of us out there.
29athrowaway•2d ago
I have been using tig for years. Great software
zacharytamas•2d ago
I always love to see these little git extensions. For anyone else interested in this stuff, here are some others I like:

lazygit (of course): https://github.com/jesseduffield/lazygit

git-machete: https://github.com/VirtusLab/git-machete

rebase-editor: https://github.com/sjurba/rebase-editor

G1N•2d ago
Been looking for something like git machete for the longest time, thanks for sharing!
lucasoshiro•2d ago
Question: why not send this to the Git mailing list, and hopefully get this in upstream?
xn•2d ago
After banging on it a bit more, yes, it would be nice to replace the upstream version.
lucasoshiro•2d ago
Nice!
williamdclt•2d ago
I don’t think the Git maintainers will consider adding Go as a dependency and having commands in a new language.

Or at least, it would require first a massive effort to align the maintainers on the idea of a new language, like Rust in the Linux kernel

xn•2d ago
I updated my calendar to revisit in 2045.
lucasoshiro•2d ago
> I don’t think the Git maintainers will consider adding Go as a dependency

Just re-write in C

williamdclt•2d ago
This "just" carries a lot of weight.

And that's probably not enough: for example likely you'd need to reuse whatever Git uses to generates patch formats. It's not necessarily _hard_, but it's not "just" a language translation.

derintegrative•2d ago
"Just"
xn•2d ago
Maybe someone will create modernperl, à la modernc, to automatically port go to perl.
imiric•2d ago
Or just improve the Perl version? There's no reason this needs to be written in Go.
jdlyga•2d ago
It would be nice if this had the same interface for `git add -i` allowing you to type in numbers or letters.

** Commands **

  1: status   2: update   3: revert   4: add untracked

  5: patch   6: diff   7: quit   8: help
What now>

This allows you to either type in (p) or (5) to go into patch mode.

xn•2d ago
Thanks for the feedback. The latest version improves compatiblity with the perl version: https://github.com/cwarden/git-add--interactive/releases/tag...
jasonjmcghee•2d ago
I'm a serial "git add -p" user. (Micro-review before every commit is super healthy imo).

I made an alias a while ago I use frequently:

    af       => !f() { git add -p $(git diff --name-only | fzf); }; f

When you have a large diff, it's get unruly quickly to "add -p".

This just prompts you with a fuzzy find of the files that have changed and you can just pick one to go through the "add -p" process for that file.

For the terminal averse, IDEs usually have "jump to next change" and a tab for the changed files that can achieve the same.

Night_Thastus•2d ago
I used to do patch operations and hunk-editing for everything and really enjoyed it. It definitely helps to put a fresh view on the code and see anything missed.

Eventually I moved on to going line-by-line with a GUI tool. In my case Git-cola, but I'm not positive I'd recommend it because it's quite slow on Windows.

h1fra•2d ago
same I just wish it would split things even more by default
muxxa•2d ago
My 2c: I'd like to see git add interactive go through the hunks in order of most recent first!
yencabulator•1d ago
How do you define hunk recency when comparing a staged file vs file on disk?
treve•2d ago
The one feature I would love to see and would be an instant-install, is a command that lets me revert a hunk back. It would be nice to be able to wipe out some dangling console.log() statements as I go through the changes.
strogonoff•2d ago
I used to hate leaving Vim for Git’s interactive staging mode or some separate GUI to pick apart a hairy set of changes. As a result I usually tried to avoid these messy situations.

Then I discovered Vim fugitive. It allows to go through the diff and stage chunks so intuitively, it changed the way I work. Just j/k to move around, = to expand file, s to stage selection, c to commit. The process of reviewing changes became very natural and actually enjoyable. I like the feeling of control it gives and how it makes focused commits painless while not disrupting the flow.

kccqzy•2d ago
And if you use magit for Emacs, it's also extremely easy to stage hunks selectively and easily: s to stage, cc to commit staged, ca to amend with staged, etc. This is the way: don't use the git CLI. Use your editor.
pi-rat•2d ago
Frankly, it’s so good I use emacs just for git even when coding in other editors.
p_wood•2d ago
I like the idea of 'G' to filter hunks. The perl script does not exist since git v2.40.0 so I don't think the installation instructions work for recent versions of git as there is no way to stop 'git add -p' from running the builtin version. I see this is MIT licenced but the code is very closely based on the perl script which is licensed under the GPLv2.
xn•2d ago
huh. I guess this is a prototype for features that will have be submitted to the upstream version. There was a feature in development for something like `git add -G <regex>`, maybe a decade ago, that never got completed.

As for licensing, I'm happy to change the license. I have no strong feelings on the subject, and don't know what restrictions GPLv2 imposes on a port to another language.

loevborg•2d ago
This is my favorite alias:

    i = !git add -N . && git add -p
`git i` lets you interactively add new files as well as existing ones
areusch•2d ago
the thing i really wish existed was git add -p mode that automatically segmented unstaged changes into a series of fixups based on the blame of the surrounding area that changed. this wouldn't work in all cases, but in many cases, i've made a series of 3-4 clearly-separable changes, i then go and make fixes on top of all of them, and now i want to fixup each change.
imiric•2d ago
Have you taken a look at git-absorb[1]?

It often did the wrong thing IME, but YMMV.

[1]: https://github.com/tummychow/git-absorb