Arc Forumnew | comments | leaders | submit | breck's commentslogin
2 points by breck 1897 days ago | link | parent | on: Pg just released a new Lisp: Bel

Woohoo! 3 text files. So simple. Looking forward to playing with it.

It's also just very cool that he is still doing great science.

-----

2 points by breck 1940 days ago | link | parent | on: Visible Lisp Computer

Very neat. It would be cool if there were a live emulator you can see on the web to play with it in action virtually.

-----

2 points by breck 2636 days ago | link | parent | on: 3-Dimensional Source Code

Thanks for this link. I hadn't studied Rebol too closely before.

I do like Rebol's embrace of dialecting and I think there's opportunity in making composing languages better.

-----

2 points by breck 2639 days ago | link | parent | on: Bret Victor - Inventing on Principle (2012)

Such a great talk, like his others.

I think it would be great to live in a world where not only could you use your finger to create a sprite animation, but if curious, you could also more easily delve into all the black boxes that make that experience happen (down to the physical level).

I like the NOMODES license plate. If you all had to pick a license plate to describe your work, what would it be? I might go with NOPARENS or NOSYNTAX.

-----

2 points by akkartik 2639 days ago | link

Mine would be COPYMORE. Or NODEPS.

I think I share your vision: http://arclanguage.org/item?id=17277

-----

2 points by shader 2636 days ago | link

Do you have any references for those terms? Or a short explanation for them?

-----

1 point by akkartik 2636 days ago | link

COPYMORE

I'm what I like to call a 'copyista': I think DRY is overrated, and abstraction is overrated, and people are too quick to create abstractions to compress code rather than for conceptual clarity. Some links: http://www.sandimetz.com/blog/2016/1/20/the-wrong-abstractio...; http://programmingisterrible.com/post/139222674273/write-cod...; http://bravenewgeek.com/abstraction-considered-harmful; http://akkartik.name/post/modularity; http://dimitri-on-software-development.blogspot.de/2009/12/d...; http://thereignn.ghost.io/on-dry-and-the-cost-of-wrongful-ab...; http://akkartik.name/post/habitability. You don't have to read them all, but hopefully this gives you as much flavor as you want :)

NODEPS

This is short for "no dependencies". I think a lot of software's ills stem from people's short-sighted tendency to promiscuously add dependencies. In fact, our fundamental metaphor of libraries is wrong. Adding a library to your program isn't like plugging a new block into your Lego set. It's like hiring a new plumber. You're not just adding a few lines of code to a file somewhere, you're creating a relationship. Everytime I see someone talk about "code smells", I wait to see if they'll bring up having too many dependencies. Usually they don't, and I tune them out. And the solution is easy. When you find a library that does something useful, consider copying it into your project. That insulates you from breaking changes upstream, and frees up upstream to try incompatible changes. As a further salubrious effect, it encourages you to hack on the library and tune it to your purposes. (Without giving up the options of merging further changes from them, or submitting patches upstream.)

As it happens, this worldview of mine was actually catalyzed by conversations here in the Arc Forum, most proximally http://www.arclanguage.org/item?id=13263. That thread led to me writing http://akkartik.name/post/libraries and (a little clearer) http://akkartik.name/post/libraries2.

