Search found 78 matches

by David Mullen
Fri Nov 23, 2018 1:50 pm
Forum: Common Lisp
Topic: CLOS objects with many slots
Replies: 8
Views: 24735

Re: CLOS objects with many slots

You mean it can interfere with SBCL's internal macro-expanded constructs?
by David Mullen
Fri Nov 23, 2018 1:15 pm
Forum: Common Lisp
Topic: CLOS objects with many slots
Replies: 8
Views: 24735

Re: CLOS objects with many slots

That's an interesting approach; it wouldn't rely on knowing the class at compile time. The access library feels a little heavy-handed to me, but now I'm wondering if that approach wouldn't work better - (with-object-2 (symbol object) body) expanding body such that symbols with a dot that start with...
by David Mullen
Tue Nov 20, 2018 4:48 pm
Forum: Common Lisp
Topic: CLOS objects with many slots
Replies: 8
Views: 24735

Re: CLOS objects with many slots

Hmm, I really can't imagine a use of the ENV parameter that isn't deeply icky. I don't know, I was just referring to this, from defclass : If a defclass form appears as a top level form, the compiler must make the class name be recognized as a valid type name in subsequent declarations (as for deft...
by David Mullen
Tue Nov 20, 2018 4:04 pm
Forum: Common Lisp
Topic: CLOS objects with many slots
Replies: 8
Views: 24735

Re: CLOS objects with many slots

This should be okay, except you might want to pass the environment to find-class (from the &environment parameter of the macro). There's an access library that has a with-dot macro, and it operates in an "inverse" way (so to speak) from what you're doing. It scans the body looking for ...
by David Mullen
Thu Nov 01, 2018 12:56 pm
Forum: Homework
Topic: Making Lisp do Integration
Replies: 1
Views: 9648

Re: Making Lisp do Integration

Impossible to say, without seeing the rest of the code. What's the purpose of the defconstant?
by David Mullen
Mon Aug 13, 2018 12:31 pm
Forum: Common Lisp
Topic: Paul Graham style LISP/the LISP Way or Avoiding the CLOS
Replies: 2
Views: 23807

Re: Paul Graham style LISP/the LISP Way or Avoiding the CLOS

I seem to've misplaced my Paul Graham hat, but I wanted to point out that the "dispatch mechanism" of CLOS is, on a conceptual level, nothing but a "giant cond expression," just with a set of optimizations (say, lookup tables) that make it go faster than the equivalent COND. The ...
by David Mullen
Thu May 24, 2018 1:43 pm
Forum: Common Lisp
Topic: using sockets to send a file
Replies: 8
Views: 26341

Re: using sockets to send a file

Come to think of it, the more concrete pitfall here is latency—where LISTEN will return false if (some of) the data hasn't arrived yet. In that event, you'd miss out on the rest of the file. (Not a problem with localhost, I guess.)
by David Mullen
Fri May 18, 2018 12:10 pm
Forum: Common Lisp
Topic: using sockets to send a file
Replies: 8
Views: 26341

Re: using sockets to send a file

Is there a difference between force-output and finish-output with this API? That's a good question that I don't know the answer to. Looking at the SBCL sockets code , the documentation on sb-bsd-sockets:socket-make-stream notes: "Acceptable values for BUFFERING are :FULL, :LINE and :NONE, defa...
by David Mullen
Tue May 15, 2018 5:38 pm
Forum: Common Lisp
Topic: using sockets to send a file
Replies: 8
Views: 26341

Re: using sockets to send a file

Kuro wrote:one thing that i noticed though, is that the file is only received completly when/after the stream is closed. why is that?
Is there a difference between force-output and finish-output with this API?
by David Mullen
Mon May 14, 2018 4:47 pm
Forum: Common Lisp
Topic: using sockets to send a file
Replies: 8
Views: 26341

Re: using sockets to send a file

What effect does the :ELEMENT-TYPE argument have? I'm only familiar with CCL's stream sockets, which are bivalent (taking both characters and bytes).