freenode/#lisp - IRC Chatlog
Search
5:54:44
janislago
but im doing this just for clarity and to give myself a readily identifiable name i suppose
5:59:54
beach
You should know that #lisp is fairly strict with staying on topic. There is #lispcafe for idle chatting.
6:00:25
janislago
was just about to mention that emacs lisp is a little weird when youre adjusted to cl
6:04:39
beach
janislago: You need to be a little bit careful with that approach. Common Lisp has several implementations that behave differently, and lots of behavior is unspecified by the standard, so you may accidentally produce non-conforming code without knowing it.
6:09:05
janislago
could you relay to them that on windows 7 and probably later versions, there is an error with attempting to access files via (load) where an error signals for "the operation completed successfully." this occurs both when running as admin and running as a normal user
6:11:06
janislago
yeah its not my first choice for programming but win7 runs incredibly well even in 2020
10:41:55
beach
Wow, that was a scary bug. In SBCL I did (make-instance 'standard-generic-function :lambda-list '(x)) and initialize-instance signaled an error that the value of the :METHOD-COMBINATION initialization argument had to be a method-combination object, but that instead it was... the STANDARD method-combination object. Restarting SBCL made the problem go away.
10:43:42
beach
The combination of bugs like this (SBCL or my code, doesn't matter much) and inadequate tools for finding the problems makes the task of development less pleasant than it could be, and certainly way more time consuming.
10:50:13
ck_
Were these types of one-off mystery bugs always around like that, or do you think these situations have become more frequent?
10:52:28
ck_
Increased project size that comes with more powerful environments and more people with access to them might be a conceivable reason
10:53:23
beach
Sure. I have no hard evidence that it is a problem with SBCL. But I couldn't guess what I could have done myself to make it happen.
10:54:16
beach
My favorite reason is to blame too complex code, due to many decades of modifications.
11:58:13
flip214
Is there a macro like DESTRUCTURING-BIND that takes an alist in instead of a plist?
12:02:51
jackdaniel
otoh alists are easier to access with functions like find (thanks to the key argument)
12:05:53
flip214
jackdaniel: not matching, just (destructuring-alist (foo bar baz) (function-returning-an-alist) ....)
12:06:29
jackdaniel
could you elaborate? (destructuring-alist (foo bar baz) '((foo bar baz)) ...) ;?
12:09:11
phoe
I understand the syntax to be like (d-a (foo bar baz) '((foo . 1) (bar . 2) (quux . 42) (foo . :one) (baz . 3)) ...)
12:17:00
flip214
well, I guess the name syntax could be extended, again in analogy to lambda parameter lists...
12:20:12
phoe
flip214: you can already get what you want with LET over ASSOC-VALUE; I guess you can write a tiny macro to abstract the syntax
12:20:43
phoe
but I don't really see the point because you will still need to provide both the variable and the alist key
12:21:11
phoe
so LET over a list of explicit ASSOC-VALUEs might still be good enough in the general case
12:23:14
flip214
phoe: but at least I don't have to write assoc, the test, etc., N times (for each binding!)
15:16:24
Kabriel
flip214: Touretzky's book gives an example macro destructuring (like I think you are talking about) on page 431.
15:19:24
Kabriel
Sometimes I use destructing in the loop macro as well, with either local variable initialization (loop with (x . y) = (first alst) ...) or stepping (loop for (x . y) in alst ...) etc.
15:54:54
jackdaniel
some people complained that it is very outdated and convinced the author to take the website down afaik
16:02:38
eta
phoe, (also wrt hexstream, he's definitely violating most of https://docs.github.com/en/free-pro-team@latest/github/site-policy/github-acceptable-use-policies if that's useful)
16:38:05
jmercouris
you could reasonably say it is a false friend because the meaning is too distorted
16:38:31
beach
_death: It is just that the meanings of words change over time after they have been imported.
16:38:34
Bike
yeah, it must be confusing with greek, since english uses a lot of words taken from greek
16:39:03
Bike
but that kind of things happen a lot. my favorite is that "marshal", an extremely high military rank, literally means "horse servant" or "horse keeper"
16:39:21
phoe
jmercouris: anaphoric macros are basically macros that define their own inner context for you to use
16:39:49
mfiano
I think in Greek it means to repeat the same thing, being a word of multiple words in succession, rather than using "it" etc
16:39:52
phoe
if we are talking about some sort of programming language, then "it" in such a context will refer to that language
16:43:14
ck_
was it yesterday or the day before that someone said, not verbatim, "[something like arrows] seems like a a source of confusion when reading other people's code" ?
16:44:09
phoe
arrow macros implicitly bind anonymous vars, whereas anaphora implicitly bind named vars
16:44:20
jmercouris
yesterday all my troubles so far away, now it looks as though they are here to stay, oh I believe, in yesterday...
16:45:42
ck_
Anyway on the topic of any sort of 'dsl' like look or arrows, I think it is all right to require consistency of usage inside a codebase, and not to try achieving some general overarching coding standard
16:48:30
ck_
jmercouris: well, you could achieve that by fixing the randomness seed. Or, if a 'true' source of randomness is used, by relaxing the requirements
16:50:26
_death
generally you want different seeds only for particular fields like games or cryptography
16:50:38
jmercouris
and Pierre was saying, they have to be reproducible so that they can be trusted by the end-user
16:51:06
phoe
as long as you can represent the complete state of your algorithm in a reproducible format, you will have reproducible results
16:51:41
jmercouris
how do the users know that we used our algorithm to produce the model we ship with Nyxt?
16:52:09
save-lisp-or-die
jmercouris If you're interested in where the English word 'anaphora' came from (that is, how it came to be an English word), you have to look to the study of Rhetorical Figures in Classical Greek and Latin poetry by classicists and other folks to study rhetoric in (mostly ancient) literary works.
16:52:36
phoe
if you control the seeds of your randomness, or if you can collect all random input passed to your algorithm, then you can win
16:56:23
easye
"Anyone who attempts to generate random numbers by deterministic means is, of course, living in a state of sin."
16:57:11
save-lisp-or-die
jmercouris: indeed - I think I meant to suggest that it is a piece of technical jargon in a small constellation of abstruse academic fields, and hence, is perhaps a little perverted from any "original" meaning it ought to have had. I agree that it is literally a little confused. Anyway, sorry to be OT.
16:59:20
easye
Knuth's chapter on random algorithms in _The Art of..._ really helped me understand the subject.
17:00:12
ck_
easye: ah right, especially his tale about the "super randomness" algorithm of his college days :)
17:02:26
easye
Yep. It was great to read Knuth talk about his own mistake. Made him even more approachable for the "tall Yoda" that he is.
17:35:20
skidd0
the lets encrypt docs mention using chgrp and chmod 0640 "to allow the server to read /etc/lectsencrpy/live/$domain/privkey.pem"
17:37:10
phoe
if it includes any kinds of environment variables then they must be first resolved and spliced in