I consider an example of exemplary library use to be how I copied the termbox library into Mu (https://github.com/akkartik/mu/commit/5f1285238b), periodically merged commits from upstream (https://github.com/akkartik/mu/commit/9ba313ab7f), gradually cleaned it up to fit better with my project (https://github.com/akkartik/mu/commit/9a31c34f0f), and gradually stripped out code from it that Mu does not require (https://github.com/akkartik/mu/commit/c04baba4f2; https://github.com/akkartik/mu/commit/8e7827dfcf; https://github.com/akkartik/mu/commit/547ec78bf2). In the process I made some wrong turns, deleting features that I later decided I wanted (https://github.com/akkartik/mu/commit/10a3b8cca2) and created bugs for myself (https://github.com/akkartik/mu/commit/3315a7d3bb; https://github.com/akkartik/mu/commit/0c0d1ea5cd). But when it did things I didn't want, I was now empowered to change them (https://github.com/akkartik/mu/commit/ee1a18f050). One of my patches was useful upstream, so I submitted it: https://github.com/nsf/termbox/commit/0730826a07. I would be in no position to submit that patch if I hadn't taken the trouble to understand termbox's internals. That's another benefit of copying and privately forking libraries: it makes you a better citizen of the open source world, because open source depends on eyeballs, and using a library blindly helps nobody except your (extremely short-term) self.

More broadly, Mu is suffused with this ethos. My goal is that if you have a supported platform you should be able to run it with three commands:

  $ git clone https://github.com/akkartik/mu
  $ cd mu
  $ ./mu
(That highlights another benefit: your software becomes easier for others to try out. Without giving out binaries, because what's the point of being open-source if you do that?)

Mu's also geared to spread this idea. I want to build an entire software stack in which any part is comprehensible to any programmer with an afternoon to spare (http://akkartik.name/about). Which requires having as little code as possible, because every new dependency is a source of complexity if you're building for readers rather than users. In chasing this goal I'm very inspired by OpenBSD for this purpose. It's the only OS I know that allows me to recompile the entire kernel and userland in 2 commands (https://github.com/akkartik/mu/wiki/Building-OpenBSD-on-Open...). People should be doing this more often! I think I'm going to give up Mu and build my next project atop OpenBSD. But that's been slow going.

---

Ah, here's an old HN thread where I managed to combine both these ideas: https://news.ycombinator.com/item?id=11158357#11189308

I'd have preferred to more directly call out my hatred for compatibility constraints, but I couldn't figure out how to fit it on a license plate :)

-----

2 points by breck 2623 days ago | link

The Pike maxim "A little copying is better than a little dependency" comes to mind. I think the overhead of dependencies is underrated ("it's just a 1 line import statement!"), and often a little repetition is a good thing.

-----

1 point by breck 2692 days ago | link | parent | on: 3-Dimensional Source Code

First, just want to say thank you so much, zck, for taking the time to write this feedback. It is so helpful and very much appreciated!

> Can you explain what the axes are, again? The Y axis is the line; that's pretty clear. But it seems like both the X axis and the Z axis are related to how many characters into the line one goes. (Edit: I just listened to the FAQ, and the Z axis is level of indentation. So for each Y axis, there's only one possible Z value, for any number of X values? That is, you can't have both (42, 27, 3) and (42, 27, 4). Is that right?)

Sorry, this is still slightly up in the air. The Y axis is equivalent to line number (this is fixed). The X axis is equivalent to indent level (this is fixed). Still running some hardware experiments to determine whether to use the Z axis for the words and model these programs as 3-dimensional or whether to stick to just the X axis and save the Z dimension for lines connecting assignment words with their references. I realize that's still not clear and I hope to add something on hover to Ohayo soon, so you can hover over a word and see the X,Y,Z location.

> On ohayo.computer, you might want to make it obvious that you have to open the developer console to see the output from running the code. This is the last thing I would think to do. Compare it to many other "run code online" sites, e.g. https://repl.it/JtNz/0, where there's both a "run" button so I don't have to hunt for hidden menus that explain what command to press, and a box in which output goes.

Thank you, so, so much for this feedback! I prioritized the heck out of that and just shipped version 3.0, which opens with the source editor visible on the top left, and a console for displaying the output on the bottom left. If you go to a fire program, you can now put your cursor on any line and press "Command+enter" to compile and execute that tree (either just that individual line, or that line and any child lines). You can also press "Command+shift+enter" to just compile the tree and print the compiled version to Javascript.

> On a technical note, Ohayo's fib.fire seems to be broken for me. Every box seems to have "no block 'X' found" in it: http://imgur.com/a/fwM8X. This happens in both firefox and chrome.

I'm sorry! I'm still figuring out best practices for designing ETNs, and I've been changed the instruction words a lot. I'm currently building a suite of utilities that will easily migrate programs from and older ETN version (in this case, Fire), to a newer version. This is definitely a critical need before this thing is ready for people to depend on, and I'm sorry about the trouble now. We have made a lot of progress in figuring out some best practices for ETNs (largely by stealing the best ideas from Haskell), and one of the next big changes will be a highly improved version of Fire that implements those best practices. But even when we have a much better and more stable version of Fire, I expect there will always be room for improvement, so will get some better systems in place to ensure people don't have to worry about breaking changes. Really sorry about that. I should add more disclaimers.

> This presentation doesn't seem to answer many of the questions I have about 3D Languages. Why are they better?

I hope the new console (which allows you to run/compile just a branch or single line of your program) starts to provide some hints as to how different ETNs are, and how they enable lots of beneficial things not possible in 1-dimensional languages and 1-dimensional terminals.

> You say you expect them to have fewer bugs, but I don't see why.

Much more to come on this. Basically the thrust is that empirically 99%+ of bugs occur in extanenous parts of the code. ETNs start bringing us closer to the absolute minimum, perfect program necessary to solve a problem. We will see a huge reduction in bugs just from going to ETNs => current high level languages => machine code, however, that's just the beginning. We're inventing a completely new non-von neumann architecture, 3-d machine architecture, that can compute high level ETN programs directly. But realistically that is years away from reliability. In the short term we'll be able to realize a lot of gains in bug reduction just from using ETNs that compile to 1D languages.

> You say that they're easier to understand, but even you have a problem figuring out what the location of a given character is!

I know, very embarrassing! That one is because the Z/X axis debate is still up in the air. Hopefully the correct answer in the design decision will emerge soon.

> I want to know why you think something, not just that you think something.

A lot of it is empirical. But it's the type of thing where I can see that ETNs will be 10-100x faster because they solve a lot of unsolved problems or poorly solved programming problems, but they won't be 100x faster until all the other stuff is there too (stuff like the code editor, which we finally just added). At this point I see no deal breakers and am highly confident all the predictions will come true (and then some), but it's a matter of still doing lots of grunt work to eliminate the trivial (but impactful) road blocks. But yeah, I fully agree with your sentiment and hope we can start to provide more hard data and direct proof about why we think these things.

> And, not to nitpick, but I really don't get the whole "ETN" phrase

This is a great nit! "Extended Tree Notation" is probably better. Thanks!

-----

4 points by akkartik 2692 days ago | link

Wait, you're writing about "3-dimensional source code" and the dimensions aren't settled yet? That just makes me glad I didn't read your slides, and even less likely to put in the effort next time. I'll repeat my earlier comment: your MVPs are too M and insufficiently V.

How are you so sure that you won't settle on 2 or 4 dimensions? (Let us stipulate that 5 is right out.)

> empirically 99%+ of bugs occur in extraneous parts of the code

You'll need to show me these empirical studies.

I haven't actually ever heard a story that accounts for 99% of bugs. Pretty much every software engineering study ends up with a much flatter profile than that. You have to do many things right to eradicate 99% of bugs.

> ETNs start bringing us closer to the absolute minimum, perfect program necessary to solve a problem.

From what I can tell, ETNs are mostly about eliminating punctuation and replacing it with indentation. Is that right? If so, is your claim that "99% of bugs" are hiding in the punctuation?

Is upgrading the syntax to ETNs all that's needed to eliminate 99% of bugs? What about DRY? The value of good interfaces? Parnas's theory of information hiding? SOLID?

I'll trade my pulled-out-of-my-ass theory for yours. I think bugs arise because our representation of algorithms ("code") over-emphasizes the rules the algorithms performs, and under-emphasizes the input space that the rules are meant to operate on. Bugs arise when people modifying the code forget about rare areas of the input space, and the scaffolding around the project is unable to remind them. Nail down the input space, and bugs go down because your tests fail more often. You won't fix this problem no matter how much you tweak the superficial syntax with which you write code. (I work on this, so it was not pulled out of my ass just now: http://akkartik.name/about; https://github.com/akkartik/mu)

-----

3 points by shader 2656 days ago | link

> ... trading of programming theories ...

Clear and simple syntax / representation is important; combined with matching editing tools it enables us to communicate ideas easily and fluently.

I also like the idea of well defined input spaces. Many theorems or algorithms only work under certain conditions, and much damage has been done by applying them outside of their intended domains. But I think that's only part of the problem.

My own theory is that programs are specifications, and the more clearly and precisely they specify the better. Programs can fit into a matrix of good/bad ideas and good/bad specifications. Of these, two kinds are interesting bugs:

  1) Incorrectly specified good ideas
  2) Correctly specified bad ideas
Well specified good ideas are correct programs, and incorrectly specified bad ideas are just hopelessly confused.

Improving the languages and tools will never fix bad ideas, but they can make them more obvious. Now the goal is to make programming as close as possible to 'saying what you mean'. In other words, making the semantics as explicit as possible.

Basically my goal is 'declarative programming', which turns out to be a very vague concept to most people. They all agree that it's better, but nobody seems to have a good explanation for why. I think the difference is that declarative programs specify the only the relationships which are important, leaving the rest up to the platform to optimize or interpret as it sees fit. This leads to powerful and concise languages such as SQL, but at the cost of placing the burden on the platform rather than the programmer. Good for communication and clarity, bad for development and adoption.

Basically, declarative languages can be more concise because they rely more on shared knowledge; predefined vocabulary. If the language doesn't already have a way to express the concept you want, however, it is much more work to add. Imperative / procedural programs are more flexible because they rely on implicit semantics. You just tell the computer what to do—you don't have to explain what it is doing or why. Everything the program "accomplishes" is imaginary and external to the specification. This leaves very little room for the computer to optimize your selection of operations, and leaves a lot of room for you to accidentally provide an incorrect sequence of steps.

It's like the difference between giving directions by saying "Go to the grocery store at 5th and Main" vs. "Take a left, go three blocks, take a right, go two more blocks, park on the right side of the street and enter the blue building." The first is much clearer, but places much higher expectations on the navigation abilities of the recipient, while the second can be followed by anyone even though they have no idea where they're going - and mistakes are correspondingly harder to notice.

Sadly, the nature of declarative languages makes them fairly domain specific, which may explain part of why they're so rare and hard to make. Creating a declarative language for solving a class of problems is much harder than solving a single problem imperatively; you actually have to think of how and why you're solving those problems. But I think we could probably create some general patterns and guidelines for defining them, and maybe even start building up some tools to reduce the effort required.

-----

1 point by breck 2691 days ago | link

> Wait, you're writing about "3-dimensional source code" and the dimensions aren't settled yet? That just makes me glad I didn't read your slides, and even less likely to put in the effort next time. I'll repeat my earlier comment: your MVPs are too M and insufficiently V. > How are you so sure that you won't settle on 2 or 4 dimensions? (Let us stipulate that 5 is right out.)

Sorry, the language itself is fully settled, the only question is with our hardware prototypes, we've found a way to compute with the ETN programs mapped to 2-dimensions, and a machine structure where we can compute answers with a source program mapped to 3-dimensions. But really both are 3-dimensional, the former it's just the Z-axis doesn't vary.

In the 3-D version, the first word of a node (aka the head/base/instruction/type/command), is at z 1, and subsequent words go up the z-stack. In the 2-d version, subsequent words just go up the x-dimension. They actually both offer advantages, and we'll figure out which is better I'm sure in the next year or so.

Again, this stuff is at the cutting edge of the hardware research. We're talking about a whole new type of machine architecture without registers.

> You'll need to show me these empirical studies.

Totally agree. We will.

> I haven't actually ever heard a story that accounts for 99% of bugs. Pretty much every software engineering study ends up with a much flatter profile than that. You have to do many things right to eradicate 99% of bugs.

Agreed. And to hit that 99%, we're going to need the new hardware, so that is quite far off (3 - 20 years, hard to predict). But we can hit 90% fewer with ETN software alone.

> From what I can tell, ETNs are mostly about eliminating punctuation and replacing it with indentation. Is that right?

No. Forget about the punctuation of newlines and spaces. Think about it as Cartesian coordinates. ETNs are about giving source code physical dimensions. About making sure that source code could directly be built out of circuitry. Think of ETN programs like something you could build in a Voxel editor like MagicaVoxel. Each block holds a word, which is just a number from 0 to infinity, and problems are trees of these numbers connected in physical space. Sorry if that's not clear. I think the more code and tools we build the easier it will be to understand.

> Is upgrading the syntax to ETNs all that's needed to eliminate 99% of bugs?

No. To reduce bugs by 90% (99% won't be possible until we have ETN machines) you also need well designed ETNs. Which have good FPL things like no side effects, prefix notation, DRY, good naming, good interfaces, et cetera. Great question. Working on a release shortly with a lot more tools and help on building great ETNs.

> Nail down the input space, and bugs go down because your tests fail more often.

I like that! I'm a big fan of strongly typed languages and the idea they basically prove your program correct at compile time if you think more about your types.

Thanks for the feedback! I hope the next wave of ETN stuff will help start to demonstrate the benefits better.

-----

4 points by shader 2656 days ago | link

While the concept of a cartesian program space is interesting, it seems largely unrelated to TNs. This is probably a good thing though, as programs require semantic relationships ("lines" between nodes) that are lacking in cartesian spaces. If there was semantic significance to adjacency or distance between points, or along each axis, that might be reasonable. Otherwise the "dimensions" are just an irrelevant and cumbersome alternative to line numbers.

Additionally, a third dimension is meaningless as long as your fundamental representation is two-dimensional. Unless you use an editor that is natively 3-dimensional, mapping a two-dimensional representation onto three-dimensions will leave a lot of redundancy or sparseness, as demonstrated by your conflation of x and z.

-----

1 point by breck 2655 days ago | link

> If there was semantic significance to adjacency or distance between points, or along each axis, that might be reasonable

Yes, there is semantic significance to adjacency & distance from the y-axis (which indicates an edge that connects parent and child nodes).

We are approaching everything simultaneously from the highest abstract level and lowest logical level. We have some more stuff coming out soon that shows off the benefits of the dimensionality more. One of the cooler experiments is a new type of processor with a graph-paper-esque 2D grid that can load a high level tree program and then execute it directly (no cumbersome series of transformations to a bunch of 64 bit registers). AFAIK this is original, though I wouldn't be surprised if Lisp Machines, Thinking Machines, Alteryx, Nvidia, Intel, et cetera have dabbled in this space a bit (though to date haven't been able to find anything on machines that execute trees directly).

-----

2 points by shader 2652 days ago | link

> Yes, there is semantic significance to adjacency & distance from the y-axis (which indicates an edge that connects parent and child nodes).

Actually, it seems like your tree relationships have a very confusing relationship to the coordinates. Adding a newline increments Y, and a space increments X, but children are those nodes such that that

  1) child.Y > parent.Y
  2) child.X == parent.X + 1
