IRC channel logs

2023-08-22.log

back to list of logs

<cow_2001>What the hell's a Java abstract class and how do you make one in GOOPS? I had never done any OOP and it all looks like gibberish to me.
<cow_2001>Trying to write macros that expand into classes like he had done here: https://craftinginterpreters.com/representing-code.html#metaprogramming-the-trees
<cow_2001>I wrote a few Python classes, but a bunch of records and functions could have done the same.
<rlb>cow_2001: not sure about the details there, but goops, clojure, clos, etc. are somewhat a different model, and much more flexible than java. I suspect you may not be able to match it very closely. Though you should be able to do similar/equivalent things, more broadly speaking.
<rlb>Additionally (no idea if it's useful) one way some people have described one of the high level differences between what java/c++/python are doing and what clos/goops/clojure are doing is "noun oriented" vs "verb oriented".
<rlb>(Not sure if it's still available/relevant, but fwiw I found Sonya Keene's "Object-Oriented Programming in Common Lisp: A Programmers Guide" useful a long time ago, though it's obviously CLOS oriented, and that was a long while back. I tend to think of goops as similar to clos, though simpler.)
<rlb>Wow, and it was written even a lot longer back still :)
<rlb>In any case, offhand, I suspect you might not want/need some abstract class related stuff in goops...
<iyzsong>abstract class have abstract methods. at compile time, 1.you can't make objects from abstract class; 2.subclass of abstract class which don't implement all its abstract methods is still abstract class. at run time, it's a normal class type, for type checking and code reuse (methods and solts).
<cow_2001>rlb: Hmm. I will look it up.
<cow_2001>Thank you.
<rlb>Hmm, also see https://lispcookbook.github.io/cl-cookbook/clos.html don't know if it's good, but again, goops and clos are in some ways similar, but not the same.
<cow_2001>Hmmmmmmm………
<rlb>(iirc. clos is a good bit more complex -- haven't used it in a long time)
<rlb>The Keene book as I recall was quite nicely compact.
<cow_2001>Symbolics™………
<sneek>dsmith: Greetings :D
<dsmith33>sneek, botsnack
<sneek>:)
<dsmith>smeek, botsnack
<dsmith>sneek, botsnack
<sneek>:)
<dsmith>!uptime
<sneek>I've been serving for one month and 10 days
<sneek>This system has been up 20 weeks, 2 days, 22 hours, 2 minutes
<mirai>is there a way to insert a DOCTYPE instruction with sxml->xml ?
<cbaines>what leads Guile to make so many readlink system calls for directories on the load path?
<haugh>mirai, I think you just have to pump a string out the port first. xml->sxml has a #:doctype-handler option for the input, but it's just dropped by default
<mirai>haugh: is it valid to do so? You're adding the DOCTYPE declaration before the <?xml …?> processing instruction
<haugh>mirai, I don't know how you're generating the DTD tag with sxml->xml.
<haugh>the XHTML DTD, rather
<haugh>Oh, are you defining your XML declaration in SXML?
<mirai>haugh: I'm not adding it yet, yes.
<mirai>was looking for a clean way to insert “<!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN" "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">” after <?xml …?>
<wingo>meep