Better HN
topnewbestaskshowjobs
Log inSign up

bishc

106 karma · joined Mar 8, 2015 (11y ago) · 11 submissions

Developer of bish language:

https://github.com/tdenniston/bish

Submissions

comment 11y ago · link · parent

I'm never sure when these plugs become too much, but...

I created a language called bish that allows you to write your shell scripts in a sane and comfortable syntax. No more remembering which one of those conditionals to use! Bish compiles to bash, so you also get to keep all of the portability that comes with bash scripts. I haven't had much time to work on it recently, and it's still missing some features, but it's ready to use now:

https://github.com/tdenniston/bish

comment 11y ago · link · parent

More generally, SSA means implicit use/def information. Use/def information and traversal are critical components of many static analyses and transformations: having the IR in SSA form greatly simplifies reasoning about and implementing these analyses and transformations.

comment 11y ago · link · parent

In my experience, many people will miss the significance of this, or will simply fail to grasp how this is implementing a programming language at all. After all, you're taking advantage of the host language for every single aspect of the new language, even tokenizing/parsing.

More interesting for beginners (in my opinion) are examples implementing a simple tokenizer, parser, and compiler to another source language. This seems to be what closes the gap between programming languages as mystical constructs and programming languages as programs themselves.

This point of view does tend to displease the traditional SICP crowd though :-).

comment 11y ago · link · parent

Shameless plug for my language "bish" (compiles to bash) which aims to solve many of these annoyances with shell scripting: https://github.com/tdenniston/bish

comment 11y ago · link · parent

I see a lot of discussion on the awkwardness and idiosyncrasies of shells like bash.... So this is a great time for a shameless plug! Last week I released a language called 'bish' (https://github.com/tdenniston/bish) which compiles to bash, but has none of the same syntactical weirdness. So the idea is: write and maintain your script in bish, but compile to bash and ship the bash version.

Here (https://news.ycombinator.com/item?id=9166386) is the previous discussion from last week.

comment 11y ago · link · parent

This is quite apropos, as just last week I released a little language called 'bish' designed to overcome exactly this issue. It compiles to bash for portability, but has more modern and familiar syntax.

See https://github.com/tdenniston/bish for the repo and https://news.ycombinator.com/item?id=9166386 for some previous discussion.

The language is still brand new and under active development. It's not stable yet.

comment 11y ago · link · parent

There is a section of the readme titled "Why" :-).

comment 11y ago · link · parent

Interesting notion! I personally am not a fan of whitespace sensitivity, but I understand why many people are. For me, after spending years writing code with curly braces and semicolons, they are effectively invisible (and thus do not seem to waste my "human bandwidth").

That being said, the choice to include those syntax features in bish was made entirely to make writing a parser easier, not for any deep philosophical reason.

comment 11y ago · link · parent

That's what I was going for. Not a replacement for bash the shell, but a language that provides a bit more comfort for programmers while retaining the ability to run on any system your scripts did previously.

comment 11y ago · link · parent

(OP here). You're right: for simple tasks like listing files or changing directories, you probably don't need bish. I should come up with some better examples where bish wins in readability.

11.

Show HN: Bish – Shell scripting with a modern feel(github.com ↗)

84 points · by bishc · 11y ago · 42 comments