rejetto forum

Macro changing?

rejetto · 46 · 17524

Poll

What markers do you prefer?

{.macro.} and {\quoting/}
1 (7.1%)
{:macro:} and {\quoting/}
4 (28.6%)
{\macro/} and {\\quoting//}
0 (0%)
{\macro/} and {/quoting\}
0 (0%)
{.macro.} and {:quoting:}
9 (64.3%)

Total Members Voted: 12

0 Members and 1 Guest are viewing this topic.

Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
Well what about, {\macro/} {/quoting\} the opposite being a macro that will run later (thats how i see macro quoting).

now you can vote it ;)


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
Voted strictly on readability.

very good.
to vote for readability you should
1. have a in front of you a "script" of average complexity using the several options of the poll
2. be able to understand what it means
that's what i call "read" for "readability" :)


Offline TSG

  • Operator
  • Tireless poster
  • *****
    • Posts: 1935
    • View Profile
    • RAWR-Designs
What would be not bad it is that you are not the only one to be future evolutions, we would understand a little better the reasons of some of your posts

wtf are you going on about? I just suggested another idea. The reason I am trying to push a certain way of writing Macro is because i have to write this shit (no offence rejetto) for 3 templates now. I am sick of changing them for releases, I want a proper method, one that doesn't change for many months. I take a lot into account before posting my ideas, sometimes they are brief because I have spoken with rejetto personally over IM and post a small amount on the forum. Giant Eagle is not interested in Macro, so it just leaves me to write the Macros for ToG, Terayon and RAWR-Template, it is tough to fit in editing during a university semester (I study Multimedia). So if anything I, rejetto and the other common template makers (all have left except my team) should have a greater influence on the final outcome. My weight on the forum has nothing to do with my posts, ever.
</off-topic>

<on-topic>
Thanks for adding that option rejetto, but it seems a little unfair to add them without resetting the poll? I guess people can change their vote but most are lazy. Can't you make a note of these results and reset it. Ino i can't even be bothered to change my own vote lol.
« Last Edit: January 23, 2008, 06:34:12 PM by That_Stevens_Guy »


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
People who won't change their vote will likely won't even vote again.
I see the problem, but resetting seems to me more negative than positive.


Offline TSG

  • Operator
  • Tireless poster
  • *****
    • Posts: 1935
    • View Profile
    • RAWR-Designs
oh oh another idea. How about {.m.} {:q:} so 2 dots means quoted! The best of 2 worlds ;)


Offline Unknown8063

  • Occasional poster
  • *
    • Posts: 96
    • View Profile
I don't really like {.macro.} because I find the periods too easy to miss.  I am also not a fan of shuffling my slashes with {\macro/} and {/quote\}.  It's bad enough that Windows can't decide which way the slashes face in filenames/URLs :)

My first vote goes to {:macro:} and {\quote/}

If I could vote for a secondary preference I'd go with {\macro/} and {\\quote//} - the double slash // syntax is commonly used for comments in other languages which offsets the similarity between the two.
« Last Edit: January 23, 2008, 07:48:57 PM by Unknown8063 »


Offline Unknown8063

  • Occasional poster
  • *
    • Posts: 96
    • View Profile
Has anyone considered defining special XML-style tags as our macros?

<hfs:macro parameter1="value" parameter2="value"/>

or

<hfs:macro parameter1="value" parameter2="value"></hfs:macro>

