[tw5] Re: Include JS code

2018-07-05 Thread Mohammad
Passingby!
Tony!

I agree there is limited documentation on TW5 and some of them in 
tiddlywiki.com are not good for learning purpose and may target developer 
or advanced users.
If we could improve the documentation, then I think the learning curve will 
be short.

For the Javascript and TWC, I think for many users (non-programmer) doing 
things with JS is really hard. TW5 facilitates many tasks using a high 
level yet simple widgets. I agree it is not complete and there are 
shortcomings, but its simplicity is not comparable with JS for 
non-programmer.

All in all what we need is good resource kit, good documentation, better 
collaboration

/Mohammad


On Friday, July 6, 2018 at 7:35:58 AM UTC+4:30, passingby wrote:
>
>
>
> On Thursday, July 5, 2018 at 12:09:15 PM UTC-6, Jed Carty wrote:
>>
>> There is a huge usability gain, you don't need to know any javascript to 
>> make something new and useful with tiddlywiki.
>>
>
> I was a hobby level programmer in javascript. I remember many years ago in 
> TWC using Eric Schulman's code and developer tools I could do almost any 
> kind of processing on data and render it in any way I felt like. 
> I ll be nothing but honest that I have never felt like that with TW5. Many 
> times I tried and gave up in frustration simply because I could not find 
> either tools or documentation like I did in TWC. 
>
> Just a few months ago I once again started to do some hacking, trying to 
> create a simple quiz. I was out of job and was preparing for some multiple 
> choice exam and I wanted something simple but efficient. Believe it or not 
> after spending almost a week I started wondering if the whole effort was 
> worth it at all. And then I gave it up and just created hand written flash 
> cards. Whats the point? When one has put in a whole long weekend and 
> neglected one's health and given it space in one's mind and still does not 
> reach anywhere one feel one has made a wrong decision and wasted precious 
> time. 
>
> People who are creating new things in TW5 are doing it because many of 
> them have a good programming background. Many of them are exceptionally 
> creative and they have time. TW5 will never become a tool that common 
> people will use. Its too complicated as well as restrictive. 
>
>  
>  
>
>> If it were just a neat javascript page that you used javascript to make 
>> things in than I never would have played with it.
>>
>
> If you call a javascript page just a neat thing, then TW5 is also just a 
> neat thing. I do not understand why you find javascript as something any 
> less valuable. It might be with you that it does not attract you, but huge 
> part of internet runs on javascript.
>
>  
>
>> Yes, you can do less with vanilla tiddlywiki than you can with 
>> javascript, but you can do more with assembler than you can with 
>> javascript, but I am not going to write a web server in assembly despite 
>> the potential performance gains.
>>
>
> That's a completely wrong comparison. I think you do not know Javascript 
> enough. 
>
>

-- 
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 post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/0bfe2652-4dc7-49b9-82d7-67ef7b7d9125%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw5] Re: Include JS code

2018-07-05 Thread TonyM
Passingby,

I empathise with your feelings, this happened to me initially, feeling also 
that TW5 "had too long a learning curve", rather than the quicker "steeper" 
learning curve (common misuse of the "learning curve" phrase avoided here, 
the horizontal on this curve is time, and the vertical knowledge, its 
steeper if you can acquire the knowledge quicker)

The truth is after perhaps 100s of hours I am running smooth and quickly 
with occasional barriers. The capabilities are now almost limitless.

100s of hours is not good enough, of course, however there are many 
activities and discussions working to reduce the time to learn and adopt 
tiddlywiki, thus increasing the slope of learning curve.

TW5, as did TWC is going through an evolutionary process. In time not only 
will enthusiasts adopt it, but the every person.

Regards
Tony

