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/>
samedi has quit [Remote host closed the connection]
samedi has joined #commonlisp
ymir has joined #commonlisp
shka has quit [Ping timeout: 264 seconds]
<Bubblegumdrop> zyd well having written several apps in lisp I can confirm that pathnames are a serious sore spot for the language
<Bubblegumdrop> I have written a number of "helper utilities" to assist with this pain
<Bubblegumdrop> And then Shinmera taught me about UIOP:ENOUGH-PATHNAME, which has been an absolute godsend
<aeth> what
<aeth> never seen that before
<aeth> how's it work?
<Bubblegumdrop> Oh man, if you're working with paths, enough-pathname is amazing
<Bubblegumdrop> I will paste some ex
<Bubblegumdrop> ,(uiop:enough-pathname "/tmp/bin/my/files" "/tmp/bin/")
<ixelp> (uiop:enough-pathname "/tmp/bin/my/files" "/tmp/bin/") ERROR: There is no package named "UIOP" .
<Bubblegumdrop> oh, interesting.
<Bubblegumdrop> Figures you would have that disabled :)
<Bubblegumdrop> CL-USER> (uiop:enough-pathname "/tmp/bin/my/files" "/tmp/bin/")
<Bubblegumdrop> #P"my/files"
<aeth> ooooh, so it goes from absolute to relative?
<aeth> the docstring does not make that clear at all
<Bubblegumdrop> only if the subpath matches
<Bubblegumdrop> It's NIL otherwise, iirc
<Bubblegumdrop> it's basically the reverse of asdf:system-relative-pathname
<Bubblegumdrop> I have a nice helper function for that too
<Bubblegumdrop> (defun relative-path (path) (asdf:system-relative-pathname (package-name *package*) path))
<Bubblegumdrop> something like that.
<Bubblegumdrop> you could hardcode the (package-name ...) bit
X-Scale has joined #commonlisp
<Bubblegumdrop> CL-TAGMAN> (uiop:enough-pathname "/tmp/bin/my/files" "/no/bin/")
<Bubblegumdrop> #P"/tmp/bin/my/files"
<Bubblegumdrop> not as useful
<Bubblegumdrop> I find myself combining these with PROBE-FILE a lot.
<Bubblegumdrop> e.g. at the end of some defun that is expected to create a file, finish off with (probe-file some-path)
<Bubblegumdrop> "access to the filesystem" just feels sorta clumsy all around in CL
<Bubblegumdrop> I'm not certain but perhaps it's implementation-dependent, as well.
<Bubblegumdrop> that would explain the... messy? feeling
<Bubblegumdrop> streams are well defined by the standard, however
igemnace has joined #commonlisp
<Bubblegumdrop> I've got Section 21.1.1.1.2 open lol
<Bubblegumdrop> pathnames are well defined too
<Bubblegumdrop> so perhaps I'm mistaken and it is well defined
<Bubblegumdrop> ENSURE-DIRECTORIES-EXIST is useful as well
dtman34 has quit [Ping timeout: 260 seconds]
dtman34 has joined #commonlisp
SunClonus has joined #commonlisp
dtman34 has quit [Quit: ZNC 1.8.2+deb3.1 - https://znc.in]
amb007 has joined #commonlisp
notzmv has quit [Ping timeout: 255 seconds]
amb007 has quit [Ping timeout: 246 seconds]
bitmapper has joined #commonlisp
amb007 has joined #commonlisp
dtman34 has joined #commonlisp
X-Scale has quit [Quit: Client closed]
Lord_of_Life has quit [Ping timeout: 255 seconds]
Lord_of_Life has joined #commonlisp
dnhester` has quit [Ping timeout: 268 seconds]
amb007 has quit [Ping timeout: 268 seconds]
notzmv has joined #commonlisp
mulk has quit [Ping timeout: 255 seconds]
mulk has joined #commonlisp
dnhester` has joined #commonlisp
zaymington has quit [Remote host closed the connection]
igemnace has quit [Read error: Connection reset by peer]
decweb has quit [Ping timeout: 256 seconds]
Oddity has quit [Remote host closed the connection]
<zyd> well-defined but not pleasant-to-use? ;)
igemnace has joined #commonlisp
<Bubblegumdrop> someone mentioned it in #lispcafe
<Bubblegumdrop> 01:18 < polezaivsani> names, feels like a metaphysical essence of computing, the wayt to get some effect out of the machine by withstanding tons of pain of dealing with names
<Bubblegumdrop> This is 100% the issue
<Bubblegumdrop> lisp transcends even the machine itself
<Bubblegumdrop> filesystems make the "naming things" problem real
Oddity has joined #commonlisp
waleee has quit [Ping timeout: 268 seconds]
igemnace has quit [Quit: WeeChat 4.2.1]
random-nick has quit [Ping timeout: 264 seconds]
<aeth> file systems aren't just a naming issue (assuming they even have directories/folders)... they're also an ontology issue because they're hierarchical
<aeth> as soon as you have too many files for some directory, you have to come up with some way to name things. foo-2024, foo-2023, etc.? foo/2024, foo/2023, etc.? 2024/foo, 2023/foo, etc.? And that's just years. Add months and days and anything can be a hyphen or slash, and add other things and the hierarchy becomes even less clear
amb007 has joined #commonlisp
<aeth> (at least we all agree on ISO 8601 order for dates, though)
<aeth> and even if you have the hierarchy correct, where do you divide things up into git repos? do you make it a monorepo? if you break up the repos do you keep them independent or use git submodules? etc.
lagash has quit [Remote host closed the connection]
<aeth> this is probably why everyone thinks that they can make a better build system but they all wind up horribly complex
lagash has joined #commonlisp
amb007 has quit [Ping timeout: 260 seconds]
<zyd> its always seemed funny to me that we have to care about the "location" of a file and the tool we have for logical/conceptual grouping is strict and nested strings of text. not that i care enough to do something better (translation: prob much worse).
samedi has quit [Remote host closed the connection]
tyson2 has quit [Remote host closed the connection]
<aeth> these days, most people don't care about the location of a file because it's all vaguely in the cloud, synced to their devices, and owned by one particular application
<aeth> e.g. the old way of IRC logs existing as real files on your computer vs new-chat backlogs in a chat program that just magically magic themselves from the cloud
terrorjack has quit [Quit: The Lounge - https://thelounge.chat]
mzan has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
terrorjack has joined #commonlisp
<zyd> well im still a very backwards person using a computer with a filesystem rather than the cloud
josrr has quit [Remote host closed the connection]
azimut has quit [Ping timeout: 255 seconds]
decweb has joined #commonlisp
NicknameJohn has quit [Ping timeout: 260 seconds]
bilegeek has quit [Quit: Leaving]
NicknameJohn has joined #commonlisp
<aeth> maybe this supports slime? https://github.com/karlicoss/cloudmacs
<ixelp> GitHub - karlicoss/cloudmacs: Selfhost your Emacs and access it in browser
<Bubblegumdrop> That's pretty wild.
decweb has quit [Ping timeout: 255 seconds]
amb007 has joined #commonlisp
amb007 has quit [Ping timeout: 272 seconds]
Pixel_Outlaw has joined #commonlisp
mulk has quit [Ping timeout: 260 seconds]
mulk has joined #commonlisp
mulk has quit [Ping timeout: 260 seconds]
mulk has joined #commonlisp
mulk has quit [Ping timeout: 252 seconds]
mulk has joined #commonlisp
traidare has joined #commonlisp
jonatack has joined #commonlisp
a51 has quit [Quit: WeeChat 4.2.1]
dtman34 has quit [Ping timeout: 240 seconds]
rainthree has joined #commonlisp
dtman34 has joined #commonlisp
ebrasca has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
<Shinmera> Bubblegumdrop: fwiw uiop's enough-pathname is just some extra checks over (pathname (enough-namestring ...)) and has some behaviours I don't like due to the intermittent namestringing.
<Shinmera> I prefer pathname-utils:relative-pathname
Pixel_Outlaw has quit [Quit: Leaving]
unl0ckd has joined #commonlisp
SunClonus has quit [Ping timeout: 268 seconds]
unl0ckd has quit [Ping timeout: 268 seconds]
rgherdt has joined #commonlisp
rainthree has quit [Ping timeout: 268 seconds]
occ has joined #commonlisp
pve has joined #commonlisp
pranavats has left #commonlisp [Error from remote client]
pranavats has joined #commonlisp
igemnace has joined #commonlisp
occ has quit [Ping timeout: 255 seconds]
Lycurgus has quit [Quit: leaving]
occ has joined #commonlisp
igemnace has quit [Quit: WeeChat 4.2.1]
_cymew_ has joined #commonlisp
shka has joined #commonlisp
igemnace has joined #commonlisp
X-Scale has joined #commonlisp
<dnhester`> beach: good morning. About the format yo were talking about, GitHub issues are already markdown format by default (I beleive, unless it's a setting) and you can make templates
<dnhester`> but replace the username and repository name
<dnhester`> and you can create a template for the format you want
<dnhester`> and you can name it "Notes about the Compiler" or whatever you want
<dnhester`> that way you can have the right layout pre formatted, and people just fill in the blanks, it's markdown, and then you can copy the markdown to a file and done (you may have to click on edit the issue to access the markdown, I don't remember if there's another way)
<dnhester`> markdown syntax for code blocks is three backticks at the beginning and end, for inline, just one backtick
<dnhester`> ```some code```
<dnhester`> if you go to the repository > settings > go down and search for "Issues" you should find a link to add templates
<beach> dnhester`: Thanks, but I think it's a bit more complicated than that.
<beach> dnhester`: This: https://github.com/s-expressionists/wscl/blob/main/wscl-issues/draft/array-upgrading-undecidable is an example of the layout that we need for WSCL issues, which are distinct from GitHub issues, and similar to X3J13 issues about the standard.
<beach> dnhester`: As you can see, that layout is very specific and does not contain any markup.
<beach> dnhester`: So what I was saying is that this layout is hard to remember, and hard to enforce, so we get lazy and just file a GitHub issue instead. But the GitHub issue does not contain nearly all the information that is required in a WSCL issue.
<beach> But maybe I am not quite understanding your suggestion.
<dnhester`> beach: give me a sec
zxcvz has joined #commonlisp
zxcvz has quit [Client Quit]
<ixelp> Issues · lisp-docs/cl-language-reference · GitHub
<dnhester`> you can assign issues automatically depending on type, and add labels to them which allows you to filter based on a label as well
<beach> But the discussion you referred to was not about issues in the language reference, but WSCL issues.
<dnhester`> that's just an example for your repository
<dnhester`> I don't have write permissio in our repository
<dnhester`> I'll delete that from the reference after you take a look
<dnhester`> would you like me to set it up for you in your repository? you would have to give me permission to change the issues templates
<beach> Oh, I think I see.
<dnhester`> but I think that get's you most of the way there, I would just copy paste it and edit from there
<beach> I think I am lost again.
<dnhester`> and please let me know when you are done so that I can deleet that template from the reference, I don't want people getting confused
<dnhester`> what's confusing?
<dnhester`> I just wrote some placeholder text as an explanation for people to fill, or maybe it's better to have no text?
<dnhester`> I copyed the format from the link you sent
<beach> Where did you copy that format too? I don't see any such copy.
igemnace has quit [Read error: Connection reset by peer]
<beach> Oh, I think I see it.
<beach> But this is Markdown, yes?
<dnhester`> Yes, you can click on the secon tab and see the preview, it looks just like text except the code block is formatted as such, I think it should have syntax highlighting for lisp code the way I set it up
<dnhester`> second*
<beach> But X3J13 issues don't have any markup. The layout is defined by indentation and Common Lisp symbols are in upper case.
<dnhester`> If you want actual formatting you can add it, I just understood from your comments that you didn't, you just wanted the original text formatting as in the spec. I think adding some formatting can make things easier to read but that's up to you
<dnhester`> if you want to remove the codeblock then just delete the line s"```lips" and "```"
<beach> No, it is not up to me, because the parser that scymtym wrote assumes no markup.
<beach> How does this template enforce indentation?
<dnhester`> ah one sec
<beach> And I am looking at a preview, but I don't see how the final result will let me edit things.
<scymtym> right. although this format for issues was developed by the X3J13 committee, not by me. our goal is to process X3J13 issues and WSCL issues in the same manner
<ixelp> Configuring issue templates for your repository - GitHub Docs
<dnhester`> you can write where it says `- type: textarea` and it will not render markdown so that the indentattion will be maintained
<beach> dnhester`: I see. So you are basically telling me what I can do in order to use this feature to create the forms that I want for WSCL?
<dnhester`> I ahven't done this, but I believe you can get pretty specific in the formatting afterwards as well, maybe so that the indentation is done automatically and you avoid people making mistakes
<dnhester`> beach: yes
<beach> I am sure you are right. But as I have told you in the past, I am allergic to that kind of stuff, so I was trying to convince gilberth or Shinmera to do it for me.
<dnhester`> ah ok haha sorry for getting myself involved
<beach> No need to be sorry. It was just a misunderstanding of metalevels. I thought you had already done it for me, and you were telling me how to do it. :)
<beach> As with the language reference, I can write the text, but the stuff around it is too hard for me, as a mental charge I mean.
mzan has joined #commonlisp
<dnhester`> beach: yeah, at first I thought I had done it too, when I realized that the markdown was messing up the indentation I figured out how to fix it but it's already very specific work that would take a bit of time which I don't have at this moment
<beach> I completely understand.
dino_tutter has joined #commonlisp
<dnhester`> beach: not sure what you mean by the stuff around it, but yeah, just let me know whenever you want to add content and I'll take care of the formatting time permitting
<beach> By stuff around it, I mean markup, debugging layout, create infrastructure, etc.
<dnhester`> oh right, I can take care of that
<dnhester`> bl"n
<beach> That would be nice, but you shouldn't feel you have to. You have other things to do.
igemnace has joined #commonlisp
<dnhester`> yeah, thanks
Oddity has quit [Ping timeout: 272 seconds]
dnhester` has quit [Ping timeout: 260 seconds]
dcb has quit [Quit: Connection closed for inactivity]
gooba has quit [Remote host closed the connection]
gooba has joined #commonlisp
brokkoli_origin has quit [Ping timeout: 272 seconds]
dnhester` has joined #commonlisp
random-nick has joined #commonlisp
brokkoli_origin has joined #commonlisp
occ has quit [Quit: Leaving.]
NicknameJohn has quit [Remote host closed the connection]
jmdaemon has quit [Ping timeout: 255 seconds]
gooba has quit [Remote host closed the connection]
waleee has joined #commonlisp
gooba has joined #commonlisp
tibfulv has quit [Remote host closed the connection]
tibfulv has joined #commonlisp
cage has joined #commonlisp
McParen has joined #commonlisp
<McParen> hey, does anybody know a macro like alexandria:switch, but where more than one item can be passed per clause, like cl:case can?
<McParen> (case 1 ((1 2 3) :foo) (t :bar)) => :foo
<McParen> switch can check strings, but apparently only one per clause, which can become tedious if I have several strings that should trigger the same result.
<_death> I would probably use COND, or a hash table
<scymtym> consider (switch (... :test #'equal) ((1 2 3) ...)). how would it distinguish a key (1 2 3) from three keys 1, 2 and 3?
NicknameJohn has joined #commonlisp
<McParen> the same way case does? (or (equal 1 ...) (equal 2 ...) (equal 3 ...))
<scymtym> but if the test is equal, the user could want (1 2 3) to be key, not a list of three keys
<_death> it could require that the keys part is always a list
<McParen> yes..
<McParen> ideally we would have string-case.
<McParen> or case* which uses equalp under the hood.
tyson2 has joined #commonlisp
azimut has joined #commonlisp
decweb has joined #commonlisp
alcor has joined #commonlisp
josrr has joined #commonlisp
X-Scale has quit [Quit: Client closed]
josrr has quit [Remote host closed the connection]
josrr has joined #commonlisp
McParen has left #commonlisp [#commonlisp]
<pfdietz> string-case is quite nice.
<pfdietz> I used it as an accelerator for intern when reading json, to speed up processing of some specific attribute names.
<waleee> lol this was insidious to use in a blog post if it works the same as cl's dymanic stuff https://youtu.be/MDblUyz0PtQ?t=2522
<ixelp> [UPDATE] Mojo Is Faster Than Rust - Mojo Explains More - YouTube
decweb has quit [Ping timeout: 240 seconds]
NicknameJohn has quit [Ping timeout: 268 seconds]
rendar has quit [Quit: Leaving]
a51 has joined #commonlisp
markb1 has quit [Ping timeout: 255 seconds]
zetef has joined #commonlisp