Hacker Newsnew | comments | show | ask | jobs | submit login
Lunascript, another language for writing great web apps (asana.com)
75 points by snewe 2001 days ago | 46 comments



I respect the ambition, but doesn't it seem like a waste of time and money for a brand new startup to focus on the creation of a brand new language (+compiler +debugging facilities +documentation for new employees +libraries +...) before making the core product? I understand the argument that better languages = increased productivity. But designing a new language is a serious investment, and unless what they've made is so revolutionary that it completely changes the web development paradigm, it doesn't seem as if it would pay off.

-----


Seems to me like being able to implement things 10x more quickly than your competitors is a sustainable competitive advantage. If you're trying to appeal to employees/investors, being an order of magnitude faster is a good pitch. Think about it this way:

When you evaluate a startup, what do you look at first, the idea or the team? Obviously, the team. Why? Because (a) you want to know if they're capable of implementing the idea and (b) because you know that ideas almost always change, so the team's ability to rapidly implement and iterate is its real strength.

I agree that this struck me as somewhat absurd when I heard Asana was developing a new language, but if it actually works as advertised then it's really smart.

-----


> being able to implement things 10x more quickly than your competitors is a sustainable competitive advantage.

The only way you are going to get 10x, with roughly equivalent people is if someone is using a wholly inappropriate language (Ruby vs Forth for web apps, say), or if you can avoid writing libraries because someone has already written them.

This is one of the positive network externalities involved in programming language economics: the more people involved, the more likely it is someone has already written the code you need. Of course, these effects are not so strong that everyone gravitates to only a few languages, but they are certainly a consideration.

By writing your own language, unless it makes it very easy to take advantage of some other language (the JVM languages are a good example), you are pretty much guaranteeing that you will have to do this work yourself.

-----


The only way you are going to get 10x, with roughly equivalent people is if someone is using a wholly inappropriate language (Ruby vs Forth for web apps, say), or if you can avoid writing libraries because someone has already written them.

Or if your competitors are using the standard languages and tools, and you're using a language that provides significant abstractions on top of the standard languages and tools.

I was on board with your comments until I watched the video. Their language looks to be a jump on the order of assembly to C.

-----


You're effectively arguing that all languages/frameworks are equal within an order of magnitude. I think this has been demonstrated false time and time again, and you even demonstrate it again in your own post (saying Forth is unacceptable for web development).

Why so negative?

-----


I'm arguing that languages that are currently used and honed for this type of programming are going to be difficult to beat by an order of magnitude. I said that you could lose a lot by using something that's just plain wrong. In other words, it's very difficult to go faster than Lance Armstrong on a bike, but pretty easy to go a lot slower.

Perhaps there is some room for radically new implementations; something along the lines of Erlang, which makes it possible to do what is quite difficult with other languages.

I think there is more room in frameworks for existing languages, but still, an order of magnitude seems quite dubious to me.

I'm actually not at all negative about new languages (I hack on a simple one myself), startups just don't strike me as the place for them. What they're doing does look cool, but what happens when you need to process an image, or send email, or talk to a different database, or deal with any of the other various things that are often covered by language extensions? Maybe this would have been better as a hack/framework on top of Javascript.

-----


Maybe this would have been better as a hack/framework on top of Javascript

Did you see the bit where they can drop into raw Javascript at will?

-----


It seems to me that the core concept here is the declarative nature of the framework, and the logic that ties things together that comes from the compiler. On one side, it has to spit out Javascript, so perhaps it would have made sense just to do the whole thing as a hack/extension/whatever to Javascript?

I guess without actually seeing the code behind it, it's difficult to really say with certainty.

-----


Where has this order of magnitude difference been "proved"? I would say that even developing in forth is not one order of magnitude slower than ruby, as long as reasonable libraries are available.

-----


Every single day when we don't program in COBOL. I'm at a bit of a loss, have you never switched to a more productive language and cringed when you went back to the old language?

-----


> have you never switched to a more productive language and cringed when you went back to the old language.

