<s>
Game	B-Language
Oriented	I-Language
Assembly	I-Language
Lisp	I-Language
(	O
GOAL	O
)	O
is	O
a	O
programming	O
language	O
,	O
a	O
dialect	O
of	O
the	O
language	O
Lisp	B-Language
,	O
made	O
for	O
video	O
games	O
developed	O
by	O
Andy	O
Gavin	O
and	O
the	O
Jak	B-Application
and	I-Application
Daxter	I-Application
team	O
at	O
the	O
company	O
Naughty	O
Dog	O
.	O
</s>
<s>
It	O
was	O
written	O
using	O
Allegro	B-Language
Common	I-Language
Lisp	I-Language
and	O
used	O
in	O
the	O
development	O
of	O
the	O
entire	O
Jak	B-Application
and	I-Application
Daxter	I-Application
series	O
of	O
games	O
.	O
</s>
<s>
GOAL	O
's	O
syntax	O
resembles	O
the	O
Lisp	B-Language
dialect	O
Scheme	B-Language
,	O
though	O
with	O
many	O
idiosyncratic	O
object-oriented	B-Language
programming	I-Language
features	O
such	O
as	O
classes	O
,	O
inheritance	B-Language
,	O
and	O
virtual	B-Application
functions	I-Application
.	O
</s>
<s>
GOAL	O
encourages	O
an	O
imperative	B-Application
programming	I-Application
style	O
:	O
programs	O
tend	O
to	O
consist	O
of	O
a	O
sequence	O
of	O
events	O
to	O
be	O
executed	O
rather	O
than	O
the	O
functional	B-Language
programming	I-Language
style	O
of	O
functions	O
to	O
be	O
evaluated	O
recursively	O
.	O
</s>
<s>
This	O
is	O
a	O
diversion	O
from	O
Scheme	B-Language
,	O
which	O
allows	O
such	O
side	O
effects	O
but	O
does	O
not	O
encourage	O
imperative	B-Application
style	O
.	O
</s>
<s>
GOAL	O
does	O
not	O
run	O
in	O
an	O
interpreter	B-Application
,	O
but	O
instead	O
is	O
compiled	B-Language
directly	O
into	O
PlayStation	B-Device
2	I-Device
machine	O
code	O
to	O
execute	O
.	O
</s>
<s>
It	O
offers	O
limited	O
facilities	O
for	O
garbage	B-General_Concept
collection	I-General_Concept
,	O
relying	O
extensively	O
on	O
runtime	O
support	O
.	O
</s>
<s>
It	O
offers	O
dynamic	O
memory	B-General_Concept
allocation	O
primitives	O
designed	O
to	O
make	O
it	O
well-suited	O
to	O
running	O
in	O
constant	O
memory	B-General_Concept
on	O
a	O
video	O
game	O
console	O
.	O
</s>
<s>
GOAL	O
has	O
extensive	O
support	O
for	O
inlined	O
assembly	B-Language
language	I-Language
code	O
using	O
a	O
special	O
rlet	O
form	O
,	O
allowing	O
programs	O
to	O
freely	O
mix	O
assembly	O
and	O
higher-level	O
constructs	O
within	O
one	O
function	O
.	O
</s>
<s>
The	O
GOAL	O
compiler	B-Language
is	O
implemented	O
in	O
Allegro	B-Language
Common	I-Language
Lisp	I-Language
.	O
</s>
<s>
It	O
supports	O
a	O
long	O
term	O
compiling	B-Language
listener	O
session	O
which	O
gives	O
the	O
compiler	B-Language
knowledge	O
about	O
the	O
state	O
of	O
the	O
compiled	B-Language
and	O
thus	O
running	O
program	O
,	O
including	O
the	O
symbol	O
table	O
.	O
</s>
<s>
This	O
,	O
in	O
addition	O
to	O
dynamic	O
linking	O
,	O
allows	O
a	O
function	O
to	O
be	O
edited	O
,	O
recompiled	B-Language
,	O
uploaded	O
,	O
and	O
inserted	O
into	O
a	O
running	O
game	O
without	O
having	O
to	O
restart	O
.	O
</s>
<s>
The	O
process	O
is	O
similar	O
to	O
the	O
edit	O
and	O
continue	O
feature	O
offered	O
by	O
some	O
C++	B-Language
compilers	B-Language
,	O
but	O
allows	O
programs	O
to	O
replace	O
arbitrary	O
amounts	O
of	O
code	O
(	O
even	O
up	O
to	O
entire	O
object	O
files	O
)	O
,	O
and	O
does	O
not	O
interrupt	O
the	O
running	O
game	O
with	O
the	O
debugger	O
.	O
</s>
<s>
This	O
feature	O
was	O
used	O
to	O
implement	O
code	O
and	O
to	O
enable	O
level	O
streaming	O
in	O
the	O
Jak	B-Application
and	I-Application
Daxter	I-Application
games	O
.	O
</s>
<s>
GOAL	O
's	O
first	O
use	O
was	O
for	O
the	O
Jak	B-Application
and	I-Application
Daxter	I-Application
:	I-Application
The	I-Application
Precursor	I-Application
Legacy	I-Application
game	O
.	O
</s>
<s>
The	O
predecessor	O
language	O
,	O
Game	O
Oriented	O
Object	O
Lisp	B-Language
(	O
GOOL	O
)	O
,	O
was	O
also	O
developed	O
by	O
Andy	O
Gavin	O
for	O
Crash	B-Application
Bandicoot	I-Application
.	O
</s>
<s>
Since	O
Naughty	O
Dog	O
no	O
longer	O
employs	O
GOAL	O
's	O
primary	O
development	O
and	O
maintenance	O
engineer	O
,	O
and	O
they	O
were	O
under	O
pressure	O
from	O
their	O
new	O
parent	O
company	O
,	O
Sony	O
,	O
to	O
share	O
technology	O
between	O
studios	O
,	O
Naughty	O
Dog	O
transitioned	O
away	O
from	O
Lisp	B-Language
:	O
</s>
<s>
However	O
,	O
they	O
have	O
since	O
resumed	O
using	O
it	O
for	O
scripting	O
on	O
some	O
PlayStation	B-Operating_System
3	I-Operating_System
games	O
,	O
including	O
The	B-Application
Last	I-Application
of	I-Application
Us	I-Application
.	O
</s>
<s>
A	O
community	O
project	O
,	O
OpenGOAL	O
,	O
started	O
in	O
2020	O
with	O
the	O
goal	O
of	O
porting	O
GOAL	O
to	O
X86-64	B-Device
by	O
decompiling	O
existing	O
Jak	B-Application
and	I-Application
Daxter	I-Application
:	I-Application
The	I-Application
Precursor	I-Application
Legacy	I-Application
and	O
Jak	B-Application
II	I-Application
assets	O
and	O
recompiling	O
them	O
natively	O
.	O
</s>
<s>
It	O
includes	O
a	O
GOAL	O
compiler	B-Language
written	O
in	O
C++	B-Language
as	O
well	O
as	O
a	O
Read	B-Application
–	I-Application
eval	I-Application
–	I-Application
print	I-Application
loop	I-Application
to	O
enable	O
a	O
similar	O
workflow	O
to	O
Naughty	O
Dog	O
's	O
original	O
implementation	O
.	O
</s>
