[TW5] ANN: Eve language + TW = tweve plugin

179 views
Skip to first unread message

Brian Theado

unread,
Jun 23, 2017, 7:08:27 AM6/23/17
to tiddl...@googlegroups.com
I have written a plugin which implements a widget allowing Eve
(http://witheve.com/) programs to be embedded in TiddlyWiki.

An Eve program is valid markdown syntax with the actual code stored in
markdown code blocks. While the TiddlyWiki wiki syntax is not
markdown, the code block syntax is compatible. This means Eve programs
can be stored in tiddlers using the wiki syntax.

See https://btheado.github.io/tweve/ for explanation and demo.

See https://github.com/btheado/tweve for the source code.

There was a discussion about Eve here over a year ago:
https://groups.google.com/d/msg/tiddlywiki/cRsdY_h-YHQ/WjT1SWWzGQAJ

Thomas Elmiger

unread,
Jun 23, 2017, 3:30:11 PM6/23/17
to TiddlyWiki
Very impressive, thanks for sharing!

I wish I had the time to learn Eve … but at the moment I have to reduce my engagement to playing tic tac toe.

All the best!
Thomas

Arlen Beiler

unread,
Jun 23, 2017, 5:01:32 PM6/23/17
to TiddlyWiki
Very interesting,
I just have one question, from the perspective of someone who is inspired to do this with another web template system. 

Why didn't you put the eve text between the opening and closing tags instead of using the triple double quote syntax? 

I tried using tags but I ran into a problem, so I'm curious if you tried tags as well and had problems :)

Thanks,
-Arlen


--
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+unsubscribe@googlegroups.com.
To post to this group, send email to tiddl...@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/ce5fde7a-e22a-41c6-a8b7-18159003a42d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Brian Theado

unread,
Jun 23, 2017, 9:38:18 PM6/23/17
to tiddl...@googlegroups.com
Arlen,

On Fri, Jun 23, 2017 at 5:01 PM, Arlen Beiler <arle...@gmail.com> wrote:
> I just have one question, from the perspective of someone who is inspired to
> do this with another web template system.
>
> Why didn't you put the eve text between the opening and closing tags instead
> of using the triple double quote syntax?
[...]

I did not consider putting the text in the body of the tag. Even
though I implemented exactly that in the only other TW widget I've
written (https://btheado.github.io/jsoneditor.html). When I wrote that
widget I used text references for attribute values instead of the
triple quote or transclusion sytax for attributes. One of the
attributes is for storing output so it had to be a text reference, but
the other attribute was readonly and I should have used it as a value
instead.

I think at that time, I was not aware of the triple double quote
syntax, otherwise I probably would have gone that route. But since I
didn't know about that syntax, I wrote some code to allow the widget
body to be used as input. I didn't find a way to access the widget
contents without rendering the children to a dummy dom node and
extracting the text content (see code at
https://github.com/btheado/jsoneditor/blob/master/jsoneditor-widget.js#L62)

In order to protect the json, inside the widget call,
http://tiddlywiki.com/#Typed%20Blocks%20in%20WikiText are needed:

<$jsoneditor jsonOutput="!!car-json2">

$$$application/json
...schema json here...
$$$
</$jsoneditor>

But for the Eve widget, the eve code will most commonly be stored in
its own tiddler and the transclusion syntax for attributes works just
fine for that. Or for larger amount of Eve code, the filter attribute
can be used to pull the code together from multiple tiddlers like this
example: https://btheado.github.io/tweve/#flappy%20bird

Hope that helps,

Brian

Danielo Rodríguez

unread,
Jun 24, 2017, 4:06:21 AM6/24/17
to TiddlyWiki
I have to say that the widget syntax is very smart. I never thought that it could be possible to pass the contents of triple ticks as a widget input. impressive

@TiddlyTweeter

unread,
Jun 24, 2017, 10:43:36 AM6/24/17
to TiddlyWiki
Interesting stuff!

One small point, tic-tac-toe example has an error in it ...

Best wishes
Josiah
Auto Generated Inline Image 1

Brian Theado

unread,
Jun 24, 2017, 9:09:28 PM6/24/17
to tiddl...@googlegroups.com
Thanks Josiah for this report. It isn't clear to me what is going wrong. I have opened an issue at https://github.com/witheve/eve-starter/issues/18 to keep track of it.


--
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+unsubscribe@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.

Arlen Beiler

unread,
Jun 24, 2017, 10:14:15 PM6/24/17
to TiddlyWiki
Brian

I think at that time, I was not aware of the triple double quote
syntax, otherwise I probably would have gone that route. But since I
didn't know about that syntax, I wrote some code to allow the widget
body to be used as input. I didn't find a way to access the widget
contents without rendering the children to a dummy dom node and
extracting the text content (see code at
https://github.com/btheado/jsoneditor/blob/master/jsoneditor-widget.js#L62)

Interesting. Yes, this was the exact problem I ran into as well. I had not gone further, so I will probably do it as you have done. 

Thanks,
-Arlen

Reply all
Reply to author
Forward
0 new messages