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/>
jmdaemon has quit [Ping timeout: 240 seconds]
NicknameJohn has quit [Ping timeout: 264 seconds]
terrorjack has quit [Quit: The Lounge - https://thelounge.chat]
johnjaye has quit [Read error: Connection reset by peer]
terrorjack has joined #commonlisp
johnjaye has joined #commonlisp
terrorjack has quit [Client Quit]
terrorjack has joined #commonlisp
jmdaemon has joined #commonlisp
ldb has quit [Quit: ERC 5.4 (IRC client for GNU Emacs 28.1)]
abrantesasf has quit [Remote host closed the connection]
NicknameJohn has joined #commonlisp
ryanbw has joined #commonlisp
NicknameJohn has quit [Ping timeout: 240 seconds]
skin_ has joined #commonlisp
skin has quit []
skin_ is now known as skin
tyson2 has quit [Remote host closed the connection]
nij- has joined #commonlisp
dino_tutter has quit [Ping timeout: 268 seconds]
waleee has quit [Ping timeout: 240 seconds]
waleee has joined #commonlisp
johnjaye has quit [Ping timeout: 264 seconds]
johnjaye has joined #commonlisp
dino_tutter has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ has joined #commonlisp
nij- has joined #commonlisp
<nij-> Anyone here uses roswell? It's easy to switch between different versions of sbcl. But sometimes I want to use the cores I built as default. Wonder if that's possible.
waleee has quit [Ping timeout: 264 seconds]
waleee has joined #commonlisp
<nij-> For those who don't use roswell, I wonder how you handle many different versions of implementations and the cores built on top of them. Like, how do you quickly switch your default lisp? How does that work for your lisp scripts (e.g. those that start with `#!/bin/sbcl`)?
nij_ has left #commonlisp [#commonlisp]
<edwlan[m]> I don't really use cores
<edwlan[m]> I start an empty implementation and load the code I need into it from scratch
<nij-> edwlan What if you scripts need dependencies say from quicklisp?
<nij-> If you let it load the dependency every time, it slows down the start time drastically..
<edwlan[m]> Only the first time
<edwlan[m]> The second time, its in the cache
<nij-> ?! It's in the cache of what?
<edwlan[m]> ASDF ~/.cache/common-lisp
<edwlan[m]> But I don’t typically use scripts
<edwlan[m]> If I need that sort of thing I save an executable
<edwlan[m]> But even that is rare, I typically have a long-running lisp session going at any time
<edwlan[m]> And I use it like a shell
waleee has quit [Ping timeout: 250 seconds]
<nij-> I have other tools like emacs or ranger where I can press a key on selected files and run a script against them.
waleee has joined #commonlisp
<edwlan[m]> Yeah, I sort of work the opposite way: I collect utility functions to let me query external systems and manipulate them in lisp
nij- has quit [Ping timeout: 246 seconds]
nij- has joined #commonlisp
greaser|q is now known as GreaseMonkey
<nij-> edwlan[m] Say, for example, you press a key in emacs, and you want it to feed the string at point to your lisp function.
<nij-> How would the workflow be?
<nij-> You somehow need to send the string to your running lisp (as a server).
<edwlan[m]> (slime-eval `(:printv ,(cl-map 'string 'identity (thing-at-point 'line))))
<edwlan[m]> Wrap something like that up in an emacs command
<edwlan[m]> (the complexity there is to strip text properties)
<nij-> Oh, yeah emacs have slime so it's easier.
<nij-> How about other programs like emacs, but without slime support? (I'm thinking of ranger.)
<edwlan[m]> But, even then, I typically try to get the data in CL directly
<nij-> ranger is a file manager that allows you to bind keys to actions too
<edwlan[m]> Yeah, you could use something like swank-client or cl-launch I think
<nij-> But if I want to send data from ranger to CL, I may have to write a shell script to do that..
<nij-> cl-launch doesn't let you talk to a running lisp server iirc..
<edwlan[m]> But I tend to have functions like this in my running lisp and use them instead of external tools: https://github.com/fiddlerwoaroof/dotfiles/blob/eff889f0b74956c9536bffffb9b71d9f65853f13/sbcl/utils.lisp#L85-L94
<ixelp> dotfiles/utils.lisp at eff889f0b74956c9536bffffb9b71d9f65853f13 · fiddlerwoaroof/dotfiles · GitHub
<edwlan[m]> Yeah, there was a similar tool that did, but I forget what it was called
<nij-> hmm
<edwlan[m]> (they will occasionally wrap external tools, but I don't tend to use the shell at all when working on lisp projects)
<nij-> Yeah, I don't like to use shell either but sometimes it's inevitable.
<nij-> For example, I'm in my web browser that want to send the selected string to my fav cl function.
<nij-> For another example, I
<nij-> I'm in my window manager or file manager, and want to send the selected file(s) to my fav cl function.. etc.
<edwlan[m]> What I've wanted to write but just haven't is a tool for doing this sort of thing that uses a unix socket or a named pipe
<nij-> You mean to send data to your running lisp?
<edwlan[m]> Yeah
<edwlan[m]> Just simple sequences of bytes to be interpreted as needed on the lisp side
<nij-> And we should use swank/slynk too, to avoid reinventing the wheel.
xristos has joined #commonlisp
<edwlan[m]> They solve different problems
<nij-> I mean, your running lisp probably has been listening using swank.
<edwlan[m]> In a lot of cases I want to be able to do something like ps ax | socat - unix-connect:/tmp/my.sock (or whatever) and then do (string-upcase (read-line comm))
<edwlan[m]> swank/slynk solve the "I want to interact with a networked REPL" problem
<nij-> Oh you want to use either a socket or a named pipe, but not localhost?
<edwlan[m]> Well, I could use localhost, but the point is that I don't care about sending code over the wire
<nij-> If you don't care about speed, then swank has been there listening on local host.
<nij-> All you need is to figure a way to wrap you string into payload swank likes, and send.
<edwlan[m]> But I have to build a valid swank event to use it
<nij-> Yeah
<nij-> Oh, it seems much easier than I thought.
<nij-> The actualy string that's sent to slynk is (format nil "000035(:emacs-rex (cl:list nil 1 1 (cl:+ 1 9)) nil t 2162)~%")
<nij-> This happens when I evaluate (sly-eval `(cl:list nil 1 1 (cl:+ 1 9))) in emacs.
<nij-> Or I can simply send the data to emacs using emacsclient, and then send to lisp using slime/sly... this sounds more robust.
dcb has quit [Quit: MSN Messenger v2.16.1]
raemac has joined #commonlisp
raemac has quit [Remote host closed the connection]
zaymington has joined #commonlisp
NicknameJohn has joined #commonlisp
zaymington has quit [Remote host closed the connection]
waleee has quit [Ping timeout: 240 seconds]
LW has joined #commonlisp
easye has quit [Ping timeout: 265 seconds]
easye has joined #commonlisp
White_Flame has quit [Remote host closed the connection]
White_Flame has joined #commonlisp
Cymew has joined #commonlisp
easye has quit [Remote host closed the connection]
easye has joined #commonlisp
Brucio-61 has quit [Read error: Connection reset by peer]
Brucio-61 has joined #commonlisp
LW has quit [Quit: WeeChat 3.8]
rgherdt has joined #commonlisp
flip214_ has joined #commonlisp
flip214 has quit [Read error: Connection reset by peer]
easye has quit [Remote host closed the connection]
flip214_ is now known as flip214
easye has joined #commonlisp
flip214 has quit [Changing host]
flip214 has joined #commonlisp
Cymew has quit [Ping timeout: 240 seconds]
igemnace has joined #commonlisp
scymtym has quit [Ping timeout: 240 seconds]
Brucio-61 has quit [Ping timeout: 260 seconds]
pranavats has left #commonlisp [Error from remote client]
msavoritias has joined #commonlisp
Brucio-61 has joined #commonlisp
pranavats has joined #commonlisp
random-nick has joined #commonlisp
sepisoad has joined #commonlisp
sepisoad has quit [Client Quit]
shka has joined #commonlisp
attila_lendvai has joined #commonlisp
Brucio-61 has quit [Ping timeout: 260 seconds]
Brucio-61 has joined #commonlisp
wilfred has joined #commonlisp
azimut has quit [Ping timeout: 240 seconds]
pve has joined #commonlisp
msavoritias has quit [Remote host closed the connection]
msavoritias has joined #commonlisp
lucasta has quit [Remote host closed the connection]
Gleefre has quit [Remote host closed the connection]
msavoritias has quit [Remote host closed the connection]
msavoritias has joined #commonlisp
Inline has quit [Quit: Leaving]
LW has joined #commonlisp
LW has quit [Client Quit]
Everything has quit [Quit: leaving]
Everything has joined #commonlisp
MajorBiscuit has joined #commonlisp
msavoritias has quit [Ping timeout: 240 seconds]
MajorBiscuit has quit [Ping timeout: 256 seconds]
remexre_ has joined #commonlisp
msavoritias has joined #commonlisp
remexre has quit [Ping timeout: 240 seconds]
remexre_ is now known as remexre
Lord_of_Life_ has joined #commonlisp
Lord_of_Life has quit [Ping timeout: 268 seconds]
MajorBiscuit has joined #commonlisp
msavoritias has quit [Ping timeout: 240 seconds]
Lord_of_Life_ is now known as Lord_of_Life
msavoritias has joined #commonlisp
msavoritias has quit [Ping timeout: 240 seconds]
msavoritias has joined #commonlisp
NicknameJohn has quit [Ping timeout: 240 seconds]
msavoritias_ has joined #commonlisp
msavoritias has quit [Ping timeout: 240 seconds]
msavoritias_ is now known as msavoritias
msavoritias_ has joined #commonlisp
msavoritias has quit [Ping timeout: 268 seconds]
msavoritias_ is now known as msavoritias
kevingal has joined #commonlisp
MajorBiscuit has quit [Ping timeout: 240 seconds]
msavoritias has quit [Ping timeout: 264 seconds]
MajorBiscuit has joined #commonlisp
OlCe has quit [Remote host closed the connection]
Brucio-61 has quit [Ping timeout: 268 seconds]
Brucio-61 has joined #commonlisp
rgherdt has quit [Remote host closed the connection]
rgherdt has joined #commonlisp
luis4 has joined #commonlisp
luis4 is now known as luis
MajorBiscuit has quit [Ping timeout: 240 seconds]
wilfred has quit [Quit: Connection closed for inactivity]
jaz6578 has quit [Quit: Leaving]
Noisytoot has quit [Quit: ZNC 1.8.2 - https://znc.in]
Noisytoot has joined #commonlisp
MajorBiscuit has joined #commonlisp
msavoritias has joined #commonlisp
Gillian has joined #commonlisp
Gillian has quit [Ping timeout: 240 seconds]
msavoritias has quit [Read error: Connection reset by peer]
msavoritias has joined #commonlisp
nij- has quit [Remote host closed the connection]
nij- has joined #commonlisp
msavoritias has quit [Read error: Connection reset by peer]
msavoritias has joined #commonlisp
bjorkintosh has joined #commonlisp
mgl has joined #commonlisp
pranavats has left #commonlisp [Error from remote client]
nij- has quit [Ping timeout: 250 seconds]
cage has joined #commonlisp
scymtym has joined #commonlisp
tyson2 has joined #commonlisp
bjorkintosh has quit [Quit: Leaving]
morganw has joined #commonlisp
attila_lendvai_ has joined #commonlisp
attila_lendvai has quit [Ping timeout: 240 seconds]
jryans has joined #commonlisp
Cymew has joined #commonlisp
kevingal has quit [Ping timeout: 240 seconds]
Cymew has quit [Ping timeout: 240 seconds]
shka has quit [Quit: Konversation terminated!]
scymtym has quit [Ping timeout: 240 seconds]
Brucio-61 has quit [Ping timeout: 260 seconds]
shka has joined #commonlisp
piethesailor has joined #commonlisp
Brucio-61 has joined #commonlisp
kevingal has joined #commonlisp
shka has quit [Read error: Connection reset by peer]
shka has joined #commonlisp
piethesa` has joined #commonlisp
piethesailor has quit [Remote host closed the connection]
piethesa` has quit [Remote host closed the connection]
jmdaemon has quit [Ping timeout: 265 seconds]
tyson2 has quit [Remote host closed the connection]
piethesailor has joined #commonlisp
waleee has joined #commonlisp
wooldoor has joined #commonlisp
slyrus has joined #commonlisp
azimut has joined #commonlisp
rgherdt has quit [Ping timeout: 248 seconds]
MajorBiscuit has quit [Ping timeout: 240 seconds]
<wooldoor> Hello, I found something odd while using CLSQL and SBCL's save-lisp-and-die and I was wondering if anyone else ran into it
<wooldoor> Trying to create a new row in an SQLite database causes a memory fault when ran from a executable built with save-lisp-and-die but works fine when loaded normally
<knusbaum> Trying to switch to sly/slynk WHY IS SLIME STILL LOADING IN EMACS!?
<JonBoone[m]> byte compiled config files?
<jackdaniel> knusbaum: rm -rf ~/.slime
<jackdaniel> also check ~/.emacs or ~/.emacs.d/init.el and look for suspiciously looking strings involving "slime"
<jackdaniel> https://imgur.com/VQR8ewH.png \o/ (on the left -faceted plot, on the right no faceting) still much to do, but that's a start :)
<knusbaum> Beautiful graphs.
<jackdaniel> thanks!
<knusbaum> Removed ~/.slime, but still no good. I removed every reference to slime from init.el too. I'm worried roswell is importing stuff though.
* jackdaniel stays away from roswell
<knusbaum> Yeah, I'm starting to feel like I should as well.
<knusbaum> It seems to take over too much...
<jeosol> Good morning all!
<beach> Hello jeosol.
<jeosol> Hi beach, how is everything over there?
* knusbaum frowns
<beach> jeosol: Fine. And you?
<knusbaum> ripped out roswell. Still no luck.
<jeosol> beach: that's great. I am doing well, not bad, getting much warmer here. I haven't been here much lately
<knusbaum> Ok. Just deleted the slime packages from emacs. Now they're not messing with sly.
<beach> jeosol: Good to hear. And, yes, I noticed your absence.
<jeosol> beach: haha, I hope it a good way, and not that I was polluting the channel with my questions, haha
<beach> I don't recall any problems with your questions. Then again, my memory is terrible. :)
<jeosol> beach: For my project, I think I am mostly done with it (at least the features I wanted). I was trying to add some chatgpt frontend but that will take too much time, so think I will just leave it as is.
<beach> Congratulations!
<jeosol> beach: Thanks!!!
<beach> I am working on really boring stuff, but I think it is going to turn out to be essential, so I try to do a bit every day.
<jeosol> beach: As I stated in the past, had to do some with Python :-( and it's not easy working with it, after using CL. Yes, python makes a lot of things easy, but when it comes to version issues and code breaking, it's a pain. These are issues I don't experience much in the CL ecosystem.
<beach> I see.
<jeosol> beach: Yes, the key is 'incremental'. I don't think I could have been able to work on my project, it's was too much, but it was mostly a research too to help me do my computations for my research. It them took different forms and I didn't quite see how it will turn out.
nij- has joined #commonlisp
<beach> I think I understand.
<jeosol> Perhaps we need big investments in the CL space
<beach> Money? I fear we need to try to do without.
<jeosol> Yeah, I meant money. LIke investments towards developing specific capabilities and libraries
dino_tutter has quit [Ping timeout: 240 seconds]
ym has joined #commonlisp
* jackdaniel was about to make a joke that we also need to modernize the standard, but hestitated
nij- has quit [Remote host closed the connection]
nij- has joined #commonlisp
<jeosol> Is there currently a CL committee, albeit informal, that oversees or discuss the modernization issues. It's takes effor to add tooling and there are lot of libraries that does cool things.
<jackdaniel> before you build bureaucracy you need the enterprise going first
<beach> The only thing I know of is the very informal WSCL process, but that's a very modest modernization.
<jeosol> For example, while looking to event messaging, I found cl-bunny (works with RabbitMQ) and enables on to incorporate message queueing to CL applications.
<jackdaniel> doesn't that fact taht it is a library a living proof that there is no need for modernization (in this particular aspect)
<jeosol> jackdaniel: are you referring to my cl-buny comment?
<knusbaum> The only way modernizing the standard could help there would be to define some kind of (defclass fundamental-message-queue) to unify the various implementations interfaces. But I don't think that's actually very useful in this case.
dino_tutter has joined #commonlisp
<jeosol> I often say, I am not a 'compiler' person, so most of my enhancements and improvement thoughts are on the "library side" to enable better integration with modern systems. I think a lot of the base tools are there.
<beach> I am not sure that libraries require changes to the standard. However, there is a lot of unspecified behavior in the standard, and that is not good at all. In my opinion, that aspect must be dealt with first.
<jeosol> and by 'modern systems', I mean having libs that allow one to stay in CL as much as possible. The event-messaging thing for me was huge, and I had realibility issues with lost connections using simple request-response workflow.
<beach> People use programming systems that don't have an associated language standard every day, and they are perfectly happy with it.
<beach> So I don't see what adding libraries to the Common Lisp standard would accomplish.
<jeosol> I agree. I am mostly referring to things layered on CL. But I imagine there are some features that may enable some better coding styles or enable somethings not currently possible. I don't know what those are because my layer is mostly on top the language and I just work with it as best as I can.
<Bike> i can imagine it being useful to add coroutines or something. that seems more appropriate for a language standard than libraries
<jeosol> beach: to be clear, I am not proposing add libraries to the standard, but libraries to build CL applications, I guess something like CLOG could be one.
<beach> jeosol: But that can happen only if there are people willing to work on those libraries. I don't see any other way to accomplish it.
<jackdaniel> well, some people build such thing day-by-day ,)
<jackdaniel> s/thing/things/
<jeosol> Case in point. I wanted to show a CL app to some people, needed some quick frontend (before CLOG), I had to use something based on python, called streamlit for the demo.
<beach> jeosol: So what you are suggesting is again more money?
<beach> I am all in favor, but I don't see where it would come from.
<jeosol> beach: haha, I agree, I see it does suggest that. Well if some university programs can be funded and the by-products put in opensource.
<jeosol> beach: I agree, the funding is the issue and most people would not want to use CL, especially when people aren't as familiar with the language in many settings.
<jackdaniel> we can also rob a bank
<jeosol> haha :-)
* jackdaniel leave the office, see you later \o
<gilberth> There are very few things that you cannot implement as a library. Of what you cannot what I miss most is a READ-SEQUENCE that would do short reads like read(2) together with a READ-CHAR-NO-HANG, a fixed LISTEN and some primitive to wait on a stream to be ready with a timeout like select(2) or poll(2) can do. And UNREAD-SEQUENCE or a buffer protocol. That's about streams.
<gilberth> Another puzzle piece that I miss and that you cannot implement with a library at all is: EVAL and COMPILE taking an environment argument. That's a showstopper to MACROEXPAND-ALL or any code walker.
<gilberth> In general I believe a more descriptive standard would some more reasonable approach. There are a few things that are great improvements and are universally supported now. E.g. relative package names^W^W^Wpackage local nicknames and the "R" number marker. As well as Gray Streams and multithreading.
<jeosol> gilbert: good points and this will also facilitate developments of application libs.
<gilberth> But as always this is a can of worms as everybody would want their favorite library listed there.
<jeosol> hence a committee :-)
<gilberth> I want the most conservative committee then.
<jeosol> that should be do-able I suppose, so we don't mess things up.
<Bike> the most conservative committee is kind of the idea behind wscl, but that means nothing like adding functions or changing apis
<gilberth> Historically things like LOOP, CLOS, FORMAT, the pretty printer and perhaps a few other things were just libraries. This is why when you look there is very much shared code between Lisp implementations.
<jeosol> I remember reading comments from someone here (I can't remember their nick) but they were in the ANSI committee, if I remember correctly.
<beach> jeosol: The only one I know of like that is masinter.
<jeosol> we can perhaps tap their experience
<jeosol> beach: Thanks. I think that's their nick.
<gilberth> My concern is show stoppers, like e.g. the fact that it is not possible to implement MACROEXPAND-ALL. Whether those stream deficiencies that are road blocks to implement network servers is of that class, perhaps is very subjective.
<beach> gilberth: When things like EVAL in a lexical environment are brought up, there are usually remarks (often from me) that it would make it very hard to write an optimizing compiler then. Can I therefore assume that you have figured out how to write such a compiler?
<gilberth> beach: MACROLET has sorted that out. My troubles are: 1. When CONSTANTP tells me something is constant, how to get its value? 2. I really would like to be able to fully macroexpand a form that I see in a macro or compiler macro. Given the latter I could do the former as well.
* beach is lost, not surprisingly.
<gilberth> I see no problem with having access to declarations (with the CLtL1 lexical environment API) and having access to local macros. Accessing a lexical variable is then forbidden or just UB.
<Bike> beach: pretty sure gilberth on means making macro environments available to eval
<beach> gilberth: I thought you were suggesting that something like (let ((x ...) ... (eval 'x))) would be possible.
<beach> Ah, OK.
<gilberth> beach: You have a lexical environment passed with an &environment argument, now create a new lexical environment from that augmented by a macro of your own from a closure you have. Can you do that?
<Bike> reifying a normal lexical environment is what makes compilation hard-to-impossible, but you can pass around environments without allowing that
<beach> So then I don't understand what it means for eval to take an environment argument. But that's just because I would need a very long time to figure it out from what was said.
<Bike> eval and compile are actually sort of the odd ones out, since pretty much every other function that deals with forms also lets you pass an environment, even stuff like make-load-form where it barely matters
<gilberth> Well, without it I cannot implement MACROEXPAND-ALL. Not when I need to macroexpand-all within a given lexical environment.
<beach> I think I need to read what Bike wrote to get a clue.
<Bike> beach: the environment passed to eval could have local macro definitions which would then be used during evaluation, for example
<beach> Yes, I see.
<beach> Thanks.
<Bike> cltl2 has a function that lets you accomplish this indirectly, ENCLOSE
<gilberth> beach: Take the CONSTANTP. I say (defmacro foo (x &environment env) (if (constantp x env) :win :lose)), and then (macrolet ((blah () 42)) (foo (blah)) might as well return :WIN.
waleee has quit [Ping timeout: 246 seconds]
<gilberth> Now suppose that in a compiler macro I want to get at the value of that constant. CONSTANTP returns T, but I still can get at the value.
<gilberth> Testing with (CONSTANTP form NIL) and then say (EVAL form) is IMHO just wrong. There might be macros in place that shadow things.
<Bike> constant-form-value would be another nice standard function to have, on that note
<beach> gilberth: I admire your patience, but there is no way I am going to understand the issue without going away to think about it for a long time.
<Bike> although i suppose eval-with-environment subsumes it
<gilberth> EVAL would do. And it would also make it possible to implement a code walker or a macroexpand-all.
<gilberth> beach: IRC is too limiting to really communicate some good example well.
<Bike> i think for a code walker you need to strengthen the restrictions so that implementations can't add their own weird special operators
<gilberth> Bike: Indeed. But there aren't really too many of those. You can care for that with a few #+. That's not by show stopper.
<gilberth> s/by/my/
<gilberth> The most prominent is some named lambda.
pranavats has joined #commonlisp
<beach> I guess the short answer, as Bike hinted, is that the environment in question would contain only compile-time bindings, similar to the restriction for MACROLET.
f04 has joined #commonlisp
<gilberth> Oh, some other missing puzzle pieces: I cannot tell whether a given s-expr names a type or not. And so I cannot tell whether (DECLARE (FOO X)) is a type declaration.
<beach> That's a good one, yes.
<gilberth> beach: That was my idea.
<gilberth> IIRC it indeed is MACROLET which lists the restrictions. But I am too lazy to check right now.
<beach> gilberth: But since you didn't say that, you confused the hell out of me.
<Bike> i have some semi-baked proposals written up for expanding type introspection, but they've been on the back burner
kevingal has quit [Ping timeout: 240 seconds]
<gilberth> beach: I was just assuming that nobody would believe that I want lexical variables in the lexical environment exposed. They don't exist at compile time. Only some information about them like type declarations.
<beach> gilberth: There is a lot of work going on that you may have missed. Not with the standard, but with first-class global environment and better compile-time environment support.
<beach> gilberth: I doubted that you would want that, but I had to make sure.
<Bike> i've done some experiments with exposing lexical variables. it's not totally impossible or anything (just mostly)
<char[m]> gilberth: I believe you can try to parse the type specifier with ctype. If it fails then it is not a valid type specifier.
<gilberth> What's ctype?
<Bike> it's a library i made for type parsing
<gilberth> And what is there to parse with FOO?
<Bike> but it needs implementation specific hooks
<Bike> it'll do (type-expand 'foo), and then if foo is a derived type it will return the expansion
<Bike> so said implementation hooks are still appropriate for inclusion in a revised standard
<gilberth> And what if it is a structure type or some other builtin type?
<ixelp> GitHub - s-expressionists/ctype: CL type system implementation
<Bike> it assumes that structure types correspond to classes (which is true, as far as i know), and builtin types it will parse into an object representing the type specified
<Bike> i think it is probably overkill if you just want to know if a symbol names a type
<beach> gilberth: We have solved many of those problems, but not in the context of the standard. We create libraries (that may need support from each implementation) that handle such things.
<gilberth> Well, I was not talking about a practical problem. I can always find the internal lisp implementation specific way to figure out. But about the fact, that I would.
<nij-> Any de facto library for deep-copying stuctures (like list, hash tables, arrays, and objects)?
<beach> But one of the libraries like ctype makes it unnecessary for each application to consult the implementation. Dependency is concentrated to the library.
<beach> nij-: Deep copy is not well defined.
<nij-> Right, there are several ways to "copy". So I'd imagine a de facto lib lets the user choose and even extend the copying procedure.
* gilberth continues hacking his noffi.
<pve> Hey, is there an easy way to configure fuzzy completion in slime to include matching external symbols from other packages when doing tab completion? I mean if I type "with-gen" TAB, the list of fuzzy suggestions would include "alexandria:with-gensyms".
f04 has quit [Remote host closed the connection]
f04 has joined #commonlisp
f04 has quit [Remote host closed the connection]
vassenn has joined #commonlisp
nij- has quit [Ping timeout: 250 seconds]
<char[m]> pve: that's default for me at least in sly.
<pve> char[m]: really.. hmm
<pve> maybe slime and sly differ in this regard
rgherdt has joined #commonlisp
<edwlan[m]> I like how slime scopes completions to the package.
pranavats has left #commonlisp [Error from remote client]
GreaseMonkey has quit [Quit: No Ping reply in 180 seconds.]
pranavats has joined #commonlisp
greaser|q has joined #commonlisp
<char[m]> gilberth: Why do you say it is not possible to implement MACROEXPAND-ALL?
KvL has joined #commonlisp
KvL_ has quit [Ping timeout: 240 seconds]
vassenn has quit [Quit: Leaving]
<gilberth> char[m]: You already have some lexical environment and now your MACROEXPAND-ALL faces a MACROLET, how would you make a new environment derived from the original that includes the new macro?
<gilberth> Actually that applies to different special forms that enter new things into the lexical environment, too.
<char[m]> What if you just have a environment state that is independent from the &environment environment stuff.
<Bike> inner macrolets can refer to definitions in outer macrolets
<Bike> so you need to be able to process source into a macroexpander function in an environment with the outer macrolet definitions
<char[m]> So, nested macrolets?
<Bike> that's what i said
KvL has quit [Ping timeout: 248 seconds]
<gilberth> Not only that but in general the case that you want to macroexpand-all in a non-null lexical environment. Think a macro or compiler macro, which wants to have a very close look at one of its arguments.
KvL has joined #commonlisp
<gilberth> You might want to have a look at <http://clim.rocks/gilbert/meall.lisp>. Note the process-in-env function, which is the missing puzzle piece. I could have been just an EVAL with an environment argument. Which CCL, ECL, and Allegro provide.
MajorBiscuit has joined #commonlisp
nij- has joined #commonlisp
karlosz has joined #commonlisp
<nij-> How to check if an object is circular? (e.g. a circular list, a circular hash table)?
<beach> nij-: With a circular top-level list, you can use the slow/fast pointer method. For more general circularity, you need to keep a hash table to see what you have already visited.
igemnace has quit [Remote host closed the connection]
dcb has joined #commonlisp
mgl has quit [Quit: Client closed]
MajorBiscuit has quit [Quit: WeeChat 3.6]
<knusbaum> Having trouble iterating a hash-table whose values are hash tables themselves: https://bpa.st/EFHSW
<ixelp> View paste EFHSW
alendvai__ has joined #commonlisp
<knusbaum> I've tried type annotations with no luck.
attila_lendvai_ has quit [Ping timeout: 240 seconds]
<Bike> knusbaum: you probably meant "with ht2 = (gethash k ht)". using for will reevaluate the gethash on every loop. i think that is causing the problem since "for" variables will start out being NIL.
<jackdaniel> knusbaum: this is because ht2 is not bound when the iterator is created
<jackdaniel> (or, to be precise, it is bound to nil)
<jackdaniel> [being the hash-keys X] is resolved before the loop first iteration is executed
<Bike> knusbaum: also, rather than doing that you can write "for k being the hash-keys in ht using (hash-value ht2)"
<jackdaniel> so ht2 is not bound yet
<jackdaniel> (again, not 'not bound' but 'is nil'
<jackdaniel> )
<knusbaum> AHH
<knusbaum> You all are right.
<knusbaum> I meant "with". I only define ht2 because I want to use it later too and it's clearer to me if I don't repeat the gethash
<yitzi> Why not just get the hash value with LOOP?
<jackdaniel> do, do hash, do hash keys
<yitzi> Or use maphash to avoid the verbosity of the LOOP hash table clause.
kevingal has joined #commonlisp
<knusbaum> Yes, actually hash-values would be much clearer here.
<knusbaum> Good idea.
<knusbaum> Well, for the real code, I still need hash-keys in the inner loop, because I need to (setf (gethash ...) ...)
<knusbaum> But hash-keys in the outter loop reduces a line
<yitzi> You can do at least for k being the hash-keys in ht using (hash-value ht2) in the outer loop to avoid the WITH.
<knusbaum> I did "for ht2 being the hash-values in ht" in the outter and "for k being the hash-keys in ht2" in the inner.
<knusbaum> no more "with"
<knusbaum> Why do I keep putting 2 't's in "outer"?
shka has quit [Ping timeout: 256 seconds]
lucasta has joined #commonlisp
simendsjo has joined #commonlisp
markb1 has quit [Ping timeout: 256 seconds]
ec_ has quit [Ping timeout: 240 seconds]
ym has quit [Ping timeout: 264 seconds]
lucasta has quit [Quit: Leaving]
markb1 has joined #commonlisp
msavoritias has quit [Remote host closed the connection]
Noisytoot has quit [Excess Flood]
Noisytoot has joined #commonlisp
Lycurgus has joined #commonlisp
ec_ has joined #commonlisp
<knusbaum> Is there an equivalent to subtypep that will climb the class hierarchy to determine if class A has class B somewhere in its precedence list? It seems subtypep only looks at direct superclasses.
<Bike> subtypep looks through the entire precedence list.
<Bike> what are you seeing?
tyson2 has joined #commonlisp
<Lycurgus> otherwise it would be misnamed
<knusbaum> Hmm, something very strange. I assumed it was a subtypep issue, but it looks like with (defclass A (B) ...) I'm getting (subtypep 'A 'B) => NIL T
<knusbaum> I must have messed up some state. Reloading the lisp and package fixed it.
kevingal has quit [Ping timeout: 240 seconds]
tyson2 has quit [Remote host closed the connection]
<nij-> Bike beach Thanks. I now know it's not as trivial.
nij- has quit [Quit: Using Circe, the loveliest of all IRC clients]
Lycurgus has quit [Quit: Exeunt: personae.ai-integration.biz]
<jackdaniel> I've always found loop syntax for hash tables forgettable (hence hard to use)
<jackdaniel> (dohash ((key val) ht) ...) ;-> (flet ((cont (key val) ...)) (maphash #'cont key val)) ; is quite handy to me
<Bike> yeah i have to look it up literally every time
<knusbaum> I usually like a functional style, but for some reason I reach for loop a lot.
<knusbaum> I think I find the syntax of map and others problematic, since I like to use lambdas, and having the SEQUENCE argument at the end sort of obscures it.
cage has quit [Quit: rcirc on GNU Emacs 28.2]
tyson2 has joined #commonlisp
simendsjo has quit [Ping timeout: 240 seconds]
<yitzi> jackdaniel: Hash table LOOP syntax is terrible. It overlaps with the package syntax and is verbose as heck.
karlosz has quit [Quit: karlosz]
tyson2 has quit [Remote host closed the connection]
morganw has quit [Remote host closed the connection]
<edwlan[m]> for being the hash-… of h-t
<edwlan[m]> Ive always liked it
Oladon has joined #commonlisp
Inline has joined #commonlisp
alendvai__ has quit [Ping timeout: 256 seconds]
lucasta has joined #commonlisp
waleee has joined #commonlisp
ec_ has quit [Remote host closed the connection]
ec_ has joined #commonlisp
Oladon has quit [Read error: Connection reset by peer]
ec_ has quit [Remote host closed the connection]
ec_ has joined #commonlisp
xristos has quit [Quit: ZNC 1.7.5 - https://znc.in]
ryanbw has quit [Quit: I'll be back.]
mrcom has joined #commonlisp
piethesailor has quit [Remote host closed the connection]
greaser|q has quit [Changing host]
greaser|q has joined #commonlisp
greaser|q is now known as GreaseMonkey
<char[m]> gilberth: if your macroexpand-all has, and takes, a state that has macrolets and other info and is not an environment (perhaps it is extensible. You make this state available to the macrolet expanders. Then they can call the custom macroexpand-all with the state. If the state is not available, they can fall back to the regular environment.
<Bike> macro functions take an actual environment as an argument. you can't pass them your own state thing.
<Bike> e.g., you want to macroexpand-all `(macrolet ((foo ...)) (loop ...))`. The macro function for loop probably calls macroexpand, and it needs an environment with foo in it to do that correctly.
Oladon has joined #commonlisp
Oladon has quit [Read error: Connection reset by peer]
<Bike> you can start doing workarounds like having your own loop macro, but that's how things start getting stupid. it would be better if the language protocol was just good enough
ec_ has quit [Ping timeout: 240 seconds]
ec_ has joined #commonlisp
<char[m]> Is that how the scoping rules for macrolet work; more like let*? It seems like it might just not be the best idea to call macroexpand-all within a macro expansion.
<Bike> huh? what are you talking about? i didn't say anything about calling macroexpand-all inside a macro expansion.
<Bike> i said the loop macro function probably calls cl:macroexpand
Oladon has joined #commonlisp
<Bike> and i don't know what let* has to do with anything. i wrote a macrolet with jut one binding
Oladon has quit [Read error: Connection reset by peer]
<char[m]> Oh wow. I see that now. In that case why would loop need to manually call cl:macroexpand instead of just expanding to (foo ...) and letting macrolet do it's thing?
<Bike> well, it doesn't really matter, the point is that it can. a more straightforward example is SETF, which needs to call macroexpand-1 if it runs out of other options
<Bike> e.g. (macrolet ((foo (x) `(car ,x))) (setf (foo y) z))
<Bike> it can't just leave (foo y) to be macroexpanded because it needs to return a form that mutates the cons
avocadoist has joined #commonlisp
scymtym has joined #commonlisp
viaken2 is now known as viaken
waleee has quit [Ping timeout: 240 seconds]
contrapunctus has joined #commonlisp
waleee has joined #commonlisp
rgherdt_ has joined #commonlisp
rgherdt has quit [Ping timeout: 240 seconds]
rgherdt has joined #commonlisp
rgherdt_ has quit [Read error: Connection reset by peer]
akoana has joined #commonlisp
rgherdt has quit [Ping timeout: 264 seconds]
jmdaemon has joined #commonlisp
<knusbaum> Anyone know of a library for validating a schema for a form? Like if I want my input to a function to be a nested list with certain properties?
waleee has quit [Ping timeout: 250 seconds]
waleee has joined #commonlisp
pve has quit [Quit: leaving]