

First public release of the Gosu programming language for the JVM - mhw
http://gosu-lang.org/

======
mhw
As a bit of background, Gosu is based on the GScript language that Guidewire
have been using for a number of years to build their Insurance application
suite, so it has been proven in the development of non-trivial applications
and the implementation should be more mature than a 0.7 version number might
suggest.

~~~
GFischer
And it's good advertising for them.

I contacted Guidewire thanks to their blog posts here:
<http://guidewiredevelopment.wordpress.com/> and AKeefer's posts here at HN.

Unfortunately for them (and me) my higher-ups at the insurance company I work
for are clueless and stubborn and decided to go for a reinvent-the-wheel
approach at three times the cost (our current insurance solution is based on
Sun's Forte4GL <http://en.wikipedia.org/wiki/Forte_4GL> which, while good at
the time, has been abandoned many years ago, and has no support or good IDE) .

------
ZeroGravitas
Amusingly "not lisp" is a feature on their comparison matrix.

~~~
mahmud
I found it a subtle admission of fault, because: 1) It's impossible for people
who know Lisp to design a language that isn't Lisp(y). 2) You can't be a
serious language designer without knowing Lisp, well.

Because of #1 and #2, the author wants to align himself with the amateur
school of successful language design (the people responsible for most stuff
that comes pre-installed in your Redhat box.) and distances himself from egg-
heads and language purists, and their potential criticism.

~~~
alextgordon
_1) It's impossible for people who know Lisp to design a language that isn't
Lisp(y). 2) You can't be a serious language designer without knowing Lisp,
well._

Judging by the number of great languages that are not at all lispy, at least
one of these is false.

~~~
mahmud
Concrete instances please! :-)

I specifically said "amateur school of successful language design".

