Live data from Hacker News

Technical overview of Kandria, a game and game engine developed in Common Lisp

reader.tymoon.eu

11–20 of 36 posts

Re: Technical overview of Kandria, a game and game engine developed in Common Lisp

#11
post #5

>> One thing I do have to mention though is that the workflow in Lisp allows me to create these support libraries much faster than I can in other languages. I'm at that stage in my lisp journey (~18 months) where i know enough to be dangerous to others around me, i.e. i'm still a lisp n00b but have completed a few lisp & scheme books and written enough projects that i feel fairly productive. BUT i haven't reached, ne…

> it's totally changed how i write js for example This may be a silly question. But could you give a couple examples of how you implement something in JS now vs. how you would have implemented it 18 months ago?

Learning a little haskell a million years ago was a revelation. In my next bit of JS (a large, non-web project) I did lots of FP in it - and for the better, not just because i could. I really cut down on boilerplate, made it more readable and reusable, and... it was just great.

Re: Technical overview of Kandria, a game and game engine developed in Common Lisp

#12
This is a nice write up.

The dark side is that they've put years into developing the core infrastructure to empower their Lisp game journey. Ideally that's all usable by others to "stand on the shoulders", so to speak, but that's always a challenge.

I honestly have never had to work on a "running image" of any consequence. I've never worked on anything more than a few thousand lines of code. I've never needed any kind of source level "step" debugging. The ability to redefine a function quickly, I just throw in some prints to figure something out.

Reloading the entire source file was always fast enough to now warrant hunting down any of the more interactive mechanisms available. This is all across using simple vi, or emacs, or even LispWorks.

  (defun l () (load "src.lisp"))
Just save the file, and type that.

All that said, my current low level fantasy is something akin to Electron, only with Common Lisp. First class DOM, first class event hooks, into a CL runtime that you can deploy cross platform. Dunno if that exists or not.

I'm sure at some point my codebase will grow to the point where I would need to "level up" and become more intimate with SLIME, packages, system definitions, etc.

I've just not crossed that threshold yet.

Re: Technical overview of Kandria, a game and game engine developed in Common Lisp

#13

This is a nice write up. The dark side is that they've put years into developing the core infrastructure to empower their Lisp game journey. Ideally that's all usable by others to "stand on the shoulders", so to speak, but that's always a challenge. I honestly have never had to work on a "running image" of any consequence. I've never worked on anything more than a few thousand lines of code. I've never needed any kin…

What kind of software do you usually create this way?

Re: Technical overview of Kandria, a game and game engine developed in Common Lisp

#14
I'd really like to understand how live reloading works a bit better, especially when editing variables that some running thread depends upon. Is there an overall strategy here? Do I implement locking around variables that I intend to play with at runtime?

Re: Technical overview of Kandria, a game and game engine developed in Common Lisp

#15
post #14

I'd really like to understand how live reloading works a bit better, especially when editing variables that some running thread depends upon. Is there an overall strategy here? Do I implement locking around variables that I intend to play with at runtime?

I don’t believe the Common Lisp specification says anything about threads. For example here[1] is the relevant section of the SBCL manual. As you can see it’s quite low level. If you’re using those primitives then yes you’ll have to manage barriers, synchronization, use atomic operations, or otherwise maintain sanity. The REPL (or SWANK) thread is just another thread.

Edit: I should add that the usual pattern is Bordeaux threads or some other higher level thing.

[1] http://www.sbcl.org/manual/index.html#Threading

Re: Technical overview of Kandria, a game and game engine developed in Common Lisp

#16
post #13

This is a nice write up. The dark side is that they've put years into developing the core infrastructure to empower their Lisp game journey. Ideally that's all usable by others to "stand on the shoulders", so to speak, but that's always a challenge. I honestly have never had to work on a "running image" of any consequence. I've never worked on anything more than a few thousand lines of code. I've never needed any kin…

What kind of software do you usually create this way?

Essentially listener utilities (vs command line utilities). Code designed to solve specific problems, typically for their side effects and artifacts vs deployed code in production systems. One off simulations, etc.

No UI but the listener.

Re: Technical overview of Kandria, a game and game engine developed in Common Lisp

#17

This is a nice write up. The dark side is that they've put years into developing the core infrastructure to empower their Lisp game journey. Ideally that's all usable by others to "stand on the shoulders", so to speak, but that's always a challenge. I honestly have never had to work on a "running image" of any consequence. I've never worked on anything more than a few thousand lines of code. I've never needed any kin…

> Reloading the entire source file was always fast enough

The point is that you might want to keep the state.

Re: Technical overview of Kandria, a game and game engine developed in Common Lisp

#18
post #9
post #7

Earlier quoted context omitted.

Could you expand on the REPL bit? Having worked with JS, Python and Elixir, they feel more or less the same. What’s Lisps have that these don’t?

The Lisp instinct is to make a change in a file and immediately hit C-c C-c in Emacs, at which point the change goes live in the system - no matter if it's a variable or a function that you have changed or something else. You don't need to reload the full module like in BEAM languages like Erlang or Elixir, you can modify a single function or a form without the need to make a version upgrade to the processes running…

Version upgrades are not needed on BEAM anymore than they are in Lisp, you can just reload a module and code will start using the new version.

Re: Technical overview of Kandria, a game and game engine developed in Common Lisp

#19

This is a nice write up. The dark side is that they've put years into developing the core infrastructure to empower their Lisp game journey. Ideally that's all usable by others to "stand on the shoulders", so to speak, but that's always a challenge. I honestly have never had to work on a "running image" of any consequence. I've never worked on anything more than a few thousand lines of code. I've never needed any kin…

> my current low level fantasy is something akin to Electron, only with Common Lisp. First class DOM, first class event hooks, into a CL runtime that you can deploy cross platform.

Have you checked out https://github.com/rabbibotton/clog ? I have only played with a couple of the tutorials, but it seems to be targetting something like that, albeit without an included browser.

Re: Technical overview of Kandria, a game and game engine developed in Common Lisp

#20

>> One thing I do have to mention though is that the workflow in Lisp allows me to create these support libraries much faster than I can in other languages. I'm at that stage in my lisp journey (~18 months) where i know enough to be dangerous to others around me, i.e. i'm still a lisp n00b but have completed a few lisp & scheme books and written enough projects that i feel fairly productive. BUT i haven't reached, ne…

Thanks for that. Are you able to tell us what books got you to where you are now? I've just started Emacs Lisp An Introduction as I'm wanting to dive right into Emacs (coming from a life-long Vimer), but I'd also want to expand to other Lisps.
Post reply on HN