IRC channel logs
2025-04-04.log
back to list of logs
<ArneBab>If there’s no way, maybe it could be possible to note the dependencies somehow in properties. Then I could do something like (module-symbol-dependents a-record-type) to get the additional symbols to add to (only (module) a-record-type) <old>ArneBab: if you get something working I would be interested. I would like a way to determine if module A is using macros of module B and recompile A when B is changed <ArneBab>old: the only idea I have for that right now is to adjust the macros themselves to include the required information. <ArneBab>old: define-record-type creates procedures, so we could just add all the connected procedures as property: (define-record-type <bar> (bar) bar?) (procedure-properties bar) <ArneBab>(set-procedure-property! bar 'required-imports '(bar bar?)) (procedure-properties bar) <ArneBab>old: that’s what we could add to define-record-type to enable tooling to parse the syntax tree, then for each procedure check the properties and note the required imports. <ArneBab>It only works for procedures, though — I did not find a way to attach properties to syntax-transformers. <ArneBab>We could decide on a naming scheme to have a known name of a dependency information symbol for each macro. <ArneBab>old: the only approach I found is to parse the file and gather the symbols for each module: (module-map list (module-public-interface (resolve-module '(srfi srfi-1)))) <ArneBab>Then walk the file again and get the module for each symbol encountered (by checking in the collected imports). <ArneBab>Finally replace every plain import with a <ArneBab>… #:select or (only ...) import, *if* there are symbols you got from it. <ArneBab>Sadly (module-map list (resolve-module '(srfi :1))) is empty — there must be some aliasing I miss. <ArneBab>I guess for the final code walker, it would be necessary to do a double recursion over the file: one with read and one that just preserves all chars where nothing needs to be changed and skips the chars of structures read that should be replaced. <n|Phreak>Does anyone have or know of security tools , specifically offesnsive examples using scheme and or guile ? <n|Phreak>Does guile have the type of libraries like python ? <cpli>humm: i'm unsure with what you mean with the "xml syntax for html".. would you recommend i make an additional "sanitizer" for the xml output? <ozzloy>is there a way in guile to have clojure-inspired literals like {a b c d} for a hash with keys a and c and values b and d? <ozzloy>not a reader macro, i think? because the closest that would get is something like #h{a b c d} <humm>cpli: The HTML spec¹ defines two syntaxes for HTML: The /HTML syntax/ and the /XML syntax/. The HTML syntax is its own thing; the XML syntax uses XML. <humm>and since " is defined by XML, I’d assume that " and " were interpreted the same by Web browsers in XML HTML documents <rlb>ozzloy: not sure of anything built-in -- fwiw, lokke has preliminary edn reader whose lower scm level is customizable/scheme-oriented, if that helps: https://codeberg.org/lokke/lokke/src/branch/main/mod/lokke/scm/edn.scm Of course that's not useful if you want to intermingle scheme and edn forms, but you can use it to read edn, and tell it how you want it to handle the types. <rlb>I'd probably start at the bottom of the file if it's at all interesting. <cpli>how can i have it ignore the xmlns="namespace"? <rlb>(i.e. reader, string-reader, read, and read-string) <ArneBab>n|Phreak: Guile has fewer libraries than Python (simply because it is not so big), and the libraries are differently organized. There are a lot more than the pure Guile userbase would suggest, though, because many libraries are shared between the different Scheme implementations. For a running start to look up libraries: https://www.draketo.de/software/programming-scheme#docs <dsmith>n|Phreak, Offensive Guile Software? Only thing I can think of is wisp. No parens! That's really offensive to me. <dsmith>ArneBab, (sorry about that, just having some Friday Fun...)