I'm not a JavaScript programmer but it's possible in TW to get quite raw 
with it to good effect sometimes. But it's mainly limited to the pre-parser 
you get that freedom. I really like and use a lot BJ's Flexity plugin that 
let's me use standard JS regular expressions in TW without the indirection 
needed if you do it the normal way (character classes are really 
complicated). I do think that the "layering" in TW has some consequences 
that are not well documented. "Spacing" is a perennial issue that comes up. 
The \whitespace pragma is an attempt to solve some of them. It's just odd 
that the layout of code should effect the layout of results.

On Sunday, 15 July 2018 00:24:15 UTC+2, Mark S. wrote:
>
> I think this is a bug I stumbled upon previously. Is java script free of 
>> bugs?
>>
>
> Javascript gets pounded on by millions (billions?) of users every day. In 
> the vein of "Gödel, Escher, Bach", there's bound to be some bugs in there. 
> The question is, how long does it take before you encounter an actual bug? 
> In the case of TW5 and spacing problems, I have code from 4 years ago where 
> I couldn't get the spacing right and just gave up on it. Having to squeeze 
> out all the space in order to make something work then makes WikiText 
> harder to read than javascript.
>
> As someone who is yet to learn java-script properly, it is the shortest 
>> path for me to use wikitext.
>>
>
> It's just a simplified c-style language. A reference book on my shelf is 
> from 1996, only 8.5* x 5.5" x 1/2 inch thick, and mostly still relevant 
> today. It's not like Java with tightly maintained data types.
>
> But how would you reproduce the list filter structure of tiddlywiki in 
>> javascript, I expect it could be quite poor at replacing this structure.
>>
>
>
> JS has all the control structures that you would expect from a modern 
> language, including *switch*, *while*, and *for*. An array data 
> structure, object modeling, text manipulation and a full math library. 
> Think how often we've needed or wanted some type of numerical control in 
> TW5. To do anything involving basic arithmetic, you have to use someone's 
> 3rd party kit, because there's nothing relating to numbers as filter 
> operators beyond very simple functionality.
>
> -- Mark
>
>
>

-- 
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/19d1c8cc-1fc2-4baa-a485-0385a1ba132c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to