1 / 123

The JVM is dead! Long live the Polyglot VM!

The JVM is dead! Long live the Polyglot VM!. Marcus Lagergren Oracle. The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract.

kurt
Download Presentation

The JVM is dead! Long live the Polyglot VM!

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. The JVM is dead!Long live the Polyglot VM! Marcus Lagergren Oracle

  2. The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle.

  3. Who am I? @lagergren

  4. Program Agenda • Introduction • History of VM languages and runtimes • Emerging languages and language design on top of the JVM • Invokedynamic • The Nashorn project • The Da Vinci Machine Project (MLVM)

  5. Introduction

  6. I am here to talk about… The Java Runtime: The JVM

  7. I am here to talk about… The Universal Meta-Execution Environment

  8. I am here to talk about… The Universal Meta-Execution Environment

  9. I am here to talk about… The JVM as a multi language runtime

  10. I am here to talk about… The JVM as a multi language runtime (especially in the context of dynamic languages)

  11. History (what is a runtime anyway?)

  12. LISP

  13. LISP 1950s – First compiler in 1962

  14. LISP 1950s – First compiler in 1962 Just-in-time compilation

  15. LISP FIRST JIT EVER! 1950s – First compiler in 1962 Just-in-time compilation

  16. LISP 1950s – First compiler in 1962 Just-in-time compilation GC – Reference Counting

  17. LISP FIRST MODERN ADAPTIVE RUNTIME! 1950s – First compiler in 1962 Just-in-time compilation GC – Reference Counting

  18. Smalltalk

  19. Smalltalk First class library

  20. Smalltalk First class library First visual GUI driven IDE

  21. Smalltalk First class library First visual GUI driven IDE BYTECODE!

  22. Smalltalk NOTHING NEW UNDER THE SUN SINCE? First class library First visual GUI driven IDE BYTECODE!

  23. Emerging languages (especially on the JVM)

  24. Dynamic Languages ActionScript Adenine APL BASIC BeanShellClojure ColdFusion Dart Dylan Groovy E Fancy JavaScript Julia Lua MATLAB Objective-C Perl PHP Powershell Python Qore R REBOL REXX Ruby Scheme Smalltalk Snit Tcl VBScript Yoixetcetcetc etc…

  25. Dynamic Languages ActionScript Adenine APL BASIC BeanShellClojureColdFusion Dart Dylan Groovy E Fancy JavaScript Julia Lua MATLAB Objective-C Perl PHPPowershellPythonQore R REBOL REXX Ruby Scheme Smalltalk Snit Tcl VBScript Yoixetcetcetc etc…

  26. Dynamic Languages • Dynamic Languages are hot today because • They are easy to use • They have no explicit compile stage • They have good code readability • Allow short development time for small projects • Performance is good enough

  27. Trendy Dynamic Languages

  28. Trendy Dynamic Languages

  29. Trendy Dynamic Languages

  30. Trendy Dynamic Languages

  31. Trendy Dynamic Languages Already on top of the JVM

  32. Trendy Dynamic Languages Already on top of the JVM

  33. … and of course V8, Futhark, Carakan, SpiderMonkey, JägerMonkey, *Monkey, Nitro, Rhino, Nashorn, etcetc

  34. Dynamic Languages – Implementation

  35. Dynamic Languages – Implementation • Native Runtimes • Ruby, Perl, Python, v8, *monkey etc

  36. Dynamic Languages – Implementation • Native Runtimes • Ruby, Perl, Python, v8, *monkey etc • Metacircular • PyPy, Steel Banks Common LISP, Rubinius (well partly), Smalltalk

  37. Dynamic Languages – Implementation • Native Runtimes • Ruby, Perl, Python, v8, *monkey etc • Metacircular • PyPy, Steel Banks Common LISP, Rubinius (well partly), Smalltalk • On top of a (J)VM • Clojure, Jython, JRuby, Rhino, Nashorn • DLR/CLR

  38. Dynamic Languages – Implementation • Native Runtimes • Ruby, Perl, Python, v8, *monkey etc • Metacircular • PyPy, Steel Banks Common LISP, Rubinius (well partly), Smalltalk • On top of a (J)VM • Clojure, Jython, JRuby, Rhino, Nashorn • DLR/CLR

  39. Dynamic Languages – Characteristics • Most emerging JVM languages today are dynamic • As opposed to “non-dynamic” I guess… • What is a dynamic language? • Is there a formal definition?

  40. Dynamic Languages – Characteristics • Loosely typed • Dynamic binding • Resolve functions/members/calls at runtime rather than compile time

  41. Dynamic Languages – Characteristics • Liberal redefinition policy • Redefine/modify a class • Redefine/modify a function

  42. Dynamic Languages – Characteristics • Liberal redefinition policy • Redefine/modify a class • Redefine/modify a function • Redefine a builtin even • Oh, go to hell, JavaScript! Math.sin = function(x){ return 17; }

  43. Dynamic Languages – Characteristics • Code equals data • eval/ REPL • Automatic memory management

  44. Dynamic Languages – Characteristics • But you can extend Java at runtime too, can’t you? • Maybe a “non dynamic” language is more like C? • I don’t think the “dynamic” prefix matters much • Things change at runtime – handle it

  45. Putting your language on top of the JVM

  46. Why? • You get so much for free • Automatic memory management • State of the art JIT optimizations • Native threading capability • Hybridization (JSR-223) • Man decades of high tech

More Related