Live data from Hacker News

Shinatra – A simple bash web server

github.com

11–20 of 37 posts

Re: Shinatra – A simple bash web server

#14
post #12

> Is this a thread based server, or does it use an event loop instead? > No. Well, which is it ?

Neither, its using netcat + -l flag, which is (possibly) waiting for a connection using blocking networking IO.

It can only accept one connection at a time because of the netcat command being used in a loop

Re: Shinatra – A simple bash web server

#17
Bash (shell-script) is a very powerful language, but a bit too complicated for the non-programmer (computer hacker). Then we got Perl, but it is also a bit too complicated. Now we have JavaScript doing the same thing, but also JavaScript (ES6) is now getting more complicated. I wonder is there a rule that says a (scripting) language for non-programmers will eventually either die or end up being too complicated for non-programmers ?

Re: Shinatra – A simple bash web server

#18
post #16
post #6

Five lines seems like much when you consider that one can write a concurrent (using threads) C webserver in 12...

Considering C has the semicolon, you can probably write it in less than 5 because you can put almost anything on a single line.

Bash also has a semicolon. This script could be done in two lines. Or even one if you omit the shebang.

Re: Shinatra – A simple bash web server

#20
post #17

Bash (shell-script) is a very powerful language, but a bit too complicated for the non-programmer (computer hacker). Then we got Perl, but it is also a bit too complicated. Now we have JavaScript doing the same thing, but also JavaScript (ES6) is now getting more complicated. I wonder is there a rule that says a (scripting) language for non-programmers will eventually either die or end up being too complicated for no…

For me the scripting language for non-programmers looks more like Automator (the GUI) or Workflow - its iOS counterpart.

A programming language will always be for programmers or at least enthusiasts.

Also I do not agree that bash is good for non-programmers. In order to make any more complicated thing work you have to learn a lot of syntax and language specific things. I have always found perl easier than bash to do anything remotely more complicated.

Post reply on HN