News for hackers. Stuff that matters.
Re:Show HN: Bel by DickieStarshine on Saturday October 12, 2019 @09:09AM (#21232779)
Have you looked at Julia?
Re:Show HN: Bel by MiroF on Saturday October 12, 2019 @09:15AM (#21232830)
Julia is compiled to machine code, not interpreted
Re:Show HN: Bel by fiddlerwoaroof on Saturday October 12, 2019 @10:59AM (#21233645)
Many lisps compile to machine code too. Compilation vs. interpretation is a feature of an implementation, not a language.
Re:Show HN: Bel by MiroF on Saturday October 12, 2019 @11:00AM (#21233660)
Scripting languages are by definition interpreted. The question was about fast scripting languages. I'm skeptical that Lisp compiled to Lua would count as in that category, but Julia unequivocally doesn't.
Re:Show HN: Bel by fiddlerwoaroof on Saturday October 12, 2019 @11:56AM (#21234102)
"Scripting languages are by definition interpreted" [[Citation Needed]].

There are Common Lisp implementations of both Python and Javascript (ES3) that compile to Common Lisp and then the Common Lisp compiles to machine code: as I said before, whether or not a language is interpreted or compiled is an implementation detail, not part of its spec.

Re:Show HN: Bel by MiroF on Saturday October 12, 2019 @01:59PM (#21234959)
https://www.webopedia.com/TERM/S/scripting_language.html

I chose this based off a random search on google of "scripting language." You can do the same and would get the same result.

It's not a rigorous term, because (you are right) its a property of the implementation not the language itself, despite the name.

But I don't think Julia has relevance to discussion of the speeds of interpreted Lisp.

Re:Show HN: Bel by lispm on Sunday October 13, 2019 @09:05AM (#21240162)
That term was a long time ago already seen as problematic in the Lisp community. At the time when Ousterhout used it for marketing TCL.

Basically a scripting language interpreter runs source code files, called scripts.

Lisp does that, too. But many Lisp implementations compile the code and often to machine code, since the runtime includes an incremental compiler. The incremental compiler can compile individual expressions to memory.

Thus when you use a Lisp system, running a script just looks like running an interpreter, even though the code gets compiled incrementally.

Lisp uses the function LOAD, which can load a textual source file and which can then read, compile, execute expressions from the file. Typically this is also available via command line arguments.

Like in SBCL one can do:

  sbcl --script foo.lisp
and it will read/compile/execute expression by expression from a textual source code file, actually incrementally compiling each expression to machine code.
Re:Show HN: Bel by ska on Saturday October 12, 2019 @02:36PM (#21235216)
> Scripting languages are by definition interpreted.

I don't think this is correct. Scripting aren't rigorously defined, of course, but it would be reasonable to say they are defined by practice (i.e. a scripting language is practical for scripting).

Most compiled languages knock themselves out of contention in this definition because the startup and/or compile times are too long to be practical. But I've used luaJit in scripting contexts before, so that at least muddies the waters. Also common lisp (a variant that was always compiled).

Re:Show HN: Bel by MiroF on Saturday October 12, 2019 @02:44PM (#21235278)
It's a term for a simpler era where these divides made sense.

I've always understood it to mean interpreted and from a quick google search there are at least a sizeable number of people who agree.

I think now that there are a lot of high level compiled languages, it makes less sense.

Re:Show HN: Bel by vanderZwan on Saturday October 12, 2019 @10:10AM (#21233224)
That has nothing to do with how "lispy" it might be. Part of the compiler is implemented in femtolispe no?
Re:Show HN: Bel by MiroF on Saturday October 12, 2019 @10:58AM (#21233641)
I suspect this does have to do with whether or not it is a fast scripting language, considering a language compiled into machine code is by definition not a scripting language.

Sure, flag me, but my comment was relevant to the discussion.

Re:Show HN: Bel by e12e on Sunday October 13, 2019 @07:33AM (#21239841)
Julia is currently (only) jit. AOT is stil work in progress AFAIK.

It's about as "compiled" as Luajit is.