mvdan-sh

Dev tools

shell parser

SHOW HN2018

mvdan-sh

A complete Bash parser in JavaScript transpiled from Go

npmjs.com

#bash parser#javascript#go#transpiler#shell

89points
69comments
#491of 2,155 in 2018
Top 23%of 2018 by points

How HN took it

CuriousMostly questions and neutral comments

0 positive, 5 neutral or asking, 0 mixed, 3 critical, out of 8 comments about the project. Thread score -0.28.

Idea: 0 for, 1 againstDocs: 0 for, 1 against

The thread, comment by comment

Each row is a top-level comment and its replies, in HN's order. Select a cell to open that comment on HN.

positive neutral or mixed critical about another commenter or something else the maker

What HN said

What people liked

  • Funny, enjoyable headline

    From 2 comments
    • This headline reads like a Markov chain trained to generate Hacker News posts. I love it.
      munificent on HN
    • Hilarious because it's true. This is my favorite comment of the day.
      alistproducer2 on HN
  • Love the idea

    From 1 comment
    • Love this. Ironic that it is BSD licensed though, considering it parses and runs the world’s probably most popular piece of GPL’ed software (probably second to Linux).
      hestefisk on HN

Objections

  • Transpiled JS is large and bloated

    From 2 comments
  • Licensing concern: BSD license for a tool parsing GPL software

    From 1 comment
    • Love this. Ironic that it is BSD licensed though, considering it parses and runs the world’s probably most popular piece of GPL’ed software (probably second to Linux).
      hestefisk on HN

Requests

  • More JavaScript-friendly API and documentation with examples

    From 2 comments
    • Some general thoughts, which may or may not be practical depending on how the transpiling works (I have no idea about go): - Instead of calling .Print(), have the class extend…
      crooked-v on HN
    • Thanks for the package! When it comes to JavaScript - the code is the documentation. You look up methods etc in the source code. But as this is 30k lines of generated code it's…
      z3t4 on HN
  • Use streams and EventEmitter instead of string returns

    From 2 comments
    • Some general thoughts, which may or may not be practical depending on how the transpiling works (I have no idea about go): - Instead of calling .Print(), have the class extend…
      crooked-v on HN
    • To help, the short version on "why" for EventEmitter, streams, and Promises is that they're three different ways of doing things asynchronously, with different use cases and…
      crooked-v on HN

Questions

  • Could it be transpiled to pure Bash

    From 1 comment
    • Not that it's useful or desired, but could one transpile it into pure bash as well? It's Turing complete isn't it?
      ddtaylor on HN
  • Whether a Bash parser is undecidable

    From 1 comment
    • An important heads up: "Parsing Bash is Undecidable". https://www.oilshell.org/blog/2016/10/20.html
      Zalastax on HN

Alternatives named

  • Oil shell parser

    From 1 comment
    • An important heads up: "Parsing Bash is Undecidable". https://www.oilshell.org/blog/2016/10/20.html
      Zalastax on HN

Category, keywords, summaries and labels on this page were made by AI (Thread Reader v2) and not checked by hand. Each point links to the comments it came from.

Add a badge to your READMEShown on HackerShow
[![Shown on HackerShow](https://hackershow.org/badge.svg)](https://hackershow.org/show/17083941)