Rosetta Code:Add a Language: Difference between revisions

→‎Tasks Not Implemented: Changed instructions for creating the Unimplemented page and explicitly linking from the language page.
(→‎Tasks Not Implemented: Changed instructions for creating the Unimplemented page and explicitly linking from the language page.)
 
(34 intermediate revisions by 14 users not shown)
Line 1:
{{#set:is contribution page=true}}Thanks to a system of templates, adding a language on Rosetta Code is fairly simple. To begin with, consider the name of the language; This will be part of the name of the page that represents your language.
 
''After'' checking to see if the language is [[:Category:Programming Languages|already on Rosetta Code]], You're going to need a category page to list all the examples, a redirect in the main namespace to redirect to the category page, and, finally, an example or two.
Line 5:
''Notice that, for the purpose of instruction, we call the language "Ayrch", but that's almost certainly not going to be the name of the language you're adding; Replace "Ayrch" with the name of your language.''
 
==Prerequisites==
=Basic Information=
 
For inclusion on Rosetta Code, the requirements are reasonable: There should be an existing implementation of that language that is either mature or, at the very least, under active development. Language notability is unimportant; if the number of languages on the site grows enough to require distinction, they can be differentiated by example coverage.
 
==Basic Information==
 
These are the bits that should be done for every language.
 
===Category Page===
 
Once you're sure the language doesn't already have a page on Rosetta Code, you'll need to create a category page for the language. Let's say you're adding a language called Ayrch. ('''This is a hypothetical language name; please change it to your actual language name when you actually add your language.''') The first thing you need to do is create the category page. The easiest way is to click on the Search field on the left, type '''Category:Ayrch''', and click Go. It will tell you there is no current page with that name. Click "create this page", and it will give you an empty page to edit.
 
One simple way to start is to make this the entire body of the page:
Line 19 ⟶ 23:
That will automatically give you a basic language page, and even a nice little stub notification reminding people who visit to fill in more information.
 
===Redirect===
 
The next step is to create a redirect page. This is important, because the ''actual'' page for your Ayrch language is at '''http://rosettacode.org/wiki/Category:Ayrch''', and we want people to be able to go to '''http://rosettacode.org/wiki/Ayrch''', and be able to use syntax like <nowiki>[[Ayrch]]</nowiki> within the wiki to refer to it.
Line 31 ⟶ 35:
Now, when anyone goes to the Ayrch page, they will be immediately redirected to the category page for Ayrch.
 
===Examples===
 
''You're not done yet!''
Line 43 ⟶ 47:
If you're pressed for time, browse the [[:Category:Programming Tasks|list of tasks]] and find a couple simple ones you can implement. [[User Output]], [[Loop Structures]] and [[Conditional Structures]] are some common ones that most languages support. For the sake of this demonstration, let's suppose that Ayrch looks a lot like BASIC, and implement [[User Output]].
 
We would need to go to that page, find where the language name would fit (alphabetically), and add this code:
 
<pre>
Line 52 ⟶ 56:
That's a very simple example; You might try adding some descriptive information before the <nowiki><lang></nowiki>, such as what compiler it works with, or perhaps some interesting information of how Ayrch does things differently from other languages. Whatever helps to illustrate the language and identify what makes this example interesting.
 
==Unimplemented =Tasks Not Implemented===
 
Finally, you're going to want to create an easy way for other people to discover and add tasks that have not yet been implemented in your language.
Rosetta Code has the ability to automatically generate a list of all of the tasks for which nobody has offered a solution in a given language. In order to activate this feature, you need to create the relevant page.
 
<!-- In the bottom right of your page, click the link that says, "If you know '''Ayrch''', please write code for some of the ''tasks not implemented in Ayrch''." In the new page that opens, enter the following for the page contents:
You need to create the page '''Reports:Tasks not implemented in Ayrch'''. You can use the search field to navigate to the page, or you can navigate to the category page you created earlier, find the red link that says '''unimplemented tasks''' and click on it. Create the page, and drop this in the body (adjusted for your language, of course):
-->
 
Use Search Rosetta Code to find Tasks not implemented in Ayrch. The page won't exist but you can create it as suggested in the search results.
Give the page the following content:
<pre>
{{unimpl_Page|Ayrch}}
</pre>
(replace Ayrch with your language name in the search, page name and content).
<br>
Once created, you can add a link to the new page from your language page.
 
==More Advanced==
These aren't strictly necessary, but are generally a plus if you want to increase awareness and penetration of your language on the site.
 
===User Boxes===
You created a user page before doing your edits, didn't you? You don't have to, but it generally helps in identifying who created and contributed what.
 
In your user page (not your user talk page), try adding a user box. That generally looks something like this:
 
<pre>{{mylangbegin}}
Line 85 ⟶ 95:
{{mylangend}}</pre>
 
Of course, you don't have to use words like "Active" or "Rusty"; You can use "Expert", "Novice" or "Author" (or any other way you want to describe your proficiency), if you like. If the only language you really know happens to be Ayrch, then your language box is pretty simple:
 
<pre>{{mylangbegin}}
Line 93 ⟶ 103:
If you just copy and paste that, you'll probably get the idea fairly quickly.
 
===Implementations===
 
A language is only theoretical until it has an implementation. An implementation might be a compiler, an interpreter, or even a piece of silicon. It helps users tremendously if they can find implementations of the language you're trying to show them. One good way to do that is to create an implementation page.
Line 103 ⟶ 113:
That's a start, but if you're this far, then you can go a step or two beyond that. Instead of using <nowiki>{{stub}}</nowiki>, give a couple lines of description about the implementation, and, preferably, a link to the official page for the implementation.
 
==Conclusion==
 
If you've done all that, there's only one more thing you really ought to do: Get more people familiar with your language to fill in more tasks. Remember that page you created for "Unimplemented Tasks"? Pass that around to interested parties, and things will generally start happening.
3,022

edits