Hi Richard

I'm overdue to reply to a couple of your earlier messages, but will go back
to those after this.

On Sat, Jan 4, 2014 at 12:58 PM, David Richards
<[email protected]>wrote:

> I'm attempting magick. But more elegant magick. Three tiddlers where only
> two should be needed is one too many.
>

I should have said earlier: it's a known limitation of TW5 that there's no
way to include macros, or specify them to be available globally. Stephan's
hack is a neat workaround but isn't intended as the final solution.

So, in there is the first general point: TiddlyWiki5 isn't finished. Having
said that, development is accelerating as more contributors join the
project.


> What we lack is a way to specify whether TW should 'recook' transcluded
> text (i.e. re-wikify it).
>
> <$transclude tiddler="myRawCode" recook="true">
>
> The default would be false. However if cook is true, then TW should insert
> the transcluded content and then continue wikification starting BEFORE the
> transcluded content, not AFTER.
>

In fact, the intention is to have an \import pragma that would import
macros from other tiddlers.


> Essentially this is akin to the 'quote' / 'eval' issue from LISP. But it's
> more complicated in TW because we're dealing with at least three languages:
> javascript, html, wikitext (markup). Wikitext contain a macro language,
> which counts as a fourth language. On top of that we have the shadow
> language of CSS, so there are least five language (at least).
>

I think of "wikitext" as encompassing the sub-languages such as macros and
filters. So we've got the standard languages of the web, plus wikitext.


> It's far too much to comprehend without better documentation. Instead of
> purposeful coding, based on a comprehensible architecture, non-TW-gurus
> (beginners, intermediate users) are reduced to voodoo-coding,
> trial-and-error hacking, in a word: magick. Chaos magick in fact.
>

Documentation for TW5 is an acknowledged issue. Happily, again, others are
coming to my help by contributing useful guides and hints and tips. For
example, Chris Hunt has recently been documenting how to write widgets at
http://cjhunt.github.io


> So, maybe what TW5 needs is an explicit tiddler type for MACROS, so that
> when we transclude a tiddler of that type then those macros are defined in
> the context of the current tiddler. But I'm pretty sure that approach has
> some major shortcomings too.
>

As mentioned above, I don't think transclusion is the right mechanism for
obtaining external macros. The semantics would be fuzzy as to whether the
macro were to be available throughout the tiddler doing the transclusion,
or just after the transclusion.

I'm undecided whether macros intended for inclusion should have a special
tiddler type, or if the inclusion process should fillet the macros out of a
normal tiddler.


> For example, suppose we want to store macros in fields, rather than in the
> main body of the tiddler. Fields have no content type attribute.
>

There's a tension there; we could extend the field model to have a content
type and the ensuing semantics. We'd end up with tiddlers that resembled a
bundle of tiddlers as they are currently defined. I believe it's better to
focus on flexible semantics for the main text field, and focus on metadata
for fields; if one wants to attach complex typed data to a tiddler, one
does it via linking or tagging.

>
> The problem appears to be that TW is a special-purpose architecture that
> users must kludge-hack into more general usage. Instead TW should be a
> general architecture with no-brainer default behaviors catering to casual
> users.
>

Not surprisingly, I wouldn't see it quite like that. It's just a wiki; the
extensions that make it complicated are there to allow wikitext to express
the UI of the wiki.

A lot of the pressure for TiddlyWiki development comes from people who want
to extend the wikitext further, to create applications that are more than
wikis. TiddlyWiki tries very hard to support that, but the core focus
remains on being a good personal wiki. When there's tension, TiddlyWiki
tries to remember that it's a tool for users, not a tool for developers.


> TW doesn't 'account' for it's language stack, it simply indulges in it.
> For example, content is not 'typed' (except for the limited number of
> tiddler types provided).
>

I'm not sure what you mean here. There's the "type" field which determines
the type of the content in a tiddler, but when one wants to distinguish
tiddlers by a more application specific type (eg person, company, meeting,
place etc), one uses tags.


> There is no general way to query nugget of content to determine which of
> the five languages (six if you count 'raw text' as a language type) it is
> written in. Everything must be determined from context, but contexts
> (containers such as tiddler fields) can contain different source languages.
> So context fails.
>

I'm not sure whether this is what you're getting at, but there's a bunch of
places in the core where CSS and HTML is in wiki text tiddlers. There's two
things going on here:

* HTML tags are legal within wikitext, so you'll see HTML and wikitext
interspersed
* Most CSS and static HTML is itself generated from wikitext, which is
wikified normally, but only the text (ignoring the markup) is output. This
is what lets us reuse wikitext concepts like transclusion within CSS and
HTML.


> TW feels 'un-formal'. It's dazzlingly attractive, addictively fun and
> perfect for casual users with no great dreams, but it seems 'incorrect', in
> a word. It lacks 'closure'. It's strives to be 'self-reflective' but fails.
>

I think it's clear that TW is clashing with your preconceptions of how it
ought to work. The poor documentation doesn't help; it's hard to get
documentation right because what's useful for you would depend to some
degree on your background, and the expectations you've got when you
discover TiddlyWiki. Often discussions here on the group help to bring out
important details that then drive my improvements to the docs.

>
> I'm not sure if I should expect post-beta TW5 to address any of these
> issues, and I certainly can't wait 25 years for TW6.
>

I think most of it is improving the documentation.

Best wishes

Jeremy


>
> dr
>
> On Friday, January 3, 2014 2:39:40 PM UTC-5, David Richards wrote:
>
>> Tiddler "A" contains:
>>
>> \define mysamplemacro(name:"Bugs Bunny",address:"Rabbit Hole Hill")
>> Hi, I'm $name$ and I live in $address$
>> \end
>>
>> Tiddler "B" contains:
>>
>> {{A}}
>> <<mysamplemacro>>
>> <<mysamplemacro "Donald Duck">>
>> <<mysamplemacro "Mickey Mouse" "Mouse House">>
>>
>> That doesn't work. How do I 'execute' the macro definition stored in A so
>> that it is available to B?
>>
>> dr
>>
>>
>>
>>
>>
>>
>>
>>  --
> 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 [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/tiddlywiki.
> For more options, visit https://groups.google.com/groups/opt_out.
>



-- 
Jeremy Ruston
mailto:[email protected]

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to