From: Joel Reymont
Subject: My road to Lisp (or why Lisp for poker software)
Date: 
Message-ID: <1107813683.688874.77250@o13g2000cwo.googlegroups.com>
I was asked in a different thread to elaborate on why I chose Lisp to
write poker room software, whether I had to convince my backers, etc.
Poker room software, if you are wondering, is the client that you
download at, say,  http://www.pokeroom.com and the server that the
client connects to.

The short answer is http://userpages.umbc.edu/~bcorfm1/C++-vs-Lisp.html
and no, because I have no backers. The longer answer is quite long
because I'm driven not only by business rationale but also by a bunch
of emotional reasons.

I started programming at about 14 while in Cuba and using Basic. I
think I got my first paid computer job at about 17. I was in Russia and
had to break the copy protection of some medical software. At 18 I was
at Z-Code software in San Rafael, working with a bunch of great
hackers. Anyone remembers Z-Mail for Unix?

This last point really has something to do with Lisp as the guy
responsible for the terminal version of Z-Code was Bob Glickstein who
wrote a fine book about Emacs extensions
(http://www.oreilly.com/catalog/gnuext/). I'm sure Bob would have
written Z-Mail in Lisp if the owners of the company would have let him.
I don't think they were as fond of Lisp as he was. As for me, those
setq's in my .emacs were really foreign to me and I was always begging
Bob to fix this or that thing for me. That was 1994.

>From 19 to 24 I made a fine career on Wall St finishing as head of
prime brokerage technology at Deutsche Bank with a package of almost
200K/year and a brand new Land Rover. I spent most of that time,
writing trade processing systems in Perl. I wonder if this has been the
secret of my success?

I did internet consulting for about a year, still hacking Perl, then
switched to Java and started running my own offshore development shop.
We even delivered a .NET app once /I can't believe I'm saying this!/.
Most of the work was for the gaming industry and at some point the
client ordered poker room software and I let a Syberian programming
team convince me that the only way I could fit into the client's 125K
budget was if I let them write the software in Delphi.

They suggested that I would have to charge the client 200K+ if they
were to use C++. Of course I did not tell them how much I was charging
the client, I was just multiplying their quote by two. I learned
afterwards that they were a Delphi-only shop. I would say things went
downhill from there. After a bancruptcy (the bank took the Land Rover
away), botched poker project, returning to Russia to minimize costs and
run my own development team on-site, disbanding the dev team for lack
of work and selling software for a year, I decided to resurrect the
Delphi poker.

For anyone who is interested the original poker source code is at
http://sourceforge.net/projects/openpoker. Going open source was a
marketing move on my part, that was the niche I was gonna occupy. The
Linux of Poker Room Software! That did not work out, btw. I had better
success selling the 90% done source code previously /did it twice/.

If I learned one thing during my year in software sales that was that
it's better to sell a product that you own than to sell your services.
I want to get rich! Yes, I do. I have not had a corporate job in 6
years and I want it to continue this way. I want the freedom to work on
whatever I want! I have this freedom now except that I'm quite poor.
Oh, well, at least I live in Tenerife and the temperature during the
day never falls below +20C.

We are getting close to Lisp, I promise...

I consider myself to be a pragmatic and logical type. Maybe too logical
since my psychologist suggested was that I pay closer attention to my
feelings when making my decisions.

We are even closer to Lisp now...

That Delphi poker code is crap. I cannot bear the thought of looking at
it again. I earnestly spent a couple of months trying to debug it and
generally fix it up. No way, this is an app that by design cannot be
verified! And I don't even like playing poker. Nonetheless, I had an
opportunity on my hands to gain my creative freedom and I decided to
excercise that opportunity. So back last summer I dedicated myself to
finishing that poker software.

I'm a Unix guy and I hate Windows. I have been lusting after the
PowerBook G4 ever after it came out. Software sales paid good and I
bought one a year ago and had to take this into account when choosing
my poker development tools. I considered Java too slow, Python too
wordy, C# was not ready for cross-platform prime-time. So I chose C++.

Game development is something that I wanted to learn for a while and so
I saved myself a bunch of Gamasutra articles before going on vacation
last September. This one was a revelation:
http://www.gamasutra.com/features/19990813/languages_03.htm. I checked
out Scheme and liked it a lot, I'm still not sure why. I don't think it
was Scheme in particular, I think it was just the idea of using Lisp.
Still, I came back and stuck to my C++ guns.

I consider myself quite good with C++. I don't shy from learning
complex things if they save me time. I started using the C++ Boost
libraries. I wanted elegante ways to serialize my classes and Boost
seemed to provide that. I scrapped my own hairy serialization code and
dived into Boost. For one reason or another things did not turn out as
elegant as I expected. I found that I'm not enjoying coding and that
time that I could have better spent on application functionality is
going to very low-level stuff that I should have been done with a while
ago.

I forgot what straw broke the camel's back but I switched with Scheme a
couple of months ago. Yes, all this swinging from one language to
another was delaying my plans of eventual richess but if I was gonna
spend most of the day at the keyboard I thought I should enjoy the
process.

I read someone's response to the "My road to Lisp" survey and how they
started with Scheme and then took up Common Lisp. I looked at CL and I
don't think I want to go back. I came to think of it as a purely
emotional decision. I'm lazy and I much prefer (incf foo) to (set! foo
(+ foo 1)).

