On Sunday, 4 March 2018 19:11:43 UTC+1, Mat wrote:
>
> Hi Joe.
>
> You have much, and good, documentation at tiddlywiki.com
> (I'm curious, for constructive purposes: How come you have not seen this?)
>

I have and I keep a local copy and search in it.

 

>
> Some specific questions of yours:
>
> I guess that 
>>
>> \define journalButton()
>> ...
>> \end
>>
>> defines a macro -- and that <<journalButton>> evaluates the macro
>>
>
> Correct. And something like <<foo bar "baz frotz">> would be a macro *foo* 
> with the two parameter values *bar *and *baz frotz*
>
> You must not insert space right after the "<<".
>

You ask later why I asked this - I think the reason has to do with 
terminology
once I realised that this was a macro then I could search for the word 
macro 
but to start with I didn't realise this <<...>> things were macros

There are a lot of strange (to me) terms - what's a story and a story list

If I search for terminology I get nothing :-)

Once I know what things are called I can start searching for them



 

>  
>
>>
>> I suppose that
>>
>> <$button tooltip={{$:/language/Buttons/NewJournal/Hint}}
>> ...
>>
>> transcludes the value of the the hint when the
>> when the macro is evaluated (or is it when the macro is defined)
>>
>
> Well, more correctly it should be 
>
> <$button tooltip={{$:/language/Buttons/NewJournal/Hint}} *>*
> ...
> </$button>
>
>
> Yes, the parameter named tooltip does in this case take a transcluded 
> value as argument, i.e whatever is inside that hint tiddler.
>

But when? when the tiddler containing the code is saved or when the tiddler 
calling the 
macro is evaluated? -
 

>
> <$xxx>...</$xxx> are *widget *calls whereas <<yyy ...>> are *macro *calls. 
> Widgets are more fundamental, comparable to html markup and are defined 
> with javascript. Macros are higher level and typically defined in wikitext 
> using the /define pragma.
>


 

>
> I'm also not sure about what $set does - seems to manipulate some 
>> variables.
>>
>
> https://tiddlywiki.com/#SetWidget
>

So it's a let statement, something like

    
         let x = ...
         in
             ...
         end
         

 

>
>
>
> I'm unsure as the lifetime of this journalButton object - I think
>> (don't know) that this tiddler is dynamically evaluated
>> when activated - but do the definitions outlive the activation?
>>
>
> Yes definitions, i.e macros, 'live on' locally. But/and if you tag the 
> tiddler with "$:/tags/Macro" you make the macros global.
>

OK 

>
>
> Are their any good write ups of the syntax and semantics of the
>> tiddler language? - and some annotated examples - line by line
>> detailed explanations. There seem to be hundreds of documents
>> describing simple translusion -- the {{Insert Me}} and
>> [[Insert Me]] kind of stuff - I get that - but the next step is confusing 
>> me.
>>
>
> Again, tiddlywiki.com is the best source for docs. But when you say 
> "hundreds of docs" maybe you've already seen this? Again, if you haven't it 
> would be valuable to know why.
>

I think it's two things - the terminology is unfamiliar (I'm catching up 
though)
and my expectations.

I'm kind of used to the traditional programming primers that start with 
hello world
and slowly walk you through the language.

I'd kind of hoped to find a traditional description of the tiddler 
language, starting with lexical conventions
and terminology.


 

> Tobias has a great site that may be of use: 
> http://tobibeer.github.io/tb5/#Welcome
> There are also other individual initiatives but none that I can refer to 
> off the cuff.
>
> I get the impression that you're knowledgable enough to read wikitext code 
> though. If you have specific snippets you need explanations for, i.e where 
> you cannot simply use tiddlywiki.com to look up e.g <$set> (i.e the 
> SetWidget) then you're more than welcome to post it on the boards. At this 
> basic level I'd probably recommend posting on the main board 
> <https://groups.google.com/forum/#!forum/tiddlywiki> where you have more 
> readers.
>

Thanks I'll mail the main board.

 

>
> All best and warmly welcome to TW!!!
>
>
Thanks - it's great
 

> <:-)
>

And a followup question.- I searched for semantics evaluation etc. but no 
hits.

Is there a description of how a tiddler gets turned into HTML?

If I were to implement this I'd be thinking

tokenize -> parse -> transform -> render

After parsing I'd get an abstract syntax tree (AST1) representing the 
tiddler.
I'd evaluate this to produce a second AST representing (abstracted HTML)
then I'd render this.

Is it done like this?

It would be very helpful to see the AST1 after parsing (if this is the way 
it was done)

Of course it might be implemented by some other means (like directly 
manipulating the
DOM) during parsing.

Cheers

/Joe

 

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWikiDev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywikidev.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/c59151b1-2ea7-4685-a255-0a7935a3b4aa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to