Live data from Hacker News

Cl-bodge: a cross-platform Common Lisp game and application framework

borodust.org

21–30 of 38 posts

Re: Cl-bodge: a cross-platform Common Lisp game and application framework

#21

Also check out alien-works[0] by same author (borodust). This guy just works non-stop. I find it inspiring in a way. [0] https://github.com/borodust/alien-works

Playing with their 'trivial-gamekit' based on cl-bodge now, very nice I think!

https://borodust.org/projects/trivial-gamekit/

alien-works also looks cool and under active development

Re: Cl-bodge: a cross-platform Common Lisp game and application framework

#22

I think Lisp is wonderful, and I would love to develop games using Lisp. However, I was under the impression that, by all accounts, developing games in Lisp is completely unrealistic due to the garbage collector. I'm not familiar with Common Lisp, but in Racket, “GC pauses [...] typically run from 50ms to 100ms” [0]. On a 16ms maximum frame budget, that doesn't really work. Am I missing something? [0]: https://docs.r…

You can write Lisp in a way that you manage your own allocations, including avoiding the heap. It defeats part of the point of Lisp, but sometimes you can use that coding style for a subset of your program that shouldn’t be leaning on the GC too much. I don’t do game development, but in scientific computing, I rely on the GC a lot for workload preparation and other administrivia, then adopt a GC-famished Lisp style f…

Anyone know if there have been attempts at concurrent garbage collection in any of the major lisp implementations (whether CL or Scheme). Maybe Clojure?

Re: Cl-bodge: a cross-platform Common Lisp game and application framework

#23
post #22

Earlier quoted context omitted.

You can write Lisp in a way that you manage your own allocations, including avoiding the heap. It defeats part of the point of Lisp, but sometimes you can use that coding style for a subset of your program that shouldn’t be leaning on the GC too much. I don’t do game development, but in scientific computing, I rely on the GC a lot for workload preparation and other administrivia, then adopt a GC-famished Lisp style f…

Anyone know if there have been attempts at concurrent garbage collection in any of the major lisp implementations (whether CL or Scheme). Maybe Clojure?

Clojure uses the underlying host's GC (e.g., JVM, CLR or JS engine). It also typically generates rather more garbage than other languages may due to immutability by default. As with all things, you can avoid the garbage if you are willing to abandon the usual idioms.

Re: Cl-bodge: a cross-platform Common Lisp game and application framework

#24

I think Lisp is wonderful, and I would love to develop games using Lisp. However, I was under the impression that, by all accounts, developing games in Lisp is completely unrealistic due to the garbage collector. I'm not familiar with Common Lisp, but in Racket, “GC pauses [...] typically run from 50ms to 100ms” [0]. On a 16ms maximum frame budget, that doesn't really work. Am I missing something? [0]: https://docs.r…

There’s a lisp-like language without a GC called Carp [1]. I believe the goal was enabling real time applications and specifically games. I’ve only toyed with it a tiny bit, but it has an ownership memory model inspired by Rust. Pretty neat project!

[1] https://github.com/carp-lang/Carp

Re: Cl-bodge: a cross-platform Common Lisp game and application framework

#25

I think Lisp is wonderful, and I would love to develop games using Lisp. However, I was under the impression that, by all accounts, developing games in Lisp is completely unrealistic due to the garbage collector. I'm not familiar with Common Lisp, but in Racket, “GC pauses [...] typically run from 50ms to 100ms” [0]. On a 16ms maximum frame budget, that doesn't really work. Am I missing something? [0]: https://docs.r…

Andy derides the GC of a particular common lisp implementation (Allegro) and praises the GC of an implementation of a language with broadly similar semantics and data model (Ruby). The conclusion to take from that is that one CL implementation had a crappy GC, not that CL is not amenable to fast garbage collection.

Re: Cl-bodge: a cross-platform Common Lisp game and application framework

#26
post #4

Earlier quoted context omitted.

On a somewhat related aside, the book Land of Lisp [1] is an interesting introduction to both Common Lisp and game programming. If anyone, like me, was interested in learning Common Lisp through a casual and fun mode, I highly recommend the book. [1] http://landoflisp.com/

I generally recommend people avoid Land of Lisp as an introduction to CL book. It's simultainisouly too easy and too hard for most people approaching the language in that it goes way too briefly over core concepts then all of a sudden shifts gears into much more involved programming. That being said, it's probably the best second book on CL ever. It showcases a variety of lisp techniques on some very real and fun exa…

[deleted]

Re: Cl-bodge: a cross-platform Common Lisp game and application framework

#27
post #19

Earlier quoted context omitted.

I generally recommend people avoid Land of Lisp as an introduction to CL book. It's simultainisouly too easy and too hard for most people approaching the language in that it goes way too briefly over core concepts then all of a sudden shifts gears into much more involved programming. That being said, it's probably the best second book on CL ever. It showcases a variety of lisp techniques on some very real and fun exa…

Fair enough! I haven’t gone through it entirely. What do you recommend as primary texts? I have a few in mind (Practical Common Lisp, for example) but haven’t actually touched them yet.

I liked Practical Common Lisp. Also Paul Graham's "On Lisp" (Chapter 4 is a good example of the flavor of it).

Re: Cl-bodge: a cross-platform Common Lisp game and application framework

#28
post #9

Earlier quoted context omitted.

The `portaudio` is a few years old, so I have a hunch that the comment refers to the old backend "Racket BC". The new backend "Racket CS" has a new garbage collection mode "incremental", which I understand is better for this usage scenario. I don't have any numbers though.

I got some more information from Flatt. The new incremental mode means the 16ms deadline is within reach. In fact if the screen is not involved, then 1-2ms is reachable. On macOS a screen-refresh can cause a 16ms pause.

Didn't incremental GC exist before CS work even began? I certainly remember seeing it although it was not default. Or is this a different implementation?

Re: Cl-bodge: a cross-platform Common Lisp game and application framework

#29
post #9

Earlier quoted context omitted.

The `portaudio` is a few years old, so I have a hunch that the comment refers to the old backend "Racket BC". The new backend "Racket CS" has a new garbage collection mode "incremental", which I understand is better for this usage scenario. I don't have any numbers though.

I got some more information from Flatt. The new incremental mode means the 16ms deadline is within reach. In fact if the screen is not involved, then 1-2ms is reachable. On macOS a screen-refresh can cause a 16ms pause.

[deleted]

Re: Cl-bodge: a cross-platform Common Lisp game and application framework

#30

Earlier quoted context omitted.

Naughty Dog historically disagreed with this [0], plenty of games these days are developed in languages with GC but it is a performance trade off. For maximum performance any Lisp is probably not the way to go but I don't think it's unfeasable. I want to say in general e.g. SBCL (a popular common lisp implementation) will perform a lot better than Racket. Racket is a great language but performance is not it's strong…

Currently, but hopefully no longer in the near future, SBCL’s garbage collector is extremely meh. It’s hard to tune, it stops the world, etc. Otherwise SBCL is a wonderful implementation.

Is there some recent work going on in SBCL on its GC?
Post reply on HN