Guile does it better. You can use shared memory threads in guile without any penalty. Atmost you have to allow for the garbage collector to run when inside FFI functions. But that is a small price to pay in case you need to use multiple parallel-concurrent threads with a single heap.
Guile was built with FFI in mind and has an impressive history. Just take a look at guile gnome bindings.
> Speed and Simplicity
Guile 2 is extremely fast. Not as fast as LuaJIT, but it no reason it won't get there. As for simplicity, take a look at the partial evaluator in trunk of guile 2.
> Education
Guile is good old scheme.
> Functional
Can't get more functional than scheme :)
> Everything is a Table
Well, almost everything is a pair in guile. Vectors and hash-tables are trivially available. Though I recommend to sticking to functional programming in scheme style.
> Consistent
As before, can't get more consistent than scheme.
> Portable
Guile is available on n900. So there.
To continue, guile has continuations (delimited or otherwise), and macros (hygienic or otherwise), both of which are effectively missing in lua.
And guile offers all of this while supporting native threading with a single heap. Sweeet.
Not sure if I'd agree that Guile's FFI bindings are better than LuaJIT's FFI. It's certainly easier to declare a function in LuaJIT - you can take the definition directly from the header file, rather than transcoding it into s-exps.
You also get the ability to add metamethods and finalizers to returned C objects (so you can use Lua's built-in GC to clean up after, for example, your FILE*).
As for the speed, there's no reason that a lot of dynamic languages couldn't be as fast as LuaJIT. But none of them are even close. I wish LuaJIT was still up in the computer language shootout. The LuaJIT interpreter (with JIT turned off) is 3x faster than V8 on the PC, and faster than Java on Android. And that's the interpreter - the JITed code is way faster.
Of course, macros are awesome, and a huge point in Guile's favor. On the plus side, Lua is very easy to understand, especially if you're coming from Javascript.
"As for the speed, there's no reason that a lot of dynamic languages couldn't be as fast as LuaJIT. But none of them are even close. I wish LuaJIT was still up in the computer language shootout. The LuaJIT interpreter (with JIT turned off) is 3x faster than V8 on the PC, and faster than Java on Android. And that's the interpreter - the JITed code is way faster."
[Citation Needed]
I know of old benchmarks (pre Crankshaft) that showed the interpreter being faster than V8, but my own tests using the same benchmarks from the computer language shootout show V8 to be about 1.5x faster than luaJIT now.
You can compare v8 to vanilla lua on the computer language shootout benchmarks page, and then compare luajit to lua on the luajit page. V8 has definitely made up some ground, and the luajit interpreter isn't generally faster than v8, but the jit is still way faster on almost all tests. The one area where luajit isn't great is on tests that stress garbage collection, since luajit still uses vanilla lua's GC. I think that's luajit's next area of focus.
My definition of an FFI was simply about fully supporting native threads. Simplifying FFI definitions has not been a big deal for me. It is either a few hours of work, or if more than that, then I simply use Swig.
I agree on the speed part. But guile 2 is getting better. The reason guile cannot be as blazing fast as say gambitc is their need to inter-operate with all sorts of C code. Native threading included.
Rich Hickey: "Functional has been applied, you know, for a whole spectrum of things. I think there’s the haskell meaning of functional, which is sort of, the pure notion of function applied to absolutely everything in the language. And then there’s another notion of functional... lisps claimed to be functional early on, only for the simple reason that functions were first class objects or values that you can pass around. Those are the two ends. Somewhere in the middle, i think, is a style of programming that emphasizes programming with pure functions, in other words functions that are free of side effects, that operate only upon their arguments, which are values, and that only produce values as results. So that’s a pure function. Clojure emphasizes the style of programming using pure functions, where lisps, traditionally, have not. You could do it, but it was a choice. The key thing in forcing you to make that choice, is to have the core data structures be immutable, so they now can be treated as values, in a way that mutable things cannot. So Clojure emphasizes functional programming, by providing a set of immutable core data structures, including those ones that you use to represent code. They’re also persistent, which is a special characteristic we could talk about. Because of that, it encourages the functional style of programming, because you cannot change [the core data structures], so you have to write a function that produces a new value as a result. but there’s no enforcement. if you write a function and that does IO, well that’s not a pure function anymore, and I don’t preclude it, and there’s no type system to preclude it, its a dynamically typed language, which just respects the programmer’s right to do whatever they please." [1]
> And guile offers all of this while supporting native threading with a single heap.
What is Guile's synchronization model for shared-state multithreading?
> Guile is available on n900. So there.
This appears to be a Linux-based phone, so that's not very surprising or impressive. Lua is straight ANSI C and can compile on much more limited systems than a Linux-based smartphone.
One other data point: Guile is 5x the size of Lua, in both source and binary forms.
> To continue, guile has continuations (delimited or otherwise), and macros (hygienic or otherwise), both of which are effectively missing in lua.
One of the authors of Lua made an interesting point in his slides describing Lua 5.2: if you think "goto" is evil, continuations are much worse. And yet it's considered "cool" to support continuations. http://www.inf.puc-rio.br/~roberto/talks/novelties-5.2.pdf
Scheme community frowns upon mutating code. R6RS even forced that by default, though the rest of the specification was a mess.
So, scheme style these days is all about pure functions, tail calls and continuations. To think about it, that really is setting it apart from common lisp.
Th Scheme language allows, and the Scheme community encourages, functional style, but it's still up to the programmer to write their programs that way. In Haskell, there is no other way -- even imperative programs in Haskell are functional!
I own N950 - I wouldn't die if I hadn't it. I use it up to full power, I love it, but I can replace any part* in it with something else either by delegating that to dumbphone or laptop.
* - problem with Nokia Maps for car navigation while from other side I love to be lost a little bit.
> I respectfully submit that the man who thought AWT was an acceptable GUI toolkit doesn't have a leg to stand on here.
Where did Gosling say that? I remember reading that AWT was a botched job because they had very little time to ship out a UI toolkit. They replaced it with Swing later.
And if you think Swing also sucks, then try developing swing apps in groovy. Java language sucks even in SWT UIs.
So you ship a crappy GUI toolkit and you expect OS makers to do what exactly? Suck it up and deal with crap? Do your work for you and implement a higher quality cross-platform GUI toolkit? Or build OS specific tooling to solve the problem where they can? It's no wonder that both Microsoft and Apple ended up making modifications to Java for their own platforms, the platform as it existed was not suitable.
From "far more than they needed to be" I read that he thinks they changed "far more than they needed" to change in order for the native look & feel. So, he doesn't criticize their work, he criticizes the way they did the work.
Microsoft had run huge ads on how LSE was using .NET and Windows in critical financial applications. Within a year LSE had suffered crashes in the same critical areas.
In fairness, though, it may not have been MS' fault - crappy programming is crappy, no matter the underlying OS. And Linux fanboys should wait to see if the new system has roll-out issues...
I agree. At these speeds it has less to with OS and/or language and has more to do with smart programming decisions. PS - Singapore Stock Exchange quotes a faster latency than Nasdaq and LSE:
Can you elaborate on this? Are they developing a fork of the Linux kernel? A new Linux distro? Or could it be that they are developing the trading "platform", using a commodity Linux distro?
Much of high performance modern VMs (not just JVM) are built on Self project and StrongTalk acquisiotion by Sun. I think Oracle would have quite a few key patents due to this.
Though the Visual works contribution to VM technology cannot be discounted. And it is owned by IBM. So probably IBM and Oracle will not use these patents against each other.
American here. There are professors of English in the US who pride themselves on incomprehensibility. And let's not get started on the social scientists...
I had the same impression. Nothing can educate like a good teacher who coaches you directly. Looks like many americans (or britons) are not getting this individual attention in their schools and colleges.
Some professors are able to teach you complex things in such simple terms that it damn well blows you away. I remember being tought van der walls equation's proof using some very basic concepts and the taylor series. I can't find that simple a proof on wikipedia now, and unfortunately I have forgotten much of physics. SICP is also a good example of a good teacher making complex problems simple.
I can't find that story online, but it has a similar ending vis-a-vis the alien's decision.