freenode/#lisp - IRC Chatlog
Search
21:46:52
pjb
thodg: (set-macro-character #\# nil t *readtable*) (set-syntax-from-char #\# #\a *readtable*)
5:11:07
ealfonso
i'm annoyed by all the "package X also exports/shadows the following symbols..." warnings/errors when refactoring... can slime help me make refactoring easier?
5:14:51
ealfonso
I tried uninterning all the symbols, which worked. just wondering if there's a way for slime to do it for me
5:19:51
PuercoPop
(C-c x exports a symbol, and when called with a negative argument it unexports it)
5:42:49
aeth
I usually just restart SLIME with M-x s-r-i-l when I change package definitions. It's (for me) faster than messing with uninterning, except maybe if it's just one.
7:02:19
panji
hi everyone, please help me with this problem. if i have class x and y, both class have slot a and b, is it better to create abstract class with slots a and b or create class a-mixin and b-mixin ?
7:11:56
theemacsshibe[m]
are there any garbage collectors written in lisp (or anything remotely readable) i can glean from?
7:23:05
theemacsshibe[m]
i'm just looking to make a tri-color GC since mark-and-sweep is kinda boring and isn't particuarly usable on a C64 with a slow 6502 and quite a bit of memory
7:36:22
xificurC
why not just (malloc :as-much-as-the-sytem-allows-right-now) and write gc-free code?
7:39:27
jackdaniel
xificurC: because if function conses anything and you don't clean up the garbage, you'll run off the memory eventually
7:40:18
xificurC
no. if you don't clean up the garbage you and you run off memory you obviously need more memory! It's so cheap now!
7:41:25
xificurC
seeing the java projects here it's fun to watch how little actual work a server is able to perform
7:42:44
theemacsshibe[m]
ooh i know, if we turn that off we can finally compete with --crap-- industry standard/grade languages like C++ and Rust
7:43:49
theemacsshibe[m]
must be something like SB-SUPER-VERY-SECRET::PUT-LANGUAGE-BACK-30-YEARSP /s
7:47:03
flip214
jackdaniel: I believe the originally designed lisp didn't, because it was just a theory --- and that can easily assume an unbounded tape...
7:48:22
theemacsshibe[m]
pedantically i don't think lisp had a "tape" since it wasn't a turing machine model
7:49:10
ZigPaw
Wikipedia quote: "Garbage collection was invented by John McCarthy around 1959 to simplify manual memory management in Lisp". So maybe the first one didn't had, as it was "on paper" but it got it pretty much quickly.
8:08:44
beach
theemacsshibe[m]: It is impossible to write a garbage collector in portable Common Lisp. You need direct access to memory. In fact, I don't think you can write it in valid C either.
8:09:43
White_Flame
certainly the "brains" of a GC could be written in CL, with the actual accesses being a clearly demarcated api
8:10:01
theemacsshibe[m]
well it might not be common but if your language exposed its heap and tagging functions there's a start
8:12:59
theemacsshibe[m]
it's not very good though and probably allocates a byte to hold the tag since i used an enum
8:14:38
on_ion
beach: that is a very strict standard i think, integers and pointers are converted often
8:15:08
on_ion
although days ago emacs just converted to pointers instead of integers for their 'lisp object' types
8:15:09
beach
on_ion: That's why I am saying that you have to rely on undefined behavior in order to make it work.
8:16:57
theemacsshibe[m]
anyways this is a disgusting scheme imitation which is in no way safe or usable and shall never be distributed even though it's GPL3+
8:18:38
on_ion
(ptr1 + ptr2) - ptr3 = ... have you guys used C at all? =) what goes on in our heads and what the compiler accepts are two different things
8:19:18
beach
on_ion: And what the compiler accepts is also different from what the standard allows.
8:20:36
theemacsshibe[m]
anyways "principle of least astonishment" was what i was trying to get at with using unions
8:22:50
jackdaniel
so given newer standard pointers may be handled without relying on undefined behavior (just syaing)
8:23:00
beach
So I find it an interesting observation that, if you use C as a programming language for applications, it is nearly impossible to use because you have no automatic memory management, and you can't re-program assignment the way you can in C++, and if you use C as a programming language for system programming, then your code must be written to have undefined behavior.
8:23:39
White_Flame
if you're doing system programming then all what matters is the environment guarantees
8:24:13
theemacsshibe[m]
my VGA driver has the line: struct vgac* terminal_buffer = (struct vgac*) 0xb8000;
8:24:20
beach
White_Flame: I am just saying that things like operating systems and device drivers are not written in "C", but in a particular implementation.
8:24:52
shrdlu68
I find the dimorphism between "system programming" and the rest of programming itself interesting.
8:32:29
theemacsshibe[m]
i think any attempt at making C into something somewhat high level is a bad idea
8:33:29
theemacsshibe[m]
IMO a lot of C comes from pointer twiddling and low level stuff so trying to implement anything high level or non-C-like while still retaining C characteristics will just feel wrong and carry bad habits
8:35:34
theemacsshibe[m]
ACTION uploaded an image: gc.png (23KB) <https://matrix.org/_matrix/media/v1/download/matrix.org/FzCQoRFdDDnkrjYGESwJWisd>