On Friday, July 6, 2018 at 1:05:58 PM UTC+10, passingby wrote:
>
>
>
> On Thursday, July 5, 2018 at 12:09:15 PM UTC-6, Jed Carty wrote:
>>
>> There is a huge usability gain, you don't need to know any javascript to 
>> make something new and useful with tiddlywiki.
>>
>
> I was a hobby level programmer in javascript. I remember many years ago in 
> TWC using Eric Schulman's code and developer tools I could do almost any 
> kind of processing on data and render it in any way I felt like. 
> I ll be nothing but honest that I have never felt like that with TW5. Many 
> times I tried and gave up in frustration simply because I could not find 
> either tools or documentation like I did in TWC. 
>
> Just a few months ago I once again started to do some hacking, trying to 
> create a simple quiz. I was out of job and was preparing for some multiple 
> choice exam and I wanted something simple but efficient. Believe it or not 
> after spending almost a week I started wondering if the whole effort was 
> worth it at all. And then I gave it up and just created hand written flash 
> cards. Whats the point? When one has put in a whole long weekend and 
> neglected one's health and given it space in one's mind and still does not 
> reach anywhere one feel one has made a wrong decision and wasted precious 
> time. 
>
> People who are creating new things in TW5 are doing it because many of 
> them have a good programming background. Many of them are exceptionally 
> creative and they have time. TW5 will never become a tool that common 
> people will use. Its too complicated as well as restrictive. 
>
>  
>  
>
>> If it were just a neat javascript page that you used javascript to make 
>> things in than I never would have played with it.
>>
>
> If you call a javascript page just a neat thing, then TW5 is also just a 
> neat thing. I do not understand why you find javascript as something any 
> less valuable. It might be with you that it does not attract you, but huge 
> part of internet runs on javascript.
>
>  
>
>> Yes, you can do less with vanilla tiddlywiki than you can with 
>> javascript, but you can do more with assembler than you can with 
>> javascript, but I am not going to write a web server in assembly despite 
>> the potential performance gains.
>>
>
> That's a completely wrong comparison. I think you do not know Javascript 
> enough. 
>
>

-- 
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 post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/89236c2c-d8e8-4314-8142-125d487cc995%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw5] Re: Include JS code

2018-07-05 Thread passingby


On Thursday, July 5, 2018 at 12:09:15 PM UTC-6, Jed Carty wrote:
>
> There is a huge usability gain, you don't need to know any javascript to 
> make something new and useful with tiddlywiki.
>

I was a hobby level programmer in javascript. I remember many years ago in 
TWC using Eric Schulman's code and developer tools I could do almost any 
kind of processing on data and render it in any way I felt like. 
I ll be nothing but honest that I have never felt like that with TW5. Many 
times I tried and gave up in frustration simply because I could not find 
either tools or documentation like I did in TWC. 

Just a few months ago I once again started to do some hacking, trying to 
create a simple quiz. I was out of job and was preparing for some multiple 
choice exam and I wanted something simple but efficient. Believe it or not 
after spending almost a week I started wondering if the whole effort was 
worth it at all. And then I gave it up and just created hand written flash 
cards. Whats the point? When one has put in a whole long weekend and 
neglected one's health and given it space in one's mind and still does not 
reach anywhere one feel one has made a wrong decision and wasted precious 
time. 

People who are creating new things in TW5 are doing it because many of them 
have a good programming background. Many of them are exceptionally creative 
and they have time. TW5 will never become a tool that common people will 
use. Its too complicated as well as restrictive. 

 
 

> If it were just a neat javascript page that you used javascript to make 
> things in than I never would have played with it.
>

If you call a javascript page just a neat thing, then TW5 is also just a 
neat thing. I do not understand why you find javascript as something any 
less valuable. It might be with you that it does not attract you, but huge 
part of internet runs on javascript.

 

> Yes, you can do less with vanilla tiddlywiki than you can with javascript, 
> but you can do more with assembler than you can with javascript, but I am 
> not going to write a web server in assembly despite the potential 
> performance gains.
>

That's a completely wrong comparison. I think you do not know Javascript 
enough. 

-- 
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 post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/5f1ca098-f6cb-4e88-b715-b58148bb6336%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw5] Re: Include JS code

2018-07-05 Thread TonyM
Folks,

Jed and Mark, I agree with your apparently conflicting positions here,  
here is something I have realised recently.

