libera/#commonlisp - IRC Chatlog
Search
13:50:35
bitblit1
Hello everyone! Is there a cross platform way to get command line arguments (any libraries) or is it better I just manually do #+clisp ext:args or whatever
14:45:21
bitblit1
I have seen many programs in common lisp which don't update in real time. Whereas programs like McCLIM and CEPL update as you recompile your code. Is there any reason for this. I don't understand how you make code update on the fly in common lisp.
14:57:04
pjb
bitblit1: you need to structure your program to be able to update on the fly. This is automatic for notinline functions, but for the other functions, you need to ensure that the main loop is replaced by the new version, so that new code is taken into account.
14:57:45
pjb
bitblit1: that said, the main loop doesn't need to change often, so just having it refer notinline functions (eg. functions compiled in a different compilation-unit), would be enough in most cases.
18:49:43
bitblit1
Are global variables dicouraged in comparison to passing something like XDisplay to everrrrry function?
18:50:25
bitblit1
Thinking about it common lisp symbols and packages mostly solve the issues with global vars no?
18:57:37
random-nick
and sometimes a keyword argument is used with a default value looking up a special variable
18:58:19
random-nick
that's kind of similar to how streams can be passed to standard functions via arguments or via special variables
18:59:55
random-nick
if you don't like special variables and don't like passing everything via arguments, you can try somehow hiding passing via arguments using macros, but that can be tricky and hard to read to everyone unfamiliar with your technique
20:16:20
aeth
in part because while it seems like every function at first, it quickly turns out not to be (and if it still is, then your functions are probably too big)
20:16:47
aeth
But now you win because now you have functions where it can be accessed and functions where it can't, while a special or global is potentially accessed in that whole call stack.