IRC channel logs

2023-02-06.log

back to list of logs

<mirai>must a test use (test-suite lib)? can srfi-64 be used instead?
<daviid>no, you may test 'anything' just writing a test ... and srfi-64 is a '(test-suite lib)', but you might look at guile-lib (unit-test), which predates srfi-64 and uses goops ... fwiw
<daviid>sneek: later tell mirai no, you may test 'anything' just writing a 'guile scheme test' ... fwiw, srfi-64 is a '(test-suite lib)', but you might look at guile-lib (unit-test), which predates srfi-64 and uses goops ...
<sneek>Okay.
<mirai>daviid: I was wondering if https://github.com/scheme-requests-for-implementation/srfi-233/blob/main/srfi-233-test.scm could be copy-pasted into guile (provided the first cond-expand lines are replaced with the typical (use-modules ...))
<sneek>Welcome back mirai, you have 1 message!
<sneek>mirai, daviid says: no, you may test 'anything' just writing a 'guile scheme test' ... fwiw, srfi-64 is a '(test-suite lib)', but you might look at guile-lib (unit-test), which predates srfi-64 and uses goops ...
<daviid>mirai: no idea, i have (very) little interest in portability, as i am extensively uses goops ... i use (very basic use) guile-lib (unit-test) for all my projects
<daviid>*/use/using
<flatwhatson>mirai: guile provides srfi-64, so yes that should work
<mfiano>hey everyone, after a couple months of learning guile and scheme by reading and writing little toy scripts, i just started a real software project yesterday, and I'm having a ton of fun. I just wanted to thank all the people here that offered all the nice suggestions over the last few months, which was most of you. Thanks!
<drakonis>has it been months already?
<mfiano>Well I did start sometime in Dec
<mfiano>I don't know exactly when.
<drakonis>well, doesnt matter, glad to see you've liked it
<drakonis>which project is it?
<mfiano>Writing some graphics math routines right now that will eventually be a library for the basis of more higher order work of mine
<mfiano>But, thanks!
<drakonis>cool!
<mfiano>I tend to build bottom up because I know the pieces I need in advance.
<mfiano>I spend a lot of time sketching out designs before I code
<mfiano>Which is why I'm such a slow coder
<drakonis>hardly that slow
<mfiano>To me, I find it equally interesting to explore different designs in sofrware architecture. I'm interested in the code just as much as the artifact.
<mfiano>I try to write high-quality code that has been pre-thought
<mfiano>Knowing the scope boundaries is important if I don't want to spend the rest of my years writing a general-purpose stack I will never be able to use.
<drakonis>it is a good point, as scope creep is the bane of many a developers
<mfiano>Note that the above should have a strong emphasis on the word "try". I am still learning of course, and it comes with a lot of failure in this regard (good software architecture)
<mfiano>Hence, the slow coding :)
<mfiano>I mostly do a lot of exploratory programming. Most of my code never sees the light of day :)
<mfiano>and some of my design documents never see a line of code
<mfiano>it is what it is. i code different than most people :shrug:
<drakonis>ah how i wish fosdem's recordings went up faster
<drakonis>i want to watch will byrd's talk
<mfiano>I heard there is some technical difficulties going on. Should be resolved soon.
<drakonis>i'm happy that guile is cool now :v
<drakonis>what it needs next is some of that logic programming juice
<haugh>I've seen a lot of subtly different styles for L?GPL licensing of Guile code, specifically in module headers. Is there a standard or a style guide? I want to publish standalone modules that may be considered for inclusion in Guile. Also Guix but that's its own can of worms.
<haugh>To be clear re: inclusion, I want to publish repositories that will "grow into" Guile's quality standards and I want to avoid legal issues that could arise from the licensing style early in the project's history
<ArneBab>haugh: AFAIK the simplest way it so install the legalese package in Emacs and use C-u M-x legalese
<mirai>haugh: SPDX identifiers
<haugh>ArneBab, mirai: So I take it this in no way officially standardized
<mirai>concise, machine readable and much less ambiguous (avoids the "is this project GPL3 only or is it GPLv3 or later?")
<mirai>I don't think SPDX is used in guile yet (haven't seen it) but you could use it for your repositories
<mirai>bonus, you get tools like REUSE that help you ensure that every file in your repo is unambiguously licensed
<haugh>mirai, REUSE looks interesting. Will read up on it.
<haugh>ArneBab, they can pry Vim out of my cold, dead hands
<KarlJoad>I am writing a simple parser for BibTeX files right now, and have gotten the file read into Guile as an alist. I want to perform some transformation operations (separate authors, convert some types, etc.). What is the Guile/Scheme-y way to do that?
<KarlJoad>The relevant file, if anyone is interested. https://github.com/KarlJoad/gloa/blob/bibtex-import/gloa/importers/bibtex.scm
<mirai>I'd implement this module using PEG
<KarlJoad>So would I. But baby steps. This is my first real Guile/Scheme thing, so I want to get this working and testing before moving onto the PEG.
<mirai>or any other utility that is more robust to deal with this kind of structured data as surely there are some counterexamples one may not expect
<KarlJoad>Agreed. Especially because I have a mix of BibTeX and BibLaTeX files sitting around too, which are slightly different.
<mirai>if you don't mind this dump of code, here's my first attempts at playing with PEG https://paste.centos.org/view/9db6443a
<mirai>(you can observe the iterative process it has gone and all kinds of experimentation)
<KarlJoad>That will be helpful.
<mirai>use it with a repl
<KarlJoad>So my question for now (which may be irrelevant when I use the PEG iteration) is how to have my alist sequence? I feel that just nesting function calls is a little hacky, meaning (fix-authors (convert-numbers (other-thing the-alist))). I think Guix uses their own monad system for that?
<ArneBab>haugh: you can use evil-mode to get usage like vim (colleagues of mine call that the best vim :-) ) — but even if you don’t want to go there: running emacs to insert a template shouldn’t really hurt, right? It’s not like you need to use it as editor to insert a template.
<haugh>ಠ_ಠ
<haugh>ArneBab, try to imagine this conversation from my perspective. You come across a language used to integrate an ecosystem built on the principles of openness, transparency, freedom, and extensibility. You notice undocumented boilerplate. You ask about it, and the advice is to install an IDE that's so bloated it doesn't come pre-installed on any operating system.
<haugh>Also I don't mean to be rude but if your colleagues think Evil is superior to Vim, they might not have been fully Vimming
<ArneBab>haugh: this is not the Guile advice, just my advice how you get the canonical header — not just for Guile but for any software.
<ArneBab>haugh: and I’m pretty sure that my colleagues have been fully vimming. It’s just that org-mode is awesome. It’s the prime reason why they use Emacs.
<ArneBab>haugh: but I know the history of the editor war. I’m that I triggered that for you. (I learned the basic vim commands simply for sake of not being lost when I need to use it)
<ArneBab>s/I’m/I’m sorry/
<haugh>ArneBab, I don't care about the holy war, I care about tooling-agnostic code. I've been in fintech/msp for the past six years and in all the proprietary codebases, ad-hoc VCS, and black-box outdated Linux abominations, I've never seen such tooling dependence as I have in a few months of taking the GNU System seriously
<ArneBab>haugh: you can just copy the header added in the latest file if you want to avoid Emacs. I do not think that there’s a required standard aside from being legally binding.
<ArneBab>(which means: use LGPL and add "or any later version")
<ArneBab>haugh: the standard for LGPL is: https://www.gnu.org/licenses/gpl-howto.html#license-notices
<ArneBab>(doesn’t have to do with Guile itself)
<ArneBab>«When using the Lesser GPL, insert the word “Lesser” before “General” in all three places.»
<ArneBab>haugh: I hope that that’s a more useful answer for you
<haugh>ArneBab thank you for your help, seriously
<ArneBab>haugh: thank you for putting up with my initially not that useful answers …
<ArneBab>haugh: I’m using Guix for work, but I had to work around it a lot to make it work: https://www.draketo.de/software/guix-work
<ArneBab>It provides awesome tools, but it can stand in your way …
<haugh>I just had to do that one thing we're not allowed to talk about because we're so free
<lilyp>How can you really be free if you aren't even allowed to force children into slavery? smh
<defaultxr>hi. noob question: is there some way to mark an argument to a define-syntax as being the "body" form, so that emacs knows to indent it with 2 spaces instead of aligning it with previous arguments? for example i'm trying to write something like a `when` form, but the body gets lined up with the test, unlike with the built-in `when`. i see that i can do so in emacs itself with some elisp but i'm
<defaultxr>wondering if there is a way to do it just with guile.
<ArneBab>haugh: look at the link then you’ll see that we’re actually free — though it can take some work.
<dthompson>defaultxr: for that you'll have to configure the scheme-indent-function variable in emacs. for example: (put 'defaultxr-when 'scheme-indent-function 1)
<ArneBab>haugh: you could ask “who do you use Guix if it creates more work than your previous Gentoo to have a working dev environment?” — the answer is: I had my kid hit the power button during a system-update. That borked the whole system. With Guix that won’t happen, because updating the system is atomic: the actual update after the build is done is just setting a symlink.
<haugh>ArneBab, Guix is the second generation of the Nix monad, a paradigm whose raw power was previously only barely relegated to academia by the pedantry of the Haskell community. The applications of an ephemeral filesystem are endless and presently staged to rewrite the first principles of containerized infrastructure, but NixOS is an inherently fractured implementation with post-hoc DSL integration. Guix System, being almost entirely accessible from a
<haugh>Guile API, does not share this limitation. I'm currently working towards putting 100% of my business and personal computing on the GNU System. At this point, the most discouraging part of the process has been the fact that most of the community support begins with the assumption that I'm using Emacs.
<dthompson>haugh: I think that with the advent of LSP support in many editors that we could more easily provide non-emacs ways of doing things.
<ArneBab>haugh: then I hope my guix-work article could help you :-)