Talk:Executable library: Difference between revisions

 
(5 intermediate revisions by 2 users not shown)
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.
 
--[[User:Mcandre]]
 
:Or not! Hi Mcandre. If there has been no other improvements to scripted mains task description then I don't see a case for the two tasks to merge. The reasons for this task appearing will still exist. This task is about what pythons thing can give you rather than the thing itself and has already given us that excellent [[Executable_library#C|C example]] (IMHO). If you maybe extract the essence of your examples and put that in the scripted main task description then we could end up with two great tasks with slightly differing emphasis? --[[User:Paddy3118|Paddy3118]] 07:13, 13 September 2012 (UTC)
 
:: Executable library is duplicating the content of [[Scripted main]], thus both should be merged. The difference is that [[Scripted main]] contains bite size, simple examples in dozens of languages, while [[Executable library]] contains fewer, more overblown examples. I admit that my examples may be too simplistic to demonstrate the need for an "executable library", but I believe hailstone sequences are sufficiently complex that they distract from the purpose of an "executable library". --[[User:Mcandre]]
 
:::You say it is a duplicate then describe the differences. What you are ignoring is that the differences are important. An executable library could as a library contain code to work with the CGI protocol and when executed work as a CGI capable web server. Given that kind of existing capability a choice of adding extra functionality to an existing RC task alleviates some of the issues of how to have a meaningful task, that is not too complex.
:::In contrast, I have just reread scripted main and the description doesn't say that anything need be done to fulfil it! Someone needs to state in the task description just what is required to fulfil the task. You state that it has more examples. It also has issues in its talk page that are a long way from being resolved. --[[User:Paddy3118|Paddy3118]] 21:25, 13 September 2012 (UTC)
 
Scripted main states at the moment:
:''It is useful to be able to execute a main() function only when a program is run directly. This is a central feature in programming scripts; the feature can be called scripted main or modulino. Examples from GitHub. Sometimes getting the ScriptName is required in order to determine when to run main(). ''
You could try answering in the text:
* Run directly vs what? Explain what you mean by direct/indirect running.
* Is it central as stated?
* Tell the example writer what is required to complete the task. A task needs to tell you how to complete it, you know, "Bring me The Ark of the Covenant" rather than "There's this box and it has great power". Only one is a task (even if you do receive lots of boxes in the post for the other)
--[[User:Paddy3118|Paddy3118]] 21:25, 13 September 2012 (UTC)
 
==Tcl problem==
Anonymous user