News for hackers. Stuff that matters.
Re:Show HN: Janetsh – A new system shell by sdegutis on Monday May 13, 2019 @12:00PM (#19900598)
> A new system shell that uses the Janet[1] programming language

Why have I never heard of Janet before? This ticks every single box so far on my Perfect Lisp Language (and possibly Perfect Language) check list, the language I've been looking for for years but couldn't find.

[1] https://janet-lang.org

Re:Show HN: Janetsh – A new system shell by molteanu on Monday May 13, 2019 @01:18PM (#19901429)
Haha. I haven't heard of it either. I though that this was a toy project or something. Seems like it's real business. What don't you like about the other Lisps, like Common Lisp, for example? What boxes still remained unticked?

Janet discussion: https://news.ycombinator.com/item?id=19179963

Re:Show HN: Janetsh – A new system shell by andrewchambers on Monday May 13, 2019 @10:22PM (#19906257)
I know right? Tiny like lua, really extensible and flexible, fast start time, awesome :D.
Re:Show HN: Janetsh – A new system shell by akhilcacharya on Monday May 13, 2019 @09:21AM (#19898955)
> while also supporting the things we love about sh.

This is great! Are there any other shells like this? I like the idea of something backwards compatible with bash.

Re:Show HN: Janetsh – A new system shell by 314 on Monday May 13, 2019 @09:31AM (#19899041)
Oilsh has focused more on backwards compatibility. This approach of adding a small functional language is interesting. The author seems to have done an elegant job with the syntax. Adding this to my list of things to download and play with.
Re:Show HN: Janetsh – A new system shell by rpwilcox on Monday May 13, 2019 @11:06AM (#19899993)
Rash, the Racket Shell, does something similar to this: https://docs.racket-lang.org/rash/index.html
Re:Show HN: Janetsh – A new system shell by Spivak on Monday May 13, 2019 @10:49AM (#19899778)
Es shell is similar but in a less lispy, more bash style.
Re:Show HN: Janetsh – A new system shell by sciurus on Monday May 13, 2019 @12:15PM (#19900770)
xonsh does the same thing for sh and python.

http://xonsh.org/

Re:Show HN: Janetsh – A new system shell by hestefisk on Monday May 13, 2019 @11:05AM (#19899979)
Very neat. Will give this a spin and perhaps a port for FreeBSD if interested?
Re:Show HN: Janetsh – A new system shell by andrewchambers on Monday May 13, 2019 @05:54PM (#19904387)
If you are up for it, currently it may be a tad difficult to get running, but I am certainly willing to provide assistance.

In the future I hope it will support mac/freebsd/openbsd/linux and be easy to install and use.

Re:Show HN: Janetsh – A new system shell by convolvatron on Monday May 13, 2019 @10:29AM (#19899566)
I have a project that uses free unparsed text with evaluated sexpressions mixed in. I understand that alot of people just dont like sexpressions...but otherwise is anyone really bothered by this style of allowing arbitrary junk at the top level?
Re:Show HN: Janetsh – A new system shell by ljm on Monday May 13, 2019 @02:20PM (#19902162)
I think it’s fine, it’s like you’re saying that every expression is implicitly wrapped in a ‘()’ itself, so the syntax is redundant at the top level in a shell.

Not sure I’d appreciate it outside of a shell.

Re:Show HN: Janetsh – A new system shell by andrewchambers on Monday May 13, 2019 @05:14PM (#19904026)
Yeah, the shell implicitly adds () in janetsh, but it doesn't do it for you when you are writing scripts.
Re:Show HN: Janetsh – A new system shell by codetrotter on Monday May 13, 2019 @09:29AM (#19899017)
Why did they subtract one from (length all-files) in the gif?
Re:Show HN: Janetsh – A new system shell by 314 on Monday May 13, 2019 @09:33AM (#19899052)
There is a blank line from find captured in the array. I think it is to remove it from the count.
Re:Show HN: Janetsh – A new system shell by andrewchambers on Monday May 13, 2019 @05:13PM (#19904018)
That is right, I also just wanted to show you can do some basic calculation easily inline.
Re:Show HN: Janetsh – A new system shell by iBelieve on Monday May 13, 2019 @09:35AM (#19899059)
Looks like the last item in the all-files array is an empty string - maybe that's why? Either that, or the current directory (".") might be included as the first element.
Re:Show HN: Janetsh – A new system shell by codetrotter on Monday May 13, 2019 @10:16AM (#19899428)
If . was included then .. almost certainly would be as well. But an empty string at the end like you say and as explained by the sibling comment makes sense.
Re:Show HN: Janetsh – A new system shell by andrewchambers on Monday May 13, 2019 @05:12PM (#19904012)
The empty line after the split was the reason, also to demonstrate how to do arithmetic.
Re:Show HN: Janetsh – A new system shell by kissgyorgy on Monday May 13, 2019 @10:19AM (#19899467)
you lost me on the second bracket :D
Re:Show HN: Janetsh – A new system shell by andrewchambers on Tuesday May 14, 2019 @12:07AM (#19906704)
lisp may be as ugly as bash, but it much more principled and composable.
Re:Show HN: Janetsh – A new system shell by teilo on Monday May 13, 2019 @09:35AM (#19899060)
Does it use the flow of time as a lotion?
Re:Show HN: Janetsh – A new system shell by jedieaston on Monday May 13, 2019 @09:53AM (#19899206)
How’s the cactus compatibility?
Re:Show HN: Janetsh – A new system shell by lintuxvi on Monday May 13, 2019 @02:16PM (#19902111)
Wat?
Re:Show HN: Janetsh – A new system shell by smsx on Monday May 13, 2019 @05:56PM (#19904399)
I believe these are references to The Good Place[1], although I don't usually expect to see pop-culture references as top level comments on HN.

[1]: https://en.wikipedia.org/wiki/The_Good_Place

Re:Show HN: Janetsh – A new system shell by Crestwave on Tuesday May 14, 2019 @12:18AM (#19906747)
To be fair, it is named after the character from that show. It doesn't really add much to the discussion to post references here, though.