Philosophical Research:MediaWiki and functional programming: Difference between revisions
Templates and lambda calculus |
Sense-labels |
||
(One intermediate revision by the same user not shown) | |||
Line 6: | Line 6: | ||
Currently, the top Template inside each Item page is more or less unique to each page. The goal is for this to eventually not be the case, and for all pages to use one particular Template to define their top Template. Currently, the structure of resident Templates is slowly evolving each time a new page is created through various pages copying the best versions of each sub-section of the Template from each other. The [[Template:WaveScore|WaveScore Template]] is the first real "success story" on this, as it is one of the few parts of the top Template that has stabilized early on and then hardly changed. The second partial success story is the [[:Category:I-Templates for Item swatches|Item icons]] — while not every single ideology which has been given a swatch color and two to three letter code has an icon template, the useful MediaWiki feature of subpages quickly made the syntax for specifying swatch colors and icon markup solid. A few pages contain a demo of a single unified Item-Template Template, but this is not being widely used yet in case it ends up with bugs. Very early on, there was an attempt to design a unified Item template before creating enough pages, and for certain reasons this ended up with a lot of buggy pages where on every single page the Template had to be replaced with manual markup to start the process of making the Template over again, so this time around the process is now going more gradually with a careful use of alternate options and backwards compatibility. As much as this may make Template pages a little harder to read and interpret, it is strictly necessary for splitting up work into tiny increments to prevent having to change thousands and thousands of pages all on one day. | Currently, the top Template inside each Item page is more or less unique to each page. The goal is for this to eventually not be the case, and for all pages to use one particular Template to define their top Template. Currently, the structure of resident Templates is slowly evolving each time a new page is created through various pages copying the best versions of each sub-section of the Template from each other. The [[Template:WaveScore|WaveScore Template]] is the first real "success story" on this, as it is one of the few parts of the top Template that has stabilized early on and then hardly changed. The second partial success story is the [[:Category:I-Templates for Item swatches|Item icons]] — while not every single ideology which has been given a swatch color and two to three letter code has an icon template, the useful MediaWiki feature of subpages quickly made the syntax for specifying swatch colors and icon markup solid. A few pages contain a demo of a single unified Item-Template Template, but this is not being widely used yet in case it ends up with bugs. Very early on, there was an attempt to design a unified Item template before creating enough pages, and for certain reasons this ended up with a lot of buggy pages where on every single page the Template had to be replaced with manual markup to start the process of making the Template over again, so this time around the process is now going more gradually with a careful use of alternate options and backwards compatibility. As much as this may make Template pages a little harder to read and interpret, it is strictly necessary for splitting up work into tiny increments to prevent having to change thousands and thousands of pages all on one day. | ||
== Programming and signifiers == | |||
templates give you the power to decide what signifiers mean and what signifiers must be used to invoke a particular meaning | |||
people do not want to be unpleasantly surprised as to what a signifier means | |||
there is a certain finality to every single thing that is said. including every single particular remark inside a particular wiki edit | |||
in everyday communication it is not natural for the meanings of somebody's words to suddenly and spontaneously be replaced, particularly two days after they said them. people expect every remark they say to make perfect sense inside its own context in the past even after time has passed and the current context of everything has changed | |||
this means you have to be careful to design things in a way that people expect, and once you have established a particular definition of things, try very hard not to change that particular promise | |||
== Simplicity is one way to consistency == | == Simplicity is one way to consistency == | ||
If you are in doubt about what parameter names a Template should use, never overlook the power of numbered arguments. If the parameters of a particular Template are always being textually entered in a certain order with no deviation from that order, and all the markup around them is only fluff toward that basic structure, turn that part of the page into a simple bar-separated array. When there is any doubt about what order things should go in, you can bring back parameter names on the optional or . | If you are in doubt about what parameter names a Template should use, never overlook the power of numbered arguments. If the parameters of a particular Template are always being textually entered in a certain order with no deviation from that order, and all the markup around them is only fluff toward that basic structure, turn that part of the page into a simple bar-separated array. When there is any doubt about what order things should go in, you can bring back parameter names on the optional or order-independent arguments. | ||
<em>Do</em> reuse the same parameter labels used in other templates, and attribute names from HTML. This will help make it intuitive exactly what each parameter does, and may make parameters easier to remember. | |||
== Templates and lambda calculus == | == Templates and lambda calculus == | ||
Line 16: | Line 30: | ||
This is about what Templates have done to communication. A Template can contain almost anything. It is simply a name and a slot, like a lambda function, but whatever goes into the slot will come out in a particular presentation or go through other Templates inside, or branching paths of which things to show and hide. This makes Templates very powerful. A Template can practically turn into a small math problem full of simple propositions and beta reductions that interpret them. In practice it may be important to optimize computations by making sure Templates do not go too many levels deep, but at the same time, the number of computations that can safely go on in each Template is surprising. If you want Templates to [[Template:TTS|remove the confusion of putting links and Templates together]], with a little effort you can do it, and give a Template a <code>href</code> parameter in imitation of HTML links. If you feel like new users will be slightly overwhelmed by the HTML <code>cite</code> tag, you can create a Template that makes it a little easier, and also has the ability to [[Template:book|throw in the Item link associated with a book]]. Templates can redesign the whole paradigm of HTML the way it "really should have been". They can potentially make code more legible to screen readers. They can take the nonsense out of things, although only if the person writing them first has sense. | This is about what Templates have done to communication. A Template can contain almost anything. It is simply a name and a slot, like a lambda function, but whatever goes into the slot will come out in a particular presentation or go through other Templates inside, or branching paths of which things to show and hide. This makes Templates very powerful. A Template can practically turn into a small math problem full of simple propositions and beta reductions that interpret them. In practice it may be important to optimize computations by making sure Templates do not go too many levels deep, but at the same time, the number of computations that can safely go on in each Template is surprising. If you want Templates to [[Template:TTS|remove the confusion of putting links and Templates together]], with a little effort you can do it, and give a Template a <code>href</code> parameter in imitation of HTML links. If you feel like new users will be slightly overwhelmed by the HTML <code>cite</code> tag, you can create a Template that makes it a little easier, and also has the ability to [[Template:book|throw in the Item link associated with a book]]. Templates can redesign the whole paradigm of HTML the way it "really should have been". They can potentially make code more legible to screen readers. They can take the nonsense out of things, although only if the person writing them first has sense. | ||
== Sense-labels == | |||
A sense-label can do basically anything an Item's top template can do. In some very special cases, sense labels may be used to extend the functionality of the Item. On [[E:Q618|Q618 "Proposed Item"]], each sense-label is loosely treated as a sub-Entity representing a proposed Item from every major philosophy this wiki has assigned a color swatch or text-based philosophy tag; the main Item allows template calls to change its dimensionality or display it in a list-item tag, and so the sense-labels have these outward-facing parameters too. In general, you should think carefully about adding outward-facing parameters to an Item page, given the fact they will be used on other Item pages and could potentially break these other pages if you change anything. However, if one sense-label already has a parameter and the others don't, you should feel free to at least make sure all sense-labels have the same parameters so they all function the same. | |||
Line 21: | Line 39: | ||
[[Category:Wiki editing manual]] | [[Category:Wiki editing manual]] <!-- | ||
redirects to this page: Research:Templates and functional programming | |||
--> |
Latest revision as of 21:40, 20 August 2025
One very important concept you need to know for editing this wiki is MediaWiki templates. While a Template may seem like a mere way to simplify wiki markup, it is actually much more. Once you actually know how to use Templates, you will realize that what Templates actually do is turn spoken language into functional programming. This has a lot of further implications, both in the sense of how immensely useful Templates can be and potential caveats of using them.
Templates and Ontology entries[edit]
Each Item or Term entry on this wiki (these are pages within the Ontology: and Term: namespaces) contains a resident Template, generally always parked at the top of the page. These Templates are used to reference that Item or Term in data tables or numbered lists on other pages. This means that whenever the main outward-facing label of an Item changes, it will automatically be updated on every single other page that uses it, and if the Template contains multiple languages, it may be able to automatically display the title in another language based on the language set on the page which is calling it. (This localization feature is not well tested or implemented currently.)
Currently, the top Template inside each Item page is more or less unique to each page. The goal is for this to eventually not be the case, and for all pages to use one particular Template to define their top Template. Currently, the structure of resident Templates is slowly evolving each time a new page is created through various pages copying the best versions of each sub-section of the Template from each other. The WaveScore Template is the first real "success story" on this, as it is one of the few parts of the top Template that has stabilized early on and then hardly changed. The second partial success story is the Item icons — while not every single ideology which has been given a swatch color and two to three letter code has an icon template, the useful MediaWiki feature of subpages quickly made the syntax for specifying swatch colors and icon markup solid. A few pages contain a demo of a single unified Item-Template Template, but this is not being widely used yet in case it ends up with bugs. Very early on, there was an attempt to design a unified Item template before creating enough pages, and for certain reasons this ended up with a lot of buggy pages where on every single page the Template had to be replaced with manual markup to start the process of making the Template over again, so this time around the process is now going more gradually with a careful use of alternate options and backwards compatibility. As much as this may make Template pages a little harder to read and interpret, it is strictly necessary for splitting up work into tiny increments to prevent having to change thousands and thousands of pages all on one day.
Programming and signifiers[edit]
templates give you the power to decide what signifiers mean and what signifiers must be used to invoke a particular meaning
people do not want to be unpleasantly surprised as to what a signifier means
there is a certain finality to every single thing that is said. including every single particular remark inside a particular wiki edit
in everyday communication it is not natural for the meanings of somebody's words to suddenly and spontaneously be replaced, particularly two days after they said them. people expect every remark they say to make perfect sense inside its own context in the past even after time has passed and the current context of everything has changed
this means you have to be careful to design things in a way that people expect, and once you have established a particular definition of things, try very hard not to change that particular promise
Simplicity is one way to consistency[edit]
If you are in doubt about what parameter names a Template should use, never overlook the power of numbered arguments. If the parameters of a particular Template are always being textually entered in a certain order with no deviation from that order, and all the markup around them is only fluff toward that basic structure, turn that part of the page into a simple bar-separated array. When there is any doubt about what order things should go in, you can bring back parameter names on the optional or order-independent arguments.
Do reuse the same parameter labels used in other templates, and attribute names from HTML. This will help make it intuitive exactly what each parameter does, and may make parameters easier to remember.
Templates and lambda calculus[edit]
There is a field of mathematics called lambda calculus — in practical terms this name approximately means "function mathematics". This field of mathematics is basically the practice of constructing everything in mathematics from functions, including booleans and integer numbers. With the correct mildly-frightening tree-branch figure of functions, any function ever invented in other fields of mathematics can be reconstructed out of functions and calculated using the function tree and a few simple rules.
This is about what Templates have done to communication. A Template can contain almost anything. It is simply a name and a slot, like a lambda function, but whatever goes into the slot will come out in a particular presentation or go through other Templates inside, or branching paths of which things to show and hide. This makes Templates very powerful. A Template can practically turn into a small math problem full of simple propositions and beta reductions that interpret them. In practice it may be important to optimize computations by making sure Templates do not go too many levels deep, but at the same time, the number of computations that can safely go on in each Template is surprising. If you want Templates to remove the confusion of putting links and Templates together, with a little effort you can do it, and give a Template a href
parameter in imitation of HTML links. If you feel like new users will be slightly overwhelmed by the HTML cite
tag, you can create a Template that makes it a little easier, and also has the ability to throw in the Item link associated with a book. Templates can redesign the whole paradigm of HTML the way it "really should have been". They can potentially make code more legible to screen readers. They can take the nonsense out of things, although only if the person writing them first has sense.
Sense-labels[edit]
A sense-label can do basically anything an Item's top template can do. In some very special cases, sense labels may be used to extend the functionality of the Item. On Q618 "Proposed Item", each sense-label is loosely treated as a sub-Entity representing a proposed Item from every major philosophy this wiki has assigned a color swatch or text-based philosophy tag; the main Item allows template calls to change its dimensionality or display it in a list-item tag, and so the sense-labels have these outward-facing parameters too. In general, you should think carefully about adding outward-facing parameters to an Item page, given the fact they will be used on other Item pages and could potentially break these other pages if you change anything. However, if one sense-label already has a parameter and the others don't, you should feel free to at least make sure all sense-labels have the same parameters so they all function the same.
(unfinished)