Platform: GNU/Linux Language: C Contributor: Copyright (C) 2013, Triston J. Taylor Contact: <email@example.com> Dual License: GPL V.3 (Free), Contributary 2-Clause BSD Style (Commercial) see LICENSE.md
Jsh aims to be a great platform for scripting in the Unix world. If any other platforms may benefit from this overview then good for them. But user be warned, we will not break our backs, API, or stability to support foolishness. One environment is hard enough to get right.
How it's done
- Readily use parameters as return types "top-level stack parameters" are protected
- Allocate and free value typed buffers
- Load shared libraries (or applications) and access symbols from within them
- Match the performance of a production status compiled language.
- Native structures, unions, enums, calls and call backs
The Seed project has broken a lot of these rules, but left the end user with something to be desired for. They boarded up the windows, and sealed the doors shut after they barricaded the goldmine under a web of code we would rather not try to decipher. And that sucks. For example, what if the user doesn't care for GObjects and Instrospection? What then? A tool that was otherwise headed for greatness is condemned to lurk in the shadows as yet another "could have been".
We didn't like that idea. The project has made some great headroom that this author would dare not enter into without a fat paycheck to follow. In other words, its a useful work that we will allow you to take advantage of as well as the C additions we have implemented.
####What Jsh Can Already Do:
- Load/Unload shared libraries & applications
- Locate symbols in shared libraries & applications
- Native procedure prototype scripting (unlimited definitions per symbol)
- Allocate and free native C types or arrays (buffers)
- Pass native C types and arrays as parameters to native functions
####What's up next:
- Command line statement evaluation
- Command line syntax check
- Command line file execution
- Compile Standard input mode
- Unix shebang script interpretation
- Interactive input mode
- System initialization script: (/etc/jsh.rc)
- User initialization script: (~/.jshrc init script)
- Bypass init scripts
- System adminstration: Whitelisting (/etc/jsh/shared.wl)
- System administration: Blacklisting (/etc/jsh/shared.bl)
- Native structures
- Procedure call backs
- System logfile
- Possibly support daemonization (needs review)
####How to build:
git clone https://github.com/hypersoft/jsh.git; cd jsh && make;
Currently there are no install or clean targets. The resulting file is located in the bin directory:
####Hello World jsh:
puts = new jsh.library("libc.so.6").find("puts").declare(jsh.type.int, jsh.type.string); puts("Hello World!"); Seed.quit();
Do try not to venture out too far into the project's internals as there is no solid definition of how we want to do anything other than the "Hello World" example given above. While we are using Seed now, that could change as the project matures and is eventually able to load Seed on its own.
Jsh has no intention to be a POSIX shell, but if you work at it, you might be able to build one with it in no time at all, without all of the binary overhead. It isn't until we reach completion of the above task list that version 1.0 of jsh will be anounced for general user incorporation.