jackdaniel 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/>
attila_lendvai has quit [Ping timeout: 260 seconds]
waleee has quit [Ping timeout: 264 seconds]
anticomputer has quit [Ping timeout: 255 seconds]
azimut has quit [Ping timeout: 255 seconds]
ec_ has quit [Ping timeout: 255 seconds]
tyson2 has quit [Remote host closed the connection]
anticomputer has joined #commonlisp
azimut has joined #commonlisp
ec_ has joined #commonlisp
waleee has joined #commonlisp
Oladon has quit [Quit: Leaving.]
Oladon has joined #commonlisp
random-nick has quit [Ping timeout: 256 seconds]
Devon has joined #commonlisp
azimut_ has joined #commonlisp
azimut has quit [Ping timeout: 255 seconds]
kg7ski has quit [Ping timeout: 248 seconds]
kg7ski- has joined #commonlisp
attila_lendvai_ has quit [Read error: Connection reset by peer]
attila_lendvai_ has joined #commonlisp
Devon has quit [Ping timeout: 256 seconds]
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij- has joined #commonlisp
nij_ has left #commonlisp [#commonlisp]
nij- has quit [Client Quit]
nij- has joined #commonlisp
tyson2 has joined #commonlisp
perrierjouet has quit [Quit: WeeChat 3.7.1]
perrierjouet has joined #commonlisp
attila_lendvai_ has quit [Ping timeout: 260 seconds]
Oladon has quit [Quit: Leaving.]
eddof13 has joined #commonlisp
eddof13 has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
dsx has quit [Remote host closed the connection]
pjb has quit [Ping timeout: 265 seconds]
azimut_ has quit [Ping timeout: 255 seconds]
azimut has joined #commonlisp
notzmv has joined #commonlisp
Catie has joined #commonlisp
<nij-> In the inspector, I can interact with a hash-table #<HASH-TABLE {701B90B183}>. It would be nice if I can interact programmatically with it from this point. However, #<..> is unreadable. Is there any hack that I can refer to it?
<Bike> the slime inspector?
<nij-> I use sly, but I think they are almost the same.
<nij-> I don't mind using sbcl special construct. I know the address right? There should be a hacky way..?
<nij-> Address: {701B90B183}
<thuna`> You can do it in slime by pressing RET on the output
<Bike> never use the address of anything.
<thuna`> I looked at sly but it doesn't seem like it looks
<thuna`> s/looks/works/
<Bike> in slime, e does slime-inspector-eval, and i believe in the evaluated form * is bound to the object being inspected.
<nij-> thuna could you plz M-x describe-key and see what function RET invokes?
<thuna`> In slime?
<nij-> Yes
<Bike> i don't know if eval is what you mean by "interact programmatically"
<thuna`> slime-repl-return
<thuna`> It's a dwim function it looks like
<thuna`> The function it calls on an old input is slime-repl-grab-old-input
<nij-> Bike in sly * bounds to the last returned object in the mrepl..
<Bike> i think nij- is talking about the inspector, not the repl.
<thuna`> Oh, my bad in that case
<nij-> I did press e in the inspector.
<thuna`> Also, * is a handy thing to know
<Bike> the sly manual says e works like slime e.
<Bike> so, if * is not bound to the inspected object, file a bug
<nij-> Oh wait! Bike, you're right.
<nij-> I used defvar instead of defparameter so it doesn't change *TMP*.
<Bike> ah, i see.
<nij-> Yay. Thanks :D
<Bike> no problemo.
ebrasca has quit [Remote host closed the connection]
thuna` has quit [Read error: Connection reset by peer]
akoana has quit [Quit: leaving]
paulapatience has joined #commonlisp
pranavats has left #commonlisp [Error from remote client]
Inline_ has joined #commonlisp
Alfr has quit [Killed (calcium.libera.chat (Nickname regained by services))]
Alfr has joined #commonlisp
mingus1 has joined #commonlisp
kg7ski has joined #commonlisp
semz_ has joined #commonlisp
jrm2 has joined #commonlisp
pieguy128_ has joined #commonlisp
paulapatience has quit [Remote host closed the connection]
cdegroot_ has joined #commonlisp
hrberg_ has joined #commonlisp
froggey-1 has joined #commonlisp
Bike_ has joined #commonlisp
tetsuo91 has joined #commonlisp
terrorjack7 has joined #commonlisp
thonkpod_ has joined #commonlisp
kg7ski- has quit [Ping timeout: 256 seconds]
mingus has quit [Ping timeout: 256 seconds]
Inline has quit [Ping timeout: 256 seconds]
cdegroot has quit [Ping timeout: 256 seconds]
mingus1 is now known as mingus
thonkpod has quit [Ping timeout: 256 seconds]
notzmv has quit [Ping timeout: 256 seconds]
perrierjouet has quit [Ping timeout: 256 seconds]
tetsuo9 has quit [Ping timeout: 256 seconds]
Bike has quit [Ping timeout: 256 seconds]
terrorjack has quit [Ping timeout: 256 seconds]
hrberg has quit [Ping timeout: 256 seconds]
pieguy128 has quit [Ping timeout: 256 seconds]
semz has quit [Ping timeout: 256 seconds]
jrm has quit [Ping timeout: 256 seconds]
froggey has quit [Ping timeout: 256 seconds]
jrm2 is now known as jrm
semz_ is now known as semz
terrorjack7 is now known as terrorjack
son0p has quit [Ping timeout: 256 seconds]
notzmv has joined #commonlisp
son0p has joined #commonlisp
perrierjouet has joined #commonlisp
Bike_ is now known as Bike
terrorjack has quit [Quit: The Lounge - https://thelounge.chat]
terrorjack has joined #commonlisp
Catie has quit [Remote host closed the connection]
Catie has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
pranavats has joined #commonlisp
pranavats has left #commonlisp [Disconnected: Replaced by new connection]
pranavats has joined #commonlisp
waleee has quit [Ping timeout: 260 seconds]
bilegeek has joined #commonlisp
aartaka has joined #commonlisp
azimut has quit [Ping timeout: 255 seconds]
azimut has joined #commonlisp
m5zs7k has quit [Ping timeout: 260 seconds]
igemnace has joined #commonlisp
m5zs7k has joined #commonlisp
pdietz has quit [Quit: Client closed]
Cymew has joined #commonlisp
Brucio-61 has quit [Read error: Connection reset by peer]
scymtym has quit [Remote host closed the connection]
Brucio-61 has joined #commonlisp
scymtym has joined #commonlisp
rgherdt has joined #commonlisp
aartaka has quit [Ping timeout: 260 seconds]
pve has joined #commonlisp
jeosol has quit [Quit: Client closed]
m5zs7k has quit [Ping timeout: 246 seconds]
<pve> So I had a chat with ChatGPT. Apparently it knows CL. I'm not sure what to make of this, other than being blown away.
azimut has quit [Ping timeout: 255 seconds]
m5zs7k has joined #commonlisp
enzuru has quit [Quit: ZNC 1.8.2 - https://znc.in]
enzuru has joined #commonlisp
scymtym has quit [Ping timeout: 246 seconds]
Brucio-61 has quit [Ping timeout: 260 seconds]
Brucio-61 has joined #commonlisp
MajorBiscuit has joined #commonlisp
aartaka has joined #commonlisp
MajorBiscuit has quit [Client Quit]
MajorBiscuit has joined #commonlisp
<mfiano> I usually shrug off these AI things, but consider mind blown.
<hayley> I got it to write a decent amount of a mark-sweep collector; when asked how it might prefetch, it came up with Boehm's prefetch-on-grey. But the results were subtly wrong unless I asked several follow-up questions.
shka has joined #commonlisp
pjb has joined #commonlisp
<hayley> (However, it fails completely at any other algorithm.)
<_death> it's shrdlu 2022.. also, gets THEREIS wrong ;)
<hayley> "Can we have program synthesis?" "We have program synthesis at home" The program synthesis at home:
<pve> _death: yep, also the "note" for contains-at-least-two-terms is wrong
<pve> funny how the code is basically ok, but the explanations are off
<_death> it's same old association + recurrence.. the results are impressive because the training dataset was huge and there's some "hole filling" (unlike the old rule based systems) but there's nothing new otherwise
<pve> still, I think I need this inside emacs :)
<_death> I guess a next step would be to have it continue learning from human feedback, although the underlying technology makes this a challenge
azimut has joined #commonlisp
m5zs7k has quit [Ping timeout: 265 seconds]
m5zs7k has joined #commonlisp
<_death> wait.. you said the code was ok for contains-at-least-two-terms? I guess you don't mean the last function
<_death> ah, I had a different query in mind.. the query resolved the ambiguity
<pve> _death: I was referring to the part about "... this function will return T if the input string contains the same term multiple times ..."
<pve> I don't think the function it gave works like that
<pve> uhh.. right? :)
<pve> i.e. it needs two distinct terms to occur
<_death> right.. and also the description for the last query is wrong.. you ask for at least two terms of the same kind (the code is right) but the description is about "two terms related to either wind power or solar power"
<pve> ah, that's right, good catch
bilegeek has quit [Quit: Leaving]
aartaka has quit [Ping timeout: 256 seconds]
aartaka has joined #commonlisp
aartaka has quit [Ping timeout: 256 seconds]
aartaka has joined #commonlisp
Lord_of_Life_ has joined #commonlisp
Lord_of_Life has quit [Ping timeout: 252 seconds]
Lord_of_Life_ is now known as Lord_of_Life
cosimone has joined #commonlisp
aartaka has quit [Ping timeout: 265 seconds]
aartaka has joined #commonlisp
epony has quit [Quit: QUIT]
aartaka has quit [Ping timeout: 268 seconds]
aartaka has joined #commonlisp
pranavats has left #commonlisp [Disconnected: Hibernating too long]
pranavats has joined #commonlisp
frgo_ has joined #commonlisp
Jach has joined #commonlisp
frgo has quit [Ping timeout: 260 seconds]
ec_ has quit [Ping timeout: 255 seconds]
gxt has quit [Ping timeout: 255 seconds]
ec_ has joined #commonlisp
gxt has joined #commonlisp
Brucio-61 has quit [Ping timeout: 260 seconds]
ttree has quit [Ping timeout: 265 seconds]
Inline_ has quit [Quit: Leaving]
Brucio-61 has joined #commonlisp
mingus has quit [Ping timeout: 252 seconds]
scymtym has joined #commonlisp
random-nick has joined #commonlisp
_cymew_ has joined #commonlisp
ec_ has quit [Remote host closed the connection]
ec_ has joined #commonlisp
froggey-1 is now known as froggey
seletz has joined #commonlisp
OlCe has quit [Ping timeout: 260 seconds]
<pve> The other day I was wondering if it would be possible to export symbols by capitalizing them (as in some other languages). I think I finally got it to work in such a way that everything still works smoothly in slime :)
<phoe> crazy and heretical
<pve> haha
<phoe> I love it
<pve> before, jump to definition would complain about mismatched forms or something, but by placing the export last in the file, jump to definition works as usual
<pve> this is something I might consider using for one-package-per-file, where I sometimes end up juggling the exports a bit too much for my taste
aartaka has quit [Ping timeout: 268 seconds]
aartaka has joined #commonlisp
epony has joined #commonlisp
jmdaemon has quit [Ping timeout: 264 seconds]
Inline has joined #commonlisp
OlCe has joined #commonlisp
<scymtym> pve: i'm not sure what MAKE-BUFFERING-READTABLE does but MAP-TREE-LEAVES looks like it would choke on something like #1=(… #1# …) in the source code
<pve> oh, it's this:
<pve> scymtym: ah you're right
<pve> :(
cage has joined #commonlisp
<pve> I always thought doing what buffering-readtable is doing was impossible, so I'm pretty proud that I even made it that far
son0p has quit [Ping timeout: 260 seconds]
<scymtym> you can extend the approach by keeping a table of already processed/currently being processed nodes. for circular structure, you can insert markers and replace them in a fixup step. not trivial but all CL readers manage to do it
son0p has joined #commonlisp
<pve> scymtym: ok that's good to hear
MajorBiscuit has quit [Ping timeout: 260 seconds]
<scymtym> is the buffering readtable restricted to a set of characters specified at creation time?
<pve> yeah it takes a :characters argument, with a default value of all standard-char
<scymtym> thanks for confirming
<pjb> pve: symbols are case sensitive. If you want to export (defstruct |Foo| |field| field |fiEld|), you will have to obtain: (:export "COPY-Foo" "FIELD" "Foo" "Foo-FIELD" "Foo-P" "Foo-fiEld" "Foo-field" "MAKE-Foo" "fiEld" "field")
<pjb> s/"FIELD"//
<pve> pjb: good point about the struct slots
sedzcat has joined #commonlisp
<pve> pjb: This hack is currently incompatible with the |...| syntax. It could possibly work with a custom function for #\|, but I haven't really thought about it.
tyson2 has joined #commonlisp
<pve> basically if |...| is encountered, take the symbol as-is, don't export, don't upcase, and let the user deal with exporting that symbol if necessary.
kathe has joined #commonlisp
<kathe> hi all. :)
<kathe> is phoe around?
<kathe> just want to let phoe know that i've just placed an order for his book. :)
epony has quit [Ping timeout: 268 seconds]
<phoe> <3
<phoe> most glad to hear this, hope it serves you well
<kathe> knowing what-ever little i know of you, i am sure it will serve me well. :)
<kathe> are you open to receiving suggestions for more titles on common lisp?
<phoe> yes, but I'm unlikely to implement them in the near future
<kathe> i wouldn't consider 5 years out as the near future. ;)
Cymew has quit [Ping timeout: 260 seconds]
<kathe> anyways, after you finish contemplating over my previous request for clos book, would you please consider thinking about a book which teaches how to implement an algorithm the common lisp way.
<kathe> dang, it should have ended with a question-mark.
<kathe> i really need to get going with irssi instead of ircii.
<phoe> beach already has something along these lines as a long-standing WIP
epony has joined #commonlisp
<kathe> oh, cool. hadn't know about it. i've been away studying hard.
<kathe> okay, i gotta go now, time to fill water in the overhead tanks.
kathe has quit [Quit: Leaving]
<phoe> kathe: there is also a book by vseloved
<phoe> progalgs in lisp
random-nick has quit [Ping timeout: 260 seconds]
pdietz has joined #commonlisp
<beach> "Vsevolod" I think it is, no?
<phoe> yes, but vseloved is his nickname
<beach> Oh! Nice one!
<beach> I didn't know he hangs out on IRC.
<phoe> well, AFAIK he doesn't
<beach> Heh, OK.
<pdietz> Some of us do so only occasionally.
<beach> Indeed.
<sbenitezb_> ChatGPT: "write a common lisp program that implements the functionality of chatgpt"
<sbenitezb_> Waiting for the answer :D
sedzcat has quit [Quit: sedzcat]
Devon has joined #commonlisp
Inline has quit [Remote host closed the connection]
_cymew_ has quit [Ping timeout: 265 seconds]
_cymew_ has joined #commonlisp
MajorBiscuit has joined #commonlisp
Inline has joined #commonlisp
nij- has quit [Ping timeout: 255 seconds]
Cymew has joined #commonlisp
_cymew_ has quit [Ping timeout: 260 seconds]
aartaka has quit [Ping timeout: 264 seconds]
gjvc has quit [Quit: leaving]
aartaka has joined #commonlisp
MajorBiscuit has quit [Ping timeout: 256 seconds]
_cymew_ has joined #commonlisp
Cymew has quit [Ping timeout: 268 seconds]
jeosol has joined #commonlisp
cage has quit [Remote host closed the connection]
_cymew_ has quit [Quit: Konversation terminated!]
<dbotton> sbenitezb_: (load "eliza.lisp")
<jackdaniel> I have a rare stroke of inspiration, big programs (ue systems) should ve bloaded!
<jackdaniel> (asdf:bload "mcclim") ;)
<phoe> nice
nij- has joined #commonlisp
attila_lendvai_ has joined #commonlisp
<nij-> sbenitezb_> It will likely just confidently gives you a wrong answer.
<nij-> I asked ChatGPT to compute the homotopy groups of spheres, and then it gives me a function that computes factorial n!.
_cymew_ has joined #commonlisp
<sbenitezb_> It's still computing an answer, I suppose that's what the triple loading dots are for, unless it expects more input from me
aartaka has quit [Ping timeout: 252 seconds]
aartaka has joined #commonlisp
varjag has quit [Quit: ERC (IRC client for Emacs 27.1)]
son0p has quit [Remote host closed the connection]
son0p has joined #commonlisp
azimut has quit [Ping timeout: 255 seconds]
Devon has quit [Ping timeout: 256 seconds]
<_death> (vsevoload "algorithm")
dnaeon has joined #commonlisp
sbenitezb_ has quit [Quit: Textual IRC Client: www.textualapp.com]
kaskal has quit [Quit: ZNC - https://znc.in]
kaskal has joined #commonlisp
<mfiano> After using it, I'm not as impressed.
<nij-> Yeah. Same feeling.
<nij-> It's very good at holding a conversation, as long as the questions are somehow asked on the internet before. For example, things like "What's your take on a certain issue." However, it cannot go deeper. What it has to offer were almost all written somewhere in the internet.
<nij-> In particular, it cannot do simple math and simple logical deduction correctly.
<mfiano> It seems to have a bias towards wanting to start a new subject, and fails to understand clues in the query to retain the context.
attila_lendvai_ has quit [Ping timeout: 256 seconds]
varjagg has joined #commonlisp
kaskal has quit [Quit: ZNC - https://znc.in]
kaskal has joined #commonlisp
lisp123 has joined #commonlisp
anticomputer has quit [Ping timeout: 255 seconds]
gxt has quit [Ping timeout: 255 seconds]
ec_ has quit [Ping timeout: 255 seconds]
anticomputer has joined #commonlisp
gxt has joined #commonlisp
ec_ has joined #commonlisp
lisp123 has quit [Ping timeout: 252 seconds]
attila_lendvai_ has joined #commonlisp
makomo has quit [Ping timeout: 268 seconds]
igemnace has quit [Remote host closed the connection]
aartaka has quit [Ping timeout: 256 seconds]
aartaka has joined #commonlisp
causal has quit [Quit: WeeChat 3.7.1]
makomo has joined #commonlisp
aartaka has quit [Ping timeout: 260 seconds]
lisp123 has joined #commonlisp
nij- has quit [Remote host closed the connection]
nij- has joined #commonlisp
son0p has quit [Remote host closed the connection]
aartaka has joined #commonlisp
dnaeon has quit []
lisp123 has quit [Ping timeout: 256 seconds]
gxt has quit [Remote host closed the connection]
gxt has joined #commonlisp
jolby has joined #commonlisp
jeosol has quit [Quit: Client closed]
Lycurgus has joined #commonlisp
cosimone has quit [Ping timeout: 260 seconds]
cage has joined #commonlisp
sbenitezb_ has joined #commonlisp
ebrasca has joined #commonlisp
gjvc has joined #commonlisp
thuna` has joined #commonlisp
varjagg has quit [Ping timeout: 260 seconds]
Lycurgus has quit [Quit: Exeunt https://tinyurl.com/4m8d4kd5]
ttree has joined #commonlisp
nij- has quit [Ping timeout: 264 seconds]
son0p has joined #commonlisp
son0p has quit [Remote host closed the connection]
<remexre> is there a version of iterate:with but that makes a flet/labels instead of a let*?
son0p has joined #commonlisp
aartaka has quit [Ping timeout: 256 seconds]
aartaka has joined #commonlisp
varjagg has joined #commonlisp
Inline has quit [Remote host closed the connection]
tyson2 has quit [Remote host closed the connection]
Inline has joined #commonlisp
dnaeon has joined #commonlisp
<Josh_2> pve: Someone I know sent a code snippet of it translating some Python into CL, needless to say it got it wrong
<Josh_2> Used a loop to create an alist then used gethash to access it :shrug:
attila_lendvai_ has quit [Ping timeout: 252 seconds]
dnaeon has quit []
ttree has quit [Read error: Connection reset by peer]
ttree has joined #commonlisp
random-nick has joined #commonlisp
<Josh_2> Has anyone used this https://github.com/pve1/incongruent-methods ?
<Josh_2> Overloaded methods would be quite useful, saves having to use a plist or something similar in a &rest
<Josh_2> or a special args variable
<thuna`> Is there a simple way to add custom forms to DECLARE? (Just within a single macro is fine too)
029AAI9YL has joined #commonlisp
<Bike> thuna`: what do you mean?
029AAI9YL has quit [Remote host closed the connection]
<thuna`> Bike: I have a DEFINE-* macro, and I wanted the arguments' types to be written using (DECLARE (ARGUMENT-TYPE...)).
<Bike> in a different way from how that usually works?
<Bike> you can do (defun foo (bar) (declare (fixnum bar)) ...), but you presumably mean something else. do you want the literal symbol ARGUMENT-TYPE?
<thuna`> Yeah, I guess I should have made that clear. The form is (ARGUMENT-TYPE type symbol...)
<thuna`> Type doesn't have anything to do with normal common lisp types
<Bike> okay. since this is your defining macro, you can just do whatever processing you want to do yourself. something like alexandria:parse-body will let you get the declarations, and then you can remove and process the argument-type declarations, passing the rest onto the usual lisp semantics.
euandreh has joined #commonlisp
<thuna`> Hmm, I guess that is the way to go. Alright then.
aartaka has quit [Ping timeout: 256 seconds]
akoana has joined #commonlisp
aartaka has joined #commonlisp
_cymew_ has quit [Ping timeout: 256 seconds]
<thuna`> This mentions SWANK documentation but does anyone have a link? I searched a bit but nothing I found mentioned indentation. https://shinmera.github.io/trivial-indent/
tyson2 has joined #commonlisp
aartaka has quit [Ping timeout: 256 seconds]
aartaka has joined #commonlisp
<pjb> thuna`: (declaim (declaration argument-type)) (defun foo (bar) (declare (argument-type integer bar)) (+ bar 2)) #| --> foo |# (foo 40) #| --> 42 |#
<pjb> thuna`: ie. just declare your custom declarations.
<pjb> thuna`: then of course, it may be useful to write some tool to process them too.
<pjb> thuna`: there are several forms that allow declarations, so if you want to support your new declaration in general, you may have to shadow and redefine several macros and special operators.
nij- has joined #commonlisp
<pjb> thuna`: or your tools may read and process the code separately.
<pjb> then you need a code walker.
<thuna`> Won't the tool I write be what it would be if I hadn't proclaimed it?
<thuna`> Is there a benefit to proclaiming it?
<Bike> proclaiming it will tell lisp to ignore your declaration, so you won't need to remove it
<Bike> (i forgot about cl:declaration)
<pjb> The above declaim is equivalent to (eval-when (:compile-toplevel :load-toplevel :execute) (proclaim '(declaration argument-type)))
<pjb> plus some compilation-unit stuff. A simple PROCLAIM may not be enough.
<thuna`> Ah, that is pretty useful
ebrasca has quit [Remote host closed the connection]
<Shinmera> thuna`: Check the slime-indentation.el source
scymtym has quit [Quit: ERC 5.4.1 (IRC client for GNU Emacs 29.0.50)]
<thuna`> Shinmera: slime-indentation.el doesn't contain much, did you mean slime-cl-indent.el?
<Shinmera> possibly, I forget the exact name
<Shinmera> the indentation rules are pretty obscure
<thuna`> Does trivial-indent support functions as well?
<Shinmera> and worse, if you inject a bad one, slime just stops looking at *all* custom indentation rules.
<Shinmera> idunno, try it
<thuna`> Alright
cage has quit [Quit: rcirc on GNU Emacs 27.1]
<thuna`> Wait... no, it probably doesn't work.
aartaka has quit [Ping timeout: 252 seconds]
varjagg is now known as varjag
<thuna`> This is extremely confusing. https://0x0.st/odvG.txt calls maybe-defun when it's trying to indent but I have no idea what STATE to expect. It looks like it depends on where the cursor is but that makes no sense to me.
Brucio-61 has quit [Ping timeout: 260 seconds]
Josh_2 has quit [Remote host closed the connection]
<thuna`> Oh. This... works? The information is duplicated and I have no idea how to load this with LOAD-SYSTEM but... it works! https://0x0.st/odvR.txt
<nij-> thuna` Wow, you can define how much to indent lisp codes in emacs?
<thuna`> nij-: Yup.
<nij-> :O Which package is define-indentation?
<thuna`> trivial-indent
sbenitezb_ has quit [Ping timeout: 264 seconds]
<Shinmera> are you :use-ing that package?
<Shinmera> tsk tsk.
<thuna`> But it's not what indents the code. It just tells slime (or sly, in this case) what the indentation is and that handles the indentation (with some help on the elisp side)
<thuna`> Shinmera: :import-from but I guess that's the same thing.
<Shinmera> not really, but still tsk tsk
<mfiano> another tsk tsk from me.
<thuna`> Shinmera: By the way, does this work with sly by design or just randomly
<Shinmera> look at the source and the answers shall reveal itself
<Shinmera> *answer
<mfiano> Sly support was added afterwards at some point
anticomputer has quit [Ping timeout: 255 seconds]
<thuna`> I won't complain either way. Also, why are you tsk-tsking me?
<Shinmera> because of the import
<thuna`> Well... why?
<Shinmera> it makes it hard to tell what's your code and what's code from a library you're using.
<Shinmera> it can also let you accidentally import symbols that are no longer exported
<Shinmera> and override definitions
<thuna`> Hm
<Shinmera> It's not likely in this case, but for other names it can lead to accidental overrides or other things, especially if the library changes under your feet (and you might not notice).
<Shinmera> so in general, just don't do it.
<mfiano> There's no reason to with PLN
<Shinmera> yeah
<thuna`> PLN?
gxt_ has joined #commonlisp
<mfiano> package-local nicknames
<jackdaniel> polish currency
<thuna`> Oh, right
gxt has quit [Ping timeout: 255 seconds]
anticomputer has joined #commonlisp
<White_Flame> Polish Language Nicknames
<mfiano> The first thing I do when I read someone's code is the package definition(s). That tells me if I want to try reading the rest, or to click the skip button :)
* edgar-rft goes polishing his nicknames
<thuna`> Do I :USE trivial-package-local-nicknames? :)
<Shinmera> you don't need it at all
<mfiano> There is no reason to use it at all
<mfiano> It's baked into every implementation that matters that has had a release in the past decade.
nij- has quit [Ping timeout: 252 seconds]
Brucio-61 has joined #commonlisp
Josh_2 has joined #commonlisp
Josh_2 has quit [Remote host closed the connection]
Josh_2 has joined #commonlisp
nij- has joined #commonlisp
scymtym has joined #commonlisp
<NotThatRPG> Is there any library that would allow me to automate interactions with a little JavaScript app running in a browser?
<jcowan> NotThatRPG: In the last decade it almost seems like there is no other kind of library. The trouble is, the abstractions all suck.
<NotThatRPG> Like invoke code in it? The obvious solution is to set up a server, but that's a heavy lift for just using a browser to display information.
<NotThatRPG> I don't even need an abstraction! Since it's my web app, I'd be happy to just throw JavaScript at it to execute.
<jcowan> Well, being a trivial HTTP server isn't hard; I've written any number of programs in various languages to do so. You don't need all the bells, whistles, and gongs of HTTP when you are just communicating with localhost.
<NotThatRPG> jcowan: Yes, that's true.
<jcowan> For one thing, you can be single-threaded
<jcowan> "typically said with a pronounced and ironic accent on the `gongs'"
<jcowan> "Nobody seems to know what distinguishes a bell from a whistle."
<jcowan> (both from the Jargon File)
bilegeek has joined #commonlisp
<NotThatRPG> jcowan: I think the biggest hassle with doing this from a lisp server is that the server-side of HTTP is passive, and I would like to drive from the lisp side, not the browser. Yes, there's AJAX and all that, but ... yuck
<NotThatRPG> I have a transcript in lisp I want to visualize, and a web app that can do the visualization and gee, I'd really love to just be able to throw some JavaScript code at the browser and have it do it's thing
<NotThatRPG> s/it's/its/
<jcowan> That's where the single-threadedness comes in. That is, there is conceptually just a single thread of control encompassing both server and client. The Lisp program just constructs its data and waits for a request from the browser (whose contents are irrelvant) and then sends out the visualization data as a response.
<Josh_2> Websockets :thinking:
<jcowan> In a normal use of browsers, the browser might make any request at any time. Here the browser is being constrained only to make a trivial request like "next page" (or whatever)
jmdaemon has joined #commonlisp
<NotThatRPG> Josh_2: I don't *think* there's a web sockets library for CL. But I haven't looked in a few years, maybe there is now...
<Josh_2> There is
<NotThatRPG> Neat!
<Josh_2> fukamachi has one, and there is a websocket driver for hunchentoot
<Josh_2> I can vouch for the former
varjag has quit [Quit: ERC 5.4.1 (IRC client for GNU Emacs 29.0.50)]
<White_Flame> none of the websockets are 100% complete, but will work for different base cases
<White_Flame> and yeah, a lot of my initial JS code is opening up a websocket and calling eval() on the string that it receives
<NotThatRPG> Another random question: I wanted to read some data out of a compressed lisp file (the file is huge). chipz:make-decompressing-stream seemed like just the ticket, but it doesn't seem to support operations like `read` and `read-line`, only primitive reads.
<White_Flame> you mean it isn't a stream?
<NotThatRPG> It seems to be a stream with element-type byte or something
<White_Flame> (unsigned-byte 8) probably
<White_Flame> flexi-streams can convert those into character streams
<NotThatRPG> read-byte and read-sequence are the only supported interfaces.
<Josh_2> (code-char (read-byte ..)) ?
<White_Flame> (make-flexi-stream <byte-stream> :external-format :latin1|:utf-8|etc)
jolby has quit [Quit: Client closed]
<NotThatRPG> White_Flame: Somehow on SBCL for me (with the decompressing stream as your <byte-stream>) that is failing with an error in refill-stream-input-buffer
<White_Flame> oh, is this a stream where you write into the decompressor?
<NotThatRPG> No, I'm just reading. But maybe I inadvertently made a bidirectional stream.
<pve> Josh_2: incongruent-methods needs a better design, I wouldn't recommend it in its current state
<Josh_2> pve: thanks :)
<White_Flame> NotThatRPG: what error?
<NotThatRPG> White_Flame: The value #\Us is not of type (UNSIGNED-BYTE 8) when setting an element of (ARRAY (UNSIGNED-BYTE 8)) -- inside chipz read stream input buffer (looks like it reads material from file to input buffer and then pushes it to an output buffer -- filling the output buffer calls filling the input buffer
<White_Flame> oh, need :element-type '(unsigned-byte 8) in the make-flexi-stream, too, to tell it what sort of stream it's dealing with
<NotThatRPG> But actually the error comes in SB-INT code SB-IMPL::OPTIMIZED-DATA-VECTOR-SET
<White_Flame> hmm, I wonder where it's getting the #\U from
<NotThatRPG> Looks like that's what it's reading from the file?
<White_Flame> because it shoudl theoretically be all bytes? bytes read from the compressed stuff, decompressed bytes coming out from it?
<White_Flame> well, you probably opened your compressed file incorrectly then
lisp123 has joined #commonlisp
<NotThatRPG> Yes. I think I'm being too delicate with my disk. I'm just going to uncompress this thing and read from the uncompressed thing. This smells like a rabbit hole. Thanks for the advice, thoug
<White_Flame> you're probably opening that file as text instead of as binary
Devon has joined #commonlisp
<pve> Josh_2: I'd like to make it better someday, but right now the code is lika from a pve 10 years younger, and you know how that can be :)
<Josh_2> :joy:
<Josh_2> Yep
<nij-> Hmm - When a restart is invoked, I got thrown into a inspector/debugger. With slime/sly, I can actually walk through the frames, and evaluate forms I like at those frames VIA the emacs minibuffer.
<nij-> However, emacs minibuffer isn't as comfortable as the mrepl.. so I wonder if I have the option to jump into another mrepl that represents the selected frame?
<Josh_2> You are put into the debugger when a condition isn't handled
<Josh_2> Or its invoked manually ofc
attila_lendvai_ has joined #commonlisp
rgherdt has quit [Remote host closed the connection]
shka has quit [Ping timeout: 268 seconds]
Devon has quit [Ping timeout: 260 seconds]
thuna` has quit [Remote host closed the connection]
pve has quit [Quit: leaving]
Josh_2 has quit [Quit: Gotta go fast!]