Re: [tw5] Railroad plugin: one way to setup a tiddler transclusion template

2023-06-20 Thread Charlie Veniot
Incrementally and iteratively, getting to Railroad Diagram ZEN.

A barebones-beginning railroad diagram editor tagged as 
$:/tags/ViewTemplate, with one edit text field to enter the railroad 
diagram text, and the other edit field to describe the bits in the diagram.

The macros to transclude the diagram, to transclude the description, and to 
transclude a "Syntax" documentation block:

```
\define myRdg()


<$wikify name=this_text text={{!!rdg}}>
<$railroad text=<>/>



\end
\define myRdgDesc()
{{!!rdg_desc}}
\end
\define myRdgAll()
!! Syntax
<>
<>
\end
```

The result:

[image: Screenshot 2023-06-20 7.25.04 PM.png]

On Monday, June 19, 2023 at 12:39:38 PM UTC-3 Charlie Veniot wrote:

> The only way for me to remember that "=" prefix, I think, is by applying 
> it often.
>
> Taking Brian's approach to simplify things by dumping addsuffix and 
> addprefix:
>
> ```
> <$railroad text={{{
> =[["]] =[] =[["]]
> =[["("]]
> =[[<"numValue1">]]
> =[[","]]
> =[[<"numValue2">]]
> =[[")"]]
> +[join[]]
> }}}>
> ```
> On Monday, June 19, 2023 at 2:06:23 AM UTC-3 Charlie Veniot wrote:
>
>> Delayed reaction:
>>
>> I do very much like this, though:
>>
>> ```
>> [["]] [] =[["]]
>> ```
>>
>> I rarely run into de-duplication issues, so I keep forgetting about that 
>> "x-nay de-duplication, eh?" prefix.
>>
>> I've got to figure out a way to remember that.
>> On Monday, June 19, 2023 at 1:30:43 AM UTC-3 Charlie Veniot wrote:
>>
>>> Looking back at my OP, it became a game of Where's Waldo because of a 
>>> mismatch between the number of lines in the macrocall and number of nodes 
>>> in the railroad diagram.
>>>
>>> The fix:
>>>
>>> ```
>>> !! Syntax
>>>
>>> <$railroad text={{{
>>> [addprefix["]addsuffix["]]
>>> [["("]]
>>> [[<"numValue1">]]
>>> [[","]]
>>> [[<"numValue2">]]
>>> [[")"]]
>>> +[join[]]
>>> }}}>
>>> ```
>>>
>>> On Monday, June 19, 2023 at 1:22:08 AM UTC-3 Charlie Veniot wrote:
>>>
 Definitely more concise with fewer square brackets going on.

 My challenge is it makes it harder to make a one-to-one relationship 
 between the "bubbles" in the diagram and the pieces related to the 
 bubbles.  Kind of like I'm playing a  game of "Where's Waldo".

 But that's part and parcel of my cognitive disability.

 I think loads of folk would appreciate your less verbose approach.  
 Thanks !

 On Sunday, June 18, 2023 at 11:45:44 PM UTC-3 Brian Theado wrote:

