jackdaniel 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/> | offtopic --> #lispcafe
nij has joined #lisp
<nij> Is there a way to include a slot test for each slot of an instance of a class?
<nij> For instance, I want the :nickname slot of 'person to be a string that only contains lowercase letters a-z. And whenever an instance of 'person to be constructed, the check is performed; and an error will be signaled if test fails.
<Bike> you could put a check in a :before method on shared-initialize or initialize-instance
<lotuseater> or use DEFTYPE to construct such a special string type and use that for the :type field for the slot (that's only checked at initialization if safety is high)
<nij> Can I embed the checking boolean function directly in the (defclass..) form?
<nij> (defclass person () (nickname :check (lambda (x) (> (length x) 3)))) ;; for example
<nij> Should replace :check with other things.. if any.
<pjb> but types may be ignored by an implementation. Better write the :before method, it's their purpose.
<pjb> or just an normal initialize-instance method.
<pjb> (defmethod initialize-instance :before ((p person) &key nickname &allow-other-keys)
<pjb> But using check-type in a :before method would be useless, you could only signal an error.
<nij> :-( Hmm
<pjb> So it's better to use the main method: (defmethod initialize-instance ((p person) &key nickname … &allow-other-keys) (assert (and (stringp nickname) (< 3 (length nickname))) (nickname) "Nickname must be a string of more than 3 characters, not ~S" nickname) … (call-next-method) p)
<pjb> Well: (defmethod initialize-instance ((p person) &key nickname … &allow-other-keys) (assert (and (stringp nickname) (< 3 (length nickname))) (nickname) "Nickname must be a string of more than 3 characters, not ~S" nickname) … (when (next-method-p) (call-next-method)) p)
<nij> pjb: even with initialize-instance, sometimes if the user is not careful, they can still use make-instance to surpass my test?
<pjb> Don't forget the test for next-method-p…
<pjb> nij: no, he cannot, since make-instance calls initialize-instance.
<Bike> make-instance calls initialize-instance
bilegeek has joined #lisp
<pjb> nij: but you may prefer to use shared-initialize instead, in case there's a change-class involved.
<Bike> technically they could bypass initialize-instance by using allocate-instance and setting slots manually, but if they do that they are beyond the protection of god or man
theothornhill has joined #lisp
<nij> What's "change-class involved"?
<pjb> The generic function shared-initialize is used to fill the slots of an instance using initargs and :initform forms. It is called when an instance is created, when an instance is re-initialized, when an instance is updated to conform to a redefined class, and when an instance is updated to conform to a different class. The generic function shared-initialize is called by the system-supplied primary method for initialize-instance,
<pjb> reinitialize-instance, update-instance-for-redefined-class, and update-instance-for-different-class.
<nij> Bike or I can just include a person-p check in the beginning of any method?
<Bike> if you're okay with that overhead, i guess
<pjb> (defclass animal () …) (change-instance 'person (make-instance 'animal :race 'werewolf) :nickname "Woof")
<nij> That's what I do now...... I find it cumbersome.
<nij> Weird.. we can lock a package.. but we cannot lock a slot..
<pjb> But yes, shared-initialize should be used in general, instead of initialize-instance. We can cope with initialize-instance just because we don't re-initialize, redefine a class or change of class often.
<pjb> No, not in CL, you cannot lock packages.
<pjb> This is an implementation specific extension.
<nij> ah .. right
<nij> Or I just make a thread to constantly check every instance :-D ?
<pjb> nij: go to #sbcl or some other implementation specific channel to discuss why they don't allow you to lock any slot. For example (lock (aref v 42))
<nij> I find it weird to not being able to "assumption-check" a slot.
nicktick has joined #lisp
<nij> Some object really needs to be checked in order for it to fit into the expected abstraction framework.
<pjb> nij: stop spreading misinformation! You can! Just write the accessor!
theothornhill has quit [Ping timeout: 252 seconds]
<nij> pjb: which part is misinfo? (thanks for pointing out!)
<pjb> nij: you are asking the questions wrong. You should notl say "I find it weird we cannot do X in lisp", you should say "How do I do X in lisp?"!!!
<pjb> nij: the part where you are asserting things that are wrong, instead of asking how to do it!
<Nilby> The answer is almost always that you can do X.
<pjb> nij: that said, I agree that there could be some macrology, to specify invariants, pre and post conditions in a more declarative way, and have the functions and method definiting macros use those declarations.
<nij> Or instead I should have said: "I find it wierd to not being able to automatically assumption-check in the thing provided already by CLOS." Is that better?
<pjb> nij: you can (shadow '(defclass defun lambda defgeneric defmethod defmacro)) and implement them to process such declarations.
<nij> XD That works! Lemme do that.
<no-defun-allowed> pjb: Stop complaining, start googling https://github.com/sellout/quid-pro-quo
<pjb> (defgeneric foo (x) (declare (precondition (< 0 (bar x))) (postcondition (= (bar x) (- (old (bar x)) 1)))))
<nij> :-O
<nij> no-defun-allowed is this what I'm asking for?!
<pjb> and then any (defmethod foo ((x c)) …) would automatically insert the tests.
<pjb> nij: note: you would have to deal with non-local exits.
<pjb> nij: some declaration would be needed to specify the allowed conditions. (like throws declarations in C++).
<Bike> wow, a custom method condition
<Bike> combination
<Bike> aw geez, and it uses :arguments
<pjb> or you can use a library, eg. https://github.com/sellout/quid-pro-quo
<nij> I.. I need time to comprehend quid-pro-quo.. but first I'll do pjb's advice. If someone would, could you please tell me how quid-pro-quo would fit into my need? I will get back to that soon after digesting pjb's word.
<pjb> Note how DBC uses the method-combinations to specify the pre and post conditions.
<Bike> i haven't used it, but it looks like you can define invariants in the class definition
<Bike> and also it explicitly checks declared types
<nij> ===> (defmethod foo ((x c)) …) would automatically insert the test ;; !!!!! I didn't know this.
<nij> I thought defgeneric should only be documentation-like!
<pjb> nij: no, you would have to define it in nij:defmethod.
<pjb> nij: note the shadow operator above!
<nij> shoot.
<pjb> Once a symbol from CL is shadowed, we're not talking about CL anymore, but about your own operators!
<nij> Ok.. I won't do that myself. That's too advanced (for now).
<nij> Now lemme dive into quid-pro-quo.
<nij> I'm melt. Sounds exactly what I want: "The client must guarantee certain conditions before calling a method specialized on the class (the preconditions), the class guarantees certain properties after the call (the postconditions)."
theca has joined #lisp
theca has quit [Client Quit]
<pjb> nij: check DBC too, you may like it better.
theothornhill has joined #lisp
<pjb> nij: also, note that just using ASSERT in your code, let you insert explicit pre-conditions post-conditions and invariants.
f4r5983 has quit [Ping timeout: 240 seconds]
<perdent> Hey is anyone interested in a crypto/hardware challenge i made involving DPA/CPA on AES-128? So I captured the embedded device that was used to encrypt the ciphers you are trying to break. are you able to recover its Encryption Key? here is the socket_interface: https://pastebin.com/cLuqmZyY and here is the remote lab layout: https://ibb.co/q9j59Mq PS, his might b helpful, message me if you need any hints, and if you manage to solve it
<perdent> Here is the host you can netcat to and communicate via the socket script: 206.189.121.131:32384
<perdent> Can communicate to the remote device with netcat or or with the socket interface script to receive traces etc.
irc_user has quit [Quit: Connection closed for inactivity]
theothornhill has quit [Ping timeout: 240 seconds]
<nij> quid-pro-quo seems to be a stronger version of dbc, according to someone on the internet
<lotuseater> i thought DEFGENERIC is also useful for giving defaults for &OPTIONALs or &KEYs
<Bike> it is useful for various things
<nij> What if I just use deftype.. and make a new type? Then use :type? What are some ways for the users to workaround this scheme?
<nij> As lotuseater suggested way above ^^^
theothornhill has joined #lisp
<nij> Ah, pjb said that :type check is implementation dependent? Too bad..
<lotuseater> yes it is nij
Stanley00 has joined #lisp
<lotuseater> and don't forget to put EVAL-WHEN around the predicates
<lotuseater> and then eg (deftype special-string () '(and string (satisfies special-string-p)))
<pjb> nij: did I say that?
theothornhill has quit [Ping timeout: 240 seconds]
<pjb> nij: Yes, I said that implementations may ignore types.
LispSporks has joined #lisp
Stanley00 has quit [Ping timeout: 240 seconds]
<pjb> nij: :type in defclass is a DECLARATION, not a check! "The :type slot option specifies that the contents of the slot will always be of the specified data type. It effectively declares the result type of the reader generic function when applied to an object of this class. "
f4r5983 has joined #lisp
<pjb> nij: it is YOU who are telling the compiler that it does not need to perform any check, that the slot will always contain the type you specify.
<pjb> this is very dangerous!
<pjb> What you want is to check the parameters for the right type. Ie. use CHECK-TYPE in the shared-initialize method.
<lotuseater> yeah and for documentation when read by others or yourself after some time
<pjb> (defclass c () ((x :initarg :x :initform 42 :type fixnum :reader x))) (make-instance 'c :x "foo") is undefined, but worse, it makes (declaim (safety 3)) (+ 3 (make-instance 'c :x "foo")) undefined as well AFAIUI.
<pjb> I mean: (+ 3 (x (make-instance 'c :x "foo")))
<pjb> Because :type fixnum in the slot works as a declaration, (+ 3 (x (make-instance 'c :x "foo"))) should behave as (+ 3 (the fixnum (x (make-instance 'c :x "foo")))) and therefore cannot signal a type-error.
<lotuseater> haha pjb my ERC displays your ":x" as an emoji ^^
<pjb> well, we're still in undefined waters for (+ 3 (x (make-instance 'c :x "foo"))), so I guess a type-error would be acceptable. But anything else too.
<pjb> THE specifies that the values returned by form are of the types specified by value-type. The consequences are undefined if any result is not of the declared type.
nicktick has quit [Ping timeout: 240 seconds]
<nij> Hmm.. hold on quid-pro-quo did what I exactly want- it called it an ":invariant" slot.
<nij> The tests are put in that slot! How did it do it?! Did it redefine the macro defclass as pjb said?
<lotuseater> oh eiffel contracts :)
<lotuseater> yes why not nij?
<nij> I dunno.. because I didn't see it redefining defclass based on github search engine.
<nij> It also says "in order to have invariants on a class, the metaclass must be specified as contracted-class." - metaclasses are still beyond my knowledge.
<lotuseater> in standard DEFCLASS there is no eg :invariants
<nij> So maybe it did that without hacking defclass, but by introducing a new metaclass?
theothornhill has joined #lisp
<pjb> nij: nope, there's no shadow in https://github.com/sellout/quid-pro-quo/blob/master/src/package.lisp but dbc shadows defclass and make-instance.
nicktick has joined #lisp
<Nilby> My opinion is that until you have a lot of CL experience, it's probably better not to mutate the language too much, until you understand the trade-offs.
<pjb> nij: Perhaps the presence of a source file named metaclass is a hint? https://github.com/sellout/quid-pro-quo/blob/master/src/metaclass.lisp
<nij> Nilby: Yeah I think so. So I'm trying to find out if it mutates the lang, or actually it's playing in the circle.
<nij> Nilby: as pjb pointed out, there's no shadowing at all.
<lotuseater> yes i cloned the repo and look throught it atm myself a bit :)
<nij> (Btw, the author is a HASKELLER.)
<Nilby> With Lisp, it's hard to see a circle. In some way every function and macro mutates the language.
<nij> Nilby oh that's right..
<lotuseater> hehe, yeah nij, there you could learn also more about where parser-combinators come from
theothornhill has quit [Ping timeout: 246 seconds]
<nij> lotuseater: I got irritated when there's no checking performed for a, say monad, when you claim your data is a monad..
<lotuseater> and for what Nilby says, it's also not bad for knowing how the MOP works and how (or maybe why) it differs
<nij> I think dbc is very important.. I cannot imagine a lang without that. At least, I need to know how to dbc.
<nij> lotuseater: Are you hinting that maybe the magic here is played by MOP? I have no idea what that is yet.
<lotuseater> when you talk about type signatures in haskell, that's checked at compile time by the GHC type inferencer
<lotuseater> ehm i don't know
<lotuseater> but there's this book about it ...
<nij> lotuseater.. no there's nothing there to check if your monad is really a monad.
nicktick has quit [Ping timeout: 260 seconds]
<nij> But that's for #haskell.. heh :)
<lotuseater> but the magic could be coming from closer-mop
<nij> Perhaps - in readme it says "Corman – NO[T supported], it’s not supported by Closer-MOP"
<lotuseater> ok
<nij> Cool. I need to get familiar with CLOS, and then CLOSER-MOP. Sounds a lot of fun!
Oladon has quit [Quit: Leaving.]
dickbare_ has joined #lisp
minion has quit [Remote host closed the connection]
minion has joined #lisp
specbot has quit [Disconnected by services]
specbot has joined #lisp
ddgdd has joined #lisp
nicktick has joined #lisp
<saturn2> nij: all the pieces of CLOS - classes, generic functions, and so on - are themselves objects which you can subclass and define your own behavior for. that's what MOP is
motersen has quit [Ping timeout: 240 seconds]
theothornhill has joined #lisp
dickbarends has quit [Ping timeout: 260 seconds]
motersen has joined #lisp
zacts has joined #lisp
<zacts> can a lisp program with included quicklisp libraries be compiled into a single binary?
<no-defun-allowed> Yes, it can.
<saturn2> yes, as long as those libraries don't depend on reading any files after being compiled
lotuseat` has joined #lisp
<zacts> how might I do that?
theothornhill has quit [Ping timeout: 252 seconds]
<no-defun-allowed> Same as how you'd make a binary without dependencies. Load your code, then dump an image.
lotuseater has quit [Ping timeout: 250 seconds]
<zacts> no-defun-allowed: I'm a complete beginner, I don't even know how to do that yet. Can I lookup how to do this in the SBCL doc?
<nij> saturn2.. that's pretty sick. That means we can hack CLOS insided MOP?
<White_Flame> zacts: save-lisp-and-die in the docs
<zacts> White_Flame: thanks
<White_Flame> *sbcl docs
<White_Flame> saves a snapshot of the current state of the running lisp image, and give it a function to run when it starts up again
<Nilby> also program-op in asdf (section 7.1.1 in the asdf manual)
<no-defun-allowed> zacts: Yes, but in summary, assuming you have another system with your code, you are looking at (ql:quickload :your-system-name) (sb-ext:save-lisp-and-die "binary-name" :executable t :toplevel #'your-system-name:start)
DHARMAKAYA has quit [Quit: Turning off a portion of this simulation.]
anticrisis has quit [Read error: Connection reset by peer]
<zacts> no-defun-allowed: thanks
<nij> zacts: this worked for me - https://bpa.st/PVVQ code taken from death
<zacts> would this binary be portable enough that I could post it as a Linux release for a project on GitHub?
notzmv has quit [Ping timeout: 252 seconds]
<zacts> Like, would I be able to publish a single x86 Linux static binary image that others could run on an x86 Linux without them needing to install SBCL?
anticrisis has joined #lisp
<White_Flame> yes
<zacts> cool
anticrisis has quit [Client Quit]
<White_Flame> however, if some of the QL dependencies rely on native .so's being present, those aren't going to be statically linked
aeth_ has joined #lisp
<zacts> ok
<White_Flame> so the target machine might hopefully just need some apt installs or whatever to get them
<zacts> I see
aeth has quit [Ping timeout: 265 seconds]
theothornhill has joined #lisp
<lotuseat`> hm i wasn't aware you can compile static binaries. but that would loose the ability being redefinable at runtime, wouldn't it?
anticrisis has joined #lisp
zeroish has quit [Ping timeout: 240 seconds]
<White_Flame> no, why would it?
<White_Flame> the compiler is included in there
<White_Flame> the lisp executable you run to start your session is exactly the same
<White_Flame> in terms of a compiled binary containing a snapshotted bootstrap image
aeth has joined #lisp
theothornhill has quit [Ping timeout: 260 seconds]
aeth_ has quit [Ping timeout: 268 seconds]
<lotuseat`> so it's dynamic and not static
<White_Flame> what do you specifically mean by those terms?
<White_Flame> usually it's the difference between linking to a .o or a .so
<Nilby> zacts: There can be problems, but here's a couple recent successful stories of binary packaging: https://www.timmons.dev/ and https://nyxt.atlas.engineer/article/continuous-testing-and-packaging.org
<lotuseat`> I don't know, I'm confused by them
<White_Flame> heh
<lotuseat`> what do you?
<zacts> Nilby: neat, thanks!
<White_Flame> well, at the OS & C lingo, a static library means it's fully included into your executable when you compile it. A dynamically linked library means it looks for the shared installed separate library file when the executable runs, meaning the executable is smaller and the OS could have a different version and still work
<White_Flame> SBCL, for instance, uses a zlib dynamic library to support compressed cores, so it's not fully static
<lotuseat`> ok for me
<White_Flame> here's the full list: https://plaster.tymoon.eu/view/2432#2432
motersen has quit [Ping timeout: 240 seconds]
<White_Flame> but one assumes that certain ones are always available
motersen has joined #lisp
<lotuseat`> thx
anticrisis has quit [Read error: Connection reset by peer]
<White_Flame> so really, I'm not sure how many "static binaries" there are in existence anymore, but rather you have static libraries vs dynamic libraries
<White_Flame> in terms of the executable's compilation & runtime usage
<etimmons> many golang programs compile to static binaries
<White_Flame> so no libc.so, libpthread.so, linux-vdso.so etc?
<etimmons> definitely no libc.so and libpthread.so. Not sure if there's any special magic for linux-vdso.so on static binaries
<etimmons> It's also possible to do with SBCL (see the timmons.dev link above)
<etimmons> And possible to do with ECL (definitely easier than SBCL, and actually supported by upstream)
theothornhill has joined #lisp
<etimmons> libc.so madness was one of the reasons I pursued static binaries with SBCL. I was tired of always needing to remember to compile with an old glibc for the broadest support
aindilis has quit [*.net *.split]
karlosz has quit [*.net *.split]
OlCe has quit [*.net *.split]
actuallybatman has quit [*.net *.split]
imode has quit [*.net *.split]
mathrick_ has quit [*.net *.split]
pranavats has quit [*.net *.split]
jrm has quit [*.net *.split]
sxmx1 has quit [*.net *.split]
Noisytoot has quit [*.net *.split]
dilated_dinosaur has quit [*.net *.split]
MIF has quit [*.net *.split]
conkker has quit [*.net *.split]
saturn2 has quit [*.net *.split]
hdasch has quit [*.net *.split]
hvxgr has quit [*.net *.split]
bkst has quit [*.net *.split]
zymurgy has quit [*.net *.split]
remexre has quit [*.net *.split]
lavaflow has quit [*.net *.split]
eagleflo has quit [*.net *.split]
<etimmons> Now when I care about distributing to others, I do a static binary built on Alpine
bilegeek has quit [Quit: Leaving]
<Nilby> zacts: There's also this https://github.com/Shinmera/deploy from the first persone, that we know of, to heroicly make CL Steam games.
karlosz has joined #lisp
conkker has joined #lisp
OlCe has joined #lisp
imode has joined #lisp
mathrick_ has joined #lisp
MIF has joined #lisp
dilated_dinosaur has joined #lisp
actuallybatman has joined #lisp
saturn2 has joined #lisp
pranavats has joined #lisp
Noisytoot has joined #lisp
aindilis has joined #lisp
sxmx1 has joined #lisp
jrm has joined #lisp
hvxgr has joined #lisp
hdasch has joined #lisp
bkst has joined #lisp
zymurgy has joined #lisp
eagleflo has joined #lisp
remexre has joined #lisp
lavaflow has joined #lisp
lotuseat` is now known as lotuseater
Jesin has quit [Ping timeout: 265 seconds]
v88m has quit [Ping timeout: 240 seconds]
<etimmons> zacts: definitely recommend starting with deploy or linux-packaging. Making static binaries definitely has some quirks that it's best to avoid unless you *really* know that's what you want
theothornhill has quit [Ping timeout: 252 seconds]
Jesin has joined #lisp
DHARMAKAYA has joined #lisp
rumbler31 has quit [Remote host closed the connection]
rumbler31 has joined #lisp
v88m has joined #lisp
hypercube has joined #lisp
CrazyPython has quit [Read error: Connection reset by peer]
<zacts> etimmons: oh, thanks
<zacts> etimmons: is this what you mean by "deploy"? https://github.com/Shinmera/deploy
<etimmons> Yes. and linux-packaging is https://gitlab.com/ralt/linux-packaging/ (also referred to in the Nyxt link)
<etimmons> but both of those are probably overkill if you don't have any foreign libraries
<etimmons> In that case, just use asdf:program-op and compile on the oldest version of your linux distribution that you're willing to support
theothornhill has joined #lisp
theothornhill has quit [Ping timeout: 260 seconds]
theothornhill has joined #lisp
dickbarends has joined #lisp
zacts has quit [Quit: bbl]
Stanley00 has joined #lisp
theothornhill has quit [Ping timeout: 240 seconds]
dickbare_ has quit [Ping timeout: 240 seconds]
Stanley00 has quit [Remote host closed the connection]
theothornhill has joined #lisp
rumbler31 has quit [Remote host closed the connection]
rumbler31 has joined #lisp
anticrisis has joined #lisp
Stanley00 has joined #lisp
LispSporks has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
theothornhill has quit [Ping timeout: 240 seconds]
lowryder has quit [Ping timeout: 245 seconds]
nij has left #lisp ["ERC (IRC client for Emacs 27.2)"]
lowryder has joined #lisp
indathrone has joined #lisp
theothornhill has joined #lisp
Sheilong has quit []
theothornhill has quit [Ping timeout: 268 seconds]
Stanley00 has quit [Remote host closed the connection]
Stanley00 has joined #lisp
cobax has joined #lisp
theothornhill has joined #lisp
Stanley00 has quit [Remote host closed the connection]
Stanley00 has joined #lisp
Stanley00 has quit [Read error: Connection reset by peer]
Stanley00 has joined #lisp
xkapastel has quit [Quit: Connection closed for inactivity]
<beach> Good morning everyone!
zacts has joined #lisp
Stanley00 has quit []
theothornhill has quit [Ping timeout: 252 seconds]
shifty has joined #lisp
orivej has joined #lisp
wooden has quit [Read error: Connection reset by peer]
zacts has quit [Quit: bbl]
jnewton has quit [Ping timeout: 265 seconds]
semz has quit [Ping timeout: 250 seconds]
shifty has quit [Ping timeout: 252 seconds]
theothornhill has joined #lisp
lotuseater has quit [Remote host closed the connection]
lotuseater has joined #lisp
theothornhill has quit [Ping timeout: 246 seconds]
ddgdd has quit [Ping timeout: 240 seconds]
ddgdd has joined #lisp
semz has joined #lisp
semz has joined #lisp
semz has quit [Changing host]
notzmv has joined #lisp
theothornhill has joined #lisp
theothornhill has quit [Ping timeout: 252 seconds]
Spawns_Carpeting has quit [Quit: ZNC 1.7.2+deb3 - https://znc.in]
ddgdd has quit [Quit: ERC (IRC client for Emacs 28.0.50)]
yoonkn has joined #lisp
Spawns_Carpeting has joined #lisp
sp41 has quit [Remote host closed the connection]
frost-lab has joined #lisp
aartaka has joined #lisp
Bike has quit [Quit: leaving]
zeroish has joined #lisp
zeroish has quit [Ping timeout: 252 seconds]
zeroish has joined #lisp
theothornhill has joined #lisp
theothornhill has quit [Ping timeout: 240 seconds]
zeroish has quit [Ping timeout: 240 seconds]
andrei-n has joined #lisp
theothornhill has joined #lisp
theothornhill has quit [Ping timeout: 240 seconds]
retropikzel has joined #lisp
gigamonkey has quit [Ping timeout: 252 seconds]
theothornhill has joined #lisp
engblom has quit [Remote host closed the connection]
theothornhill has quit [Ping timeout: 246 seconds]
theothornhill has joined #lisp
theothornhill has quit [Ping timeout: 240 seconds]
gaqwas has joined #lisp
gaqwas has quit [Changing host]
gaqwas has joined #lisp
narimiran has joined #lisp
gigamonkey has joined #lisp
bilegeek has joined #lisp
DGASAU` has quit [Quit: ERC (IRC client for Emacs 25.3.1)]
DGASAU has joined #lisp
gigamonkey has quit [Ping timeout: 260 seconds]
jnewton has joined #lisp
theothornhill has joined #lisp
nicktick has quit [Ping timeout: 240 seconds]
shifty has joined #lisp
theothornhill has quit [Ping timeout: 252 seconds]
gigamonkey has joined #lisp
gigamonkey has quit [Ping timeout: 252 seconds]
theothornhill has joined #lisp
Sauvin has joined #lisp
theothornhill has quit [Remote host closed the connection]
theothor` has joined #lisp
zaquest has quit [Quit: Leaving]
theothor` has quit [Ping timeout: 260 seconds]
gigamonkey has joined #lisp
a0 has joined #lisp
zaquest has joined #lisp
jnewton has quit [Ping timeout: 246 seconds]
andreyorst` has joined #lisp
theothor` has joined #lisp
gaqwas has quit [Ping timeout: 246 seconds]
jnewton has joined #lisp
theothor` has quit [Ping timeout: 252 seconds]
shifty has quit [Ping timeout: 252 seconds]
skapata has quit [Remote host closed the connection]
shifty has joined #lisp
Codaraxis has joined #lisp
yoonkn has quit [Ping timeout: 252 seconds]
Codaraxis_ has quit [Ping timeout: 260 seconds]
shifty has quit [Ping timeout: 240 seconds]
theothor` has joined #lisp
shifty has joined #lisp
gigamonkey has quit [Ping timeout: 265 seconds]
theothor` has quit [Remote host closed the connection]
theothor` has joined #lisp
shifty has quit [Ping timeout: 240 seconds]
shifty has joined #lisp
theothor` has quit [Ping timeout: 240 seconds]
DHARMAKAYA has quit [Quit: Turning off a portion of this simulation.]
dickbarends has quit []
gigamonkey has joined #lisp
yoonkn has joined #lisp
gigamonkey has quit [Ping timeout: 252 seconds]
andreyorst` has quit [Quit: andreyorst`]
andreyorst` has joined #lisp
theothor` has joined #lisp
gigamonkey has joined #lisp
theothor` has quit [Remote host closed the connection]
theothor` has joined #lisp
theothor` has quit [Client Quit]
gigamonkey has quit [Ping timeout: 240 seconds]
theothornhill has joined #lisp
<splittist> I don't see any need for a 2e of TCLCS (I don't have any problems with the style). Perhaps a companion volume in a few years: ITCLCSB - Implementing the Common Lisp Condition System in Blub
actuallybatman has quit [Ping timeout: 246 seconds]
shka_ has joined #lisp
jnewton has quit [Ping timeout: 268 seconds]
contrapunctus has left #lisp ["Disconnected: closed"]
contrapunctus has joined #lisp
retropikzel has quit [Ping timeout: 250 seconds]
jnewton has joined #lisp
<phoe> splittist: I actually thought that a second edition of TCLCS could include such a chapter - e.g. a description of implementing a CS in Java (see cafe-latte), and maybe in a non-memory-managed language too if we want to be extra risky
<phoe> but just Java should be enough, too
<phoe> and there is still stuff that needs to get integrated into the main body from the appendices
<phoe> and with that, we need to fix the fact of lack of hyperlinks/footnotes.
surabax has joined #lisp
yoonkn has quit [Remote host closed the connection]
yoonkn has joined #lisp
tophullyte has quit [Quit: Leaving]
<phoe> I don't think that a ITCLCSB would be large enough to warrant its own existence, unless we actually do the work and implement those in multiple distinct languages, noting the quirks everywhere
waleee-cl has joined #lisp
yoonkn has quit [Read error: Connection reset by peer]
jprajzne has quit [Quit: Leaving.]
jprajzne has joined #lisp
<splittist> phoe: I was thinking of your next N papers (as co-author as necessary) as Implementing TCLCS in X, and then the book as a compendium (:
<beach> Oh, like Appel's compiler books.
<phoe> hm
<phoe> maybe
pfdietz has quit [Quit: Connection closed]
yoonkn has joined #lisp
ljavorsk has joined #lisp
heisig has joined #lisp
shifty has quit [Ping timeout: 252 seconds]
hypercube has quit [Ping timeout: 250 seconds]
orivej has quit [Ping timeout: 260 seconds]
shifty has joined #lisp
<splittist> or just have others write the papers and you can be the editor of the book - "Phoe on Condition Systems" ...
pve has joined #lisp
* splittist imagines the "International Condition Systems Conference" co-located with ELS
<no-defun-allowed> "Here we have phoe representing the Common Lisp condition system, and here is psoe representing the Dylan condition system."
<p_l> no-defun-allowed: and ploe on "adventures in mandatory stack unwinding land - systemwide exception and condition system in NT"
<phoe> gosh that's already a lot of different people
* no-defun-allowed was expecting phoe's alter egoes to be other Greek letters
<splittist> Isn't Success (TM) in Academia (TM) mainly about gaming the system? (As opposed to excellence in being an academic, which doesn't seem to be particularly valued.)
<p_l> ... ok, wtf, windows has continuable exceptions
<p_l> splittist: non-academic management definitely pushes that mode
<p_l> > The machine state of the thread in which the exception occurred is saved in a CONTEXT structure. This information (called the context record) enables the system to continue execution at the point of the exception if the exception is successfully handled.
<p_l> so... I can do CL-like conditions in C, so long as it's WinNT and preferably compiled with MSVC
<splittist> which is a awful lot of software, to be fair
<no-defun-allowed> We also have xoe with the intermediate Ralph condition system in the middle.
<p_l> also, iirc, MSVC++ automatically compiles C++ exceptions to SEH
<Nilby> Some of the NT kernel is actually no so bad design, it's just the rest that sucks.
<Krystof> There Are Many Academias
<p_l> Nilby: design wise it's IMO very good
<p_l> Nilby: the problem is more in management of development
shifty has quit [Ping timeout: 240 seconds]
<p_l> so you get cases like ReFS "forking" NTFS driver because of fear of modifying working code
shifty has joined #lisp
<moon-child> nt has essential issues
<moon-child> like i/o and process init being slow
<p_l> despite how NTFS logical structure makes it easy to extend (just like ZFS) while most FFS derivatives are hard
<phoe> this is what we get for mentioning WinNT at all
<phoe> we have somehow strayed from the true path of #lisp on-topic onto the paths of windows kernel quirks
<p_l> moon-child: I/O can be plenty fast, especially when you go native, process init is due to different ideas on handling things in NT/VMS vs Linux, which don't really matter for lisp programs
hypercube has joined #lisp
<moon-child> 'go native'?
<moon-child> my understanding is that nt's i/o is modular in a way that prevents effective caching
<splittist> lukego: for playing with CLIME, one would work with your forks of McCLIM and SLIME?
Jachy has quit [Quit: Leaving.]
<p_l> moon-child: nothing prevents caching, native referred to async I/O instead of sync wrappers, and modularity is problem mainly in the form of annoying other crap injecting itself between cache and your program
<p_l> btw, anyone working on somewhat more universal async io for CL (preferably portable)?
<p_l> or is that an open research question? :)
<no-defun-allowed> I want to implement green threads in SICL. It's not portable across implementation-space, but you can make all your synchronous code "asynchronous" enough.
gitgoood has quit [Quit: Probably away to do something really awesome]
<no-defun-allowed> For now, what about ABCL on the Java 17/Loom preview?
hendursaga has quit [Ping timeout: 240 seconds]
shifty has quit [Ping timeout: 252 seconds]
shifty has joined #lisp
retropikzel has joined #lisp
anticrisis has quit [Read error: Connection reset by peer]
hendursaga has joined #lisp
<lukego> splittist: Right. If you check them out and e.g. link the McCLIM into your ~/quicklisp/local-projects/ and put (load "~/git/slime/slime.el") into your .emacs then you should be in business
<lukego> (the idea is very much to upstream all this ASAP but I haven't really engaged with that problem yet)
* splittist brings out his development laptop...
* lukego pushes a few updates on his disk.. done
<lukego> thank you o brave first user :)
cosimone has joined #lisp
<lukego> I've finally (?) fixed some weirdness in Emacs ignoring properties that I put onto images like mouse regions for presentations, the workaround is bizarre but it seems to work now.
<lukego> I've also implemented like 80% of ACCEPT now. On the Lisp side you can call the CLIM ACCEPT function and it will bounce that over to Emacs and back to get you an object. the only catch is that Emacs will currently choose that object arbitrarily :). I'm looking at how to do Emacs mouse events now...
* splittist hopes lukego's clime github name won't be flagged as pron
<lukego> Maybe 80% is a stretch, depends how Emacs will feel about me updating the list of mousable regions on images. maybe I could look at that right now
<lukego> yeah..
<lukego> that handle is meant in the spirit of carefree innocent hackery, as depicted by e.g. https://www.shutterstock.com/image-vector/two-funny-cheery-exuberant-characters-dressed-114750592, but is probably a poor choice :)
<splittist> lukego: what's the hello world to try it out from the repl?
<lukego> (back soon, dog beckons)
<lukego> sec
<lukego> (with-output-to-emacs (s) (draw-circle* s 0 0 50 :ink +red+))
* lukego is back in ca 30 mins
<lukego> (in-package :clim-emacs)
<splittist> have a call. Still compiling McClim...
<waleee-cl> does anyone know how to explicitly select the gtk3-namespace with https://github.com/andy128k/cl-gobject-introspection ?
jnewton has quit [Ping timeout: 265 seconds]
bilegeek has quit [Quit: Leaving]
jnewton has joined #lisp
gigamonkey has joined #lisp
<waleee-cl> (gir:ffi "Gtk") has the sad property of returning the namespace for gtk4 on my gtk4-recently-added linux distro
zacts has joined #lisp
gigamonkey has quit [Ping timeout: 268 seconds]
OlCe has quit [Ping timeout: 246 seconds]
<waleee-cl> ... and (gir:ffi "Gtk" "3.0") fails for reasons. While (gir:ffi "Gtk" "2.0") works peachy
orivej has joined #lisp
beach` has joined #lisp
perrier-jouet has quit [Quit: WeeChat 3.1]
Krystof has quit [Ping timeout: 240 seconds]
perrier-jouet has joined #lisp
<waleee-cl> Ah, my distro didn't link gobject-3.0 explicitly
lieven has quit [Ping timeout: 250 seconds]
perrier-jouet has quit [Client Quit]
imode has quit [Ping timeout: 246 seconds]
beach has quit [Ping timeout: 260 seconds]
beach` has quit [Remote host closed the connection]
beach has joined #lisp
shifty has quit [Ping timeout: 246 seconds]
OlCe has joined #lisp
orivej has quit [Ping timeout: 252 seconds]
dhil has joined #lisp
prxq has joined #lisp
monolithic has joined #lisp
klltkr has joined #lisp
CrazyPython has joined #lisp
OlCe has quit [Ping timeout: 246 seconds]
hypercube has quit [Quit: WeeChat 3.1]
<splittist> lukego: I'm getting "CLIME-ACCEPT-IN-EMACS" not found in SWANK package. (And swank-clime.lisp is essentially empty.) I'm sure it's user error...
zacts has quit [Quit: bbl]
<lukego> Maybe you pulled the clime branch before I pushed that? it went in here: https://github.com/nuddyco/slime/commit/f930f6473b1f4af57d561d62d6cbefd4492015a9. But ahem I see a typo in that commit so let me check and fix that now.
<lukego> try pulling slime again now?
a0 has quit [Remote host closed the connection]
<lukego> (yeah swank-clime is basically empty, I just cargo-culted swank-media.lisp)
a0 has joined #lisp
kmeow has quit [Remote host closed the connection]
<splittist> lukego: same thing. I feel I should be loading the clime contrib somehow (but I'm not)
<lukego> oh! yes I completely forgot that part. sec.
<lukego> (push 'slime-clime slime-contribs) (slime-setup)
<lukego> Sorry this is horrible for of me to have not tried it on my other computer or at least in a fresh emacs :(
* lukego does so now
nmg has quit [Quit: ZNC 1.7.2+deb3 - https://znc.in]
<lukego> splittist: okay I tried this in a fresh Emacs now and it worked - got the red circle in the repl - but also an error message that I'll take a look at
silasfox has joined #lisp
<lukego> (there's something funny happening where the shape is drawn after the new REPL prompt rather than before it. must be a recent goof. fixing.)
srji_ has joined #lisp
srji has quit [Ping timeout: 265 seconds]
fox_ has joined #lisp
silasfox has quit [Ping timeout: 245 seconds]
Nilby has quit [Ping timeout: 276 seconds]
<lukego> I pushed a minor fix for that now to the slime branch, it's optional
vegansbane6963 has quit [Quit: The Lounge - https://thelounge.chat]
retropikzel has quit [Quit: Leaving]
yoonkn has quit [Read error: Connection reset by peer]
OlCe has joined #lisp
<splittist> lukego: On the red circle example I get "error in process filter: Text is read-only", but also a black circle (and a giant cursor afterwards). So I'd call that a qualified success (:
<lukego> hah :)
<lukego> great perseverance! thanks and congrats! :) the fix I pushed is for that "error in process filter" glitch
<lukego> and to make the circle appear in the right place (and not make the cursor so big)
<lukego> can pull slime and `M-x eval-buffer' in slime-clime.el if you want that
<lukego> black instead of red... haven't seen that one yet :)
a0 has quit [Ping timeout: 240 seconds]
<lukego> which is supposed to look like https://twitter.com/lukego/status/1389180878757273602/photo/1 including the tooltips over the presentations
OlCe has quit [Ping timeout: 260 seconds]
<splittist> lukego: much nicer. But still black (:
<lukego> if you hop into *slime-events* and search backwards from the end for :write-clime you can see the SVG code that came over. (Or indeed if you place the Emacs cursor on the image and eval '(text-properties-at (point))'.) but as you say this is already a qualified success :)
<lukego> I'm always using absolute RGBA values so there shouldn't be any funny business about color names missing from one side etc.
CrashTestDummy has joined #lisp
<splittist> lukego: the svg looks right (the 100% is first for +red+, second for +green+ etc.). I'll look at the state of svg support for Windows emacs.
<lukego> oh you're on windows? then I'd call it a major success :)
<lukego> in the sense that this is covering quite a lot of untested ground and one might have expected much more to have gone wrong :)
<lukego> thanks for taking this for a spin!
CrashTestDummy3 has quit [Ping timeout: 240 seconds]
<splittist> lukego: I want it to work - it would make development of all sorts of things (including McClim) really interesting.
<lukego> *nod* glad it's not just me thinking that
sveit has quit [Ping timeout: 250 seconds]
simplegauss has quit [Ping timeout: 245 seconds]
thonkpod has quit [Ping timeout: 250 seconds]
<lukego> btw if you want to experiment you can try pasting that SVG into a file and opening that with `C-x C-f` find-file. Emacs should default to rendering it as an SVG and then you can toggle to editing mode with `C-c C-c` to tweak and then again to see the result.
<lukego> I've been getting all kinds of surprising results from my calls to create-image in elisp that don't make much sense so spending a lot of time looking for examples that work and trying to compare what I have to those.
frgo has quit [Remote host closed the connection]
frgo has joined #lisp
jnewton has quit [Ping timeout: 240 seconds]
cobax has quit [Quit: Connection closed]
simplegauss has joined #lisp
thonkpod has joined #lisp
silasfox has joined #lisp
sveit has joined #lisp
fox_ has quit [Ping timeout: 240 seconds]
kevingal has joined #lisp
gigamonkey has joined #lisp
jello_pudding has quit [Ping timeout: 260 seconds]
CrashTestDummy2 has joined #lisp
Krystof has joined #lisp
CrashTestDummy has quit [Ping timeout: 240 seconds]
gigamonkey has quit [Ping timeout: 260 seconds]
mokulus has joined #lisp
CrashTestDummy has joined #lisp
jello_pudding has joined #lisp
fox_ has joined #lisp
<p_l> no-defun-allowed: green threads are a bit problematic if the system thread executing them is stopped on an external lock
CrashTestDummy2 has quit [Ping timeout: 260 seconds]
ukari has quit [Remote host closed the connection]
eden has joined #lisp
<splittist> lukego: you need rgba, not rgb
silasfox has quit [Ping timeout: 260 seconds]
<splittist> (in svg-color)
ukari has joined #lisp
<lukego> oh! that makes sense. wanna send a PR? :)
notzmv has quit [Ping timeout: 240 seconds]
shifty has joined #lisp
eden has quit [Ping timeout: 240 seconds]
amb007 has quit [Read error: Connection reset by peer]
notzmv has joined #lisp
aartaka_d has joined #lisp
amb007 has joined #lisp
aartaka has quit [Ping timeout: 240 seconds]
vegansbane6963 has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
fox_ is now known as silasfox
White_Flame has quit [Read error: Connection reset by peer]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
White_Flame has joined #lisp
jnewton has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
jnewton has quit [Remote host closed the connection]
jimka2001 has joined #lisp
amb007 has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
* splittist successfully sends a PR to himself...
amb007 has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
<no-defun-allowed> p_l: Let's hope you don't have external locks :)
amb007 has quit [Read error: Connection reset by peer]
<no-defun-allowed> You could have a relatively not-useless all-Common Lisp networked program, I believe. The only tricky part would be putting your faith into CL-TLS into CL+SSL/OpenSSL.
aun has joined #lisp
amb007 has joined #lisp
<aun> can someone give a short intro to usocket?
<aun> I m trying to do thigns with it, but cannot do even simple stuff
<jackdaniel> aun: fwiw this has "How do I..." section https://common-lisp.net/project/usocket/api-docs.shtml
aartaka has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
<aun> this is has simple parts that I already figured out and too advanced parts that I m not ready for unfortunately)
<aun> I guess the important question is -- whenever it starts listening by default it cannot do anything else (including prints) cuz its all single threaded?
aartaka_d has quit [Ping timeout: 240 seconds]
<jackdaniel> speaking of encryption, I've always wondered how much of the complexity is due to superficial requirements and how much is required to cover all bases
amb007 has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
aartaka_d has joined #lisp
<jackdaniel> aun: you could provide some minimal example that illustrates what you are doing
amb007 has quit [Read error: Connection reset by peer]
<jackdaniel> when you wait for input, you may specify the timeout (i.e 0 for non-blocking operation)
amb007 has joined #lisp
<MichaelRaskin> jackdaniel: there is some inherent complexity of needing to move forward all the way becuase of new kinds of attacks considered. Also a lot of coordination complexity because some systems won't allocate resources to use keys that are not on the edge of being too weak. And it is so much you need a kinf of sliding-window upgrade. And then it's horribly complex.
aartaka has quit [Ping timeout: 260 seconds]
<MichaelRaskin> aun: accept on a socket without timeout or explicit threading is expected to be blocking.
<jackdaniel> MichaelRaskin: sure, I'm not saying that encryption is easy, I'm wondering how much complexity comes from quite uncommon requirements
amb007 has quit [Read error: Connection reset by peer]
<jackdaniel> like this horrible push to new http protocols to gain 0,01% performance bump (which doesn't matter for folks who are not running server farms like google :)
<jackdaniel> but I've ended starting an offtopic, my apologies
<no-defun-allowed> There's also something about dropping connection latency by sidestepping TCP handshakes, but that's silly and indeed off-topic.
<aun> jackdaniel MichaelRaskin okay, does IRC have code highlight or should i do pastebin or whatever
<aun> oh no wait I know a better one
<jackdaniel> aun: try plaster.tymoon.eu
aartaka has joined #lisp
<aun> theres this fancy thing https://codeshare.io/5DLXgW
aartaka_d has quit [Ping timeout: 240 seconds]
<waleee-cl> aun: usually it's considered bad etiquett to paste a blob directly in irc
amb007 has joined #lisp
<aun> whats a blob?
cosimone has quit [Remote host closed the connection]
<no-defun-allowed> Does IRC require newlines at the end of each message? I don't know too much about it.
<waleee-cl> large amount of lines in sequence, in this case
<aun> you mean a codeblock?
karlosz has quit [Quit: karlosz]
<waleee-cl> or anyother large amount of text
<jackdaniel> aun: instead of calling receive right away, check first whether there is input available
<no-defun-allowed> i.e. write (write-line "PASS <password>" stream) or (format stream "PASS <password>~%")
<jackdaniel> (listen (usocket:socket-stream your-socket)) ; will return T if there is available input
<jackdaniel> it is in that "How do I ..." FAW I've mentioned earlier under "... check whether reading from a socket stream will block? "
amb007 has quit [Read error: Connection reset by peer]
<jackdaniel> s/FAW/FAQ/
amb007 has joined #lisp
<aun> jackdaniel it returns NIL so I assume there's not? Should there be always?
<jackdaniel> if it returns NIL, then there is no input indeed
<jackdaniel> so calling receive wil lblock
<jackdaniel> (loop repeat 5 (if (listen …) (return (receive)) (progn (print "Retrying") (sleep .5)))
<jackdaniel> is one way to print something while waiting
<jackdaniel> also, you want finish-output here, not force-output
<jackdaniel> the latter will initiate flushing buffers and carry on, while the former will wait until all data is send
<jackdaniel> oh, you have there finish-output, I'm not sure where my eyes were looking :c
<aun> nono, I fixed it right there
amb007 has quit [Read error: Connection reset by peer]
<aun> in your loop what is `recieve`
amb007 has joined #lisp
<jackdaniel> it is a pseudocode, receive is your call to socket-receive
amb007 has quit [Read error: Connection reset by peer]
<jackdaniel> and listen is the previous call I've mentioned
amb007 has joined #lisp
andrei-n has quit [Ping timeout: 240 seconds]
amb007 has quit [Read error: Connection reset by peer]
<aun> I changed it https://codeshare.io/5DLXgW -- and I think if i dont send anything it doesn't send me anything either. Also, I m getting a no-applicable-method error now on my send
<aun> which is weird since I didn't change it and it didn't happen before
amb007 has joined #lisp
<jackdaniel> and where is your call to finish-uotput?
<jackdaniel> s/uotput/output/
cosimone has joined #lisp
<aun> Fair! But the no-applicable method problem still stays. I posted it there as well
<jackdaniel> I'm not sure if previously I saw the call to a macro with-client-socket
<jackdaniel> also previously you've used format, now you try to use socket-send
retropikzel has joined #lisp
<aun> Yeah, I m a but confused about what is the correct way tbh)
<jackdaniel> socket-send is meant for datagram sockets (same socket-receive)
andrei-n has joined #lisp
<jackdaniel> with a "normal" socket you probably want format and read-line
<jackdaniel> and stream-usocket is created when the object is a stream (tcp) socket
ukari has quit [Remote host closed the connection]
<jackdaniel> I'm not sure where with-client-socket is documented
ukari has joined #lisp
<jackdaniel> ah, I have it
<jackdaniel> instead of read-line you may of course go by char
<jackdaniel> with read-char
<aun> okay, with char it just tries and seems nothing happens
<aun> but at least no errors, as before)
<aun> Look....what are the chances you know F#?)
<jackdaniel> my former co-worker was in ave of it, that's all I know about it :)
<no-defun-allowed> F# G# A# B C# D# F F#
<no-defun-allowed> Nope, I'm supposed to write E# instead of F natural.
orivej has joined #lisp
<aun> see,like, you know about usocket and a friend who "explains" web to me knows F# and has a small snippet of F# code that I m trying to roughly translate)
nij has joined #lisp
<nij> Hello! Anyone knows how MOP allow us to "hack" defclass, in the sense that you can put more things in it? For example, in the class in the link, there's something called :invariants - https://bpa.st/USJQ
<jdz> nij: The hacking is done by providing a metaclass.
<jdz> minion: tell nij about amop
<minion> nij: look at amop: AMOP: The Art of the Metaobject Protocol, an essential book for understanding the implementation of CLOS and advanced OO. See <http://metamodular.com/CLOS-MOP>
<nij> When, defclass "sees" a nonstandard metaclass, it starts following different instructions?
ljavorsk has quit [Ping timeout: 246 seconds]
<no-defun-allowed> DEFCLASS expands to MOP:ENSURE-CLASS, which will then call MAKE-INSTANCE on the metaclass with some parameters based on the superclass list and slot list and then the rest of the arguments.
<jdz> CLOS follows a protocol (described in AMOP), so in a sense, yes, by providing a custom metaclass (not STANDARD-CLASS), CLOS uses different implementations of generic functions used in CLOS machinery.
<nij> Very cool! Sure, I put amop in my reading list :) Thanks
<aun> jackdaniel anyway, this is how it looks like, https://codeshare.io/5DLXgW   if you have time/interest to look at it, I ll appreciate it. Its fine anyway, maybe someone else will help, so dont worry too much)
<no-defun-allowed> Look at the shape that <https://github.com/robert-strandh/SICL/blob/master/Code/CLOS/defclass-support.lisp#L279> generates from a DEFCLASS form.
<nij> jdz: By the was, do you recommend me read CLOS (Keane's?) and then amop? It sounds like a larger topic.
<no-defun-allowed> aun: Note that the F♯ code uses WriteLine but you haven't generated any newlines.
<jdz> I did not get much value out of Keene's book, but that was a very long time ago, and maybe I just was reading it wrong, or had preconceptions. AMOP, on the other hand, was an eye opening experience for me.
<aun> I have...print.Should I also use write-line?
<no-defun-allowed> Just write (write-line "PASS <password>" stream) or (format stream "PASS <password>~%")
<jimka2001> The first lisp book I read was Common Lisp by Paul Graham, the 2nd was Keene
<jimka2001> the third was AMOP
<nij> jdz: How about this.. How much CLOS do I need to know before jumping to AMOP? I can write simple programs, know gen.fun and methods, know some basics combination of methods.
<jackdaniel> amop basically explains clos, so you don't need to know it by heart to read the book
<nij> jackdaniel: That's uplifting to know!!
<jackdaniel> jimka2001: clos-wise it is strictly monotonic :-)
<nij> no-defun-allowed: sorry.. I cannot understand what that expander is doing.
<jimka2001> Keene was my first organized introduction to OO.. Prior to that I was really confused by using an object system in a different lisp, which was heavily influenced by CLOS but was a partial implementation which supported single inheritance and single dispatch.
<beach> nij: Expanding the macro.
<jackdaniel> aun: no-defun-allowed is right
<jackdaniel> I've tried your snippet with dummy data and adding newlines makes the server answer with something intelligible
<aun> YES HE IS, thanks a lot
<jackdaniel> like ":tmi.twitch.tv NOTICE * :Improperly formatted auth
<nij> jimka2001: Thanks for sharing. I will also keep Keene's book in mind.
<nij> beach: @_@
<aun> that is such a dumb mistake especially considering that was my first thought when I saw that code
<no-defun-allowed> *she
<no-defun-allowed> nij: What I am saying is to look at the general shape of the call to ENSURE-CLASS generated. That is how DEFCLASS ends up making an instance of a metaclass
<nij> I see... a bit. Thanks!
<no-defun-allowed> Some form like (defclass foo (bar baz) ((foo)) (:metaclass metaclass) (:random-initarg this)) ends up calling something like (make-instance 'metaclass :name 'foo :direct-superclasses (list (find-class 'bar) (find-class 'baz)) :direct-slots '((foo)) :random-initarg '(this)) from memory.
<no-defun-allowed> Though I think I missed a step with how slots are handled. Oh well.
<pjb> There's cl-irc implementing the IRC protocol…
<nij> * (join connection "#lisp") * (read-message-loop connection) .. wow
<duuqnd> cl-irc is pretty good. I've never had any problems with it.
<duuqnd> I use it in the bot that was used as a Twitch-IRC bridge during ELS
zeroish has joined #lisp
<nij> Dunno how it sends message though. Not in the sample at least.
<aun> okay to make it parallel now...
ukari has quit [Remote host closed the connection]
silasfox has quit [Quit: Leaving]
ukari has joined #lisp
silasfox has joined #lisp
notzmv has quit [Ping timeout: 240 seconds]
<duuqnd> nij: If I remember correctly I think the method IRC:PRIVMSG sends messages to channels
amb007 has quit [Read error: Connection reset by peer]
<pjb> (botihn botil botvot)
gxt has joined #lisp
silasfox has quit [Ping timeout: 252 seconds]
amb007 has joined #lisp
silasfox has joined #lisp
<nij> I can't figure out why a stream is closed when I create a thread.. could someone helpout? https://bpa.st/L36A
igemnace has quit [Quit: WeeChat 3.1]
<nij> Do I have to add with-open-file again in the lambda in the thead I create?
shifty has quit [Ping timeout: 240 seconds]
shifty has joined #lisp
<jdz> nij: WITH-OPEN-FILE will close the file.
<nij> jdz I put the bt:make-thread in the form of the first (and the only one, currently) with-open-file form.. so I don't see why it's closed.
<jdz> You create a thread, and by the time thread runs the DISPATCH method is done, and the file is closed.
pve has quit [Ping timeout: 246 seconds]
<jdz> The solution is simple: if you want to have the file open in your thread then don't close the file.
<nij> I didn't close the file @_@.. manually. So you mean I shouldn't use WITH-OPEN-FILE?
<jdz> I mean you should understand why the file is closed, first.
<nij> Is it because the thread isn't fired immediately?
pve has joined #lisp
<no-defun-allowed> You can't depend on when the thread will start relative to when the file is closed.
<nij> And within that 0.1~0.2 sec delay, DISPATCH has ended; in particular, the form WITH-OPEN-FILE has ended.
<jdz> That's the problem with threads: you don't control when they run. So you must ensure that your code works in all kinds of situations.
<nij> I see. So I have better put another with-open-file form in that thread.
<no-defun-allowed> In my opinion you should do the writing in one WITH-OPEN-FILE form, then have the thread re-open the same pathname - yes.
<nij> That would repeat myself.. hmm lemme think is there other way then macro.
<nij> no-defun-allowed: Ah! I didn't know you can reopen a file. Lemme see how to do it. Thank you!
<no-defun-allowed> You could write a CALL-WITH-LOG-FILE function, then if you so please implement WITH-LOG-FILE from that.
<jdz> nij: You're already re-opening the file. You have :if-exists parameter.
gigamonkey has joined #lisp
<jdz> Also, yes, you should be able to use the closed stream with WITH-OPEN-FILE.
ldbeth has joined #lisp
<ldbeth> good evening
<beach> Hello ldbeth.
<no-defun-allowed> (For your mis-information, I find thread creation and joining to take about 55µs on my laptop.)
<nij> :-O
<no-defun-allowed> But I would ensure the log is closed before the thread is started, and then have the thread open a new stream. Or even have the thread do all of the work!
<flip214> hunchentoot even opens/closes the file each time.... so that it can be renamed (eg. via logrotate)
gigamonkey has quit [Ping timeout: 260 seconds]
random-nick has joined #lisp
<nij> I see. Thank you no-defun-allowed jdz :)
yoonkn has joined #lisp
shifty has quit [Ping timeout: 246 seconds]
silasfox has quit [Ping timeout: 245 seconds]
notzmv has joined #lisp
retropikzel has quit [Ping timeout: 245 seconds]
Jesin has quit [Quit: Leaving]
Bike has joined #lisp
masp has joined #lisp
hypercube has joined #lisp
pfdietz has joined #lisp
<pjb> nij: the closed stream still carry some information you may want to use, notably the pathname (pathname closed-stream).
<pjb> nij: you can just use OPEN in dispatch and close the stream in the thread (but use an unwind-protect to ensure you will close it!)
<pjb> nij: however, some impementations have protections against sharing streams in threads. notably ccl. You may want to read the implementation documentation about opeon and see if there's an option to deal with those cases (cf :sharing option in ccl OPEN).
undvrainbowvita8 has quit [Remote host closed the connection]
Jesin has joined #lisp
<pjb> nij: therefore it may be better, easier and more portable to open and close the stream in the thread that uses it.
silasfox has joined #lisp
<nij> I see :-) Thank you!
silasfox has quit [Client Quit]
undvrainbowvita8 has joined #lisp
wsinatra has joined #lisp
silasfox has joined #lisp
attosaurus has joined #lisp
theothornhill has quit [Ping timeout: 252 seconds]
bkst_ has joined #lisp
casual_friday has quit [Quit: %bye%]
Sheilong has joined #lisp
casual_friday has joined #lisp
aun has quit [Quit: Connection closed]
bkst has quit [Ping timeout: 246 seconds]
frost-lab has quit [Quit: Connection closed]
nature has joined #lisp
notzmv has quit [Ping timeout: 246 seconds]
notzmv has joined #lisp
notzmv is now known as Guest39486
contrapunctus has left #lisp ["Disconnected: closed"]
contrapunctus has joined #lisp
narimiran has quit [Ping timeout: 246 seconds]
Guest39486 has quit [Remote host closed the connection]
notzmv- has joined #lisp
OlCe has joined #lisp
theothornhill has joined #lisp
notzmv- is now known as notzmv
lowryder has quit [Ping timeout: 240 seconds]
lowryder has joined #lisp
oxum has joined #lisp
theothornhill has quit [Ping timeout: 240 seconds]
oxum has quit [Client Quit]
mokulus has quit [Quit: WeeChat 3.1]
yoonkn has quit [Remote host closed the connection]
xkapastel has joined #lisp
jonatack has quit [Ping timeout: 240 seconds]
theothornhill has joined #lisp
jonatack has joined #lisp
silasfox has quit [Ping timeout: 250 seconds]
actuallybatman has joined #lisp
lieven has joined #lisp
zooey has quit [Remote host closed the connection]
zooey has joined #lisp
orivej has quit [Ping timeout: 260 seconds]
<jcowan> beach: You asked about how C++ compilers do multiple inheritance. The answer is in Stroustrup's book, but more accessibly at https://shaharmike.com/cpp/vtable-part2/ (which is about clang, but gcc uses the same strategy)
niflce has joined #lisp
aartaka_d has joined #lisp
mokulus has joined #lisp
gigamonkey has joined #lisp
aartaka has quit [Ping timeout: 260 seconds]
klltkr has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<beach> That must have been some time ago, no?
<beach> But I seem to recall having read about a two-level vtable at some point.
<beach> What I do remember asking is whether the C++ standard requires a particular implementation. If not, they should replace their vtables and use my generic-dispatch technique instead. :)
cage_ has joined #lisp
<pfdietz> I really liked the code snippet idea for SICL presented at ELS.   This should make  SLOT-VALUE as fast as struct field access in common cases.
shifty has joined #lisp
jonatack has quit [Quit: jonatack]
<beach> pfdietz: Thanks! I do think it has great potential.
shifty has quit [Ping timeout: 265 seconds]
imode has joined #lisp
niflce has quit [Ping timeout: 240 seconds]
gigamonkey has quit [Ping timeout: 240 seconds]
jonatack has joined #lisp
andreyorst` has quit [Quit: andreyorst`]
remby has joined #lisp
gigamonkey has joined #lisp
gigamonkey has quit [Ping timeout: 260 seconds]
ldbeth has quit [Quit: ERC (IRC client for Emacs 27.1)]
mokulus has quit [Ping timeout: 240 seconds]
theothornhill has quit [Ping timeout: 246 seconds]
<jmercouris> hello everyone, Nyxt 2, pre-release 7 is now available: https://nyxt.atlas.engineer/article/release-2-pre-release-7.org
<jmercouris> I would appreciate any feedback about bugs since this is the final release we'll do before 2.0.0
silasfox has joined #lisp
lieven has quit [Read error: Connection reset by peer]
Spawns_Carpeting has quit [Quit: ZNC 1.7.2+deb3 - https://znc.in]
Spawns_Carpeting has joined #lisp
remby has quit [Quit: Connection closed]
theothornhill has joined #lisp
d00ouno has joined #lisp
d00ouno has left #lisp [#lisp]
indathrone has quit [Quit: Leaving]
gigamonkey has joined #lisp
<frgo> Hello all. I have that question again ... Yes, I know out there are thousands of Lisp interpreters written in C. But ... I am looking for recommendations from you people. I can use C or C++ - on ARM (this is going to be deployed on a XILINX ZYNG FPGA). So - anyone recommend a specific one? Big thanks!
lieven has joined #lisp
<jcowan> you might want to use a smaller Lisp or a subset of Common Lisp.
<jmercouris> Perhaps uLisp
<frgo> jcowan: Yep. True.
<frgo> jmercouris: Thx for the pointer.
<jcowan> uLisp looks very nice
gigamonkey has quit [Ping timeout: 260 seconds]
<frgo> Indeed!
skapata has joined #lisp
ebrasca has joined #lisp
<jcowan> There are some choices I would have made differently, like using defparameter rather than defvar, though in the environment they are the same thing.
<jcowan> It is also a Lisp-1 (FEEL THE BURN), although #' is ignored.
<frgo> jcowan: Yeah - that actually is acceptable for my pruposes.
long4mud has joined #lisp
gigamonkey has joined #lisp
heisig has quit [Quit: Leaving]
<scymtym> does anybody know whether the sources of the X3J13 cleanup issues which are referenced in dpANS and included in CLHS are available anywhere and if so under which terms? the "X3J13 document archives" link on http://www.nhplace.com/kent/CL/ looks promising but seems dead
gigamonkey has quit [Ping timeout: 240 seconds]
<edgar-rft> frgo: Tom Almy's XLISP-PLUS interpreter (original author is David Betz) is a Lisp-2 written in C -> https://almy.us/xlisp.html
andreyorst` has joined #lisp
eden has joined #lisp
<theothornhill> scymtym: I've been looking around as well, but couldn't find it either. Are you working on the dpANS now?
<scymtym> theothornhill: yes. did you already ask kmp about the issues?
<theothornhill> No, not yet. We've only been chatting about what to do with the dpANS itself. Still struggling a little with how to parse the thing "easily". Did you work on that, and if so, any progress?
<phoe> AFAIK the issues were collected by kmp himself and were posted into CLHS
<phoe> but they were not a part of X3J13
<phoe> so if anyone has it, then he has it
<theothornhill> I'll ask him then. Need to follow up his last mail anyways.
<nij> How to hack the reader or by handling error for #'read-from-string to return (1 (:unreadable "#<:abc>") (2 (:unreadable "#<:def>"))) while reading "(1 #<:abc> (2 #<:def>))" for example?
<Bike> you could change the reader macro on #< i guess
<nij> Namely, I want to replace each unreadable block by a plist (:unreadable STR-OF-APPEARANCE").
<phoe> !!
<phoe> theothornhill: scymtym: is this what we are looking for?
<theothornhill> phoe: scymtym at least I've found a million and two ways to parse the spec into unusable html...
<Bike> nij: that said, in general there is no way tell where to continue after a reader error
<nij> Oh.. I should really hack the reader macro < then :(
<theothornhill> phoe: That looks really interesting. I'll note down that link
<scymtym> phoe: possibly. i don't know about the legality of just taking it from there, though
<phoe> afaik they're in the same copyright state as dpans3, which is public domain
Spawns_Carpeting has quit [Ping timeout: 252 seconds]
<theothornhill> phoe: Thats what I understand as well. And if not, a suit seems very unlikely, given that most lisp vendors probably would want this to live on
markasoftware_ has quit [Ping timeout: 260 seconds]
<scymtym> phoe: looks very good. briefly comparing with CLHS, i didn't spot any differences so far
<phoe> perfect
orivej has joined #lisp
<frgo> edgar-rft: Thx for that pointer!
cracauer` has quit [Remote host closed the connection]
<pjb> frgo: depending on the capacity of your target, you may use ecl (which uses gcc to compile to binary). An alternative for smaller targets could be clicc, which is a CL translator to C, so you get C sources that you can compile on the target. A commercial product is MoCL (which targets Android and iOS, but C code is C code, you could use with other targets, if you provide the run-time library).
<pjb> clicc could do with some love.
<frgo> pjb: Thx! So many things to explore ...
<pjb> frgo: another alternative, is to do something similar to GOAL: use Common Lisp to generate the program for your target. Basically, you define your DSL, and write a translator or a compiler for your target.
<pjb> frgo: notably, writing a LAP assembler in lisp (ie. an assembler that takes sexps as input), lets you use then the lisp macro system to define a higher level language (you get the macro assembler for free from the assembler).
shifty has joined #lisp
<pjb> this can be a good solution if you need to go low-level, but you want to retain some abstraction.
nij has left #lisp ["ERC (IRC client for Emacs 27.2)"]
<frgo> pjb: Currently, we are exploring what we need - hence the requirement to have a REPL into a predefined set of primitives (those are generated by the platform definition file generated by XILINX Vivado when the bitstream is exported).
markasoftware has joined #lisp
gumman has quit [Ping timeout: 252 seconds]
<pjb> frgo: it's mostly a matter of memory. For a usable CL system, you would need at least 512 MB.
<pjb> But you can use a CL as a development environment to generate code for very small microcontrollers.
<pjb> You can implement in CL emulators, debuggers, generators, program provers, etc.
<frgo> Yep. We have 1 GB of flash and 4 GB of DDR3 RAM available on the board.
<pjb> Then you should be able to run a CL.
<pjb> ecl needs a unix system below to fork gcc, but it can also work without gcc, it has a byte compiler like clisp. You could use ecl/gcc to cross compile binaries, and use ecl without gcc on the board for the REPL and "scripting". clisp could be an alternative. But in anycase, you'd need to port the implementation to the target.
<edgar-rft> frgo: If I remember right then gilberth had a stripped-down XLISP interpreter suitable for running on microcontrollers, I don't see him here in the #lisp user list, but he's in #lispcafe
<frgo> uLisp seems to be something I want to try. I need to do some more reading... ;-)
<pjb> frgo: Marc Battyani at fractal concept uses CL to program FGPAs: http://www.fractalconcept.com/asp/JhHu/sdataQ0rXCq7mNwE1DM==/sdataQuEY-NQ=
shifty has quit [Ping timeout: 240 seconds]
shifty has joined #lisp
<frgo> Ah - Marc yes. I already forgot that - Thx!
markasoftware has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
markasoftware has joined #lisp
retropikzel has joined #lisp
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
shifty has quit [Ping timeout: 260 seconds]
john2gb0 has joined #lisp
DGASAU has quit [Ping timeout: 265 seconds]
whosit has quit [Ping timeout: 252 seconds]
nij has joined #lisp
<nij> How do I ":use" an un-exported symbol from #:cl in a package? (defpackage nij.service (:use :cl) (:import-from :cl :print-backtrace)) ;; <= this doesn't work
v88m has quit [Ping timeout: 260 seconds]
shifty has joined #lisp
nabataeus has joined #lisp
<nabataeus> what Lisp implementation would you guys recommend
Inline has joined #lisp
nij has quit [Remote host closed the connection]
DGASAU has joined #lisp
<jmercouris> nabataeus: SBCL
<jmercouris> or CCL
<jmercouris> it is all personal preference though
<nabataeus> what's the difference
<jmercouris> oh boy, I couldn't describe it to you in a short way
<jmercouris> there are many differences, for your purposes as a beginner, there is no difference
<nabataeus> do you have an essay about it?
<jmercouris> I don't have an essay about it
<jmercouris> nor do I know of any, maybe someone else does
<nabataeus> unfortunate
<jmercouris> trust me when I say, for you to be asking such a question, it is not yet relevant
<Inline> was ccl meant for OSX/Apple archs originally ?
<nabataeus> I don't think I'm really a beginner but I've trying to get the hang of it, I think I do understand the basic concepts of sexp and macros and such
<jmercouris> if you knew the answer, then it would be relevant
<jmercouris> Inline: you can look at the evolution of CCL
<Inline> so can i expect objc/cocoa in the backend ?
<Inline> ah
<jmercouris> Inline: there is no Cocoa inside of CCL
<Inline> ok
<jmercouris> CCL just comes with a great FFI framework that allows you to interface with Cocoa/Objective-C
<Inline> ok thank you
<jmercouris> No problem
ukari has quit [Remote host closed the connection]
ukari has joined #lisp
shifty has quit [Ping timeout: 268 seconds]
retropikzel has quit [Quit: Leaving]
<pjb> nij: cl doesn't export print-backtrace.
<pjb> (defpackage "FOO" (:use) (:intern "PRINT-BACKTRACE")) (defpackage "NIJ.SERVICE" (:use "COMMON-LISP") (:import-from "FOO" "PRINT-BACKTRACE")) (eq 'nij.service::print-backtrace 'foo::print-backtrace) #| --> t |#
<pjb> nij: and uiop/image:print-backtrace is exported from "UIOP": (eq 'uiop:print-backtrace 'uiop/image:print-backtrace) #| --> t |#
<pjb> nij: so you just need to use uiop.
<pjb> (defpackage "NIJ.SERVICE" (:use "COMMON-LISP" "UIOP"))
luckless_ has quit [Remote host closed the connection]
luckless_ has joined #lisp
notzmv has quit [Ping timeout: 240 seconds]
andreyorst` has quit [Ping timeout: 268 seconds]
contrapunctus has left #lisp ["Disconnected: closed"]
contrapunctus has joined #lisp
andreyorst` has joined #lisp
luckless_ has quit [Ping timeout: 240 seconds]
mokulus has joined #lisp
andreyorst` has quit [Ping timeout: 268 seconds]
andreyorst` has joined #lisp
gaqwas has joined #lisp
gaqwas has joined #lisp
notzmv has joined #lisp
notzmv is now known as Guest97962
zeroish has quit [Ping timeout: 240 seconds]
andrei-n has quit [Quit: Leaving]
gigamonkey has joined #lisp
zeroish has joined #lisp
<duuqnd> Well, after more work than I expected I can now plot pixels in Genera at what I think might be a reasonable speed but it also might not be.
gigamonkey has quit [Ping timeout: 252 seconds]
Sauvin has quit [Ping timeout: 240 seconds]
mokulus has quit [Quit: WeeChat 3.1]
yangby has joined #lisp
yangby has quit [Client Quit]
madage has quit [Ping timeout: 240 seconds]
srhm has joined #lisp
Wezl has joined #lisp
v88m has joined #lisp
madage has joined #lisp
<Wezl> anyone know if the f in setf stands for anything?
<duuqnd> Field I think?
<duuqnd> I know the q in setq stands for quote
CrashTestDummy2 has joined #lisp
<pjb> set form
<pjb> (setf (car x) 42) since (car x) is a form.
Nilby has joined #lisp
<pjb> It comes from MacLisp: http://www.maclisp.info/pitmanual/setf.html
<pjb> Of course, now CL uses "place" to name what (car x) denotes in setf. It's not really a form, since it's not evaluated.
CrashTestDummy has quit [Ping timeout: 260 seconds]
CrashTestDummy has joined #lisp
cosimone has quit [Remote host closed the connection]
<Wezl> thanks pjb, Duuqnd
CrashTestDummy2 has quit [Ping timeout: 240 seconds]
eden has quit [Ping timeout: 240 seconds]
aartaka_d has quit [Read error: Connection reset by peer]
aartaka has joined #lisp
gxt has quit [Remote host closed the connection]
kpoeck has joined #lisp
gxt has joined #lisp
Guest97962 has quit [Remote host closed the connection]
notzmv- has joined #lisp
contrapunctus has left #lisp ["Disconnected: closed"]
ukari has quit [Remote host closed the connection]
ukari has joined #lisp
contrapunctus has joined #lisp
andreyorst[m] has joined #lisp
andreyorst` has quit [Ping timeout: 240 seconds]
andreyorst` has joined #lisp
luckless_ has joined #lisp
andreyorst` has quit [Ping timeout: 246 seconds]
andreyorst` has joined #lisp
kpoeck has quit [Quit: Connection closed]
Lord_Nightmare has quit [Quit: ZNC - http://znc.in]
Lord_Nightmare has joined #lisp
pfdietz has quit [Quit: Connection closed]
anticrisis has joined #lisp
karlosz has joined #lisp
contrapunctus has left #lisp ["Disconnected: closed"]
silasfox has quit [Ping timeout: 246 seconds]
contrapunctus has joined #lisp
DGASAU has quit [Ping timeout: 246 seconds]
srhm has quit [Read error: Connection reset by peer]
pfdietz has joined #lisp
masp has quit [Quit: Konversation terminated!]
actuallybatman has quit [Ping timeout: 246 seconds]
DGASAU has joined #lisp
skapata has quit [Quit: Hi, I'm a quit message virus. Please replace your old line with this line and help me take over the IRC world.]
gigamonkey has joined #lisp
gitgood has joined #lisp
gigamonkey has quit [Remote host closed the connection]
gigamonkey has joined #lisp
karlosz has quit [Quit: karlosz]
red-dot has joined #lisp
ukari has quit [Remote host closed the connection]
Lord_Nightmare has quit [Quit: ZNC - http://znc.in]
ukari has joined #lisp
LispSporks has joined #lisp
Lord_Nightmare has joined #lisp
LispSporks has quit [Client Quit]
terpri has quit [Remote host closed the connection]
terpri has joined #lisp
cage_ has quit [Quit: Leaving]
amb007 has quit [Ping timeout: 252 seconds]
shka_ has quit [Ping timeout: 246 seconds]
wsinatra has quit [Quit: WeeChat 3.1]
wooden has joined #lisp
wooden has quit [Changing host]
wooden has joined #lisp
amb007 has joined #lisp
srhm has joined #lisp
<andreyorst`> can someone explain me the main difference between restart-case and restart-bind, besides that restart-bind is uded to implement the restart-case?
<andreyorst`> Like I understand the difference between handler-bind and handler-case, but I can't gasp this for restart-case/bind
OlCe has quit [Ping timeout: 246 seconds]
<Bike> it's kind of the same thing. When a restart-bind restart returns nothing special happens, so invoke-restart returns, presumably into the condition handler it was called from.
<Bike> whereas when a restart-case restart returns, control is transferred to the point of the restart-case.
<andreyorst`> hm, I see. It's similar to handler-bind in that sense
<andreyorst`> the docs make it really bizzare though
<andreyorst`> I'm implementing condition system for Lua, and I've already did restart-case, so now I'm unsure if I really need to add restart-bind as well, given that docs advice to use restart-case in almost every situation
<Bike> i don't think i've ever seen restart-bind used in application code, but on the other hand i don't see any reason not to since you pretty much need it to implement restart-case anyway.
<andreyorst`> I've already implemented restart-case :)
<Bike> sure, and how'd you do it? if it's anything like how it's done in lisp, some kind of dynamic binding of restart functions
<andreyorst`> yeah, I'm constructing fake dynamic scope at runtime with Lua tables, and do some trickery to turn errors into conditions that bubble up this fake dynamic scope stack
aartaka has quit [Ping timeout: 240 seconds]
<andreyorst`> then If I find the restart or handler, I know where to return
<Bike> restart-bind is really very primitive. It pretty much just dynamically binds functions, like how flet lexically binds them.
<Bike> well, if you implemented handler-bind you can't just return, can you?
<andreyorst`> not sure if I understood the question
<andreyorst`> I have implemented restart-case, handler-bind, handler-case, ignore-errors, and unwind-protect
<andreyorst`> and tried porting some examples from Common Lisp, it works exactly the same at the moment
<Bike> I mean, a handler done with handler-bind doesn't necessarily do any unwinding at all
<andreyorst`> yes
<Bike> So you're not "returning" to a handler
<andreyorst`> yes, I understand that
borodust has quit [Remote host closed the connection]
<Bike> so i misunderstood your explanation, aight.
<andreyorst`> I've meant that when handler in handler-bind calls the invoke-restart I know where to transfer the control
<andreyorst`> the trickiest part to implement was when handler inside handler bind itself signals the condition, I spent three days debugging C stack overflows :D
Inline has quit [Ping timeout: 260 seconds]
<andreyorst`> Bike: thanks for explanations of restart-bind. I think I will leave it out for now
<Bike> no problem
gaqwas has quit [Ping timeout: 240 seconds]
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
v88m has quit [Quit: Quit]
v88m has joined #lisp
skapata has joined #lisp
andreyorst` has quit [Quit: andreyorst`]
theothornhill has quit [Ping timeout: 260 seconds]
jfb4 has joined #lisp
andreyorst[m] has quit [Remote host closed the connection]
andreyorst[m] has joined #lisp
<jcowan> Legal question: who is the copyright owner of the dpANS?
Guest59707 has quit []
teej has joined #lisp
nature has quit [Ping timeout: 252 seconds]
andreyorst[m] is now known as andreyorst_
surabax has quit [Quit: Leaving]
kmeow has joined #lisp
hypercube has quit [Ping timeout: 258 seconds]
dhil has quit [Ping timeout: 268 seconds]
frgo has quit [Remote host closed the connection]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
frgo has joined #lisp
Spawns_Carpeting has joined #lisp
klltkr has joined #lisp
andreyorst_ has quit [Quit: WeeChat 3.0.1]
<jackdaniel> jcowan: afair it was deliberely released to public domain by authors before ansi standard was accepted
<jackdaniel> I think that this is described in detail on one of Kent Pitman website pages (don't remember which)
<jcowan> Excellent. The Interlisp group wants to reformat it in Interlisp style now that Interlisp is moving toward ANS CL support.
<jcowan> I know P.D. versions were released for ISLisp
Balooga_ has joined #lisp
<jcowan> I know that Xach has it online in the original TeX at Github, and the same content is online as HTML at https://mr.gy/ansi-common-lisp
hypercube has joined #lisp
Balooga_ has quit [Client Quit]
MarsIronPI has joined #lisp
<jackdaniel> you may also look for the cleaned up tex source - afair the repository is called clstandard-build on gitlab
<jackdaniel> that said you my find it by accessing cvberry.com on internet archive (for some reason domain expired and the site is not up anymore)
<jackdaniel> good night \o
Spawns_Carpeting has quit [Ping timeout: 252 seconds]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
Spawns_Carpeting has joined #lisp
random-nick has quit [Ping timeout: 240 seconds]
nabataeus has quit [Ping timeout: 268 seconds]
v88m has quit [Ping timeout: 246 seconds]
red-dot has joined #lisp
Spawns_Carpeting has quit [Remote host closed the connection]
Spawns_Carpeting has joined #lisp
borodust has joined #lisp
gigamonkey has quit [Remote host closed the connection]
pve has quit [Quit: leaving]
igemnace has joined #lisp