IRC channel logs

2025-06-03.log

back to list of logs

<gabber>for some reason running (dbi dbi) code randomly produces only
<gabber> https://termbin.com/e1u8
<gabber>s/only//
<gabber>either one of these three messages. input to the code is pinned.
<mwette>lechner: what is ut_host?
<lechner>mwette` / it's the host name for remote logins, but I use the same kind of aliasing for all char[] arrays in struct utmp https://www.man7.org/linux/man-pages/man5/utmp.5.html
<lechner>gabber / you have a heisenbug
<gabber>lechner: cool!
<old>is it possible to make a definition in a syntax-case avaiable in the expand environment?
<old>I mean, I know it's possible but is there a clean way of doing so
<lechner>old / can you give an example?
<old> https://paste.sr.ht/~old/568026a4cfae27c4386f6d2c20fea667c97fc8e5
<mwette>old: Is this not a case for eval-when ?
<old>mwette: I guess. But I'm not sure how that would work within an expansion
<old>I'll have to try
<mwette>If you (define foo (syntax-case x () ...)) inside an eval-when w/ expand etc I think you can use foo inside of define-syntax.
<old>hm
<old>mwette: to express my problem better here. I have a syntax-transformer called `define-blue-class'. It's a wrapper around `define-class'
<old>It does lots of stuffs including setting a #:metaclass a defining a syntax-transformer for building objects of that class
<old>What I'm trying to do is to insert in that generated syntax-transformer, a slot checker so that you can not pass field that does not exist for the class nad its parents
<old>So far I've manager to make it work, except if the parent class is in the same module as the child
<old>and I figured that the best thing that could work for me, would be to have access to the type during the expansion
<old>this is the transformer I'm working on: https://paste.sr.ht/~old/223aae6be83a7189092218cfc78aa6cb4709a68a
<old>don't mind the eval-when, it's not working
<old>I seem to manage doing so by doing: (eval (syntax->datum form) (current-module))
<old>this will define the goop class in the current module when doing expansion
<old>not really pretty tho
<old>If I could avoid that eval I would be happy
<old>oh I did not knew you could pass to eval a syntax
<old>neat
<pjmg>Hi! when using Guix Home on a foreign distro (if that matters), what is the way to upgrade the packages that are part of the home configuration? I'm thinking in `guix pull` and then `guix home reconfigure /path/to/config-file.scm/`, is that right?
<ieure>pjmg, Yes. Same as Guix System.
<ieure>`guix home reconfigure' makes a new home generation with the current versions (from `guix pull') of the packages in your home environment configuration.
<pjmg>thanks ieure!
<mwette>old: I didn't dig into all of it, but I agree there should be a cleaner way.
<old>mwette: Think about a type-system you want to make where user can define compound structure
<old>you want to define these structures so that user can manipulate them at runtime
<old>but you also want to define them during the expansion so you can do type-check during future expansion
<old>or for optimization
<old>for example, a user define a structure S. You want to calculate the sizeof of that structure at exapansion time so that you can then expand (sizeof S) to a literal in future expansion
<old>that's pretty much what I want
<mwette>S is a type or an instance ?
<old>mwette: in my case, it is an instanceof type <class>
<mwette>thanks