p_l changed the topic of #lisp to: Common Lisp, the #1=(programmable . #1#) programming language | <https://irclog.tymoon.eu/freenode/%23lisp> <https://irclog.whitequark.org/lisp> <http://ccl.clozure.com/irc-logs/lisp/> | ASDF 3.3.4
yonkunas has joined #lisp
orivej has joined #lisp
dominic34 has quit [Ping timeout: 258 seconds]
orivej_ has quit [Ping timeout: 258 seconds]
nabataeus has left #lisp ["ERC (IRC client for Emacs 26.3)"]
akoana has left #lisp ["Leaving"]
Christ0pher has quit [Ping timeout: 240 seconds]
Christ0pher has joined #lisp
akoana has joined #lisp
wxie has joined #lisp
Christ0pher has quit [Quit: leaving]
Christ0pher has joined #lisp
orivej has quit [Quit: No Ping reply in 180 seconds.]
Christ0pher has quit [Ping timeout: 260 seconds]
macdavid313 has quit [Quit: macdavid313]
Christ0pher has joined #lisp
orivej has joined #lisp
jeosol has joined #lisp
oxum has joined #lisp
bsd4me has joined #lisp
wxie1 has joined #lisp
wxie has quit [Ping timeout: 260 seconds]
wxie1 is now known as wxie
EvW1 has quit [Ping timeout: 272 seconds]
orivej has quit [Ping timeout: 246 seconds]
vhost- has quit [Ping timeout: 240 seconds]
orivej has joined #lisp
bitmapper has quit [Ping timeout: 240 seconds]
orivej has quit [Ping timeout: 256 seconds]
orivej_ has joined #lisp
akoana has quit [Quit: leaving]
dominic34 has joined #lisp
oxum has quit [Remote host closed the connection]
oxum has joined #lisp
oxum has quit [Remote host closed the connection]
liamz[m] has joined #lisp
<liamz[m]> gday
wxie1 has joined #lisp
oxum has joined #lisp
wxie has quit [Ping timeout: 260 seconds]
wxie1 is now known as wxie
oxum has quit [Remote host closed the connection]
oxum has joined #lisp
stoneglass has quit [Quit: stoneglass]
FennecCode has quit [Ping timeout: 260 seconds]
FennecCode has joined #lisp
Christ0pher has quit [Ping timeout: 264 seconds]
thmprover has joined #lisp
Christ0pher has joined #lisp
orivej_ has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #lisp
Christ0pher has quit [Ping timeout: 240 seconds]
Christ0pher has joined #lisp
terpri__ has joined #lisp
MidHotaru has quit [Quit: Connection closed for inactivity]
efm has joined #lisp
terpri_ has quit [Ping timeout: 260 seconds]
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
orivej has quit [Ping timeout: 258 seconds]
orivej has joined #lisp
mikecheck has quit [Ping timeout: 264 seconds]
shifty has quit [Ping timeout: 240 seconds]
orivej has quit [Read error: Connection reset by peer]
orivej has joined #lisp
<no-defun-allowed> Hello liamz
<liamz[m]> hey how's it going?
<liamz[m]> I've just started learning lisp đź’«
orivej has quit [Quit: No Ping reply in 180 seconds.]
<no-defun-allowed> Alright thanks.
orivej has joined #lisp
kamid has joined #lisp
wxie1 has joined #lisp
wxie has quit [Ping timeout: 260 seconds]
wxie1 is now known as wxie
<liamz[m]> can someone explain where +
jesse1010 has quit [Ping timeout: 260 seconds]
<liamz[m]> is implemented?
<no-defun-allowed> The variable or function?
orivej has quit [Quit: No Ping reply in 210 seconds.]
gaqwas has quit [Read error: Connection reset by peer]
<no-defun-allowed> Or method combination, even.
gaqwas has joined #lisp
gaqwas has quit [Changing host]
gaqwas has joined #lisp
<liamz[m]> oh, wild
<liamz[m]> I didn't know `READ` was a thing
orivej has joined #lisp
Necktwi has joined #lisp
<liamz[m]> I was wondering why `#` had so many forms, eg. `#'`, `#(1 2 3)` etc
<no-defun-allowed> clhs 2.4.8
<no-defun-allowed> # is a "dispatching macro character", so # doesn't have those forms per se; it reads an optional number and then some other character, and dispatches to another function to read the form.
<no-defun-allowed> # is a "dispatching macro character", so # doesn't have those forms per se; it reads an optional number and then some other character, and dispatches to another function to read the form.
<no-defun-allowed> Connection dropped out, sorry.
<liamz[m]> haha no worries
<liamz[m]> thanks
<liamz[m]> Ahh
<liamz[m]> so I'm playing around with `read`
orivej has quit [Quit: No Ping reply in 180 seconds.]
space_otter has joined #lisp
<liamz[m]> trying to understand what `#'` expands to
<liamz[m]> I'm seeing that we have a reader, which deals with macros, and `#'` is a macro
orivej has joined #lisp
<liamz[m]> reader is the basis of the repo, which is cool
<no-defun-allowed> Reader macros, which are distinct from "macros".
<White_Flame> liamz[m]: https://pastebin.com/pYaghqj5
<White_Flame> (also, what's with all these non-IRC bridges? it messes with features, handles, etc etc)
<liamz[m]> yah sorry White_Flame, I'm using Riot with a Matrix bridge, to me, your handle looks "native"
<White_Flame> right, and here on IRC, edits, nicks, etc don't look very native and/or are different on matrix
Oladon has joined #lisp
<White_Flame> it's just happening more and more often
<no-defun-allowed> White_Flame: As mentioned a few days ago (before cussing out and going for a tea break), the Matrix bridge rewrites IRC names to phony Matrix user IDs, but not Matrix IDs to IRC names.
<White_Flame> well yeah
wxie has quit [Ping timeout: 264 seconds]
efm has quit [Ping timeout: 246 seconds]
wxie has joined #lisp
libertyprime has joined #lisp
orivej has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #lisp
efm has joined #lisp
arbv has quit [Ping timeout: 265 seconds]
<liamz[m]> is "ACTION sent a long message" what yall see?
<White_Flame> which is standard fare for these bridges
* aeth tests
<aeth> Do you see that as "ACTION tests"?
<White_Flame> no, "aeth tests"
<liamz[m]> ahh.
<aeth> I mean, on Matrix
<liamz[m]> yeah I do, Riot Desktop
arbv has joined #lisp
<White_Flame> but anyway, troubleshooting irc bridges really isn't on topic here
<White_Flame> although whether we want them is a separate issue
Bike has quit [Quit: leaving]
<liamz[m]> yeah fair
<White_Flame> liamz[m]: btw, to answer your original question:
<White_Flame> ' reads the next thing and generates (QUOTE <thing>)
<White_Flame> while #' reads the next thing and generates (FUNCTION <thing>)
<liamz[m]> I find it surprising that Lisp has an objects system
<liamz[m]> I read the original paper to get a sense for the design, is there something similar that goes into the "stdlib"
<White_Flame> and you can define or redefine whatever you want in the reader, but it is basically just a single-character dispatch wtih some other fiddly bits; it's not a lexer/parser where you can dispatch on words easily
<White_Flame> unless you do so manually
<White_Flame> CLtL2 (though pre-spec and a bit outdated) runs through the stuff that woudl be standardized in a more approachable way
<White_Flame> the CLHS is pure reference
<White_Flame> Practical Common Lisp is an oft-recommended introduction to the language
<liamz[m]> Whaaaaaat.
<White_Flame> ?
<liamz[m]> CLOS method dispatch is insane.
<no-defun-allowed> clhs 7.6.6
<White_Flame> it's certainly easier to use in many regards
<specbot> Method Selection and Combination: http://www.lispworks.com/reference/HyperSpec/Body/07_ff.htm
<liamz[m]> I was mostly inspired to learn lisp from Paul Graham's articles
<no-defun-allowed> Very sane and standardised.
dominic34 has quit [Ping timeout: 260 seconds]
<White_Flame> in fact, I often use methods without ever using a defclass, to deal with structs and native type dispatch
<White_Flame> (well, native class dispatch to be more precise)
<liamz[m]> That's cool.
<liamz[m]> So `defmethod` expands to something which calls out to the dynamic dispatch logic?
<liamz[m]> If code/data are the same, is it possible to print the "source" of a method like `defmethod`, to inspect how it works?
<White_Flame> specifically, source code & data are the same. In most instances the actual function object is compiled native code, and the instance might have debugging helpers that keep the original source dragged in for reference
<no-defun-allowed> defmethod will add a method object to the generic function. Calling the generic function will compute the applicable method list, and then call those as it sees fit, or something to that effect.
<White_Flame> and a Sufficiently Advanced Compiler™ can basically do whatever it wants to accomplish that
<no-defun-allowed> And in my opinion, kludging around with single dispatch and no method combination, and calling the result a "design pattern" is more insane.
orivej has quit [Quit: No Ping reply in 180 seconds.]
ebrasca has quit [Remote host closed the connection]
orivej has joined #lisp
<liamz[m]> XD
<liamz[m]> does it call all matched methods or just one?
<no-defun-allowed> Depends on the method combination.
<no-defun-allowed> clhs 7.6.6.2 describes the standard method combination.
<liamz[m]> how did you get into learning lisp *no-defun-allowed*
<no-defun-allowed> liamz: Cause I was annoyed with Python, and couldn't find anything else I could bear programming in.
<aeth> I loved Python until I tried to do FP in it.
shangul has joined #lisp
<no-defun-allowed> And/or because of Emacs (check my Matrix ID)
wxie1 has joined #lisp
wxie has quit [Ping timeout: 260 seconds]
wxie1 is now known as wxie
orivej has quit [Quit: No Ping reply in 180 seconds.]
shifty has joined #lisp
nicktick has quit [Ping timeout: 240 seconds]
orivej has joined #lisp
wxie has quit [Ping timeout: 240 seconds]
shifty has quit [Ping timeout: 246 seconds]
macdavid313 has joined #lisp
Christ0pher has quit [Ping timeout: 240 seconds]
bhartrihari has left #lisp ["Disconnected: Replaced by new connection"]
bhartrihari has joined #lisp
<beach> Good morning everyone!
Christ0pher has joined #lisp
Oladon has quit [Quit: Leaving.]
gxt__ has joined #lisp
paul0 has quit [Remote host closed the connection]
paul0 has joined #lisp
gxt_ has quit [Ping timeout: 240 seconds]
orivej has quit [Ping timeout: 265 seconds]
orivej_ has joined #lisp
paul0 has quit [Remote host closed the connection]
paul0 has joined #lisp
<liamz[m]> Morninggg
<liamz[m]> Heh yeah, doesn’t emacs have its own deffun for user space plugins?
<beach> liamz[m]: Emacs Lisp is a different Lisp dialect. It is similar to Common Lisp, but not the same.
<beach> RMS wrote GNU Emacs by writing a small Lisp system in C and then writing much of Emacs in that Lisp dialect.
thmprover has quit [Quit: ...and miles to go before I sleep.]
notzmv has quit [Ping timeout: 256 seconds]
notzmv has joined #lisp
orivej_ has quit [Ping timeout: 256 seconds]
orivej has joined #lisp
<beach> liamz[m]: Does that answer your question?
shangul has quit [Ping timeout: 264 seconds]
terpri_ has joined #lisp
orivej has quit [Ping timeout: 264 seconds]
orivej has joined #lisp
<liamz[m]> yeah sure does!
<liamz[m]> haha sorry, making that special bean juice.
terpri__ has quit [Ping timeout: 260 seconds]
Christ0pher has quit [Ping timeout: 265 seconds]
Christ0pher has joined #lisp
shifty has joined #lisp
gravicappa has joined #lisp
oxum has quit [Remote host closed the connection]
Oladon has joined #lisp
OpenZen has quit [Ping timeout: 265 seconds]
_paul0 has joined #lisp
Christ0pher has quit [Ping timeout: 265 seconds]
Christ0pher has joined #lisp
bhartrihari has left #lisp ["Disconnected: Replaced by new connection"]
bhartrihari has joined #lisp
orivej has quit [Ping timeout: 256 seconds]
orivej has joined #lisp
remexre has quit [Quit: WeeChat 2.8]
remexre has joined #lisp
paul0 has quit [Ping timeout: 272 seconds]
bsd4me has quit [Quit: Leaving]
bhartrihari has left #lisp ["Disconnected: Replaced by new connection"]
bhartrihari has joined #lisp
Christ0pher has quit [Ping timeout: 256 seconds]
Christ0pher has joined #lisp
bhartrihari has left #lisp ["Disconnected: Replaced by new connection"]
bhartrihari has joined #lisp
narimiran has joined #lisp
Christ0pher has quit [Ping timeout: 246 seconds]
Christ0pher has joined #lisp
rgherdt has joined #lisp
scymtym has quit [Ping timeout: 240 seconds]
nicktick has joined #lisp
bhartrihari has left #lisp ["Disconnected: Replaced by new connection"]
oxum has joined #lisp
orivej has quit [Ping timeout: 240 seconds]
rgherdt has quit [Remote host closed the connection]
dominic34 has joined #lisp
bhartrihari has joined #lisp
sdumi has quit [Ping timeout: 240 seconds]
sdumi has joined #lisp
rgherdt has joined #lisp
bhartrihari has left #lisp ["Disconnected: Replaced by new connection"]
bhartrihari has joined #lisp
vidak` has joined #lisp
bocaneri has joined #lisp
simendsjo has joined #lisp
dominic34 has quit [Remote host closed the connection]
dominic35 has joined #lisp
narimiran has quit [Ping timeout: 240 seconds]
JohnMS_WORK has joined #lisp
narimiran has joined #lisp
sdumi has quit [Read error: Connection reset by peer]
sdumi has joined #lisp
Oladon has quit [Quit: Leaving.]
Christ0pher has quit [Ping timeout: 246 seconds]
dominic35 has quit [Ping timeout: 265 seconds]
Christ0pher has joined #lisp
bhartrihari has left #lisp ["Disconnected: Replaced by new connection"]
bhartrihari has joined #lisp
Oladon has joined #lisp
simendsjo has quit [Remote host closed the connection]
vhost- has joined #lisp
pve has joined #lisp
JohnMS_WORK has quit [Read error: Connection reset by peer]
yonkunas has quit [Quit: Connection closed for inactivity]
JohnMS_WORK has joined #lisp
wxie has joined #lisp
MidHotaru has joined #lisp
bhartrihari has left #lisp ["Disconnected: Replaced by new connection"]
bhartrihari has joined #lisp
jonatack has joined #lisp
scymtym has joined #lisp
vidak` has quit [Ping timeout: 256 seconds]
jprajzne has quit [Quit: jprajzne]
Bourne has quit [Remote host closed the connection]
Codaraxis__ has joined #lisp
Oladon has quit [Quit: Leaving.]
bhartrihari has left #lisp ["Disconnected: closed"]
Codaraxis_ has quit [Ping timeout: 256 seconds]
red-dot has joined #lisp
Cymew has joined #lisp
knuckles has joined #lisp
Oladon has joined #lisp
simendsjo has joined #lisp
gaqwas has quit [Remote host closed the connection]
jasom has quit [Ping timeout: 272 seconds]
karlosz has quit [Quit: karlosz]
Codaraxis_ has joined #lisp
Codaraxis__ has quit [Ping timeout: 258 seconds]
wxie has quit [Ping timeout: 240 seconds]
jasom has joined #lisp
shka_ has joined #lisp
oxum has quit [Remote host closed the connection]
oxum has joined #lisp
troydm has quit [Ping timeout: 258 seconds]
kinope has joined #lisp
oxum has quit [Ping timeout: 256 seconds]
ljavorsk has joined #lisp
Bourne has joined #lisp
<kinope> Hey!
jasom has quit [Ping timeout: 264 seconds]
<kinope> I've looked around but I can't find a solution for a problem I'm having while trying to define specialised methods on a generic function across multiple packages.
<kinope> There is a function in the first package that needs to call the right method, but it is as if it can't see the methods that have been defined in the second package.
<kinope> The second package is loaded after the first
<beach> kinope: Packages are not loaded. Do you mean ASDF systems? A package is a mapping from names to symbols. Perhaps you are not in the same package when you define the generic function and when you define the method?
<splittist> But you are referring to the symbol naming the generic function from the first package? That is, defmethod first-package:function ((thing thing) x y z) ...
<kinope> s/package/fileg
<beach> kinope: You need to verify the package that the code is read in.
<beach> kinope: Do your files start with (in-package ...)?
<beach> [they should]
<kinope> yes they do
<beach> And is it the same package for the file in which the generic function is defined and for the file in which the method is defined?
<beach> If not, you have two different symbols package1:name and package2:name.
<kinope> I tried (defmethod package1:method ...) from the second file but maybe I'm missing something
<beach> That should work, provided that package1 is the one in use when the DEFGENERIC form is read.
<beach> Er, wait, what is :METHOD?
<beach> It should be PACKAGE1:NAME-OF-GENERIC-FUNCTION.
Oladon has quit [Quit: Leaving.]
<kinope> yes should have written name-of-generic-function there. I'm going to try something, brb
oxum has joined #lisp
<beach> And you didn't answer my question about whether the package name after (in-package is the same in both cases.
madage has quit [Ping timeout: 240 seconds]
<kinope> no it is not
<beach> Yes, then you need the package prefix for one of them.
FennecCode has quit [Ping timeout: 240 seconds]
RedMallet has joined #lisp
oxum has quit [Ping timeout: 246 seconds]
<kinope> okay thanks, at least I know I'm on the right track now. I'll just keep paring things down till I find where I messed up.
<beach> Sure.
<beach> You can also try (apropos "name-of-generic-function") and you will see whether you have 2 symbols with that name.
<beach> And if they are both FBOUND, you can inspect them.
<beach> Then you can see how many methods each generic function has.
<splittist> Another case where automatic creation of a generic function with a defmethod may have bitten
<beach> I totally agree. It is too bad that they removed the warning in SBCL.
bocaneri has quit [Ping timeout: 256 seconds]
<kinope> beach: I'll look into that
<beach> It is also interesting how the attitude towards things like that has changed over time.
<beach> In "... the CLOS perspective", they state that DEFMETHOD is the primary way of defining generic functions.
<beach> And it used to be the case that SETQ silently defined an undefined variable.
<beach> We now thin, those automatic mechanisms are a bad idea.
<kinope> I believe I explicitly (defgeneric name (...)) in package one so perhaps that case doesn't apply to me.
<beach> Correct.
<beach> That was a general remark.
<kinope> ah okay
<beach> But it may apply to you in that, if you forgot the package prefix when you defined the method, a new generic function was silently created.
<Theseus> web
<kinope> I see
* kinope slime-restarts-inferior-lisp
<Theseus> bugger, thought I was searching...
toorevitimirp has joined #lisp
bocaneri has joined #lisp
karayan has joined #lisp
gekkou has quit [Ping timeout: 265 seconds]
oxum has joined #lisp
holycow has joined #lisp
space_otter has quit [Remote host closed the connection]
simendsjo has quit [Remote host closed the connection]
<kinope> Upon inspecting the generic function I can confirm that the methods are all there and functioning as they should as I can call them from either package, and they work as intended. Thanks for helping me rule that out. I believe I've found the problem. The function that resides in the first package calls the incorrect method because I am supplying it
<kinope> with an unintended value therefore there is no method that can handle it, so it returns nil.
<no-defun-allowed> Wouldn't you have a method specialised on T for it to return?
holycow has quit [Quit: Lost terminal]
<beach> Great! Now you know a few more tools next time you get in trouble.
msk has joined #lisp
<beach> Right, if there is no method that can "handle" the value, you would get an error.
<beach> I.e., you supply argument for which there is no applicable method.
<kinope> hmm, if so, i wonder why there was no error too. Something else for me to ponder
<beach> Inspect the methods of the generic function.
<beach> You should get a list of specializers for each method.
<beach> A specializer of T means that it accepts any value.
karayan has quit [Ping timeout: 240 seconds]
karayan has joined #lisp
dddddd has quit [Ping timeout: 258 seconds]
karayan has quit [Ping timeout: 240 seconds]
karayan has joined #lisp
Bourne has quit [Ping timeout: 265 seconds]
<kinope> will (call-next-method) return nil if there is no next method to call?
<kinope> spec (call-next-method)
<kinope> spec call-next-method
<beach> No it does not.
<beach> It signals a no-next-method error.
<beach> Did you inspect the methods?
<beach> Just type #'name-of-function at the SIME REPL and inspect the result by right clicking on the value.
<beach> ... and selecting "inspect".
<kinope> Yes there is no method that specialises on 'just' T. There is a method at the top that specialises on (class class T) though and I was providing it with a symbol for the second argument. But that method always returns a value that is non-nil
bocaneri has quit [Ping timeout: 256 seconds]
<beach> How many methods do you have? Can you list the specializers for each one?
<beach> And what arguments did you pass?
karayan has quit [Ping timeout: 240 seconds]
<beach> If you passed a symbol (other than NIL) as the second argument, only methods specialized to SYMBOL are applicable.
karayan has joined #lisp
jesse1010 has joined #lisp
sdumi has quit [Ping timeout: 240 seconds]
<kinope> there are twelve methods, it may take me a little while to compile that info. There are really only two types of specialisations one is a method that takes two class objects and a symbol (std-class std-class symbol) and the other takes two class objects and and a eql specialised symbol, hope I'm making sense. If I call the method with the expected
<kinope> arguments then it works. but I believe currently that the calling function that supplies the arguments is supplying a symbol as the second argument (class symbol symbol)
bocaneri has joined #lisp
<kinope> When I use the inspector the methods are showing up as (class class T) or (class class (eql symbol))
nikkal has joined #lisp
simendsjo has joined #lisp
random-nick has joined #lisp
<beach> It is hard to understand what you mean, because when you say (class class T), does it mean that `class' is the NAME of a class, or that it is the class named CLASS? Same thing with std-class.
<beach> And when you say "class object" do you mean "instance of a class" or a "class metaobject"?
sdumi has joined #lisp
<beach> I think you had better paste the result of your inspection and the arguments you are giving.
<beach> The information you give is just not precise enough.
<beach> At least for me.
<kinope> Okay I thought it would be confusing if I put the real classes in. I am referring to an instance of a class. I don't know what a class metaobject is but I don't think it's that. The argument is a value returned by make-instance
<kinope> I'll put some information together and hopefully it'll be a little clearer
troydm has joined #lisp
varjag has joined #lisp
toorevitimirp has quit [Ping timeout: 246 seconds]
<beach> kinope: I am off for my lunch break. Either others can help you, or you need to wait until I come back.
<kinope> Sure. I appreciate all the help you've given me, thanks.
sdumi has quit [Ping timeout: 264 seconds]
sdumi has joined #lisp
orivej has joined #lisp
Lord_of_Life_ has joined #lisp
Lord_of_Life has quit [Ping timeout: 246 seconds]
Lord_of_Life_ is now known as Lord_of_Life
<kinope> beach: If you don't mind having a look when you get back https://pastebin.com/raw/b4z11wMM
Frobozz has joined #lisp
<kinope> G1, P3, C2 are classes that represent a particular state. (G)randparent (P)arent (C)hild. The states are 'nested', just as classes 'nest' by inheriting from the parent class.
<kinope> The methods on the generic function 'event-handler' behaves differently depending on the state that is passed along with the state machine and event that is being dispatched to the machine.
libertyprime has quit [Quit: leaving]
<kinope> events propagate up the state hierarchy by calling (call-next-method) when they aren't handled in the current state.
<kinope> It all works well when everything is in the same package, I'm just having difficulties when splitting it up into separate parts.
drdee has joined #lisp
orivej has quit [Ping timeout: 246 seconds]
orivej has joined #lisp
gaqwas has joined #lisp
gaqwas has quit [Changing host]
gaqwas has joined #lisp
<kinope> I was wrong about a symbol being supplied to the generic function, I have verified that the state argument being passed is indeed an instance of the class as intended. Great, back to square one.
Bourne has joined #lisp
dale has quit [Quit: My computer has gone to sleep]
dmiles has quit [Ping timeout: 260 seconds]
logicmoo has joined #lisp
frgo has quit [Remote host closed the connection]
frgo has joined #lisp
orivej has quit [Ping timeout: 260 seconds]
orivej has joined #lisp
<kinope> Here are the files:
<kinope> I am at a loss.
SpaceIgor2075 has joined #lisp
<SpaceIgor2075> Hi, I'm a newbie. What does p at the end of some functions mean, and why is it sometimes preceded by a -?
<phoe> "predicate"
<phoe> numberp == "is this object a number?"
<phoe> if a single word precedes it, the - is skipped
<phoe> so, numberp, but complex-number-p
nikkal has quit [Ping timeout: 265 seconds]
troydm has quit [Ping timeout: 260 seconds]
paul0 has joined #lisp
SpaceIgor2075 has quit [Remote host closed the connection]
SpaceIgor2075 has joined #lisp
cosimone has joined #lisp
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
_paul0 has quit [Ping timeout: 260 seconds]
orivej has quit [Ping timeout: 256 seconds]
orivej has joined #lisp
bendersteed has joined #lisp
scymtym has quit [Read error: Connection reset by peer]
ljavorsk has quit [Ping timeout: 265 seconds]
orivej has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #lisp
bocaneri has quit [Ping timeout: 260 seconds]
oxum has quit [Remote host closed the connection]
oxum has joined #lisp
orivej has quit [Ping timeout: 264 seconds]
oxum has quit [Ping timeout: 246 seconds]
orivej_ has joined #lisp
bocaneri has joined #lisp
Christ0pher has quit [Ping timeout: 240 seconds]
Christ0pher has joined #lisp
<beach> kinope: Would you like to tell me what you tried, what you expected to happen, and what happened instead?
<beach> All I see are static files.
<beach> kinope: You really should use earmuffs on special variables.
<beach> kinope: And you should have 3 semicolons for top-level comments.
orivej_ has quit [Ping timeout: 246 seconds]
<beach> clhs 2.4.4.2
<specbot> Notes about Style for Semicolon: http://www.lispworks.com/reference/HyperSpec/Body/02_ddb.htm
orivej has joined #lisp
<beach> kinope: What is the package CLOSER-COMMON-LISP.
<beach> ?
<no-defun-allowed> My guess, without checking, is that it's a package that uses both CLOSER-MOP and CL.
<beach> Ah, that might be.
userone has joined #lisp
red-dot has joined #lisp
vaporatorius has quit [Read error: Connection reset by peer]
Bike has joined #lisp
<kinope> I couldn't import the class-precedence-list so I just used closer-common-lisp
vaporatorius has joined #lisp
<no-defun-allowed> And it is so, after loading closer-mop and looking at the package definition.
kaftejiman has joined #lisp
<beach> Thanks.
<no-defun-allowed> c2mop:class-precedence-list would also work, but I guess you can't do much harm using a package that imports from CL and CLOSER-MOP, as the symbols of those packages aren't changing any time soon.
<beach> kinope: You also shouldn't use ::. You should export the symbols you want to be able to use from other packages.
<kinope> about the earmuffs, I want to eventually refer to state classes by <state> but I left them out duting testing
<kinope> during*
<beach> You mean surrounding the state classes with < and >?
<kinope> yes
<beach> That would be very unconventional, just like leaving out the earmuffs.
<beach> You would be speaking Common Lisp with a Dylan accent.
<jackdaniel> some libraries do that though, so we could say that dylanism is a regional language of common lisp ,)
<no-defun-allowed> Yeah, it is very Dylan-esque (or some Scheme-with-object-system-esque, eg Swindle-esque) to wrap class names in <>, as they exist in a separate namespace, and so identifying class names is fairly straightforward.
<kinope> I didn't realise
<no-defun-allowed> (But Dylan is some Scheme-with-object-system-and-Pascal-syntax to some extent. :)
<beach> kinope: Here is the thing: You can use whatever style you want as long as you keep the code to yourself. But then, when you get in trouble, like now, you need to expose the code to others. So it is important to make life easier for the people trying to help you. Then you need to follow conventions.
<kinope> alright I can fix it up real quick if you like
<beach> kinope: So again, what did you try, what happened, and what did you expect to happen?
<kinope> What I expect to happen is: when I create a fresh instance of the machine class. I call transition to make a state transition to state g1...cont
<kinope> the transition function should dispatch entry and initial events to the state, so that the machine ends up in the default state configuration of g1>p1>c1
<kinope> currently it stops after transitioning to state g1
orivej has quit [Ping timeout: 246 seconds]
<kinope> I have verified that the arguments are what they should be, but when the event-handler is called nothing happens
<kinope> in contrast to a similar implementation were everything is in the same package
orivej has joined #lisp
<kinope> My initial assumption was that there was an issue with defining methods in different packages
kaftejiman has quit [Remote host closed the connection]
oxum has joined #lisp
<beach> How do you call TRANSITION?
<kinope> dont mind the output, just debug print statements
vaporatorius has quit [Read error: Connection reset by peer]
vaporatorius has joined #lisp
vaporatorius has quit [Changing host]
vaporatorius has joined #lisp
oxum has quit [Remote host closed the connection]
oxum has joined #lisp
<kinope> the first two lines are the machine and state instances right before calling event-handler on line 62 and 66
<kinope> of hsm.lisp
<beach> Well, this is getting a bit complicated. Your initial question seemed to suggest that you called a generic function with some arguments that made it return NIL, but it should have signaled an error.
<beach> Now, I find myself involved in debugging your entire application.
<kinope> Yeah sorry I tried to keep it simple at first
<kinope> If its too much to ask, I totally understand
<beach> Not only debugging your application, but also having to understand your terminology, since I am not familiar with the kind of state machine you are trying to create. For example, I don't know the notation g1>p1>c1.
<shka_> my protip here is to not use-package
<beach> shka_: Where is use-package used?
<shka_> (defpackage #:com.handsomebyte.hsm
<shka_> (:use #:closer-common-lisp))
dvdmuckle has quit [Quit: Bouncer Surgery]
<beach> shka_: It would have been normal to :use #:common-lisp, but kinope did not seem to want to put the package prefix for closer-mop.
<beach> And I don't believe that is the problem here.
<kinope> beach: sure, it's a lot to grasp. I certainly don't help things with my explanations, haha
<shka_> beach: right
dvdmuckle has joined #lisp
<shka_> kinope: is this a truly a state machine?
<kinope> I can't say using closer-common-lisp was intentional it just worked
<kinope> it is a implementation of a hierarchical state machine event processor
<kinope> its not a typical finit state machine
<shka_> ok, because transition looks like some kind of search
<beach> kinope: It looks to me like find-entry-set and find-exit-set differ only in the final nreverse call, yes?
jurov has quit [Changing host]
jurov has joined #lisp
<kinope> it uses state 'nesting' to cut down on the amount of redundant code that would otherwise need to be written into the behavior of each state that needed that functionality
<kinope> yes that is true beach
<beach> kinope: And the first 4 lines of each seems to do exactly what MEMBER does, yes?
<beach> Or, rather (CDR (MEMBER...))
<shka_> kinope: i have a question
<_death> also, you may want to check out statecharts
<shka_> ok, never mind
<kinope> exit-set and entry-set clean up the class-precedence list by discarding the classes up to and including the top state
<kinope> yes shka_
<shka_> kinope: my question is not relevant anymore
<beach> kinope: But isn't one equal to (CDR (MEMBER ...)) and the other to (REVERSE (CDR (MEMBER...)))?
<kinope> the transition function encodes some of thesemantics of the UML state machine specification
<kinope> I need to read about member real quick, I thought it only returned one value not a list
<beach> It returns the tail of the list starting with the element being asked for.
<shka_> kinope: it returns sublist starting with FIRST holding a searched elements
<Xach> this makes it simple to search for NIL
vaporatorius has quit [Read error: Connection reset by peer]
<kinope> I see, then yes beach
vaporatorius has joined #lisp
vaporatorius has quit [Changing host]
vaporatorius has joined #lisp
<kinope> I guess I can simplify that then
<shka_> well, i can't understand anything today, i have no idea what transition really does
<beach> kinope: The other thing that makes it nearly impossible for me to follow the code is that one seems to have to know the domain since you are using names like lca and cpl. To me they are just random strings.
lucasb has joined #lisp
<kinope> lca lowest common ancestor, cpl class precedence list. hold on a sec, I have some comments around here somewhere that should help...
<beach> I think I need to let you try some more yourself or let some other people have a look, or I won't get anything done today myself.
<kinope> No worries, thanks beach
<kinope> thanks all
<beach> Again, I thought I was debugging a case where NIL was incorrectly returned.
<shka_> kinope: ok, so what is entry-set and exit-set?
<shka_> you are trying to find a way to go from entry to exit?
Christ0pher has quit [Ping timeout: 260 seconds]
Christ0pher has joined #lisp
<kinope> exit-set is the set of states that need to have exit actions called on them as they are being left while transitioning to another state, the same applies for entry-set but for entry actions on entry to each state up to the target state.
<kinope> the algorithm works. Just not when I move some parts of the code to another package
<shka_> what parts of the code and what happens then?
<shka_> did you TRACE those functions?
<kinope> I move some state class definitions and some methods pertaining to a test state machine out of the base package
<kinope> so I create some methods that specialise on event and state to provide different functionality but when the transition function goes to call those methods, it just does nothing
<kinope> sorry when event-handler inside transition function goes to call those methods*
<shka_> kinope: so you put a (break) into those and nothing happens?
dddddd has joined #lisp
<shka_> (self hsm::machine)
<shka_> SELF is not the best argument name in cl
<kinope> I put a break in, just looking at the results now
<shka_> kinope: i am at lost in the actions macro
<shka_> are initial and exit global variables, dynamic variables or what?
<kinope> it's just augments a case macro to add boilerplate that stops entry exit and initial events from propagating up the state hierarchy as they are only usefull for the current state
wsinatra has joined #lisp
wsinatra has quit [Client Quit]
<kinope> everything else falls through to the next state up
wsinatra has joined #lisp
<kinope> just symbols not variables
<kinope> or rather keys for the case clauses
wsinatra is now known as Guest15951
<kinope> how does one step through the debugger I've not done it before
Guest15951 has quit [Client Quit]
<shka_> S eky
<shka_> *key
<shka_> regardless
<shka_> it expands into something like this
<shka_> (CASE EVENT ((ENTRY INITIAL EXIT) 'EVENT-IGNORED) (T (CALL-NEXT-METHOD)))
<shka_> so i have no idea where ENTRY function is defined
wsinatra_ has joined #lisp
<shka_> oh wait
bendersteed has quit [Ping timeout: 256 seconds]
<shka_> i am an idiot
<shka_> sorry
<kinope> entry is not a function it is an event a symbol passed to the state through a method of the event-handler
<shka_> :-)
<kinope> haha, oaky
<kinope> okay*
<shka_> ok, so you are not expecting to enter (entry initial exit) case?
<shka_> in your example
<shka_> that is
<shka_> kinope: i have no idea what is your problem but i think i may have a good debugging tip
<kinope> yes for most states.
<shka_> so that's actions macro is a liability
userone has quit [Quit: Leaving]
<shka_> i would recommend doing the following
<shka_> ((entry initial exit) 'event-ignored) replace with ((entry initial exit) (return-event-ignored value))
<shka_> where return-event-ignored is a function
<shka_> this way you will be able to trace this case
<_death> (i) use the function I gave (ii) learn about keywords
<shka_> ok, right!
<shka_> _death: you are a brilliant man
<kinope> keywords you say?
<kinope> okay ill take a look
Harag has joined #lisp
karayan has quit [Ping timeout: 256 seconds]
karayan has joined #lisp
<kinope> there seem to be a few suspect symbols
<Harag> I am going through a stage where I am trying two write more lispy code... one of my bad habbits is usingin dolist for all may list processing instead of using the various map functions already in lisp, just because I never invested the time to understand them
<shka_> Harag: i mean, dolist is fine?
whiteline has quit [Quit: Leaving]
<Harag> but now I have a questions is calling a map function within the map function a normal pattern or am I missing some magic
<shka_> Harag: it is not technically wrong, but it is a code smell indicator
<Harag> shka_: yeah if you are not building result lists using variables in let or global surrounding the dolist
<shka_> yes
<shka_> anyway, maybe you can show example of what you were discussing?
shifty has quit [Ping timeout: 260 seconds]
<Harag> k
<Harag> gonna take a moment
bitmapper has joined #lisp
grewal has quit [Quit: leaving]
<shka_> take a look at the 15 and 16 page
msk has quit [Remote host closed the connection]
whiteline has joined #lisp
dddddd_ has joined #lisp
<shka_> i think this demonstrates your worries somewhat
madage has joined #lisp
msk has joined #lisp
dddddd__ has joined #lisp
dddddd has quit [Ping timeout: 260 seconds]
dddddd__ is now known as dddddd
<beach> Harag: I use LOOP most of the time. It is able to solve most of the use cases.
bendersteed has joined #lisp
dddddd_ has quit [Ping timeout: 246 seconds]
<beach> Harag: Mapping functions tend to get complicated whenever you need to create a custom anonymous function using LAMBDA. Plus, you often need a separate LET or LET* to introduce lexical variables, and you often need REVERSE or NREVERSE at the end. With LOOP, you can handle those situations with WITH and COLLECT.
dddddd has quit [Ping timeout: 256 seconds]
dddddd has joined #lisp
<Harag> beach: I have a natural aversion to LOOP... I it nearly as much as I hate peas and regx
<Harag> +hate
* _death feels a Riesback coming on
<Harag> beach: and my hate for loop comes from battling to use break's to see what it is doing or not doing for me ... the latter mostly
<beach> It is very sad that you have decided to reject such a good tool. Your code is going to suffer in readability.
yonkunas has joined #lisp
<Harag> shka_: will have a look at the that lisp style, thing thanx. I am actually working through On Lisp again, it was the first lisp book I got my hands on 10 years ago and having not even gotten through the first chapter I started feeling a bit ashamed of my code, there is so much of the basic stuff in common lisp I never bothered learning... which means I have been dragging some very bad habits from my non functional days along for all
<Harag> these years
<phoe> Harag: using BREAK inside LOOP? what do you mean?
<Harag> phoe: primitive debug
<shka_> Harag: that style guide is an absolute classic, every programmer should read it
userone has joined #lisp
<shka_> not even lisp programmer
<shka_> every programmer
<beach> Harag: You are going to hate SICL.
<Harag> beach: I have been meaning to google SICL the last week or so because I ran into references to it all over the places I have been digging on the net lately but have not gotten around to it
<beach> git grep "(loop" | wc -l gives 4264
msk has quit [Remote host closed the connection]
JohnMS_WORK has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
msk has joined #lisp
orivej has quit [Ping timeout: 265 seconds]
orivej has joined #lisp
rgherdt has quit [Quit: Leaving]
<travv0> loop is easily one of my favorite parts of CL
<kinope> _death: I could kiss you!
<kinope> _death: I'm not 100% on how or why it works but it does!
<kinope> keywords to the rescue
rgherdt has joined #lisp
orivej has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #lisp
<Harag> beach: sbcl is not much better grepping loop gives 2846
knuckles has quit [Quit: WeeChat 2.8]
<beach> But SBCL is complete. Not so with SICL. :)
<_death> kinope: in Lisp, if something is named by a symbol, it is often important to use the same symbol to reference it.. symbols are full-fledged objects with names.. they can belong to packages, which contain symbols (and not functions, classes, etc.).. the reader is responsible for resolving (and sometimes creating) the textual sequences to symbols.. you need to understand these issues
<beach> What was the problem?
<kinope> so i thought i was sending 'entry but i was sending 'hsm::entry?
<beach> I see.
<kinope> to a method that was expecting 'example::entry
<_death> kinope: for example, if you use an EQL specializer, then you'd expect (eql the-specializer-object the-passed-object) => true
<_death> kinope: and if they're not the same symbols, (eql 'example::entry 'hsm::entry) => false
terpri_ has quit [Quit: Leaving]
<kinope> Ahh, well that is very nice to know!
<kinope> I'll try to remember that
orivej has quit [Quit: No Ping reply in 180 seconds.]
<kinope> Apologies for creating a fuss over something that seems very elementary
orivej has joined #lisp
<kinope> How do keywords work do they exist in a different namespace or something
terpri has joined #lisp
<shka_> kinope: you can think about them as belonging to a separate package called keyword
<p_l> kinope: details of implementation vary, but they all exist in package called KEYWORD
<_death> keywords are ordinary symbols that reside in the package named "KEYWORD".. this package is almost an ordinary package, except that when a symbol is interned there, it is automatically exported and made a constant whose value is itself.. the reader also knows :foo is a shortcut for keyword:foo
<kinope> I see
<_death> when you have a fixed (i.e. not something a user should be able to extend) set of symbols that should be easily accessible, it often makes sense to use keywords
<kinope> Well that was a huge headache, but a good lesson. I don't think I'll forget it.
<kinope> okay
userone has quit [Quit: Leaving]
RedMallet has quit [Quit: WeeChat 2.6]
<kinope> thanks _death
terpri has quit [Remote host closed the connection]
userone has joined #lisp
jw4 has quit [Read error: Connection reset by peer]
terpri has joined #lisp
jw4 has joined #lisp
Christ0pher has quit [Ping timeout: 240 seconds]
Cymew has quit [Ping timeout: 240 seconds]
Christ0pher has joined #lisp
bsd4me has joined #lisp
rumbler31_ has joined #lisp
SpaceIgor2075 has quit [Remote host closed the connection]
SpaceIgor2075 has joined #lisp
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
scymtym has joined #lisp
<phoe> beach: I must move the fourth Online Lisp Meeting to another day since I have a calendar conflict that just appeared
<phoe> which day will be good for you?
dominic34 has joined #lisp
<Josh_2> afternoon
X-Scale has quit [Ping timeout: 240 seconds]
<phoe> shka_: if you feel like sending something in as well, that's an occasion
<beach> phoe: Not a problem for me.
<beach> Let me check...
<beach> phoe: I seem to be free all next week.
rippa has joined #lisp
msk has quit [Ping timeout: 256 seconds]
nabataeus has joined #lisp
<phoe> beach: I can move it a week forward then.
<beach> Ouch, are you busy all next week?
dyelar has joined #lisp
<beach> The week after that is Didier Verna's defense, so I am more likely to have to practice video connections etc.
whiteline has quit [Remote host closed the connection]
whiteline has joined #lisp
<beach> phoe: What the hell. I think Monday will be fine.
X-Scale has joined #lisp
ym has quit [Ping timeout: 264 seconds]
dominic34 has quit [Ping timeout: 256 seconds]
nabataeus has quit [Quit: ERC (IRC client for Emacs 26.3)]
nabataeus has joined #lisp
sdumi has quit [Ping timeout: 260 seconds]
Harag has quit [Ping timeout: 264 seconds]
Christ0pher has quit [Ping timeout: 265 seconds]
orivej has quit [Ping timeout: 258 seconds]
orivej has joined #lisp
Christ0pher has joined #lisp
<shka_> phoe: next time :-)
<shka_> i won't have time during the weekend
ym has joined #lisp
simendsjo has quit [Ping timeout: 260 seconds]
dominic34 has joined #lisp
Harag has joined #lisp
<phoe> shka_: I mean, I need to move it a week forward
<phoe> so you'll have a week more
<phoe> beach: OK - thanks
troydm has joined #lisp
oxum has quit [Remote host closed the connection]
<_death> is there a page with a list of the online meetings and links to the videos?
oxum has joined #lisp
sdumi has joined #lisp
kinope has quit [Remote host closed the connection]
dominic34 has quit [Ping timeout: 240 seconds]
* _death goes to gwene
<_death> er, gmane
varjag has quit [Quit: ERC (IRC client for Emacs 25.2.2)]
<shka_> phoe: ah, ok, this makes everything different, will work on something next week
msk has joined #lisp
oxum has quit [Ping timeout: 260 seconds]
<beach> phoe: So Monday July 6, sometime in the afternoon?
<phoe> beach: how much in the afternoon?
<beach> Up to you. No earlier than 13:00.
<beach> But if you want the US-of-Asians to be awake, maybe a bit later.
jcowan has joined #lisp
<jcowan> Does anyone know of a critique of the MOP? Not a review of AMOP, but a retrospective saying "Here's what could and should have been done better."
<beach> There are bits and pieces. The paper by Costanza on make-method-lambda is one. But the, I critique that paper in mine. :)
renzhi has joined #lisp
<beach> You also have the paper by Verna on method combinators. Again, my paper on method combinations essentially makes his critique invalid.
orivej has quit [Ping timeout: 258 seconds]
orivej has joined #lisp
bocaneri has quit [Ping timeout: 260 seconds]
<jcowan> Thanks. BTW, is there an index somewhere to the online PDFs of your papers? You occasionally give an URL to one.
<jcowan> Having to build them from Github is annoying.
<Bike> it's code rather than prose, but closer-mop to some extent consists of fixups. costanza has ideas of how things ought to be
<beach> There is no such index. In a week moment, many months ago, I promised to create such a thing, but then never did.
simendsjo has joined #lisp
<beach> Maybe I should pay someone to do that.
efm has quit [Read error: Connection reset by peer]
<Bike> most of MOP isn't actually used that much, so people haven't bothered, i'd say
Christ0pher has quit [Ping timeout: 256 seconds]
Christ0pher has joined #lisp
sdumi has quit [Ping timeout: 260 seconds]
sdumi has joined #lisp
efm has joined #lisp
bocaneri has joined #lisp
SpaceIgor2075 has quit [Ping timeout: 264 seconds]
<beach> Plus, it's pretty good as it is. Amazing in many respects, in fact.
Christ0pher has quit [Ping timeout: 264 seconds]
Christ0pher has joined #lisp
jasom has joined #lisp
<jcowan> Indeed. The MOP and generic functions in particular are one of the few things that mainstream non-Lisp languages don't (yet) have. (Julia has GFs, but the author is a Lisp weenie.)
<Bike> https://arxiv.org/abs/1403.2765 there's also this paper on an extension
<beach> Sure, generic functions are great, but the MOP is also the entire circular definition, and the exposure of the internal mechanisms, while the resulting performance is kept reasonable.
chipolux has quit [Ping timeout: 264 seconds]
<beach> Generic functions by themselves, say in a static language, would be a piece of cake to design.
<Bike> i could also rattle off some things myself, but it wouldn't be anything like comprehensive or particularly coherent
oxum has joined #lisp
nicktick has quit [Ping timeout: 240 seconds]
<beach> jcowan: What is the reason for your question?
Christ0pher has quit [Ping timeout: 260 seconds]
<jcowan> Oh, I am always interested in why as much as how, in history as much as the present.
<beach> I see.
sdumi has quit [Ping timeout: 240 seconds]
Christ0pher has joined #lisp
msk has quit [Remote host closed the connection]
theBlackDragon has quit [Ping timeout: 264 seconds]
cosimone has quit [Remote host closed the connection]
simendsjo has quit [Ping timeout: 240 seconds]
cosimone has joined #lisp
<Xach> the BIG5 archive on saildart is a fascinating view into the history of CL.
<Xach> peter seibel's talk at ILS 2010 goes over bits of it, but it's also interesting to read directly.
theBlackDragon has joined #lisp
nikkal has joined #lisp
<Xach> > QUINQUEVIRATE: This is the 5 of us. It excludes Squires and Mathis. It is archived someplace private.
<Xach> > In it we can discuss such issues as: Do we trust Mathis to not blow it with the French? Is Fateman a total loser? How do we jettison Balzer?
<Xach> ILC, not ILS
cosimone has quit [Excess Flood]
cosimone has joined #lisp
cosimone has quit [Client Quit]
vhost- has quit [Quit: WeeChat 2.6]
bendersteed has quit [Read error: Connection reset by peer]
knuckles has joined #lisp
Christ0pher has quit [Ping timeout: 246 seconds]
h11 has quit [Read error: Connection reset by peer]
Christ0pher has joined #lisp
h11 has joined #lisp
bocaneri has quit [Ping timeout: 265 seconds]
bhartrihari has joined #lisp
sdumi has joined #lisp
MidHotaru has quit [Quit: Connection closed for inactivity]
Christ0pher has quit [Ping timeout: 246 seconds]
chipolux has joined #lisp
Christ0pher has joined #lisp
<_death> P.MSG :/
bhartrihari has left #lisp ["Disconnected: Replaced by new connection"]
rumbler31_ has quit [Ping timeout: 260 seconds]
bhartrihari has joined #lisp
bocaneri has joined #lisp
drdee has quit [Quit: Leaving]
orivej_ has joined #lisp
orivej has quit [Ping timeout: 264 seconds]
simendsjo has joined #lisp
stoneglass has joined #lisp
entel has joined #lisp
dominic34 has joined #lisp
<Xach> _death: ha! "a year hence"
dale_ has joined #lisp
dale_ is now known as dale
<_death> thanks for reminding me of these files btw.. I'm going to do to them what I did so the cl-su-ai archive.. make into mbox files for easy reading using Gnus
cosimone has joined #lisp
srji has joined #lisp
Christ0pher has quit [Ping timeout: 246 seconds]
Christ0pher has joined #lisp
<jcowan> Is it right to say that in an "an error is signaled" situation, all you can count on is (a) the procedure will not return normally and (b) only a very generic handler-bind or handler-case clause will be able to intercept it (but not necessarily understand it)? An example would be calling FILE-POSITION with an out of range position.
<phoe> do you mean the standard meaning of "an error is signaled"?
<phoe> sometimes the specification says "an error of type FOO is signaled", that narrows the possible type a little bit
<phoe> but otherwise, tough luck
Christ0pher has quit [Ping timeout: 256 seconds]
<jcowan> 1.4.2 says if the error is not specified it is of type ERROR, but that isn't very informative. I notice that this expression appears in CLOS sections much more than other sections.
Christ0pher has joined #lisp
<jcowan> or perhaps in late sectiohs generally: it's in UPGRADED-*-ARRAY-TYPE too
<Bike> if you know about 1.4.2 i'm not sure what else you think could happen
<Bike> an error of type ERROR is signaled, so yes, portably you can use handler-bind/case, and portably you can't really get any information about that error
dominic34 has quit [Ping timeout: 260 seconds]
sjl has quit [Ping timeout: 256 seconds]
<jcowan> I wanted to make sure that there was nothing else guaranteed.
<Bike> shouldn't be, no
<_death> I've put up gnus-friendly versions of cl-su-ai/ll1-discuss archives on github https://github.com/death/gnus-friendly-archives .. I plan to add saildart "soon"
<Bike> a lot of errors in CL are underspecified, i'd say
<jcowan> I am faced with the claim that "an error is signaled" is bad spec writing because of this inability to do very much about it. I think, however, that it is useful in cases where the programmer has simply made a mistake and there is nothing the program can do about it (with the exception of a server, say, where even such errors should be caught and the server carries on).
<Bike> yeah that's kind of the thing, all that "error of type ERROR" stuff is basically hopeless situations
<Bike> more specific error types could be helpful, but wouldn't constitute recovery
sjl has joined #lisp
simendsjo has quit [Ping timeout: 258 seconds]
karstensrage has joined #lisp
Lycurgus has joined #lisp
<shka_> jcowan: i think that at least API functions should raise well defined errors
<shka_> reasoning being, that actually it is not always possible to predict if error signaled from library will be actually useful in application
<jcowan> It seems over-finicky. For example, Scheme lets you pass to eval a backwards compatibility environment that knows only about the identifiers in earlier versions of the standard. If, however, you pass a standard version number not known to the implementation, "an error is signaled". It isn't clear that "an error of type UNKNOWN-BACKWARDS-COMPAT-ENVIRONMENT is signaled" is actually any better.
<shka_> and also it is not possible to know that it won't be useful in a specific case
bsd4me has quit [Remote host closed the connection]
<jcowan> That way lies JavaScript or HTML5, where the spec is essentially an implementation in prose.
<shka_> jcowan: however, consider how many cases where "an error is signaled" there could be
<shka_> in such case, in a complex piece of software, how those this message informs you what went wrong?
<shka_> that's imho the problem
<Bike> i don't think specifying an error type would be that severe a change
<jcowan> Any reasonable developer's debugger will provide a backtrace
<shka_> yes, backtrace is helpful, but so is a precise error with a relevant documentation explaining conditions needed for it to be emitted
<jcowan> There are 41 instances of the phrase in the CLHS, not counting defining and explanatory instances
<jcowan> shka_: I hold that to be a quality of implementation issue. A standard is a contract between implementer and user.
<jcowan> If it isn't at a reasonable balance point, it constrains the implementor one way or blocks reasonable portability the other way.
<shka_> imho simple-error is fine in cases which indicate internal error (that is: this should be impossible to happen)
sjl has quit [Ping timeout: 265 seconds]
<shka_> otherwise, a more specific error is generally more useful
<jcowan> Don't you want it to be a subclass SIMPLE-INTERNAL-ERROR? :-)
<shka_> usefulness may vary between a specific cases
<shka_> is there a such symbol in CL?
<Bike> no.
<jcowan> No, but it could be in an implementation-specific package
<shka_> nah, it is better to have portable code
<Bike> huh, weird little discrepancies. if the function-name for defgeneric names an ordinary function etc, a program-error is signaled. but for defmethod it just specifies error
<shka_> uh, how ugly
vhost- has joined #lisp
vhost- has joined #lisp
vhost- has quit [Changing host]
<shka_> this seriously looks like an omission
joels has joined #lisp
<shka_> but how it could happen?
<Bike> probably, but it's pretty minor
<jcowan> Let me quote Will Clinger, who says it much better than I:
<Bike> defmethod is also probably not going to be deep in a backtrace
sjl has joined #lisp
<jcowan> Portability and interoperability are two different things, and often come into conflict with each other. When programming languages are specified, portability can be increased (and interoperability diminished) by inventing some specific semantics for all corner cases while forbidding extensions to standard syntax and procedures. Interoperability can be increased (and portability diminished) by leaving unimportant corner
<jcowan> cases unspecified while allowing implementations to generalize syntax and semantics in ways that simplify interoperation with other standards and components.
<shka_> yeah, practical consequences are insignificant, but it is funny
<joels> Good evening all
<shka_> joels: hi
Lycurgus has quit [Quit: Exeunt]
<shka_> jcowan: i suspect that defining a complete new language is different then writing a more mundane piece of software :-)
<jcowan> Bike: it occurs to me that you might have a handler one of whose restarts is "Convert this function to a generic function whose default method is this function."
<jcowan> Every Lisp macro defines a new language at least in principle.
bsd4me has joined #lisp
<Bike> that would be a little exotic, but maybe
<jcowan> the lines between program, DSL, and language are vague and penetrable.
<phoe> jcowan: what happens to the old function?
rumbler31_ has joined #lisp
<phoe> does it become a method with all T specializers?
<shka_> jcowan: well, in principle yes, in practice, if function is supposed to work on integers emit type-error if non-integer was passed :P
<jcowan> phoe: Yes
<Bike> "default method" is actually defined to mean that. jcowan surfing that glossary
<jcowan> The spec-writer's delight.
<jcowan> That's exactly what I'd want. "Oops, this function should really be generic. Make it so."
<Bike> yeah, maybe. sometimes it's just a mistake though
<Bike> (but since it's an error, w hatever, take your pick)
renzhi has quit [Ping timeout: 240 seconds]
<Bike> it might make sense to specify better errors at least where active detection is the only realistic implementation strategy... e.g. for invalid keyword arguments
oxum has quit [Remote host closed the connection]
efm has quit [Read error: Connection reset by peer]
oxum has joined #lisp
oxum has quit [Ping timeout: 240 seconds]
<jcowan> Bike: Well, yes, that would be another restart
* jcowan is not used to thinking in restarts yet
<Bike> would just be the abort restart really
<jcowan> Yes
cosimone has quit [Quit: Quit.]
efm has joined #lisp
bocaneri has quit [Ping timeout: 258 seconds]
random-nick has quit [Ping timeout: 260 seconds]
gaqwas has quit [Remote host closed the connection]
theseb has joined #lisp
nikkal has quit [Ping timeout: 265 seconds]
efm has quit [Read error: Connection reset by peer]
dominic34 has joined #lisp
kaftejiman has joined #lisp
oxum has joined #lisp
random-nick has joined #lisp
jbayardo has joined #lisp
jbayardo has quit [Client Quit]
renzhi has joined #lisp
hhdave_ has joined #lisp
oxum has quit [Ping timeout: 265 seconds]
hhdave has quit [Ping timeout: 265 seconds]
hhdave_ is now known as hhdave
efm has joined #lisp
renzhi has quit [Quit: WeeChat 2.3]
orivej_ has quit [Ping timeout: 256 seconds]
orivej has joined #lisp
theseb has quit [Quit: Leaving]
<White_Flame> are there tools or implementations that do reporting of time spent waiting on cache misses in CL?
karlosz has joined #lisp
<Bike> could you use perf? you can attach it to a running process
shka_ has quit [Quit: Konversation terminated!]
jbayardo has joined #lisp
cosimone has joined #lisp
<White_Flame> Bike: hmm, wasn't aware of that feature
gaqwas has joined #lisp
gaqwas has joined #lisp
gaqwas has quit [Changing host]
nikkal has joined #lisp
MichaelRaskin has joined #lisp
hhdave has quit [Quit: hhdave]
jbayardo has quit [Quit: Bye!]
jbayardo has joined #lisp
scymtym has quit [Ping timeout: 260 seconds]
liberliver has quit [Ping timeout: 258 seconds]
karlosz has quit [Quit: karlosz]
karlosz has joined #lisp
oxum has joined #lisp
orivej has quit [Ping timeout: 240 seconds]
orivej_ has joined #lisp
akoana has joined #lisp
hhdave has joined #lisp
bhartrihari has left #lisp ["Disconnected: closed"]
bhartrihari has joined #lisp
karayan has quit [Remote host closed the connection]
karayan has joined #lisp
DGASAU has quit [Ping timeout: 260 seconds]
whiteline has quit [Read error: Connection reset by peer]
whiteline has joined #lisp
wsinatra_ has quit [Quit: WeeChat 2.8]
paul0 has quit [Ping timeout: 265 seconds]
hhdave has quit [Quit: hhdave]
dominic34 has quit [Ping timeout: 265 seconds]
rumbler31_ has quit [Ping timeout: 246 seconds]
EvW has joined #lisp
teej has joined #lisp
rumbler31_ has joined #lisp
renzhi has joined #lisp
oxum has quit [Ping timeout: 260 seconds]
sjl has quit [Ping timeout: 260 seconds]
sjl has joined #lisp
red-dot has joined #lisp
rumbler31_ has quit [Ping timeout: 260 seconds]
scymtym has joined #lisp
orivej_ has quit [Ping timeout: 264 seconds]
orivej has joined #lisp
Christ0pher has quit [Ping timeout: 256 seconds]
Christ0pher has joined #lisp
whiteline has quit [Read error: Connection reset by peer]
whiteline has joined #lisp
nikkal has quit [Ping timeout: 246 seconds]
Christ0pher has quit [Ping timeout: 240 seconds]
Christ0pher has joined #lisp
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
userone has quit [Quit: Leaving]
joels has quit [Ping timeout: 240 seconds]
orivej has quit [Ping timeout: 265 seconds]
orivej has joined #lisp
nabataeus has quit [Remote host closed the connection]
narimiran has quit [Ping timeout: 265 seconds]
nabataeus has joined #lisp
Christ0pher has quit [Ping timeout: 256 seconds]
rumbler31 has joined #lisp
efm has quit [Ping timeout: 246 seconds]
Christ0pher has joined #lisp
orivej has quit [Ping timeout: 240 seconds]
orivej has joined #lisp
<jasom> Anyone know how to tell if inline-c is available on ecl? Is there a feature flag I can test?
efm has joined #lisp
gravicappa has quit [Ping timeout: 264 seconds]
frgo_ has joined #lisp
frgo has quit [Ping timeout: 260 seconds]
Christ0pher has quit [Ping timeout: 265 seconds]
Christ0pher has joined #lisp
dilated_dinosaur has quit [Quit: Leaving]
nikkal has joined #lisp
pve has quit [Quit: leaving]
twelvemonkeys has quit [Ping timeout: 260 seconds]
twelvemonkeys has joined #lisp
Christ0pher has quit [Ping timeout: 256 seconds]
Christ0pher has joined #lisp
cosimone has quit [Quit: Quit.]
nabataeus has quit [Remote host closed the connection]
oxum has joined #lisp
frgo_ has quit [Remote host closed the connection]
nabataeus has joined #lisp
sjl has quit [Ping timeout: 256 seconds]
frgo has joined #lisp
<edgar-rft> jasom: there's a #ecl channel if nobody knows here
buffergn0me has joined #lisp
hhdave has joined #lisp
dilated_dinosaur has joined #lisp
sjl has joined #lisp
Lord_of_Life_ has joined #lisp
Lord_of_Life has quit [Ping timeout: 240 seconds]
Lord_of_Life_ is now known as Lord_of_Life
oxum has quit [Ping timeout: 256 seconds]
stux|RC has quit [Quit: Aloha!]
buffergn0me has quit [Ping timeout: 260 seconds]
buffergn0me has joined #lisp
hhdave has quit [Quit: hhdave]
dominic34 has joined #lisp
dominic34 has quit [Ping timeout: 264 seconds]
orivej has quit [Ping timeout: 240 seconds]
orivej has joined #lisp
grewal has joined #lisp
renzhi has quit [Ping timeout: 260 seconds]
v3ga has quit [Ping timeout: 264 seconds]
logicmoo is now known as dmiles
<Bike> jasom: you mean c-inline? based on the manual it should be pretty much always, although maybe only in compile-file https://common-lisp.net/project/ecl/static/manual/Foreign-Function-Interface.html#Two-kinds-of-FFI
knuckles has quit [Ping timeout: 246 seconds]
<Bike> "Note also that ffi:c-inline cannot be used in interpreted or bytecompiled code! Such usage will signal an error. "
<jasom> Bike: I suppose I can see what error is signaled and use that to detect it.
nikkal has quit [Ping timeout: 258 seconds]
<jasom> When ECL is built for environments without a C compiler they use the bytecompiler which doesn't allow it.
<jasom> IIRC android would be one example
buffergn0me has quit [Ping timeout: 260 seconds]
frgo has quit [Remote host closed the connection]
frgo has joined #lisp
oxum has joined #lisp
oxum has quit [Ping timeout: 265 seconds]
Christ0pher has quit [Ping timeout: 256 seconds]
Christ0pher has joined #lisp
nabataeus has quit [Read error: Connection reset by peer]
Christ0pher has quit [Read error: Connection reset by peer]
stux|RC has joined #lisp
hhdave has joined #lisp
hhdave has quit [Client Quit]
orivej has quit [Ping timeout: 264 seconds]
orivej has joined #lisp
buffergn0me has joined #lisp
macdavid313 has quit [Quit: macdavid313]
Theseus has quit [Remote host closed the connection]
rumbler31 has quit [Remote host closed the connection]
Theseus has joined #lisp
macdavid313 has joined #lisp
shifty has joined #lisp
rgherdt has quit [Ping timeout: 272 seconds]
floss has joined #lisp
cantstanya has quit [Remote host closed the connection]
rumbler31_ has joined #lisp
slyrus_ has joined #lisp
cantstanya has joined #lisp
random-nick has quit [Ping timeout: 246 seconds]
slyrus has quit [Ping timeout: 258 seconds]
nicktick has joined #lisp
kaftejiman has quit [Remote host closed the connection]
floss has quit [Quit: Leaving]
quazimodo has quit [Ping timeout: 240 seconds]
ckonstanski has quit [Remote host closed the connection]
quazimodo has joined #lisp
red-dot has joined #lisp