TiddlyWiki is mostly designed to act on its own elements, tags, tiddlers, 
fields etc... and it does this in the way any "High Level" programming 
language does, it treats them as sets. We simply state the set of items we 
want to process and tell it what to do with every item in the set. It also 
supports responding to empty sets, or single member sets. Years ago when I 
was a programmer I remember using a high level report generator, it was 
very similar. This approach has fantastic simplification and productivity 
benefits.

I also understand where Mark is coming from. Much of how we understand the 
world is procedural, and while sets are part of it we are more familiar 
with steps, recipes, procedural language(s). There is a wealth of solutions 
in the JavaScript world to help solve real world problems. This is where 
Mark is right on that without the ability to include sophisticate logical 
manipulation or non set based procedural code we are loosing some 
functions, and cant leverage a lot of open source code. I may add that 
evans formula plugin goes a long way to fixing this while blending with 
TiddlyWikis approach.

I started a collaborative document anyone can edit in yammer at 
https://www.yammer.com/tiddlywiki/#/files/140794632 It aims to Document set 
and procedural code structures and how to use them in tiddlywiki. You know 
the primitives Sequence, iteration, selection decision, recursion etc...

Not withstanding the above, Last night, I realised the HTML tags  
and  work without alteration in a Tiddler, and also realise 
tiddlywiki simply renders this as a html page. Now I could have a massive 
HTML only site with PHP and Java Script and a given html page will include 
what it needs to work including php and Javascript. I do not see why we 
could not do this inside a tiddler. The Scripts are external, the engine is 
external ie the PHP server are not inside the tiddler, but as far as the 
user is concerned they look like they are in the tiddlyWiki.  Just as an 
iframe does.

Then all we need is the ability to feed these html pages info found in 
tiddlywiki, and let these pages return results we can store/act on in 
tiddlywiki, people with more skills that me could create java and php 
"modules" you add to these external html pages to permit these 
interactions. And some support plugins/widgets in tiddlywiki.

In these external solutions we should be able to use all the java-script 
code we want.

Now, I expect rightly that Jeremy would say here he does not want to break 
the single file mode of Tiddlywiki, however even Jeremy would not consider 
a hyperlink or iframe as breaking the single file model, I think he would 
understand an hope he responds here, that accessing external resources is 
part of tiddlywiki, and they do not live in the single file. In fact in the 
upcoming release he has done something that will help with using of other 
tiddlywikis external resources, a single tiddler.

Please tell me if this is more than a thought bubble?

Regards
Tony







On Friday, July 6, 2018 at 4:09:15 AM UTC+10, Jed Carty wrote:
>
> There is a huge usability gain, you don't need to know any javascript to 
> make something new and useful with tiddlywiki. I made most of my earlier 
> plugins that I still use before I knew any javascript.
> If it were just a neat javascript page that you used javascript to make 
> things in than I never would have played with it.
> The reusability and simplicity of widgets is amazing, wikitext abstracts 
> out a lot of the overhead to give only the parts that are specifically 
> useful. Yes there are things that are missing but that isn't a downside of 
> the approach, that just means we aren't done making everything yet.
> Also there are huge gains in security, I would never put Bob online if it 
> had inline javascript like tiddlywiki classic.
>
> Yes, you can do less with vanilla tiddlywiki than you can with javascript, 
> but you can do more with assembler than you can with javascript, but I am 
> not going to write a web server in assembly despite the potential 
> performance gains.
>

-- 
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 post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/a1d91514-da03-4a26-a451-e7d77c99a8e0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw5] Re: Include JS code

2018-07-05 Thread Jed Carty
Perhaps I am unique, but it took me a much longer time to learn javascript 
than it did to learn wikitext, so I very much disagree that javascript is 
only a little harder than wikitext. And usability isn't functionality, so 
if a specific thing can be implemented isn't relevant to it. The things 
that you do in wikitext are not difficult to learn and there are only a few 
patterns to know to understand how wikitext and widgets work.

-- 
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 post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/ae52e347-9217-4e68-9a72-f3f52b153a18%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw5] Re: Include JS code

2018-07-05 Thread 'Mark S.' via TiddlyWiki
I would say there's a usability *loss*.