> On Sun, Jun 18, 2023 at 5:36 PM Charlie Veniot  
> wrote:
>
>> If you have an approach you think is simpler than the one described 
>> above, please let everybody know about it.
>>
>
> Here is one I find simpler (YMMV):
>
> ```
> <$railroad text={{{
> [["]addsuffixaddsuffix["]]
>
> [["(" <"numValue1"> "," <"numValue2"> ")"]]
> +[join[]]
> }}}/>
> ```
>
> and a slight variation:
>
> ```
> <$railroad text={{{
> [["]] [] =[["]]
>
> [["(" <"numValue1"> "," <"numValue2"> ")"]]
> +[join[]]
> }}}/>
> ```
>
> For me the first line in each of the above read slightly easier than 
> that addprefix/addsuffix combination since I don't need to mentally 
> re-order anything. And having all the quoting together in a single line 
> (2nd line in each of the above) I found it easier to read since at a 
> glance 
> I can tell everything on that line is part of one static string.
>
> Maybe these small tweaks aren't what you had in mind, but I thought 
> I'd share in case it helps.
>
> Also, the future 5.3 version of Tiddlywiki might introduce 
> substitution within attribute values: 
> https://tiddlywiki5-git-fork-saqimtiaz-textsubstitution-jermolene.vercel.app/#Substituted%20Attribute%20Values.
>  
> With that feature, you could do this:
>
> ```
> <$railroad text=`"$(currentTiddler)$" "(" <"numValue1"> "," 
> <"numValue2">")"`/>
> ```
>
> I know Charlie has a self-imposed policy not to upgrade past 5.2.3, so 
> this last one is for others who might be interested.
>


-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/7ca5f841-93f9-481d-9f98-0233baa8edecn%40googlegroups.com.


Re: [tw5] Railroad plugin: one way to setup a tiddler transclusion template

2023-06-19 Thread Charlie Veniot
The only way for me to remember that "=" prefix, I think, is by applying it 
often.

Taking Brian's approach to simplify things by dumping addsuffix and 
addprefix:

```
<$railroad text={{{
=[["]] =[] =[["]]
=[["("]]
=[[<"numValue1">]]
=[[","]]
=[[<"numValue2">]]
=[[")"]]
+[join[]]
}}}>
```
On Monday, June 19, 2023 at 2:06:23 AM UTC-3 Charlie Veniot wrote:

> Delayed reaction:
>
> I do very much like this, though:
>
> ```
> [["]] [] =[["]]
> ```
>
> I rarely run into de-duplication issues, so I keep forgetting about that 
> "x-nay de-duplication, eh?" prefix.
>
> I've got to figure out a way to remember that.
> On Monday, June 19, 2023 at 1:30:43 AM UTC-3 Charlie Veniot wrote:
>
>> Looking back at my OP, it became a game of Where's Waldo because of a 
>> mismatch between the number of lines in the macrocall and number of nodes 
>> in the railroad diagram.
>>
>> The fix:
>>
>> ```
>> !! Syntax
>>
>> <$railroad text={{{
>> [addprefix["]addsuffix["]]
>> [["("]]
>> [[<"numValue1">]]
>> [[","]]
>> [[<"numValue2">]]
>> [[")"]]
>> +[join[]]
>> }}}>
>> ```
>>
>> On Monday, June 19, 2023 at 1:22:08 AM UTC-3 Charlie Veniot wrote:
>>
>>> Definitely more concise with fewer square brackets going on.
>>>
>>> My challenge is it makes it harder to make a one-to-one relationship 
>>> between the "bubbles" in the diagram and the pieces related to the 
>>> bubbles.  Kind of like I'm playing a  game of "Where's Waldo".
>>>
>>> But that's part and parcel of my cognitive disability.
>>>
>>> I think loads of folk would appreciate your less verbose approach.  
>>> Thanks !
>>>
>>> On Sunday, June 18, 2023 at 11:45:44 PM UTC-3 Brian Theado wrote:
>>>
 On Sun, Jun 18, 2023 at 5:36 PM Charlie Veniot  
 wrote:

