Live data from Hacker News

Thoughts on Designing a new Web Apps Language

heapified.com

11–20 of 43 posts

Re: Thoughts on Designing a new Web Apps Language

#12
For web apps I would like a language that works both compiled and not compiled. Either I just copy my scripts to the web server when I'm lazy (or developing), or I compile it (and run unit and integration tests and whatever) when I'm done developing. Is there any language/platform that works like that?

Re: Thoughts on Designing a new Web Apps Language

#13

For web apps I would like a language that works both compiled and not compiled. Either I just copy my scripts to the web server when I'm lazy (or developing), or I compile it (and run unit and integration tests and whatever) when I'm done developing. Is there any language/platform that works like that?

The Snap framework (http://snapframework.com/) for Haskell works this way. Your application (including the web server itself) gets compiled down to a single binary, but during development you can make changes and see them reflected on the fly without manually recompiling. This is my understanding based on an interview with one of the framework's developers; I haven't used it myself for any significant project, though I plan to.

Haskell in general meets a lot (though probably not all) of the author's requirements. Static type inference is great, and Haskell's system makes explicit type declarations completely optional except for in a handful of rare cases, though you will find yourself wanting to use them on most functions anyway because of how they clarify and improve the readability of your code. Testing is also dead simple with tools like QuickCheck--it essentially manufactures test cases for you based on invariants that you specify about your code.

Re: Thoughts on Designing a new Web Apps Language

#14
post #8

He rather lost me at first two points. I don't hear a lot of complaints from the Python or Ruby camps about how much they desperately miss static typing. It would have to be via a seriously 'get out of my way' type-inference for me to want to allow all that ugly back into the language. And point 2. Performance? Again - don't hear much complaining about this for the vast majority of applications. I rarely find the bot…

Have you ever used anything in the ML family of languages (e.g OCaml/Standard ML/Haskell)? You barely ever have to write types in these as long as your program makes sense..

Re: Thoughts on Designing a new Web Apps Language

#16

For web apps I would like a language that works both compiled and not compiled. Either I just copy my scripts to the web server when I'm lazy (or developing), or I compile it (and run unit and integration tests and whatever) when I'm done developing. Is there any language/platform that works like that?

The Snap framework ( http://snapframework.com/ ) for Haskell works this way. Your application (including the web server itself) gets compiled down to a single binary, but during development you can make changes and see them reflected on the fly without manually recompiling. This is my understanding based on an interview with one of the framework's developers; I haven't used it myself for any significant project, thou…

I use Snap on one small project, it is pretty awesome. Snap applications have the terseness and simplicity of, say Sinatra or Rails, but with type checking. As is often the case in Haskell, if your program compiles it is usually correct.

What I also like about Snap (and Yesod) is that it is integrated well with the enumerator package. Simply said, the enumerator package allows you to implement composable data sources, manipulators, and sinks. Since many web applications consist of extracting data from a source, manipulating, and sending it, it allows you to write applications short and simple.

Re: Thoughts on Designing a new Web Apps Language

#17
post #9

I'm dealing with this very question right now, only I'm coming from a different angle. I've already picked the language, but I'm attempting to build a framework in it that makes it work in a very different domain. What I'm working on is sort of an answer to node.js. It is a coffeescript platform (use js if you prefer) built on top of erlang. So, the coffeescript runs in an erlang environment. This means, when you cal…

Are you going to be able to pass data between the phases other than through the DB? It doesn't sound like it from your description, but living without closure equivalent would be painful. Maybe some way to add some data that gets message-passed to the next phase?

Sounds interesting.

Re: Thoughts on Designing a new Web Apps Language

#19

For web apps I would like a language that works both compiled and not compiled. Either I just copy my scripts to the web server when I'm lazy (or developing), or I compile it (and run unit and integration tests and whatever) when I'm done developing. Is there any language/platform that works like that?

The Snap framework ( http://snapframework.com/ ) for Haskell works this way. Your application (including the web server itself) gets compiled down to a single binary, but during development you can make changes and see them reflected on the fly without manually recompiling. This is my understanding based on an interview with one of the framework's developers; I haven't used it myself for any significant project, thou…

Thanks for the link, I'll have to check this out some time. For some reason I always find it hard to imagine how I could write a whole app in a functional language. Probably that's because I've never actually done it..

Re: Thoughts on Designing a new Web Apps Language

#20
post #8

He rather lost me at first two points. I don't hear a lot of complaints from the Python or Ruby camps about how much they desperately miss static typing. It would have to be via a seriously 'get out of my way' type-inference for me to want to allow all that ugly back into the language. And point 2. Performance? Again - don't hear much complaining about this for the vast majority of applications. I rarely find the bot…

Have you ever used anything in the ML family of languages (e.g OCaml/Standard ML/Haskell)? You barely ever have to write types in these as long as your program makes sense..

It'd be better to simply have a JIT with type inference for performance.
Post reply on HN