As soon as you get beyond simple list loops, there's no clear way forward.

Also, there's tons of documentation on JS. Standard procedures and 
techniques.

Take a look at recent post 
https://groups.google.com/forum/#!topic/tiddlywiki/IpKqoJbs35c and explain 
how you would do that with the existing toolkit.

I don't understand the security reference. What will prevent potentially 
malicious users from inserting their own widgets, filters, or js macros? 

The analogy with assembler doesn't really work. Assembler is a *lot *harder 
to use than javascript. Javascript is possibly a *little* harder than 
TW5-code, but it has massive support and almost none of the cul-de-sacs of 
TW5.


Thanks!


On Thursday, July 5, 2018 at 11:09:15 AM UTC-7, Jed Carty wrote:
>
> There is a huge usability gain, you don't need to know any javascript to 
> make something new and useful with tiddlywiki. I made most of my earlier 
> plugins that I still use before I knew any javascript.
> If it were just a neat javascript page that you used javascript to make 
> things in than I never would have played with it.
> The reusability and simplicity of widgets is amazing, wikitext abstracts 
> out a lot of the overhead to give only the parts that are specifically 
> useful. Yes there are things that are missing but that isn't a downside of 
> the approach, that just means we aren't done making everything yet.
> Also there are huge gains in security, I would never put Bob online if it 
> had inline javascript like tiddlywiki classic.
>
> Yes, you can do less with vanilla tiddlywiki than you can with javascript, 
> but you can do more with assembler than you can with javascript, but I am 
> not going to write a web server in assembly despite the potential 
> performance gains.
>

-- 
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 post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/5240cf2f-0111-45c9-ab79-17839c7f529a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw5] Re: Include JS code

2018-07-05 Thread Jed Carty
There is a huge usability gain, you don't need to know any javascript to 
make something new and useful with tiddlywiki. I made most of my earlier 
plugins that I still use before I knew any javascript.
If it were just a neat javascript page that you used javascript to make 
things in than I never would have played with it.
The reusability and simplicity of widgets is amazing, wikitext abstracts 
out a lot of the overhead to give only the parts that are specifically 
useful. Yes there are things that are missing but that isn't a downside of 
the approach, that just means we aren't done making everything yet.
Also there are huge gains in security, I would never put Bob online if it 
had inline javascript like tiddlywiki classic.

Yes, you can do less with vanilla tiddlywiki than you can with javascript, 
but you can do more with assembler than you can with javascript, but I am 
not going to write a web server in assembly despite the potential 
performance gains.

-- 
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 post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/0fb5c914-8a52-4bea-989e-48f7faa797b6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tw5] Re: Include JS code

2018-07-05 Thread 'Mark S.' via TiddlyWiki
There's lots of great stuff about TW5.

But the kit the user is given is incomplete compared to JS. If it was a 
complete kit, that would be one thing.  The string operations are anemic. 
No logic operators. Ahem, nothing for creating new tiddlers from regular 
expressions (#2963).

There's a post in the forum today where someone wants to sort by the 
*values* from a data tiddler. But there's no operator for extracting all 
values. You could extract them one by one, but then you couldn't then sort 
them. So, there's a whole class of aggregate functionality that is missing. 
Any time that you can only access a value one-by-one, there's no way to put 
that output back into a form that can be used by the filter-driven widgets. 

In JS, you could aggregate the results into an array or object, and then 
sort them out. It's something that comes up all the time in coding. With 
JS, everything is possible, most things are intuitive, and there are reams 
of resources including full-blown books, tutorials, examples, etc.

So ... I don't understand. What exactly is gained by keeping the users at a 
distance from the actual JS ? Is there some sort of performance gain?

Thanks !
-- Mark 

On Thursday, July 5, 2018 at 8:14:46 AM UTC-7, Jeremy Ruston wrote:
>
>
>
> On 5 Jul 2018, at 15:54, 'Mark S.' via TiddlyWiki <
> tiddl...@googlegroups.com > wrote:
>
> I'm not sure what was gained by giving TW5 it's own tree, since the DOM 
> based approach obviously worked in TWC.
>
>
> Well, that’s 7 years of my life wasted!
>
> But seriously, do you not see any advantages of TW5 over TWC? To me, the 
> success of TW5 is that it possible to do so much more without resorting to 
> JavaScript.
>
> Best wishes
>
> Jeremy
>

-- 
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 post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/bde9a011-58ee-4435-bde1-d31684ddf7f3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tw5] Re: Include JS code

