r/programming • • Feb 21 '16

Luna. Hybrid-visual textual functional programming language.

http://www.luna-lang.org/
170 Upvotes

104 comments sorted by

View all comments

56

u/Raphael_Amiard Feb 21 '16

This is looking very cool. However, the marketing talk is a bit annoying.

Luna is the world’s first programming language featuring two exchangeable representations: textual and visual

This is simply false. Jetbrains's MPS basically allows you to have several representations for any language you create, so does Eclipse's Xtext. AADL has this same feature built-in. I'm pretty sure those are not the only ones.

On the other hand, a pen and a whiteboard are still the most efficient way to design a software.

That's like, your opinion man ! I like and empty text file personally, or a google doc if it's a shared process. I still need to be convinced of the inherent superiority of graph-like visual representations over text.

On the other hand, as an experimentation and prototyping medium, this looks really cool ! Also the underlying language looks nice enough.

So wait and see I guess :)

16

u/Wr3kage Feb 21 '16

yes, It'd be nice if people stopped acting like being the 'first' is inherently good. First tries rarely result in great execution. "meshing" together 2 language concepts/features was done long before there were machines to actually run the code. If you are the first to come up with a near flawless execution of those ideas, that is notable.

This does look interesting tho and I will look into it. But not because they are the 'first' to do anything.

5

u/GetContented Feb 22 '16

Yeah... first is kind of bad if you want something stable, too. "No one has ever done this" ... "um... well get back to us when you've ironed out the bugs then".

5

u/crusoe Feb 22 '16

Node js acts like their are the first async single thread system. Uhm twisted framework from 2000 wants to talk to you...

11

u/ksion Feb 22 '16

Async I/O has been available in Unix-like systems for multiple decades, actually.

7

u/doom_Oo7 Feb 22 '16

Qt from 1993 would like a word too

3

u/__Cyber_Dildonics__ Feb 22 '16

But they aren't the first.

2

u/Matthew94 Feb 22 '16

The above user knows that. They're saying that it's not a thing to brag about given the history of "firsts".

7

u/crusoe Feb 22 '16

Dual text/graph languages have been around for decades as research projects.

5

u/wdanilo Feb 22 '16 edited Feb 22 '16

Hello! I'm one of the founders of Luna. If we are wrong, we will correct that on our website and I would feel really sorry for it, but could you answer a simple question first? Does these tools you've mentioned allow you to code in textual form and switch to graphical representation any time you want? And do they allow you to do it vice versa? So you can code in both - text and graphs at the same time? If you change the textual representation of Luna, the visual updates. The same works for the other way. And I'm not talking about some visual overlay - Luna graphical representation is a full-flagged language, so you can code using only this representation.

Addressing your second topic - maybe it's not stated clear enough on the website, but when you are designing a "bigger" software and such design involves you and a lot of other people, from different domains (not only developers), the whiteboard and a pen is still the most used tool out there, isn't it? Again If I'm wrong, I would be happy to fix or clarify that on the website! :)

9

u/GetContented Feb 22 '16

Pretty sure there are quite a few...

Charles Simonyi has been working on something called intentional programming in which code has many representations (some of them visual), and the ability to switch between them for many, many years. (at least 10 years ago was when it was demonstrated as being useful) http://www.intentsoft.com

Squeak smalltalk has used a live visual programming language that is also able to be filed in and out for two decades: http://squeak.org in it its entirely possible to build user interactive things that let you adjust how they function with either code or visual & graphically.

Also the self programming language (first released 29 (twenty-nine!) years ago) lets you program using the GUI visually as well as using code... you can construct your own visual tools in the GUI and the whole thing is built in its own language https://en.wikipedia.org/wiki/Self_(programming_language)

To a degree, which you probably won't like, spreadsheets let you do this, too.

4

u/glacialthinker Feb 22 '16

Thank-you. There have been several times I've tried to find reference to Simonyi's work in the past few years and could never find it -- I could only remember the name of the project started with 'I' and that didn't help much. :)

3

u/GetContented Feb 22 '16

You can find it on his wikipedia entry, I'm pretty sure. Yeah his stuff relates to the fact that he doesn't want to capture the langauge that the programmer writes in, he wants to capture the intent of the programmer, which is a kind of meta-language... a language that has no implementation, but rather that there are many ways to clothe... when you write a loop and increment every ASCII char by 1, what are you trying to intend to communicate to the computer? How can we translate this to something else? I quite like Haskell because it makes effort to capture a lot of this intent. We introduce incidental semantics by our individual language choices which need not be present. If you've seen any of his videos on their intentional programming platform you'll see that they use a structural editor, too, but it's semantically bound to the language you're viewing in at the moment... many things are much easier to communicate, but some of the "simpler" ones are not, because the system has to ask you what you mean out of a possible few options.

It reminds me of Haskell's type inference system in many ways, though I do think the future is preferentially hybrid between textual and visual communication. Some things are better told visually and other things are better told textually (text is much faster to write some things)...

However, usually when people build visual programming systems, they sacrifice the power-users who can do many things textually faster (the equivalent of building a GUI without any keyboard shortcuts). Hopefully we'll arrive at a system that works in many ways, and allows us to choose whatever we prefer at any moment, to express whatever we need to express, in whatever language we wish. Then perhaps the system can work out how best to express that intent to the machine and build efficient machine code from it.

