TW to learn/study node-js?

200 views
Skip to first unread message

Mat

unread,
Dec 8, 2015, 10:37:27 AM12/8/15
to TiddlyWiki
A friend who is not familiar with TW needs to learn js: node.js, angular...

Would it be an andvantage to check out TW in order to learn js and/or node-js? Or would TW just be an extra layer of learning?

Thanx!

<:-)

Tobias Beer

unread,
Dec 8, 2015, 12:03:37 PM12/8/15
to TiddlyWiki
 Hi Mat,
 
A friend who is not familiar with TW needs to learn js: node.js, angular...

Where to start? :D

Would it be an advantage to check out TW in order to learn js and/or node-js? Or would TW just be an extra layer of learning?

I think TW provides a great playground for js...
and the extra slope in the learning curve pays off in many ways.

Besides, if you want to learn these things, you may want or need a notebook
in which you can test some of the stuff and document resources / progress.

Best wishes,

Tobias. 

BJ

unread,
Dec 8, 2015, 12:16:50 PM12/8/15
to TiddlyWiki
Hi Mat,

tiddlywiki (even its nodejs part) does not make much use  the node.js stuff . I think that writing plugins for tiddlywiki gives non-trival projects to learn current style js. The core and boot are (mostly!) well written, so if you friend has some experience with another programming language then it might be possible to jump right into the internals. However one strength of tw is that it does not depend on other libs, and so some tw programming skills are not transferable.

all the best

BJ

Jed Carty

unread,
Dec 8, 2015, 12:37:01 PM12/8/15
to TiddlyWiki
I hadn't every touched js before I started playing with tiddlywiki and I was able to learn the basics by looking and copying other peoples code. So if it is self directed learning I think that if you pick a project and then use tiddlywiki as a starting point you would at least get a good introduction. Particularly if your friend has any coding experience in other languages.
And as Tobias said, you want a notebook.

PMario

unread,
Dec 8, 2015, 12:57:12 PM12/8/15
to tiddl...@googlegroups.com
On Tuesday, December 8, 2015 at 4:37:27 PM UTC+1, Mat wrote:
A friend who is not familiar with TW needs to learn js: node.js, angular...

Here you mention 3 very different things, that only have the term "javascript" in common.

a) js ... javascript .. the language definition
b) node.js ... a stand alone javascript interpreter engine
c) angular ... a javascript framework that tries to simplify html UI generation in an opinionated way.


Would it be an andvantage to check out TW in order to learn js and/or node-js? Or would TW just be an extra layer of learning?

Short answer first:

TiddlyWiki is a nice environment if you want to write text and learn TW wikitext. .. So yes. IMO it "would be several extra layers of learning"

===================================================

Long answer:

ad a)
=====
javascript the language

If you need info about the javascript language, have a look at this book: http://eloquentjavascript.net
The cool thing here is, that it contains "your code here" sections, that allow you to play with the examples. see this http://eloquentjavascript.net/02_program_structure.html page and search for "your code here" to see, what I mean. ... but start reading at the beginning :)

If your friend understands objects, functions, closures and recursions (TW uses a lot of them) he may able to go to nodejs and tiddlywiki's source code.

ad b)
=====
nodejs the javascript engine.

There are many javascript engines available. but 4 dominate the world atm: V8 in Chrome by Google, Spidermonkey in FireFox by Mozilla, JavaScriptCore in Safari by Apple, Chackra in Edge and IE by Microsoft

All those javascript engines have one thing in common. The "single" event loop that powers javascript in the browsers. Since this event loop is known well by all web site programmers, a clever guy (Ryan Dahl) thought it would be nice to have this "non blocking" behaviour also for server side programs, without the DOM nonsense. So he invented nodejs.

from https://nodejs.org/en/

Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient.

So nodejs basically is a command line program, that lets you execute myProgram.js files on different operating systems without the need of a browser. ... There is no html output, which would need a DOM layer. But there are several libraries to simulate the DOM, if you need to.


ad c)
=====

From the Angular.js page: https://angularjs.org/

HTML enhanced for web apps!

Is heavily dependent on the browser DOM, since it needs it to create interactive UIs. It provides an abstraction layer between an eg: text input element and some rendered text output, to make it dynamic. See the example on the front page. IMO angular is a framework similar to jQuery.

----------------------------

So how does TW fit into all this stuff:

ad a) TW is written using the javascript language
ad b) tiddlywiki.js is a command line program, that allows you to do a lot of crazy stuff like: Building stand alone TiddlyWiki files. Run TW editions in a server mode. and a lot more.
ad c) The tiddlywiki core is similar to angular in functionality but completely different in implementation. So those 2 will not work well together in the same file TW.

just my 2 cents
mario


Alex Hough

unread,
Dec 9, 2015, 2:31:52 AM12/9/15
to TiddlyWiki
very useful Mario, thank you!

On 8 December 2015 at 17:57, PMario <pmar...@gmail.com> wrote:
On Tuesday, December 8, 2015 at 4:37:27 PM UTC+1, Mat wrote:
A friend who is not familiar with TW needs to learn js: node.js, angular...

Here you mention 3 very different things, that only have the term "javascript" in common.

a) js ... javascript .. the language definition
b) node.js ... a stand alone javascript interpreter engine
c) angular ... a javascript framework that tries to simplify html UI generation in an opinionated way.


