Hacker News new | past | comments | ask | show | jobs | submit login
What makes a tree a tree? (knowablemagazine.org)
94 points by lxm on April 9, 2018 | hide | past | favorite | 17 comments



> What makes a tree a tree?

Simple: It has no cycles!



Absolutely cursed image.

(Also, I'd argue that's not a cycle since it doesn't return to earlier in the tree.)


Only sufficient for a forest, not a tree.


What a dag.


Actually, the graph might be a useful element to consider.


Fascinating article.

For more tree-related weirdness, I recommend doing a Google Image Search for 'banana flower' and just scrolling through the pictures. I realized I'd never seen a banana flower before and they're really quite odd, as is pretty much everything associated with bananas.


I used to eat banana flowers lol its not difficult to find in the market here. Its interesting because the bananas we eat don't develop seeds and the flowers are downwards and the species that does develop seeds the flower is upwards (like musa velutina) its like the common bananas are not "strong" enough, so don't even bare seeds.


Many wild bananas have flowers that grow downwards, and have seeds (source, I've worked in two botanical gardens and lived next to one in Kenya, and have seen thousands of banana plants and grown many in my own garden).

The lack of seeds in the major crop bananas is due to selective breeding for seedlessness. Usually what happens with seedlessness is some part of the seed development or maturation molecular pathways are broken by a mutation, and selective breeding is used to fix that trait in the population (source, former seed biologist).

So the seedless banana plants are not generally weaker or stronger, just that they have a very specific mutation that prevents normal seeds appearing.


Fascinating snippet:

"There is only one population of king’s holly in the world, and scientists think it’s entirely clonal: Although it does occasionally flower, its fruit has never been seen. Recent radiocarbon dating suggests that it (they?) is at least 43,000 years old."


The Secret Life of Trees is also worth a read.

He defines a tree as "a plant with a stick up the middle."


A banana plant has a stick up the middle. I'm just throwing that out there, because I thought they were trees until a week ago, when my neighbor offered me a plant. They yield fruit once and then die, feeding the daughter plants around it.


> a plant with a stick up the middle

So is a sunflower propped up by a cane an enhanced plant or a bionic tree?


It's a sad sunflower.


I am reminded of this.

I think that I shall never see

A poem lovely as a tree.

A tree whose hungry mouth is prest

Against the earth’s sweet flowing breast;

A tree that looks at God all day,

And lifts her leafy arms to pray;

A tree that may in Summer wear

A nest of robins in her hair;

Upon whose bosom snow has lain;

Who intimately lives with rain.

Poems are made by fools like me,

But only God can make a tree.

~Joyce Kilmer


Only LISP Can Make a Tree

I think that I shall never see

A matrix lovely as a tree.

Trees are fifty times as fun

As structures a la PL/I

(Which Dijkstra claims are too baroque).

And SNOBOL's strings just can't compare

With all the leaves a tree may bear.

And COMIT strings are just a joke.

Vectors, tuples too, are nice,

But haven't the impressive flair

Of trees to which a LISP is heir.

A LISPer's life is paradise!

==

Many people think that JOSS

And others, too, are strictly boss;

And there are many BASIC fans

Who think their favorite language spans

All that would a user please.

Compared to LISP they're all a loss,

For none of them gives all the ease

With which a LISP builds moby trees.

==

RPG is just a nurd

(As you no doubt have often heard);

The record layouts are absurd,

And numbers packed in decimal form

Will never fit a base-two word

Without a veritable storm

Of gross conversions fro and to

With them arithmetic to do.

And one must allocate the field

Correct arithmetic to yield,

And decimal places represent

Truncation loss to circumvent:

Thus RPG is second-rate.

In LISP one needn't allocate

(That boon alone is heaven-sent!)

The scheme is sheer simplicity:

A number's just another tree.

When numbers threaten overflow

LISP makes the number tree to grow,

Extending its significance

With classic treelike elegance.

A LISP can generate reports,

Create a file, do chains and sorts;

But one thing you will never see

Is moby trees in RPG.

==

One thing the average language lacks

Is programmed use of push-down stacks.

But LISP provides this feature free:

A stack - you guessed it - is a tree.

An empty stack is simply NIL.

In order, then, the stack to fill

A CONS will push things on the top;

To empty it, a CDR will

Behave exactly like a pop.

A simple CAR will get you back

The last thing you pushed on the stack;

An empty stack's detectable

By testing with the function NULL.

Thus even should a LISPer lose

With PROGs and GOs, RETURNs and DOs,

He need his mind not overtax

To implement recursive hacks:

He'll utilize this clever ruse

Of using trees as moby stacks.

Some claim this method is too slow

Because it uses CONS so much

And thus requires the GC touch;

It has one big advantage, though:

You needn't fear for overflow.

Since LISP allows its trees to grow,

Stacks can to any limits go.

==

COBOL input is a shame:

The implementors play a game

That no two versions are the same.

And rocky is the FORTRAN road

One's alpha input to decode:

The FORMAT statement is to blame,

But on the user falls the load.

And FOCAL input's just a farce;

But all LISP input comes pre-parsed!

(The input reader gets its fame

By getting storage for each node

From lists of free words scattered sparse.

It parses all the input strings

With aid of mystic mutterings;

From dots and strange parentheses,

From zeros, sevens, A's and Z's,

Constructs, with magic reckonings,

The pointers needed for its trees.

It builds the trees with complex code

With rubout processing bestowed;

When typing errors do forebode

The rubout makes recovery tame,

And losers then will oft exclaim

Their sanity to LISP is owed -

To help these losers is LISP's aim.)

==

The flow-control of APL

And OS data sets as well

Are best described as tortured hell.

For LISPers everything's a breeze;

They neatly output all their trees

With format-free parentheses

And see their program logic best

By how their lovely parens nest.

While others are by GOs possessed,

And WHILE-DO, CASE, and all the rest,

The LISPing hackers will prefer

With COND their programs to invest

And let their functions all recur

When searching trees in maddened quest.

==

Expanding records of fixed size

Will quickly programs paralyze.

Though ISAM claims to be so wise

In allocating overflow,

Its data handling is too slow

And finding it takes many tries.

But any fool can plainly see

Inherent flexibility

In data structured as a tree.

When all their efforts have gone sour

To swell fixed records, losers glower.

But list reclaimers hour by hour

By setting all the garbage free

Yield CONSequent capacity:

Thus trees indefinitely flower.

(And trees run on atomic power!)

=

To men of sensibility

The lesson here is plain to see:

Arrays are used by clods like me,

But only LISP can make a tree.

-- The Great Quux

(with apologies to Joyce Kilmer)

(C) Copyright 1973 Guy L. Steele Jr. All rights reserved.


Related, The Eternal Flame, AKA. God Wrote in Lisp Code: https://www.youtube.com/watch?v=5-OjTPj7K54.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: