145
Ola Bini JRuby Core Developer ThoughtWorks Studios [email protected] http://olabini.com/blog Common Lisp in Java Jatha

  Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

  • Upload
    others

  • View
    14

  • Download
    0

Embed Size (px)

Citation preview

Page 1:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

Ola BiniJRuby Core DeveloperThoughtWorks Studios

[email protected]://olabini.com/blog

Common Lisp in JavaJatha

Page 2:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

Common Lisp?

Page 3:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

Common Lisp?ANSI standard

Page 4:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

Common Lisp?ANSI standard

Powerful

Page 5:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

Common Lisp?ANSI standard

Powerful

Multiparadigm

Page 6:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

Common Lisp?ANSI standard

Powerful

Multiparadigm

Procedural

Page 7:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

Common Lisp?ANSI standard

Powerful

Multiparadigm

Procedural

Functional

Page 8:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

Common Lisp?ANSI standard

Powerful

Multiparadigm

Procedural

Functional

Object oriented

Page 9:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

Common Lisp?ANSI standard

Powerful

Multiparadigm

Procedural

Functional

Object oriented

Dynamic and lexical scope

Page 10:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

Common Lisp?ANSI standard

Powerful

Multiparadigm

Procedural

Functional

Object oriented

Dynamic and lexical scope

CLOS: multimethods, method combinations

Page 11:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

Common Lisp?ANSI standard

Powerful

Multiparadigm

Procedural

Functional

Object oriented

Dynamic and lexical scope

CLOS: multimethods, method combinations

Macros and reader macros

Page 12:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

Jatha history

Page 13:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

Jatha history1991: In C++

Page 14:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

Jatha history1991: In C++

1996: Need for GC => Java port

Page 15:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

Jatha history1991: In C++

1996: Need for GC => Java port

1997: Large subset of CL implemented

Page 16:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

Jatha history1991: In C++

1996: Need for GC => Java port

1997: Large subset of CL implemented

2002: Was used to port the Algernon rules engine

Page 17:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

Jatha history1991: In C++

1996: Need for GC => Java port

1997: Large subset of CL implemented

2002: Was used to port the Algernon rules engine

2003: Released as open source

Page 18:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

Jatha history1991: In C++

1996: Need for GC => Java port

1997: Large subset of CL implemented

2002: Was used to port the Algernon rules engine

2003: Released as open source

2005: Support for macros

Page 19:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

Jatha history1991: In C++

1996: Need for GC => Java port

1997: Large subset of CL implemented

2002: Was used to port the Algernon rules engine

2003: Released as open source

2005: Support for macros

Page 20:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

Jatha architecture

Page 21:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

Jatha architectureSimple, handwritten parser

Page 22:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

Jatha architectureSimple, handwritten parser

No reader macros

Page 23:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

Jatha architectureSimple, handwritten parser

No reader macros

Extensible compiler

Page 24:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

Jatha architectureSimple, handwritten parser

No reader macros

Extensible compiler

Every primitive is a class that executes itself

Page 25:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

Jatha architectureSimple, handwritten parser

No reader macros

Extensible compiler

Every primitive is a class that executes itself

Compiler outputs Lisp values in SECD format

Page 26:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

Jatha architectureSimple, handwritten parser

No reader macros

Extensible compiler

Every primitive is a class that executes itself

Compiler outputs Lisp values in SECD format

SECD Machine

Page 27:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

Jatha architectureSimple, handwritten parser

No reader macros

Extensible compiler

Every primitive is a class that executes itself

Compiler outputs Lisp values in SECD format

SECD Machine

With some extensions to handle CL weirdness

Page 28:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

Jatha architectureSimple, handwritten parser

No reader macros

Extensible compiler

Every primitive is a class that executes itself

Compiler outputs Lisp values in SECD format

SECD Machine

With some extensions to handle CL weirdness

Lisp values all implement gigantic interface with available methods

Page 29:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

SECD

Page 30:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

SECDFunctional programming language structure

Page 31:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

SECDFunctional programming language structure

Peter Landin

Page 32:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

SECDFunctional programming language structure

Peter Landin

Peter Henderson: “Functional Programming: Application and implementation”

Page 33:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

SECDFunctional programming language structure

Peter Landin

Peter Henderson: “Functional Programming: Application and implementation”

Peter Kogge: “The Architecture of Symbolic Machines”

Page 34:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

SECDFunctional programming language structure

Peter Landin