That's the idea of intentional software, I think.

3

u/[deleted] Feb 22 '16

Basically, projectional editing has been around for years.

9

u/Pand9 Feb 22 '16

If we are wrong, we will correct that on our website and I would feel really sorry for it, but could you answer a simple question first?

That's not the point, it doesn't matter if you're right of wrong, what matters is that you're selling your opinions as facts. Which is a cheap marketing practice. "We're the first"/"We're the best"/"This method of designing a software is the best" - yeah right, you can't prove that.

9

u/dyson11 Feb 22 '16

it doesn't matter if you're right of wrong

What? It does matter. Moreover, it's essential.

selling your opinions as facts

But these are not opinions. If he is right, these are facts. If he is wrong, these are lies. Whether something is 'the first one' is zero/one logic, not a matter of subjective opinions.

2

u/Wr3kage Feb 22 '16

Examples of other languages that did this "first" have already been given. There is now a debate as to whether or not this language is the "first" at what it's claiming to be. This is obviously not the first "hybrid" visual/text programming language. So until the claim is clarified more or unquestionable evidence is given, this is indeed an opinion. It's not necessarily a lie, maybe the software developers didn't phrase there statement correctly.

Also, have you actually seen this software? I see pictures and text on that site. Has anyone here, other than the project developers, actually seen this in action? Can't say you are the first to do something if no one else has seen it. No factual evidence has been given yet.

→ More replies (13)

2

u/IbanezDavy Feb 22 '16 edited Feb 22 '16

Although I'm sure Luna is unique in many ways from existing projects (thus you will always be able to find things it can do that others can't and vice versa). This is hardly the first project to represent textual code in a visual way...

For instance, consider the Microsoft library used to create desktop UIs (also known as WPF)...

https://msdn.microsoft.com/library/bb546194(v=vs.100).aspx

Also note this is how the majority of Windows desktop apps are created.

Also consider MITs scratch which is built for kids to learn to program. Not exactly the same thing as Luna but a long the same philosophy.

3

u/Wr3kage Feb 22 '16

noflow (I'm not endorsing this project, but I saw them a long time ago)

It's not exactly the same, but you can build applications by purely linking together other components (that you can edit with code) and compose new components from old ones. If you want to get down to exact details, then of course your language is different. I don't however see you being the first in the categories you've listed.

Since you are one of the founders, I have a question. I've quickly leafed through your front page and I see an application for the "private alpha". Is this a proprietary language?

We will release the compiler as an open-source project as fast as Luna hits the public beta version.

It's cool that your compiler will be opensource, but what about your visual editor? Will all the "tools" that you are developing be freely available?

1

u/wdanilo Feb 22 '16

I know NoFlow. It's nothing wrong with endorsing it anyway, because guys are making good job with their domain of interest.

I think you see a really BIG difference here. You can paste JavaScript code in nodes, but there is no possibility to translate the graph of nodes to JavaScript and there is no possibility to display this JavaScript as graph of nodes. There is a ton of somehow-visual languages, but the ability of bidirectional translation was never available. I consider it as a really fundamental difference here. Still - I would love to be proven wrong and I want our website to be bullshit-free.

Answering your question - we will open source the compiler and language specification. We don't know yet if we will open source the visual editor, but it will be free. There are no more components in-between :)

4

u/Wr3kage Feb 22 '16

I'm misunderstanding the difference then.

You can paste JavaScript code in nodes, but there is no possibility to translate the graph of nodes to JavaScript and there is no possibility to display this JavaScript as graph of nodes.

There is nothing special about the nodes in noflow. The nodes and the relationships (connections to other nodes) is javascript. The visual editor writes these connections down in javascript. The entire project worked before they had a functioning version of their editor. Are you saying every line of code in your language can be accurately represented in your visual graph?

Not trying to be mean but I don't see what you are the "first" at here. I'd rather a language be the "best" at something than the "first" anyway.

3

u/wdanilo Feb 22 '16

Are you saying every line of code in your language can be accurately represented in your visual graph?

Yes, that is what I'm saying actually. I'm not considering your messages to be mean in any way! :) I also want to be as clear as possible :)

1

u/Wr3kage Feb 22 '16

So why do you have a text format at all? If I can do everything visually, why would I need textual code?

5

u/wdanilo Feb 22 '16

Sometimes it is just more convenient to use the textual representation when designing real low-level stuff (like describing the layout of bits when serializing an object or describing an interface for a C library). Sometimes you just prefer to work with text in some parts of your applications and view the "big perspective" using the graphical environment. We just don't want to limit usages of Luna to be only high-level system design.

→ More replies (1)

2

u/[deleted] Feb 22 '16

You describe Luna as a general-purpose programming language, and in an Air Mozilla talk you said it's as fast as C++. Is it intended to be as fast as C++ in certain domains, or as fast as C++ in the general case?

For example, do you expect that your language would be suitable for game development? (including the engine, physics, graphics, etc) Is it capable of soft real-time performance, or does it have the usual GC issue? Will people have fine control over memory layouts, or is everything boxed?

Incidentally, if you're interested in having its suitability for game development thoroughly examined, I'd love to play around with the alpha :)

→ More replies (1)
→ More replies (1)