Talk:Executable library: Difference between revisions

no edit summary
No edit summary
Line 1:
==History==
This task came from discussions [[Talk:Scripted Main|Here]]. I was nervous about just deleting all the code for that task so decided to create this, mark the other for maybe future deletion, and see how things go. --[[User:Paddy3118|Paddy3118]] 23:44, 14 March 2011 (UTC)
 
==We should merge Executable library's content back into Scripted main==
Executable library is perhaps a better name, but the examples on it overshadow the point of having an executable library. Leave hailstones to another article and just show people how to do Python's if __name__=="__main__": main() in multiple languages (the point of Rosetta Stone).
 
If you're having trouble understanding the point of Scripted main / Executable library, run these Perl programs (https://github.com/mcandre/scriptedmain/tree/master/perl) and look at their code. test.pl illustrates loading code from another Perl file. scriptedmain.pm doubles as both a library that can export code, and a self-contained executable in its own right.
 
Another example is ios7crypt (https://github.com/mcandre/ios7crypt), a command line tool for encrypting and decrypting Cisco router passwords. You can either call <lang sh> $ ./ios7crypt.scm -e monkey</lang> as a self-contained shell script, or <lang chicken>(load "ios7crypt")</lang> and treat the file like a library, accessing its methods like a normal API.
 
==Tcl problem==
Anonymous user