Peter Henderson: “Functional Programming: Application and implementation”

Peter Kogge: “The Architecture of Symbolic Machines”

Stack, Environment, Code, Dump

Page 35:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

SECDFunctional programming language structure

Peter Landin

Peter Henderson: “Functional Programming: Application and implementation”

Peter Kogge: “The Architecture of Symbolic Machines”

Stack, Environment, Code, Dump

S is the stack, not used for instruction parameters

Page 36:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

SECDFunctional programming language structure

Peter Landin

Peter Henderson: “Functional Programming: Application and implementation”

Peter Kogge: “The Architecture of Symbolic Machines”

Stack, Environment, Code, Dump

S is the stack, not used for instruction parameters

C is the instruction pointer

Page 37:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

SECDFunctional programming language structure

Peter Landin

Peter Henderson: “Functional Programming: Application and implementation”

Peter Kogge: “The Architecture of Symbolic Machines”

Stack, Environment, Code, Dump

S is the stack, not used for instruction parameters

C is the instruction pointer

E is a list of lists of the environment

Page 38:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

SECDFunctional programming language structure

Peter Landin

Peter Henderson: “Functional Programming: Application and implementation”

Peter Kogge: “The Architecture of Symbolic Machines”

Stack, Environment, Code, Dump

S is the stack, not used for instruction parameters

C is the instruction pointer

E is a list of lists of the environment

D is temporary storage for other registers, return stack

Page 39:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

SECD instructions

Page 40:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

SECD instructionsNIL: push a nil pointer on the stack

Page 41:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

SECD instructionsNIL: push a nil pointer on the stack

LDC: load a constant argument on the stack

Page 42:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

SECD instructionsNIL: push a nil pointer on the stack

LDC: load a constant argument on the stack

LD: load a variable value on the stack

Page 43:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

SECD instructionsNIL: push a nil pointer on the stack

LDC: load a constant argument on the stack

LD: load a variable value on the stack

parameter to LD looks like this: (2 . 3), 2 is depth, 3 is ordinal

Page 44:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

SECD instructionsNIL: push a nil pointer on the stack

LDC: load a constant argument on the stack

LD: load a variable value on the stack

parameter to LD looks like this: (2 . 3), 2 is depth, 3 is ordinal

SEL: takes two list arguments, sets C to one of them based on S

Page 45:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

SECD instructionsNIL: push a nil pointer on the stack

LDC: load a constant argument on the stack

LD: load a variable value on the stack

parameter to LD looks like this: (2 . 3), 2 is depth, 3 is ordinal

SEL: takes two list arguments, sets C to one of them based on S

the next C is put in D until finished

Page 46:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

SECD instructionsNIL: push a nil pointer on the stack

LDC: load a constant argument on the stack

LD: load a variable value on the stack

parameter to LD looks like this: (2 . 3), 2 is depth, 3 is ordinal

SEL: takes two list arguments, sets C to one of them based on S

the next C is put in D until finished

JOIN: ends a SEL, returning a value from D to C

Page 47:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

SECD instructionsNIL: push a nil pointer on the stack

LDC: load a constant argument on the stack

LD: load a variable value on the stack

parameter to LD looks like this: (2 . 3), 2 is depth, 3 is ordinal

SEL: takes two list arguments, sets C to one of them based on S

the next C is put in D until finished

JOIN: ends a SEL, returning a value from D to C

LDF: takes a function argument and constructs a closure

Page 48:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

SECD instructionsNIL: push a nil pointer on the stack

LDC: load a constant argument on the stack

LD: load a variable value on the stack

parameter to LD looks like this: (2 . 3), 2 is depth, 3 is ordinal

SEL: takes two list arguments, sets C to one of them based on S

the next C is put in D until finished

JOIN: ends a SEL, returning a value from D to C

LDF: takes a function argument and constructs a closure

AP: pops a closure and parameters and applies it

Page 49:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

SECD instructionsNIL: push a nil pointer on the stack

LDC: load a constant argument on the stack

LD: load a variable value on the stack

parameter to LD looks like this: (2 . 3), 2 is depth, 3 is ordinal

SEL: takes two list arguments, sets C to one of them based on S

the next C is put in D until finished

JOIN: ends a SEL, returning a value from D to C

LDF: takes a function argument and constructs a closure

AP: pops a closure and parameters and applies it

will save S E C on D and replace them to run the code

Page 50:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

SECD instructions cntd

Page 51:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

SECD instructions cntdRET: Pops a return value, restores S E C and push return value

Page 52:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

SECD instructions cntdRET: Pops a return value, restores S E C and push return value

DUM: Pushes a dummy value on environment

Page 53:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

SECD instructions cntdRET: Pops a return value, restores S E C and push return value

DUM: Pushes a dummy value on environment

RAP: Recursive apply, like AP

Page 54:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

SECD instructions cntdRET: Pops a return value, restores S E C and push return value

DUM: Pushes a dummy value on environment

RAP: Recursive apply, like AP

Uses a dummy value to replace environment, for recursive call

Page 55:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

Jatha SECD extensions

Page 56:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

Jatha SECD extensionsB register: for dynamic bindings

Page 57:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

Jatha SECD extensionsB register: for dynamic bindings

X register: like D, for dumping tag information

Page 58:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

Jatha SECD extensionsB register: for dynamic bindings

X register: like D, for dumping tag information

BLK op: handles non-local exit forms

Page 59:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

Jatha SECD extensionsB register: for dynamic bindings

X register: like D, for dumping tag information

BLK op: handles non-local exit forms

LD_GLOBAL op: load a global value, handling dynamic bindings

Page 60:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

Jatha SECD extensionsB register: for dynamic bindings

X register: like D, for dumping tag information

BLK op: handles non-local exit forms

LD_GLOBAL op: load a global value, handling dynamic bindings

LDCF op: load function from a symbol slot instead of C

Page 61:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

Jatha SECD extensionsB register: for dynamic bindings

X register: like D, for dumping tag information

BLK op: handles non-local exit forms

LD_GLOBAL op: load a global value, handling dynamic bindings

LDCF op: load function from a symbol slot instead of C

LDR op: load &REST arguments

Page 62:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

Jatha SECD extensionsB register: for dynamic bindings

X register: like D, for dumping tag information

BLK op: handles non-local exit forms

LD_GLOBAL op: load a global value, handling dynamic bindings

LDCF op: load function from a symbol slot instead of C

LDR op: load &REST arguments

LIS op: handle optional arguments

Page 63:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

Jatha SECD extensionsB register: for dynamic bindings

X register: like D, for dumping tag information

BLK op: handles non-local exit forms

LD_GLOBAL op: load a global value, handling dynamic bindings

LDCF op: load function from a symbol slot instead of C

LDR op: load &REST arguments

LIS op: handle optional arguments

RTN_IF, RTN_IT ops: conditional return, used for AND, OR

Page 64:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

Jatha SECD extensionsB register: for dynamic bindings

X register: like D, for dumping tag information

BLK op: handles non-local exit forms

LD_GLOBAL op: load a global value, handling dynamic bindings

LDCF op: load function from a symbol slot instead of C

LDR op: load &REST arguments

LIS op: handle optional arguments

RTN_IF, RTN_IT ops: conditional return, used for AND, OR

SP_BIND, SP_UNBIND ops: binds/unbinds special variables

Page 65:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

Jatha SECD extensions cntd

Page 66:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

Jatha SECD extensions cntdT op: pushes T on stack

Page 67:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

Jatha SECD extensions cntdT op: pushes T on stack

TAG_B op: used to implement TAGBODY, pushes tag info to X

Page 68:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

Jatha SECD extensions cntdT op: pushes T on stack

TAG_B op: used to implement TAGBODY, pushes tag info to X

TAG_E op: end of TAGBODY, pops X

Page 69:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

Jatha SECD extensions cntdT op: pushes T on stack

TAG_B op: used to implement TAGBODY, pushes tag info to X

TAG_E op: end of TAGBODY, pops X

Page 70:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

Jatha parser

Page 71:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

Jatha parserLisp is easy to parse, right?

Page 72:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

Jatha parserLisp is easy to parse, right?

Well, not that easy...

Page 73:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

Jatha parserLisp is easy to parse, right?

Well, not that easy...

Case sensitivity

Page 74:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

Jatha parserLisp is easy to parse, right?

Well, not that easy...

Case sensitivity

Lists (and dotted pairs)Strings (including escapes)CharactersSymbolsMixed case symbols (including escapes)Quotes (single, back, splice)NumbersPackagesKeywordsReader macros (not fully implemented, though)

Page 75:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

Jatha parserLisp is easy to parse, right?

Well, not that easy...

Case sensitivity

