Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Lisp playing the dinosaur game

Name: Anonymous 2016-08-25 3:39

This happy hacking autist wrote a little Lisp program to play the dinosaur game. Nice read.

http://vito.sdf.org/dino.html

If (like me) you don't use Chrome often, it's a fun old-fashioned video game embedded in the page chrome://network-error/-106 (activate with space)

Name: Anonymous 2016-08-25 3:47

good work

Name: Anonymous 2016-08-25 11:20

pretty good, I wonder if it can play the game until the score overflows (I guess it will overflow at some point, I doubt they use an arbitrary-precision integer for it).

Name: Anonymous 2016-08-25 20:57

Assuming that it's javascript, it would just build up in floating point until the score increment is lower than the precision can maintain, and the score would just sit constant. Don't you idiots know anything?

Name: Anonymous 2016-08-25 21:10

>>1
wrote a little Lisp program to play the dinosaur game

Except he used CFFI to call C programs, CLX to interact with the X Window System (a C program) and burgled-batteries to call Python programs.

That's what's wrong with high-level programmers. In the end, they always resort to lower level languages.

Name: Anonymous 2016-08-25 22:04

>>5
you could make system calls directly from lisp but why would you duplicate effort

Name: Anonymous 2016-08-25 23:10

>>3
Lisp has bignums by default

Name: Anonymous 2016-08-26 0:17

>>5
There's no point in needlessly rewriting library software. It's not wrong to make use of language bindings that are bound to libraries written in C.

Name: Anonymous 2016-08-26 0:25

>>5
and burgled-batteries to call Python programs.
I'm not surprised.

http://www.aaronsw.com/weblog/rewritingreddit
Over at reddit.com, we rewrote the site from Lisp to Python in the past week. It was pretty much done in one weekend. (Disclosure: We used my web.py library.) The others knew Lisp (they wrote their whole site in it) and they knew Python (they rewrote their whole site in it) and yet they decided liked Python better for this project. The Python version had less code that ran faster and was far easier to read and maintain.

Name: Anonymous 2016-08-26 3:26

>>9
in other words,
We had a library in python that was written around the types of things we do. When we used it, instead of generic web programming, our code got a lot shorter and more direct.

Well, color me fucking surprised! That could have been between any pair of languages, including going from Python to Lisp.

Name: Anonymous 2016-08-26 3:26

(this space left intentionally unserved)

Name: Anonymous 2016-08-26 8:31

>>7
sure, but I'm talking about integer overflow in the Chrome dinosaur game, not in the bot. bot is written in Lisp, Chrome isn't

Don't change these.
Name: Email:
Entire Thread Thread List