News for hackers. Stuff that matters.
Re:Show HN: CLI plain-text notes & bookmarks with Git, sync,... by maxioatic on Wednesday October 07, 2020 @12:49PM (#24710094)
This looks super cool and polished.

That it's a 11401 line shell script is blowing my mind.

Re:Show HN: CLI plain-text notes & bookmarks with Git, sync,... by pantulis on Wednesday October 07, 2020 @12:53PM (#24710138)
The completeness of the tool combined with the madness of shell scripting. The author is a demigod, no doubt.
Re:Show HN: CLI plain-text notes & bookmarks with Git, sync,... by maxioatic on Wednesday October 07, 2020 @01:20PM (#24710469)
A shelligod, for sure
Re:Show HN: CLI plain-text notes & bookmarks with Git, sync,... by bachmeier on Wednesday October 07, 2020 @02:57PM (#24711413)
Everyone should use the language of their choice. That said, looking over the code, I understand why Perl became popular as a shell replacement.
Re:Show HN: CLI plain-text notes & bookmarks with Git, sync,... by heresie-dabord on Thursday October 08, 2020 @04:00AM (#24716962)
> Everyone should use the language of their choice.

We live in a fruitful age for programming. There are many viable languages. Some have notation that is more difficult, perhaps, but humans are good at notation and there is no such thing as "easy" programming.

That said, any language that offers portability and stability that can be measured in _decades_ has a distinct advantage.

Re:Show HN: CLI plain-text notes & bookmarks with Git, sync,... by dmd on Wednesday October 07, 2020 @03:17PM (#24711628)
I hate to be critical of what's a rather impressive piece of work, but a lot of the reason for that length is just a lot of repetition, e.g. https://github.com/xwmx/nb/blob/master/nb#L10423
Re:Show HN: CLI plain-text notes & bookmarks with Git, sync,... by xwmx on Wednesday October 07, 2020 @03:35PM (#24711830)
That particular function, `nb show`, is a big `if` statement checking the file type and environment for available tools. I'm more than happy for suggestions and / or pull requests for optimizing that.

Note that Bash is a weird language that doesn't provide language features found in normal languages, and this targets old Bash which doesn't even have associative arrays, so there are things that might look "wrong", but aren't necessarily in this context. That's a big part of what makes it interesting to code in.

Re:Show HN: CLI plain-text notes & bookmarks with Git, sync,... by pantulis on Thursday October 08, 2020 @03:04AM (#24716634)
Why did you decide to go with Bash instead of another scripting language like Python or Ruby? Portability? "Just because"?

I am not bashing Bash ;) but genuinously interested in the motivations as a programmer. You have stated that the Bash shortcomings are "interesting", so I guess it boils down to some kind of "who cares, let's do it with Bash".

I tried nb yesterday and damn if it had a native capture tool for macOS and iOS this would be the perfect Evernote replacement for me.

Re:Show HN: CLI plain-text notes & bookmarks with Git, sync,... by xwmx on Thursday October 08, 2020 @11:46AM (#24720223)
Portability, philosophy, style. I find that designing within constraints can lead to interesting solutions, and this project has focused on embracing and leveraging the command line interface itself.