Would it be an andvantage to check out TW in order to learn js and/or node-js? Or would TW just be an extra layer of learning?

Short answer first: TiddlyWiki is a nice environment if you want to write text and learn TW wikitext. .. So yes. IMO it "would be several extra layers of learning"

--
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+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/747843a1-4175-4d93-86f1-f70fa1d62838%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Mat

unread,
Dec 9, 2015, 5:46:40 PM12/9/15
to TiddlyWiki
Guys - thank you all for your informative answers, particularly Marios of course!

Ok, my friend is actually really new with coding all together so I think I will not advice her to get into TW (at this time). I'll show her this thread though so, again, thank you all!

<:-)

Alex Hough

unread,
Dec 10, 2015, 3:24:25 AM12/10/15
to TiddlyWiki
I was thinking about this yesterday.... I keep on thinking I should learn javascript, but each time the motivation disappears. I just want to tinker with TiddlyWikis: as Bob Dylan once sang, it levels my head and eases my mind, where as learning javascript does it in.

I think it would be good to learn about 

objects, functions, closures and recursions

in TW

Would it be fair to say that TW uses a "functional approach" to JS? 



Alex



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

Jeremy Ruston

unread,
Dec 10, 2015, 7:04:20 AM12/10/15
to tiddl...@googlegroups.com
The great thing with learning programming is to have an itch to scratch that you find truly fascinating and engaging. It’s only through enthusiastic repetition that one gets any good as a programmer, and it’s hard to keep that going unless you’ve got some excitement about what you are doing.

So, if the prospect of adapting and improving your own use of TiddlyWiki is attractive, it’s a great environment for learning JavaScript for you. Simple tweaks can have a great impact on things, much more than burning through another dry exercise on one of the online tutorials.

The other thing I’d add is that one tends to learn a lot by studying and modifying the work of others. There are many environments where there is enough sharing for that process to take place, but TiddlyWiki is a pretty nice example because there are artefacts that smoothly progress through simple wikitext hacks through javascript macros and more intense customisations.

Best wishes

Jeremy.


PMario

unread,
Dec 10, 2015, 6:25:02 PM12/10/15
to TiddlyWiki
Hi folks,

I didn't want to be discouraging about using TW to learn javascript. I wanted to show the layers, that are involved.


On Thursday, December 10, 2015 at 9:24:25 AM UTC+1, AlexHough wrote:
I was thinking about this yesterday.... I keep on thinking I should learn javascript, but each time the motivation disappears. I just want to tinker with TiddlyWikis: as Bob Dylan once sang, it levels my head and eases my mind, where as learning javascript does it in.

If TiddlyWiki is your motivation to learn javascript, you should definitely do so. ... As I stumbled upon TWclassic, I had no idea about HTML, javascript and CSS. I'm a technician and a trainer. So I did use programming languages like C,  Pascal and Assambler for years. I did programming and training for a living. ..

For me TiddlyWiki was interesting enough to dig into the TWc templating system. I saw, that I'll need html and CSS knowledge, to go deeper. So I did search for good web related reference resources. I found the Mozilla Developers Network, which I still use quite a lot. I did skim a good portion of the docs there, to get an overview, what's possible. ... And when I hit the wall with an eg: CSS problem, I have a closer look at the docs. ...

I think it would be good to learn about 
objects, functions, closures and recursions

Yes. I really do think so and the best way to see the possibilities of a programming language is with a "guided and well structured" book. I think "eloquent javascript" is one of those books. There is a web version, that covers the "js language", "js in the browser" and "js with nodejs". So I think its a good read, to get an overview about most of the possibilities that js offers at the moment. ... You should still start at the beginning. The additional time you spend reading it all, will pay off very fast. ...
 
in TW

If you want to. Yes. ...

But as I wrote, it won't be the easy path, since there are playing 4 different things together. JavaScript, HTML, CSS and TW wikitext. ... So if you are new to all of them, it may be a bit overwhelming. ... AND imo the biggest problem. If something doesn't work, there are 4 different places, where the error could be. So finding bugs may be frustrating from time to time.
 
Would it be fair to say that TW uses a "functional approach" to JS? 

I'm not sure about this question?

=========================

Just some more things about JS.

For those of you, that prefer watching a video over reading books, I'll add some links. ... Just some. There are a lot of good talks out there.

If you want to see a relatively recent talk from the inventor himself: Brendan Eich have a look here: https://www.youtube.com/watch?v=83_rC1FesOI

I think the Yahoo series "Crockford on JavaScript" is still worth while. I did watch them all (a little bit after they where recorded) and think they are still informative in terms of the language history and imo they are funny. They are about "the good, the bad and the new parts". ... The series started in 2010 and ended Nov 2011. So some views and predictions may be outdated today. .. So have a look for some newer talks too. Imo its worth it. ... In the javascript community Douglas Crockford is always good for controversies.

If you want to see a discussion about the TW source code have a look at hangout #10 https://www.youtube.com/watch?v=o70TtNIe-L4 .. It's a deep dive into TW code structure. ... A searchable list of all hangouts is here: http://hangouts.tiddlyspace.com/ ... If you click the top toolbar button "All Notes" you'll get a searchable / filtered list of many many topics. ...

have fun!
mario

Reply all
Reply to author
Forward
0 new messages