Embedding macros becomes more troublesome however :(
« Last Edit: January 23, 2008, 07:56:21 PM by Unknown8063 »


Offline TSG

  • Operator
  • Tireless poster
  • *****
    • Posts: 1935
    • View Profile
    • RAWR-Designs
I have decided I am going to make a set of examples. Because i don't think people realise the importance of their decisions here. The idea is to make the code more readable and see the difference between a macro and a quote without any drastic effect that will clearly change their appearance as a macro.

1. {.macro.} and {\macro with quoting/} =
{.breadcrumbs|{\<a href="%bread-url%">{.or|%bread-name%|{.!home.}/</a>.}/}.}

2. {:macro:} and {\macro with quoting/} =
{:breadcrumbs|{\<a href="%bread-url%">{:or|%bread-name%|{:!home:}/</a>:}/}:}

3. {\macro/} and {\\macro with quoting//} =
{\breadcrumbs|{\\<a href="%bread-url%">{\or|%bread-name%|{\!home/}/</a>/}//}/}

4. {\macro/} and {/macro with quoting\} =
{\breadcrumbs|{/<a href="%bread-url%">{\or|%bread-name%|{\!home/}/</a>/}\}/}

5. {.macro.} and {:macro with quoting:} =
{.breadcrumbs|{:<a href="%bread-url%">{.or|%bread-name%|{.!home.}/</a>.}:}.}

Personally I am now swinging towards the 5th option, because they both carry a similarity between each other, 2 dots means quoted for later. There is also more white space above the fullstop which makes it a lot clearer to read, and is easier to write as it does not require a shift input (on en_us keyboard anyway). The ones with a forward slash on the end get lost in the html endings i have noticed, which has turned me off all of those, (even my own ones mars).
« Last Edit: January 24, 2008, 07:35:54 AM by That_Stevens_Guy »


Offline Mars

  • Operator
  • Tireless poster
  • *****
    • Posts: 2059
    • View Profile
just one question to TSG

http://en.wikipedia.org/wiki/Keyboard_layout#US

In the link this below which keyboard gets closer most of your


Offline TSG

  • Operator
  • Tireless poster
  • *****
    • Posts: 1935
    • View Profile
    • RAWR-Designs
I don't see a problem? I cant help that your keyboard is wrong ;). The majority of the worlds keyboards will be fine. You place a fullstop at the end of a sentence right? So you must be used to the motion. And a colon is simpler for you than it is for the English.

On the French keyboard you just have the :. on the opposite shift. So I don't see the problem. The world is a lot bigger than France.


Offline Mars

  • Operator
  • Tireless poster
  • *****
    • Posts: 2059
    • View Profile
My BIG problem is the legibility of template when you are in 1024*768 or 1152*864

a dot don't appears correctly  .:.:.:.:.:.:.:.:.:.:.:.:.::.:.:.:.:.:.:.:.:.:.:.:.:.



it more visible with \:\:\:\:\:\:\:\:      :/:/:/:/:/:/:/:/:/:/:/:/:/:/:/

Why this choice? Characters appear like this in the  Diff Template box 

For the example:
Source:
Quote
{{if|{{or|{{{{?p}}=1}}|{{not|{{?p}}}}}}||{{\{{for|B|1|{{sub|{{mul|{{^topic-limit}}|{{?p}}}}|25}}|{{\{{set|topic-order|{{cut|{{add|{{length|{{substring||;|{{^topic-order}}}}}}|2}}||{{^topic-order}}}}}}/}}/for}}/}}/if}}

Model 1: {.macro.} and {\macro with quoting/}
Quote
{.if|{.or|{.{.?p.}=1.}|{.not|{.?p.}.}.}||{\{.for|B|1|{.sub|{.mul|{.^topic-limit.}|{.?p.}.}|25.}|{\{.set|topic-order|{.cut|{.add|{.length|{.substring||;|{.^topic-order.}.}.}|2.}||{.^topic-order.}.}.}/}/for.}/}/if.}

Model 2: {:macro:} and {\macro with quoting/}
Quote
{:if|{:or|{:{:?p:}=1:}|{:not|{:?p:}:}:}||{\{:for|B|1|{:sub|{:mul|{:^topic-limit:}|{:?p:}:}|25:}|{\{:set|topic-order|{:cut|{:add|{:length|{:substring||;|{:^topic-order:}:}:}|2:}||{:^topic-order:}:}:}/}/for:}/}/if:}


Model 3: {\macro/} and {\\macro with quoting//}
Quote
{\if|{\or|{\{\?p/}=1/}|{\not|{\?p/}/}/}||{\\{\for|B|1|{\sub|{\mul|{\^topic-limit/}|{\?p/}/}|25/}|{\\{\set|topic-order|{\cut|{\add|{\length|{\substring||;|{\^topic-order/}/}/}|2/}||{\^topic-order/}/}/}//}/for/}//}/if/}

Model 4: {\macro/} and {/macro with quoting\}
Quote
{\if|{\or|{\{\?p/}=1/}|{\not|{\?p/}/}/}||{/{\for|B|1|{\sub|{\mul|{\^topic-limit/}|{\?p/}/}|25/}|{/{\set|topic-order|{\cut|{\add|{\length|{\substring||;|{\^topic-order/}/}/}|2/}||{\^topic-order/}/}/}\}/for/}\}/if/}

model 5: {.macro.} and {:macro with quoting:}
Quote
{.if|{.or|{.{.?p.}=1.}|{.not|{.?p.}.}.}||{:{.for|B|1|{.sub|{.mul|{.^topic-limit.}|{.?p.}.}|25.}|{:{.set|topic-order|{.cut|{.add|{.length|{.substring||;|{.^topic-order.}.}.}|2.}||{.^topic-order.}.}.}:}/for.}:}/if.}


MODEL 6: the best   NO CHANGE


Quote
{{if not|{{or|{{?p=1}}|{{?p=}} /or}}
           |{{\ 
                 {{for|B
                        |1
                        |{{sub|{{mul|{{^topic-limit}}| {{?p}} }} |25}}
                        |{{\
                             {{set|topic-order
                                    | {{cut|{{add|{{length|{{substring||;|{{^topic-order}} /substring}} /length}}|2 /add}}
                                             ||{{^topic-order}}}}
                                        /cut}}
                             /set}}
                         /}}
                  /for}}
            /}}
/if}}


We can put the meter to zero and add a sixth option ;D ;D ;D ;D ;D


Later each can really choose ;D ;D ;D


« Last Edit: January 24, 2008, 02:22:22 PM by mars »


Offline Mars

  • Operator
  • Tireless poster
  • *****
    • Posts: 2059
    • View Profile
Armistice of joke

at beginning of all template


<!-- HFS build x {{macros}}   {{\dequote/}}  -->
or
<!-- HFS build x {.macros.}   {\dequote/}  -->
or
<!-- HFS build x  {:macros:}   {\dequote/}  -->
or
<!-- HFS build x  {\macros/}   {\\dequote//}  -->
or
<!-- HFS build x  {\macros/}   {/dequote\}  -->
or
<!-- HFS build x  {.macros.}   {:dequote:}  -->


The advantages are:
 -  no interference with the html code
 -  we can emit a warning if the version of hfs is too former
 -  the most mattering is here:
      hfs adapts itself automatically to the syntax chosen as the macro

As it everybody will find his preference there and the portability will be complete, and in case new creators had the other preferences they would be free to decide on the fact what is best advisable to them, because we arrived there here at an enactment of election campaign >:(
« Last Edit: January 24, 2008, 02:28:59 PM by mars »


Offline Unknown8063

  • Occasional poster
  • *
    • Posts: 96
    • View Profile
MODEL 6: the best   NO CHANGE

Rejetto, where is the option to keep things as is?

I still don't like {.macro.} syntax.  It's a strange use of periods and is the easiest of the choices to miss, especially if you write it nicely tabbed like Mars' examples.

Code: [Select]
{.if not|{.or|{.?p=1.}|{.?p=.}.}
           |{:
                 {.for|B
                        |1
                        |{.sub|{.mul|{.^topic-limit.}| {.?p.} .} |25.}
                        |{:
                             {.set|topic-order
                                    | {.cut|{.add|{.length|{.substring||;|{.^topic-order.} .} .}|2.}
                                             ||{.^topic-order.}.}
                                        .}
                             .}
                         :}
                  .}
            :}
.}

However, I do dislike option 4 the most, especially after TSG's example :)
« Last Edit: January 24, 2008, 03:38:40 PM by Unknown8063 »


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
a dot don't appears correctly  .:.:.:.:.:.:.:.:.:.:.:.:.::.:.:.:.:.:.:.:.:.:.:.:.:.

i don't understand the meaning of this example, you'll never have such a thing :)
the other examples are very good.

anyway, consider that i doubt you will use this syntax for complex cases, because you'd better opt for
<?tpl {if|{or|{{?p}=1}|{not|{?p}}}||{\{for|B|1|{sub|   etc etc ...  tpl?>
this syntax will be available from #175

Rejetto, where is the option to keep things as is?

I don't want to keep it the way it is now, but you can try to change my mind if you wish.

I think we can consider this poll closed (no need to lock it).


Offline TSG

  • Operator
  • Tireless poster
  • *****
    • Posts: 1935
    • View Profile
    • RAWR-Designs
I just noticed that inside your <?tpl , which is brilliant i might add, i can use it in several places. You quote using the old \ shouldn't quoting inside <?tpl be the same as outside? even tho you use short syntax inside there. It just an idea to continue the common language properties.