You are viewing archived messages.
Go here to search the history.

๐Ÿ•ฐ๏ธ 2020-09-28 17:23:40

...

Ivan Reese 2021-01-18 02:23:57

David Piepgrass โ€” There is no sound in the video. Here's the prior thread: https://futureofcoding.slack.com/archives/CCL5VVBAN/p1598502207080100

Chris Rabl 2021-01-18 05:12:07

David Piepgrass To add to this: at the time I was exploring text editing and "outliner-adjacent" interfaces because I was starting to do more long-form writing for my job. I settled on working in Roam for now but I can see myself going back to this idea some day soon. Over the last few months I've been just building small "experimental" interfaces like this that I think could eventually evolve into a single cohesive system (or be "spun out" as general concepts like this). I really should start doing two minute week posts though...

๐Ÿ•ฐ๏ธ 2020-07-25 00:24:47

...

Will Crichton 2021-01-18 18:21:32

David Piepgrass the final/full version is here if youโ€™re interested https://arxiv.org/abs/2011.06171

๐Ÿ•ฐ๏ธ 2021-01-15 21:57:28

...

Rob Cheung 2021-01-18 19:49:07

Breck Yunits this is seriously cool work. congrats

Konrad Hinsen 2021-01-19 09:49:42

Thanks Breck Yunits , your explanation helps a bit but also raises more questions. It makes perfect sense to have a grid in which each cell is the root of a tree, but I have no idea of how this would be expressed in textual tree notation. Is there a formal grammar somewhere?

Breck Yunits 2021-01-19 23:17:06

