Rosetta Code:Village Pump/SMW Examples by language and concept: Difference between revisions

Responses
(Initial plan...RFC.)
 
(Responses)
Line 11:
:*The property name I thought of was "Demonstration of"
:*The idea would be to have one of these properties for each language (i.e. "Demonstration of/Language name")
:: If I understand SMW, the more natural form would be a property of [[Property:Demonstration of]], and applying the property would be of the form <nowiki>[[Demonstration of::Language name]]</nowiki>--[[User:Short Circuit|Michael Mol]] 14:30, 29 June 2011 (UTC)
::*Ideally these pages would be automatically generated by a bot when a new language is created. Do we still have a bot that does that stuff?
::: No, ImplSearchBot died ages ago. I think it may be worthwhile to create a "implicit page content" extension for uncreated pages. Reduces database bloat from edits-over-time, and can still be overridden. Otherwise, we could create a MW extension that provides a page under the Special: namespace. --[[User:Short Circuit|Michael Mol]] 14:30, 29 June 2011 (UTC)
:*Having it organized this way would show a list of tasks on that page and each task would have a list of programming concepts
::*There may be a way to organize it the other way ("concepts with task lists"), or still another way to have it organized as "tasks with concept lists" and then also have a semantic query to show "concepts with task lists"
::Yup; that could easily be done with an in-line semantic query. SMW's analog to "select tasks and concepts where language is ?" --[[User:Short Circuit|Michael Mol]] 14:30, 29 June 2011 (UTC)
:*Concepts would have their own pages explaining what they are, but that might not be necessary
*Tagging template:
:*I was thinking the form would be <nowiki>{{demonstrates|concept|language}} which would tag the page with [[demonstration of/language::concept]]</nowiki>. It can be read as "this example demonstrates concept in language".
:: The more natural SMW form, I think, would have the page tag with <nowiki>[[demonstration of::language]][[shows concept::concept]]</nowiki>. (It may be desirable to use [[Property:Demonstrates language]] and [[Property:Demonstrates concept]], rather than [[Property:Demonstration of]]; you can have languages and concepts (and many other things, such as implementations, libraries, etc) which share names, but you wouldn't want to confuse the engine into thinking one is the other. --[[User:Short Circuit|Michael Mol]] 14:30, 29 June 2011 (UTC)
::*This of course is dependent on dicussions about the property organization
:*This template should go under each language header as the examples get tagged, and it would not display anything. We would need one template for each concept (a la {{tmpl|works with}}).
:: It might be worthwhile to tag tasks with [[Property:Invokes concept]], and examples with [[Property:Demonstrates concept]] or [[Property:Demonstrates concept workaround]]. Then, at some later date, we may be able to pull examples into their own pages, and use the same core example code as solutions for multiple tasks. --[[User:Short Circuit|Michael Mol]] 14:30, 29 June 2011 (UTC)
*Possible problems:
:*Non-standard concept names