freenode/lisp - IRC Chatlog
Search
21:30:46
Bike
is that supposed to be set intersection? because those expressions are not necessarily true
21:30:49
jasom
qapples: I considered implementing something like racket's language features using a reader macro
21:38:31
jkordani
well that doesn't really make sense. I've dabbled in racket, but why do you need people in lisp who aren't also in #racket
22:17:01
LdBeth
That was a macro system proposed for both CL and Scheme, but seems never been adopted
22:44:45
aeth
qapples: ##lisp is the channel for the Lisp family of languages and #lisp is the channel for Common Lisp
22:46:18
aeth
ober: If #lisp had the topic of ##lisp and we were in #cl or some other channel instead, then #lisp would be as dead as ##lisp is
22:52:09
aeth
(It's a coward move to make a claim and then leave before anyone can respond. So I posted my response even though I noticed the person I responded to left.)
22:54:40
housel
I've been in this channel off and on since 2003, I don't remember him ever coming here and opining about the channel topic
22:54:48
dto
any parenscript experts here? i'm a bit confused. the function APPEND is in the manual, but showing up as undefined.
22:58:45
aeth
There isn't even one definition of "Lisp". You could mean "traditional Lisp", in which case only elisp and CL count (for the living, modern Lisp languages). You could expand it a bit and include Scheme (and probably have to split this expansion in two, one excluding Racket because of its immutable conses and one including Racket). You could also be all-inclusive (e.g. Clojure, Hy, etc.). And there are probably other, messier ways that would
22:59:33
aeth
And an active channel devoted to the Lisp family would probably debate over definitions half of the time unless it had an official definition.
23:15:29
aeth
Personally, I would divide Lisps into traditional Lisps (CL is one), CL-likes (e.g. Parenscript, which calls itself "an extended subset of Common Lisp"), Schemes (e.g. Guile), Scheme-likes (e.g. Racket), and other.
23:18:49
oni-on-ion
why u so mean to parenscript, its use case is for outputting javascript, not being a CL implementation =)
23:37:52
dto
jasom: it seems to not like when i call append as assigning an initial value to a defvar .hangon
23:42:55
dto
(ps:compile-script '(defvar *oppressors* (apply #'append (mapcar #'first *oppressions*))))
23:43:27
jasom
parenscript doesn't define any functions as a requirement is that it is usable in isolation.
1:21:46
oni-on-ion
is it trivial to swap out packages? ie. if i have two implementations of something, with the same interface, could i swap them at runtime? i amassuming so, like with find-symbol etc
1:33:35
jcowan
Can anyone suggest use cases for `copy-symbol`, either with or without copying properties (value cell, function cell, p-list)?
1:35:22
oni-on-ion
see the examples there.. it would seem that testing for inequality might have some interesting cases
2:09:17
jcowan
The examples for copy-symbol show what the function does, it doesn't give any indication of why you'd use it in practice.
2:09:55
aeth
hyperspec examples are usually interesting edge cases for implementors, perhaps something you'd want to put in a test case for standards compliance.
2:10:53
jcowan
But I still wonder what the utility of the function is, especially without copying properties: it's just (make-symbol (symbol-name 'fred))
2:11:33
aeth
I'd run a big usage search over ~/quicklisp/dists/quicklisp/software if you have a large amount installed and see if it shows up
2:15:27
aeth
Sorry, it's not actually used in mcclim, it's just part of a giant list called all-ansi-symbols
2:19:11
jcowan
aeth: Thanks. In uiop is used so that you can pass a symbol rather than a string to make-symbol variants.
2:23:46
jcowan
in cells it's used in two places in the format (copy-symbol 'foo), which is just '#:foo
2:29:07
Bike
"Two apparently uninterned symbols S and C are similar if their names are similar. " i guess.
2:33:21
jcowan
3.2.4.4 says "If [two literal objects] are either both symbols or both packages, they may only be coalesced if and only if they are identical."
2:33:35
specbot
Additional Constraints on Externalizable Objects: http://www.lispworks.com/reference/HyperSpec/Body/03_bdd.htm
2:36:23
Bike
http://www.softwarepreservation.org/projects/LISP/book/LISP%201.5%20Programmers%20Manual.pdf enjoy
2:37:25
loke
If I remember correctly, they assembleds the binary from the source listings that are available on bitsavers
2:37:57
jcowan
THe link above definitely does not contain full source, though it contains snippets of the Lisp-level source
2:39:13
jcowan
http://www.softwarepreservation.org/projects/LISP/lisp15_family/#LISP_I_and_LISP_1.5_for_IBM_704,_709,_7090_ seems to be it
2:40:48
jcowan
http://recycledknowledge.blogspot.com/2011/11/john-mccarthy-inventor-of-lisp-died.html is a trivial translation of McCarthy's theorem prover from 1959 into Scheme
2:43:52
loke
asarch: most of us are too young... Remember that was back in the 50's. Also, very few people did.
2:45:35
loke
asarch: Also, you don' tneed a legacy mode for SBCL. You can implement it in very little Lisp code yourself. I beleve pjb did that and ran some Lisp 1.5 code in common lisp.
2:53:47
aeth
Nowhere near enough work preserving stuff. And I'm not sure things have gotten better in an era where things are continuously patched, either on the server or with daily updates
2:54:52
aeth
I'm sure for some things you could see what version was used in 2011-02-12 and even have the binary stored, but even keeping the source repo(s) and rolling back to that day might not get you the same build.
3:02:26
asarch
Now than I can understand Lisp, I see the code and I get disappointed. Then I get back to other languages and I get even more disappointed. Then, I get disappointed not about Lisp but about me and then I realize about its beauty. One very easy and natural way to solve problems
3:08:04
aeth
asarch: Imo, there's nothing in Lisp that can't be done in another language. What's rare is the combination in one language.
3:22:35
asarch
I think it would be great for girls, since they actually don't like to complicate things
3:28:30
loke
aeth: They don't write any lisp. They learned some, and them promptly went back to doing something else.
3:28:56
loke
However, I noticed that Roblox is a great game for creative people. Roblox Studio is pretty amazing.
6:12:58
no-defun-allowed
i want to write some kind of metaobject protocol over cl-decentralise but i'm not sure how to start
6:14:14
no-defun-allowed
i'd like to be able to use the system to define classes in itself which are also objects though
6:15:50
no-defun-allowed
my first thought is to write a "schema" or "class" class which is static and doesn't require any resolution or dependencies
6:16:21
no-defun-allowed
then i write the basic classes, "signed object", and give them instructions on how to be parsed and verified
6:16:49
no-defun-allowed
effectively i want to teach cl-d's objects how to verify and interpret themselves
6:18:54
no-defun-allowed
these are distinct from CL objects and probably will be implemented as hashtables
6:19:46
no-defun-allowed
(although, hell, if i can write translators for nf objects into CL objects, that'd be very useful)
6:21:23
eminhi
Hi, many functions which allow :test key also support :test-not. CLHS states :test-not is deprected, is there a specific reason for this?
6:21:44
no-defun-allowed
i think it's a good idea since i don't have a fixed plan or design for netfarm but it should be flexible
6:22:10
no-defun-allowed
i figure :test (complement foo) is equivalent to :test-not if you want to live by that deprecation
6:23:05
beach
eminhi: You can safely ignore the deprecation because there will not be a new standard.
6:23:05
no-defun-allowed
turns out many new languages today have R-I-N instead of REMOVE-IF which the spec writers preferred
6:24:17
eminhi
So using *-if-not functions and :test-not keyword is /in style/, rather than COMPLEMENT of :test
6:28:47
no-defun-allowed
beach: i can't disbelieve you wouldn't not consider not doing that in actual code
6:29:16
jackdaniel
conceptually remove-if-not is simpler to me (but name is unfortunate - it should be FILTER) - so it picks elements matching the predicate
6:30:27
no-defun-allowed
if you use flour or pan for gold, you might expect different things from a FILTER.
6:44:31
no-defun-allowed
i find cl has much more descriptive and verbose names for things than other languages
6:44:46
no-defun-allowed
for example, destructuring-bind does what match might do in some other languages (and d-b sounds cooler too :)
6:48:25
no-defun-allowed
sci-hub doesn't have a copy of the Art of the Meta-Object Protocol which is a bit sad
6:52:16
no-defun-allowed
i disagree but that is probably cause we're on different sides of publishing
6:53:33
no-defun-allowed
people who write books obviously should get paid but often the books are very expensive
6:53:49
beach
Possibly. I am firmly convinced that laws exist so that we can live together despite different ideas. If people only respect the laws they like, that purpose will not be possible. The right way would be to change the laws, or, in this case, the way people publish books so that they are affordable.
6:55:21
no-defun-allowed
as a student, i do appreciate that they're not "hahaha enjoy your student debt nerd" levels of expensive though, unlike some textbooks
6:56:26
no-defun-allowed
$90 and you have to use their crappy online viewer which streams PNGs to your computer and is half broken? hell yeah great value for money
6:58:19
no-defun-allowed
i digress, but i believe the only people that expensive textbooks and resources benefit are the publishers
7:18:17
aeth
White_Flame: but I don't think it went away, I think there are just tons of loopholes to do things indirectly
7:23:49
nydel
i write a function to evaluate the mathematical average of all numbers in a list added together. it's amazing how many different ways there are to do it.
7:23:49
aeth
White_Flame: actually iirc (from Wikipedia/Wikimedia licensing) it's not public money => public domain, it's US federal government employee => public domain
7:24:39
beach
nydel: Yes, and that's the difference between "grammatical phrases" and "idiomatic phrases".
7:25:03
aeth
White_Flame: https://en.wikipedia.org/wiki/Copyright_status_of_work_by_the_U.S._government
7:25:08
nydel
beach: that's the exact thought i was having but i couldn't put it together! you always do that hehe.
7:27:52
aeth
White_Flame: I'm not quite sure how this rule got applied to SBCL (probably was pre-fork, with CMUCL) to put it into the public domain.
7:28:30
White_Flame
was SBCL put into public domain because of something like that, or just because the forkers wanted it there?
7:34:30
aeth
So it looks like CMUCL/SBCL was initially funded by DARPA, and it looks like that history page was written in the 1993-1996 range when it was called ARPA for the 2nd time. https://en.wikipedia.org/wiki/DARPA
7:34:56
nydel
beach: if you've a moment, is there anything terribly wrong with this way? https://bin.disroot.org/?176144b172fe6c0b#HQajk0WF/JIlPVJBtmkvE0P7/Gc0A7U2y7YakIi7fsk=
7:35:48
no-defun-allowed
you can't guarantee you'll get away with tail recursion, even if done right
7:36:37
nydel
no-defun-allowed: thank you for checking it. oh right of course, i'm doing the defaults in the cond for some reason
7:36:59
no-defun-allowed
(loop for item in list for length from 0 summing item into sum finally (return (/ sum length)))
7:38:55
no-defun-allowed
yes, i forgot another thing: even if you can do tail recursion, it's not worth it if you're reinventing MAP, REDUCE or the like
7:38:56
nydel
wait does anything change if i set the defaults? don't i end up only instead of (null answer) in the cond instead (eq answer the-default-i-set)
7:39:36
no-defun-allowed
nothing must be changed other than removing the cond clause that sets up "defaults"
7:40:13
nydel
beach: thank you, that is much prettier and objectively better. i don't use #'reduce regularly so i was a bit confused trying to do it with mapping
7:40:26
no-defun-allowed
if you still want to use a recursive iterative process, you could use LABELS to add an internal function which doesn't expose COUNTER too
7:41:55
nydel
beach: would you count this definition among idioms that repulse? e.g. "ty" in english? ;)
7:41:56
beach
nydel: One more thing, the typical style in Common Lisp is to use the plural form of the noun to mean a list of things, so you can use NUMBERS rather than LIST-OF-NUMBERS.
7:42:37
beach
nydel: You mean your definition of AVERAGE? It is definitely a very strange way of defining it in Common Lisp.
7:44:50
nydel
i return to lisp hackerings after a year of family obligation so my readability/convention is a bit out of alignment. noted and will work on that.
7:45:10
nydel
yes i am going for strange definitions. it seems to be helping me get back into the spirit.
7:45:15
beach
nydel: As no-defun-allowed said, Common Lisp does not guarantee tail-call optimization, and the stack depth can be very limited. Recursion is fine when you have, say, a tree with a depth that is logarithmic in the number of elements.
7:45:38
beach
Then the stack can't grow very much, and there is really no other choice than recursion for trees.
7:49:24
nydel
for fun this is the one i wrote right before the recursive: https://bin.disroot.org/?f8fd4643252795ce#jcpt0Rz6orIIGMNGlpcxKlqxSROwPI78TucjdmkESac=
7:49:44
no-defun-allowed
beach: you can always pop and push your conses on a stack but that's very rarely needed
7:49:52
beach
SaganMan: Very well thank you. I think I have enough material for 2, maybe 3 ELS submissions.
7:49:54
nydel
(i know it's not named correctly but i didn't know it wasn't a function to be called by the actual one)
7:50:19
no-defun-allowed
nydel: you should use DO if you're going to just mutate, it spares a few conses
7:52:32
nydel
beach: oh that's great, was unaware of "sum" used like that. i still need to divide by the length if that way
7:53:09
beach
nydel: And you would never write it like that anyway. You would initialize ANSWER to 0 and loop over the entire list.
7:54:52
nydel
i hope this isn't a collosal waste of time for y'all, i'm learning a lot. so when i ask -- could AVERAGE be defined as a macro in an acceptable way? -- feel free to leave my curiosty unindulged
7:56:29
jackdaniel
nydel: if its arguments are known at the compilation time - why not. otherwise just define a function and declare it inline
7:56:43
no-defun-allowed
(defmacro average* (&rest foo) (#.(if (prefers-apply-p you) 'apply 'reduce) #'average foo))
7:57:13
jackdaniel
also, you may define a function and call it at read time (if arguments are known by then), like #.(my-average 1 2 3)
7:58:28
nydel
jackdaniel: these are part of a text adventure. an idler game where you expand a hideout to escape a forest. so the numbers are calculable for any given situation but does that count as "known" in the sense?
7:59:13
nydel
that is, a function determines the numbers that will go to the average function. but it doesn't memoize at initialization or anything (yet)
8:00:24
beach
SaganMan: That will depend on the program committee after they examine the paper submissions. :)
8:02:01
beach
nydel: The real thing to do is to define it as a function, because it doesn't require any strange evaluation rule. But then you can define a compiler macro on that function that checks whether the argument is a literal list and substitute the answer.
8:04:21
nydel
that's great! & now i'm thinking more like a commonlisp user. i think freenode#lisp is the friendliest most productive/encouraging irc location.