22 ms·
Dinosaur and Lisp
- PuercoPop 10y agoRegarding the code, its ok although there are some parts that are unnecessarily messy. Here[0], and in other parts you use labels in the middle the function. It is best to do in the outer level form. I like the rlabels of misc-extension[1] when using local functions but I understand most people would prefer not to add 'util' dependencies. Another thing in that function. The (let ((data (or ...)))) is unnecessary. You place the form in the default case of the keyword argument So it would end up looking like: (defun x-find-color (rgba &key (x 0) (y 0) (width default-width) (height default-height) (test #'equal) (snap-data (x-snapshot :x x :y y :width width :height height))) ...) Also if not using asdf, the quickload form should be wrapped in an eval-when. It will fail If I Try to compile the file (C-c C-k) on a fresh session. This are nitpicks, the code is understandable and easy to read. Nice writeup and cool idea! [0]: https://github.com/VitoVan/cl-dino/blob/master/cl-autogui.lisp#L173 https://github.com/VitoVan/cl-dino/blob/master/cl-autogui.li... [1]: https://github.com/slburson/misc-extensions https://github.com/slburson/misc-extensions
- daveloyall 10y ago> Also if not using asdf, the quickload form should be > wrapped in an eval-when. It will fail If I Try to > compile the file (C-c C-k) on a fresh session. OH! Thank you... :) That's always bugged me!
- VitoVan 10y agoThank you PuercoPop, I am learning Common Lisp, your comment helps me a lot, problem fixing...
- paulrpotts 10y agoMy god, how have I seen that error page a million times and never realized it was actually a video game?
- anichhangani 10y agoSame here, after this realisation I was thrilled!
- AceJohnny2 10y agoBecause you have to press Space on that screen for it to activate.
- paulrpotts 10y agoYep, just never happened to do that.
- paulrpotts 10y agoAlso, I was particularly embarrassed this weekend... my cable modem went down, as it has been doing a lot recently (!#$%# Charter...) and I showed my daughter the Chrome game. She told me "oh, I already know about that." She's eleven...
- junke 10y agoQuite inspiring. That's how you beat an endless game.
- chriswarbo 10y agoThat's how I see programming in general. To beat the dino game, the author played the "write a game AI" game. That's a much harder game, which is going to take a while to beat. The general gameplaying work being done at the moment stands a good chance (e.g. DeepMind's Atari playing system, AIXI approximations, etc.), although I still think Nomic is a harder game to beat than Go ;) After that, we can start playing the "write an AI generator" game. The fun never stops!
- qwertyuiop924 10y agoI'm not really good enough to Play the Game yet, but it's endlessly entertaining to watch those who are.
- justinhj 10y agoThis is one of the most fun and informative programming posts I've seen on Hacker News recently. I also killed my wifi immediately after reading the article to play the game.
- sevengraff 10y agoI agree, a well written article with a fun tone that builds something interesting and keeps ego in check. I hope to see more like this.
- behnamoh 10y agoApart from Clojure (which is not LISP, really), I haven't seen end-user applications written in LISP dialects (I don't think emacs is end-user software). Scheme (and its PLT dialect Racket) was in academia for so long that it literally got "friend-zoned" and has little (read "no") use in the industry. Then again, I expected to see more Common LISP around. Paul Graham really put it right, but I guess any leverage/advantage LISP had on other languages, it waned in the 90's (maybe Viaweb was one of the last projects done in LISP, and even that was translated later to other langs...) I don't think s-expressions are _that_ problematic. The main issue with LISP's nowadays is lack of _momentum_. Java gained its momentum by Sun, after that it just keeps rolling in the industry and apparently, there's no stopping that. Python also has its momentum from the academia, what with all the great libraries and all. But one would expect to see some _major_ projects done entirely in LISP (and not a Trojan Horse LISP like Clojure), after that, it's only a matter of time for developers to become LISPers. Of course, one could also claim that LISP actually _did_ have like half a century to prove itself, or gain momentum. After all, Golang and ruby are relatively new, but they eat LISP's lunch at launch of new apps. I really appreciate things like this project. It's not enough, but what is?
- macmac 10y agoWhat makes Clojure "not LISP"?
- aidenn0 10y agoTo hopefully prevent a repeat, here's a long flamewar thread discussing whether or not Scheme is a lisp: https://groups.google.com/forum/#!topic/comp.lang.lisp/Bj8Hx6mZEYI https://groups.google.com/forum/#!topic/comp.lang.lisp/Bj8Hx... Interestingly enough, KMP is on the side of "not lisp" and the thread was started by https://news.ycombinator.com/user?id=lisper https://news.ycombinator.com/user?id=lisper
- PuercoPop 10y agoIf you are looking for end-user applications written in Lisp, there are quite a few. For example Opus Modus (http://opusmodus.com/ http://opusmodus.com/)
- gkya 10y agoThis is really cool. So is http://sdf.org http://sdf.org . You can get a lifetime Unix (NetBSD) shell account at them for as little as $5, mail, http/gopher hosting, etc. included, and more.
- girvo 10y agoOh man that is cool! Now to work out how to get validated considering I live in Australia...
- voltagex_ 10y agoSo I've done this. I'll have an ARPA-level account ($40US) in a few days or so (both validations and upgrades are done manually, by one person). Get a login by sshing to new@sdf.org,then type verify at the command line
- voltagex_ 10y agoThe donate button on sdf.org seems to fail unfortunately. It'd be fantastic if I could get in, as I've been looking for something like this since bur.st closed down.
- aerique 10y agoI worked for me just now, perhaps a temporary glitch or something on your end?
- FroshKiller 10y agoIf you like this kind of content, consider joining the SDF. It's a free public access computing community with lots of artists, hackers, and grognards of all stripes. Your support is appreciated: https://sdf.org/ https://sdf.org/
- Iispm 10y agoHow have I never heard of this "common" lisp?
- dang 10y agoWe've banned this account because it appears to be trolling and impersonating another user, which (if true) is an abuse of this site. If we're mistaken, or if you don't want to be banned, please email hn@ycombinator.com.
- Sidnicious 10y agoTo see this error page without disconnecting from the internet, visit chrome://network-error/-106.
- mdaniel 10y agoThank you for the link, and for those who come along next and see this link, you'll want to reference the @AceJohnny2 comment where one learns that the spacebar starts the game (up arrow key does as well; just ensure the page itself has focus, and not the location bar). Then, if you haven't read the article you might not know that the dino crouches with the down arrow. Thanks to the OP for the great article, and for the comments instructing on how we mere humans can play. N.B. the dino game has sound for a score that is a multiple of 100, so it might not be appropriate to try during a meeting, or at least mute first
- _asummers 10y ago> N.B. the dino game has sound for a score that is a multiple of 100, so it might not be appropriate to try during a meeting, or at least mute first How'd they react to that one?
- avodonosov 10y agoThat's useful