freenode/#lisp - IRC Chatlog
Search
19:54:29
Xach
ACTION has his new quicklisp build server booted, installed with debian 9, and ready to configure
20:08:10
mgsk
Any idea why unicly doesn't support ccl? https://common-lisp.net/project/cl-test-grid/library/unicly.html
20:59:13
Xach
Here is a fun question prompted by https://github.com/quicklisp/quicklisp-client/pull/186 - what standard special variable settings would break what packages if they're something other than the default? the PR refers to *print-case*. *read-base* is too obvious. what are some other low-hanging breakages?
21:05:27
Lycurgus
no, it doesn't seem like a useful query to me, every system does it's own thing with *features*
21:08:56
MichaelRaskin
They say that being able to reset easily increases the fun of breaking things
21:09:44
MichaelRaskin
Although judging from A/G/M for some people breaking others' stuff that is hard to reset to a working state is fun…
21:15:15
MichaelRaskin
Well, by the time Google did _pointlessl_ evil things (as opposed to selfish), they had dropped the motto
21:26:13
mgsk
ccl is giving the error `> Error: #.(NAMED-OPERATOR #<error printing NAMED-OPERATOR #x3020067E8E8D> has no slot named #:%0.` -- which makes me think that cl-adt and `#.(...)` aren't playing nicely together.
21:27:15
mgsk
This is where the error is being raised https://github.com/rigetti/quilc/blob/master/src/compilers/state-prep.lisp#L14
22:37:43
no-defun-allowed
I'm not sure how many mutations you have to get from there to writing in your returns (which I'm pretty sure are wrong, RETURN returns from the block named NIL) and stating every case without any logic.
0:12:19
aeth
Does Common Lisp have an is-windows package yet? https://www.reddit.com/r/programming/comments/c0zwxb/one_liner_npm_package_iswindows_has_25_million/
0:21:14
aeth
I mean, at least CL has the legitimate need for something like that. It's portability across implementations. It's just that it's done in trivial-features and not 10+ libraries each of one line per implementation
0:22:47
aeth
apparently process.platform === 'win32' is what it does. https://github.com/jonschlinkert/is-windows/blob/4dcfff4ed9e36ad761a1a24d3899c832382d7254/index.js#L25
0:24:39
aeth
well, trivial-features because e.g. some use :win32 and some use :windows https://github.com/trivial-features/trivial-features/
0:24:58
aeth
I'm not sure why trivial-features decided to make them all standardize on :windows, not :win32, though
3:42:31
asarch
In HTML you could write: <meta charset="utf-8">, in net.html.generator:html you could: (:meta ...), however, how could you add the "chartset=utf-8" attribute to the tag?
4:02:30
no-defun-allowed
Does ql:register-local-projects not recurse into directories to find systems for anyone else on CCL?
4:28:13
PuercoPop
asarch: In spinneret it would be (:meta :charset "utf-8" ...). I imagine it would be the same in htmlgen
4:29:41
PuercoPop
the documentation of htmlgen says the attributes can be symbols or strings although they encourage keywords since "that looks more lisp like"
4:37:11
asarch
(net.html.generator:html (:meta (:body (:p "Hello world!")))) -> <meta><body><p>Hello world!</p></body>
5:01:12
PuercoPop
Yeah, this works on my machine: (net.html.generator:html ((:meta :charset "utf-8") (:body (:p "hello world"))))
5:19:56
random-jellyfish
(defvar *board* '( (2 'black) 'empty 'empty 'empty 'empty (5 'white) 'empty (3 'white) 'empty 'empty 'empty (5 'black) (5 'white) 'empty 'empty 'empty (3'black) 'empty (5 'black) 'empty 'empty 'empty 'empty (2 'white) )) (defun nth-slot (idx color) (if (eq color 'black) (nth idx *board*) (nth (- 23 idx) *board*))) (defun slot-pieces (idx color) (let ((slot (nth-slot idx color))) (if (eq slot 'empty) 0 (first slot))))
5:23:02
beach
random-jellyfish: This channel is dedicated to Common Lisp so it had better be Common Lisp.
5:29:49
beach
You need to study the rules of evaluation, and the definition of the special operator QUOTE.
5:30:48
beach
Since they are already inside a QUOTE special form, as indicated by the outermost quote, they are not in a position to be evaluated.
5:30:53
beach
You need to study the rules of evaluation, and the definition of the special operator QUOTE.
5:33:02
beach
Besides, symbols are considered names of functions only (with a few exceptions) when they are the first element of a compound expression. which is not the case here.
5:34:20
pjb
The only thing that quoting does is to read a list with two elements, the first one being CL:QUOTE.
5:35:05
pjb
(defvar *board* '((2 'black) 'empty) is read as (defvar *board* (CL:QUOTE ((2 (CL:QUOTE black)) (CL:QUOTE empty))))
5:35:31
pjb
so you see that if you evaluate this form, the variable *board* will be bound, if previously unbound, to the list ((2 (CL:QUOTE black)) (CL:QUOTE empty))
5:35:48
pjb
The second element of the first element of this list is a list of two elements: (CL:QUOTE black)
5:39:58
random-jellyfish
I understand quote changes the mode of evaluation, it switches from form mode to data mode
5:43:18
beach
random-jellyfish: As pjb said, when the READ function sees a ' character, it reads the expression that follows it, let say that expression is <expr>, then it returns (QUOTE <expr>).
5:44:58
beach
random-jellyfish: As you see, DEFVAR does not change the value of the variable if it already has one.
5:45:18
random-jellyfish
defparameter with a single quote before the first opening parenthesis? or no quotes at all?
5:47:26
beach
I suggest you get some rest then, then study the rules of evaluation in Common Lisp and then apply the new knowledge to your problem.
5:52:27
random-jellyfish
I noticed I understand better from analogies with other programming languages
6:18:12
jansc
Hi! Is there a CL library for converting a relative URL to an absolute URL, given a base URL? I'm looking for something like urljoin in python: urljoin('http://mysite.com/foo/bar/x.html', '../../images/img.png') => 'http://mysite.com/images/img.png'. Seems like purl and quri don't support this.
6:28:02
jansc
(merge-uris (parse-uri "../../images/img.png") (parse-uri "http://mysite.com/foo/bar/x.html"))
6:33:52
random-jellyfish
beach: thanks for that link earlier on form evaluation, sheds more light over my ignorance