IRC channel logs
2023-01-19.log
back to list of logs
<civodul>uh, pushed a Gnulib update but now i realize additional modules are needed, roughly one per posix_spawn-related function <flatwhatson>mirai: peg-string-compile isn't exported, what are you trying to achieve? <mirai>instead of using define-peg-string-patterns <flatwhatson>mirai: ah. you can achieve that by using (define-peg-string-patterns ...) inside a lexical scope where (define ...) forms are valid <flatwhatson>so eg. (let () (define-peg-string-patterns ...) ...) <flatwhatson>but it can be better to just structure your code so the peg patterns are defined in a module of limited scope, and just export what you need <mirai>do the 'or', 'and' sexp patterns accept more than 2 arguments? That is, can I write the peg string 'a <- X Y Z W' as (or X Y Z W) ? <mirai>it should have been an (and ....) pattern <mirai>I wasn't aware that define forms could be used inside a (let ...) <daviid>sneek: later tell akirakyle i pushed a series of patches that fix both callback procs and vfunc methods arg values, and updated the peg-solitaire example ... when you have some time, please pull, make, install, try and let me know - i will now work to add the 'Unimplemented type - array; (c -1 #f 1 interface)', will let you know when done ... <pottsy>Hi folks, I want to match a pattern like: (atom [#:key val]... rest ...) my attempt is here: https://dpaste.org/DjU4u but I need to somehow remove the parens around the attribute/values <Wurt>Hi, anyone knows why `(use-modules (srfi srfi-19)) (string->date "10:21:00" "~H:~M:~S")` produces an exception? How can I parse a date with that format? <lloda>i guess "10:21:00" doesn't define a date <drakonis>Wurt: check if the format string is correct <lloda>"10:21:00" just isn't a date. How is the function supposed to figure out year/month/day if you don't give them <drakonis>(string->date "input string" "template string") <drakonis>i'm not sure why the function isnt reading the input string? <drakonis>lloda: to be fair, the srfi gives you the means to not have to declare a date <Wurt>Thanks. I read an example in the racket documentation that reads an hour and I think that guile could do it too. What is the recommended struct to store an hour? POSIX time? A custom record? <lloda>this could still be a bug in Guile idk. You should be able to store an hour in the date type, just with y/m/d set to #f. Probably Guile tries to do something with those even tho they aren't set <lloda>if you pick a y/m/d as reference that could be a workaround <civodul>ACTION still fiddling with Gnulib to get --target=x86_64-w64-mingw32 builds to pass <mirai>It looks a bit "wasteful" doing (search-for-pattern entry x) on each of the functions it's taking in <lilyp>mirai you could probably define a peg pattern that has several entries, or several noise-separated entries <lilyp>other than that I think this is rather unsuited for unfold <mirai>lilyp: what's the adequate replacement for unfold here? <dadinn>unfortunately, I've realized that it reverses the order of the expect clauses. (also the bindings end up in reverse order, but that shouldn't be a functional issue in itself) <dadinn>what is the way to reverse the final syntax list? Somehow #,(reverse #'clauses-with-bindings) doesn't work <dadinn>it throws an error when I try to expand this: (tree-il->scheme (macroexpand '(expect ((lambda (x) x) (display "FOO1") (display "BAR1")) ((= 42 shit) (display "FOO2") (display "BAR2"))))) <dadinn>khm... tried to replace all the vulgarities before posting... but it seems I just can't stop my turrets :/ <dadinn>at any rate, the reason for this macro is that it seems that the current expect implementation executes the test expression on each reading of a new character, therefore specifying the lambda means a new lambda is created on each call. I've realized this because I had a matcher-lambda-factory procedure there before, which logged something before creating the matcher-lambda. Not sure if this contradicts the <dadinn>expected behavior, but I would consider it a bug. Nevertheless my macro is intended to workaround this by evaluating the expression before, and the referring to the already initialised matcher procedures via bindings. <dadinn>argh!... is there a max character limit per line on IRC? Is this Twitter or what! :'D <lilyp>mirai: I think a named let is most likely to work, but you could also look into srfi 43 streams <mfiano>dadinn: The IRC RFC specifies 510-character max, but it includes your hostmask, so it is actually a variable limit below this value. <mfiano>Conforming clients will split messages into multiple. <mfiano>Actually IRC predates the Web, so you could say Twitter copied IRC :) <lilyp>sounds like IRC set up a deliberately high limbo bar and folks at twitter were like "I can go below that" <dadinn>fair enough... it's definitely more complete picture, when put into historical perspective ;) <old>510 seems a very arbitrary constant <civodul>flatwhatson: hi! do you still have that nlocals=0/debugger patch we were discussing the other day? <old>why not 512. Make it align on a power of two at least <dadinn>Any suggestion on how I could revert that syntax list... Or use some sort of appending aggregation instead of consing each item on the front? <count3rmeasure>its part of gdb extension in guile, and here I'm attempting to wrap and capture the output of "info proc mappings" <count3rmeasure>it appears to choke on the call to infoprocmappings on line 44 within the actual command <old>count3rmeasure: looks like infoprocmappings is a string and not a procedure <old>Calling it resulti in applyting a string, which is not possible <old>(execute "info proc mappings" #:to-string #t) <old>You're explecitely asking for a string ^^ <count3rmeasure>and I can just capture that inside of the command itself and pass that to the following procedure <old>(sort-ipm-lst (string-tokenize (execute "info proc mappings" #:to-string #t))) <old>Or you would use some `let' if you want local variable for easier reading <mfiano>old: It's actually 2^9 but CR/LF is the message delimiter token, so I didn't include those 2 characters. <mfiano>512 minus length of nick/hostmask minus CR minus LF <old>Did CR was actually useful at the exception of typewritter <old>That and some crap OS that use it <civodul>in other news, "main" successfully cross-builds to x86_64-w64-mingw32 <dthompson>civodul: heh that was going to be my question! <civodul>someone with Windows or some Wine setup will have to tell <civodul>and! it also appears to build fine with Clang <civodul>(still running, but libguile built fine) <dthompson>I am going to copy the guix command you posted on mastodon <civodul>with these "edge cases" done, should be able to push rc1 soon <civodul>it takes a while because it builds Guile twice: the native one first, and then the MinGW one <civodul>you need Guix from today too because i fixed a couple of things in the 'guile-next' package <dthompson>civodul: ah that explains the failure I just got. thanks. <dthompson>it would be good for spritely if we could ship guile programs to windows machines. <dthompson>well hopefully now that I have thermald running my laptop won't shut off <dthompson>I'm pretty sure I killed my old thinkpad x220 by compiling guile <dthompson>the fact that the mingw build works without disabling threads or jit is promising <civodul>we're pulling tons of Gnulib code, it's gotta be useful :-) <dthompson>in a couple years, when this build is done, I'll give it a go in wine and see what happens ;) <civodul>perhaps you'll have forgotten by then what it was you wanted to test <dthompson>40-45 mins for a build, I guess. seems about right from past experience. <dadinn>I have noticed though that there is definetely something off with the official ice-9 expect macro... <dadinn>in but actually you can: (tree-il->scheme (macroexpand '(expect-old))) <dadinn>my macro also fixes that: if it's called with no argument that's an error. It would be because my let bindings would end up an empty list, which is an error anyway!