hylang / hy

A dialect of Lisp that's embedded in Python
http://hylang.org
Other
5.13k stars 373 forks source link

An exemplar Hy program #2198

Closed Kodiologist closed 7 months ago

Kodiologist commented 2 years ago

When you have a new programming language, it really helps—for the purposes of advertising the language, of helping people learn how to use it, and of giving the language a broader and more practical test than unit tests—to have some kind of nontrivial program written in the language. I think I speak for many of us when I say that write a lot of small programs in Hy, as well as a lot of not-so-small programs that are of little general interest (in my case, code for the data analysis of specific scientific studies). What I don't have is a program that is both not small and of general interest.

I propose we consider writing and maintaining an exemplar program. It doesn't have to be kept under the hylang organization and probably shouldn't be considered a responsibility of the Hy core team; it could be one person's passion project, so long as it's free software. It should be something that's useful to end users of some kind, rather than Hy programmers—we want to show something that is done in Hy, not something you can use to write other programs in Hy. It should offer something that doesn't already exist, rather than being a Hy rewrite (or stripped-down equivalent) of an existing program. And it shouldn't be too specialized. A text editor, paint program, or process manager isn't too specialized, whereas a program for managing reservations at a hotel or for designing aircraft is.

One genre of program that fits a lot of these criteria is games. Rogue TV has the potential to be a good exemplar program, although it would need considerable work to get running on the latest Hy, and it's still missing a lot of content elements to be a good game. Also, Rogue TV is arguably too big and complex to be good for this purpose. Ironically, I quit development of it largely to work on Hy itself.

pkulev commented 2 years ago

We can mantain list of somewhat finished programs at separate page in docs, for instance. I did game for lisp game jam, https://github.com/pkulev/tanki.git. But code is not so elegant as it could be with all the lisp powers.

Kodiologist commented 1 year ago

I'm working on a game for this, but I haven't put it on GitHub yet because so little is implemented.

Kodiologist commented 1 year ago

It's up at https://github.com/hylang/simalq. I'll close this issue when it's more mature and I've added links to it from hylang.org or the documentation.