Language-agnostic shen_run installation/use instructions?

34 views
Skip to first unread message

Samuel Falvo II

unread,
Aug 19, 2016, 7:32:23 AM8/19/16
to Shen
I've recently completed the first usable version of SMG (https://github.com/sam-falvo/SMG), a tool I wrote to help convert truth tables into their corresponding Verilog, avoiding a whole bunch of hand-translation in the process.  This is my first Shen application, and the quality of the code probably shows as much.  I have plans for revising the software in the future, including adopting a more monadic approach to I/O to support automated testing and such.

The question I have is, having just recently adopted the use of shen_run to allow SMG to be invoked from the Unix command line, I was wondering if there were any best practices concerning language-independent (e.g., SBCL, clisp, Javascript/Node.js, etc.) shen_run adoption.  The docs for shen_run provide working instructions, but the results are language specific.

The reason I'm asking is that I'd like to provide useful installation documentation to folks who may not have Shen installed on their systems.  I would prefer to not have to have language-specific installation instructions.

Thanks.

Neal Alexander

unread,
Aug 19, 2016, 4:02:38 PM8/19/16
to Shen
You can also do something lame like:
 
echo "(load \"test.kl\") (lisp.quit)" | shen

The spec doesn't mention any standardized behavior for command line invocations. This should probably be fixed right now, since its fairly trivial.

shen -l <filename>       -- eval file
shen -e <expr>            -- eval string
shen -r                         -- REPL

or possibly drop to REPL if no args are specified.   

I think (shen.shen) is the entrypoint, if you want to play around with it.
https://github.com/Shen-Language/shen-sources/blob/eb64276a74cca00cbe991fa1e6d76ea2caf8ba63/sources/toplevel.shen
Reply all
Reply to author
Forward
0 new messages