Discussion:
LuaJIT project ideas: Bash 5.0
Alek Paunov
2014-10-04 01:53:19 UTC
Permalink
Hi,

I am rising the topic, with hope that at least in sequence of the recent
Bash related discussions [1], many list members have meditated on this
already :-).

So, what is your opinion regarding a Bash successor, implemented as
LuaJIT (e.g. ljsyscall [2] based) runtime and family of POSIX shell,
bash, zsh, etc. transpilers?

Kind regards,
Alek

[1] http://en.wikipedia.org/wiki/Shellshock_%28software_bug%29
[2] https://github.com/justincormack/ljsyscall
William Adams
2014-10-04 05:01:30 UTC
Permalink
I'm not sure of the benefits of going through that exercise, but I've had that thought myself as well.
The way I look at it, Lua/JIT can represent a new OS layer. ljsyscall is a perfect example. With that, I never have to touch C again, as long as LuaJIT works on the target platform.
It's also a chance to layout something similar between Windows and Linux.
There might be some performance benefits, although I'm not sure system shell scripts have traditionally be thought of as high performance components.
In short, it's probably worth an effort, at least as a project that people just start because they find it to be useful. If a community picks up on it, then great, if not, then there you go.
I'm interested in replacingtcpdumpwgetlibcurlgrep
And a couple of others.
One thing to consider, has node.js already started providing this? So many packages, so little time.
-- William

===============================
- Shaping clay is easier than digging it out of the ground.
Date: Sat, 4 Oct 2014 04:53:19 +0300
Subject: LuaJIT project ideas: Bash 5.0
Hi,
I am rising the topic, with hope that at least in sequence of the recent
Bash related discussions [1], many list members have meditated on this
already :-).
So, what is your opinion regarding a Bash successor, implemented as
LuaJIT (e.g. ljsyscall [2] based) runtime and family of POSIX shell,
bash, zsh, etc. transpilers?
Kind regards,
Alek
[1] http://en.wikipedia.org/wiki/Shellshock_%28software_bug%29
[2] https://github.com/justincormack/ljsyscall
Karel Tuma
2014-10-04 06:02:35 UTC
Permalink
This post might be inappropriate. Click to display it.
soumith
2014-10-04 15:18:29 UTC
Permalink
Karel, what are the two existing js->lua transpilers that you mention?
Post by Karel Tuma
Post by Alek Paunov
I am rising the topic, with hope that at least in sequence of the recent
Bash related discussions [1], many list members have meditated on this
already :-).
I see what you did there, but this is not simple matter of libressl move,
ie cosmetic polishing of existing codebase now that security bug provides the
tabloid media spotlight opening for a superhero fork - you know, the messiah
Superman which will protect citizens of Metropolis once and for all, from
evil hackers who eat brains of babies for breakfast and drink blood of virgins
at night...
This is "API" reimplementation in Lua from scratch. A rather daring
undertaking. Which means many man-months to complete. There are for example
two existing JS->Lua transpilers implementing (unfortunately rather superficial)
NodeJS API, you might want to take a look at those to gauge the amount of work
involved...
Still, a drop-in shell-to-lj transpiler for bash would be a neat thing,
if anything just for the performance boost alone.
1) why bash 5.0? the codebases (and maintainer i presume) would be unrelated
2) any (technical) rationale for ljsyscall? why not just posix ..
3) Just do it :)
Daurnimator
2014-10-04 23:51:48 UTC
Permalink
Post by soumith
Karel, what are the two existing js->lua transpilers that you mention?
Colony: https://github.com/tessel/colony-compiler
CASTL: https://github.com/PaulBernier/castl
Hamlet: https://github.com/paulcuth/hamlet

William Adams
2014-10-04 17:27:40 UTC
Permalink
One is the colony compiler that technical machines uses for the tessel.


Sent from my Windows Phone
________________________________
From: soumith<mailto:soumith-***@public.gmane.org>
Sent: ‎10/‎4/‎2014 8:20 AM
To: luajit<mailto:luajit-***@public.gmane.org>
Subject: Re: LuaJIT project ideas: Bash 5.0

Karel, what are the two existing js->lua transpilers that you mention?
Post by Karel Tuma
Post by Alek Paunov
I am rising the topic, with hope that at least in sequence of the recent
Bash related discussions [1], many list members have meditated on this
already :-).
I see what you did there, but this is not simple matter of libressl move,
ie cosmetic polishing of existing codebase now that security bug provides
the
tabloid media spotlight opening for a superhero fork - you know, the
messiah
Superman which will protect citizens of Metropolis once and for all, from
evil hackers who eat brains of babies for breakfast and drink blood of
virgins
at night...
This is "API" reimplementation in Lua from scratch. A rather daring
undertaking. Which means many man-months to complete. There are for example
two existing JS->Lua transpilers implementing (unfortunately rather
superficial)
NodeJS API, you might want to take a look at those to gauge the amount of
work
involved...
Still, a drop-in shell-to-lj transpiler for bash would be a neat thing,
if anything just for the performance boost alone.
1) why bash 5.0? the codebases (and maintainer i presume) would be
unrelated
2) any (technical) rationale for ljsyscall? why not just posix ..
3) Just do it :)
Karel Tuma
2014-10-04 23:11:33 UTC
Permalink
Post by William Adams
One is the colony compiler that technical machines uses for the tessel.
Post by soumith
Karel, what are the two existing js->lua transpilers that you mention?
And the second is CASTL, there may be others out there..
Loading...