tyson2 has quit [Remote host closed the connection]
masinter has quit [Remote host closed the connection]
masinter has joined #commonlisp
nij- has quit [Ping timeout: 256 seconds]
waleee has quit [Ping timeout: 256 seconds]
Andrew is now known as AndrewYu
bilegeek_ has joined #commonlisp
bilegeek has quit [Read error: Connection reset by peer]
jeosol has quit [Quit: Client closed]
czy has joined #commonlisp
tetsuo9 has quit [Ping timeout: 265 seconds]
BNAndras has joined #commonlisp
shka has joined #commonlisp
BNAndras has quit [Remote host closed the connection]
ym has joined #commonlisp
Everything has quit [Quit: leaving]
ym has quit [Ping timeout: 240 seconds]
Sauvin has quit [Quit: Leaving]
Sauvin has joined #commonlisp
pranavats has joined #commonlisp
<flip214>
I'm not sure, but I believe slimv already could have multiple connections to a single inferior lisp - so you'd "only" have to SETF your REPL streams to the one of the second connection (the second vim)
azimut_ has quit [Ping timeout: 240 seconds]
rgherdt has joined #commonlisp
Guest74 has joined #commonlisp
Guest74 has quit [Client Quit]
bilegeek_ has quit [Quit: Leaving]
igemnace has joined #commonlisp
pve has joined #commonlisp
dcb has quit [Quit: MSN Messenger v2.16.1]
LW has joined #commonlisp
<AndreaB>
vecond sim
msavoritias has joined #commonlisp
LW has quit [Quit: WeeChat 3.8]
glaucon has joined #commonlisp
foretspaisibles has joined #commonlisp
foretspaisibles has quit [Quit: Client closed]
mgl 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
attila_lendvai has joined #commonlisp
pranavats has left #commonlisp [Error from remote client]
loke[m] has quit [Remote host closed the connection]
nij- has joined #commonlisp
mi6x3m has joined #commonlisp
<mi6x3m>
hey friends, is it possible to collect the repetions of, say cl-ppcre:do-matches in a list and to reduce that to a max result (say)
<mi6x3m>
I want to do it functionally instead of using a temporary variable
<mi6x3m>
so something like (max (collect (do-matches "a" "abababab")))
varjag has joined #commonlisp
<hayley>
(loop for (start end) on (cl-ppcre:all-matches "a" "abababab") by #'cddr maximize start)
<hayley>
ALL-MATCHES returns a list of the start of the first match, then the end of the first match, then the start of the second match, ... which makes it a bit annoying to process in a functional manner.
<beach>
You are not using END, though.
<mi6x3m>
I need do-matches though or to be precise do-register-groups
<mi6x3m>
so it has to be with collect probably
pranavats has joined #commonlisp
<hayley>
Oh, you need to maximize the value of a register. Ehm. I don't see a way to get a list of matches, which contains the register values for each match.
kevingal has joined #commonlisp
nij- has left #commonlisp [Using Circe, the loveliest of all IRC clients]
<mi6x3m>
hayley, how would I go about calculating the max then?
<mi6x3m>
using a temporary cons?
<hayley>
(let ((x 0)) (cl-ppcre:do-scans (start end reg-starts reg-ends "(a)" "ababababab" x) (setf x (aref reg-starts 0)))) but that's not very functional.
<mi6x3m>
wait I can setf bindings o_o
<Nilby>
when you do it functionally it's using a temporary variable, you just can't see it
<Nilby>
another way (let ((r 0)) (ppcre:do-scans (s e rs re "a" "abababab") (setf r (max r e))) r)
<hayley>
We want to extract the value of a register. And I believe the value of a register always increases between matches, but don't quote me on it.
<hayley>
(Shameless self-promotion: my regex library lets one write (reduce #'max (one-more-re-nightmare:all-matches "«a»" "abababab") :key (lambda (v) (aref v 2))) where (aref v 2) is the start of the first group in the "match vector" v. But the library is generally not compatible with cl-ppcre or PCRE.)
<mi6x3m>
that might be a good thing
<mi6x3m>
cl-ppcre is really of a very weird design
karlosz has joined #commonlisp
<Nilby>
hayley: I think OMRN not only wins on speed, but interesting personality
<hayley>
Well, it seems most regex libraries have PCRE semantics for regular expressions, whereas OMRN implements POSIX semantics. And I have a funny syntax for (not very) historical reasons, and some additions like being able to intersect and negate regular expressions (to the dismay of gilberth).
<Nilby>
hayley: it seems very unique in the world of re libraries
<hayley>
Nilby: I initially wrote it because I wasn't performing well with regular expressions at university. So I wasn't initially trying to make a nice library.
<Nilby>
negate is useful, but intersect is quite weird
<gilberth>
I believe otherwise. Intersection is fine and very useful, as well as difference which I really like. But negation is evil.
<jackdaniel>
being useful and evil are orthogonal concepts
<hayley>
So the syntax was chosen to look like the syntax used in a CS course, and not that of any real regex library.
<jackdaniel>
I, for example, am perfectly capable of doing useless evil things, like clipping the drawing to the complement of a circle
<gilberth>
With negation the domain is just everything. I prefer that you explicitly name the domain and hence have a difference. And difference is very useful. Take a floating pointer number RE. What is it? zero-or-more digits, a decimal point, zero-or-more digits, BUT a single dot. As an RE it is [0-9]*[.][0-9]*{-}[.] Or in s-expr notation (- (and (* (<= #\0 #\9)) #\. (<= #\0 #\9)) #\.)
<Nilby>
i guess i do agree that negation can turn quite evil. I guess I haven't really tried the other set ops, but now I can think of the the usefulness, e.g. in an editor, or a sort of narrowing / widening
scymtym has joined #commonlisp
<gilberth>
jackdaniel: You get surprising languages when you use negation. That's the reason I don't offer it to the user. It is used internally of course as it is part of the RE algebra.
<jackdaniel>
I don't argue that it is easy or that it is not evil, just nitpicking that Nilby said "negation is useful" and you've answered "I believe otherwise ... it is evil"
<jackdaniel>
(false dichotomy)
karlosz has quit [Quit: karlosz]
<jackdaniel>
negative prompts in stable diffusion apparently can give you remarkable results you would not expect
<Nilby>
i guess grep -v agrees it's forbidden
<gilberth>
Another useful difference example: C comments. You can start with (and '"/*" (* t) '"*/"), but would match "/* */ */" as a comment too, so you would need to exclude anything containing "*/" for the middle part, that's (and '"/*" (- (* t) (contains '"*/") '"*/"), CONTAINS is a macro and this would be (and (* t) '"*/" (* t)).
<gilberth>
With CLEX, you can write that as (DELIMITED '"/*" (* T) '"*/") as well.
karlosz has joined #commonlisp
vassenn has joined #commonlisp
<gilberth>
Another reason I disabled a NOT operator is that you might believe that (NOT #\a) would be [^a], which it is not. It would rather match anything but "a". So "" would match, "abc" would match, etc. That's the confusing part.
<Nilby>
ahh, nice example. makes #| |# look cooler
<mi6x3m>
does anyone know how to parse a float with common lisp ? any API readily available like parse-integer?
<gilberth>
It works with difference as expected. (- "[a-z]" "[aeoui]") is what you might expect. The domain is a single letter a-z.
<jackdaniel>
mi6x3m: many implementations provide a function parse-float as an extension
<jackdaniel>
and I think that there is a library for that
<mi6x3m>
thanks jackdaniel, there is a parse float in quicklisp!
<Nilby>
gilberth: I see your point now. I might now agree that NOT should not be in an RE. I was thinking about it as failing to to match
jmdaemon has quit [Ping timeout: 246 seconds]
vassenn has quit [Quit: Leaving]
<mi6x3m>
can anyone tell me the difference between floor and ffloor?
<mi6x3m>
the difference in the type of the quotient?
<mi6x3m>
i see it's float for the f* functions
monix has joined #commonlisp
varjag has quit [Quit: ERC (IRC client for Emacs 27.1)]
mgl has joined #commonlisp
karlosz has quit [Quit: karlosz]
mi6x3m has quit [Quit: Leaving]
jaz6578 has quit [Ping timeout: 264 seconds]
MajorBiscuit has joined #commonlisp
random-nick has joined #commonlisp
Gleefre has quit [Remote host closed the connection]
<jackdaniel>
short-f***, single-f***, double-f*** and long-f***
<Nilby>
(defun function (x) "Return X anointed as a float." (float (unction x)))
Gleefre has quit [Remote host closed the connection]
Gleefre has joined #commonlisp
tyson2 has joined #commonlisp
edgar-rft has quit [Quit: Leaving]
glaucon has quit [Quit: Leaving.]
scymtym has joined #commonlisp
dtman34 has quit [Quit: ZNC 1.8.2+deb2+b1 - https://znc.in]
dtman34 has joined #commonlisp
rgherdt has quit [Read error: Connection reset by peer]
rgherdt has joined #commonlisp
<jackdaniel>
(defvar *xxx* 42) (defgeneric foo (*xxx*)) (defmethod foo ((obj integer)) (print `(xxx is ,*xxx*))) (foo 15) ; what should be printed?
<Bike>
42, i think? since the method lambda lists are what actually bind variables
<Nilby>
(XXX IS 42) ;; Is this a trick question?
<jackdaniel>
not meant to be tricky, I've started to wonder whether when we call a generic function we should use its lambda list to bind arguments first for the dynamic extent of said function
<jackdaniel>
it does print 42 when I try it of course, and the behavior of binding can be achieved by slapping an around method with such lambda list
mgl has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
azimut has joined #commonlisp
tyson2 has joined #commonlisp
<knusbaum>
Asking my question again, don't mind me. :) Anyone ever seen a swank server that works on something like a bidirectional stream? I'd like to serve swank over a custom transport, but it looks like there's a lot of logic tying it to TCP for some reason.
rendar has quit [Quit: Leaving]
rendar has joined #commonlisp
rendar has quit [Changing host]
rendar has joined #commonlisp
Cymew has joined #commonlisp
<Nilby>
jackdaniel: sounds like trouble. why do you want it? would the GF arg names be bound in addition to the method args?
<jackdaniel>
I don't want it, I've been just wodnering
<Nilby>
jackdaniel: if you name you method args as dynamic variables it should work though
glaucon has joined #commonlisp
<jackdaniel>
sure
<jackdaniel>
or, if you don't have a control over all methods, you may define an around method - that's not a practical issue
<Nilby>
knusbaum: It might be some work, but I would bet a swank backend could be customized to use a different transport, as long as it obeyed the defimplementation protocol
<jackdaniel>
swank may connect with slime by a few means
<jackdaniel>
I think that these are tcp/ip, a file descriptor /with serve-event/ and "nil" - that is direct i/o
<jackdaniel>
it is buried within swank backend implementation(s)
<jackdaniel>
*communication-style* or something
vassenn has joined #commonlisp
notzmv has quit [Ping timeout: 264 seconds]
KvL_ has joined #commonlisp
kevingal has quit [Ping timeout: 240 seconds]
KvL has quit [Ping timeout: 240 seconds]
<knusbaum>
Yeah, I saw *communication-style* but wasn't sure that's what I wanted. it still wants a port argument.
<knusbaum>
I'll look closer.
lucasta has joined #commonlisp
waleee has joined #commonlisp
ryanbw has quit [Ping timeout: 248 seconds]
xristos has quit [Ping timeout: 268 seconds]
Cymew has quit [Ping timeout: 264 seconds]
varjag has joined #commonlisp
zxcvz has joined #commonlisp
glaucon has quit [Quit: Leaving.]
attila_lendvai has quit [Ping timeout: 240 seconds]
varjag has quit [Quit: ERC (IRC client for Emacs 27.1)]
tibfulv has quit [Remote host closed the connection]
tibfulv has joined #commonlisp
chrcav has quit [Ping timeout: 240 seconds]
chrcav has joined #commonlisp
rgherdt has quit [Ping timeout: 240 seconds]
rgherdt has joined #commonlisp
edgar-rft has joined #commonlisp
zxcvz has quit [Quit: zxcvz]
waleee has joined #commonlisp
pjb has quit [Ping timeout: 256 seconds]
morganw has joined #commonlisp
nij- has joined #commonlisp
<nij->
Dear common lisp fellows - I wonder if you are using any CL specific tool to manage the packages in your system. Homebrew is ok but it's written in Ruby.
simendsjo has joined #commonlisp
Inline has joined #commonlisp
Gleefre has quit [Remote host closed the connection]
Gleefre has joined #commonlisp
attila_lendvai has joined #commonlisp
ym has quit [Ping timeout: 265 seconds]
bilegeek has joined #commonlisp
igemnace has quit [Remote host closed the connection]
lucasta has quit [Quit: Leaving]
<piethesailor>
nij-: Not really. quicklisp for lisp specific things and then guix(guix) for everything else. I don't think its possible to do package management like guix in pure CL
<pkal>
piethesailor: I use Guix for CL, and it seems to work fine. Or what do you mean?
nij- has quit [Ping timeout: 246 seconds]
nij- has joined #commonlisp
mauricioc has joined #commonlisp
jaz6578 has joined #commonlisp
Gleefre has quit [Remote host closed the connection]
Gleefre has joined #commonlisp
simendsjo has quit [Ping timeout: 250 seconds]
cage has quit [Quit: rcirc on GNU Emacs 28.2]
<piethesailor>
pkal: I guess I mean two different things? I put cl projects(code) in quicklisp/local-projects and run them with ql:quickload and then any prebuilt binaries I use guix for.
<piethesailor>
I am not a programmer by trade, so perhaps I am answering ignorantly about the subject
<piethesailor>
I could use guix for builing too
<piethesailor>
I could use another tip with cl-selenium if anyone is willing to give it a shot
<piethesailor>
(start-interactive-session) and then (setf (url) "") gets me to the right page.
<piethesailor>
Then there are 8 buttons on the page. I want to get one and "click" it. when I (find-element "button" :by :css-selector)
<piethesailor>
I get the first button, but it is just an id object which I cant seem to use in any useful way
jaz6578 has quit [Remote host closed the connection]
<piethesailor>
for instance I want to change the date on this webpage
<piethesailor>
I guess I can (send-key (key :tab)) but but around the page untill I get what I need..lol
<JonBoone[m]>
Have you used selenium with any other language before?
<piethesailor>
my but*
<piethesailor>
JonBoone(m) No...
<JonBoone[m]>
Ah, ok -- ideally, you're supposed to navigate the page DOM to work with the various entities.
<JonBoone[m]>
So, if you have only a one-shot change in mind, then manually looking with the Dev Tools might help
<piethesailor>
Right! I guess I am not sure what differentiate the 8 buttons from eachother in the dev tools section.
<piethesailor>
I know that the first, or maybe second, button is what I want called "Dates")
<JonBoone[m]>
LOL -- by tabbing through them and watching the highlight on the displayed page and the dev tools DOM view change.. :-)
<JonBoone[m]>
I used selenium with python3 to navigate through an OAUTH interaction, but I made it very clear in the comments that I was hardcoding the components I targeted and that it was the wrong way to use the tool... :-)
<ixelp>
Write your first Selenium script | Selenium
<piethesailor>
hmmm. I think my confusion comes from the fact that, looking at the DOM in dev tools, all 8 buttons on the page are type"button" class"...."...
<JonBoone[m]>
which browser are you using?
<piethesailor>
they are the same wxcept for the text inside the <span > sub element?
<piethesailor>
I am looking at DOM through edge
<JonBoone[m]>
yes, unless they have specifically defined names
<piethesailor>
but selenium through chrome
<JonBoone[m]>
it shouldn't matter, but I don't use Edge, so I'm not sure what their devtools view looks like
<piethesailor>
If I (find-elements "buttons" :by :css-selector) I get a list of all the buttons, but they are just long "id" strings
<piethesailor>
If I (car list-of-buttons) I get one isolated
<piethesailor>
but if I pass that into any of the other element-xxxx functions I get errors
<ixelp>
Web Development in Common Lisp: frameworks overview, templating, deployment - Lisp journey
attila_lendvai has quit [Ping timeout: 240 seconds]
<piethesailor>
As for the second question. I don't think so.. You need to either find the repository of the package you are interested in to see if there is documentation there. Or load it into the repl and using things like (describe 'function) to learn about the code base.
<piethesailor>
perhaps someone else has a better answer for you. my 2c
sepisoad has quit [Quit: Connection closed]
ldb has joined #commonlisp
<ldb>
good afternoon
<ldb>
I think majority of the CL systems I have encountered requires certain level of reading source code to find out how to use
<ldb>
Even though quicklisp.org hosts the generated api for many systems, they are not as useful as pullout the source file in a text editor
morganw has quit [Remote host closed the connection]
piethesailor has left #commonlisp [ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.0.90)]
waleee has quit [Ping timeout: 264 seconds]
glaucon has quit [Quit: Leaving.]
glaucon has joined #commonlisp
glaucon has quit [Read error: Connection reset by peer]
random-nick has quit [Ping timeout: 240 seconds]
pve has quit [Quit: leaving]
rgherdt has quit [Remote host closed the connection]