freenode/#lisp - IRC Chatlog
Search
20:06:38
sebboh
This doesn't do what I expect: sbcl --noinform --eval '(progn (ql:quickload :grid :silent t) (grid:render "foo"))' --non-interactive
20:07:33
sebboh
If I just start sbcl and evalute (ql:quickload :grid :silent t) followed by (grid:render "foo"), it works as expected.
20:08:14
Bike
so it reads the form, then (if it worked) would quickload grid, making the grid package available.
20:10:57
phoe_
because I'd need to first render this as a PNG file, then read that file, then read the pixel valus
20:12:18
phoe_
XachX: basically, I need to create a gradient purely in memory, in order to read the individual color values in between
20:13:17
phoe_
...actually, I want to get all the color values for values from 0 to 255, given that the gradient is 256 pixxels long.
20:13:39
phoe_
Yep, I can see it, and it's doable - just, it's that part that I need to save a temporary file and then load it that itches me
20:17:14
phoe_
https://github.com/xach/vecto/blob/8659770bfdc460a1c6b07271a188ec6c19aad3ea/gradient.lisp#L48 hm.
20:24:47
phoe_
So it's like 0% one color, 4.76% another color, 5% yet another color, ..., 94% one more color, 100% last color.
20:31:11
phoe_
if you're worried about it, you can defstruct and still get good performance, and then define a print-object method on it that does not print everything like crazy.
20:33:35
phoe_
Go with defclass, and if you feel that your performance suffers way too much AND that you are not using too much CLOS magic, then go for defstruct instead.
20:38:11
phoe_
I could use VECTO, if there was a way to get the in-memory vector of data *before* it's saved into a PNG.
20:43:48
phoe_
It seems that I can use an unexported IMAGE accessor, https://github.com/xach/vecto/blob/8659770bfdc460a1c6b07271a188ec6c19aad3ea/user-drawing.lisp#L332
20:58:20
phoe_
XachX: If I understand VECTO correctly, I can call SET-GRADIENT-FILL to describe what kind of gradient I want, and then call RECTANGLE to bound that gradient to a particular space on the canvas, so it doesn't draw the gradient all over the previous gradients I have created on that canvas. Is this correct?
0:03:13
sebboh
hm, didn't work for some reason. The UI prompted me to confirm the name of the thing I wanted to fmakunbound, but it still has a value... Oh well, it's quittin' time. :)
1:33:07
shrdlu68
What happens when you start sbcl in a terminal and paste this: http://paste.lisp.org/display/356394 ?
5:27:34
beach
Yesterday, I think I figured out how to do partial inlining of local functions using local graph rewriting.
5:31:59
beach
It is a graph of HIR (High-level Intermediate Representation) instructions in Cleavir.
5:32:22
minion
iqubic: Cleavir: A project to create an implementation-independent compilation framework for Common Lisp. Currently Cleavir is part of SICL, but that might change in the future
5:32:28
minion
iqubic: SICL: SICL is a (perhaps futile) attempt to re-implement Common Lisp from scratch, hopefully using improved programming and bootstrapping techniques. See https://github.com/robert-strandh/SICL
6:02:39
jasom
"I thought real hard about it and then I drew some figures." minion has a quote db, right? I think that's deserving
6:18:39
beach
In fact, that inlining technique creates functions with multiple entry points. Such functions can not be expressed as Common Lisp source code, but there have been languages that allow such functions of course.
6:25:51
beach
https://www.ibm.com/support/knowledgecenter/en/SSY2VQ_2.0.0/com.ibm.aix.pli.doc/lsh-procedure.htm
6:27:49
beach
I think I must stop posting links. Freenode gave me a warning that my behavior looks like spam.
6:52:10
beach
loke: In fact, the exception handling of Multics PL/I inspired the Common Lisp condition system.
6:56:20
beach
shka_: On the left, you have a caller that does (car x). On the right, you have the code for CAR.
6:57:11
beach
In fig4, the code for CAR has been partially inlined, so that the test CONSP is done in the caller, as well as the CONS-CAR (which is like CAR but must be given a CONS cell).
6:58:16
beach
So the caller now tests for CONSP, and if it is a CONS it does the CONS-CAR. Otherwise it calls the remaining CAR function that will test for NULL, etc.
6:58:39
beach
But I see an error in fig4. The caller should not RETURN. Just continue to the next instruction.
6:58:52
loke
beach: You're right. I recall reading about how Multics handled errors. It never dawned on me just how similar in concept CL is.
6:59:40
beach
loke: It is documented by Kent Pitman. He explicitly mentioned that PL/I is the inspiration for Common Lisp condition system.
7:00:28
loke
They do seem to setill market the products: https://www.ibm.com/ms-en/marketplace/pli-compiler-zos
7:11:36
beach
shka_: I updated the figures, fixing a bug and adding a variable to be assigned to the result of the call to (CAR X).
7:16:15
fouric1
I'm attempting to read from a character special file (representing a keyboard I have attached to my machine), and READ-BYTE appears to be...buffering? my reads
7:17:08
fouric1
That is, running the given snippet yields blocks of several hundred bytes at a time, which only occur after I've pressed several keys on the keyboard, and not as soon as I press a key.
7:17:27
fouric1
This *suggests* buffering, but I'm not sure how to confirm that it is, how to determine *what* it is, or how to get around it.