2018-07-05 Thread Mohammad
Jeremy!

 I really appreciate your great work. I love TW5 and I use it in my daily 
work more than any other tools! We know you put a lot of time and 
distribute what you did free of charge and people use it some of them even 
don't know who brought this amazing tool to them.

One suggestion here is:
Could we have a tiddlywiki.com/documentation and lets interested 
developers/contributors to help? I know there is a lot of work to be 
done.(This is for learning purpose)

Thank you for all your help and efforts

/Mohammad





On Thursday, July 5, 2018 at 7:44:46 PM UTC+4:30, Jeremy Ruston wrote:
>
>
>
> On 5 Jul 2018, at 15:54, 'Mark S.' via TiddlyWiki <
> tiddl...@googlegroups.com > wrote:
>
> I'm not sure what was gained by giving TW5 it's own tree, since the DOM 
> based approach obviously worked in TWC.
>
>
> Well, that’s 7 years of my life wasted!
>
> But seriously, do you not see any advantages of TW5 over TWC? To me, the 
> success of TW5 is that it possible to do so much more without resorting to 
> JavaScript.
>
> Best wishes
>
> Jeremy
>

-- 
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 post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/82494afa-68a0-4fa6-9694-7fd3bf410680%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw5] Re: Include JS code

2018-07-05 Thread Mohammad
Thank you Mark!
I actually do most the job with the current TW5 features and it is amazing 
in preparing semantic content.

Cheers
Mohammad



On Thursday, July 5, 2018 at 7:24:41 PM UTC+4:30, Mark S. wrote:
>
> Well, it can be used to write your own widgets, which I found really 
> complicated and confusing, and not well-documented.
>
> It's easier  to write your own javascript Macros or Filters. The easiest 
> way to do that is to find a simple one (like the "now" macro) , clone it, 
> and then modify it to use your own js code. The problem is that you will 
> need various TW functions to get variable values, fields, etc. and you will 
> probably have to go spelunking in the code to figure out what they are 
> because they're not documented (if they are documented, it would be great 
> to know where).
>
> Coding was much easier in TWC. You could use jquery which was designed 
> from the bottom up to be easy for coding. There's oceans of existing code 
> out there that could be easily modified and plugged in. With TW5, not so 
> much. I'm not sure what was gained by giving TW5 it's own tree, since the 
> DOM based approach obviously worked in TWC.
>
> -- Mark
>
>
>
> On Thursday, July 5, 2018 at 4:34:51 AM UTC-7, Mohammad wrote:
>>
>> Hello Mario,
>>
>>  Thank you for your reply!
>> I was playing with JavaScript and was curious to see how can I add JS 
>> code to Tiddlywiki.
>> I understood JS code are not allowed to directly interact with the DOM 
>> objects!
>>
>> I appreciate if you introduce me some simple cases (tutorial) for 
>> learning how JS code can be included in TW.
>>
>>
>> /Mohammad
>>
>>
>>
>> On Thursday, July 5, 2018 at 1:47:57 PM UTC+4:30, PMario wrote:
>>>
>>> Hi Mohammad, 
>>>
>>> In short: No. 
>>>
>>> I think it would be easier, if you describe, what you want to achive. So 
>>> we may have a solution, or could provide help. 
>>>
>>>
>>> more details: 
>>>
>>> Your code directly manipulates the "redered output" in the DOM and also 
>>> keeps program state in the DOM. This is similar to what jQuery did some 
>>> years ago. That's not the concept used by TW. 
>>>
>>> TiddlyWiki is built with a completely different concept in mind. Every 
>>> time the tiddler store is changed, the output (DOM) is automatically 
>>> rewritten by the core, if needed. So your program can and will be destroied 
>>> at any time. 
>>>
>>> TiddlyWiki uses widgets to create and manipulate the rendered output. 
>>>
>>> have fun!
>>> mario
>>>
>>>