Lists (and dotted pairs)Strings (including escapes)CharactersSymbolsMixed case symbols (including escapes)Quotes (single, back, splice)NumbersPackagesKeywordsReader macros (not fully implemented, though)

Page 76:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

Compiler

Page 77:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

CompilerLisp expression => Lisp expression of op codes

Page 78:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

CompilerLisp expression => Lisp expression of op codes

&RESTANDDEFMACRODEFUNIFLAMBDALETLETRECMACROORPROGNPRIMITIVEQUOTESETQ

Page 79:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

CompilerLisp expression => Lisp expression of op codes

&RESTANDDEFMACRODEFUNIFLAMBDALETLETRECMACROORPROGNPRIMITIVEQUOTESETQ

Indexing of variables

Page 80:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

Jatha SECD machine

Page 81:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

Jatha SECD machineNo symbolic representation

Page 82:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

Jatha SECD machineNo symbolic representation

Instances of SECDop pushed to registers

Page 83:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

Jatha SECD machineNo symbolic representation

Instances of SECDop pushed to registers

Primitives are just opcodes

Page 84:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

Jatha SECD machineNo symbolic representation

Instances of SECDop pushed to registers

Primitives are just opcodes

Since the “bytecode” is represented as Lisp

Page 85:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

Jatha SECD machineNo symbolic representation

Instances of SECDop pushed to registers

Primitives are just opcodes

Since the “bytecode” is represented as Lisp

And since primitives are Lisp values, it can just be executed the same

Page 86:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

Typical primitives

Page 87:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