As for writing poker in Lisp, my card code (including hand ranking) in
C++ is 450 lines vs. 111 lines of Lisp. The unit tests are 2019 lines
of C++ and just 118 lines of Lisp. And most important of all, I'm
thoroughly enjoing myself. Coding in Lisp just feels deep down good so
why would I code in anything else?

I think my poker software will be much easier to maintain and enhance
in Lisp. Adding new card games will be a snap. Lisp is made for writing
poker-playing bots. Last but not least, I can offer clients the source
code when they buy a license. I doubt they will go to anyone else for
enhancements :-).

    Cheers, Joel

From: Thomas Gagne
Subject: Re: My road to Lisp (or why Lisp for poker software)
Date: 
Message-ID: <9pudnd2u1L_P5JTfRVn-3w@wideopenwest.com>
Joel, where did you find the test data?  I've been looking around for a bit 
and can't find it anywhere.  We have programmers ready to try it in Forth, 
PHP, and Smalltalk.  Whichever group wins the others have to learn their language.

I've found the articles, and references to test.t, test.w, and comments on a 
73k word input file, but I can't find the files.

<snip>

The short answer is http://userpages.umbc.edu/~bcorfm1/C++-vs-Lisp.html
and no, because I have no backers. The longer answer is quite long
because I'm driven not only by business rationale but also by a bunch
of emotional reasons.
From: Joel Reymont
Subject: Re: My road to Lisp (or why Lisp for poker software)
Date: 
Message-ID: <1107936408.703947.297420@l41g2000cwc.googlegroups.com>
Oh, I did not mean to say that I actually tried the tests myself.
Rather, I meant to say that my experience was similar!
From: David Sletten
Subject: Re: My road to Lisp (or why Lisp for poker software)
Date: 
Message-ID: <eefOd.13431$BS.2039@twister.socal.rr.com>
Thomas Gagne wrote:
> Joel, where did you find the test data?  I've been looking around for a 
> bit and can't find it anywhere.  We have programmers ready to try it in 
> Forth, PHP, and Smalltalk.  Whichever group wins the others have to 
> learn their language.
> 
> I've found the articles, and references to test.t, test.w, and comments 
> on a 73k word input file, but I can't find the files.
> 

Get in touch with Ron Garret:
http://groups-beta.google.com/group/comp.lang.lisp/browse_frm/thread/e829872af61d8250/1a4453278cd0971a?q=ron+garret&_done=%2Fgroup%2Fcomp.lang.lisp%2Fsearch%3Fq%3Dron+garret%26start%3D10%26&_doneTitle=Back+to+Search&&d#1a4453278cd0971a

David Sletten