Talk:Modulinos: Difference between revisions

m
Mcandre moved page Talk:Scripted main to Talk:Modulinos: Use community accepted name for this article's content. "Modulinos" is still obscure, but less obscure than my goofy "scripted main" name.
m (Mcandre moved page Talk:Scripted main to Talk:Modulinos: Use community accepted name for this article's content. "Modulinos" is still obscure, but less obscure than my goofy "scripted main" name.)
 
(10 intermediate revisions by 5 users not shown)
Line 50:
 
::::: Yes, there is some confusion over compiled vs scripted vs interpreted vs assembled code and what qualifies as an executable. For the purposes of this article, I consider any ELF/MACH-O/DOS/WIN32 binary file, and any shebang'ed file as an executable. Strictly compiled languages (C, C++, D, Objective C) don't seem to belong in this article, because programs in those languages already have a good idea of what a main() function does and where it belongs. But, in the subset of compiled languages, some people prefer not to use separate files for API and CLI. E.g., "weak" allows this in C/C++.
 
:::::: I think windows COM servers would be an example of doing this kind of thing with a compiled language. It is, of course, OS specific. But the whole concept of "executable" is also OS specific. Tasks which ask us for a subtle variation on an OS specific concept would typically be OS specific tasks. --[[User:Rdm|Rdm]] 16:19, 12 May 2011 (UTC)
 
::::: For major scripting languages (Perl, Python, Ruby), it's often assumed that API and CLI work together. To beat a dead horse, Python's if __name__=="__main__" is a much sought-after snippet (2,030,000 results in Google at last count). Coders want to know how to do this. I think they want to do this in other languages as well.
Line 55 ⟶ 57:
 
::::: I want to get back on IRC and chat with you guys. You seem interested, and rightly curious. In the mean time, feel free to twitter me at @mcandre. --[[User:Mcandre|Mcandre]]
 
:::::: FWIW, there's no problem with OS-specific examples — that's how life is sometimes — though it's best if they're described as such. It does mean that there's an opportunity to describe how to do it on other operating systems/platforms, but that's all cool. (Re language snootiness, hang in there and fight the good fight. The world is open, not closed.) –[[User:Dkf|Donal Fellows]] 09:53, 13 May 2011 (UTC)
 
== Ambiguities ==
Line 122 ⟶ 126:
 
==What ''is'' an "Executable library"==
''(This section needs expansion and discussion to see if we have enough to create a task that is capable of being completed by enough languages.)'' --[[User:Paddy3118|Paddy3118]] 07:45, 7 March 2011 (UTC)<br><br>
 
Since my words only carry so far, someone else wrote a short description of this behavior at [http://stackoverflow.com/questions/1973373/why-does-it-do-this-if-name-main/1973391#1973391 Stack Overflow]. --[[User:Mcandre]]
 
When given a task in a programming 'contest' such as to create a simple function and to find values of that function at certain points; then you would be giving your example in the form of an executable library if:
Line 186 ⟶ 192:
 
::: Good stuff. My only concern with hailstone vs meaning of life is that the hailstone sequence may warrant its own article, the duplication may confuse both hailstone geeks and scripting geeks, and the meaning of life snippet is much simpler to read, write, and understand. One caveat I can think of for the meaning of life example is that it fails to demonstrate export of a useful function ("return 42" is not a useful function). The function must be useful enough that the reader understands why it's worthing coding as both a command line script and as an API, yet useless enough that it's not duplicating another article. If you're set on using the hailstone sequence, feel free to borrow code from [https://github.com/mcandre/cspace My Github] --[[User:Mcandre|Mcandre]]
 
:::: Hi Mcandre, the new task [[Executable library]] allows people to copy code from the pre-existing [[Hailstone sequence]] task. Check it out. --[[User:Paddy3118|Paddy3118]] 10:25, 4 April 2011 (UTC)
 
====On fleshing-out a rewrite====
Line 243 ⟶ 251:
 
--[[User:Kernigh|Kernigh]] 04:16, 14 March 2011 (UTC)
 
== New goals that could possibly be integrated into this ==
 
Some languages (like gambas and visual basic) support two startup modes. Applications written on these platforms start with an open window that waits for events, and it is necessary to do some jiggerypokery to cause a main procedure to run instead. I was going to create a new task to demonstrate how to achieve this, and then I remembered this "scripted main". Maybe this can be reorganized to include these requirements? It is not necessarily a "scripted" main, because visual basic is compiled, so we would probably need a rename, though I have not decided on a name for this yet, I am open to ideas. [[User:Markhobley|Markhobley]] 21:58, 11 July 2011 (UTC)
:FWIW in documentation that I have written, this is usually headed "Making the application startup from a main routine". [[User:Markhobley|Markhobley]] 22:08, 11 July 2011 (UTC)
 
:I would vote to start a new draft task for new topics as this is marked for a slow, lingering, death :-)
:I was wondering however, in your proposed task? Is it about, for example, clicking on a script file in windows to get the script to run versus clicking on the executable to get a [[wp:REPL|REPL]] to run on Windows? --[[User:Paddy3118|Paddy3118]] 06:34, 12 July 2011 (UTC)
::No. The jiggerypokery is done at project build time, not at run time invocation, so that would be a separate task. [[User:Markhobley|Markhobley]] 07:30, 12 July 2011 (UTC)
Anonymous user