With additional complications that only the node with the lowest X value for a given Y becomes the child; all others on the same line become part of the content of that node.

This means that the relationships between two elements depends not just on their coordinates, but also the coordinates of nearby nodes. (6, 4) may or may not be a direct child of (5, 3); it depends on if (5, 3) is a full node, or just a content element that's actually part of (5, 2) or (5, 1).

So the coordinates do not actually define the relationships between nodes; they do not clearly relate to the tree structure at all.

-----

2 points by breck 2651 days ago | link

You are right, this is great feedback thanks.

> have a very confusing relationship to the coordinates

Agreed. I sometimes get confused too.

One rule that always holds is this:

  1) One line === One node
So every node has an absolute Y coordinate (just the line number), but also a relative coordinate(s), relative to its ancestor(s).

Both are useful at various times. There's probably a better way to eliminate confusion here.

> So the coordinates do not actually define the relationships between nodes

Given an array of node coordinates {y,x} [{1,1}, {2,2}, {3,1}, {4,2}], one has enough information to define the whole tree structure of the program. But you are right, you need the full set of coordinates of a certain node's ancestors to properly know its coordinates, and having a line that begins with 1 or more spaces, it is impossible to deduce how many nodes deep it is without also having access to the previous line(s).

-----

3 points by shader 2656 days ago | link