Yes, but the difference is not one order of magnitude. Not if there is some level of sanity in the language (e.g., I am not talking about brainfk). For example, even though one can program faster in Python, it is not 10 times faster than in C, especially for large-scale software.

-----


I easily program software 50x faster in python than C. If I didn't, I would be using C for speed.

-----


This just talks about your personal skills (or lack of) in C. I know people that can write an application in C faster than most can do in Python.

-----


You know, I was going to point out how amazingly brain dead that comparison was, and how inappropriate it was to try to guess my skill level in various languages based on my claim that a language that requires 1/20 the LOC is 50x faster.

I will however finish with, there's a reason C applications don't have features or agile development cycles, and it's not because the coders are absurdly productive. Also, please don't ever try to be a manager.

-----


Programming languages aren't that hard, so I'd say, if it makes them way more productive later, then no it's not a waste of time.

-----


If they aren't that hard, how come so many never seem to be... well, 'finished'? I think they tend to be a fairly large time sink, especially because it's great fun to work on one. It's exactly the kind of thing that could be very distracting for a startup.

-----


You're making two points, either or both of which may be good, but they are two different points. First, are they hard or easy? Second, are they distracting because they're fun/engaging? Either "problem" may lead to them being a huge time sink for startups and either may lead to them being perennially unfinished.

The good news is that a language for in-house use need not be finished to be useful. For example, FB's PHP compiler can't compile "eval." No problem, don't use eval in-house. If they were trying to "finish" it in the sense of writing a compiler for every possible PHP app, they would have to address that somehow. But instead, they punt on it and carry on using it in house.

-----


I would say reasonably easy to start with, but needing a lot of ongoing effort for improvements, bug fixes, and so on, which is exactly why I think it's a dangerous combination for a small company.

I think they're likely to be an ongoing distraction for the above reason, and also because of the fun/intellectual challenge reason.

> punt on it and carry on using it in house.

