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/> | News: ELS'22 this Monday (2022-03-21), see https://european-lisp-symposium.org
karlosz has quit [Ping timeout: 276 seconds]
dre has quit [Quit: Leaving]
jolby has quit [Quit: Client closed]
Guest87 has quit [Quit: Connection closed]
azimut has quit [Ping timeout: 240 seconds]
lisp123 has quit [Quit: Leaving...]
Josh_2 has quit [Remote host closed the connection]
Josh_2 has joined #commonlisp
Lord_of_Life has quit [Ping timeout: 240 seconds]
Lord_of_Life has joined #commonlisp
Guest74 has quit [Quit: Connection closed]
Josh_2 has quit [Remote host closed the connection]
Josh_2 has joined #commonlisp
thmprover has joined #commonlisp
jolby has joined #commonlisp
Oladon has joined #commonlisp
orestarod has quit [Ping timeout: 255 seconds]
CptKirk has joined #commonlisp
Josh_2 has quit [Remote host closed the connection]
Josh_2 has joined #commonlisp
Bike has joined #commonlisp
jolby has quit [Quit: Client closed]
Josh_2 has quit [Remote host closed the connection]
Josh_2 has joined #commonlisp
leeb has joined #commonlisp
waleee has quit [Ping timeout: 244 seconds]
herlocksholmes has quit [Ping timeout: 256 seconds]
<beach> Good morning everyone!
aartaka has quit [Ping timeout: 244 seconds]
<mason> beach: o/
rainthree has joined #commonlisp
aartaka has joined #commonlisp
thmprover has quit [Quit: Up, up, and away]
Bike has quit [Quit: Connection closed]
CptKirk has quit [Ping timeout: 252 seconds]
causal has joined #commonlisp
rainthree has quit [Ping timeout: 240 seconds]
akoana has quit [Quit: leaving]
leeb has quit [Ping timeout: 248 seconds]
leeb has joined #commonlisp
Madsy has quit [Ping timeout: 255 seconds]
dmc00 has quit [Remote host closed the connection]
azimut has joined #commonlisp
Furor has joined #commonlisp
Colere has quit [Ping timeout: 246 seconds]
Furor is now known as Colere
Posterdati has quit [Remote host closed the connection]
Posterdati has joined #commonlisp
lisp123 has joined #commonlisp
anticomputer has quit [Remote host closed the connection]
anticomputer has joined #commonlisp
mon_aaraj has quit [Ping timeout: 248 seconds]
<CodeBitCookie[m]> Hello Everyone!
<CodeBitCookie[m]> (and beach)
<rotateq> Hi CodeBitCookie[m].
<CodeBitCookie[m]> Well, it's that time of the year again, I try another library in common lisp
<CodeBitCookie[m]> I wanted to use IMGUI
mon_aaraj has joined #commonlisp
<rotateq> I don't know that library.
<CodeBitCookie[m]> rotateq: https://github.com/ocornut/imgui
<rotateq> Thanks.
<CodeBitCookie[m]> Made with OpenGL, Dear ImGUI is a wonderful GUI interface.
<CodeBitCookie[m]> My pleasure.
<CodeBitCookie[m]> rotateq: It's a bit more problematic, since it's made in C++ and not C
<CodeBitCookie[m]> rotateq: _death made https://github.com/death/imcl
<CodeBitCookie[m]> However, he seems to have abandoned that project.
<CodeBitCookie[m]> I wanted to generate bindings to it myself.
<CodeBitCookie[m]> so it's very up to date.
<CodeBitCookie[m]> however, it's made in C++
<CodeBitCookie[m]> So I was thinking, I would just directly make it in C++
<CodeBitCookie[m]> What would be a better idea? Trying to jam ImGUI into Common Lisp or just use it normally and create all the rest of the logic in Common Lisp. Oooor we could just make everything in C++
<rotateq> Sounds like another big amount of work and a pool of details.
<CodeBitCookie[m]> Yeah, So I think option 2 sounds the best.
<CodeBitCookie[m]> (2. Just use ImGUI in C++ normally and create all the rest of the logic in Common Lisp)
<|3b|> https://github.com/cimgui/cimgui has a c api you could wrap from lisp (and i think metadata you could use to generate wrappers automatically)
<CodeBitCookie[m]> |3b|: Ooooh, that sounds nice. It's also very frequently updated AND it's programmatically done.
<CodeBitCookie[m]> I think we could reconsider doing everything in Common Lisp...
<CodeBitCookie[m]> Any opinions? Anyone?
<Oladon> So... I've got a bizarre situation. I've got a macro where if I evaluate it straight, it does one thing... but if I eval the output of a macroexpand-1 with the same arguments, it does something else. Any ideas?
* |3b| tried to write an im UI lib in CL, but got stuck in a loop of not wanting to just make a direct translation of dear imgui or nuklear or whatever, but every thing i tried to "improve" just pushed problems around so after fixing a few i end up back where i started :/
anticomputer has quit [Remote host closed the connection]
anticomputer has joined #commonlisp
<Oladon> White_Flame: Psst... ^ ;)
<|3b|> Oladon: you are EVALuating the form returned by macroexpand, not printing and reading it back before evaluating, right?
<Oladon> Correct
<|3b|> you can try wrapping the body of the macro in PRINT and see if it does something different in the 2 cases
<Oladon> It's literally the difference between (my-macro arg1 arg2) and (eval (macroexpand-1 '(my-macro arg1 arg2)))
<|3b|> other question would be whether there is any lexical environment involved
<CodeBitCookie[m]> > * <@|3b|:libera.chat> tried to write an im UI lib in CL, but got stuck in a loop of not wanting to just make a direct translation of dear imgui or nuklear or whatever, but every thing i tried to "improve" just pushed problems around so after fixing a few i end up back where i started :/
<CodeBitCookie[m]> |3b|: So what do you suggest I do?
<beach> CodeBitCookie[m]: There is no need to quote the entire utterance by the other person.
<|3b|> CodeBitCookie[m]: depends on what your goals are, whether you think spending a bunch of time on a UI lib would be fun or not, etc :)
<Oladon> |3b|: What are you envisioning with the lexical environment question?
<Oladon> There's nothing different in the two calls, if that's what you mean
<|3b|> Oladon: if READ isn't involved, and you are testing at repl (or otherwise top-level forms) so no lexical env, only other general thing i can think of is compiler macros
<Oladon> Yeah, testing in the REPL
<Oladon> I'm so bamboozled
<CodeBitCookie[m]> beach: Okay, but why?
<beach> CodeBitCookie[m]: Because then we need to read it twice before realizing that we have already read it.
<|3b|> lexical env would include things like LET, MACROLET, SYMBOL-MACROLET, etc. EVAL evaluates in an enviroment without any of those, even if called from inside them, but macros might look at them and change expansion. doesn't apply if you are testing at the repl though
<hayley> CodeBitCookie: Remember that Matrix quotes the other person when you "reply" to someone. Don't do that.
<|3b|> Oladon: see if (compiler-macro-function 'my-macro) returns anything, and check wrapping body of macro with PRINT would be my suggestions for next steps
<CodeBitCookie[m]> *no-defun-allowed*: beach Okay.
rodicm has joined #commonlisp
<CodeBitCookie[m]> |3b|: Well, I hate spending time on a UI lib.
<|3b|> and maybe look for any accidental use of * / + etc free variable (or intentional use for that matter)
<CodeBitCookie[m]> |3b|: but how would I even separate the code into C++ and Common Lisp?
<CodeBitCookie[m]> Would that even be worth it?
<|3b|> CodeBitCookie[m]: i don't like c++ much, so it wouldn't be for me :)
<Oladon> |3b|: The macro does make use of an (intentional) dynamic variable, but... the values are right there in the macroexpand, so I can see that it's "taking"... except it's not taking without the macroexpand :P
<hayley> Suppose the concepts in your program are in a set S. Ideally, you want your C++ code to have the set {} of concepts, and your CL code to have all of set S.
bilegeek has quit [Ping timeout: 244 seconds]
<|3b|> i seem to like writing FFI generators though, so i'd probably go with wrapping cimgui if it were me :)
bilegeek has joined #commonlisp
<|3b|> having to recompile a bunch of C++ code (and probably stop and restart your program, etc) to change UI seems like it would lose a lot of benefits of imgui
<|3b|> if you do mix cl and c++, you end up needing to duplicate a bunch of stuff (types etc) between the 2
<|3b|> but if you already have a bunch of stuff in c++, maybe that's worth the effort, or maybe you can use something like ecl or clasp that can talk to c++ more directly
karlosz has joined #commonlisp
anticomputer has quit [Remote host closed the connection]
karlosz has quit [Ping timeout: 256 seconds]
anticomputer has joined #commonlisp
aartaka has quit [Ping timeout: 248 seconds]
aartaka has joined #commonlisp
lisp123 has quit [Remote host closed the connection]
notzmv has quit [Ping timeout: 244 seconds]
igemnace has joined #commonlisp
random-nick has joined #commonlisp
igemnace has quit [Remote host closed the connection]
igemnace has joined #commonlisp
bilegeek has quit [Remote host closed the connection]
lisp123 has joined #commonlisp
bilegeek has joined #commonlisp
aartaka has quit [Ping timeout: 248 seconds]
Oladon has quit [Quit: Leaving.]
lisp123 has quit [Remote host closed the connection]
lisp123 has joined #commonlisp
<CodeBitCookie[m]> <|3b|> "but if you already have a..." <- Wouldn't ECL require recompilation on change though?
<|3b|> i meant if you are writing the UI code in c++ and using cl for "scripting" that
<Josh_2> Good mornin'
<|3b|> you would have to recompile the c++ side to change the ui
<Josh_2> My internet is as unstable as always :sunglasses:
<CodeBitCookie[m]> |3b|: How much work do you think it would be if I started to make FFI generators?
<CodeBitCookie[m]> Since I have to focus on my project and I can't waste too much time just making the library work in Common Lisp.
<CodeBitCookie[m]> Also, I have had a bad experience with FFI generators as they just didn't work with CFFI and stuff.
lisp123 has quit [Remote host closed the connection]
treflip has joined #commonlisp
<|3b|> looks like cimgui has metadata in json, so if you are comfortable with cffi might not take too long to get something more or less working
<|3b|> making it nice to use might take a bit longer, but you could probably do most of that as needed
mon_aaraj has quit [Ping timeout: 248 seconds]
<Josh_2> Should use McClim :sunglasses:
<Josh_2> beach: last night you said how you would avoid floats for money, what would you use instead?
<|3b|> Josh_2: seems common to just pick some fraction and use integer amounts of that for money
mon_aaraj has joined #commonlisp
<|3b|> 1 cent or 1/1000 cent or whatever matches your requirements
<CodeBitCookie[m]> <|3b|> "looks like cimgui has metadata..." <- You have quite a lot of experience with CFFI I could tell, I really struggle with it though, so, if you don't mind, could you point me in the right direction as I tried following the CURL tutorial, and many others, but got lost half way through. Actually writing the FFI doesn't seem bad, it's actually pretty fun. However, making it work seems impossible.
<CodeBitCookie[m]> Oops, I replied again, sorry
<Josh_2> Okay so I receive the price '99.99' from a client and have to represent that as a ratio, how do I do that?
<Josh_2> gbp
lisp123 has joined #commonlisp
* |3b| didn't mean actual ratios, all values would be integers, just that the units would be dollars/1000 or whatever, which would shift the . when you read/write it
<|3b|> though i think there is a CL library for using rationals like that
<Josh_2> Oh I see
<Josh_2> This seems to be very similar to how Stripe handles money
<Josh_2> 99.99 GBP in Stripe is 9999
mon_aaraj has quit [Ping timeout: 258 seconds]
mon_aaraj has joined #commonlisp
<|3b|> CodeBitCookie[m]: hmm, not knowing cffi makes it harder :/
<CodeBitCookie[m]> |3b|: :(
<Josh_2> There are two functions #'rational and #'rationalize for converting to a rational number :)
<CodeBitCookie[m]> |3b|: I also watched this video: https://www.youtube.com/watch?v=A5CnYlG7sc8
<|3b|> if you are converting to a rational, you probably already lost :p
bilegeek has quit [Quit: Leaving]
<Josh_2> Yes I think so
<Josh_2> In a situation where I am receiving a product price from a client, I guess I have to either take two numbers and create a rational from those two numbers, or represent all monetary values in a way similar to stripe?
<|3b|> if you want to use rationals, i think the library for using them that way might have been wu-decimal
<Josh_2> Okay cool, wu-decimal parses the decimal string "99.99" straight into a rational :)
<Josh_2> There is also ratmath for creating approximations
<|3b|> if you are doing any serious math with money, you still need to be careful even with rationals though. for example if half of a transaction is external, make sure your half uses the value you sent to the external API, not a value before rounding or whatever
attila_lendvai has joined #commonlisp
dBc has joined #commonlisp
Josh_2 has quit [Remote host closed the connection]
Josh_2 has joined #commonlisp
<|3b|> like if you want "transfer 1/3 of this $100 account", and you calculate that as 100/3 and tell an external api to transfer "33.33", make sure you subtract 3333/100 not 100/3 from your version of the account
<|3b|> storing as integer amounts avoids that problem by making you round it immediately
<Josh_2> I understand. Thanks :)
pranavats has left #commonlisp [Disconnected: Replaced by new connection]
pranavats has joined #commonlisp
pranavats has left #commonlisp [Disconnected: Replaced by new connection]
pranavats has joined #commonlisp
treflip has quit [Quit: bye]
notzmv has joined #commonlisp
lisp123 has quit [Remote host closed the connection]
Josh_2 has quit [Remote host closed the connection]
Josh_2 has joined #commonlisp
leeb has quit [Ping timeout: 246 seconds]
lisp123 has joined #commonlisp
lisp123 has quit [Ping timeout: 256 seconds]
thuna` has joined #commonlisp
thuna` has quit [Remote host closed the connection]
thuna` has joined #commonlisp
lisp123 has joined #commonlisp
<utis_> how does one control which (sly) repl a buffer is connected to?
mon_aaraj has quit [Ping timeout: 246 seconds]
Guest74 has joined #commonlisp
mon_aaraj has joined #commonlisp
tyson2 has joined #commonlisp
<utis_> or maybe one just makes a connection the default
mon_aaraj has quit [Ping timeout: 248 seconds]
shka has joined #commonlisp
mon_aaraj has joined #commonlisp
waleee has joined #commonlisp
elia has joined #commonlisp
lisp123 has quit [Remote host closed the connection]
lisp123 has joined #commonlisp
utis_ has quit [Quit: leaving]
<Guest74> Welp after countless wasted hours I finally found the 'specification' for pfb fonts, hidden in plain sight at adobe buried in a 'technical note on downloadable fonts' pdf which never mentions pfb.
<Guest74> turns out it's a ridiculously simple type length data chunks.  So that should wrap most of type-1 fonts for cl, reading/writing(basic) of pfa and pfb, and reading metrics from afm.
<mfiano> I see uiop has functions to get the XDG_*_HOME directory pathnames, but does it have a function to get the current user's home directory?
<Guest74> whats wrong with user-homedir-pathname?
<mfiano> Nothing. What I was looking for.
<mfiano> Or I guess not. Too much undefined behavior.
<mfiano> uiop:run-program it is
<Guest74>  So, the only thing that remains is an elegant way to combine the glyph outlines with the font metrics.  Do I make a mega font?  Or just have the generic font interface read from the necessary font file?  And do I automatically load the glyphs when metrics are loaded and vice-versa? Or leave it up to the user to load both?
<Guest74> mfiano: yeah I wasn't sure if it'd be one of those underspecified gray areas.
elia has quit [Ping timeout: 258 seconds]
orestarod has joined #commonlisp
lisp123 has quit [Quit: Leaving...]
thuna` has quit [Remote host closed the connection]
Josh_2 has quit [Remote host closed the connection]
Josh_2 has joined #commonlisp
<Guest74> I really like this idea of using only relative commands to construct paths.  You can invert y by just changing the sign of all y coordinates.
tyson2 has quit [Ping timeout: 246 seconds]
waleee has quit [Ping timeout: 258 seconds]
Everything has joined #commonlisp
<dbotton> how far is CLISP from usable?
<dbotton> what is missing to "bring it up to date"?
aartaka has joined #commonlisp
<pjb> What? THere's a new version of the Common Lisp standard I didn't heard about???
<random-nick> what do you mean by usable?
<random-nick> GCL is the one which isn't very usable (because it's pre-ansi)
<pjb> dbotton: looks perfectly usable to me. So I'd say it's distance to being usable is absolutely 0.
<dbotton> It is constantly advertised as no longer an option, etc. for general use etc. I was curious how far from current standard or use it is since everywhere
<rotateq> pjb: Are you afraid you would have to relearn everything? :)
<random-nick> I think it's just the case that it's pretty slow and its unique features are not very popular
<random-nick> also it hasn't had a release in a very long time iirc
<random-nick> even though there are lots of changes in the repository
<pjb> rotateq: I'm not, since I would not.
<rotateq> pjb: So I guess you're as happy as me doing (and for me learning further) something that can stand the test of time for many reasons.
<dbotton> I also see doesn't work with emacs and slime at moment
<dbotton> for my purposes also need to tinker to get cffi
<dbotton> at least that is the case using homebrew defaults
<beach> dbotton: I am curious, what is your reason for asking about CLISP?
aartaka has quit [Ping timeout: 240 seconds]
Guest74 has quit [Quit: Connection closed]
aartaka has joined #commonlisp
Josh_2 has quit [Remote host closed the connection]
Josh_2 has joined #commonlisp
aartaka has quit [Ping timeout: 276 seconds]
aartaka has joined #commonlisp
rendar has joined #commonlisp
<dbotton> For the most part I use SBCL and ECL for my projects
<dbotton> I see though that CLISP is still heavily downloaded and is in old materials for beginners
<random-nick> clisp works with swank for me if I add quicklisp to its init file
<dbotton> random-nick the one in homebrew is not on m1 macs
<_death> it's not difficult to get clisp running well.. probably the biggest hurdle is to have it use a recent asdf version
<random-nick> since quicklisp loads asdf and apparently clisp doesn't load it
<random-nick> ah, I don't know much about macos so I don't know why it wouldn't work
livoreno has quit [Ping timeout: 255 seconds]
<dbotton> so beach I don't have a "need" just figured if easy to "fix" something beneficial perhaps to the community to not have something with issues hanging around for beginners to stumble on
livoreno has joined #commonlisp
<dbotton> If it standard compliant was curious then what could be missing about it
<_death> if you have time and will you may try offering help at https://gitlab.com/gnu-clisp/clisp/-/issues or the mailing list.. to get a new release going
aartaka has quit [Ping timeout: 255 seconds]
<beach> dbotton: Yes, I see.
<dbotton> random-nick by clisp is using asdf v "3.2.1"
aartaka has joined #commonlisp
<dbotton> "MAKE-HASH-TABLE: illegal keyword/value pair :WEAKNESS, :VALUE in argument list." is the issue I get running slime but could be from some extensions I have running in slime
<dbotton> that was it
<beach> There is no such keyword in the standard.
<dbotton> so sorry, homebrew version ok if I take out the extensions all works well
Oladon has joined #commonlisp
<dbotton> ya, I guess the extension is the issue
<_death> weak hash-tables are not part of standard CL
<mfiano> trivial-garbage is the portability library for that.
aartaka has quit [Ping timeout: 276 seconds]
<dbotton> turned the extension off. not needed
<dbotton> now I just have to get dynamic cffi working
<dbotton> which should just be a compile thing
aartaka has joined #commonlisp
<mfiano> This is a long shot but, is anyone looking to hire for any Common Lisp work, even if it's a one-off task? My family is very poor due me being unable to work anymore due to medical reasons.
<AadVersteden[m]1> mfiano: I sent you a DM.
<mfiano> AadVersteden[m]1: I did not get it.
<Shinmera> There's several tasks I'd like to get done, but do not have the funds to adequately pay for them given the estimated time required. :/
* AadVersteden[m]1 tries through regular IRC instead
<mfiano> Shinmera: That's okay. Thanks anyway.
<AadVersteden[m]1> Anyone being stuck somewhere: if you have linked data knowledge and you're stuck, then shooting an email to anything related to redpencil.io should at least make your profile be seen. Whether something pops out of that always depends on what's in front of us.
dBc has quit [Quit: leaving]
thomaslewis has quit [Quit: Gateway shutdown]
Oladon has quit [Quit: Leaving.]
aartaka has quit [Ping timeout: 248 seconds]
aartaka has joined #commonlisp
thomaslewis has joined #commonlisp
Mandus has quit [Ping timeout: 240 seconds]
Mandus has joined #commonlisp
santiagopim[m] has quit [Quit: You have been kicked for being idle]
Mandus has quit [Ping timeout: 255 seconds]
Mandus has joined #commonlisp
SAL9000 has quit [Remote host closed the connection]
Guest74 has joined #commonlisp
notzmv has quit [Ping timeout: 240 seconds]
elia has joined #commonlisp
elia has quit [Client Quit]
mrcom has quit [Quit: Leaving]
mon_aaraj has quit [Ping timeout: 248 seconds]
rodicm has quit [Ping timeout: 255 seconds]
mon_aaraj has joined #commonlisp
mon_aaraj has quit [Ping timeout: 248 seconds]
mon_aaraj has joined #commonlisp
attila_lendvai has quit [Ping timeout: 248 seconds]
Dynom has joined #commonlisp
_paul0 has joined #commonlisp
paul0 has quit [Remote host closed the connection]
notzmv has joined #commonlisp
Volt_ has joined #commonlisp
jolby has joined #commonlisp
rainthree has joined #commonlisp
livoreno has quit [Read error: Connection reset by peer]
livoreno has joined #commonlisp
SAL9000 has joined #commonlisp
thomaslewis has quit [Quit: Gateway shutdown]
manykwh has joined #commonlisp
mon_aaraj has quit [Ping timeout: 258 seconds]
mon_aaraj has joined #commonlisp
mrvdb has quit [Ping timeout: 244 seconds]
lonjil has quit [Quit: No Ping reply in 180 seconds.]
mrvdb has joined #commonlisp
lonjil has joined #commonlisp
SAL9000 has quit [Remote host closed the connection]
mon_aaraj has quit [Ping timeout: 255 seconds]
dtman34 has quit [Quit: ZNC 1.7.2+deb3 - https://znc.in]
mon_aaraj has joined #commonlisp
mrcom has joined #commonlisp
dtman34 has joined #commonlisp
__gyr has joined #commonlisp
_paul0 has quit [Remote host closed the connection]
kpoeck has joined #commonlisp
rodicm has joined #commonlisp
livoreno has quit [Ping timeout: 248 seconds]
Everything has quit [Quit: leaving]
Guest74 has quit [Quit: Connection closed]
utis has joined #commonlisp
<utis> lquery's contains function seems always to return an empty vector . .
ttree has joined #commonlisp
rainthree has quit [Ping timeout: 246 seconds]
tyson2 has joined #commonlisp
lottaquestions_ has quit [Quit: Konversation terminated!]
pjb has quit [Read error: Connection reset by peer]
saura has joined #commonlisp
saura has quit [Ping timeout: 276 seconds]
Bike has joined #commonlisp
<utis> nevermind
<rotateq> utis: How did you call it?
<rotateq> Ah ok I see now it takes a nodes and a string argument.
hashfunc16bc has joined #commonlisp
rodicm has quit [Quit: Leaving]
pjb has joined #commonlisp
tyson2 has quit [Ping timeout: 240 seconds]
<utis> rotateq: i assumed it would match substrings and that it would operate on subnodes
hashfunc16bc has quit [Remote host closed the connection]
Dynom has quit [Quit: WeeChat 3.5]
prokhor__ has quit [Ping timeout: 246 seconds]
SAL9000 has joined #commonlisp
axel-bee has joined #commonlisp
kpoeck has quit [Quit: Client closed]
bilegeek has joined #commonlisp
axel-bee has quit [Remote host closed the connection]
axel-bee has joined #commonlisp
axel-bee has quit [Remote host closed the connection]
karlosz has joined #commonlisp
shka has quit [Ping timeout: 248 seconds]
axel-bee has joined #commonlisp
kpoeck has joined #commonlisp
axel-bee has quit [Remote host closed the connection]
waleee has joined #commonlisp
axel-bee has joined #commonlisp
axel-bee has quit [Remote host closed the connection]
axel-bee has joined #commonlisp
axel-bee has quit [Remote host closed the connection]
knusbaum has joined #commonlisp
azimut has quit [Remote host closed the connection]
axel-bee has joined #commonlisp
azimut has joined #commonlisp
axel-bee has quit [Remote host closed the connection]
tyson2 has joined #commonlisp
knusbaum has quit [Quit: ZNC 1.8.2 - https://znc.in]
livoreno has joined #commonlisp
Oladon has joined #commonlisp
knusbaum has joined #commonlisp
citizenandrew has joined #commonlisp
citizenandrew has left #commonlisp [#commonlisp]
citizenandrew has joined #commonlisp
<Oladon> I made a simple case to recreate the weirdness I'm experiencing with dynamic variables in macros... I suspect I'm doing something wrong, but would someone mind taking a look? https://pastebin.com/PQX2yFuj
livoreno has quit [Ping timeout: 260 seconds]
n1to has joined #commonlisp
minion has quit [Remote host closed the connection]
specbot has quit [Killed (NickServ (GHOST command used by specbot1))]
minion has joined #commonlisp
specbot has joined #commonlisp
Seok__ has joined #commonlisp
<citizenandrew> Oladon: Are you looking for the behavior that would occur if you did not have the comma before *connection-info* in your macro definition?  Otherwise it appears the let binding is not active during execution time.  It might be clearer if you defined a function with a let around the function definition what was setting *connection-info*... would
<citizenandrew> you expect the let to modify the environment the macroexpansion occurs in?
aeth_ has joined #commonlisp
aeth has quit [Killed (NickServ (GHOST command used by aeth_))]
aeth_ is now known as aeth
danieli5 has joined #commonlisp
cognemo_ has joined #commonlisp
hirez has joined #commonlisp
sveit_ has joined #commonlisp
skyl4rk` has joined #commonlisp
<Oladon> Not looking for the commaless behavior, because I actually need the value to be interpolated into the call... redis:with-persistent-connection is a macro which destructures its first argument without evaluating it, which means if you give it a symbol it will object... you have to actually give it a list.
<Oladon> The let is clearly active during execution time with the first example (the macroexpand-1 version)... if you eval that you get the desired behavior. But for some reason, just getting rid of the macroexpand causes it to use the top-level *connection-info*, which is really bamboozlin' me
Mandus_ has joined #commonlisp
utis_ has joined #commonlisp
ChibaPet has joined #commonlisp
zak1 has joined #commonlisp
miker2049_ has joined #commonlisp
karlosz has quit [Ping timeout: 276 seconds]
okflo_ has joined #commonlisp
pjb has quit [*.net *.split]
utis has quit [*.net *.split]
Mandus has quit [*.net *.split]
z4kz has quit [*.net *.split]
cognemo has quit [*.net *.split]
sveit has quit [*.net *.split]
seok- has quit [*.net *.split]
okflo has quit [*.net *.split]
mason has quit [*.net *.split]
hirez- has quit [*.net *.split]
miker2049 has quit [*.net *.split]
danieli has quit [*.net *.split]
skyl4rk has quit [*.net *.split]
danieli5 is now known as danieli
miker2049_ is now known as miker2049
karlosz has joined #commonlisp
opcode has quit [Ping timeout: 244 seconds]
jolby has quit [Quit: Client closed]
opcode has joined #commonlisp
mbrndtgn has quit [Quit: The Lounge - https://thelounge.chat]
mbrndtgn has joined #commonlisp
jolby has joined #commonlisp
mbrndtgn has quit [Client Quit]
mbrndtgn has joined #commonlisp
kpoeck has quit [Quit: kpoeck]
skyl4rk` is now known as skyl4rk
jolby has quit [Quit: Client closed]
<citizenandrew> Oladon: OK, the dynamic environment created by the let is not the one in which the macroexpansion occurs.  Here is a paste explaining why you might expect that to be the case.  https://pastebin.com/SkTNtAzZ  .  What I think you want to do is figure out what redis:with-connection-info does and just do that in your macro.  This stuff is
<citizenandrew> confusing, so I don't guarantee I'm right here
<Oladon> Hm, fair point...
<citizenandrew> I would imagine there is a real redis:with-connection or something that behaves how you want (allows dynamic rebinding of the current connection).
igemnace has quit [Remote host closed the connection]
<Oladon> I don't really need to change the current connection, I'm just trying to use a single list of connection info instead of multiple variables
karlosz has quit [Quit: karlosz]
<jmes> Is there a way to get a list of the exported functions by an ASDF package programatically?
<Bike> jmes: an asdf system? i don't think asdf tracks which packages a system defines, but if you know the packages already, you can get a list of exported and fbound symbols
<jmes> Oops, yeah I mean a system
<jmes> or, if I knew the packages, how would I do that?
<Bike> (loop for s being the external-symbols of packagesgoeshere when (fboundp s) collect s)
<Bike> and you can do some other stuff to separate out macros if you want
<Bike> or get setf functions
<Bike> Oladon: looking at the with-connection macro, the main thing it does is bind *connection* to a redis-connection object. all the symbols are exported so you can probably write a functional version like you want.
<Oladon> Yeah, I suppose I can rewrite it, I just didn't want to poke my fingers too deep :)
<Bike> also, andrew is correct about the problem
<Oladon> nods
<Bike> a simpler thing you could do is just keep the values rather than the whole plist
<Oladon> Yeah.
<Bike> since the with-connection macro does evaluate those
<Oladon> But then I have to destructure it and poke them in the right places
<Bike> sure, but you don't have to poke your fingers very deep.
<Oladon> True.
axel-bee has joined #commonlisp
axel-bee has quit [Remote host closed the connection]
<jmes> Bike: nice! that works great, thanks
Oddity has joined #commonlisp
axel-bee has joined #commonlisp
axel-bee has quit [Remote host closed the connection]
axel-bee has joined #commonlisp
axel-bee has quit [Remote host closed the connection]
knusbaum has quit [Ping timeout: 248 seconds]
knusbaum has joined #commonlisp
Volt_ has quit [Ping timeout: 246 seconds]
Volt_ has joined #commonlisp
random-nick has quit [Ping timeout: 248 seconds]
lisp123 has joined #commonlisp