I think the TN/ETN parsing model is somewhat neat in its simplicity, which means it will probably have some longevity.

However, most of the work you have done is just a simplification of the syntax; it has no relation to the semantics whatsoever, and as such is unlikely to cause a major paradigm shift.

Perhaps the coolest part of your notation is the concept of constant validity, which in this case you achieved by simplifying the notation until it matched the medium. Every atomic operation on the text (add a character, new line, or space) is also a valid atomic operation on the tree. Especially because it works with any text editor, instead of fancy semantically (or at least syntactically) aware editors. However, I think any true advances in programming will require improvements in the semantics.

-----

1 point by breck 2655 days ago | link

Thanks for the feedback!

> However, most of the work you have done is just a simplification of the syntax; it has no relation to the semantics whatsoever,

Agreed. However, I think one thing that is starting to emerge from our data (17 useful ETNs now compiling to Javascript, Rust, TypeScript, Logo, Haskell, C++, LLVM IR, SQL, HTML, CSS, JSON, and Regular Expressions) is how well this Tree Notation syntax can work for every programming paradigm (functional, imperative, declarative, dataflow, oo, logic, stack ...). Perhaps it is best explained as a universal syntax. The neat thing about this is that once you learn the TN syntax, you now know the complete syntax for languages with very different semantics. So while I agree we aren't changing semantics here yet, instead just leveraging the semantics and VMs of existing languages, this universal syntax could be big in that it can lead to better cross language static tools and enable developers who generally stick to one or two paradigms to make use of more.