Typical primitives+APPENDAPPLYAPROPOSAREFCARCDRATOM`CONSFUNCALLGOSETFUSE-PACKAGE

Page 88:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

Implementation tidbits

Page 89:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

Implementation tidbitsIt’s very object oriented

Page 90:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

Implementation tidbitsIt’s very object oriented

No singletons

Page 91:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

Implementation tidbitsIt’s very object oriented

No singletons

Have been this way since the beginning

Page 92:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

Implementation tidbitsIt’s very object oriented

No singletons

Have been this way since the beginning

Basically everything is represented using Lisp types

Page 93:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

Implementation tidbitsIt’s very object oriented

No singletons

Have been this way since the beginning

Basically everything is represented using Lisp types

Bytecode is a Lisp list of Lisp symbols and other values

Page 94:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

Implementation tidbitsIt’s very object oriented

No singletons

Have been this way since the beginning

Basically everything is represented using Lisp types

Bytecode is a Lisp list of Lisp symbols and other values

Registers are Lisp lists

Page 95:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

Implementation tidbitsIt’s very object oriented

No singletons

Have been this way since the beginning

Basically everything is represented using Lisp types

Bytecode is a Lisp list of Lisp symbols and other values

Registers are Lisp lists

Primitives are Lisp values

Page 96:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

Implementation tidbitsIt’s very object oriented

No singletons

Have been this way since the beginning

Basically everything is represented using Lisp types

Bytecode is a Lisp list of Lisp symbols and other values

Registers are Lisp lists

Primitives are Lisp values

etc.

Page 97:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

Implementation tidbitsIt’s very object oriented

No singletons

Have been this way since the beginning

Basically everything is represented using Lisp types

Bytecode is a Lisp list of Lisp symbols and other values

Registers are Lisp lists

Primitives are Lisp values

etc.

Page 98:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

Implementation tidbitsIt’s very object oriented

No singletons

Have been this way since the beginning

Basically everything is represented using Lisp types

Bytecode is a Lisp list of Lisp symbols and other values

Registers are Lisp lists

Primitives are Lisp values

etc.

Page 99:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

REPL

Page 100:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

REPLPrint current package in prompt

Page 101:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

REPLPrint current package in prompt

Read and parse input

Page 102:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

REPLPrint current package in prompt

Read and parse input

Compile input

Page 103:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

REPLPrint current package in prompt

Read and parse input

Compile input

Execute compiled code

Page 104:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

REPLPrint current package in prompt

Read and parse input

Compile input

Execute compiled code

Set *, ** and ***

Page 105:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

REPLPrint current package in prompt

Read and parse input

Compile input

Execute compiled code

Set *, ** and ***

Print result of execution

Page 106:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

DemoJatha in action

Page 107:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

Major missing features

Page 108:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

Major missing featuresArrays

Page 109:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

Major missing featuresArrays

Complex numbers

Page 110:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

Major missing featuresArrays

Complex numbers

&Optional and &Key arguments

Page 111:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

Major missing featuresArrays

Complex numbers

&Optional and &Key arguments

Lambda functions (partial support)

Page 112:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

Major missing featuresArrays

Complex numbers

&Optional and &Key arguments

Lambda functions (partial support)

Good ERROR and CERROR implementations

Page 113:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

Major missing featuresArrays

Complex numbers

&Optional and &Key arguments

Lambda functions (partial support)

Good ERROR and CERROR implementations

CLOS

Page 114:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

Major missing featuresArrays

Complex numbers

&Optional and &Key arguments

Lambda functions (partial support)

Good ERROR and CERROR implementations

CLOS

Pathnames

Page 115:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

Major missing featuresArrays

Complex numbers

&Optional and &Key arguments

Lambda functions (partial support)

Good ERROR and CERROR implementations

CLOS

Pathnames

Read macros

Page 116:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

Major missing featuresArrays

Complex numbers

&Optional and &Key arguments

Lambda functions (partial support)

Good ERROR and CERROR implementations

CLOS

Pathnames

Read macros

Conditions

Page 117:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

Future directions

Page 118:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

Future directionsJava integration

Page 119:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

Future directionsJava integration

Byte code compilation

Page 120:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

Future directionsJava integration

Byte code compilation

More CL functions implemented

Page 121:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

Future directionsJava integration

Byte code compilation

More CL functions implemented

LOOP macro

Page 122:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

Future directionsJava integration

Byte code compilation

More CL functions implemented

LOOP macro

Full SETF

Page 123:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

Future directionsJava integration

Byte code compilation

More CL functions implemented

LOOP macro

Full SETF

Look at something like UCW, let that drive implementation

Page 124:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

Complications

Page 125:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

ComplicationsMultiple values

Page 126:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

ComplicationsMultiple values

Numerical classes

Page 127:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

ComplicationsMultiple values

Numerical classes

SECD not well suited for compilation

Page 128:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

ComplicationsMultiple values

Numerical classes

SECD not well suited for compilation

Extremely polymorphic call sites

Page 129:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

ComplicationsMultiple values

Numerical classes

SECD not well suited for compilation

Extremely polymorphic call sites

Hard to implement new things since reflection isn’t used

Page 130:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

ComplicationsMultiple values

Numerical classes

SECD not well suited for compilation

Extremely polymorphic call sites

Hard to implement new things since reflection isn’t used

Page 131:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

Potential JVM solutions

Page 132:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

Potential JVM solutionsCheap tuples

Page 133:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

Potential JVM solutionsCheap tuples

Faster reflection

Page 134:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

Potential JVM solutionsCheap tuples

Faster reflection

Numerical tower (fast, maybe based on gnu.math)

Page 135:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

Potential JVM solutionsCheap tuples

Faster reflection

Numerical tower (fast, maybe based on gnu.math)

Interface invocation

Page 136:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

JVM languages

Page 137:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

JVM languagesMost aren’t full implementations

Page 138:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

JVM languagesMost aren’t full implementations

Usually based on simple interpreters

Page 139:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

JVM languagesMost aren’t full implementations

Usually based on simple interpreters

Or byte code (not JVM) based machines

Page 140:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

JVM languagesMost aren’t full implementations

Usually based on simple interpreters

Or byte code (not JVM) based machines

Or pure compilation

Page 141:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

JVM languagesMost aren’t full implementations

Usually based on simple interpreters

Or byte code (not JVM) based machines

Or pure compilation

Many use reflection

Page 142:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

JVM languagesMost aren’t full implementations

Usually based on simple interpreters

Or byte code (not JVM) based machines

Or pure compilation

Many use reflection

Many use loads of interfaces

Page 143:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

JVM languagesMost aren’t full implementations

Usually based on simple interpreters

Or byte code (not JVM) based machines

Or pure compilation

Many use reflection

Many use loads of interfaces

Byte code based solution will not help most of these

Page 144:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

JVM languagesMost aren’t full implementations

Usually based on simple interpreters

Or byte code (not JVM) based machines

Or pure compilation

Many use reflection

Many use loads of interfaces

Byte code based solution will not help most of these

Method handles have much larger impact

Page 145:   Common Lisp in Java - JVMLangSummitwiki.jvmlangsummit.com/pdf/37_Bini_jatha.pdfLisp is easy to parse, right? Well, not that easy... Case sensitivity Lists (and dotted pairs) Strings

AQ and