> If you have an approach you think is simpler than the one described 
> above, please let everybody know about it.
>

 Here is one I find simpler (YMMV):

 ```
 <$railroad text={{{
 [["]addsuffixaddsuffix["]]

 [["(" <"numValue1"> "," <"numValue2"> ")"]]
 +[join[]]
 }}}/>
 ```

 and a slight variation:

 ```
 <$railroad text={{{
 [["]] [] =[["]]

 [["(" <"numValue1"> "," <"numValue2"> ")"]]
 +[join[]]
 }}}/>
 ```

 For me the first line in each of the above read slightly easier than 
 that addprefix/addsuffix combination since I don't need to mentally 
 re-order anything. And having all the quoting together in a single line 
 (2nd line in each of the above) I found it easier to read since at a 
 glance 
 I can tell everything on that line is part of one static string.

 Maybe these small tweaks aren't what you had in mind, but I thought I'd 
 share in case it helps.

 Also, the future 5.3 version of Tiddlywiki might introduce substitution 
 within attribute values: 
 https://tiddlywiki5-git-fork-saqimtiaz-textsubstitution-jermolene.vercel.app/#Substituted%20Attribute%20Values.
  
 With that feature, you could do this:

 ```
 <$railroad text=`"$(currentTiddler)$" "(" <"numValue1"> "," 
 <"numValue2">")"`/>
 ```

 I know Charlie has a self-imposed policy not to upgrade past 5.2.3, so 
 this last one is for others who might be interested.

>>>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/2196e9ae-e7f4-4b48-a7a1-6e3303901c20n%40googlegroups.com.


Re: [tw5] Railroad plugin: one way to setup a tiddler transclusion template

2023-06-18 Thread Charlie Veniot
Delayed reaction:

I do very much like this, though:

```
[["]] [] =[["]]
```

I rarely run into de-duplication issues, so I keep forgetting about that 
"x-nay de-duplication, eh?" prefix.

I've got to figure out a way to remember that.
On Monday, June 19, 2023 at 1:30:43 AM UTC-3 Charlie Veniot wrote:

> Looking back at my OP, it became a game of Where's Waldo because of a 
> mismatch between the number of lines in the macrocall and number of nodes 
> in the railroad diagram.
>
> The fix:
>
> ```
> !! Syntax
>
> <$railroad text={{{
> [addprefix["]addsuffix["]]
> [["("]]
> [[<"numValue1">]]
> [[","]]
> [[<"numValue2">]]
> [[")"]]
> +[join[]]
> }}}>
> ```
>
> On Monday, June 19, 2023 at 1:22:08 AM UTC-3 Charlie Veniot wrote:
>
>> Definitely more concise with fewer square brackets going on.
>>
>> My challenge is it makes it harder to make a one-to-one relationship 
>> between the "bubbles" in the diagram and the pieces related to the 
>> bubbles.  Kind of like I'm playing a  game of "Where's Waldo".
>>
>> But that's part and parcel of my cognitive disability.
>>
>> I think loads of folk would appreciate your less verbose approach.  
>> Thanks !
>>
>> On Sunday, June 18, 2023 at 11:45:44 PM UTC-3 Brian Theado wrote:
>>
>>> On Sun, Jun 18, 2023 at 5:36 PM Charlie Veniot  
>>> wrote:
>>>
 If you have an approach you think is simpler than the one described 
 above, please let everybody know about it.

>>>
>>> Here is one I find simpler (YMMV):
>>>
>>> ```
>>> <$railroad text={{{
>>> [["]addsuffixaddsuffix["]]
>>>
>>> [["(" <"numValue1"> "," <"numValue2"> ")"]]
>>> +[join[]]
>>> }}}/>
>>> ```
>>>
>>> and a slight variation:
>>>
>>> ```
>>> <$railroad text={{{
>>> [["]] [] =[["]]
>>>
>>> [["(" <"numValue1"> "," <"numValue2"> ")"]]
>>> +[join[]]
>>> }}}/>
>>> ```
>>>
>>> For me the first line in each of the above read slightly easier than 
>>> that addprefix/addsuffix combination since I don't need to mentally 
>>> re-order anything. And having all the quoting together in a single line 
>>> (2nd line in each of the above) I found it easier to read since at a glance 
>>> I can tell everything on that line is part of one static string.
>>>
>>> Maybe these small tweaks aren't what you had in mind, but I thought I'd 
>>> share in case it helps.
>>>
>>> Also, the future 5.3 version of Tiddlywiki might introduce substitution 
>>> within attribute values: 
>>> https://tiddlywiki5-git-fork-saqimtiaz-textsubstitution-jermolene.vercel.app/#Substituted%20Attribute%20Values.
>>>  
>>> With that feature, you could do this:
>>>
>>> ```
>>> <$railroad text=`"$(currentTiddler)$" "(" <"numValue1"> "," 
>>> <"numValue2">")"`/>
>>> ```
>>>
>>> I know Charlie has a self-imposed policy not to upgrade past 5.2.3, so 
>>> this last one is for others who might be interested.
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/f6fa4cc8-aa33-4d51-aa77-c662b1fbfb2fn%40googlegroups.com.