> Perhaps the coolest part of your notation is the concept of constant validity

Agreed! The elimination of parse errors is one of my favorite features. Of course, the user can still make errors at the ETN level like mistyping a word or providing invalid parameters to a node. To help catch and fix these kinds of errors, I just launched version 5.0 of Ohayo (Ohayo still shitty, but the core is getting really solid) which includes a revamped compiler-compiler that supports 100% type checking of every word in your program. It makes it easy to create, as you say above "well defined input spaces".

-----

2 points by shader 2652 days ago | link

> this universal syntax could be big in that it can lead to better cross language static tools and enable developers who generally stick to one or two paradigms to make use of more.

An alternate syntax will not allow you to use any additional paradigms unless you also provide alternate semantics. It might enable more powerful editing tools or effective macros and metaprogramming though.

-----

2 points by breck 2651 days ago | link

> An alternate syntax will not allow you to use any additional paradigms unless you also provide alternate semantics.

Right. The syntax for ETNs is the same, but the semantics are different. For example, I have a language called "Flow" that is a data flow language, passing a matrix through a series of nodes. I also have a logic language called "Project", that can solve relational issues among nodes. Different semantics, identical syntax.

Right now to use different paradigms, a user generally has to learn different semantics and different syntaxes. This eliminates the latter.

