libera/#commonlisp - IRC Chatlog
Search
21:41:38
Colleen
Clhs: special operator load-time-value http://www.lispworks.com/documentation/HyperSpec/Body/s_ld_tim.htm
0:50:01
ivche
hey ppl, so im going through some material, and im trying to make a web server as an exercise
0:51:40
ivche
here is my code, when I start up the server with the (serve) function, and try to visit the server from my browser
0:55:00
kakuhen
depending on what exactly the clisp resource uses, you may be able to get away with using usocket
0:56:13
kakuhen
anyway, assuming your serve function is set up correctly, can you trace the function that gets given that octet sequence
1:03:04
pjb
ivche: you don't specify an :element-type to sockets, so it's character by default, therefore it uses an encoding. Since you didn't specify a common :external-format, it's the default one in each process that is used. Probably not the same.
1:04:13
pjb
ivche: https://koji-kojiro.github.io/sb-docs/build/html/sb-bsd-sockets/generic-function/SOCKET-MAKE-STREAM.html
1:06:16
pjb
ivche: also, 3 is not the ASCII code of a character, but an ASCII control code (for ETX). So it's not a character stream.
1:29:09
ivche
but why does it display this <!DOCTYPE html><html><meta charset="utf-8"><h1>Hello world!</h1></html>
4:45:18
rdrg109
I'm using SBCL and I'm trying to understand how to use ASDF, so I'm reading this manual https://common-lisp.net/project/asdf-install/tutorial/index-save.html#pre. According to that guide, I can load ASDF-INSTALL by executing (require :asdf-install)
4:51:40
rdrg109
asdf-install completely died more than a decade ago, having been completely superseded by Quicklisp.
4:52:28
kakuhen
most people just use quicklisp nowadays, which automatically loads asdf, either the asdf bundled with your implementation, or a custom one supplied by quicklisp itself (if your implementation doesnt offer one)
4:52:40
rdrg109
char: As a clisp newbie, I thought that using ASDF-INSTALL was necessary for insatlling packages, but now with the information provided at https://www.cliki.net/asdf-install, I know that it is not necessary and I should use Quicklisp insterad
4:53:44
kakuhen
I strongly recommend you install quicklisp; instructions are here -> https://www.quicklisp.org/beta/
4:54:24
char
quicklisp is really super. I'm experimenting with using guix to manage common lisp packages too though.
4:54:32
kakuhen
the process looks involved, but essentially you are downloading a lisp file, passing it to sbcl, and then you run (quicklisp-quickstart:install) and (ql:add-to-init-file) so that it loads whenever sbcl runs
4:56:54
rdrg109
I'm trying to install this library https://common-lisp.net/project/lisplab/ and it mentions that it needs to be installed through asdf.
4:58:42
char
quicklisp uses asdf in the background, so if you quicklisp:quickload it, it will work, granted it is on quicklisp repository
5:00:37
White_Flame
install quicklisp ( https://www.quicklisp.org/beta/ ), download the code and unzip it under ~/quicklisp/local-projects/, and then you should be able to (ql:quickload "lisplab")
5:01:17
White_Flame
however if you're just looking for matrices, it'd be better to grab one that quicklisp supports
5:01:42
kakuhen
lapack is some fortran library iirc so id be surprised if it can somehow install it for you
5:02:46
White_Flame
are you looking for general mathematic matrices, or specifically like 3d graphics matrices?
5:04:09
White_Flame
ok, I know less about that, but there is a linkage to octave: https://www.common-lisp.net/project/cl-octave/
5:04:36
rdrg109
White_Flame: How can I get a list of Quicklisp packages. The more information, the better. I only know how to list their names with (ql:system-apropos "")
5:14:12
beach
rdrg109: If you IRC client doesn't have abbrevs, you can use "CL" to mean Common Lisp.
5:20:32
beach
ACTION wonders why anyone would write an IRC client without abbrevs, and why anyone would want to use such a client.
5:21:01
rdrg109
I'm using weechat. Taking into account weechat's extensibility, there probably is a feature for that.
5:21:13
beach
ACTION also wonders why so few people seem to be interested in saving time by using abbrevs.
5:24:04
moon-child
beach: I think that systemic approaches to typing speed (such as stenography) may be worthwhile, but that my prose is not redundant enough that such a thing would be very helpful
5:25:14
beach
moon-child: I am tempted to go to the logs and do a frequency analysis of your utterances. :)
5:31:28
rdrg109
I moved lisplab to ~/quicklisp/local-projects/lisplab and I was able to execute (ql:quickload "lisplab"). The problem is that I'm getting a ton of errors with the following format: is 0.0, not a DOUBLE-FLOAT. [Condition of type SIMPLE-TYPE-ERROR] (complete log: http://0x0.st/-9CT.txt)
5:32:52
rdrg109
Is that normal behavior? Are those types of warnings as happen with g++ and big Qt projects?
5:33:21
moon-child
(also consider cognitive overhead, because obviously gzip will do a number on it)
5:35:38
beach
moon-child: It is interesting that the top one is "the", because my fingers are unable to type "the", and I end up with "teh" instead. So I have an abbrev that corrects that one.
5:36:20
moon-child
'teh' vs 'the' is interesting; I would think 'the' is easier to spell, because it uses alternating hands!
5:39:40
susam_
Interesting discussion. I too make mistype "the" as "teh" often but indeed "the" should be easier to type due to alternating hands.
5:48:45
beach
Also, a per-word analysis is not quite fair since an abbrev can generate several words, as in "first-class global environments", "(admittedly small) family", "Good morning everyone!", "Common Lisp HyperSpec", "Second Climacs", "(first) Climacs", "my favorite coauthor", "Common Lisp", each of which I have an abbrev for.
6:54:53
phoe
I remember that there was a technique for garbage-collecting class objects generated via DEFCLASS. What was required is SETF FIND-CLASS NIL and REMOVE-DIRECT-SUBCLASS but there must be something more because the finalizer on the class object is not firing for me - any ideas what I'm missing?
7:11:05
flip214
phoe: you could also redefine the class to contain no slots anymore... that should call INITIALIZE-INSTANCE
7:12:10
flip214
http://www.lispworks.com/documentation/HyperSpec/Body/f_upda_1.htm#update-instance-for-redefined-class
7:12:35
flip214
there's also a MAKE-INSTANCES-OBSOLETE http://www.lispworks.com/documentation/HyperSpec/Body/f_mk_i_1.htm#make-instances-obsolete
7:21:34
prxq_
phoe: if you generate many classes often and want to have them GCed regularly, it pays to have them in temporary packages which can just be deleted. Subsequently the classes get GCed as well.