Re: [tw5] Railroad plugin: one way to setup a tiddler transclusion template

2023-06-18 Thread Charlie Veniot
Looking back at my OP, it became a game of Where's Waldo because of a 
mismatch between the number of lines in the macrocall and number of nodes 
in the railroad diagram.

The fix:

```
!! Syntax

<$railroad text={{{
[addprefix["]addsuffix["]]
[["("]]
[[<"numValue1">]]
[[","]]
[[<"numValue2">]]
[[")"]]
+[join[]]
}}}>
```

On Monday, June 19, 2023 at 1:22:08 AM UTC-3 Charlie Veniot wrote:

> Definitely more concise with fewer square brackets going on.
>
> My challenge is it makes it harder to make a one-to-one relationship 
> between the "bubbles" in the diagram and the pieces related to the 
> bubbles.  Kind of like I'm playing a  game of "Where's Waldo".
>
> But that's part and parcel of my cognitive disability.
>
> I think loads of folk would appreciate your less verbose approach.  Thanks 
> !
>
> On Sunday, June 18, 2023 at 11:45:44 PM UTC-3 Brian Theado wrote:
>
>> On Sun, Jun 18, 2023 at 5:36 PM Charlie Veniot  wrote:
>>
>>> If you have an approach you think is simpler than the one described 
>>> above, please let everybody know about it.
>>>
>>
>> Here is one I find simpler (YMMV):
>>
>> ```
>> <$railroad text={{{
>> [["]addsuffixaddsuffix["]]
>>
>> [["(" <"numValue1"> "," <"numValue2"> ")"]]
>> +[join[]]
>> }}}/>
>> ```
>>
>> and a slight variation:
>>
>> ```
>> <$railroad text={{{
>> [["]] [] =[["]]
>>
>> [["(" <"numValue1"> "," <"numValue2"> ")"]]
>> +[join[]]
>> }}}/>
>> ```
>>
>> For me the first line in each of the above read slightly easier than that 
>> addprefix/addsuffix combination since I don't need to mentally re-order 
>> anything. And having all the quoting together in a single line (2nd line in 
>> each of the above) I found it easier to read since at a glance I can tell 
>> everything on that line is part of one static string.
>>
>> Maybe these small tweaks aren't what you had in mind, but I thought I'd 
>> share in case it helps.
>>
>> Also, the future 5.3 version of Tiddlywiki might introduce substitution 
>> within attribute values: 
>> https://tiddlywiki5-git-fork-saqimtiaz-textsubstitution-jermolene.vercel.app/#Substituted%20Attribute%20Values.
>>  
>> With that feature, you could do this:
>>
>> ```
>> <$railroad text=`"$(currentTiddler)$" "(" <"numValue1"> "," 
>> <"numValue2">")"`/>
>> ```
>>
>> I know Charlie has a self-imposed policy not to upgrade past 5.2.3, so 
>> this last one is for others who might be interested.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/092c141a-fa0f-4984-a89f-90f07fe1b6e3n%40googlegroups.com.


Re: [tw5] Railroad plugin: one way to setup a tiddler transclusion template

2023-06-18 Thread Charlie Veniot
Definitely more concise with fewer square brackets going on.