-----

3 points by akkartik 2651 days ago | link

Is that a good thing, though? A classic design principle is that similar things should look similar and different things should look different. Imagine a project with both Flow and Project files. Wouldn't it be nice to be able to tell them apart at a glance?

-----

2 points by breck 2610 days ago | link

> A classic design principle is that similar things should look similar and different things should look different.

Agreed, but I think context eliminates such a need. If this comment were about cooking it would look the same. We reuse one writing system.

> Imagine a project with both Flow and Project files. Wouldn't it be nice to be able to tell them apart at a glance?

Ah, good point! So far it hasn't been a problem, but I imagine there may be issues as the number of Tree Languages (note--I took the feedback and dropped the "ETN" acronym) and combinations increase. It might emerge that there are some universal best practices so semantics won't change too markedly from one language to the next. But I think it could be that semantics vary a lot. Right now I have some languages where flow goes forwards (top down) backwards (children up), stack based, parallel, synchronous, et cetera. I personally haven't had trouble keeping them straight just knowing the context, but that is not necessarily a predictor of how it will go for other people (or even me), in the future. We shall see.

Another similar problem is when you have a file with both Flow and Project code (something that actually comes up a lot).

What happens when 2 languages use the same keyword but with different semantics and it happens that a 3rd language embeds them both? It might cause some confusion. Or even just the basic problem of doing color highlighting for one language in a node of another--how do you ensure the color schemes don't conflict? Perhaps a border or something would do the trick. Problems to solve in the future.

-----

3 points by akkartik 2610 days ago | link

> If this comment were about cooking it would look the same. We reuse one writing system.

That's true, but the fact that we're both able to make analogies just suggests that analogies aren't a good defense for your system. It isn't self-evident that "eliminating different syntaxes" is always a good thing. You need to actually take the trouble to motivate it.

In my experience the hard part of dealing with polyglot systems is juggling the different semantics. Syntax is in the noise. Should it be the same or different? It just doesn't seem worth thinking about.

Don't get me wrong, I find Lisp's uniform syntax very helpful. But Lisp is helpful also because of its (relatively) uniform semantics. While adding Lisp syntax atop say Erlang seems useful, mixing LFE and regular Scheme would be a nightmare.

> What happens when 2 languages use the same keyword but with different semantics and it happens that a 3rd language embeds them both?

Yes, I can relate to this question. For example, here's a fragment from the Mu codebase where I embed tests containing Mu programs in my C++ implementation: http://akkartik.github.io/mu/html/040brace.cc.html#366. The Mu instruction is `return-if`, but because it's in a C++ file, just the `return` is highlighted. Super ugly.

My take-away from all this: polyglot systems are a bad idea. Mu's implementation being in C++ is hopefully a temporary state of affairs. We shouldn't be picking "the right tool for the job". Software is more malleable than past tools. We should be tweaking our one language to do everything the job needs.

So rather than try to come up with solutions for polyglot programming, I'd just discourage it altogether.

Edit: Heh, see slide 9 of http://dev.stephendiehl.com/nearfuture.pdf

-----


Thanks zck!

I agree with every point you made and am working on fixing them.

> mainly seems to take as an axiom that tree-structured^1 languages are better.

Correct! And also correct that I haven't proven this to be the case yet. I'm heading in that direction and think by the end of week 1 of the announcement there should be more evidence in that regard. I just launched version 1.2 just now. In a Flow program, you can now add a ">3d" block, which can have a "content" property where you can add some ETN code and see it somewhat visualized in 3d. Rough version, but starting to hint at what's to come. Basically imagine a 100,000 line program, where you can visualize and manipulate the source (and AST!) in 3D, and it all runs blazing fast. That's where we are headed with this. I believe 2D/3D languages may be better because 1) it seems the constraints imposed by the criteria that source must map to physical dimensions helps avoid anti-patterns (but i don't have a proof yet on why) 2) our brains are wired to work in 3D. Although those are theoretical guesses. For me, 95% of why I believe they are better is because of my experience working with them the past few months (which I'm trying to bring that experience to others asap).