"Great" is subjective, but nearly all ground-breaking languages invented after
Lisp are all Lisp-like (don't look at syntax.)

Industrial, imperative languages are nearly always "designed" on a whim.
They're all incremental improvements over Algol, and they're probably what
you're talking about if you're of the great majority of the programmers. As of
late, they're more Lispy than you can imagine.

Except for a specific school of Lex & Yacc languages out of New Jersey, the
great majority of professionally designed languages (i.e. by people with an
appreciation for formal language design and semantics) have been Lispy and
functional; characterized by clean minimal core, well specified semantics,
even proven, and self-hosted implementation.

Just to throw the discussion a bone and offer some perspective; I consider
ActionScript 3 "Lispy", but not AWK or C++.

~~~
silentbicycle
How about K? It's a functional, "clean minimal core" APL with ragged arrays
and lambdas. Lisp-influenced, but much less Lispy than one would expect if
it's "impossible for people who know Lisp to design a language that isn't
Lisp(y)".

 _"I much preferred implementing and coding in LISP (sic), but once I was
dealing with big data sets and then having to do fairly simple calculations,
APL just seemed to have the better vocabulary."_ \- Arthur Whitney
([http://cacm.acm.org/opinion/interviews/26246-a-conversation-...](http://cacm.acm.org/opinion/interviews/26246-a-conversation-
with-arthur-whitney/fulltext))

~~~
mahmud
You just supported my arguments, silentbicycle; it's "much less Lispy" but not
"orthogonal to Lisp". Small, expression based, self-hosting, declarative, has
a core-data structure it uses to represent most of its input ..

APL, Forth, and Smalltalk might not be proper functional programming
languages, but they're of the same "spirit".

Now compare this to something horribly broken, like Basic ..

~~~
silentbicycle
I suspected as much. "Lispiness" is a fuzzy concept, though - Lua is Lispier
than Python, but is Tcl more or less Lispy than SML? Etc. K is probably the
least Lispy language I can think of with that pedigree.

Joy may be another exception, but it's mainly an experimental / research
language.

~~~
mahmud
Tcl shouldn't be compared to SML; ML is a triumph of human achievement. See
Alice: <http://www.ps.uni-saarland.de/alice/>

Some Lisps are more Lisp than others; compare Dylan to Emacs Lisp. Dylan has
that refined taste, that well-thought out _essence_ , even if it's an infix,
algolish language in apperance. While elisp is an orthodox Lisp, in every
sense, and is unpalatable because of its true-to-form "Lispiness".

There are languages that are semantically consistent, and that's probably what
I meant by "Lispy". Then there are languages which are nothing but compiler
hacks; you can tell whoever dreamed them up "grew" this hairball by tweaking a
parser until it did something he wanted.

~~~
silentbicycle
Yeah, I don't like Tcl either. :)

~~~
mahmud
Also, take a look at the Lua 5 compiler. That fucker does matrices on par with
Fortran, with just 500k worth of compiler + runtime!

I particularly loved their hack for sparse matrices; they're implemented as
hash-tables where the indices are zero-based integers, so only the indices
that are initialized are created. Meaning, you can have an array with a few
indices without having to create all the empty cells in between. I benchmarked
it and it's far more than adequate. Makes graph algorithms breezy.

Lua is very much an acceptable Scheme.

~~~
silentbicycle
Each table (dict, hash, whatchamacallit) has a hash portion and an array
portion, and contiguous integer keys are stored internally in the array. So,
tables automatically adapt their internal implementation for use as an array,
a dict, or both, at runtime. They're unique to Lua, AFAIK.

It also has an interesting hash table optimization (that I don't quite grok).
I've been reading through the Lua code bit by bit, but haven't made it there
yet. Lots of other interesting stuff, though.

LuaJIT's not too shabby, either!

Lua's my favorite language for quick hacks, period. I wrote a library to add
fairly idiomatic pattern matching (<http://github.com/silentbicycle/tamale/>).
Every language needs pattern matching. :) I'm still working on explaining PM
to people who aren't already into Erlang or ML, but it's documented now.

~~~
mahmud
You win this round, again.

------
wcoenen
The feature list reads as "we added C# features to java": properties, type
inference, lambdas, extension methods, generics without erasure, a friendly
list initialization notation...

I do find the interface delegation feature interesting. Might be a good way to
avoid those Demeter Transmogrifiers.

The null-safe property chains also look nice. Though I wonder if this is
always the desired behavior?

~~~
zem
i'm surprised their comparison matrix omitted fantom (nee fan), which would
seem closest in spirit to this sort of java/c# cross

------
hugh4life
Other projects worth keeping an eye on:

Stab Language - <http://code.google.com/p/stab-language/> Mirah -
<http://www.mirah.org/> Groovy++ - <http://code.google.com/p/groovypptest/>

~~~
stephen
Agreed. All interesting languages.

Not a groovy fan, but groovy++ and compile-time AST transformations sounds
like fun.

Speaking of stab, an Eclipse plugin commit just hit svn:

<http://code.google.com/p/stab-language/source/detail?r=280>

------
davidw
This page is dog slow: <http://gosu-
lang.org/doc/wwhelp/wwhimpl/js/html/wwhelp.htm>

What's the Big Advantage of this language? It looks nice enough, but what will
propel it past Scala and company?

~~~
mahmud
Gosu is gunning for Groovy and Beanshell, not Scala or Clojure.

The later two are bonafide programming languages, not improvements on Java.

------
mr_luc
Just a note -- Gosu is already the name of a neat little C/Ruby graphics
library that wraps up sound and graphics programming in a tiny little package
that mostly gets out of your way.

(I believe it was intended for people making little games -- I've used it a
few times on my own projects and it's very uncluttered, minimal etc; I used it
and Chipmunk to make myself a screensaver of all of my photos falling,
bouncing off of each other etc).

~~~
akeefer
Indeed . . . to be fair, back when we decided to rename the language
internally, we looked for any existing projects using the name, and we
actually contacted the Gosu library guys to make sure they didn't mind us
using the name Gosu for our language.

------
Nate75Sanders
I can't say for sure where they got the name "gosu", but I know from many
hours of playing Starcraft with Koreans that "gosu" is the Korean word for
"expert".

------
spectre
On the compare page: "Reified generics (check generic types at run time)"

Does anyone know how they've gotten around the issue of Type Erasure on the
JVM?

~~~
mahmud
Here are a few hints in the manual:

" _you can add objects to a collection, but not primitives_ ".

Why not?

" _The collection and list classes used frequently in Gosu rely on the Java
language’s collection classes. However, there are important differences
because of built-in enhancements to these classes that use Gosu blocks,
anonymous in-line defined functions that are not directly supported in the
Java language._ "

It also has some type-inference that converts:

    
    
      var str = {"foo", "bar", "baz"}
    

To

    
    
      ArrayList<String> str = new ArrayList<String>();
      str.add("foo").add("bar").add("baz");
    

Or some such.

LtU wont be going wild over this any time soon.

------
dekz
Any reason for not open sourcing the development? It seems to me it could use
a helping hand of additional features and wrappers.

------
chrisbroadfoot
> is being used in production by multi-billion dollar companies around the
> globe

Is this a joke? Citation?

~~~
mhw
No joke. <http://www.guidewire.com/our_customers> lists some companies that
are using the Guidewire insurance products in production. These products are
all built in a combination of Java and Gosu (or GScript, as it used to be
called).

[I don't work for Guidewire - I worked for an insurance company that evaluated
several insurance claims packages, including Guidewire's.]

------
runT1ME
On a serious note, I'm not sure it has enough of an advantage over Scala to
take a look at. Though if the type system is a bit more intuitive, that alone
may propel it to the forefront of JVM languages...

~~~
hugh4life
" I'm not sure it has enough of an advantage over Scala to take a look at."

I can grok Gosu easily... Scala gives me a headache...

------
ericflo
This actually kind of looks like ActionScript.

~~~
akeefer
Funny you mention that; the original syntax was actually based on ECMAScript,
so the syntactic similarities with ActionScript are not accidental.

------
morphir
reminds me of java-script. Still, it's a shame they never understood the power
of prefix notation.

~~~
gb
If you're referring to type notation, I'd argue postfix works much better for
languages that are mostly type inferred, as then there is a consistent way of
declaring things.

