Rosetta Code talk:Village Pump/Suggest a programming task: Difference between revisions
→Get moving on these: Or removal. |
→Get moving on these: +1 on a dead task category. |
||
Line 4: | Line 4: | ||
:: ... Or removal? Hopefully we can turn a large proportion of drafts into true tasks, but others might be split, or removed as unworkable I would think. --[[User:Paddy3118|Paddy3118]] 08:29, 22 December 2009 (UTC) |
:: ... Or removal? Hopefully we can turn a large proportion of drafts into true tasks, but others might be split, or removed as unworkable I would think. --[[User:Paddy3118|Paddy3118]] 08:29, 22 December 2009 (UTC) |
||
::: ... Or removal. Or conversion or splitting into something useful. If something's totally unsuable, I'd probably want to shuffle it into a "dead task ideas" category, rather than erasing it. --[[User:Short Circuit|Michael Mol]] 16:26, 22 December 2009 (UTC) |
::: ... Or removal. Or conversion or splitting into something useful. If something's totally unsuable, I'd probably want to shuffle it into a "dead task ideas" category, rather than erasing it. --[[User:Short Circuit|Michael Mol]] 16:26, 22 December 2009 (UTC) |
||
:::: +1 on the dead tasks so that the reason for their rejection is kept. (Maybe rejected task category)? --[[User:Paddy3118|Paddy3118]] 18:30, 22 December 2009 (UTC) |
|||
== Task guidelines? == |
== Task guidelines? == |
Revision as of 18:30, 22 December 2009
Get moving on these
Can we get moving on some of these? --Short Circuit 23:00, 7 November 2007 (MST)
- To facilitate the process, I've created Template:Draft task, taken from observing Kevin Reid's initial stages of the Stem-and-leaf plot task. Any page this template is on will show up in Category:Draft Programming Tasks. Ideally, pages that wind up in there should be fixed up and clarified so that they're acceptable enough to be added to the Task roster. Just about anything that's in the "Request a programming task" page that's remotely workable should be put in a draft task, where the task ideas can be refined until people can agree they're clear enough for comfortable unambiguous implementation. --Michael Mol 06:05, 22 December 2009 (UTC)
- ... Or removal? Hopefully we can turn a large proportion of drafts into true tasks, but others might be split, or removed as unworkable I would think. --Paddy3118 08:29, 22 December 2009 (UTC)
- ... Or removal. Or conversion or splitting into something useful. If something's totally unsuable, I'd probably want to shuffle it into a "dead task ideas" category, rather than erasing it. --Michael Mol 16:26, 22 December 2009 (UTC)
- +1 on the dead tasks so that the reason for their rejection is kept. (Maybe rejected task category)? --Paddy3118 18:30, 22 December 2009 (UTC)
- ... Or removal. Or conversion or splitting into something useful. If something's totally unsuable, I'd probably want to shuffle it into a "dead task ideas" category, rather than erasing it. --Michael Mol 16:26, 22 December 2009 (UTC)
- ... Or removal? Hopefully we can turn a large proportion of drafts into true tasks, but others might be split, or removed as unworkable I would think. --Paddy3118 08:29, 22 December 2009 (UTC)
Task guidelines?
Moved to Village Pump:Home/Task creation process discussion
Assertions
Are there enough languages that use assertions to warrant a task for them? I know Java, C, and C++ have them, but I'm not sure about other languages. Also, do assertions work similarly enough across all of the languages to make comparison worthwhile? --Mwn3d 21:22, 3 February 2009 (UTC)
- Is there a literary definition of the concept? As far as I know, it's a runtime check of a boolean condition, combined with a debugging aid, such as a breakpoint or logging command. That concept seems fairly universal, at least for procedural languages. I'd be curious what the analog would be for languages like Lisp or Haskell. --Short Circuit 23:39, 3 February 2009 (UTC)
- I know Modula-3 and Ada both have assertion pragmas. I believe OCaml/F# have assertion commands. Oberon-2 has an ASSERT builtin command. I'd say it's "universal" enough that there should at least be libraries for basic assertions in all languages. --01:12, 4 February 2009 (UTC)
Done!
Gamma function and similar
What should it happen when one asks for a "function"/algorithm which is already implemented in a language, in its "standard libs/functions...", or which is implemented in a external extra lib? Should one just show its usage, or show how it would be implemented if the language wouldn't have that function?
It seems it strongly depends on how the task was written, but doubts and shadows remain to me; examples:
- The Gamma function exists in Fortran2008; if the task asks just show how to compute the Gamma function in your language, I surely would use the intrinsic function, or well known libraries (Python numpy/scipy e.g.). If the task asks for a specific algorithm...? I suppose I am forced to implement it forgetting about libraries and intrinsics.
- Basic bitmap storage... Perl uses the Imlib2; it achieves the aim of the task (providing a graphics framework for other related tasks?), but it does not show how in Perl you would create a basic bitmap storage...
- Bresenham's line algorithm ... Perl again... Imlib2 has its own draw_line routine... since here the task asks explicitly for the implementation of a specific algorithm for drawing lines, cannot we use intrinsics if any? This time, Perl both shows how to use the Imlib2 and implements the Bresenham algorithm... what if the task would have been show how to draw a line using the basic bitmap storage from This Other Task?
- LZW compression ... I've not uploaded my C version because it is long since I had to implement a Dictionary and a String facility (so it was easy to translate the Java code...); then I've found the Judy lib (used in Creating an Associative Array), but I haven't adapted the code yet, nor I am sure Judy can fit the specific need directly (I should anyway write support functions). But in this case, since the algorithm requested by the task is LZW, not Dictionary (or associative arrays, for which there's another task), using heavily extern functions/libraries is ok... except if we use a liblzw that with a simple lzwcompress(in, out) resolve the task...?
Maybe a moral: if the task is written in a rather general way (like: show how to draw a line, show how to compute the Gamma function in your language and so on), then it seems you can use everything you can, even implement a well-known/used algorithm. If the task asks explicitly for the implementation of an algorithm (Bresenham, LZW, Lanczos approximation...), then we must implement it, disregarding just "details" (e.g.: Bresenham needs to plot single points, we can use any function we can/want to plot them; LZW needs associative arrays, and we can use any already made function/method/object ... and so on)
(Middle point: a task could be permissive: show how to draw a line, e.g. using the Bresenham algorithm or the Xiaolin Wu algorithm, but it would be better in this case if the task is separated, since the former just draws a sharp line, the latter draws an antialiased line)
Is this The Interpretation we should follow? --ShinTakezou 14:14, 24 February 2009 (UTC)
- maybe editors should be aware of the issue, but can't talk pages remain the place to discus each individual issue and come to agreement? --Paddy3118 08:36, 22 December 2009 (UTC)
Memory allocation?
I'm not sure how a lot of languages work with memory allocation, but I know that a lot C++ students at my college often forget the difference between delete and delete[]. I'm not really sure how to put something like that in a task though. Something to show memory allocation and deallocation, and memory allocation on the system stack vs. the heap. It may be appropriate to talk about ways of customizing garbage collection in this task. It may take a couple of tasks, though. Anyone have a good idea of how to set it up? --Mwn3d 22:00, 10 May 2009 (UTC)
- A large number of programming languages recognize the difference between heap memory and stack memory; For many of them, Memory Allocation is as fundamental as control structures. Simply creating a task dedicated to the allocation of data and objects on both types should be sufficient; The information will find its way there. --Short Circuit 15:55, 11 May 2009 (UTC)
- How about "Create, use, then destroy a number of objects in series where the total amount of memory used by the objects if not re-used, would be comfortably more than the amount of memory available to the program". It does not distinguish between stack and heap but allows garbaage collected dynamic languages to give solutions too. --Paddy3118 08:44, 22 December 2009 (UTC)
- Whoops, there is already [Memory Allocation]. Do we need mine? --Paddy3118 08:46, 22 December 2009 (UTC)