10 ms·
Luna: Visual and textual functional programming language
- mavdi 11y agoLooks cool but it doesn't look like it's going to be fully open sourced. I can't spend a minute more of my time on closed platforms, just not worth the lock in and the eventual pull out.
- wdanilo 11y agoThe Language, its compiler and its whole ecosystem will be released as Open Source project. The only thing that we are still considering if releasing or not under Open Source license is the visual editor.
- aw3c2 11y agoThat looks amazing but the "functional" bit is offputting me as I am a stupid user and never got functional programming. Something like this for dumb scripting would be a godsend.
- Shoop 11y agoHow did you try to learn functional programming? What was the most difficult to grasp?
- aw3c2 11y agoTo be honest I did not. I am happy with the procedural/OO code I write in Python. But whenever I even see functional code, I can't even read it.
- wantreprenr007 11y agoMaybe there is a lack of available video courses teaching functional style, it might not be as hard as it seems (wan't for me, but a sample size of 1 is anecdotal). Give it another try perhaps?
- geonnave 11y agoOh yeah, there are not many options nowadays. I know this one which is offered by Coursera: "Functional Programming Principles in Scala". I didn't take it, but it should be helpful if one want to explore that "weird wizardry functional stuff" -and discover that there is not much wizardry at all. Oh and as others stated above, it is not that difficult once you really dive in :) [1] https://www.coursera.org/course/progfun https://www.coursera.org/course/progfun
- such_a_casual 11y agoHonestly, I nor anyone else has any idea what she or he means by functional since they didn't provide any sort of example, and it's not even clear that the user would even know functional programming if they saw it. They referenced python, so should we assume they don't understand what map does? Map is just a function which is properly documented and easy to find help on. Is the user saying that they aren't able to look up the definition for a function they don't understand? Are they saying they refuse to look up definitions for functions they don't understand? How on earth do they get anything done if they refuse/can't look up function definitions? What I'm trying to say is that it's very likely the user doesn't even know what "functional" means. They just hear some keyword they don't understand and dismiss anything that follows. Because when you think about it, it doesn't really make any sense that a programmer could be a programmer if they couldn't look up things they don't understand.
- eklavya 11y agoHey, if you are scared of it, don't be. It's very easy once you actually start diving in. You are already making functional constructs all the time in your favorite languages. Don't be afraid of the nomenclature. They are just your average programming patterns which are identified/talked about by esoteric names :)
- aw3c2 11y agoI think people are somehow overly interpreting my post. I just meant that I wished this was available for non-functional programming. I did not mean to "diss" anything. I don't want to learn something else ;)
- such_a_casual 11y ago> I don't want to learn something else ;) Maybe programming isn't for you then.
- pron 11y agoI would estimate that less than 5% of computer science is directly related to programming languages and paradigms. Not wanting to learn a new programming paradigm still leaves open 95% of the other avenues of learning. At least 99.9% of the industry and 95% of academics don't use pure-functional languages, and they don't find this to be limiting in any way. Add to that the fact that the advantages of PFP are rather theoretical at this point while the learning curve is steep, and you get that of all things you can learn in CS, this one is probably one of the least cost-effective among them. Personally I find those that equate learning new things in CS with learning new programming paradigms (while common on HN/Reddit) to have a very skewed understanding of what computer science is about.
- such_a_casual 11y agoSo refusing to look up function definitions in python is the equivalent of using pure-functional languages and learning new paradigms? Please.
- wdanilo 11y agoIn my point of view, there are two problems involved in functional programming in general: 1) Unfortunetally the majority of schools / universities teaches imperative thinking and imperative languages only, but this situation appears to slowly change. 2) Functional (especialy purely functional) languages provide completely different syntax than the "standard one" we know from Python- or Java- like languages. Lets consider Haskell or Erlang for example. If you know any imperative language, reading Python or Java is just "slightly different", but understandable. You cannot understand Haskell, Erlang or Lisp code though. This was a very important factor for us when designing Luna - as you can see from examples on the website - the textual code is widely understandable, keeping at the same time all the design decisions derived from the fact that Luna is purely functional programming language. I think that this aspect of Luna will be very important for new-commers from the imperative world.
- elviejo 11y agoThis looks too good to be true. I always thought there should be a graphical language to do the high level architecture.. And a text representation to do the details. But it should be the SAME language. Not like CASE tools where the uml diagrams are different than the code. 'The good thing about bubbles and arrows, as opposed to programs, is that they never crash.' — Bertrand Meyer Now in visual languages.. The bubbles do crash. I'd love to learn more.
- deleted 11y ago[deleted]
- wdanilo 11y agoHello! I'm one of the foudners of New Byte Order (the company behind Luna). We think the same - the visual representation is natural for high level abstraction model, while textual code fits really well when dealing with low-level stuff. And Luna is one language with both of these representations. If you want to learn more and have any specific questions, I would love to answer them.
- elcano 11y ago"Luna is the world’s first programming language featuring two exchangeable representations: textual and visual, which you can freely switch at any time." I have not made an extensive research, but this doesn't sound right to me. The SAS Enterprise Guide version of the SAS language came first (and probably others). In one panel you have the visual version while the other has the traditional SAS text language. There are other environments live Learntomod where one panel shows Javascript while the other has a visual, Scratch-like representation of the same code. Just like Luna, they consist of an IDE coupled with two languages each: the visual and the textual. Why is that they don't make that argument false?
- wdanilo 11y agoI would love to be proven that I'm wrong, but I don't think they allow for bidirectional, lossless conversion, namely graph -> text and text -> graph? Do they? If so, then you are right, the statement is wrong and we will change it on our website.
- cs702 11y agoGreat idea. Looks promising. Questions: * The website states that a compiler and an interpreter will be open-sourced, but this language probably requires some kind of "graph IDE" as well. Will that tool be open-sourced too? * Are the authors trying to make money from this? How? * Who is behind this?
- raphar 11y agoFor what the site says, there must be lot of infrastructure needed to run and profile a program. Will that distributed runtime be open sourced as well?
- wdanilo 11y agoThe only infrastructure needed for running Luna on your hardware is the compiler. If you want interactive mode with interactive visual development you will need also Luna interactive interpreter and visual environment. Both compiler as well as interpreter are going to be Open Source, while the visual IDE will be free (and we consider releasing it as Open Source too). There is nothing more that you need here :)
- ijks 11y ago> Who is behind this? The bottom of the page says © New Byte Order 2016. This appears to be their website: http://www.newbyteorder.com/ http://www.newbyteorder.com/ Not much extra info on there, though.
- wdanilo 11y agoHello! I'm one of the founders of NewByteOrder. Answering the questions: - the textual language does not require IDE to create binaries, only the compiler that will be open source. The graphical IDE is called NodeLab and it will not be released under Open Source model at the moment (althought we are constantly considering such option). It will be free - that's for sure. - As a startup we have a plan to make money from making a product. Althought our motivation bases on a strong belief that we can change the way people are able to develop software, program IOT and visually process data, the money is needed to hire people, eat something and live somewhere :) Ok, answering the question in more details - we plan to make money by providing paid support and by selling visual data processing cloud solutions. Luna runs locally or in the cloud. Our editor is able to run in web browser as well. We're working on cloud runtime that allows you to model any data processing graph, that our cloud infrastructure will process in parallel and will return results to you. That are our next steps. Currently we want to release the technologies, build community around it and prove that Luna solves problems in different domains by making interesting use cases. - We are a startup from Krakow / Poland / Europe. My name is Wojciech Danilo (https://pl.linkedin.com/in/wojciechdanilo https://pl.linkedin.com/in/wojciechdanilo) and I'm one of the founders. I've got pretty big background in visual data processing - I was working as senior technical director in various movie studios for several years before starting this project. There is also a VC behind us - InnovationNest also based in Krakow. Did I answer your questions? If not, I would love to provide more information :)
- wantreprenr007 11y agoIt looks strongly influenced by Python, probably to ease novice users into it. Edit: Not to be confused with another Luna Language: https://github.com/luna/luna https://github.com/luna/luna
- eklavya 11y agoI don't think so. It looks like haskell.
- rch 11y agoLooks like elements of both, with some Erlang concepts as well.
- wdanilo 11y agoI can very precisely answer the question as one of Luna designers. Luna's textual syntax is strongly influenced by Python and Ruby, because we think that it is one of the most widely understandable and easy to use syntax out there at the moment - just like wantreprenr007 said. The concepts in Luna were influenced mainly by Haskell, Idris, Erlang and other functional languages.
- wantreprenr007 11y agoNot going to argue, it looked like Python with some continuation syntax inspired by others to me. I only have data on my perception until we all get neural implants to argue cyberneticly. ;) Doesn't matter.
- wdanilo 11y agoA small update here! Starting today the official repository of Luna is here: https://github.com/luna https://github.com/luna . You will not find anything available for the public at the moment, but I wanted to let you know that the original owner of that repository has agreed to transfer it for our purposes ( thank you once again! :) ). You can still find his language here: https://github.com/tj/luna https://github.com/tj/luna
- king_magic 11y agoWell, I've been programming for 20+ years across dozens of languages, and I can't understand what a single one of those diagrams is actually doing. But I can grok the "textual code" example almost instantly, so fast that the difference in effort is almost laughable. I find the mental overhead in understanding the diagrams vs. "textual code" (that phrase makes me mentally chuckle each time I read it) is orders of magnitude higher. Sorry, but I simply don't buy what they're selling (and I say this as someone who lives and dies by the whiteboard). About the only thing out of this that looks actually useful for real-world software engineering is the visual profiling piece. If I were them, I'd probably throw out everything else they are working on and focus on that single piece alone, because that could be pretty useful.
- wantreprenr007 11y agoEtoys and many others have tried, maybe a good language and good IDE could have sufficient benefit, but I'm unsure how a UI would ever map to complex algorithms better than textual-interface paradigms. They can try and see, even if the likelihood of failure is unfortunately very high (until it's not). VPL seems currently like an utopia, apart from dashboards, configuration of control systems which naturally map to the real world and interface builders. One interesting VPL I ran into is a free fractal editor on iOS which lets one build up visual LOGO execution pipeline(s) of operations.
- hodwik 11y agoWork for a company that sells visual programming tools. Our customers absolutely love the functionality. A number of very large organizations are using it: from the military, to Netflix, HP, NASA, Pharmaceutical companies, and so on. The major benefit is that it lets process owners/managers, who aren't programmers, see and understand the code/architecture behind their processes, and suggest, or even make, important changes to those processes.
- wantreprenr007 11y agoLabVIEW?
- 11y ago
- tdaltonc 11y agoI love the idea of graphical programing, but whenever I use one (nipype, labview, or puredata), I end up with an unreadable mess.
- misiti3780 11y agofor a minute i thought asana open sourced their internal web framework https://asana.com/luna https://asana.com/luna
- dang 11y agoLanding pages with signup forms aren't a great fit for Hacker News. It would be better to post and discuss this once it's out.
- zby 11y agoSorry - I was curious what the HN bunch would tell about this. But you are right - there is not enough information right now for any deep comments. The examples so far are too simple.
- soroushjp 11y agoThere are a number of incredibly promising features here. Visualizing code graphs could be incredibly helpful in many contexts, especially in understanding high-level control flows by folding up subroutines as needed. Visual profiling is a dream come true. The functional language features make it seem like joy to use. With that said, this is still just a concept until a language actually brings all these features together. Will believe it when I see it.
- tom_mellior 11y ago> There are a number of incredibly promising features here. Visualizing code graphs could be incredibly helpful Excited overuse of the word "incredibly", just like the author of the featured article. > make it seem like joy to use. Missing article, just like the author of the featured article. Interesting ;-) (OK, this one happens to a lot of people who come from a Russian background, for example.) If you are involved with this, I'm sure people would be interested to know! Maybe you could answer some questions...
- wdanilo 11y agoAs far as I know neither the author of the post on hackernews neither "soroushjp" are not involved in the project, but I am. I've been answering some questions here, so If you have any specific ones, I would like to help :)
- riotdash 11y agoThere have been tons of "graphical programming" languages and IDEs trying to pull it off for the last 15 years and pretty much all them have been total shit. This doesn't look any different. Someone already said it, but the fundamental problem with these are that it's extremely hard to build big and complex software without making it look like a huge mess. In a normal programming you can always call any part of code and make any number of instances and put them almost anywhere you want with very simple, logical and linear code which is executed in a normal standard prodecure (= line after another). With this almost everytime you make some changes you'd have to rethink the whole program flow and move all the components/blocks to different places and there are millions of lines going all around the place. 1/10, will fail.
- analog31 11y ago...the fundamental problem with these are that it's extremely hard to build big and complex software without making it look like a huge mess... In my view, text based languages could be this way too, except that the habits of making code at least marginally readable (e.g., indentation) and modular (subroutines, local variables, etc.) are drilled into everybody who learns programming, or learned through "the apprenticeship of observation." Also, those habits require only a bare minimum of physical effort, such as reaching for the tab button or enclosing some code in a function definition. I think a problem with graphical programming is the sheer physical effort that it requires, encouraging sloppy work. Maintaining readable code as it grows in complexity is a major chore, involving physical and not just mental, effort. In practice it doesn't happen.
- CyberDildonics 11y agoThat's a lot of snark for someone making such a broad generalization. Look at a program called Houdini and it's shading language. It is domain specific but includes branching and loops. The interface uses openGL and is extremely fluid. If that wasn't enough, it is live, so while you are working you can see your results in real time. You can use it to manipulate geometry, images, sound / animation, as well as the original purpose of writing shaders. That visual programming IDE has been enormously successful.
- CyberDildonics 11y agoIt seems a bit strange to me that they would take the directed acyclical graph interface of a compositing program (like Nuke as one example) and call it a general purpose language, then show it off by doing compositing image operations. If you want to work with images like this, download Nuke, if you want to work with images, geometry and more like this, download Houdini. There is a lot to be gained from structures like this in general programming, but what they are showing has already been done for 20 years. The real test is when you get in to branching, loops, and all sorts of things that aren't straight data flow. Whether people realize it or not, pure data flow is basically a solved problem, even from an interface view, it just isn't evenly distributed.
- wdanilo 11y agoHello! I'm one of the guys behind Luna. You might be right, that the first example on the website should not be connected to image processing, because it could make the reader biased. In fact any example could affect the reader in the same way. You can observe "branching" and some kind of "folds" in the second example on the website. There are no loops in Luna, because it's purelly functional language and everything can be done simply by recurrence or by using "fold" or "map" operations. As a side note - there is a startup using Luna as a core engine for image processing (flowbox.io) and a lot of movie studios around the world are testing it right now because it gives much greater power than Nuke's graphical representation. On the other hand there is a topic on sidefx forum (makers of Houdini) about incorporating Luna to Houdini to increase its power. Luna is above these domain specific use cases. I think the most important thing here is that although VPL was introduced many years ago (like textual programming), Luna is the first language that allows switching between code and graphs on demand.
- CyberDildonics 11y agoI think what you guys are doing is very interesting and I think in some ways you are on the right track, however: > You can observe "branching" and some kind of "folds" in the second example on the website. That is a static branch hardcoded from the GUI. That isn't branching because nothing is switching the boolean, which comes back to question of how you would switch the boolean in this structure. > a lot of movie studios around the world are testing it right now because it gives much greater power than Nuke's graphical representation This is a bold claim that I'm very skeptical of and my initial reaction is that this seems like a bit of a bluff. What studios are using it and what exactly are the benefits over Nuke that you're talking about? > Luna is the first language that allows switching between code and graphs on demand. This is far from true of course. Compositing program's file formats are essentially data flow scripting languages and Houdini's shading language allows you to look at the shader text while modifying it through a node graph. It really does seem cool but your claims are pretty bold. If you can show off a general purpose program written like this, something that would typically be done imperatively, then that would be much more of step forward from what has been done before.
- Jupe 11y agoWithout an equally elegant/powerful test framework, this is just child's play. If the concept allows, as some have mentioned, to let non-programmers make changes, then a fully-integrated test framework is absolutely required. Other questions come to mind: - How are global 'variables' (config, settings, etc.) represented? As more lines, or traditional named variables? - Although the Category Oriented Programming seems compelling, I'm not seeing how this visual world will address concurrency in any meaningful way (maybe I'm missing something) - although the profiler is nice. - Visual programming is also extremely messy when dealing with exceptions: not sure how that is addressed here - again more lines? Before long you end up with spaghetti... but perhaps they've solved that via views / layers or something. I highly applaud this effort, but it needs to address the complexities of software development /on the development side/... or it won't get much use by professional developers.
- wdanilo 11y agoHello! I belong to the team behind Luna :) When we are talking about testing framework, we should ask ourselves - what kind of tests are we talking about. In languges such as Python, Ruby or JavaScript (I don't consider JS to be a language, but this is just a side note) everything should be covered with all kind of tests - unit tests, behaviors testing etc. There are languages like C++ or Java, where some testing is not required, because it is done by the compiler - and I'm talking right now about just type system. Luna incorporates much better type system than C++ or Java. In fact Luna will throw compilation error if you want to access head element of an array if it cannot prove this element would be always there (Luna incorporates a complex type inferencer and dependent type system). You can tweak the compiler and allow for more liberal behavior if you like thought. To sum this up - I'm not talking that test framework is not necessary. It is, it is curtial and need to be polished to allow a language to be widely used. I wanted to clarify, that a great type syste, like the one in Luna, prevents from making errors so much, that you can write much fewer tests and be sure everything works as it should. Answering other questions: - there are no global variables in the traditional meaning (in fact there are no global variables in purelly functional languages at all). If you want to have something like a global variable you use monads! "Oh no, monads, I'm running away!" - this is a completely understandable reaction for vast majority of programmers. Because of that Luna incorporates an automatic monad management system. What it does is simple and allows using monads without thinking about it. You just put a "State.run" node and you pass all variables to it, that shoudl be accessible from every palce of its sub netwrok. Then you can put "get" node, that will access these "locally global" variables for you. It's just like a State monad in Haskell (this is explanation for Haskellers), but with visual, easy interface. And one more thing. Global variables are pure evil. I would call them bilion dollar mistake, such as null pointer references. Monadic states are pure and nice solution for it. (btw. Luna of course doesnt have something like `null`). - The lines you see represent all data dependencies in a graph. Anything not connected with lines (or monadic lines - like two actions that print something to the screen) can be run side by side. Our compiler understands that and can shedule the nodes to be executed in parallel. - Exceptions are represented on the bottom of our page. Exceptions in the meaning known from imperative programming are messy, ugly and doesnt fit in the visual environment well. In fact they are hard to deal by developers too - have you ever tracked an exception stack of poorly written code? This is pure nightmare. Luna introduces dataflow exceptions - please look at our website and I will answer any qeuestions that could appear after reading it :) - We have created a really big graphs with Luna without ending with spagetti - each node is build outo of graph of other nodes. If you've got to many nodes on the stage is justl ike writing a collosal 1k lines long function in textual code. You can then select some nodes and collapse them into one (just like refactoring functions out of such code block). We are aware of all these things and we do what we can to create a REALLY useful visual programming expirence. We've started this project because nobody ever did it and all the tools currently available (excluding some domain specific ones like Houdini, Labview etc) are just toys and cannot be considered programming tools.
- deleted 11y ago[deleted]
- gsanghera 11y agoThis is brilliant. I work in finance (trading) - and have been trying to learn Clojure and Rust on my own over the last year (no CS background). For people like me - this is phenomenal - if it works. The ability to think logically doesn't translate directly into the ability to program, or vice versa and a person must spend a considerable amount of time learning the tools of programming. This tool could fill that gap for non-CS engineers. Couple of questions (as you mentioned functional language) a) In the opinion of the makers - what is this language NOT good for? b) How good are the mathematical libraries going to be? As a benchmark I'd take Mathematica (not for speed - but width and depth of mathematical functions). If this question is redundant due to the ability to call Haskell - feel free to say so. c) How far does the automatic parallelism go? Is it truly distributed over any scale? Thanks again
- wdanilo 11y agoHello! First of all - thank you for a nice greeting! :) Answering your questions: a) This language is NOT good for any really low-level stuff like programming realtime hardware systems or low-level processors programming. You should then use pure C or assembler instead. If you are programming other low-level stuff, you could feel comfortable using Luna's textual representation. The visual one gives incredible boost when designing the high-level architecture. b) At the current stage Luna ships with a very limited standard library, but we will work hard in order to incorporate as many usefull libraries as possible. As you have spotted, Luna is able to directly call Haskell and we also provide foreign C interface, so binding any Haskell library is almost out of the box right now. c) We are strongly working on this topic. Currently our graphs are able to run in parallel all operations that are not data-dependent in any way. However it does NOT scale well if you're thinking about distributed systems, because it's not easy to determine where to partition your program, so sending data over network will not kill the performance. We will though be working toward addressing it in longer perspective. Did I answer your question? :)
- gsanghera 11y agoThanks for replying! (a) and (b) make sense. (b) will depend on adoption as well, so your answer is fully understandable. Just a follow-up question on (c) - if you will allow me please. Are the data structures immutable like Clojure and Erlang, so that they could be distributed eventually, once the optimizations are done (and you are able to package the non-functional code like C into their own partitions for the distribution)? Reason I ask is that the page mentions Category Oriented Programming - which I am not at all familiar with. Regards
- carapace 11y agoYou should identify yourselves. This seems like it should be very exciting, but I'm turned off by the "high hat" and anonymous presentation.
- wdanilo 11y agoHi! I'm one of the founders of New Byte Order (the company behind Luna). Do you mean that our website lacks information about who we are? Right, we will ad it there! :) In the meantime you can read some of the comments below, where I describe in details who I am and provide link to my linkedin account. Still I would like to apologize for the inconvenience caused by lack of these information at the website! :)
- carapace 11y agoYes, exactly. Without knowing anything about the people involved I am (was) reluctant to invest further time and attention (I'm studying Category Theory right now with an aim to implement programming tools, so you can imagine I'm very interested!) It's really great that you're addressing this. Thank you! ;-)
- Rafbill 11y agoI have a few questions: a) When is the first alpha release planned ? b) Did you go the Coq/Agda route with dependent types (only total functions can be defined), the Haskell (once the DependentTypes extension lands) route (partial/looping functions can be used in types and may need to be evaluated at compile time, the compiler can loop, there is no associated coherent logic), or the Idris route (only total functions can be used dependently) ? c) How extensible is the Standard AST ? (e.g. would it be possible to define something like the Coq tactic interface from within the language, or through a compiler plugin ?)
- wdanilo 11y agoHello! :) a) We will release it to the first group of alpha testers in couple of weeks from now. This will be couple of weeks, not couple of months. b) We're going the Haskell route - we allow for non-total functions, and we will extend Luna's type-checker to understand as much as possible. In fact we treat type level very similar to the value-level, very similar to the type of types - level, etc, so there could be functions evaluated at compile-time and they could cause infinite loop. Please note that although we design Luna in order to be fully dependent type language, the compiler just hit the alpha stage and there is much more work to be done in this field. c) The standard AST is really very extensible. In fact every term that belongs to AST is just different data type. We've written a library in Haskell that allows handling open sum types using all the type-level machinery to help it be bullet-proof. Luna will incorporate a library that allows you to change and manipulate the AST from within a language - something like TemplateHaskell, but without the stage restriction known from GHC. This is not available at the moment though. I doubt though you will ever need to extend the AST using a plugin, because it allows to express really wide logic, however I'm very interesting what idea do you have in your mind here! :)
- Arcsech 11y agoTypo: "printing the first hundread to the screen" Anyway, looks interesting. I'll be keeping an eye on it, even if the whole visual part turns out to be a steaming pile, the text-based language looks quite promising.