phoe changed the topic of #commonlisp to: Common Lisp, the #1=(programmable . #1#) programming language | Wiki: <https://www.cliki.net> | IRC Logs: <https://irclog.tymoon.eu/libera/%23commonlisp> | Cookbook: <https://lispcookbook.github.io/cl-cookbook> | Pastebin: <https://plaster.tymoon.eu/>
rgherdt has quit [Ping timeout: 256 seconds]
rgherdt has joined #commonlisp
wmblathers has joined #commonlisp
Oladon has joined #commonlisp
dmh has joined #commonlisp
varjag has quit [Quit: ERC 5.4.1 (IRC client for GNU Emacs 29.0.50)]
cosimone` has quit [Quit: ERC (IRC client for Emacs 27.1)]
azimut has quit [Ping timeout: 240 seconds]
azimut has joined #commonlisp
Everything has joined #commonlisp
Oladon has quit [Quit: Leaving.]
random-nick has quit [Ping timeout: 240 seconds]
dirtcastle has joined #commonlisp
s-liao has joined #commonlisp
s-liao has quit [Ping timeout: 256 seconds]
s-liao has joined #commonlisp
akoana has joined #commonlisp
notzmv has quit [Ping timeout: 250 seconds]
akoana has quit [Quit: leaving]
nckx has left #commonlisp [Leaving]
notzmv has joined #commonlisp
Catie has quit [Quit: heading home]
Guest23 has joined #commonlisp
Guest23 has quit [Client Quit]
ssafar has joined #commonlisp
pranavats has left #commonlisp [Error from remote client]
azimut has quit [Remote host closed the connection]
azimut has joined #commonlisp
Oladon has joined #commonlisp
<beach> Good morning everyone!
tyson2 has quit [Remote host closed the connection]
s-liao has quit [Ping timeout: 256 seconds]
semz has joined #commonlisp
semz_ has quit [Ping timeout: 250 seconds]
dirtcastle has quit [Ping timeout: 240 seconds]
dirtcastle has joined #commonlisp
Oladon has quit [Quit: Leaving.]
s-liao has joined #commonlisp
ec has quit [Ping timeout: 240 seconds]
ec has joined #commonlisp
waleee has quit [Ping timeout: 245 seconds]
s-liao has quit [Quit: Client closed]
s-liao has joined #commonlisp
s-liao has quit [Client Quit]
s-liao has joined #commonlisp
s-liao has quit [Ping timeout: 256 seconds]
s-liao has joined #commonlisp
euandreh has quit [Ping timeout: 245 seconds]
mogan90 has joined #commonlisp
<s-liao> beach do you have time to take a look?
amb007 has joined #commonlisp
<beach> Sure, give me a minute.
dirtcastle has quit [Ping timeout: 240 seconds]
<beach> What is .BIND?
<s-liao> (defun .bind (parser function)
<s-liao>   (lambda (input)
<s-liao>     (loop :for (value . input) :in (run parser input)
<s-liao>           :append (run (funcall function value) input))))
<beach> So I would have to study smug in order to understand why your code doesn't work?
<s-liao> Okay
<s-liao> Let me try the other case as well.
<beach> Maybe someone who already knows smug would be a better choice.
<s-liao> Yes
<s-liao> (setq qq (.bind (.item)
<s-liao>              (lambda (char)
<s-liao>                (.identity (list :char char)))))
<s-liao> Without the if and apply, it works
utis has quit [Ping timeout: 240 seconds]
<s-liao> Like (funcall qq "foo")
<beach> I think you need to give more information than "works"/"doesn't work".
utis has joined #commonlisp
<s-liao> Okay
<beach> But seriously, I am not the right person for this. I don't know smug, so I don't know what .bind does.
<s-liao> Me either.
<s-liao> The bind part, I have not get it yet
<s-liao> That is Okay
lisp123 has joined #commonlisp
<s-liao> Edit the content again at the linker https://plaster.tymoon.eu/view/2957#2957.
<beach> I am sorry do disappoint you, but it would require way too much work for me to understand this code, and since you are not giving us any error messages or anything, that makes it even harder. I just don't have that kind of time.
<ck_> I don't want to appear smug either (scnr), but maybe this is a good opportunity to get into the habit of debugging practices
<s-liao> Okay, you mean trace the function.
<ck_> I don't understand the code either, but I can see that for some of the function calls you have in the body of (.bind (.item) ...), you supply an argument, for some you don't, which looks a little suspicious to me not knowing any details
<s-liao> I just started.
v88m has joined #commonlisp
<ck_> go from the inside out, what do you expect the components to be called with? Call them by hand, see if they work, then build up larger pieces and so on
lisp123 has quit [Remote host closed the connection]
<s-liao> Yes.
lisp123 has joined #commonlisp
<ck_> beach: "rate my educating skills" :)
<beach> Heh!
<beach> s-liao: I think you are grossly overestimating the ability for someone like me to understand your code with that little information available. The very least you need to do is to supply the result of your code, and the result you expected. I also think that it might not be optimal if you are relatively new to the language to use an external library.
<White_Flame> also, the more you understand Common Lisp itself, the better suited you are to debug & understand what's going on, before having all these external complexities thrown at you
shka has joined #commonlisp
<beach> Exactly.
<s-liao> What I did in the code , just have the input of predicate.Then call the CLOSURE.
<s-liao> The other one does not need the predicate, then call the CLOSURE, it works
<s-liao> The first one has the Evaluation aborted
<s-liao> The second one does not have.
<beach> Again, the very least you need to do is to supply the error message when an error is signaled. Maybe you don't know how to interpret those messages yourself, but that is something you need to learn, and other people here use those messages as crucial clues to the problem.
<s-liao> They port this package into their package. This one is an originate verison of it. That is why I come into Common Lisp. try to understand it more naturally.
<beach> So if you don't supply those message, you are making life much harder for people who try to help you.
<s-liao> Okay. I put the Backtrace as well.
<s-liao> Maybe better there is one person have been working with this lib before.
karlosz_ has joined #commonlisp
lisp123 has quit [Remote host closed the connection]
karlosz has quit [Ping timeout: 256 seconds]
karlosz_ has quit [Ping timeout: 256 seconds]
<s-liao> I have requested one issue on the https://github.com/drewc/smug.
mogan90 has quit [Ping timeout: 256 seconds]
<s-liao> The issue number is 13.
lisp123 has joined #commonlisp
pranavats has joined #commonlisp
v88m has quit [Ping timeout: 240 seconds]
attila_lendvai has joined #commonlisp
aartaka has joined #commonlisp
lisp123 has quit [Remote host closed the connection]
attila_lendvai has quit [Ping timeout: 240 seconds]
hashfunc750 has joined #commonlisp
lisp123 has joined #commonlisp
wacki has joined #commonlisp
<hashfunc750> is there a way to access all the forms that the reader reads when it compiles a file?
igemnace has joined #commonlisp
<hashfunc750> like, is there a hook that i can use to somehow save that information?
hashfunc` has joined #commonlisp
<s-liao> why?
<beach> hashfunc750: I guess you could trace the READ function.
<hashfunc`> s-liao: i want to inspect the source code that the reader is reading
<s-liao> read the forms, then save it
<hashfunc`> beach: i like that approach
<hashfunc`> beach: i'll give it a try
hashfunc750 has quit [Ping timeout: 240 seconds]
<beach> There are typically going to be a lot of them.
<hashfunc`> s-liao: read the forms, then save it?
<hashfunc`> beach: ok, i'm ok with that
<beach> What is the purpose of this exercise? I mean, you could just look at the code and see every form in there.
<beach> No?
<hashfunc`> beach: i'm going to attempt to rearrange the source code
<beach> Like if you have (f (g a b) c) it is going to read f, g, a, b, (g a b), c, (f (g a b) c).
<beach> How is this information going to help you rearrange the code?
<hashfunc`> dang, i'll have to try to find a way around that problem
<beach> There is no problem.
<hashfunc`> i suppose that might not be a problem
amb007 has quit [Read error: Connection reset by peer]
<beach> Again, how is this information going to help you rearrange the code?
<hashfunc`> if i can introspect the forms then i can perform some analysis => rearrange the code based off of the results of said analysis
<hashfunc`> at least that's the plan so far
<beach> OK.
amb007 has joined #commonlisp
pve has joined #commonlisp
s-liao has quit [Ping timeout: 256 seconds]
<hashfunc`> or i might accidently overwrite my code
<hashfunc`> we shall see
<beach> If you don't care about it being the compiler that reads the code, you can call READ yourself on the code, and then you can use Eclector to have more options, like you can configure READ then to save your forms.
s-liao has joined #commonlisp
<hashfunc`> true true. but i think it would be the most practical to have workflow that goes: write-code => compile => code-is-rearranged
<hashfunc`> *to have a workflow that goes:
eugercek has joined #commonlisp
v88m has joined #commonlisp
<hashfunc`> it seems that tracing read isn't quite doing what i expect
<hashfunc`> i'm getting a bunch of swank stuff in my repl
<hashfunc`> (READ #<SB-IMPL::STRING-INPUT-STREAM {<memory-address>}> NIL #<SB-IMPL::STRING-INPUT-STREAM {<memory-address>}>)
<phoe> tracing a standard CL function is often undefined behavior though
<lisp123> hashfunc`: I did something a while back to record source info with sbcl / eclector
<lisp123> is that what you are after?
<lisp123> pjb: main website informatimago.com seems to be down btw
pranavats has left #commonlisp [Error from remote client]
<hashfunc`> lisp123: yeah @beach recommended that earlier. that seems like that may be the #1 option right now. & i'm looking at that repository you just linked. is that a differnt lisp implementation?
s-liao has quit [Ping timeout: 256 seconds]
<lisp123> no its something you can use in any Common Lisp
cage has joined #commonlisp
<hashfunc`> lisp123: ok, thanks
Brucio-61 has quit [Remote host closed the connection]
<pjb> lisp123: letsencrypt makes me miserable.
hashfunc` has quit [Ping timeout: 240 seconds]
amb007 has quit [Ping timeout: 256 seconds]
lisp123 has quit [Remote host closed the connection]
amb007 has joined #commonlisp
Dynom has joined #commonlisp
nature has joined #commonlisp
aartaka has quit [Ping timeout: 256 seconds]
aartaka has joined #commonlisp
Brucio-61 has joined #commonlisp
eugercek has quit [Read error: Connection reset by peer]
eugercek has joined #commonlisp
lisp123 has joined #commonlisp
lisp123 has quit [Ping timeout: 256 seconds]
v88m has quit [Remote host closed the connection]
v88m has joined #commonlisp
v88m has quit [Read error: Connection reset by peer]
v88m has joined #commonlisp
random-nick has joined #commonlisp
mgl has joined #commonlisp
azimut has quit [Ping timeout: 240 seconds]
azimut has joined #commonlisp
<qhong> Is there a way/hack to access a shadowed lexical variable?
<jmes> qhong: I guess you could bind it to something else at the same time you shadow it. Dunno if that works for what you have in mind
<qhong> jmes: Yes just thinking about the same thing. Was not sure about any performance penalty though, is SBCL clever enough to not allocating a new variable when (let ((x y)) ...) or not?
s-liao has joined #commonlisp
shka has quit [Quit: Konversation terminated!]
pranavats has joined #commonlisp
<jmes> I'm not sure about the under-the-hood memory management, but I'm sure many others here do
<mfiano> Something has to be allocated somewhere. We're talking about memory here.
<mfiano> It depends on SBCL's register allocator whether it is register or stack allocated.
<mfiano> In either case, I wouldn't worry about performance.
<mfiano> You might want to ask questions related to implementations in their respective forums though. Common Lisp doesn't specify how memory is allocated.
s-liao has quit [Ping timeout: 256 seconds]
s-liao has joined #commonlisp
s-liao has quit [Quit: Client closed]
euandreh has joined #commonlisp
pranavats has left #commonlisp [Error from remote client]
ec has quit [Ping timeout: 240 seconds]
ec has joined #commonlisp
amb007 has quit [Ping timeout: 256 seconds]
amb007 has joined #commonlisp
mrcom has quit [Quit: This computer has gone to sleep]
<gin> sbcl error messages do not show line numbers. without them how do you know where in the code you need to go to debug?
Everything has quit [Quit: leaving]
<beach> You use SLIME and you hit `v' (I think, my fingers know it) on the stack frame you want to look at.
aartaka has quit [Ping timeout: 272 seconds]
aartaka has joined #commonlisp
<gin> thanks beach
<beach> Pleasure.
tyson2 has joined #commonlisp
pranavats has joined #commonlisp
treflip has joined #commonlisp
|3b| has quit [Remote host closed the connection]
|3b| has joined #commonlisp
aartaka has quit [Ping timeout: 272 seconds]
aartaka has joined #commonlisp
Cena has joined #commonlisp
anticomputer has quit [Remote host closed the connection]
anticomputer has joined #commonlisp
Brucio-61 has quit [Quit: Test]
Brucio-61 has joined #commonlisp
aartaka has quit [Ping timeout: 250 seconds]
waleee has joined #commonlisp
aartaka has joined #commonlisp
aartaka has quit [Ping timeout: 272 seconds]
tyson2 has quit [Remote host closed the connection]
mrcom has joined #commonlisp
aartaka has joined #commonlisp
mrcom has quit [Quit: This computer has gone to sleep]
alfonsox has joined #commonlisp
lisp123mobile has joined #commonlisp
c has joined #commonlisp
<lisp123mobile> pjb: Yeah its a pain. I found cloudflare (free tier) to be really good because it takes care of SSL for you
c is now known as Common-Lisp
lisp123mobile has quit [Remote host closed the connection]
lisp123mobile has joined #commonlisp
lisp123mobile has quit [Remote host closed the connection]
mrcom has joined #commonlisp
tyson2 has joined #commonlisp
Cena has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mrcom has quit [Quit: This computer has gone to sleep]
pranavats has left #commonlisp [Error from remote client]
pranavats has joined #commonlisp
aartaka has quit [Ping timeout: 256 seconds]
aartaka has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
cosimone has joined #commonlisp
tyson2 has joined #commonlisp
utis has quit [Ping timeout: 272 seconds]
mgl has quit [Ping timeout: 256 seconds]
utis has joined #commonlisp
aartaka has quit [Ping timeout: 272 seconds]
aartaka has joined #commonlisp
jeosol has joined #commonlisp
mrcom has joined #commonlisp
aartaka has quit [Ping timeout: 256 seconds]
aartaka has joined #commonlisp
mrcom has quit [Quit: This computer has gone to sleep]
aartaka has quit [Ping timeout: 240 seconds]
aartaka has joined #commonlisp
Cena has joined #commonlisp
Cena has quit [Client Quit]
azimut has quit [Remote host closed the connection]
azimut has joined #commonlisp
pjb has quit [Read error: Connection reset by peer]
pranavats has left #commonlisp [Error from remote client]
pranavats has joined #commonlisp
pranavats has left #commonlisp [Disconnected: Replaced by new connection]
pranavats has joined #commonlisp
unyu has quit [Quit: Reboot.]
alfonsox has quit [Remote host closed the connection]
igemnace has quit [Remote host closed the connection]
eugercek has quit [Read error: Connection reset by peer]
unyu has joined #commonlisp
eugercek has joined #commonlisp
v88m has quit [Ping timeout: 240 seconds]
v88m has joined #commonlisp
v88m has quit [Read error: Connection reset by peer]
aartaka has quit [Ping timeout: 250 seconds]
aartaka has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
karlosz has joined #commonlisp
amb007 has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
karlosz has quit [Client Quit]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
igemnace has joined #commonlisp
specbot has quit [Remote host closed the connection]
minion has quit [Read error: Connection reset by peer]
specbot has joined #commonlisp
minion has joined #commonlisp
Lord_of_Life_ has joined #commonlisp
Lord_of_Life has quit [Ping timeout: 240 seconds]
Lord_of_Life_ is now known as Lord_of_Life
treflip has quit [Quit: good night]
kevingal has joined #commonlisp
recordgroovy has joined #commonlisp
frgo has joined #commonlisp
Common-Lisp has quit [Quit: Leaving]
orestarod has joined #commonlisp
gxt has quit [Ping timeout: 240 seconds]
gxt has joined #commonlisp
akoana has joined #commonlisp
Cena has joined #commonlisp
Cena has quit [Client Quit]
v88m has joined #commonlisp
cage has quit [Quit: rcirc on GNU Emacs 27.1]
wacki has quit [Quit: Leaving.]
cosimone has quit [Quit: ERC (IRC client for Emacs 27.1)]
aartaka has quit [Ping timeout: 272 seconds]
euandreh has quit [Ping timeout: 250 seconds]
euandreh has joined #commonlisp
hashfunc750 has joined #commonlisp
pranavats has left #commonlisp [Disconnected: Replaced by new connection]
pranavats has joined #commonlisp
<hashfunc750> because the package is locked? now I'm at a loss
<hashfunc750> i want to debug ... compile-file ... in slime, but i'm not quite sure how to go about it. in the repl, i tried wrapping a call to it like so: ... (progn (break) (compile-file "~file.lisp")) ... that got me in the debugger, but stepping or nexting would immediately finish the execution. not what i want. so i went to the file that compile-file is defined in and tried compiling the function with max debug settings, but that doesn'
eugercek has quit [Remote host closed the connection]
<phoe> hashfunc750: how do you want to debug it?
<phoe> if anything, you can (eval-when (:compile-toplevel) (break)) but I have no idea how that helps you
Cena has joined #commonlisp
<hashfunc750> phoe: how do i want to debug it? i want to step through it. i want to watch the flow of execution. i want to see what is going on.
yewscion has joined #commonlisp
ec has quit [Quit: ec]
<hashfunc750> phoe: i see what you meant. sorry. yeah ... (eval-when (:compile-toplevel) (break)) ... doesn't do the trick
<phoe> compile-file simply goes through every form and compiles it, and then produces a fasl file
<phoe> if you want to debug that, debug the individual forms
dirtcastle has joined #commonlisp
dirtcastle has quit [Client Quit]
<hashfunc750> phoe: i want to debug the actual compilation process
<hashfunc750> i want to debug the function `compile-file`
<hashfunc750> and all of its subforms thereof
<phoe> this is diving into implementation-specific details
<hashfunc750> that is ok with me
<phoe> debugging the compiler itself is generally complex stuff
<hashfunc750> unless there's a standard way of extracting what the reader is reading
<_death> if compile-file and the functions it uses are compiled with debug information, you can (step (compile-file "..."))
<hashfunc750> _death: yeah i tried to compile `compile-file` with debug information, but i get the error that the package is locked
<_death> well, there is a restart to unlock the package
<phoe> wait, you tried to replace cl:compile-file with something else?
<hashfunc750> _death: tried that and still got errors
<hashfunc750> phoe: that right there is an idea
<hashfunc750> phoe: not sure what to replace with tho
<phoe> no, I mean, it's generally undefined behavior
<_death> "got errors" is not very descriptive
<hashfunc750> _death: i know. i'll try it again rn
<hashfunc750> _death: brb
yewscion has quit [Ping timeout: 240 seconds]
<hashfunc750> _death: that works! i guess i never tried the "unlock" option...
<_death> btw there's a :trace-file argument to sbcl compile-file that may be helpful
<hashfunc750> _death: i tried that yesterday, but i didn't get anything useful from it; unless i was using that wrong as well
<_death> see the docstring for details
hashfunc750 has quit [Remote host closed the connection]
<_death> you may also want to check out :sb-show feature.. probably #sbcl can help you further
Dynom has quit [Quit: WeeChat 3.4]
\f has quit [Killed (NickServ (GHOST command used by form_feed!4c1975b719@user/f/x-7101985))]
form_fee- has joined #commonlisp
pranavats has left #commonlisp [Disconnected: Received SIGTERM]
Fare has joined #commonlisp
\f has joined #commonlisp
pranavats has joined #commonlisp
perrierjouet has quit [Quit: WeeChat 3.4]
pve has quit [Quit: leaving]
perrierjouet has joined #commonlisp
kevingal has quit [Remote host closed the connection]
lisp123 has joined #commonlisp
lisp123 has quit [Ping timeout: 256 seconds]
nature has quit [Ping timeout: 272 seconds]