My challenge is it makes it harder to make a one-to-one relationship 
between the "bubbles" in the diagram and the pieces related to the 
bubbles.  Kind of like I'm playing a  game of "Where's Waldo".

But that's part and parcel of my cognitive disability.

I think loads of folk would appreciate your less verbose approach.  Thanks !

On Sunday, June 18, 2023 at 11:45:44 PM UTC-3 Brian Theado wrote:

> On Sun, Jun 18, 2023 at 5:36 PM Charlie Veniot  wrote:
>
>> If you have an approach you think is simpler than the one described 
>> above, please let everybody know about it.
>>
>
> Here is one I find simpler (YMMV):
>
> ```
> <$railroad text={{{
> [["]addsuffixaddsuffix["]]
>
> [["(" <"numValue1"> "," <"numValue2"> ")"]]
> +[join[]]
> }}}/>
> ```
>
> and a slight variation:
>
> ```
> <$railroad text={{{
> [["]] [] =[["]]
>
> [["(" <"numValue1"> "," <"numValue2"> ")"]]
> +[join[]]
> }}}/>
> ```
>
> For me the first line in each of the above read slightly easier than that 
> addprefix/addsuffix combination since I don't need to mentally re-order 
> anything. And having all the quoting together in a single line (2nd line in 
> each of the above) I found it easier to read since at a glance I can tell 
> everything on that line is part of one static string.
>
> Maybe these small tweaks aren't what you had in mind, but I thought I'd 
> share in case it helps.
>
> Also, the future 5.3 version of Tiddlywiki might introduce substitution 
> within attribute values: 
> https://tiddlywiki5-git-fork-saqimtiaz-textsubstitution-jermolene.vercel.app/#Substituted%20Attribute%20Values.
>  
> With that feature, you could do this:
>
> ```
> <$railroad text=`"$(currentTiddler)$" "(" <"numValue1"> "," 
> <"numValue2">")"`/>
> ```
>
> I know Charlie has a self-imposed policy not to upgrade past 5.2.3, so 
> this last one is for others who might be interested.
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/40cdfb91-4616-4faa-9e31-3e9bb68e92ban%40googlegroups.com.


Re: [tw5] Railroad plugin: one way to setup a tiddler transclusion template

2023-06-18 Thread Brian Theado
On Sun, Jun 18, 2023 at 5:36 PM Charlie Veniot  wrote:

> If you have an approach you think is simpler than the one described above,
> please let everybody know about it.
>

Here is one I find simpler (YMMV):

```
<$railroad text={{{
[["]addsuffixaddsuffix["]]
[["(" <"numValue1"> "," <"numValue2"> ")"]]
+[join[]]
}}}/>
```

and a slight variation:

```
<$railroad text={{{
[["]] [] =[["]]
[["(" <"numValue1"> "," <"numValue2"> ")"]]
+[join[]]
}}}/>
```

For me the first line in each of the above read slightly easier than that
addprefix/addsuffix combination since I don't need to mentally re-order
anything. And having all the quoting together in a single line (2nd line in
each of the above) I found it easier to read since at a glance I can tell
everything on that line is part of one static string.

Maybe these small tweaks aren't what you had in mind, but I thought I'd
share in case it helps.

Also, the future 5.3 version of Tiddlywiki might introduce substitution
within attribute values:
https://tiddlywiki5-git-fork-saqimtiaz-textsubstitution-jermolene.vercel.app/#Substituted%20Attribute%20Values.
With that feature, you could do this:

```
<$railroad text=`"$(currentTiddler)$" "(" <"numValue1"> ","
<"numValue2">")"`/>
```

I know Charlie has a self-imposed policy not to upgrade past 5.2.3, so this
last one is for others who might be interested.

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/CAO5X8CydfS9sJRicfLo4xe4QbkkYn3-xnJtn2OTHN%2BE%2BZmixyg%40mail.gmail.com.