Live data from Hacker News

Show HN: Ascii_tree – A way to create beautiful ASCII trees

github.com

21–26 of 26 posts

Re: Show HN: Ascii_tree – A way to create beautiful ASCII trees

#21
post #4

I think that with all the unicodes lying around these days we can do a little nicer: ┌───┐ ┌─────┤ 1 ├─────┐ │ └───┘ │ ┌─┴─┐ ┌─┴─┐ ┌─┤ 2 ├─┐ ┌─┤ 3 ├─┐ │ └───┘ │ │ └───┘ │ ┌─┴─┐ ┌─┴─┐ ┌─┴─┐ ┌─┴─┐ │ 4 │ │ 5 │ │ 6 │ │ 7 │ └───┘ └───┘ └───┘ └───┘ (Better if the presentation doesn't lead beyond the font.)

A variation, using stronger lines on the boxes than the lines between them, and curving the corners of the lines: ┏━━━┓ ╭─────┨ 1 ┠─────╮ │ ┗━━━┛ │ ┏━┷━┓ ┏━┷━┓ ╭─┨ 2 ┠─╮ ╭─┨ 3 ┠─╮ │ ┗━━━┛ │ │ ┗━━━┛ │ ┏━┷━┓ ┏━┷━┓ ┏━┷━┓ ┏━┷━┓ ┃ 4 ┃ ┃ 5 ┃ ┃ 6 ┃ ┃ 7 ┃ ┗━━━┛ ┗━━━┛ ┗━━━┛ ┗━━━┛ Subjectively superior, though the thick lines can be overbearing in some fonts. Or with doubled lines on boxes: ╔═══╗ ╭─────╢ 1 ╟─────╮ │ ╚═══╝ │ ╔═…

I'd say it depends.

https://i.imgur.com/RntN8lK.png

Re: Show HN: Ascii_tree – A way to create beautiful ASCII trees

#22
post #21

Earlier quoted context omitted.

A variation, using stronger lines on the boxes than the lines between them, and curving the corners of the lines: ┏━━━┓ ╭─────┨ 1 ┠─────╮ │ ┗━━━┛ │ ┏━┷━┓ ┏━┷━┓ ╭─┨ 2 ┠─╮ ╭─┨ 3 ┠─╮ │ ┗━━━┛ │ │ ┗━━━┛ │ ┏━┷━┓ ┏━┷━┓ ┏━┷━┓ ┏━┷━┓ ┃ 4 ┃ ┃ 5 ┃ ┃ 6 ┃ ┃ 7 ┃ ┗━━━┛ ┗━━━┛ ┗━━━┛ ┗━━━┛ Subjectively superior, though the thick lines can be overbearing in some fonts. Or with doubled lines on boxes: ╔═══╗ ╭─────╢ 1 ╟─────╮ │ ╚═══╝ │ ╔═…

I'd say it depends. https://i.imgur.com/RntN8lK.png

Ugh, I had forgotten that there are fonts that implement only parts of the box drawing block, absurd though that seems to me—it seems obvious to me that you should implement either all or none of such blocks, and that to do anything else is wrong.

Re: Show HN: Ascii_tree – A way to create beautiful ASCII trees

#23
post #4

I think that with all the unicodes lying around these days we can do a little nicer: ┌───┐ ┌─────┤ 1 ├─────┐ │ └───┘ │ ┌─┴─┐ ┌─┴─┐ ┌─┤ 2 ├─┐ ┌─┤ 3 ├─┐ │ └───┘ │ │ └───┘ │ ┌─┴─┐ ┌─┴─┐ ┌─┴─┐ ┌─┴─┐ │ 4 │ │ 5 │ │ 6 │ │ 7 │ └───┘ └───┘ └───┘ └───┘ (Better if the presentation doesn't lead beyond the font.)

I wish ASCII art would just die. This still looks lousy to me, and now also reminds me that we're trying to draw diagrams by emulating 1980's-era technology. You don't see people still using CGA graphics for clip art.

It was the best we could do, 30 years ago, but today "text" means untrusted Unicode of arbitrary language/script/direction/length, and the number of cases where you can throw it to an output system optimized for displaying "1", "2", "3" is rapidly dwindling.

Re: Show HN: Ascii_tree – A way to create beautiful ASCII trees

#26
post #4

I think that with all the unicodes lying around these days we can do a little nicer: ┌───┐ ┌─────┤ 1 ├─────┐ │ └───┘ │ ┌─┴─┐ ┌─┴─┐ ┌─┤ 2 ├─┐ ┌─┤ 3 ├─┐ │ └───┘ │ │ └───┘ │ ┌─┴─┐ ┌─┴─┐ ┌─┴─┐ ┌─┴─┐ │ 4 │ │ 5 │ │ 6 │ │ 7 │ └───┘ └───┘ └───┘ └───┘ (Better if the presentation doesn't lead beyond the font.)

I think that I shall never see A graph more lovely than a tree. A tree whose crucial property Is loop-free connectivity. A tree that must be sure to span So packets can reach every LAN. First, the root must be selected. By ID, it is elected. Least-cost paths from root are traced. In the tree, these paths are placed. A mesh is made by folks like me, Then bridges find a spanning tree. Radia Perlman, 'Algoryhme' https:/…

This is such a charming poem. I don't like poetry, but there's something special about science poetry.
Post reply on HN