Over time, that kind of thing can (if you're not careful) lead to dangerous cruft, where the in-house divergences pile up to the point where it's no longer so easy to go back and forth between the public/open version. And thus is born a new species with a far smaller ecosystem than the original.

-----


"I think it's ... dangerous .. for a small company."

of non compiler/language processing experts.

If you've built compilers before and know what you are doing (I have no idea if these guys are such experts or not) , it may be a reasoned decision taken after weighing benefits and costs.

Leon Bottou and Yann LeCun seems to have built the Lush dialect of lisp to build commercial systems. (http://lush.sourceforge.net/credits.html)

For example, I can easily imagine PG building a variant of lisp and building a product/company around that . Of course if you only have a vague idea of how to build a compiler/interpreter/whatever, then building a company around your first such project may be ... interesting.

-----


I can easily imagine PG building a variant of lisp and building a product/company around that

Or perhaps using Lisp to write his own continuation-based web framework and building a company around that?

-----


yeah sure. I first wrote "arc" and then replaced it with "a variant of lisp" then replaced "another company" with "a company" so the sentence reads oddly.

-----


A language doesn't need to be "finished" to be usable. There is a minimal viable implementation for internal use.

I'll grant that investing in language development is unusual. But the risks involved aren't sufficiently different from those taken by 37signals in choosing Ruby and developing a framework. There are payoffs for core technology development.

-----


If it increases the chance of a technology or people acquisition it would be creating value.

-----


It decreases the chance of an acquisition, unless things have changed since the last time I was involved in acquisition talks. A sticking point in at least 3 acquisition attempts I was involved in (one consummated) was the use of idiosyncratic tech; in one case, it was using Tcl; in another, OpenBSD.

-----


Great information, thanks! I take it the companies using Tcl and OpenBSD failed to get acquired.

I didn't realize the technology used would deter an acquirer. This probably explains why most startups go with "safe choices".

-----


I'm not going to say that (eg) OpenBSD kept a company from getting acquired; terms and timing were more important. But it was continuously raised as an issue, seriously enough that the engineering team was asked to port.

Bizdev is an awful reason to choose technology, or for that matter to make any other decision about your product. I'm just refuting the statement that writing your own programming language will help you get bought.

-----


I had a chance to chat with them - I honestly think lunascript and its platform is the core product. The productivity app they're building is a first show case (and in-house infrastructure)

-----


Maybe there is another side to things. I know that creating a new programming language isn't the easiest way to earn money but if you are successful there are lots of interesting ways to make money. Even an open source language provides possibilities for books, conferences, advocate positions, merchandize etc.

-----


With a team of rock stars and $9M+ to burn, they can take the time to scratch a really big itch.

-----


Hopefully they've retained George Broussard to head the team up.

-----


If you've got chicken pox then stop scratching

-----


I had a chance to chat with them - I honestly think lunascript and its platform is the core product. The productivity app they're building is a first show case (and in-house infrastructure)

-----


37signals ?

-----


In the Rails source tree:

    find . -name "*.rb" | xargs wc -l | tail -1
    161472 total
In the Ruby source tree:

     find . -name "*.rb" | xargs wc -l | tail -1
     639682 total
     find . -name "*.c" | xargs wc -l | tail -1
     590656 total

-----


I'm interested in exactly the sort of application framework they seem to be talking about. This is really how web apps (or all apps) should be built.

The Wikipedia link isn't terribly informative, but there's a ton of more relevant literature tied in with functional reactive programming. (That's the FRP in their to-do list). In particular, there's a research project called Flapjax that you can play with right now that drives home how nice it could be to program in this paradigm.

I have two worries about Luna, though. It doesn't look like they're using a nice type system, which will be a pain for larger apps. And I can't say I like that "Finish patent documentation for incremental computing framework" to-do item.

-----


I interviewed with Asana back in October and I got to see an in-person demo of the app Justin shows at the 1:45 mark, a "structured list editor" that he says they use internally to track bugs and projects. It's not just a hello world app they built to test the language, it's a real app they use daily and fast fast fast. After poking around on it with only keyboard shortcuts while discussing UI ideas for a few minutes, I completely forget that it was a web app. It didn't have any of gmail's or google reader's lag, for example, which are the only apps with keyboard shortcuts I use regularly.

-----


I would guess the speediness was because the server was in the same building?

-----


They promote offline caching, so I'm betting speediness was because his edits were modifying a local db then going through diff resolution after they displayed.

-----


This language looks pretty awesome, reading the example code I can see how it would slash my loc for ajaxy stuff by at least an order of magnitude.

However, I am confused about this announcement since I cannot discover what your company does from the web page and except the video there's not much to go on about the language. Perhaps you want to fill in some blanks in the comment section?

-----


> There's no need to write separate code to help the server figure out which values need to be sent to the client: the server can do this by simulating the UI.

Interesting approach.

The screencast is very good.

Wonder if that 1500 line todo list app is part of Asana?

-----


Isn't this a bit similar than what GWT does? GWT requires Java which is clunkier than a modern dynamic language, but still...

-----


It seems like writing a whole new language is a bit overkill... why not simply stick to the framework layer?

-----


You really want to write code only once, and compile it to two targets: One for the server, one for the client. This is really hard to do in all current mainstream languages.

To illustrate: You have some piece of state y, and you have x = f(y) that means "x is always the value of f(y), when y changes, update x." Furthermore x is shared state across many users. On the server side you want that statement to generate code for synchronizing values of x and y across users. On the client side you want to generate code for pushing and pulling Ajax/Comet updates from the others.

-----


Isn't this somewhat equivalent to flapjax[1]?

[1] http://www.flapjax-lang.org/

-----


I don't think so. I don't see any functional reactive stuff in Luna, whereas that's the whole point of Flapjax...

Edit: reading more closely, I see why you say that -- "incremental computing" link makes me think of FRP a little bit. But these people's goal with Lunascript seems to be automatic communication between the client and server. The "incremental" part is sending only what's needed to the client to execute the client-side code, which is a really cool idea, but not very much like FRP, I think.

-----


Andrew Warner should interview these guys immediately.

-----




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact

Search: