Equivalent of an array of objects

To try and explain it, the effort required is way more than this kid can handle.

Quicker to just write the code, but then it is all work and zero fun.

Now to discuss just recursion in general (without getting into the Fibonacci Series, unless he really wants to…)

@EricShulman , if he’s up to chiming in, is a natural at explaining stuff eloquently and (my struggle) coherently as in not all over the map.

Just to see some simple recursion via macros, Eric’s A Simple Recursive TOC Macro is a beautiful showcase.

For general talk about recursion, the TiddlyWiki macro recursion I’ve done in BASIC Anywhere Machine is way too complicated a beast for casual consumption. (That recursion is for handling multi-tiddler inclusion of BASIC code, making sure to not duplicate any inclusions when many tiddlers in the inclusion tree are including the same tiddlers. The BASIC interpreter does not like duplicate code, so TiddlyWiki comes to the rescue.)

1 Like

I love recursion and its even more fun in Tiddlywiki because the inputs and conditions are the same thing, the “filters” and unless you “stuff up” filters outputs are finite so you do not need to concern yourself with the termination conditions such as WHILE and WEND loops.

A good solution using recursion, especially in tiddlywiki, once completed, looks deceptively simple, clean and short. And is of course very good, if not essential for iterating all elements of deep structure’s, eg a TableOfContents - just don’t swallow your tail :nerd_face:

1 Like

Ahh, Homoiconicity, that’s why I love recursion in LISP-like languages!

Nothing deceptive about it. If your data structure is recursive, a recursive technique will nearly always be more natural and more elegant. In these cases it’s iterative techniques that are deceptively complex!

I spend a lot of time on StackOverflow answering recursion questions.

1 Like

Ahh, the BASIC guy. I knew I’d seen your name. I keep looking at your code site, but never spend much time there at once. Easily distracted, you know. :wink:

I had my first sip of coffee, and thought: ok

The code below looks crappy. Better to click on the link and view in the Google Groups thread imported by TalkTiddlyWiki.

Yup, I am “that guy” …

I am a career OpenText Gupta Team Developer (aka Gupta SQLWindows) programmer. That’s been my bread and butter since 1995. That’s my favourite kind of programming language since 1993.

SQL programming is right up there.

For hobby programming, TiddlyWiki programming is the bomb.

My heart, though, belongs to BASIC.

Stupid and fun – I love it! Thanks for sharing.

I did line number basic back on the TRS-80, in maybe 1978 or 1979, Have barely touched it since, except for a few stints with VBA.

I’m more of an FP guy and love various LISPS. I admire Haskell, but mostly from afar. And my day job – while it touches C#, Python, Java, and occasional SQL – is mostly JavaScript, client and server side.

Well, my heart belongs to BASIC, but line numbers annoy the daylights out of me.

Totally off-topic, but my buddy’s creation, WasPentalive’s Trek, that’s my kind of BASIC programming.

In relation to the next/previous and tagging relationships raised in this thread;

I have opened a further discussion here Navigating complex tiddler relationships, a discussion for the enthusiast