But yes. Agreed that I haven't proved this yet.

> I open http://ohayo.computer/, and the first thing presented to me is the Apple "The Crazy Ones" video. This is an extremely offputting message.

Haha, thanks for that feedback. Last week was a week with little sleep, and didn't have time to make a proper intro screencast, so put that up as a placeholder because I thought the "ones who see things differently" was apropos. That won't be up much longer. Thanks for sharing your thoughts.

> I'm seeing far more self-promotion than argument

Agreed. I just do believe in the potential impact of ETNs, and truly believe if anything I'm underselling the impact they could have, and if I got hit by a bus before I could provide more evidence I wanted to make sure people took notice and continued where I left off. Low bus factor last week--but now that is much higher! Maybe once more evidence is out there I can revisit all those posts and tone them down.

> fib.fire

Another person emailed me and said it should start with "hello world", and not Fib. That's coming soon. Thanks for this additional feedback. Also, the Fire editing is brand new. It was very theoretical until last week. So the UX has a long way to go. I made some improvements this morning but still it's quite shitty. Working on it.

> How do I actually run any code?

Version 1.2 (today) introduces the shortcut "shift+b" to build program, which will show you the compiled Js output for Fire programs. You can also use "command+shift+b" to build and save to file.

> The File menu has no "run" option.

Great suggestion! Will likely add next version.

Also, another suggestion I got is to have a "Quick tips" that shows the top 5 things to do (like double click to add a node, ? for help, et cetera). Coming soon.

> source code that corresponds to what's shown

Shift+u. Again, great feedback. I'll add a File toggle and also a quick tip.

> I really just want to see how these things work. I don't want to see unsupported claims. I want to be able to write some code, or modify existing code. Please don't make it so hard for me to understand what this is.

Agreed! Thanks! I also made a lot of speed and test improvements this morning and will have project editing very soon.

> [0] I'm not trying to pick on the presentation for the sake of picking on it, but the pictures are extremely difficult to read, making it difficult to understand the argument. At least rotate the pictures so they're right-side-up. Scan them if you can, and do your best to write them with your best handwriting -- I have similarly bad handwriting, so I don't present people with handwritten documents if I can avoid it.

Haha, great points!

> [1] There appear to be multiple terms for this. It's somewhat confusing, because the picture proofs talk about "pure tree languages", but other things talk about ETNs (Extends Tree Notation), or "geometric trees". I don't think "pure tree language" in the picture means anything different from "tree" in the text, but I'm not sure of that. It would be useful to pick one name for each concept and stick to it.

Correct. I haven't found the correct mathematical term for it (I've searched graph, braid/knot, set, and some other theories). I bet there is one. If not, maybe I'll standardize on "Geometric Tree".

Thanks again for these comments. Super helpful!

-----

5 points by zck 2735 days ago | link

Cool. I look forward to reading some new stuff about it. I'll just comment on some of the things here.

> Version 1.2 (today) introduces the shortcut "shift+b" to build program, which will show you the compiled Js output for Fire programs. You can also use "command+shift+b" to build and save to file.

This is interesting, but might actually work at cross-purposes to what you want to show. This presents it as "a graphical interface to write javascript", which isn't quite what you want. I want to _run_ the code, not just compile to js. (Obviously compiling to js and then running the js is fine, but don't make me do two steps when one is enough)

But for a run button, I'd think you want this to be as obvious as possible. So don't even bury it in a menu -- make a header with a giant "run" button. Or maybe not "giant", but somewhere that's displayed when you open the page.

> Another person emailed me and said it should start with "hello world", and not Fib. That's coming soon.

I feel like you want to have both. But yes, it's useful to have Hello World.

I do want to play around with this, so hopefully I can understand what it is soon.

-----


I totally agree. Although perhaps I wouldn't have gotten as much feedback had I taken a more modest approach? Hard to say. I still haven't done a good job communicating the benefits of ETNs yet, stemming from their 2D/geometric nature. Almost got version 1.1 of Ohayo done which makes another step toward that.

-----

6 points by akkartik 2736 days ago | link

That motivation makes sense. Bear in mind, though, that the "less modest" approach has a limited amount of gas. It will stop working at some point.