-- 
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 post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/f2674431-269f-42c2-a424-000bd36caa7b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tw5] Re: Include JS code

2018-07-05 Thread Jeremy Ruston


> On 5 Jul 2018, at 15:54, 'Mark S.' via TiddlyWiki 
>  wrote:
> 
> I'm not sure what was gained by giving TW5 it's own tree, since the DOM based 
> approach obviously worked in TWC.

Well, that’s 7 years of my life wasted!

But seriously, do you not see any advantages of TW5 over TWC? To me, the 
success of TW5 is that it possible to do so much more without resorting to 
JavaScript.

Best wishes

Jeremy

-- 
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 post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/15966DA5-E0D1-48CE-8F30-39F6D71A8A77%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


[tw5] Re: Include JS code

2018-07-05 Thread 'Mark S.' via TiddlyWiki
Here's a link to an interesting post on the subject by Eric S.

https://groups.google.com/forum/#!topic/tiddlywiki/M6wADVDjyTE

-- Mark

On Thursday, July 5, 2018 at 7:54:41 AM UTC-7, Mark S. wrote:
>
> Well, it can be used to write your own widgets, which I found really 
> complicated and confusing, and not well-documented.
>
> It's easier  to write your own javascript Macros or Filters. The easiest 
> way to do that is to find a simple one (like the "now" macro) , clone it, 
> and then modify it to use your own js code. The problem is that you will 
> need various TW functions to get variable values, fields, etc. and you will 
> probably have to go spelunking in the code to figure out what they are 
> because they're not documented (if they are documented, it would be great 
> to know where).
>
> Coding was much easier in TWC. You could use jquery which was designed 
> from the bottom up to be easy for coding. There's oceans of existing code 
> out there that could be easily modified and plugged in. With TW5, not so 
> much. I'm not sure what was gained by giving TW5 it's own tree, since the 
> DOM based approach obviously worked in TWC.
>
> -- Mark
>
>
>
> On Thursday, July 5, 2018 at 4:34:51 AM UTC-7, Mohammad wrote:
>>
>> Hello Mario,
>>
>>  Thank you for your reply!
>> I was playing with JavaScript and was curious to see how can I add JS 
>> code to Tiddlywiki.
>> I understood JS code are not allowed to directly interact with the DOM 
>> objects!
>>
>> I appreciate if you introduce me some simple cases (tutorial) for 
>> learning how JS code can be included in TW.
>>
>>
>> /Mohammad
>>
>>
>>
>> On Thursday, July 5, 2018 at 1:47:57 PM UTC+4:30, PMario wrote:
>>>
>>> Hi Mohammad, 
>>>
>>> In short: No. 
>>>
>>> I think it would be easier, if you describe, what you want to achive. So 
>>> we may have a solution, or could provide help. 
>>>
>>>
>>> more details: 
>>>
>>> Your code directly manipulates the "redered output" in the DOM and also 
>>> keeps program state in the DOM. This is similar to what jQuery did some 
>>> years ago. That's not the concept used by TW. 
>>>
>>> TiddlyWiki is built with a completely different concept in mind. Every 
>>> time the tiddler store is changed, the output (DOM) is automatically 
>>> rewritten by the core, if needed. So your program can and will be destroied 
>>> at any time. 
>>>
>>> TiddlyWiki uses widgets to create and manipulate the rendered output. 
>>>
>>> have fun!
>>> mario
>>>
>>>

-- 
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 post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/b2893fbc-f095-43e9-b872-38e02d6e45a3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw5] Re: Include JS code

2018-07-05 Thread 'Mark S.' via TiddlyWiki
Well, it can be used to write your own widgets, which I found really 
complicated and confusing, and not well-documented.

