igemnace has joined #commonlisp
trufas has joined #commonlisp
torbo has joined #commonlisp
dlowe has quit [Remote host closed the connection]
IAmRasputin has joined #commonlisp
kevingal has quit [Remote host closed the connection]
CrashTestDummy has joined #commonlisp
waleee has quit [Quit: WeeChat 3.2]
CrashTestDummy2 has quit [Ping timeout: 264 seconds]
waleee has joined #commonlisp
sjl has quit [Quit: WeeChat 2.2-dev]
yitzi has quit [Quit: Leaving]
waleee has quit [Ping timeout: 252 seconds]
lottaquestions has quit [Remote host closed the connection]
lottaquestions has joined #commonlisp
mindCrime has quit [Ping timeout: 268 seconds]
killsushi has joined #commonlisp
prxq_ has joined #commonlisp
prxq has quit [Ping timeout: 272 seconds]
bilegeek has quit [Quit: Leaving]
esb has quit [Remote host closed the connection]
tyson2 has quit [Remote host closed the connection]
killsushi has quit [Quit: Leaving]
killsushi has joined #commonlisp
torbo has quit [Remote host closed the connection]
marcrosoft has joined #commonlisp
IAmRasputin has quit [Ping timeout: 272 seconds]
casual_friday_ has joined #commonlisp
casual_friday has quit [Ping timeout: 244 seconds]
dsk has joined #commonlisp
Bike has quit [Quit: Lost terminal]
<beach> Good morning everyone!
terpri is now known as robin
Lord_of_Life has quit [Ping timeout: 268 seconds]
Lord_of_Life has joined #commonlisp
doulos05 has joined #commonlisp
<doulos05> Hi, I'm trying to wrap my head around packages and systems in Common Lisp.
<doulos05>
<doulos05> I've just written my first live CL code (https://github.com/jonathanabennett/gtd-review).
<doulos05> This is just the simplest part of the program (system?) I want to create. It is an on-exit script for taskwarrior.
<knusbaum> A package is just a namespace. A system is just a collection of packages.
<doulos05> So does that little script need to be its own package within my gtd-review system? Or it's own system?
<doulos05> If I want to be able to asdf:make it into the executable I need to drop into the hooks folder.
<doulos05> I've read a couple websites about this now and for some reason this concept isn't translating into what I'm trying to create.
<doulos05> Which tells me I'm not understanding the concept.
<knusbaum> What errors are you seeing?
<knusbaum> I've not used asdf:make for a while, but I'll look.
<doulos05> Not seeing any errors, what I've got works perfectly.
<doulos05> I'm just not sure how to add the next component of the tool I want to make.
<knusbaum> You can add it to the existing system, or create a new system.
<knusbaum> You can add it to the same package even.
<knusbaum> It is up to your organizational desires.
<doulos05> I feel like (stop me if I'm mis-understanding CL) I want it to be same system, different package because it's the second in a suite of tools that work together but run separately.
<beach> doulos05: I usually split a project of mine into one or (usually) more "modules", where each "module" lives in a directory, has an ASDF system definition, and has its own own package definition.
<beach> doulos05: If the software is large, there will be a top ASDF system that :DEPENDS-ON the others, thereby creating the entire system from its modules.
<knusbaum> I'm trying to remember how asdf:make works, but if you want separate executables, you might want separate systems.
<doulos05> beach: So then I'd move this to the gtd-review/taskwarrior-hook directory, rename appropriately, and create a new project in a sibling folder for the next part?
<beach> It looks like it is already appropriately named.
<beach> But yes, if you are going to add more stuff that can be considered separate modules, I would create a new directory for each one.
<doulos05> beach: Yeah, but it has the name for the whole suite when this is only the smallest part.
<beach> Oh, maybe it is not appropriately named.
<beach> Got it.
<beach> Yes, then I would rename it.
<beach> doulos05: Do you take other remarks on your code?
<beach> It is often a bad idea to :USE packages other than the CL package. It is better to use explicit package prefixes to refer to symbols in different packages.
<beach> The Common Lisp HyperSpec has opinions on the number of semicolons you use in comments, and top-level comments should have at least 3.
<beach> There is usually a single blank line between top-level forms, but you have one occurrence of no blank line and one occurrence of two blank lines.
<beach> The function GET-CURRENT-PROJECT-LIST does not use its parameter as far as I can see.
<doulos05> beach: absolutely! This is literally the first time I've written CL code not copy/pasted from tutorials.
<beach> I see. Congratulations!
<mfiano> doulos05: Congratulations!
<mfiano> If you haven't already, check out Practical Common Lisp online. That will open up your eyes to a lot of ideas and get some more familiarity
<doulos05> beach: Whoops on the missing parameter! How do I ensure that INFERIOR-SHELL is available if I don't :USE it?
<doulos05> I actually used an explicit package prefix in the code itself I think
<mfiano> :USE brings in the symbols of the given package into the package being defined, so no qualification is needed. To qualify it, you write it as PACKAGE:SYMBOL
<mfiano> :USE makes reading/maintaining code difficult because you don't know where symbols came from, and also makes it easy to get conflicts
ec has quit [Ping timeout: 252 seconds]
<beach> doulos05: What mfiano said. The symbols are available as soon as the external package is defined and the symbols are exported. :USE just makes it possible to use them without a package prefix.
<mfiano> If the package is long and your fully-qualified symbols are too noisy, you can look into package-local nicknames
<doulos05> Aha, the :DEPENDS-ON makes sure that it's there. Ok, now this is making sense
zacts has joined #commonlisp
zacts has quit [Client Quit]
<mfiano> Hmm?
<mfiano> :DEPENDS-ON has nothing to do with packages/symbols :)
<mfiano> That is a "system" concept
<doulos05> right, but :DEPENDS-ON makes sure that inferior shell gets loaded when my system gets loaded so that I can call on it in my packages
<beach> doulos05: The package is defined when the file that contains the definition is loaded. That may or may not be as a result of the file appearing in an ASDF system definition.
<mfiano> doulos05: THat sounds right, ok.
<mfiano> Keep in mind that there is no association between systems and packages and you will be a step ahead of many CL newbies :)
<beach> Heh.
<beach> That's true.
<mfiano> A package is for the most part just a collection of symbols. A system is a collection of modules/files, which may be comprised of any number of packages. N files with 1 package, N files with N packages, etc etc. It's up to you
<mfiano> It's unfortunate that other languages call the source distribution manifest a package...that's what CL systems are, not packages.
zacts has joined #commonlisp
<doulos05> Awesome, thank you so much!
<mfiano> Sure, anytime, and welcome to the party.
zacts has quit [Quit: gtg]
ramenbytes has joined #commonlisp
<doulos05> Another quick followup, someone mentioned they hadn't used ASDF:MAKE. Do you just use sb-ext:save-lisp-and-die?
<beach> I don't know about others, but I never bother to make an executable. I consider my Common Lisp REPL to be my shell.
<doulos05> That makes sense.
<knusbaum> I prefer to work that way too.
<beach> I guess I just refuse to accept the crappy application interface that "modern" operating systems give us, and pretend that I have a Lisp OS instead.
<moon-child> someday we won't have to pretend
* beach crosses fingers.
hendursa1 has quit [Ping timeout: 252 seconds]
<doulos05> lol. Emacs is close, but it isn't common lisp
<kakuhen> Rainer Joswig vehemently disagrees with that
<knusbaum> I like the unix shell. But if I'm writing common lisp, I prefer to take advantage of the lisp REPL.
<moon-child> the unix shell is at somewhat of a local optimum in the context of a unix system. But unix as a paradigm has overstayed its welcome
<knusbaum> I'm happy to be introduced to anything better. Plan 9 is the only paradigm I've seen that seems to beat it (and is widely available)
<White_Flame> from what I've seen, plan 9 is unix plus some cleanup, tooling, and utf-8, but it still certainly in the unix style
<moon-child> text composes well, but lacks structure. Shell and c are poor languages. Hardware isolation means IPC is slow, which limits architecture design
<White_Flame> moon-child: unix isn't about text, it's about C char streams/buffers
<moon-child> plan9 is an incremental improvement to unix
<knusbaum> moon-child: more or less, yes.
<moon-child> White_Flame: char streams, sure. I don't see as that makes a meaningful difference
<White_Flame> moon-child: it could be binary or whatever
<knusbaum> Plan 9 serves lots of binary protocols over C char streams
<moon-child> White_Flame: ok. It still composes well but lacks structure and expressiveness, which was my main point
<knusbaum> What is available and more structured than unix?
<White_Flame> anything that has higher level serialization protocols
<moon-child> available? Nothing
<White_Flame> but, these tend not to be done at the OS level anymore
<White_Flame> which means the OS is unaware of anything going on. Everything is black box to it
<knusbaum> Sure.
<knusbaum> So something like erlang?
<moon-child> White_Flame: yes, you can layer higher-level serialization protocols _on top of_ text. But text lacks them inherently, which is problematic. If you want a byte stream, you can do that inside of a structured data paradigm, but you cannot do the other way around
<knusbaum> Why is it important to have structured data at the OS level?
<White_Flame> a few other problems with the unix model is the heirarchical filesystem, and the privilege model
<moon-child> in a general sense. IOW every program invents its own serialization mechanisms, and they are not commensurate. At that point, you lose the composability. Like fullscreen applications. I can't pipe alpine into something, for instance
<White_Flame> moon-child: right, and it gets difficult to automate things when every single text file has a different format
<knusbaum> White_Flame: Yes, both of those are problematic if you want to represent non-file resources in the file system.
<moon-child> knusbaum: erlang is cool. Somebody did an erlang os once, hydros. (There were a few others, but hydros was the most notable one, I think)
<knusbaum> Oh, that's cool. I'll have to check that out.
<moon-child> knusbaum: everything is a file, but a file is not a record. That aspect of unix is not terrible
<White_Flame> knusbaum: even with files, choosing a singular directory for a file to be in becomes more and more troublesome, and links are just a bandaid
<knusbaum> White_Flame: Yes. Plan 9 fixed a lot of this.
<moon-child> White_Flame: file descriptors are not terrible. The user/group system isn't great, though. Hierarchy is one of the biggest problems
<knusbaum> Hierarchy is good if it can be controlled by the process. I.e. namespaces
<moon-child> White_Flame: notably, you can only hardlink files, not directories, because apparently unix people don't know how to write garbage collectors
<knusbaum> moon-child: So what's an unavailable but better system?
<beach> CLOSOS. :)
<White_Flame> and of course, the unix model exposes a C api, which means by default you're writing applications in a system level language
<knusbaum> Did it ever exist?
<beach> CLOSOS does not yet exist.
<knusbaum> Ohhh!
<beach> But we are working (slowly) on it.
<knusbaum> I remember talking to Robert about this.
<beach> That would be me.
<knusbaum> (I think it was Robert)
<knusbaum> Yeah, hi!
<beach> Hey.
<knusbaum> I talked to you about this in probably ~2016
<beach> Hence "slowly" :)
<moon-child> there's also arcan. I'm working on something (slowly) of my own. As is corbin
* beach is off to buy food before the store gets too crowded.
<knusbaum> haha.
<knusbaum> beach: I'll read through this.
<moon-child> arcan exists within unix, and as such is less idealistic but much more practical
<knusbaum> How does it differ from something like common-lisp?
<White_Flame> I've only looked a bit at arcan, but I'm impressed by the comprehensiveness around its ideas
<knusbaum> I can write whatever I want in common-lisp. What does arcan provide?
<White_Flame> arcan isn't a language, it's a graphics system
<knusbaum> Ahh.
<moon-child> arcan is very different from common lisp. Arcan is a platform for protocols
<White_Flame> which basically brings in elements of desktop UIs, applications, games, generalized human interfaces, etc
<moon-child> It's not so much a programming language _or_ a graphics system as the natural culmination of dtrace
<moon-child> it happens to include a graphics system, and an audio system, and ...
<knusbaum> I am totally confused by these descriptions.
<moon-child> but the only reason it has those things is that so you can dtrace your graphical and audio applications
<White_Flame> knusbaum: basically, think about how things in a system have to interact, and design a system to cover all the bases
<knusbaum> IPC, basically
<moon-child> (also network transparency, session resumption, etc)
<knusbaum> For whatever definition of "process" you hav.
<White_Flame> not "process", "things" ;)
<knusbaum> Sure.
<knusbaum> Call them whatever.
<White_Flame> all the interactions that happen, between humans, different modules in the system, all the various resources in simultaneous use, etc
<White_Flame> it's definitely not segregated by the os process distnction
<moon-child> (also sane security model)
<knusbaum> arcan mediates communication between modules?
<knusbaum> Or arcan defines the interfaces
<moon-child> yes, and more to the point communication with the user
<knusbaum> So it defines how the user interacts with the system
<knusbaum> Or how module <-> user communication works?
<knusbaum> Is there a doc I can read? I'm having trouble with the search engines.
<moon-child> primary website is https://arcan-fe.com/
<knusbaum> Cool, thanks.
<ramenbytes> moon-child: That reminds me of particle: https://github.com/Seteeri/particle
<ramenbytes> Originally it was using CL, however the author switched to PicoLisp because of gc performance I believe.
<moon-child> hey, somebody made a picolisp operating system!
<ramenbytes> Specifically, SBCL gc performance. They didn't want to have to replace the gc themselves after mucking around a bit with the sources if I recall.
<White_Flame> yeah, that's something I look forward to in SICL, is the possibility of easier, and even maybe interactive GC exploration
<ramenbytes> I didn't know that was on the roadmap. I suppose there is a paper in the repo?
<White_Flame> I'm under the assumption that the GC will be in CL as well
<White_Flame> I don't recall if that was in a paper, in a discussion with beach, or a fabrication of my imagination ;)
<moon-child> mezzano gc is also in cl
<White_Flame> ah true
<ramenbytes> Fingers crossed we get a SICL gc library...
<ramenbytes> Something like a MOP for gc maybe...
shka has joined #commonlisp
killsushi has quit [Quit: Leaving]
<phoe> trivial-garbage already exists but it has a very very basic GC interface
<phoe> everything else would need to be highly implementation dependent
<phoe> also the SICL garbage collector makes some assumptions that simply won't be true for other implementations, so AFAIU it won't be possible to easily port it
<moon-child> I think the goal was to experiment with different GC designs within sicl, not to use multiple CL implementations with sicl's gc
<ramenbytes> phoe: I was thinking something more like gc-as-a-library, sort of like MPS or the upcoming mmtk but in Lisp. Like how SICL has the reader available as a library.
<phoe> oh, like that - then you'll also need custom allocators, since AFAIK the SICL one is tied to the GC
<moon-child> mmtk is upcoming? Isn't it decades old now?
<ramenbytes> I was thinking about the front page saying something about "not ready for deployment".
cjb has quit [Remote host closed the connection]
sjl has joined #commonlisp
frgo_ has joined #commonlisp
frgo has quit [Read error: Connection reset by peer]
ramenbytes has left #commonlisp [#commonlisp]
chrysanthematic has joined #commonlisp
<beach> I think it is very hard to design a good GC that is independent of other parts of the system.
<beach> And the (untested) design of the SICL GC relies on the object representation.
<beach> I think MPS is probably perfectly good for a library GC. I believe one version of Clasp is using it.
pve has joined #commonlisp
chrysanthematic has quit [Quit: chrysanthematic]
Cymew has joined #commonlisp
rgherdt has joined #commonlisp
ludston has quit [Quit: Connection closed]
hendursa1 has joined #commonlisp
tfb has joined #commonlisp
Josh_2 has quit [Ping timeout: 252 seconds]
trocado has quit [Ping timeout: 268 seconds]
hendursaga has joined #commonlisp
hendursa1 has quit [Ping timeout: 252 seconds]
doulos05 has quit [Remote host closed the connection]
frgo_ has quit [Remote host closed the connection]
frgo has joined #commonlisp
Wilfred has joined #commonlisp
selwyn has joined #commonlisp
prxq_ is now known as prxq
Alfr has joined #commonlisp
lottaquestions_ has joined #commonlisp
lottaquestions has quit [Ping timeout: 268 seconds]
prxq has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
hhdave has joined #commonlisp
kevingal has joined #commonlisp
derelict has quit [Ping timeout: 272 seconds]
selwyn has quit [Ping timeout: 240 seconds]
cranium has joined #commonlisp
selwyn has joined #commonlisp
derelict has joined #commonlisp
cranium has quit [Quit: Leaving]
dlowe has joined #commonlisp
random-nick has joined #commonlisp
zacts has joined #commonlisp
amk has quit [Read error: Connection reset by peer]
amk has joined #commonlisp
Wilfred has quit [Quit: Connection closed for inactivity]
prxq has joined #commonlisp
igemnace has quit [Quit: WeeChat 3.2]
derelict has quit [Quit: WeeChat 3.2]
<luis> beach: at the last Boston Lisp Meeting, drmeister mentioned he wasn't happy with the performance of MPS, particularly compared to Bohem
tyson2 has joined #commonlisp
zacts_ has joined #commonlisp
<phoe> luis: is there a recording of that meeting? I missed it and I'd want to see it nonetheless
zacts has quit [Ping timeout: 272 seconds]
zacts_ is now known as zacts
yitzi has joined #commonlisp
CrashTestDummy2 has joined #commonlisp
CrashTestDummy has quit [Ping timeout: 244 seconds]
kakuhen has quit [Quit: Leaving...]
zacts has quit [Quit: gtg]
shka has quit [Quit: Konversation terminated!]
frgo has quit [Read error: Connection reset by peer]
frgo has joined #commonlisp
<beach> luis: I see. Interesting. It would seem to confirm that it is hard to write a good garbage collector that is independent of the rest of the systme.
shka has joined #commonlisp
aeth has quit [Ping timeout: 268 seconds]
aeth has joined #commonlisp
Inline has joined #commonlisp
gko has quit [Changing host]
gko has joined #commonlisp
Bike has joined #commonlisp
amk has quit [Ping timeout: 264 seconds]
amk has joined #commonlisp
selwyn has quit [Quit: Leaving]
<jmercouris> hello tomato!
<beach> I see no such nick around.
igemnace has joined #commonlisp
francogrex has joined #commonlisp
cage has joined #commonlisp
Guest635 has joined #commonlisp
yitzi has quit [Remote host closed the connection]
<jcowan> libgc is a close approximation
<jackdaniel> libgc is abovementioned boehm:)
<jackdaniel> mps aims to be better and (general purpose too)
<jackdaniel> s/and (/(and /
X-Scale` has joined #commonlisp
<jmercouris> beach: well, it rhymed, I was just saying hello :-)
X-Scale has quit [Ping timeout: 268 seconds]
<beach> jcowan: I don't consider a conservative garbage collector to be a "good" one. It is just one that is better than manual memory management when you have to use a language with manual memory management for application programming, while keeping your sanity intact.
<jackdaniel> beach: libgc may be configured to run in precise mode (you need to provide additional information to it then of course)
findow has joined #commonlisp
<beach> Now, how on earth would you do that? As in, how do you provide precise stack scanning without knowing what the compiler does with your lexical variables?
aeth_ has joined #commonlisp
aeth has quit [Ping timeout: 244 seconds]
<jackdaniel> you mark each allocated object yourself
CrashTestDummy3 has joined #commonlisp
<jackdaniel> I'll link ecl file in a second
aeth_ is now known as aeth
<beach> So, again, how do you find all the GC roots on the stack if you don't know what the compiler does with your lexical variables?
<beach> And that's just for starters.
<beach> You must then also provide information about every data structure you define so that the GC knows which fields contain pointers and which fields do not.
<jackdaniel> yes, that's the additional information I've mentioned you need to provide
<beach> But that's not enough.
CrashTestDummy2 has quit [Ping timeout: 240 seconds]
<beach> I don't see the root-finding code in there.
<jackdaniel> I don't consider myself qualified to dispute, I'm just sharing information that libgc may be configured to run in precise mode (and ecl may be build using that option)
<jackdaniel> it might be that I have misrepresented what libgc does - after some search it looks that it still scans the memory; the precise mode only gives it necessary information about objects structure (so it knows where to look for pointers in objects)
<jcowan> https://www.hboehm.info/gc/conservative.html is an interesting comparison of conservative/precise gc, pointing out that precise gc also has costs
<jcowan> even disregarding programmer convenience
sp41 has joined #commonlisp
<beach> jcowan: Notice that the header of the paragraph talks only about pointer identification.
<jcowan> sorry, which paragraph?
<beach> jcowan: And apparently, interoperability is important to this author.
<beach> The one that talks about the cost of precise GC.
<jcowan> Yes. This is why Guile uses libgc, because pointers can be passed aboug between libguile and its host
waleee has joined #commonlisp
<beach> So the entire page is biased.
<beach> It is not a comparison between conservative and precise GC.
<jcowan> Of course. What page is not? We write from our own perspective, as we have no access to any other.
<beach> It is a comparison between the pointer-finding part of the two, given that it operates in an environment together with a hostile language.
<jcowan> If I wrote a page comparing Scheme to CL, there would undoubtedly be Scheme bias in it.
<jcowan> (so I do not do such things)
<luis> phoe: I don't think it was recorded, no.
<beach> I am merely pointing out to the participants of #commonlisp not to draw the conclusion from this discussion and that page, that conservative GC is always better than precise.
doulos05 has joined #commonlisp
igemnace has quit [Quit: WeeChat 3.2]
igemnace has joined #commonlisp
<beach> Don't get me wrong though. I think the Boehm GC is a great piece of work, that was thought to be impossible before someone actually did it.
* jcowan nods
<beach> And, as I pointed out, it is basically the only option available to applications programs who 1. are forced to use a language with manual memory management, and 2. wish to keep their sanity intact.
<beach> *programmers
<doulos05> So I'm still thoroughly confused by packages. I seem to have broken my local-projects for quicklisp.
tfeb has joined #commonlisp
<doulos05> When I run (ql:quicklisp "gtd-review"), it loads it.
<luis> Boehm went on to achieve other great things such as adding precise real number arithmetic to the Android calculator. :D
<doulos05> But when I try to then (in-package "gtd-review"), it says the package doesn't exist.
<sm2n> doulos05, those are two separate things
<jcowan> I used it in enhancing the C implementation of Joy, which formerly used malloc/free for strings
tfeb has quit [Client Quit]
<jcowan> luis: Nice
<Xach> doulos05: the package defined by loading the system is likely to have an uppercase name.
<luis> doulos05: your package's name is probably "GTD-REVIEW"
<Xach> the system name and the packages it defines are not necessarily the same.
<doulos05> aha, let me try that
<luis> doulos05: you can also refer to it as :gtd-review if you're not into shouting
igemnace has quit [Quit: WeeChat 3.2]
<beach> True story: When consulting for a small company here, I recommended they use Boehm, because they had an application written in C++, and they were unable to get the defect count down. They had memory leaks and dangling pointers. The project leaders then told me that they thought the programmers had a moral obligation to clean up after themselves, by freeing the objects they allocated.
igemnace has joined #commonlisp
igemnace has quit [Client Quit]
AnimalClatter has joined #commonlisp
igemnace has joined #commonlisp
<jackdaniel> that's very noble of that company to embrace morals :)
<beach> The company later canceled the product, after having spent a few million € on it.
<jackdaniel> n.b libgc may be used as a leak detector
<beach> jackdaniel: I didn't know what to say to that. But the CTO agreed with me. They never did follow my advice though.
<doulos05> Ok, that seems to have helped but I still can't seem to access my exported symbols.
<jackdaniel> beach: so it seems that the project was cancelled because the developer team was demoralized ,)
<beach> doulos05: What do you do to access them, and how does the failure manifest itself?
<beach> jackdaniel: Heh.
igemnace has quit [Client Quit]
igemnace has joined #commonlisp
<beach> It's a sad story, that unfortunately reflects the sorry state of the software industry. But don't get me started.
CrashTestDummy has joined #commonlisp
<doulos05> In my Sly buffer, I ran (ql:quickload "gtd-review"). Then (GTD-REVIEW:merge-lists test1 test2).
<doulos05> I get the error "undefined function" despite it being in the list produced by running the "list all external symbols" recipe in the cookbook
<beach> doulos05: Then you managed to access the symbol in the package, but the function does not exist. That's different.
<beach> doulos05: The symbol might exist and be exported, but there may not be a function by that name.
<doulos05> Let me check for typos, but I'm pretty sure it's correct.
<beach> doulos05: You may then want to check that your ASDF system actually loads a file that contains the definition of the function.
CrashTestDummy3 has quit [Ping timeout: 244 seconds]
<beach> Also, you don't have to use upper-case for the package prefix. The reader will automatically up-case it for you (if you are using default settings).
<doulos05> I told it to. I moved that function and another one (which generates the same error message) out into a utils.lisp file which is in the components list.
<jackdaniel> doulos05: in the file that defines that function
<beach> But is that file loaded in the right package?
<jackdaniel> did you put (in-package gtd-review) at the top?
<jackdaniel> or to be a purist -- (in-package #:gtd-review)
<doulos05> Ah... yeah, that'll be it then jackdaniel, thank you!
<jackdaniel> great, happy hacking and good luck :)
<beach> doulos05: Normally, every file should start with an IN-PACKAGE form.
<jackdaniel> (n.b beach question was about the same thing)
<beach> Yes, but jackdaniel expressed it more directly. :)
<Xach> Guest635: that is not a concept in common lisp. there are some restrictions on what you can do with the symbols in the CL package, though.
<Xach> http://l1sp.org/cl/11.1.2.1.2 has some detail
doulos05 has quit [Ping timeout: 268 seconds]
<beach> Xach: I don't see any message from Guest635.
<MichaelRaskin> For me they show up in _#commonlisp
<MichaelRaskin> I am not completely sure _how_
<jmercouris> I don't see hem either
<jmercouris> s/hem/them
<Xach> beach: Hmm. I do, but it looks strange to me.
<beach> Must be one of those defective bridges.
<Xach> seems plausible
<MichaelRaskin> Xach: did you see my message?
<MichaelRaskin> Whois suggests KiwiIRC, though
<MichaelRaskin> (my message I tried to send via _#commonlisp)
<Xach> MichaelRaskin: i see messages from you, but they look normal.
<phoe> or you are operators
<phoe> and we are not
<Xach> oh, that may explain it.
<phoe> Guest635: say something now?
<Xach> I haven't seen that feature in action before.
<phoe> 16:33 < Guest635:@#commonlisp> Life is Good
amb007 has joined #commonlisp
<phoe> I see your message now
<luis> My IRC client says Guest635's are only visible to channel operators.
<phoe> OK, that might explain it
<beach> How bizarre.
<phoe> I have no ability to check the channel modes at the moment - could someone take a look?
<mfiano> +ntz
<phoe> hm
francogrex has quit [Read error: Connection reset by peer]
<phoe> maybe #help will be of some support
<phoe> I need to run off now so I can't be of help myself
Guest635 has quit [Quit: Connection closed]
<beach> It is really disconcerting that people can think that their messages are seen by everyone, but then they aren't. It can make these people think that we are ignoring them.
<phoe> yes, that's a problem
* phoe afk
<aeth> it has to be the z
<aeth> +nt are standard reverywhere, the defaults when you open a new channel
Guest63 has joined #commonlisp
<jackdaniel> it is
<jackdaniel> I've just checked the manual
<jackdaniel> Guest63: try now
Guest63 has left #commonlisp [#commonlisp]
aeth_ has joined #commonlisp
<jmercouris> I still don't see anything
<jmercouris> in the event that there has been any typing
<luis> +z means "reduced moderation: The effects of +b, +q, and +m are relaxed. For each message, if that message would normally be blocked by one of these modes, it is instead sent to channel operators (+o)."
<jackdaniel> because they said nothing
<jmercouris> just verifying
findow has quit [Quit: https://mibbit.com Online IRC Client]
aeth has quit [Killed (NickServ (GHOST command used by aeth_))]
aeth_ is now known as aeth
<luis> I think I recognize that IP from our first channel ban, so they may be under some sort of ban.
<luis> Without +z not even OPs see his messages.
<jackdaniel> ah! interesting
<aeth> is there a too-broad +b or +q?
<luis> The banlist for this channel is empty.
<jackdaniel> a bug perhaps? oh well
<mfiano> What about the quiet list?
<mfiano> If they were +b they wouldn't be able to join. +q and they can join but not speak. +qz and they can speak but only ops see it
<luis> mfiano: how do I see the quiet list?
<jackdaniel> is there a quiet list?
<jackdaniel> I thought it works the other way around: when you set +q mode, then only voiced members can talk
<luis> That was my impression too.
<luis> So +z seems to work like shadow banning. That sounds useful for dealing with trolls.
<mfiano> When +z is set, the effects of +m, +b and +q are relaxed. For each message, if that message would normally be blocked by one of these modes, it is instead sent to all channel operators. This is intended for use in moderated debates.
<jackdaniel> /deop luis /mode +z /takeover #commonlisp
<jackdaniel> :)
selwyn has joined #commonlisp
azimut has quit [Remote host closed the connection]
<Xach> fe[nl]ix: i am getting "Unknown CFFI type SIZE-T" from static-vectors.
azimut has joined #commonlisp
<luis> #libera tells me "/mode #commonlisp q" is the way to check the quiet list
selwyn has quit [Read error: Connection reset by peer]
<mfiano> $~a quieted by zirconium.libera.chat on Tue, 08 Jun 2021 21:40:46
<mfiano> That's an extban
<luis> Apparently this means anyone not registered with nickserv is on the quiet list. #libera recommends only doing that if there's spam going on.
<luis> $ = special, ~ = not, a = account
<mfiano> Yes, well $ = type
dsk has quit [Ping timeout: 240 seconds]
azimut has quit [Ping timeout: 252 seconds]
<pl> we're back to modes we had on freenode
azimut has joined #commonlisp
<pl> also, we used to have some quiet extbans due to spam on freenode, and possibly someone copied them?
<fe[nl]ix> Xach: fixed it, I made a new release
selwyn has joined #commonlisp
Posterdati has joined #commonlisp
<Posterdati> ok
<Posterdati> hi
<beach> Hello Posterdati.
yitzi has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
Inline has quit [Ping timeout: 244 seconds]
amb007 has joined #commonlisp
derelict has joined #commonlisp
<pjb> Posterdati: so, what's broken in gsll?
<selwyn> pjb: the nonlinear least squares fitting iirc
selwyn has quit [Read error: Connection reset by peer]
Cymew has quit [Ping timeout: 268 seconds]
selwyn has joined #commonlisp
<Posterdati> pjb: the groveller
<Posterdati> pjb: openbsd has supplemental directory for includes
derelict has quit [Quit: WeeChat 3.2]
derelict has joined #commonlisp
IAmRasputin has joined #commonlisp
selwyn has quit [Read error: Connection reset by peer]
<Posterdati> fixed! But it's becoming tiresome
IAmRasputin has quit [Ping timeout: 272 seconds]
mindCrime has joined #commonlisp
aeth_ has joined #commonlisp
amb007 has quit [Ping timeout: 272 seconds]
aeth has quit [Killed (NickServ (GHOST command used by aeth_))]
aeth_ is now known as aeth
makomo has joined #commonlisp
amb007 has joined #commonlisp
<Posterdati> pjb: problem where in cffi and gsll sources
<jcowan> the thing to learn about CTOs is that they have no power
<jcowan> this is especially important if you are applying for (or being asked about) the role, but important for grunts too. You may get sykmpathy, but not change
<jcowan> also, destructors are not (and should not be) invoked by the GC, so if they are (Ghu forbid) pervasive, there is indeed nothing to do to clean up.
derelict has quit [Ping timeout: 268 seconds]
amb007 has quit [Ping timeout: 252 seconds]
amb007 has joined #commonlisp
ramenbytes has joined #commonlisp
<tfb> jcowan: it's perfectly reasonable for *some* hook to be called at the point something becomes garbage. I'd much rather that happen than (say) file descriptor exhaustion
<jcowan> Sure. But you want to use a finalizer, not a C++ destructor, which may end up being called too early
clintm has quit [Remote host closed the connection]
<tfb> jcowan: Oh, OK, I don't know the difference. Yes, finalizers is what I meant. Is a destructor the 'this is now out of dynamic scope' thing?
<tfb> whatever, if it's something C++ does I'll just assume it's wrong (and also made out of jelly and crayon)
mindCrime has quit [Ping timeout: 240 seconds]
dsk has joined #commonlisp
akoana has joined #commonlisp
* tfb remembers when CL spec was complicated
kevingal has quit [Remote host closed the connection]
X-Scale` is now known as X-Scale
amb007 has quit [Ping timeout: 264 seconds]
amb007 has joined #commonlisp
<jcowan> Some corners are still no simple matter
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
<loke[m]> tfb: thank you for reminding me why I hate C++
Guest63 has joined #commonlisp
<loke[m]> I mean that page reads like the description of a bad joke language
<shka> oh, destructors are perhaps among the least fucked up part of c++
<Guest63> Hi
<loke[m]> I just got to the section about pure virtual destructors... Like... wtf!?
Inline has joined #commonlisp
ec has joined #commonlisp
<shka> ummm yeah, all destructors should have been virtual from the start but it is what it is :-)
derelict has joined #commonlisp
<loke[m]> shka: True. But check the rule on pure virtual destructors.
<loke[m]> Never mind why on earth why one may want them... But you also need to implement them even though they're pure virtual.
<Guest63> Does anybody know how to fix this macro?
<Guest63> (defmacro prints (&body body)
<Guest63> `(loop for item in ,body
<Guest63> do (print item)))
<phoe> Guest63: first of all, this likely doesn't need to be a macro
<phoe> don't use macros wherever you don't need to use macros
<loke[m]> Guest63: what are you trying to do?
<Guest63> phoe: thanks, just want to learn how to do macros atm
<phoe> Guest63: try reading On Lisp
<Guest63> loke[m]: do a macro with a loop across the input variables
<phoe> once you know the basics of CL, then On Lisp is a good crash course to Lisp macros
selwyn has joined #commonlisp
<Guest63> phoe: yeah I am on chapter 7, I understand ,@ splices items, but not sure how to loop with a list of inputs?
<loke[m]> Guest63: I mean, what is the goal you wish to achieve?
<Guest63> loke[m]: I want to loop across body in a macro
<phoe> Guest63: a &body usually is code to be executed, not data to be processed; for that, you usually want &rest
<phoe> it's technically equivalent but conveys a different meaning to programmers
<Guest63> phoe: thanks for the tip
<phoe> (defmacro prints (&rest things) `(loop for thing in ',things do (print thing)) would be a good start
<phoe> and then use WITH-GENSYMS for THING to avoid variable capture
<phoe> IIRC it's On Lisp chapter 8.4
<phoe> also note that this version of such a macro will not evaluate anything
selwyn has quit [Read error: Connection reset by peer]
<phoe> so (prints (+ 2 2)) will print the literal list (+ 2 2) and not 4
<Guest63> I think I have the same code
<Guest63> but it gives me an error
<Guest63> let me read 8.4 - thanks for that
ramenbytes has quit [Remote host closed the connection]
<phoe> works for me
<Guest63> phoe: thanks - just realised I was missing a ' before ,rest
<phoe> yes, that will be important
<Guest63> what does that do?
<phoe> quoting?
<Guest63> seems like it cancel each other?
<phoe> oh boy
<phoe> you *really* need to pick up on CL basics before you go and do macros
<Guest63> ok :)
<phoe> like, this is the least painful way
<Guest63> thanks :)
<phoe> first understand what quoting does, then understand what backquoting and unquoting do
<phoe> and then you can use this knowledge to write macros
<Guest63> I guess ,rest puts the parameters into the macro and then the ' prevents it from being evaluated
<Guest63> makes sense once I look at the macroexpand-1
<Guest63> thanks for the solution :)
<Guest63> Now I will try to figure out how to evaluate (print (+ 2 2)) as you said (on my own)
cage has quit [Quit: rcirc on GNU Emacs 27.1]
cage has joined #commonlisp
<jackdaniel> `',foo
<jackdaniel> cl may look like perl too!
<Guest63> jackdaniel: 'format definitely has a lot of crazy configurations
<shka> ok, so i will sound like a broken record
<shka> but macros are overrated
<shka> people say that it is the killer feature of cl
<shka> or lisp in general
ramenbytes has joined #commonlisp
<shka> i would call it "force multiplier"
<shka> it makes every other feature in the language better
<shka> but on it's own, macros are nothing
<Guest63> Macros are good for DSL
<tfb> loke[m]: it doesn't read like the description of a bad joke language: it *is* the description of a bad joke language
<loke[m]> tfb: yeah, fair enough. It's the only explanation that makes sense.
tfb has quit []
<shka> Guest63: yes, but actually you should not start designing DSL starting with macros
pranavats has joined #commonlisp
aeth has quit [Ping timeout: 244 seconds]
aeth has joined #commonlisp
<shka> macros allow you to simply implement your design while otherwise you could get stcuk
<shka> *stuck
<shka> or be forced into compromises
<shka> but you would be surprised how far you can get without a single defmacro
<shka> even in DSL
<Guest63> shka: do you mean by compiling inline
<Guest63> otherwise I would assume the performance benefits of Defmacro can't be ignored in DSLs?
<Bike> defmacro isn't generally used for performance reasons
<shka> Guest63: think about the DSL as a style of API design
<shka> where you are trying to build some sort of the grammar
<shka> implementation can be more or less efficient
<Guest63> sorry - I got confused, I was thinking of reader macros (I think that's it)
<AnimalClatter> Is there a more obvious way to get the last char of a string than (char mystring (1- (length mystring)))?
<Guest63> those are very helpful to create DSLs that deviate from the lisp () approach
<phoe> reader macros aren't used for performance either
<Bike> AnimalClatter: nope
<Guest63> not for performance, but for creating DSLs
<AnimalClatter> @Bike thanks
<Bike> AnimalClatter: i think alexandria has a lastelt function or suchlike to do that for you
<Bike> but it's implemented something like that
<phoe> yes, (alexandria:last-elt "abc") works
<shka> yes, lastelt in alexandria
<shka> Guest63: DSLs are not about the syntax, i think that this point elude you
<AnimalClatter> Thanks all
<shka> DSL are about structuring interactions
<dieggsy> is there an easy to way to jump to the sources where the error occured using slime?
<shka> yes
<shka> first, you need to navigate to a stack frame
<shka> then use v key (IIRC)
makomo has quit [Quit: WeeChat 3.0.1]
chrysanthematic has joined #commonlisp
ramenbytes has quit [Remote host closed the connection]
Guest63 has quit [Quit: Ping timeout (120 seconds)]
dsk has quit [Ping timeout: 240 seconds]
aeth_ has joined #commonlisp
aeth has quit [Killed (NickServ (GHOST command used by aeth_))]
aeth_ is now known as aeth
Guest63 has joined #commonlisp
<Guest63> shka: I was using the term informally
<gigo> how do I unscramble qiulaty?
IAmRasputin has joined #commonlisp
<jackdaniel> guality?
<gigo> can someone help me with this code: https://plaster.tymoon.eu/view/2497 - Trying to make a macro but when I execute I get this error: The variable BLOCK1 is unbound.
<gigo> jackdaniel: thanks. needed to unscramble it to post to tymoon
<Bike> gigo: try (macroexpand-1 '(decorate block1 ...)), i think you should be able to see the problem quickly
<Bike> it will expand into (progn (format t "bla bla bla" block1) ...)
<jackdaniel> try (decorate 'unblock ...) ; )
<shka> second format has ~a without argument
<gigo> is there an easy way to wrap the macro call around (macroexpand-1 ...? It takes a lot of work to wrap calls into macroexpand-1. Type it out and then slurp the next expression. Then after debugging remove it. then barf again. any easier way?
<shka> i think that you may wanted to put name in there as well
<shka> if yes, remember about multiple evaluations...
<Bike> gigo: in slime you can do C-c C-m and it will pop up a frame with the macroexpansion
<gigo> shka: thanks. yes that one is typo. need to fix that line too.
<Xach> gigo: I usually use the emacs keystrokes to do it with sly/slime.
IAmRasputin has quit [Ping timeout: 240 seconds]
<Xach> C-c M-m I believe.
<Xach> oh, sorry, I am too slow
<gigo> C-c C-m worked for me
<gigo> so I learnt the problem in https://plaster.tymoon.eu/view/2497 - ,name is getting replaced with BLOCK1. But I want ,name to get replaced with "BLOCK1". how can I do that?
Josh_2 has joined #commonlisp
<shka> gigo: during macroexpand, you can get symbol-name
<Josh_2> Hi
<shka> then, use the symbol-name (evaluated) and place it into expansion code
chrysanthematic has quit [Quit: chrysanthematic]
<shka> example
<gigo> now I am confused. why is this working correctly? - https://plaster.tymoon.eu/view/2498 - I was expecting the (format ...) line to expand like this and fail: (format t "~&----- header ~a -----~%" ,(format nil "~a" BLOCK1)) but it expands to (FORMAT T "~&----- header ~a -----~%" "BLOCK1") and works fine.
<gigo> how does it automatically get the quotes around BLOCK1 in this new example?
<shka> gigo: well, as jackdaniel mentioned, you perl it :D
<shka> ',name
<shka> or if you are like me
<gigo> perl it? what does that mean? I don't think I know enough Lisp to understand the jokes.
<shka> (quote ,name)
<shka> sorry
<shka> anyway, thing is that you are passing a symbol, right?
<gigo> yes
<shka> and macroexpand works by producing lisp form
<shka> gosh, i struggle to explain this
<shka> gigo: the your code and replace that ,name in format with ',name
<gigo> ',name works and it makes sense too. i understand why it works
<shka> i think you may figure out the difference
<shka> oh, great
<shka> *whew*
<gigo> so my only confusion now is why this works: https://plaster.tymoon.eu/view/2498 - I expect this to fail but it works.
<shka> it works because you are evaluating the inner form during macroexpand
<gigo> I was expecting the first (format ...) line to expand like this and fail: (format t "~&----- header ~a -----~%" ,(format nil "~a" BLOCK1)) but it expands to (FORMAT T "~&----- header ~a -----~%" "BLOCK1") and works fine.
<shka> where NAME is bound to 'BLOCK1
<shka> yes
<shka> well the problem with macros is that they require thinking in two times at once
<shka> first, there is macroexpand time, and then there is runtime where the expansion is actually used
<gigo> okay. I think I got it. So the inner form is executing like ordinary Lisp code: (format nil "~a" name) . This would work even under ordinary circumstance if I was not doing any macro business, so it works inside ,() too.
<shka> yes, different time
Inline has quit [Remote host closed the connection]
Inline has joined #commonlisp
<gigo> thanks shka. I think i finally understood this. I will write more examples and practice this more.
ramenbytes has joined #commonlisp
<shka> gigo: keep in mind that the problem with duality of macros
<shka> where the code that is supposed to produce code and the produced code is mixed together
<shka> that's what makes macros difficult to understand
<shka> once-only is perhaps the best example of this
<shka> but there are different such macros
<shka> *other such macros
<gigo> yes, I need to play with this more to get the hang of it.
chrysanthematic has joined #commonlisp
<Guest63> If I want to have a variable defined outside of a function, is this the best way of doing it:
<Guest63> (let ((y 7))
<Guest63> (defun scope-test (x)
<Guest63> (list x y)))
<shka> Guest63: depending on the use case this may be fine
<shka> more often you will want to use defvar, defparameter and alexandria:define-constant
<Guest63> I wanted to do (defun my-fn (x) (let* ((y 7) (scope-val (scope-test x
<Guest63> In this version, scope-test doesnt recognise y from the calling function
tfb has joined #commonlisp
<Guest63> I'm trying to do some out of order side effects and don't want to make my recursive functions unnecessarily complicated
<Bike> variables are usually lexical, so that kind of thing won't work
<Bike> you might want a dynamic variable, in which it will look up the most recent binding _dynamically_ like the y binding here
<Bike> usually it looks up the innermost binding in the source text instead
chrysanthematic has quit [Changing host]
chrysanthematic has joined #commonlisp
chrysanthematic has quit [Quit: chrysanthematic]
karlosz has joined #commonlisp
jans has quit [Ping timeout: 244 seconds]
<Guest63> @Bike: thanks, let me have a look at doing that
chrysanthematic has joined #commonlisp
waleee has quit [Ping timeout: 240 seconds]
tfb has quit [Quit: died]
pieguy128 has quit [Quit: ZNC 1.8.2 - https://znc.in]
<Guest63> to answer my question, I have to use labels in combination with let
<Guest63> to be able to access the variables lexically in a reasonable manner
varjag has joined #commonlisp
kakuhen has joined #commonlisp
kakuhen has quit [Changing host]
kakuhen has joined #commonlisp
pieguy128 has joined #commonlisp
<Bike> (defun scope-test (x) (declare (special y)) (list x y))
<Bike> (let ((y 7)) (declare (special y)) (scope-test 3)) => (3 7)
<pjb> special symbols let you teletransport variables from one function to another.
<pjb> Guest63: you can indeed pass closures to let a function access your lexical variables.
<Guest63> @bike: thanks for that code, I will try it out
<Guest63> pjb: indeed, I am trying now to balance between recursion, side effects, functional programming to give the "best expression of a function" so that readability is maintained
<pjb> (defun foo (*v) (funcall *v (+ 1 (funcall *v)))) (defun goo () (let ((v 42)) (foo (lambda (&optional (nv nil nvp)) (if nvp (setf v nv) v))) v)) (goo) #| --> 43 |#
<jcowan> arrgh
<jcowan> "It is an error to use function on a function name that does not denote a function in the lexical environment in which the function form appears. Specifically, it is an error to use function on a symbol that denotes a macro or special form. An implementation may choose not to signal this error for performance reasons, but implementations are forbidden from defining the failure to signal an error as a useful behavior." Why?
<pjb> Guest63: but if you build C-like pointer in CL, you will have C-like bugs too.
<pjb> Guest63: don't think "variables", think "values" (aka lisp objets).
<pjb> +c
<Bike> mm, could get weird with macrolet
<Bike> i'm also not sure i understand why you would want it to work
<Guest63> pjb: thanks for the cool link, I've added it to my bookmark to go through
<Guest63> indeed, chances of bugs do go up, but if you isolate, hopefully you can limit it considerably
<jcowan> The case I have in mind is allowing #'foo-macro to return the application of the underlyimng function to 'foo. In this way, you can recognize macro names in operand position.
<jcowan> 'foo or any other atomic value
<jcowan> er, non-list value
<Bike> i don't understand. could you give an example of what would happen?
tfb has joined #commonlisp
<Josh_2> Has anyone here used Rucksack?
<jcowan> (defmacro foo (a b c) (+ a b c))
<jcowan> expands to (+ a b c)
<jcowan> But suppose I want to write (defmacro bar (x) (- x))
<Bike> Just checking, but you don't mean (defmacro foo (a b c) `(+ a b c))?
<Bike> er, with commas etc
<jcowan> Yes, I do.
<jcowan> sorry, thinking in syntax-rules
<Bike> sure
<jcowan> (defmacro bar (x) `(- ,x))
<jcowan> then (map #'bar '(1 2 3)) expands to ((lambda (x) (- x)) '(1 2 3))
<jcowan> where of course you'd want to use morc complex macros
<Bike> uh, you lost me. isn't that an error
<Bike> do you mean (map (lambda (x) (- x)) '(1 2 3))?
<White_Flame> the way to map a macro over a list has always been (mapcar (lambda (x) (bar x)) '(1 2 3)) for me
<White_Flame> gives it a place to expand properly
tfb has quit [Quit: Leaving]
shka has quit [Ping timeout: 240 seconds]
<White_Flame> (also, MAP needs the return type first, so probably some scheme-isms left over you in your example still :-P)
<White_Flame> -you
<Bike> i mean the issue here is that most macros people actually use have more involved syntax than evaluating everything like a function call
<Bike> if i understand your idea correctly
tyson2 has quit [Ping timeout: 252 seconds]
Inline has quit [Ping timeout: 272 seconds]
Jach has joined #commonlisp
<mfiano> Bike: Are you still maintaining introspect-environment?
<Bike> i try to when people need it, but that's not often
<mfiano> I am wondering if that's the reason specialization-store is giving me issues
<Bike> could be
Inline has joined #commonlisp
<Bike> parse-compiler-macro uses sbcl internals so it has broken sometimes
<mfiano> Ah hmm
<Bike> although it looks like it hasn't changed
<Guest63> time to sleep, good night all
Guest63 has left #commonlisp [#commonlisp]
<Bike> do you get anything from (find-symbol "MAKE-MACRO-LAMBDA" "SB-INT")?
<mfiano> Yes
<Bike> alright well i don't get it then
<mfiano> Odd
<mfiano> Ah, it's parse-defmacro that is missing
<Bike> well sure, that's fine
<Bike> if make-macro-lambda is around that should be used instead
<Bike> parse-defmacro is the old one, i think
<mfiano> No idea then. I have that in sb-int
<Bike> old fasls? or something?
<mfiano> I'll nuke them and retry
<mfiano> Still occurs
<Bike> i don't know what to tell you. i don't see any reason for that code not to work.
* mfiano updates to SBCL HEAD
<mfiano> oh fun. HEAD fails to compile for the first time I ever saw
cage has quit [Quit: rcirc on GNU Emacs 27.1]
tyson2 has joined #commonlisp
tyson2` has joined #commonlisp
AnimalClatter has quit [Quit: WeeChat 3.0.1]
tyson2 has quit [Ping timeout: 240 seconds]
mindCrime has joined #commonlisp
zacts has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
skyl4rk is now known as skyl4rk`
skyl4rk` is now known as skyl4rk``
skyl4rk`` is now known as skyl4rk
yitzi has quit [Quit: Leaving]
skyl4rk` has joined #commonlisp
skyl4rk` has quit [Client Quit]
killsushi has joined #commonlisp
killsushi has joined #commonlisp
killsushi has quit [Changing host]
rgherdt has quit [Ping timeout: 268 seconds]
zacts has quit [Quit: gtg]
azimut has quit [Remote host closed the connection]
azimut has joined #commonlisp
<mfiano> Bike: here's the full verbose output directly after building 2.1.5, removing all cached fasl's and restarting image: https://gist.github.com/mfiano/05fc7422474bfcfee124433cb9d3ee25
pve has quit [Quit: leaving]
mindCrime has quit [Ping timeout: 264 seconds]
derelict has quit [Ping timeout: 272 seconds]
derelict has joined #commonlisp
<mfiano> Ah this is because the base case needs to be symmetric. I'm not convinced this note is meaningful
<mfiano> Apparently it doesn't notice return-from in the reader conditionals and thinks ERROR is reachable
<mfiano> Bike: Could fix this with a symmetric #- I suppose
* mfiano thinks SBCL's DCE should just be smarter
ec has quit [Ping timeout: 252 seconds]
chrysanthematic has quit [Ping timeout: 264 seconds]
<mfiano> Bike: Looks like I had to make a PR for the same issue to cl-opengl before: https://github.com/3b/cl-opengl/commit/25780e180caf32c1a8ea632974b4133058775030
waleee has joined #commonlisp
varjag has quit [Quit: ERC (IRC client for Emacs 28.0.50)]
waleee has quit [Ping timeout: 240 seconds]
<drmeister> How would you send a signal to a thread that it should shutdown?
<drmeister> Or a collection of threads? Would you give them each a cons cell and have the manager thread change the value of the car and have the workers monitor the value of the car? The car is atomic.
<moon-child> depends entirely on what the thread is doing, who is telling it to shut down, and why
waleee has joined #commonlisp
<Alfr> How do you communicate with them usually? I usually enqueue such a message, but that'll only do if use messages in the first place.
frgo has quit [Remote host closed the connection]
frgo has joined #commonlisp
<drmeister> I'm working in Clasp (Common Lisp with C++ interop) - I've written a program to process 24 GB of DNA sequence data and it generates 1 manager thread that generates 4 worker threads. When I push the "Stop Task" button the user interface thread invokes (bt:kill-thread manager). Currently the workers don't know that the manager was killed.
<drmeister> (bt:kill-thread manager) == (bordeaux:kill-thread manager)
<drmeister> Bordeaux threads has condition variables - but they don't look appropriate.
<drmeister> So I thought - I have atomic CONS cells and I could use those to signal what the workers should do and the workers can poll the CONS cells.
<drmeister> There's currently no Common Lisp mechanism for a thread to know that it's been killed.
chrysanthematic has joined #commonlisp
<drmeister> I've done a fair amount of multi-thread programming - I should know how to do this - but I guess I haven't done enough multi-thread programming where I try to coordinate the threads.
<moon-child> so, are you just breaking up your dataset into 4 and giving one part to each worker? Or are you breaking it up into smaller chunks, and having the workers process a chunk at a time?
<drmeister> The data is spread over four files so I'm giving one file to each worker.
<drmeister> So the former.
<moon-child> If the former, I think it's a good idea to move to the latter, just because one of the threads might get ahead of the others, and then you won't make optimal use of CPU. Having done that, you can tie the 'should I die yet' check into the 'pull/push another work chunk' step
karlosz has quit [Quit: karlosz]
<drmeister> These files are balanced in size. They come out of a DNA sequencer that generates enormous amounts of data and they spread the data out across files.
<drmeister> But I hear what you say - I could have a reader thread and some number of worker threads.
<drmeister> A single writer, multiple reader queue would work for that.
<drmeister> Yeah - that's actually a good idea. Then I could have the reader pass an end-of-all-data value to each of the workers and they shutdown.
eta has quit [Ping timeout: 272 seconds]
eta has joined #commonlisp
<drmeister> Still - the user interface would still send a (bt:kill-thread reader) and the reader would have to recognize that it's being killed and send the message to the workers and then die.
<drmeister> I didn't mention this but I have multiple readers working at the same time as well.
<drmeister> Here I've switched from manager to reader.
Steeve has joined #commonlisp
<Alfr> drmeister, the doc of bt:destroy-thread (can't seem to find bt:kill-thread) says it's implementation dependent whether cleanup is run. So I don't think you can reliably use it if you need the killed thread to kill its children too.
<drmeister> Right - destroy-thread - sorry - not kill-thread
derelict has quit [Ping timeout: 252 seconds]
Steeve has quit [Quit: end]
<drmeister> The coming bordeaux threads API has more stuff for communication between threads.
Alfr is now known as Guest3889
Guest3889 has quit [Killed (strontium.libera.chat (Nickname regained by services))]
Alfr has joined #commonlisp
<Bike> mfiano: er, i don't understand. the error call is unreachable, sure, so you shouldn't be seeing that error
torbo has joined #commonlisp
chrysanthematic has quit [Quit: chrysanthematic]
tfb has joined #commonlisp
tfb has quit [Client Quit]
X-Scale has quit [Ping timeout: 265 seconds]
chrysanthematic has joined #commonlisp
<mfiano> Bike: I don't understand either. But SBCL doesn't know this.
derelict has joined #commonlisp
Alfr has quit [Quit: Leaving]
waleee has quit [Ping timeout: 268 seconds]
X-Scale has joined #commonlisp
Alfr has joined #commonlisp
IAmRasputin has joined #commonlisp
CrashTestDummy2 has joined #commonlisp
random-nick has quit [Ping timeout: 252 seconds]
chrysanthematic has quit [Ping timeout: 268 seconds]
CrashTestDummy has quit [Ping timeout: 252 seconds]
CrashTestDummy3 has joined #commonlisp
IAmRasputin has quit [Ping timeout: 268 seconds]
CrashTestDummy2 has quit [Ping timeout: 240 seconds]
chrysanthematic has joined #commonlisp
Inline has quit [Ping timeout: 268 seconds]
chrysanthematic has quit [Ping timeout: 272 seconds]
derelict has quit [Quit: WeeChat 3.2]
torbo has quit [Remote host closed the connection]
derelict has joined #commonlisp