I can relate with having these questions and considering the different strategies as well. If you really think that this is going to be your life's work, it's reasonable to burn some 'reputation' to get the word out. However, I've often been wrong before. Now I tend to err on the side of playing a long game.

Over time I've gained respect for the essential wisdom of this quote:

"We knew that Google was going to get better every single day as we worked on it, and we knew that sooner or later everyone was going to try it. So our feeling was that the later you tried it, the better it was for us because we’d make a better impression with better technology. So we were never in a big hurry to get you to use it today. Tomorrow would be better." -- Sergey Brin, as retold by Seth Godin in "The Dip"

Applicable to ideas like here just as much as products.

-----

2 points by breck 2736 days ago | link

Wow, what a quote! That's exactly how I feel about Ohayo. That seems like a better approach--not to be in a big hurry to get people to use it today. Thank you akkartik. Really appreciate that advice!

My only concern pre-launch and announcement, was that I was going to get hit by a bus and the world would have to wait longer for someone else to stumble upon (and popularize) TN and ETNs. Now that it's out there and a few thousand people have seen it, I can take this more sensible approach. Fantastic advice.

Btw, just pushed version 1.1.0 if anyone's interested.

UX still needs work, but I rushed adding a "3D block" to the flow language, (using the vis.js library), so you can start to see what "3D" code looks like.

http://breckyunits.com/files/untransformed-source-etn-code-i...

I need to rev that a bit (I see some immediate bugs) but gives the basic idea and I have to run out for a little while.

-----


Thanks for the comments! The thing that z, readable, and wisp all lack, is that with ETNs every node has a point (x,y,z). So in addition to your source code mapping directly to your AST, it also maps to physical, geometric space (The Z axis is your program/document, the y axis is your line number, and the x axis is the column #/indent level).

So what you now have with ETNs, is the power of Lisp, now in a regular 2D/3D "structure", that you can inspect, visualize, and manipulate in new ways.

> 1. ETN uses fewer nodes. Why?

That's not compared to Lisps. Sorry, that was not clear. The paper was targeted toward a broader programming audience.

> 2. No parse errors. I have to say that I was writing in c++ recently, and the parsing wasn't an issue. And as you say, it doesn't make nonsense programs correct.

Ohayo briefly shows the power of no parse errors. Your program is parsed by little "micro-parsers", so there's no monolithic parse failure and programs can recover/autocorrect gracefully. More demonstrations here will do a better job of explaining. More to come.

> 3. No semantic diffs.

It's actually only "Semantic diffs" (not "not semantic diffs"). As opposed to syntax diffs. So "(+ 1 2)" and "(+ 1 2)" mean the same thing semantically in Clojure, for example, but git will give you a 1 line diff because of the whitespace syntax diff. In an ETN, "+ 1 2" and "+ 1 2" generally would be different, and could cause an ETN error unless the ETN allowed blank words.

4. Nothing collides. After years of going through every possible edge case, you cannot break TN. There is nothing that collides with the syntax. See for yourself. Download the library and create a TN with it's line/children set to something you think will collide. The indentation and ability to do "getTailWithChildren" takes care of all possible edge cases. (Sorry, I realize I still need to explain this better as this is a common concern and it is very surprising to people (myself included), that there are no edge cases that don't work.

-----


Sorry, the lines in the geometric mapping of the source code are coincident. In drawing B) in the visual proof, the edges which connect the child nodes to their parents intersect and/or are coincident. So when you put Lisp source code onto graph paper, and draw boxes around the nodes, and line segments for edges, it shows why Lisp source is not a geometric language (I define a geometric language as one where there are no intersecting or coincident line segments).

Now, figure A) shows the same Lisp code, formatted differently, in a way that is a geometric language. But as you can see, that code is standard TN/ETN. Or perhaps another way to put it is ETNs are just Lisps with a whitespace syntax and no parentheses. Another reader on HN pointed me to I expressions (https://srfi.schemers.org/srfi-49/srfi-49.html), which I hadn't seen before and is 90% of the way there to TN and ETNs. The creator of I-Expressions have communicated briefly over email now and are going to be talking soon.

Anyway, perhaps another term for Tree Notation/ETNs is "Geometric Lisp", or "2-Dimensional Lisp". I'm not wedded to the terms TN/ETNs, although I do think it's better to have new terms, because I think these will come to dominate the usage of Lisp.

Still working on more updates and evidence on why I think these will be so big.

-----


Author here. Happy to answer any questions or comments people may have. Also will be launching an app later today, called Ohayo, which demonstrates the benefits of ETNs.

-----

More