It's easier  to write your own javascript Macros or Filters. The easiest 
way to do that is to find a simple one (like the "now" macro) , clone it, 
and then modify it to use your own js code. The problem is that you will 
need various TW functions to get variable values, fields, etc. and you will 
probably have to go spelunking in the code to figure out what they are 
because they're not documented (if they are documented, it would be great 
to know where).

Coding was much easier in TWC. You could use jquery which was designed from 
the bottom up to be easy for coding. There's oceans of existing code out 
there that could be easily modified and plugged in. With TW5, not so much. 
I'm not sure what was gained by giving TW5 it's own tree, since the DOM 
based approach obviously worked in TWC.

-- Mark



On Thursday, July 5, 2018 at 4:34:51 AM UTC-7, Mohammad wrote:
>
> Hello Mario,
>
>  Thank you for your reply!
> I was playing with JavaScript and was curious to see how can I add JS code 
> to Tiddlywiki.
> I understood JS code are not allowed to directly interact with the DOM 
> objects!
>
> I appreciate if you introduce me some simple cases (tutorial) for learning 
> how JS code can be included in TW.
>
>
> /Mohammad
>
>
>
> On Thursday, July 5, 2018 at 1:47:57 PM UTC+4:30, PMario wrote:
>>
>> Hi Mohammad, 
>>
>> In short: No. 
>>
>> I think it would be easier, if you describe, what you want to achive. So 
>> we may have a solution, or could provide help. 
>>
>>
>> more details: 
>>
>> Your code directly manipulates the "redered output" in the DOM and also 
>> keeps program state in the DOM. This is similar to what jQuery did some 
>> years ago. That's not the concept used by TW. 
>>
>> TiddlyWiki is built with a completely different concept in mind. Every 
>> time the tiddler store is changed, the output (DOM) is automatically 
>> rewritten by the core, if needed. So your program can and will be destroied 
>> at any time. 
>>
>> TiddlyWiki uses widgets to create and manipulate the rendered output. 
>>
>> have fun!
>> mario
>>
>>

-- 
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 post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/4c115c68-c1f1-43ba-896f-c5b282084e90%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw5] Re: Include JS code

2018-07-05 Thread Mohammad
Hello Mario,

 Thank you for your reply!
I was playing with JavaScript and was curious to see how can I add JS code 
to Tiddlywiki.
I understood JS code are not allowed to directly interact with the DOM 
objects!

I appreciate if you introduce me some simple cases (tutorial) for learning 
how JS code can be included in TW.


/Mohammad



On Thursday, July 5, 2018 at 1:47:57 PM UTC+4:30, PMario wrote:
>
> Hi Mohammad, 
>
> In short: No. 
>
> I think it would be easier, if you describe, what you want to achive. So 
> we may have a solution, or could provide help. 
>
>
> more details: 
>
> Your code directly manipulates the "redered output" in the DOM and also 
> keeps program state in the DOM. This is similar to what jQuery did some 
> years ago. That's not the concept used by TW. 
>
> TiddlyWiki is built with a completely different concept in mind. Every 
> time the tiddler store is changed, the output (DOM) is automatically 
> rewritten by the core, if needed. So your program can and will be destroied 
> at any time. 
>
> TiddlyWiki uses widgets to create and manipulate the rendered output. 
>
> have fun!
> mario
>
>

-- 
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 post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/985e4920-7c19-4a91-a914-34fcb68e1f55%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw5] Re: Include JS code

2018-07-05 Thread PMario
Hi Mohammad, 

In short: No. 

I think it would be easier, if you describe, what you want to achive. So we 
may have a solution, or could provide help. 


more details: 

Your code directly manipulates the "redered output" in the DOM and also 
keeps program state in the DOM. This is similar to what jQuery did some 
years ago. That's not the concept used by TW. 

TiddlyWiki is built with a completely different concept in mind. Every time 
the tiddler store is changed, the output (DOM) is automatically rewritten 
by the core, if needed. So your program can and will be destroied at any 
time. 

TiddlyWiki uses widgets to create and manipulate the rendered output. 

have fun!
mario

-- 
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 post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/6d7fa195-e52b-4da8-8119-16435e70d35f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.