Ask HN: What are some amazing open source projects that you have found recently?

88 points by startupflix ↗ HN

45 comments

[ 2.1 ms ] story [ 106 ms ] thread
Nvc, a vhdl simulator written in C.

I can't wait to spend some time with it, and dream of throwing Modelsim/Questasim in the trash.

I love iVerilog, so I sure hope this is developed enough before I'm forced to use VHDL for a project.
Valhalla is an open-source routing engine, like for from traveling from point A to point B. I think Tesla uses it as the basis for their in-car navigation system. It produces routes very quickly and has a pretty robust costing model (cars can travel on different roads from bikes, bikes can travel different places than pedestrians, right turns are easier than left turns, sharp left turns are worse than slight left turns, etc). It can produce turn-by-turn instructions and gpx output. It also does map matching pretty well (converting messy GPS data to an actual snapped-to-streets path), traveling salesman solutions and a few other things.

(https://github.com/valhalla/valhalla)

I'm moving away from apps created by someone else to the ones I can fully control. Here's a good list:

https://github.com/Kickball/awesome-selfhosted

Me too!

This github repo, along with r/selfhosted [0] and this [1] are everything you'd need.

I've been keeping track [2] of the things I've had to do to whenever I used to switch my VPS providers. Its not perfect - I don't restrict ssh, nor do I restrict the database access, but I mention that, and you can choose not to do that.

[0]: https://www.reddit.com/r/selfhosted/

[1]: https://selfhosted.libhunt.com/

[2]: https://github.com/itsmehemant123/basic-vps-setup

I'm wondering - why bother with Zsh? Modern Bash is quite advanced - is there any killer feature worth having it installed on all machines? I remember trying it out 10 years ago and it was always kind of "well, that features are nice to have" - but it turned out I rarely used them in the end.
Lazy completion is nice, e.g. type: 'ls /u/s/i' and tab could expand to '/usr/share/icons'
Mmkay, that's two tabs less than in Bash, I'm not sold that.
Not to mention that /u/s/i is not discoverable and as such something else to remember while /u <tab> /s <tab> (will expand to /usr/sbin /usr/share /usr/src so /sh <tab> is better) /i <tab> is. Tools which are not omni-present yet claim to save time by making the user remember tool-specific syntax are often not worth the effort of learning that syntax unless the savings in time or effort are substantial - in which case the tool would probably be more wide-spread to begin with.
Well, that was a silly example I typed on my phone. Imagine longer paths, sometimes half a dozen or more directories deep, where multiple directories at a given level may start with the same character(s) but zsh is able to figure out which one you really want based on the subdirectories you specified.
The big thing for me is programmable autocompletion. I can autocomplete things that the shell itself doesn't even know about, like git branches and aws-cli commands - including autocompleting paths inside an s3 bucket.
Bash has programmable completion as well. See for example: https://github.com/scop/bash-completion
The last time I looked into this, bash's programmable completion was both an order of magnitude slower and didn't allow tab-completion. Has that changed?
didn't allow tab-completion

What does this mean? I didn't know there was any other kind!

I don't know if it's slower, I haven't used zsh in a while, but the completion support for git (e.g. branches) is pretty fast for me.

When I last used it, I could partially type a command, press tab, and the completions would display below the line I was on. It did not modify the input line or the cursor position

In zsh, I press tab and the rest of the command is inserted onto the line I’m typing. If there are multiple options I can continue to press tab to cycle through them. I just have to press enter on the one I want.

Again, maybe it’s changed, but the last time I used bash I wasn’t able to do this.

Ah, ok. No, it definitively inserts onto the line.
You can configure zsh to use glob pattern matching when reverse searching the history using ctrl-r . For example you can do ctrl-r wordA*wordB and it will match commands where wordA is followed by wordB with zero or more number of characters in between. I wrote about it in http://raju.shoutwiki.com/wiki/Search_command_line_history_u... . AFAIK bash does not have this and it is the killer feature for me.
* Multiline Command Editing With Support In Keybindings And History File Format

For me, the killer feature is multiline command editing. Sometimes there is a need to do an ad-hoc complex set of actions, and it's nice to keep everything together in 1 command you can incrementally test and develop. Note, I'm not talking about hitting enter on an incomplete command and getting a PS2 prompt. That sucks because each of those lines is separate in the history, and you have to navigate for each line in turn when you want to reuse it. I'm talking about multiline commands that stay as one in the history and are comfortably editable on the command line. Here is an example with my prompt:

        / 2018.04.30 16:06:50
        | 0 - !71361 - %0 - jol@vento - ~some_project
        for ip in 10.1.{1..10}0.5; do
          ssh some_user@$ip '
            cp things places
            ed files << EOF
        i
        things
        .
        /others/d
        w
        EOF
            # other tedious stuff
          '
        done
        \ 2018.04.30 16:10:42
        output if there's any
        / 2018.04.30 16:10:42
        | 0 - !71362 - %0 - jol@vento - ~some_project
It's got vi keybindings that are meant for multiple lines like 'o' inserts a new line below, 'O' inserts a new line above, 'dd' deletes a line, etc. You can kind of do the same in bash, by pressing Ctrl-V Ctrl-J you can insert a newline and continue editing, but pressing up/down (or j/k if on vi keybindings) won't move between the lines, but rather navigates the history. Vi keybindings in bash don't implement those that are meant for multiline editing. Also the history format for bash doesn't seem to support multiline commands. If I make one and get the last command from history, it's all been joined in one line. bash will even insert ';' where needed to replace the newlines.

* Temporary Regular File `=(cmd)` Process Substitution

Both bash and zsh have process substitution of the form `<(cmd)` and `>(cmd)`, which substitute themselves with the path of a named pipe to communicate with the subprocess that runs concurrently. However, zsh additionally has `=()` which is a subprocess that runs before the substitution and whose output is collected in a temporary regular file which path is substituted in place after it finishes, and destroys it when the process which received the path dies. This is really useful for programs that need more than one pass when reading the file. I've used it, for example on `viewnior =(maim -s)` to display in an image viewer the window that I select with the mouse.

* Very Feature-Rich Extended Glob

I know bash has extended globs too, but I don't know how they compare. Here is something I found in my history for a yesod project:

    printf "%s\n" **/^(.*|*[~#])~(front-end|config|dist|yesod-devel|static)*(.oe[REPLY=\${REPLY:#*/*}]on)
I can't remember exactly what I was looking for when I did this, but this lists all regular files (not directories or symlinks, etc.) under a tree that do not begin in '.' or end in a '~' or '#' and that are not part of the top-level directories front-end, config, etc. ordered first by being under another directory (not top-level from the search; so I'd get top-level files at the end) and then by name.

A more common glob that I do is '* (oc[1])' to get the newest file in a directory or '* (oc[1,5])' to get the newest 5 or so. Neither should have a space between the asterisk and the brace, I added so HN would not turn it into italics.

* Timestamps In History File

Now that I mentioned the history, I notice that zsh has each command time-stamped in the history file while bash does not. I remember using this before to look for a command I remember doing in a time-range of a month of so years back from then.

* By Default Enabled...

Mine would have to be Vesper Framework [0] and TypeORM [1]. They both appear to be mainly developed by pleerock [2] and both appear to be in active development. I've been writing a bunch of TypeScript (Angular 5) at work and we have been testing GraphQL as well so this is just combination of a lot of tech I really like to work with. I have a project for my dad that I'm building out in Vesper for the backend and I might just use Ionic (as a PWA) with TypeORM so I can share all my entities and types between the two projects. I understand that the combination of all these technologies (NodeJS/TypeScript/Angular/GraphQL/EntityObject) is a little niche but I've had a blast working on it and it has a good amount of overlap with my job (save for our backend being java) so it's like killing 2 birds with 1 stone.

[0] http://vesper-framework.com/#/

[1] http://typeorm.io/

[2] https://github.com/pleerock

Ha wow, I never thought my toy project (salutem) would make the cut!

Glad you like it and I'm open to suggestions for improvements :D