Wikibooks talk:WikiProject Ada
Add topicArchives |
---|
Welcome to the Contributors lounge — here we discuss how to create an even better Wikibook.
Ada Development Environment
[edit source]I propose to add a section just after the section "Building an Ada Program" (see "Program in Ada" / "Getting Started"):
Ada Development Environment
It should give advice about infrastructures, tools, methodologies...
— Preceding unsigned comment added by Didier Willame (talk • contribs)
- I think it's a good idea, feel free to add a new section. In the future, if the contents grow a lot maybe it should be moved to a new chapter (with more advanced topics, instead of introductory ones). Cheers —surueña 11:32, 30 June 2012 (UTC)
Reorganization of categories
[edit source]Hello, I've been ordering a bit the categories. For example, until now both Category:Book:Ada Programming/Interfacing pragmas and Category:Book:Ada Programming/Representation pragmas were direct subcategories of Category:Book:Ada Programming, but I've moved them to a new Category:Book:Ada Programming/Pragmas to reduce the number of subcategories in the main one, and for easier navigation of that topic. The same for the Category:Book:Ada Programming/Ada 2005 feature and Category:Book:Ada Programming/Ada 2005 incompatibilities (now under the new Category:Book:Ada Programming/Ada 2005), and so on.
In addition, I was thinking on separating the categories related to Ada characteristics with internal categories specific to the wikibook maintenance, like Category:Book:Ada Programming/Maintenance, Category:Book:Ada Programming/Print version, or Category:Book:Ada Programming/Templates, to ease navigation through the categories and also to reduce misunderstandings. For example, C programmers would think that Category:Book:Ada Programming/Templates is related to generic programming, but actually it just contains all the wikibook templates used in the book. That is, to clearly separate chapters of the training material from those pages just interesting to contributors.
My proposal is to rename those categories with the "Wikibook:" prefix, e.g. Category:Book:Ada Programming/Wikibook:Maintenance. If no objections are made, I volunteer for the task, of course ;-) Cheers —surueña 11:26, 30 June 2012 (UTC)
- I agree with the proposal in general but not about the naming. I think that copying the syntax used by Mediawiki for namespaces is a bit confusing. I'd rather name them with subpages, that is Category:Book:Ada Programming/Wikibook/Maintenance,Category:Book:Ada Programming/Wikibook/Templates, etc. On the other hand, I see that other books are not so internally subcategorized, and moreover see this category and what it does mean: Category:Book:C Programming/Templates. ManuelGR (discuss • contribs) 12:17, 30 June 2012 (UTC)
- Good point, maybe that pseudo-namespace prefix can be misleading. I have asked for more opinions at Wikibooks:Reading room/General#Naming convention for contributors' pages, maybe there's even an existing policy in place. In addition, I've broadened to topic for normal contributor's pages as well, not just categories. With respect to Category:Book:C Programming/Templates, this category was created at August 2009 whereas Category:Book:Ada Programming/Templates is from December 2008, so maybe they just copied our convention... ;-) —surueña 14:22, 30 June 2012 (UTC)
- I like the proposals discussed, are certainly better than my original one and we also follow the usual conventions. So what about:
- No need to rename any category, just move the internal maintenance categories to new category Category:Book:Ada Programming/Wikibook (I prefer that name than Category:Book:Ada Programming/Contributing, I think it's more generic):
- Category:Book:Ada Programming/Templates
- Category:Book:Ada Programming/Maintenance
- Category:Book:Ada Programming/Print version (well, maybe this one should still hang from the main category, what do you think?)
- Move Talk:Ada Programming/Contributing to Wikibooks:WikiProject Ada (shared for all Ada-related wikibooks)
- Move Talk:Ada Programming/Contributing/Discussion to Wikibooks talk:WikiProject Ada
- Move Talk:Ada Programming/Contributors lounge to Wikibooks:WikiProject Ada/Contributors lounge
- No need to rename any category, just move the internal maintenance categories to new category Category:Book:Ada Programming/Wikibook (I prefer that name than Category:Book:Ada Programming/Contributing, I think it's more generic):
- And this is also much easier and less work! If you agree, I can handle it in a moment. Thanks again for your help! —surueña 12:12, 1 July 2012 (UTC)
- I like the proposals discussed, are certainly better than my original one and we also follow the usual conventions. So what about:
- I agree completely with your proposal. Regarding Category:Book:C Programming/Templates date, I'm not surprised. In many ways we have inspired some developments in other books. We are leading the way! Take a look at Template:C Programming/kw (started, an adaptation of Template:Ada/kw) Not sure about Category:Book:Ada Programming/Print version, but in case of doubt leave it as it is. In fact it is book content. ManuelGR (discuss • contribs) 19:37, 2 July 2012 (UTC)
- Even simpler, you could move Talk:Ada Programming/Contributors lounge to Wikibooks talk:WikiProject Ada. – Adrignola discuss 20:57, 2 July 2012 (UTC)
- Done! So finally:
- created new category Category:Book:Ada Programming/Wikibook to organize the internal templates and maintenance categories (Category:Book:Ada Programming/Print version and Category:Book:Ada Programming/Figures are classified both into the Category:Book:Ada Programming and Category:Book:Ada Programming/Wikibook because are relevant for readers and contributors).
- Talk:Ada Programming/Contributing moved to Wikibooks:WikiProject Ada
- Talk:Ada Programming/Contributors lounge moved to Wikibooks talk:WikiProject Ada
- Talk:Ada Programming/Contributing/Discussion moved to Wikibooks talk:WikiProject Ada/Archive 0
- The advantage of directly moving the contributors lounge to the wikiproject's talk page is that now the discussion pages are centralized into this very page and Talk:Ada Programming. Thanks again for your great ideas! Cheers —surueña 19:14, 3 July 2012 (UTC)
- Done! So finally:
Should we change how to format code samples in future?
[edit source]When the project started WikiBooks did not support syntax highlight for code so we implemented and we needed to use crude way of syntax highlight using templates. However this has changed and we might want to update the code samples to make use of new features. I see the following options:
Current technique
[edit source]Advantage: all keywords are links
Disadvantage: Code needs to be converted with Vim-script.
with
Ada.Text_IO;procedure
Hellois
begin
Ada.Text_IO.Put_Line("Hello, world!");end
Hello;
using <source lang="ada">
[edit source]Advantage: simple copy/page, better syntax highlight.
Disadvantage: No links.
with Ada.Text_IO;
procedure Hello_World_2 is
package IO renames Ada.Text_IO;
begin
IO.Put_Line ("Hello World!");
IO.New_Line;
IO.Put_Line ("I am an Ada program with package rename.");
end Hello_World_2;
using {{Code:Output}}
[edit source]Advantage: all keywords are links, code and output shown.
Disadvantage: Code needs to be converted with Vim-script, disruptive colours.
with
Ada.Text_IO;procedure
Hellois
use
Ada.Text_IO;begin
Put_Line("Hello, world!"); New_Line; Put_Line("I am an Ada program with package use.");end
Hello;
>alr run hello_world_3
ⓘ Building basic=1.0.1/basic.gpr...
gprbuild: "hello_world_1" up to date
gprbuild: "hello_world_2" up to date
gprbuild: "hello_world_3" up to date
gprbuild: "hello_world_4" up to date
✓ Build finished successfully in 0.64 seconds.
Hello World!
I am an Ada program with local package use.
with {{Code:Output}} and <source lang="ada">
[edit source]Advantage: simple copy/page, better syntax highlight, code and output shown.
Disadvantage: No links, disruptive colours.
with Ada.Text_IO;
use Ada.Text_IO;
procedure Hello_World_4 is
begin
Put_Line ("Hello World!");
New_Line;
Put_Line ("I am an Ada program with global package use.");
end Hello_World_4;
>alr run hello_world_4
ⓘ Synchronizing workspace...
Nothing to update.
ⓘ Building basic=1.0.1/basic.gpr...
gprbuild: "hello_world_1" up to date
gprbuild: "hello_world_2" up to date
gprbuild: "hello_world_3" up to date
gprbuild: "hello_world_4" up to date
✓ Build finished successfully in 0.37 seconds.
Hello World!
I am an Ada program with global package use.
Krischik T " class="ext-discussiontools-init-timestamplink">09:07, 1 April 2024 (UTC)
- I'm not sure. I guess if most examples are short then keyword links might be more useful than syntax highlighting. Such as if interface is used. Or perhaps keyword links can be used for examples with more exotic keywords. 92.40.204.136 (discuss) 09:21, 1 April 2024 (UTC)
- Yes, that is a good point. And length is not that much of a problem as the conversion is done via Vim-Script (or similar). It would need to be updated to include the new Ada 2022 keywords. Krischik T 15:32, 1 April 2024 (UTC)
- The links to keywords, and also to standard packages, are important, in my opinion; but, definitely, we should facilitate editing and for that, it is much easier to use the `source` tag. So, I'd keep the template code in the short snippets used for teaching, and use the `source` tag for longer examples.
- One thing we might consider is changing the colors of the template code to match the ones of the `source` tags. In that case, the visual consistency of the book would be better. The only disadvantage that I find is that the only clue for the keyword/package links would require hovering.
- By the way, I'm using ASnip by GorgeUbuasha, which also gives good results and can be invoked from the editor (Emacs in my case). ManuelGR (discuss • contribs) 18:56, 5 April 2024 (UTC)
- By the way, to judge the syntax highlighting of both options, one should use all the templates for the template version (there are templates for strings and comments, although we are mostly using only the ones that provide links).
Templates:
with
Ada.Text_IO; -- A hello world programprocedure
Hellois
use
Ada.Text_IO;begin
Put_Line("Hello, world!"); New_Line; Put_Line("I am an Ada program with package use.");end
Hello;
Source tag:
with Ada.Text_IO;
-- A hello world program
procedure Hello is
use Ada.Text_IO;
begin
Put_Line("Hello, world!");
New_Line;
Put_Line("I am an Ada program with package use.");
end Hello;
ManuelGR (discuss • contribs) " class="ext-discussiontools-init-timestamplink">19:18, 5 April 2024 (UTC)
- I've implemented the homogenization of the colours in the wikibook in Spanish, where I'm the only one remaining editor. I think it looks great and would like to implement the same thing here, if you don't disagree. I've also added links in the string and comment templates to the corresponding book pages where strings or comments are explained. See an example here: https://es.wikibooks.org/wiki/Programación_en_Ada/Unidades_predefinidas/Ada.Text_IO.Editing And here is an example of a page where a first code snippet is using templates, and the Standard package specification using the
source
tag: https://es.wikibooks.org/wiki/Programación_en_Ada/Unidades_predefinidas/Standard ManuelGR (discuss • contribs) 18:27, 8 April 2024 (UTC)