News for hackers. Stuff that matters.
Re:Where are the fast dynamic languages? by ardit33 on Thursday April 03, 2008 @07:07PM (#154377)
Lua? It is very simple language. Unfortunately, there is a performance penalty with dynamic langues, which wont go away.
Re:Where are the fast dynamic languages? by maximilian on Friday April 04, 2008 @01:21AM (#154568)
Here is a good discussion about using Lua to script stuff for embedded or cell phone development: http://lua-users.org/lists/lua-l/2007-11/msg00248.html

Its an interesting read. Lua seems pretty sweet!

Re:Where are the fast dynamic languages? by ardit33 on Friday April 04, 2008 @12:52PM (#154979)
maximilian, we are already doing that.
Re:Where are the fast dynamic languages? by maximilian on Friday April 04, 2008 @04:57PM (#155237)
doing..? hacking cell phone software in Lua? I'd love to have at some embedded stuff with a non-c language. So much less to worry about screwing up. Although a lot of embedded stuff is hardware level stuff that has to be done in c anyway, so no lua there.
Re:Where are the fast dynamic languages? by ardit33 on Friday April 04, 2008 @10:15PM (#155435)
yes. Maybe we will release the interpreter part open source., but it is not done yet. Basically a J2ME and C++ (for brew and palm), interpreter for lua. The whole idea, is that you can build an app once in Lua, and run it everywhere (for reals). This is a company thing, (we are not a small startup), so I am not sure how much of it will be realeased open source.
Re:Where are the fast dynamic languages? by icky on Thursday April 03, 2008 @11:44PM (#154522)
> Unfortunately, there is a performance penalty with dynamic langues, which wont go away.

You'd be amazed at the sorts of aggressive optimizations that can be done at compile-time.

Re:Where are the fast dynamic languages? by Tichy on Friday April 04, 2008 @05:49AM (#154657)
Still, how do you get around the fundamental problem of symbol lookup? Maybe sometimes you can infer the type, but I doubt that it is possible in general.

If the symbols are "hard linked", it is not dynamic anymore.

I wonder what strategy the LISP dialects out there typically use? I was impressed how easy it is to create an object system in a LISP, but somewhat dismayed because all examples just used (cond) for symbol lookup. Maybe because they were just academic examples, or perhaps they really don't care about performance at all?

Re:Where are the fast dynamic languages? by icky on Friday April 04, 2008 @12:12PM (#154926)
> If the symbols are "hard linked", it is not dynamic anymore.

Lies, slander! ;-)

Anything that happens within a function can be treated as a black box, and compiled down to the metal, if you like.

The language can be as dynamic as you like; that doesn't preclude the output format from being tightly optimized machine code.

Re:Where are the fast dynamic languages? by Tichy on Friday April 04, 2008 @12:26PM (#154943)
What about the things you pass into the function? You can't know their properties in advance, in general, or can you?
Re:Where are the fast dynamic languages? by icky on Friday April 04, 2008 @10:44PM (#155449)
> What about the things you pass into the function? You can't know their properties in advance, in general, or can you?

You can know that, e.g. a function passed in as an argument can be dereferenced as a pointer stored in a specific offset on the stack.

If your typechecks are compiler-generated statements inserted before a function call, then if you know at compile-time (via declarations or type inference, or type propagation) that a certain variable (to be passed as an argument) will always be of the correct type T, then you can omit the typecheck, as well as boxing/tagging.

You can get really close to the metal this way, and still have your language be as dynamic as can be.