freenode/#lisp - IRC Chatlog
Search
0:51:16
pjb
You can alway (defun fpos (f) (file-position f)) (defun (setf fpos) (n f) (file-position f n) n) and use fpos instead.
0:54:12
|3b|
but silently discarding errors doesn't seem good either, so i'd say it just shouldn't return if it can't validly return the value returned from FILE-POSITION
0:54:59
pjb
I've got a serie of accessor to read and write files, but of course, you have to take them with a grain of salt.
0:55:23
|3b|
ACTION can't tell from spec if it is allowed to set it to a position other than the one you requested (and then return that different position, though doesn't seem like it)
0:56:05
pjb
The only file position that have a good chance of success are those returned by file-position.
0:57:33
pjb
So, you have (unsigned-byte 8) files, which will probably do what you expect on posix systems, and there are other files for which you need to be more careful.
1:10:43
AeroNotix
pjb: thanks for informing me that functions and setf functions are a possibility in Common Lisp
2:14:55
no-defun-allowed
if spi speed isn't a problem, i might have a go at writing an "extended" lisp for arduino
2:15:22
no-defun-allowed
i have two 128kb sram chips, so one will be from-space and the other is to-space
2:16:43
|3b|
if there is no :use clause in defpackage, behavior is unspecified so it is OK, :use () shouldn't use any other package though
2:20:59
no-defun-allowed
*when the reader reads a symbol it flips a coin and uses that to decide if it should intern a new symbol or use the CL symbol
2:25:05
kristof
Right, but the *compiler* might not even store a fill pointer (and I would hope not)
2:25:45
|3b|
antonv: you aren't allowed to modify any object created by the reader while reading the program source
2:31:03
|3b|
right, at the point where you are evaluating (read-sequence #() ...) you are evaluating a list containing the symbol CL:READ-SEQUENCE, the self-evaluating object #(), and whatever objects are in the ...)
2:32:31
|3b|
as opposed to when you evaluate (read-sequence some-vector ...) or (read-sequence (vector ...) ...), in which case the 2nd element of the list is a symbol (which evaluates as a variable), or a list starting with the symbol CL:VECTOR (which evaluates as a function call), in neither case a self-evaluating object
2:35:39
antonv
kristof: the reference to The ANSI Standard, Section 3.2.2.3 doen't really help, IMHO
2:36:34
|3b|
consider what would happen if you were using a lisp editor to edit your code, and it stored your source (read-sequence #(1 2 3) ...) as lisp forms instead of a string, then evaluated the form and it changed the #(1 2 3) that was being used to store your code
2:39:28
|3b|
and for a more current example, i think sbcl gets confused (or has recently) by macros that modify their input since it changes the forms it stores for debug info (or something like that, been a while)
2:39:40
antonv
kristof: adding "3.7.1 Modification of Literal Objects" to the warning message might be helpful
2:55:43
beach
"The idea behind establishing this convention was to eliminate noise generated almost every time someone comes in and greets using some form of day-time based greeting, and then channel members on the other side of the globe start pointing out that it's different time of the day for them."
3:00:45
beach
no-defun-allowed: [getting back to topic] There is lots of work to be done in all the Common Lisp projects I have listed. Yesterday I made excellent progress on SICL bootstrapping, and I want to continue that work while it is still fresh in my mind.
3:02:11
beach
This bootstrapping thing has got to be one of the most complicated tasks I have ever tried.
3:03:41
beach
no-defun-allowed: A mixture of the fact that nobody has tried this before (as far as I can tell) and (more importantly) that I have 4 different SICL first-class global environments in which the meaning of classes and generic functions may be different.
3:04:51
beach
In my head, I know how it works (though I sometimes need a little diagram), but I still have no real clue how to document it so that other people can understand.
3:09:55
no-defun-allowed
i wonder if there's a really obscure loop expression i can use to do box blur
3:11:08
no-defun-allowed
(loop for this-x from (- pixel-x width) to (+ pixel-x width) summing (aref image this-x) into total finally (return (/ total (* 2 width)))
3:15:37
equwal
I was asking if no-defun-allowed has read an obscure paper about graphics only tangentially related to the original topic.
3:26:08
equwal
Object Oriented Shader Composition using CLOS by Nicholas Hafner. I think it is pretty accessible if you are interested.
5:25:29
|3b|
no-defun-allowed: for separable filters like box, 1d is all you need, and for box you can just keep a running total adding in pixel at leading edge and subtracting out pixel at trailing edge
5:33:26
drmeister
Stupid question - is there any reason why quicklisp/setup.lisp can't be compile-file'd ?
5:45:49
|3b|
drmeister: probably harder for it to figure out its containing directory if compiled (.fasl wouldn't get recompiled to change *compile-file-truename* if directory was moved for example)
5:49:04
drmeister
Hmm, that might be a bit of trouble for us for a while. Clasp's compiler is slow and will probably remain that way for a while (llvm dominates compilation time 60-90%).
6:15:16
beach
This is a figure I am planning to use in the SICL specification document to illustrate the bootstrapping phases: http://metamodular.com/bootstrapping.pdf
6:24:51
nydel
beach: do you keep anything like a weblog or etc that i might add to my list of things i read?
6:37:22
beach
Slightly updated figure: http://metamodular.com/bootstrapping.pdf showing that ersatz generic functions are capable of operating on ersatz instances.
7:06:55
phoe
drmeister: a workaround would be to change setup.lisp and split it into two files - one doing the basic setup (compilable), the other being tiny, non-compilable, and only used to fetch *compile-file-truename* on each load
7:07:48
phoe
I think that literally a file containing only (defparameter quicklisp::*ql-path* *compile-file-truename*) would be enough to solve this issue.
7:08:12
phoe
But then again, there might be other ones, too - Xach would need to be asked for more insight.
7:31:45
d4ryus
is there a system in quicklisp to benchmark/compare runtime speed of cl implementations?
7:55:04
no-defun-allowed
|3b|: I've read how to implement box blur as a two-pass O(n) procedure, don't you worry.
7:55:22
beach
d4ryus: Oh, but maybe I'm mistaken about what it does. Now that I think about it, I think Shinmera created a system for exactly the purpose you want.
7:56:10
Shinmera
beach: trivial-benchmark is for benchmarking user code, it won't automatically compare the performance of implementations across a standardised set of forms for you.
7:57:19
Shinmera
my other project, cl-all can help you compare implementation behaviour though, by invoking them for you
7:57:45
no-defun-allowed
I should add start and end keywords for ffmpeg to allow it to create high quality Lisp ytp.