Decweb

joined 11 months ago
[–] Decweb@alien.top 1 points 10 months ago

You might read docs about some CL based games, like Khandria, where they talk about dealing with gc. (TL;DR, not a major problem). Sorry, I don't have a link for you.

Note that you can also work to writing less consing-intensive code too (more preallocated data structures, efficient use of fixnums, the stack, and lisp-specific extensions that allow you to do more tricks with the stack or malloc()'d memory.

[–] Decweb@alien.top 1 points 10 months ago

SBCL has gc hooks you might also use too, though I don't think it'll give you the duration of the just-finished gc.

Variable: *after-gc-hooks* [sb-ext]

You might be able to just increment a counter, and call (room) each time, and at least log the data (assocaited with the counter) for subsequent analysis.

[–] Decweb@alien.top 1 points 10 months ago (2 children)

Lispers know their time is too valuable not to use lisp.

 

I may have found a solution to my desire for C-c C-z in the slime repl (default slime-nop) to return you to the buffer that sent you to the repl via slime-switch-to-output-buffer (also C-c C-z), with regard to a post/request I made a year ago:

https://www.reddit.com/r/Common_Lisp/comments/xa7imh/seeking_reverse_of_slimeswitchtooutputbuffer/?utm_source=share&utm_medium=web2x&context=3

Basically calling a function which does (switch-to-buffer (slime-recently-visited-buffer 'lisp-mode)) works, or at least does something interesting by approximation.

I'm not much of an emacs coder though and I'm at a loss though as to how to bind my new function calling the above switch-to-buffer to C-c C-z only in the slime repl buffer. Any tips?

[–] Decweb@alien.top 1 points 11 months ago (1 children)

That's the closest approximation (so far) of what I was looking for, though unfortunately I'm a slime user and haven't yet tried sly.

I'm actually surprised there isn't speedbar for CL definitions already in slime, somehow I figured it was an obvious thing I was missing, since you see that sort of thing all the time in IDE's.

[–] Decweb@alien.top 1 points 11 months ago

Nice tips for future use though not quite what I'm looking for (though the prefix tip is one I'll have to remember).

[–] Decweb@alien.top 1 points 11 months ago (3 children)

Are the sly presentations in a speedbar or special buffer of some kind, or just listed in the REPL?

 

When editing common lisp with slime and emacs, I'd like a speedbar listing, alternately, top level definitions in the file I'm editing, and top level definitions in the package I'm looking at (which may be a superset of definitions in the file). Preferably sorted by type of definition (function, macro, constant, etc) and/or alphabetically.

Is there some emacs tooling for this? I haven't found it.