6 ms·
Making Games in Lisp with Hypergiant and Chicken Scheme
- merlincorey 8y agoI love Chicken Scheme, so this is great to see. Note that this article is from 2015. Chicken Scheme recently received a version 5 release, so please be aware that this article focuses on Chicken 4, as I do not believe Hypergiant has been ported to Chicken 5 yet. As an aside, it's a shame the footnotes render over the text for me in Firefox.
- Koshkin 8y agoA nice thing about Lisp (that is harder to achieve in other languages) is that you can make the text of your program look like it is written in a declarative rather than in an imperative (or a functional) language. (I think that's what is meant when they say that Lisp is perfect for creating DSLs.)
- sifoobar 8y agoHarder in other languages except Forth. While creating DSLs is easy enough in Lisp, Forth is more of a DSL construction kit than a programming language. Which is why there are roughly as many dialects as implementations.
- jacobush 8y agoForth... so alluring, yet so scary. I am afraid doing it will make me do great things no one else can understand and maintain. :)
- sifoobar 8y agoI've been working on one of my own that attempts to bridge some of the gaps between Forth and the rest of the world, feel free to take her out for a spin: https://gitlab.com/sifoo/snigl https://gitlab.com/sifoo/snigl
- srean 8y agoI presume you would know of factor, curious what you think of it.
- sifoobar 8y agoSure, I've played around with it; still too complex and too static due to being natively compiled. I've mostly given up on the idea of driving applications from a higher level language, I much prefer having C as a foundation and then embedding a more dynamic language that I have full control over. I like to call it reverse FFI :)
- srean 8y agoSo Guile, Lush, Lua, Tcl would be the other likely candidates. I do use Python but more as a remote control over C.
- sifoobar 8y agoYep, more or less. Though if you flip through Snigl's README, there's already plenty in there that these languages will never be able to do. I used to do that in Common Lisp, which has the only FFI I've come across that's even nicer than Python's. But it's backwards; once you're in a high level language, it's inconvenient and expensive to reach down. It makes a lot more sense to me to drive the whole process from C; not only do you have direct access to C; you also get to control the embedded world from the outside, which is about as meta as it gets.
- jacobush 8y agoIf you want a FFI that's arguably even nicer, look at PicoLisps: http://rosettacode.org/wiki/Call_a_function_in_a_shared_library#PicoLisp http://rosettacode.org/wiki/Call_a_function_in_a_shared_libr... (setq Display (native "/usr/lib/libX11.so.6" "XOpenDisplay" 'N ":0.0"))
- srean 8y ago
- akkartik 8y agoI wrote about this recently: https://plforums.org/practice/minimal-features-required-for-an-extensible-language#post_65 https://plforums.org/practice/minimal-features-required-for-...
- armitron 8y agoThis was posted today, illustrating the power of Common Lisp read macros (not to be confused with regular macros): https://github.com/y2q-actionman/with-c-syntax https://github.com/y2q-actionman/with-c-syntax
- sitkack 8y agoGambit Scheme has SIX (Scheme Infix eXtension) for C style imperative code. http://www.iro.umontreal.ca/~gambit/doc/gambit.html#Scheme-infix-syntax-extension http://www.iro.umontreal.ca/~gambit/doc/gambit.html#Scheme-i...
- zachcarter 8y agoI checked out hypergiant / chicken scheme a year or so ago - and was unable to get certain examples compiling / running on macOS. While I'd love to play more with / learn more scheme - it's too niche of a language these days even for me (someone that writes a lot of Nim). The scheme community seems to be very small to begin with, and then you factor in all the implementations - it's worse than the Common Lisp scene. I do love the simplicity of the language and how elegant scheme code can look - and chicken / guile seem to be very well suited for game development. I feel like I'd be trading a larger community for a smaller one at this point - and that's saying something, coming from a Nim user.
- potta_coffee 8y agoI've been using Chicken Scheme a lot and I find it to be awesome. I wish Hypergiant was supported in version 5.
- deleted 8y ago[deleted]
- kwccoin 8y agoSurprise to see a Go board displayed. But given Alpha Go, is Lisp is still relevant or is there a way for chicken to call say leela zero?
- eggy 8y agoI wish Chicken Scheme could be ported to Windows without the Posix dependencies. I run it on my Linux box, but unfortunately, work is all Windows. I have had years of frustration with Cygwin and MinGW or MSYS to run such things. I use Red [1] now, which is homoiconic like Lisp, has a great parser, and runs on all platforms with an executable under 1 MB. [1] https://www.red-lang.org/ https://www.red-lang.org/
- e12e 8y agoYou use Red? Not just play with it? Could you share some details? As for posix subsystems on windows, they're indeed painful. But the new Linux emulation layer is quite good - in some cases it might be a viable option.
- eggy 8y agoUse for me is writing small utilities for work. I am not a programmer, but I work in entertainment engineering, and Red has proven useful for making all sorts of utilities to get my job done. I am currently trying to use Red to create the GUI and glue some other utilities I use together. I hope to get better at it to create full applications. Amazing for its size, and I've always loved Lisp and Forth.
- bananicorn 8y agoWait, does the Red gui work under linux now? According to their Roadmap it doesn't yet - but maybe it just hasn't been updated for the last half year...