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/>
dinomug has quit [Ping timeout: 255 seconds]
molson has joined #commonlisp
sloanr has quit [Ping timeout: 260 seconds]
eddof13 has joined #commonlisp
eddof13 has quit [Client Quit]
chrcav has joined #commonlisp
wonko-th1-sane has quit [Remote host closed the connection]
wonko-the-sane has joined #commonlisp
eddof13 has joined #commonlisp
eddof13 has quit [Client Quit]
Inline has quit [Ping timeout: 245 seconds]
dustinm` has quit [Quit: Leaving]
karlosz has quit [Quit: karlosz]
NicknameJohn has joined #commonlisp
pranavats has left #commonlisp [Disconnected: Hibernating too long]
dustinm` has joined #commonlisp
tibfulv has quit [Remote host closed the connection]
lagash has joined #commonlisp
tibfulv has joined #commonlisp
zaymington has joined #commonlisp
eddof13 has joined #commonlisp
eddof13 has quit [Client Quit]
anticomputer has quit [Remote host closed the connection]
anticomputer has joined #commonlisp
Pixel_Outlaw has quit [Quit: Leaving]
dcb has quit [Quit: MSN Messenger 4.0.4]
fitzsim has quit [Read error: Connection reset by peer]
quickbrownfox has joined #commonlisp
eddof13 has joined #commonlisp
eddof13 has quit [Client Quit]
quickbrownfox has quit [Quit: Leaving]
notzmv has joined #commonlisp
waleee has quit [Ping timeout: 245 seconds]
tyson2 has quit [Remote host closed the connection]
Pixel_Outlaw has joined #commonlisp
avocadoist has quit [Ping timeout: 246 seconds]
sco1 has quit [Quit: ZNC 1.8.2 - https://znc.in]
sco1 has joined #commonlisp
wonko-the-sane has quit [Ping timeout: 246 seconds]
fitzsim has joined #commonlisp
dinomug has joined #commonlisp
mingus has joined #commonlisp
Pixel_Outlaw has quit [Quit: Leaving]
<rdrg109> [Q] I want to use (loop ...) to iterate through a list and return the first element found which satisfies a set of conditions. What's the shortesst way and more efficient way to do this?
<mfiano> (loop for x in list when (and (condition1 ... conditionN)) do ...)
<mfiano> you could even drop the AND opertor out and use LOOP's
<rdrg109> mfiano: If I' not mistaken, hwne we use "when" in "loop" we will iterate until the end of the list, right? Is there any way to stop at the first element found?
<mfiano> No
<mfiano> when is a conditional, analogous to the CL:WHEN macro
<mfiano> You can stop in the do part
<mfiano> Use (return x)
<mfiano> The 'do' is behind the when'
<mfiano> 'when'
<mfiano> So anything you do there, such as return the current value of x out of the loop, is only when these conditions are met
<mfiano> It sounds like you want to use #'every though
<rdrg109> mfiano: thanks. "return" is what I was looking for. I'm afraid that cl-every returns a list of elements that meet a set of conditions, but I just want to find the first element that meet those conditions.
<mfiano> Ah no, you want to return it
<mfiano> cl-every?
<rdrg109> mfiano: Yes, that's the name of the Emacs Lisp implementation of "every".
<mfiano> Those cl functions differ greatly in some cases. I can't help you
<rdrg109> mfiano: Ok, I'll keep that in mind. Thanks for your help! :)
<aeth> you were confusing when with while...
<aeth> when is like CL:WHEN, while makes it a while loop
Brucio-61 has quit [Remote host closed the connection]
Brucio-61 has joined #commonlisp
pve has joined #commonlisp
<beach> RETURN is also a LOOP keyword.
<beach> (loop ... when (...) return ...)
wonko-the-sane has joined #commonlisp
iska has quit [Ping timeout: 246 seconds]
rtypo has quit [Ping timeout: 246 seconds]
mingus1 has joined #commonlisp
mingus has quit [Ping timeout: 246 seconds]
mingus1 is now known as mingus
masinter has quit [Ping timeout: 248 seconds]
masinter has joined #commonlisp
notzmv has quit [Ping timeout: 260 seconds]
rgherdt has joined #commonlisp
varjag has joined #commonlisp
rendar has quit [Ping timeout: 248 seconds]
<jdz> There's also (loop ... until (...) do ...)
LW has joined #commonlisp
LW has quit [Client Quit]
igemnace has joined #commonlisp
msavoritias has joined #commonlisp
rgherdt has quit [Ping timeout: 246 seconds]
gxt has quit [Remote host closed the connection]
gxt has joined #commonlisp
dinomug has quit [Remote host closed the connection]
msavoritias has quit [Ping timeout: 245 seconds]
anticomputer has quit [Remote host closed the connection]
anticomputer has joined #commonlisp
rgherdt has joined #commonlisp
dnhester26 has joined #commonlisp
beach` has joined #commonlisp
beach has quit [Killed (NickServ (GHOST command used by beach`!~user@2a01:cb19:a62:6300:33be:29f1:311e:da94))]
beach` is now known as beach
msavoritias has joined #commonlisp
attila_lendvai has joined #commonlisp
<White_Flame> rdrg109: of course, there's also (find-if predicate list), if loop stops being a requirement
dino_tutter has joined #commonlisp
shka has joined #commonlisp
nij- has joined #commonlisp
habamax has joined #commonlisp
Cymew has joined #commonlisp
<nij-> I use (slynk:create-server :port 2345 :dont-close t) to create a server, and M-x sly-connect to connect to it.
<nij-> It works.. but the standard outputs aren't linked together.
<nij-> How do I link them together?
<nij-> CL-USER> *standard-output* ; => #<SB-SYS:FD-STREAM for "socket 127.0.0.1:51998, peer: 127.0.0.1:51999" {70052D24C3}>
<nij-> CL-USER> *standard-output* ; => #<SB-SYS:FD-STREAM for "socket 127.0.0.1:54155, peer: 127.0.0.1:54156" {70444B07F3}>
herjazz has joined #commonlisp
Inline has joined #commonlisp
random-nick has joined #commonlisp
dnhester has joined #commonlisp
pranavats has joined #commonlisp
mrcom_ has joined #commonlisp
mrcom has quit [Remote host closed the connection]
robin has quit [Ping timeout: 248 seconds]
rendar has joined #commonlisp
rendar has quit [Changing host]
rendar has joined #commonlisp
easye has quit [Ping timeout: 260 seconds]
easye has joined #commonlisp
jmdaemon has quit [Ping timeout: 248 seconds]
dnhester26 has quit [Remote host closed the connection]
igemnace has quit [Read error: Connection reset by peer]
dnhester has quit [Ping timeout: 246 seconds]
Cymew has quit [Ping timeout: 246 seconds]
igemnace has joined #commonlisp
Lycurgus has joined #commonlisp
yitzi has joined #commonlisp
Lycurgus has quit [Quit: Tschüss]
yitzi has quit [Ping timeout: 248 seconds]
NotThatRPG has joined #commonlisp
NotThatRPG has quit [Ping timeout: 245 seconds]
kenran has joined #commonlisp
avocadoist has joined #commonlisp
nij- has quit [Ping timeout: 246 seconds]
NotThatRPG has joined #commonlisp
Cymew has joined #commonlisp
NotThatRPG has quit [Ping timeout: 244 seconds]
NicknameJohn has quit [Ping timeout: 246 seconds]
dino_tutter has quit [Ping timeout: 246 seconds]
eddof13 has joined #commonlisp
eddof13 has quit [Client Quit]
Cymew has quit [Ping timeout: 244 seconds]
eddof13 has joined #commonlisp
eddof13 has quit [Client Quit]
rogersm has joined #commonlisp
jonatack has quit [Read error: Connection reset by peer]
jon_atack has joined #commonlisp
dino_tutter has joined #commonlisp
eddof13 has joined #commonlisp
tyson2 has joined #commonlisp
habamax has quit [Remote host closed the connection]
Josh_2 has joined #commonlisp
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
robin has joined #commonlisp
<Josh_2> I am trying CLOG
<Josh_2> I am trying to get it to integrate with Ningle I suppose
<Josh_2> I dont want everything to be interactive, but I dont want to serve static files either...
<Josh_2> dbotton: Is this possible?
<Josh_2> Sort of "injecting" CLOG into a running Clack app rather than using #'initialize to start Clack
<dbotton> Yes
<Josh_2> I want /main to be CLOG powered while other urls like / /login /check-login are plain HTML+CSS and check-login would redirect a successful login to /main to then be greeted by the virtual desktop
<dbotton> Josh_2: there are some examples with similar frameworks
<dbotton> Yes
<dbotton> The static html direct acts like a regular webserver
<Josh_2> And the regular webserver is using clack? So I can add routes using Ningle?
<Josh_2> Also, I am looking to use CLOG for collecting credit/debit card info. When my app is behind nginx/apache is the websocket connection secure or will I need to setup some form of proxying so that its wss rather than ws :thinking:
ec has quit [Remote host closed the connection]
ec has joined #commonlisp
anticomputer has quit [Remote host closed the connection]
anticomputer has joined #commonlisp
varjag has quit [Quit: ERC (IRC client for Emacs 27.1)]
herjazz has quit [Remote host closed the connection]
_cymew_ has joined #commonlisp
dnhester26 has joined #commonlisp
ec has quit [Quit: ec]
ec has joined #commonlisp
cage has joined #commonlisp
ec has quit [Client Quit]
ec has joined #commonlisp
<dbotton> I use CLOG apps proxing througn apache all the time
<dbotton> let apache provide your security layer and live behind it
<dbotton> there are instructions in the CLOG repo
<dbotton> yes it uses CLACK
<dbotton> you should be able to setup routes to ningle yes
<dbotton> there I think there is a discussion in github on setting up routes with clack and clog
<pve> Hi! I'm subclassing standard-direct-slot-definition (and standard-class) so I can attach some additional information to the slots of the instances of my metaclass. I would like to have the "extra" argument to my slot evaluated, but I'm unsure of the correct way to do it. My first attempt looks like this:
ec has quit [Quit: ec]
<pve> It doesn't feel right to do (funcall (compile nil `(lambda () ,extra))) to get the value.
ec has joined #commonlisp
ec has quit [Client Quit]
ec has joined #commonlisp
ronald_ has joined #commonlisp
<pve> Could I arrange to have an "initfunction" somehow, like for initform?
<mfiano> Not really. eval or compile directly are needed here, since defclass itself doesn't evaluate its arguments.
<pve> mfiano: ok, I see, thanks
<beach> pve: Can't you treat it like :INITARG is treated?
dnhester26 has quit [Read error: Connection reset by peer]
dnhester_ has joined #commonlisp
ec has quit [Quit: ec]
ec has joined #commonlisp
<pve> beach: I'm not entirely sure what that means. How are initargs treated? (I'm looking at the pages on metamodular.com)
ec has quit [Client Quit]
ec has joined #commonlisp
<beach> I may not have thought this through enough. Feel free to ignore me.
msavoritias has quit [Ping timeout: 246 seconds]
ec has quit [Client Quit]
<beach> Did you see this particular page: http://metamodular.com/CLOS-MOP/the-defclass-macro.html
<ixelp> The defclass macro
zaymington has quit [Remote host closed the connection]
<beach> pve: As you can see, most keyword arguments are quoted. I think it is enough to expand to something that is not quoted.
<pve> beach: Yes! I was looking at that page, and noticed that initfunction is not quoted
<beach> Indeed.
<pve> So just to be clear, this means I need to make my own defclass macro to not have the "extra" argument quoted?
<bike> i think that the defclass macro will quote everything it doesn't know about, so you do need your own macro, yes
tyson2 has quit [Remote host closed the connection]
tyson2 has joined #commonlisp
<pve> Ok, great, thank you.
<pve> both
msavoritias has joined #commonlisp
karlosz has joined #commonlisp
hrberg has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
hrberg has joined #commonlisp
NicknameJohn has joined #commonlisp
eddof13 has joined #commonlisp
bjorkint0sh has quit [Quit: Leaving]
NicknameJohn has quit [Ping timeout: 245 seconds]
dnhester_ has quit [Remote host closed the connection]
<Josh_2> Think I might just have two different http servers
<Josh_2> :sob:
<Josh_2> Ningle uses clack:clackup just like CLOG but it expects an instance of ningle:app
<Josh_2> I only need to be able to grab the lack request object
zaymington has joined #commonlisp
pranavats has left #commonlisp [Error from remote client]
pranavats has joined #commonlisp
xmachina has quit [Quit: WeeChat 4.0.4]
Inline has quit [Ping timeout: 255 seconds]
<Josh_2> dbotton: in your clogpower website you have a login form, are you using the html5 storage for session data?
OlCe has quit [Remote host closed the connection]
<dbotton> Yes
<Josh_2> Okay :thumbsup:
<Josh_2> I will just use CLOG and ignore everything else
dcb has joined #commonlisp
<Josh_2> Is there a function to delete elements? I dont want my login to be successful and then still have the login form hidden or something like that
<Josh_2> rather it should be deleted, or I redirect like you are
yvm has joined #commonlisp
sloanr has joined #commonlisp
xmachina has joined #commonlisp
<Josh_2> The flow for a login form in CLOG is an on-submit handler to verify the credentials, set some html5 storage to mark as logged in then a redirect back to a different page (optional, could also hide/show/delete certain elements)?
msavoritias has quit [Ping timeout: 255 seconds]
<Josh_2> Can redirect with url-assign :sunglasses:
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
skin1 has joined #commonlisp
rtypo has joined #commonlisp
NotThatRPG has joined #commonlisp
<Josh_2> dbotton: When using storage-element if there is no key it returns the string "null"
msavoritias has joined #commonlisp
dino_tutter has quit [Ping timeout: 246 seconds]
Pixel_Outlaw has joined #commonlisp
NotThatRPG has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
yitzi has joined #commonlisp
yitzi has quit [Remote host closed the connection]
tyson2 has quit [Remote host closed the connection]
NotThatRPG has joined #commonlisp
jello_pudding has quit [Ping timeout: 246 seconds]
zxcvz has joined #commonlisp
Inline has joined #commonlisp
skin1 has quit [Ping timeout: 258 seconds]
jello_pudding has joined #commonlisp
zxcvz has quit [Quit: zxcvz]
skin1 has joined #commonlisp
NotThatRPG has quit [Read error: Connection reset by peer]
NotThatRPG has joined #commonlisp
msavoritias has quit [Ping timeout: 246 seconds]
skin1 has quit [Ping timeout: 255 seconds]
msavoritias has joined #commonlisp
<Josh_2> Has anyone here ever made a user interface (for privileged users of your system) that directly writes lisp code? I dont mean the interface allows the user to write lisp, rather they fill in some blanks and the system creates some code and places it in a file somewhere?
<Josh_2> next time its launched the new code in that file is compiled/loaded whether by asdf or some custom means etc
<Josh_2> So the interface allows for some the constrained editing/creation of lisp
<Josh_2> Just gonna have to go for it :sunglasses:
<jcowan> I've done that for SQL
<jcowan> "here are your columns, select the ones you want and add a simple constraint of the form <relational op> <constant>."
AetherWind has joined #commonlisp
<Josh_2> Interesting interesting
<Josh_2> See I have a project where adding new X requires writing a nice new lisp file
<Josh_2> It would be a *lot* of work to change this and I only have a week
ec has joined #commonlisp
skin1 has joined #commonlisp
NotThatRPG has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
igemnace has quit [Read error: Connection reset by peer]
azimut has quit [Ping timeout: 246 seconds]
ec has quit [Quit: ec]
skin1 has quit [Ping timeout: 246 seconds]
yvm has quit [Ping timeout: 245 seconds]
ec has joined #commonlisp
NotThatRPG has joined #commonlisp
msavoritias has quit [Ping timeout: 245 seconds]
igemnace has joined #commonlisp
ec has quit [Quit: ec]
ec has joined #commonlisp
rtypo has quit [Ping timeout: 246 seconds]
ec has quit [Client Quit]
ec has joined #commonlisp
waleee has joined #commonlisp
msavoritias has joined #commonlisp
rgherdt has quit [Ping timeout: 255 seconds]
<aeth> not really arbitrary lisp lisp, but if you ever read/write s-expression plist configuration files or very basic object creation macros that, again, are more plist than anything else, it looks very, very straightforward to attach a GUI to one
robin has quit [Ping timeout: 246 seconds]
<aeth> in that there's a fairly basic translation to (:foo <item>) from Foo : [ ]
<aeth> so if I had to write a GUI, I'd stick to that and have two steps, writing the plists from the GUI, and turning those plists into meaningful Lisp
<aeth> also note that <item> would always be a string as described, which might need to be parsed into something useful
<aeth> Although you could use different GUI elements to e.g. get t/nil from a checkbox, etc.
<aeth> Josh_2: ^
NotThatRPG has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
NotThatRPG has joined #commonlisp
<Josh_2> Right :thinking:
kenran has quit [Remote host closed the connection]
kenran has joined #commonlisp
rgherdt has joined #commonlisp
dino_tutter has joined #commonlisp
sloanr has quit [Ping timeout: 245 seconds]
xmachina has quit [Quit: WeeChat 4.0.4]
igemnace has quit [Quit: WeeChat 4.0.4]
xmachina has joined #commonlisp
ebrasca has joined #commonlisp
szkl has joined #commonlisp
skin1 has joined #commonlisp
skin1 has quit [Ping timeout: 248 seconds]
msavoritias has quit [Ping timeout: 255 seconds]
NotThatRPG has quit [Remote host closed the connection]
NicknameJohn has joined #commonlisp
tyson2 has joined #commonlisp
NicknameJohn has quit [Ping timeout: 245 seconds]
cage has quit [Quit: rcirc on GNU Emacs 28.2]
skin1 has joined #commonlisp
_cymew_ has quit [Ping timeout: 245 seconds]
NicknameJohn has joined #commonlisp
rgherdt has quit [Remote host closed the connection]
kurfen has quit [Ping timeout: 240 seconds]
pve has quit [Quit: leaving]
kurfen has joined #commonlisp
rgherdt has joined #commonlisp
overclucker_ has joined #commonlisp
kenran has quit [Remote host closed the connection]
attila_lendvai has quit [Ping timeout: 240 seconds]
overclucker has quit [Ping timeout: 246 seconds]
AetherWind has quit [Ping timeout: 246 seconds]
AetherWind has joined #commonlisp
overclucker_ has quit [Read error: Connection reset by peer]
overclucker has joined #commonlisp
Lyrebird has joined #commonlisp
rgherdt has quit [Remote host closed the connection]
AetherWind has quit [Ping timeout: 245 seconds]
zaymington has quit [Ping timeout: 246 seconds]
AetherWind has joined #commonlisp
xmachina has quit [Quit: WeeChat 4.0.4]
NicknameJohn has quit [Ping timeout: 240 seconds]
AetherWind has quit [Quit: Lost terminal]
zaymington has joined #commonlisp
overclucker has quit [Read error: Connection reset by peer]
overclucker has joined #commonlisp
szkl has quit [Quit: Connection closed for inactivity]
shka has quit [Ping timeout: 246 seconds]
zaymington has quit [Ping timeout: 255 seconds]
NotThatRPG has joined #commonlisp
tyson2 has quit [Ping timeout: 246 seconds]
dino_tutter has quit [Ping timeout: 250 seconds]
ebrasca has quit [Remote host closed the connection]
eddof13 has joined #commonlisp
random-nick has quit [Ping timeout: 255 seconds]
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
xmachina has joined #commonlisp
eddof13 has joined #commonlisp
son0p has quit [Remote host closed the connection]
masinter has quit [Remote host closed the connection]
skin1 has quit [Ping timeout: 255 seconds]
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<jmercouris> can someone think of a more intelligent way of doing this: http://dpaste.com/GJWSGZKJW ?
<ixelp> dpaste: GJWSGZKJW
tevo has joined #commonlisp
<jmercouris> I don't like the nested mapcars
eddof13 has joined #commonlisp
Pixel_Outlaw has quit [Quit: Leaving]
NicknameJohn has joined #commonlisp
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
xmachina has quit [Quit: WeeChat 4.0.4]
tyson2 has joined #commonlisp
tevo has quit [Ping timeout: 246 seconds]
<bike> jmercouris: you could do append instead of list and then only need one mapcar?
<jmercouris> bike: very wise
<jmercouris> bike: I actually had to change it though because it turns out not every asset is loaded via the same function
eddof13 has joined #commonlisp
<jmercouris> bike: I ended up doing http://dpaste.com/BPKSYW3UJ
<ixelp> dpaste: BPKSYW3UJ
eddof13 has quit [Client Quit]
<jmercouris> I guess I could have used an flet
<jmercouris> perhaps no need to introduce a new symbol
<jmercouris> s/symbol/function binding
tevo has joined #commonlisp
Lord_of_Life has quit [Ping timeout: 240 seconds]
Lord_of_Life has joined #commonlisp
xmachina has joined #commonlisp