Someone recently started a Kotlin library (https://github.com/justjake/ktree)

๐Ÿ”— justjake/ktree

Breck Yunits 2021-01-19 23:17:53

But that could use a refresh to clarify and simplify it

Breck Yunits 2021-01-19 23:18:29

Then is a Sandbox here (https://jtree.treenotation.org/sandbox/) where you can see a JSON serialization of the basic data structure

Breck Yunits 2021-01-19 23:19:28

There are a few technical terms. "Grid Notation" is just a spreadsheet (and CSV and TSV could be are close to a serialization of grid notation)

Breck Yunits 2021-01-19 23:19:41

You just new a column separate and row separator for that

Breck Yunits 2021-01-19 23:20:35

Then when you add a 3rd special rule, an indent creates a parent/child relationship, you get tree notation

Breck Yunits 2021-01-19 23:21:00

But you still don't have any types

or structures other than trees and

lists of words

Breck Yunits 2021-01-19 23:21:18

So on top of those you can create

Tree Languages. Here is a Grammar

Breck Yunits 2021-01-19 23:21:27

Language (simply called "Grammar")

Breck Yunits 2021-01-19 23:22:04

Then there are a few higher level languages in there written in Grammar

Breck Yunits 2021-01-19 23:22:49

So plenty of room to create higher level standards....an issue coming up now with people building tree libraries in other host languages is what would some standard "high level languages" look like.

Breck Yunits 2021-01-19 23:23:08

No idea! Will have to wait to see what emerges

Konrad Hinsen 2021-01-20 08:35:21

Thanks a lot Breck Yunits, I am making progress. The spec also helps a lot, but it also raises more questions. The TreeNode interface is clear enough as a building block for trees, but what about grids? I think that's the problem I have since the beginning: is a grid just an interpretation of a particular tree structure, as in the frequent representation of a 2D arrays as rows of 1D arrays? Or is a grid a distinct data structure from a tree? Put differently, in terms of syntax: is grid notation just syntactic sugar for a frequently used kind of tree, or syntax for a different data type? Again put differently: can a grid have semantics different from any tree-based semantics?

Breck Yunits 2021-01-20 14:50:23

Good questions! Really helpful to see where the gaps are.

At the high level I view the big idea as "2-D Languages". (Well, 3-D

as well, but let's just limit ourselves to 2-D for the moment.)

I think of things all around me in the world as 2-D languages.

A Highway Sign for instance.

Once we get into the digital realm, with our current hardware

stack we do have to collapse things into 1-D, and that's

where "Grid Notation" and "Tree Notation" come in. Any document

could be parsed as either a Grid Structure or a Tree Structure. If

there are no nested nodes, then the structures would basically be the

same. If there are nested nodes, then in Tree Notation you would

parse child trees, whereas in Grid Notation the empty edge nodes

would just be parsed as empty cells. I rarely use pure "Grid Notation", but

I do sometimes use something in the middle, where sometimes I allow

nested trees and sometimes I don't. But really it's probably

better to just always use Tree Notation. Because even when I start a

lang small and think "I'm never going to need scopes with this

dumb config language", a few months later I'm always like "damn, scopes

would have been better and I shoudl have just used tree notation"

Breck Yunits 2021-01-20 14:53:05

Honestly maybe it's confusing things more

than helping to talk about "Grid Notation" and "Tree Notation".

I just thought there's a nice pattern at work here:

Add 1 special symbol and you get a 1-d "List notation" that supports lists of words.

Add 1 more special symbol and you get a 2-d "grid notation" that supports lists of lists of words.

Add 1 more special symbol and you get a 3-d "tree notation" that supports recursive lists of lists of lists of words.

David Piepgrass 2021-01-20 20:49:03

The COVID data explorer has been incredibly informative - I keep going back to it to look at new trends, to share views of the data with others and to smirk upon seeing that yes, Canada's COVID response remains so much better than the U.S.'s. I only wish it had more fine-grained information, e.g. breakdown by U.S. state - it's been in the news that Blue states had a larger economic downturn under COVID, but did they also do a better job controlling COVID? If OurWorldInData can't tell me, I don't know where else to turn!

Last time I read about "tree notation", it wasn't very compelling because you didn't explain some key things:

  • If it's a "tree notation" then it should express trees, but instead it appears to be two dimensional, i.e. it expresses a grid, not a tree. If it's really a "tree notation" then how do you express a tree?
  • If the cells are space-delimited, how do you express a space character inside a cell?
  • How do you distinguish various data types from each other, e.g. how is the string 123 different from the number 123?

Edit: apologies to the extent I repeated ground already covered above... by the way, I looked at the "Sandbox" but it doesn't help much to answer these questions because (1) it doesn't include samples (except one), (2) there seem to be substantially different interpretations of the same tree notation, hence three different JSON conversions, which isn't terribly enlightening, (3) there is no reverse conversion from JSON (or XML) to Tree Notation.

Breck Yunits 2021-01-20 21:56:36

Thanks David Piepgrass!

The next branch of OWID has

a new data TS/JS transformation

table lib under the hood so you can

do any kinds of data transformations

you want. We call it CoreTable

(https://github.com/owid/owid-grapher/tree/next/coreTable)

After we started that, Jeff Heer's lab

launched Arquero, which is an

awesome similar lib as well (https://observablehq.com/collection/@uwdata/arquero)

๐Ÿ”— owid/owid-grapher

๐Ÿ”— Arquero

Breck Yunits 2021-01-20 21:57:13

So once that goes live being able to

do any data transformation you want,

like state to state comparisons, or even

state to country compairions, or custom

on the fly groups, will bepossible

Breck Yunits 2021-01-20 21:57:36

You'll also be able to do things

like group by policy response, etc

Breck Yunits 2021-01-20 21:58:13

If it's a "tree notation" then it should express trees, but instead it appears to be two dimensional, i.e. it expresses a grid, not a tree. If it's really a "tree notation" then how do you express a tree?A single indent (similar to Python), creates a new child node

of the parent node

Breck Yunits 2021-01-20 21:59:24

If the cells are space-delimited, how do you express a space character inside a cell?There are 3 special symbols. Generally

the node break/row break is always new line.

In the JTree lib the cell and edge symbols are a space.

But you can set those to whatever you want.

In OWID we use a tab instead, for better interop

with spreadsheet programs

Breck Yunits 2021-01-20 22:00:16

There is no such thing as an "escape character"

Breck Yunits 2021-01-20 22:00:51

We follow a different strategy. Basically you

choose your special symbols, and then you define

your higher level languages, so that you never

run into situations where you would have ambiguity

Breck Yunits 2021-01-20 22:01:41

That isn't an obvious thing, and it takes a lot

of work to figure out all the edge cases, but it works.

Trust me have been trying to disprove that for 10 years

but it holds true

Breck Yunits 2021-01-20 22:02:16

How do you distinguish various data types from each other, e.g. how is the string 123 different from the number 123?At the tree notation level there is no concept

of numbers. Those come at a higher "Tree

Language" level

Breck Yunits 2021-01-20 22:02:34

there will likely be standard higher level

Tree Languages that coalesce

David Piepgrass 2021-01-20 22:03:16

So, to be clear, it's impossible for a cell to hold "a string" (unrestricted character set), but you can have "a tree language" which would then define escape characters?

Breck Yunits 2021-01-21 00:52:34

Correct, a

Breck Yunits 2021-01-21 00:52:50

"cell" could not hold any of the special characters

Breck Yunits 2021-01-21 00:53:55

In some web apps using tree notation,

you may see a pattern like this in the

query string: "?cellSymbol=~&doc=message~hello world"

Breck Yunits 2021-01-21 00:55:31

in that case, it's saying to use "~" as the cell break

and then " " is a valid character in a cell

Breck Yunits 2021-01-21 00:55:43

But then there are many more strategies

Breck Yunits 2021-01-21 00:55:55

The basic approach though is to never have

the notion of escape characters

Breck Yunits 2021-01-21 00:56:02

At the Tree Notation level

๐Ÿ•ฐ๏ธ 2021-01-07 05:56:18

...

Ash Nehru 2021-01-19 17:12:57

Andrew Carr thanks for reading ! I'm working on a workflow demo and will record one as soon as humanly possible ๐Ÿ™‚

๐Ÿ•ฐ๏ธ 2020-09-26 16:04:59

...

David Piepgrass 2021-01-19 18:33:25

Tree-sitter is awesome... I was thinking that at some point I would try to figure out how I can take advantage of the tree-sitter parsers in order to translate almost any language into Loyc trees.

I'm not sure if I had seen Babelfish before, but I am immediately confused when I look at their "https://github.com/bblfsh/documentation/blob/master/uast/representation-v2.md" because the core concept it appears to be almost identical to JSON, so I can't guess what the UAST of Foo(2+2) might be. The Loyc tree of Foo(2+2) is, of course, normally expressed simply as Foo(2+2) which is a call to Foo with one argument, and a call to '+ with two arguments.

David Piepgrass 2021-01-19 18:39:56

I also saw tree-hugger at some point - ahh yes I clapped for https://medium.com/codist-ai/introducing-tree-hugger-source-code-mining-for-human-b5fcd31bef55 - but I'm not sure if I can or should utilize it in some way, given that my codebase is stuck on .NET for the time being.

Shubhadeep Roychowdhury 2021-01-20 13:20:34

Yes tree-hugger does not support .NET as of yet. However, a contribution is more than welcome ๐Ÿ™‚

David Piepgrass 2021-01-20 21:25:22

Well, I'm afraid that despite devoting all my time to Loyc recently, I remain several years behind schedule. It is probable that I will write a Loyc tree library for Python before I get around to doing something involving tree-hugger + .NET.

A couple of days ago I sketched out something called BLES, which is a syntax for Loyc trees designed as an extension of JSON (and subset of LES2). In these grammar diagrams, the things BLES has in common with JSON are shown in black, while changes are shown in blue. It looks about twice as complex as JSON, but probably about one-quarter as complex as C. So this is something I could port to other languages more quickly than other versions of LES. There's also a https://github.com/qwertie/ecsharp/issues/104 but I'm not sure if that's useful to anyone.

๐Ÿ“ท BLES.jpg

Shubhadeep Roychowdhury 2021-01-21 12:27:13

Json encoding can be useful. There are nice tools to save and query JSON data

Shubhadeep Roychowdhury 2021-01-21 12:28:50

And sometimes they can really useful. For an example, although I like tree-sitter but I wanted to build tree-hugger on top of it, simply because I was tired to write and debug s-exp all the time and was looking for a mature higher level API to help me doing that

Tom Lieber 2021-01-20 08:56:52

The remote framebuffer protocol (RFB) used by VNC is a quite small and malleable tool for constructing GUIs. It requires only a bi-directional communication channel, which lets it tunnel through just about anything, and makes it very easy to write agnostically in Go.

As a proof-of-concept, I wrote a little program that starts a VNC server for accessing its GUI. I didnโ€™t need any third-party libraries because the protocol is so basic. I view it with macOS's built-in VNC client. And it nests! So parts of the UI are implemented by other processes that also communicate via VNC, which are spliced in.

The source is here: https://github.com/alltom/dirgui Itโ€™s based on https://twitter.com/rsnous/status/1348883726642544640 for turning a directory of files into a form where programs are buttons and other files are editable text fields.

Iโ€™m not done experimenting, but I thought this might be a useful epiphany for others!

Hereโ€™s a video of the basic form functionality:

Tom Lieber 2021-01-20 08:57:17

And here it is launching a separate process to provide the โ€œeditorโ€ for one of the files:

Jared Windover 2021-01-20 14:28:19

This is awesome. How far can the composition go? Could you run an entire desktop this way?

Tom Lieber 2021-01-20 17:28:39

I donโ€™t know. Youโ€™d have performance problems if you started with my code (in fact, before I disabled Issues on Github, the first issue was, โ€œthis uses 100% of my CPU!โ€), but one of the best things about the protocol is that it has a straightforward mechanism for negotiating additional features, which in the extreme could be things like, โ€œjust write your updates directly to the GPU, please.โ€

Kartik Agaram 2021-01-21 01:59:51

"Unix pipes for graphics" is something I've thought about a dozen times in my life. This may well be The Way!

Tom Lieber 2021-01-21 02:33:23

That's the idea I'm playing with most for now. But just playingโ€ฆ I haven't thought much about this, so I can't say I'm doing more than exploring the medium. If you or anyone has a principled approach in mind but haven't had the time to try it, now's the time to incept me. ๐Ÿ™‚

Jared Windover 2021-01-21 03:46:21

The thing I love about this is that you can build a (de)composable Gui out of heterogenous pieces. Like, there's no reason any of this has to be written in the same language, or use the same frameworks so long as it acts as a vnc server. It also seems like it would be feasible to wrap non-vnc applications (or maybe just windows) in a vnc compatibility layer to sort of transclude them in. Correct me please, if any of that is a misunderstanding.

Breck Yunits 2021-01-20 16:16:31

Gonna try and turn this into a real thing. If anyone is interested in

markup languages and wants to help, check it out!

https://github.com/treenotation/dumbdown

Felix Kohlgrรผber 2021-01-20 16:26:35

I like the simplicity of it, but I wonder if it's limiting in some cases. How would inline links, bold or italic markup look like?

Breck Yunits 2021-01-20 19:47:20

I'm not sure!

Breck Yunits 2021-01-20 19:47:35

Haven't thought too hard about those ones yet

Breck Yunits 2021-01-20 19:47:36

Any ideas?

Breck Yunits 2021-01-20 20:17:36

Ah sorry I forgot that's a solved problem

Breck Yunits 2021-01-20 20:17:40

markdown

 Someone can define a markdown

 node type and then you can just use markdown

 like you normally would *embed* _markdown_.

emojiDown

 And this whole sentence would be bold if you added

 your own mini language, "emojiDown", which

 defined your own node typesโ—
David Piepgrass 2021-01-20 20:19:23

Your Readme doesn't say how you support spans (bold, italic, and inline links) which are crucial parts of Markdown. Also,

  • I'd much rather start list items with a dash

  • I found it hard to remember at first whether it was text or (text)[link] or [text][link] in Markdown, but now I'm used to it and it's fine. If Markdown had universally used [text][link], it would have been easier to remember ([text][id] is allowed where [id] refers to a link provided later in the document, but Markdown could have dealt with this ambiguity by assuming anything that contains a slash is a link, or by assuming that if no link is provided later on, the id itself is a link.)

  • Similarly I would have preferred to use /slash for italics/ instead of this... But again, that ship has sailed.

Maybe Markdown's biggest issue is ambiguity, like, If I write "apple and *banana and* cherry", did I just create a code block around "apple and *banana", or did I create a piece of boldface text around "banana` and"? But again this is a question of how spans are delimited, which your readme does not address.

Breck Yunits 2021-01-21 01:52:49

Thanks for the feedback!

Questions regarding inline have

come up a lot. Just started an

FAQ with a more in-depth answer to

the inline question:

https://github.com/treenotation/dumbdown/blob/master/README.md#faq

Kartik Agaram 2021-01-21 01:56:39

I saw the HN thread for this, and the comparison to markdown confuses a lot of people. Perhaps a better pitch is as syntax sugar for html/xml.

Mariano Guerra 2021-01-21 09:52:31

nice! add support for namespaces on keywords so I can "import" a namespace that doesn't clash with others ๐Ÿ™‚

Mariano Guerra 2021-01-21 09:53:29

by support I mean specifying that a keyword can be a word or two words separated by some special character (/ or : for example)

Mariano Guerra 2021-01-21 09:54:15

in case you want to take some inspiration: https://haml.info/

๐Ÿ”— Haml

Mariano Guerra 2021-01-21 09:54:56

the class thing could be interesting: admonition.danger.small

Breck Yunits 2021-01-21 15:59:32

Haha. HAML was the genesis of this idea many years ago (https://faq.treenotation.org/#how-was-tree-notation-discovered)

Breck Yunits 2021-01-21 15:59:42

Tree Notation grammars naturally concatenate

Breck Yunits 2021-01-21 16:00:26

You can literally copy/paste any N grammars together,

and just need to change 1 or 2 lines of code to

design how they fit together

Breck Yunits 2021-01-21 16:01:06

But you are spot on in jumping right to namespaces.

That's the key aspect of this idea.

๐Ÿ•ฐ๏ธ 2020-12-17 20:43:27

...

David Piepgrass 2021-01-20 22:42:05

5:14 I'm not sure what you mean by "the probes of the platforms interfere with each other", since the system apparently seems happy to allow two objects to occupy the same space at the same time.

I would say that the video would be easier to understand if I knew more about the basic principles of the system, like which laws of physics (if any) it follows, and what each component is capable of doing. And yeah, Chris's feedback is good.

In any case it's very cool that you can implement a sorting algorithm in this manner.

๐Ÿ•ฐ๏ธ 2020-12-17 19:59:05

...

David Piepgrass 2021-01-20 22:52:08

Regarding "on fire" and "burning" - synonym detection is useful not just here but in traditional IDEs as well, e.g. if I type "Length" I want it to find "Size" and "Count" underneath anything that is actually called "Length" (this is the most useful, of course, when nothing named Length is found).

This feature would be useful both at the language level - one should be able to define a function together with synonyms (old and deprecated names together with merely alternate names) that map to the canonical name - and also at the IDE level, where machine learning or a simple thesaurus could find related names. Oh, and the IDE could also refer to the documentation for search results, and use API popularity to help choose the order of results.

Emmanuel Oga 2021-01-24 09:23:34

๐Ÿฆ EmmanuelOga: My toy Quadstore (an hexastore) inserted 1,000,000 quads in ~7 secs (w/linear complexity!) - not bad for ~100 lines of Kotlin.. ๐ŸคฉTo be fair the heavy lifting is done by an AVL TreeSet in http://fastutil.di.unimi.it. RAM usage was ~ 4.5GB (w/openJDK 14) https://gist.github.com/EmmanuelOga/1d52adb79bdb6092fb698ed5b31fa377 https://pbs.twimg.com/media/EsfCYGUVEAAPxHA.jpg

Emmanuel Oga 2021-01-24 09:28:56

The "query API" is is just a bunch of methods filter and props. With these source triples:

 :me

  rdf:type schema:Person;

  schema:name "Emmanuel Oga";

  schema:familyName "Oga";

  schema:givenName "Emmanuel";

  schema:jobTitle "Software Engineer";

  schema:knowsLanguage "en-US", "es-ES".

I can find my name like this:

val name = qs.filter(s = ":me").props("schema:name") // -> returns "Emmanuel Oga"
Emmanuel Oga 2021-01-24 09:35:41

For persistence I may experiment with https://github.com/lmdbjava/lmdbjava/. I have no idea what the numbers are gonna be like with its B+Tree on a SDD ๐Ÿ™‚.

Chris Knott 2021-01-24 12:59:20

I'm just getting into graph databases atm, this looks great