IRC channel logs

2022-10-21.log

back to list of logs

***grymzu is now known as VladTheImpeller
<KREYREN>is there some cool and easy thing on guile that can convert UNIX time to human readable format?
<KREYREN>expecting to have variables: years, months, days, hours, minutes, seconds in a scope of a procedure 🤔
<KREYREN>bcs i am stuck at calculating days as those are not constant across months
*KREYREN sent a code block: https://libera.ems.host/_matrix/media/r0/download/libera.chat/939dac1fc069e269fa2234bae3687dd4c06003f3
<KREYREN>bcs my cheeky solution is kinda lame~
<KREYREN>but it does time lol~
<rlb>KREYREN: doe these do what you need? https://www.gnu.org/software/guile/manual/html_node/Time.html
<rlb>s/doe/do/
<KREYREN>> <@klugmathias:matrix.org> Oh, I know, your make can just be implemented as... (full message at <https://libera.ems.host/_matrix/media/r0/download/libera.chat/ad7b940d756517b147de098c5986a6a353fe604a>)
<KREYREN><rlb> "6piz7wk: doe these do what you..." <- thanku! ^-^
***VladTheImpeller is now known as grymzu
*KREYREN nods
<technomancy>hey are yall aware that the "Tutorial" link at the bottom of the guile web page links to a document which a) assumes the reader knows C, b) covers the use of guile 1.8.7 and GCC 4.3.1, and c) has no CSS? https://www.gnu.org/software/guile/docs/guile-tut/tutorial.html
<technomancy>might want to take that down, it's a bit embarrassing =)
<technomancy>also the FAQ claims to be last updated in 2009 https://www.gnu.org/software/guile/docs/faq/guile-faq.html
<rekado_>I don’t think they are built by any recent version of Guile.
<rekado_>maybe they are just lone remnants of releases past?
<technomancy>right but like ... don't link to hopelessly outdated documentation from the footer on the main home page, would be my recommendation
<technomancy>to clarify: not to take down the pages themselves but take down the links, or move them to a "historical interest" section maybe
<rekado_>yes, it’s weird to have that tutorial linked right in the first spot at https://www.gnu.org/software/guile/learn/
<apteryx>is it possible to retrieve the content of a particular file from a zip *archive* using guile-zlib?
<dthompson>apteryx: iirc, no. it just handles the general compression format, not the .zip file format.
<apteryx>OK; thank you. I'll call unzip directly
<dthompson>I wrote the original guile-zlib bindings many years ago, but I think I remember it clearly enough ;)
<apteryx>hehe, I saw you in the 2013 contributors list :-)
<apteryx>that's nearly 10 years flying by
<dthompson>ugh yeah
<dthompson>hitting that 10 year mark is a weird feeling!
<dsmith-work>Happy Friday, Guilers!!
<dthompson>happy friday!
<manumanumanu>Ahoy ahoy! What is going on in guile land?
<manumanumanu>Mike is cleaning up the C I see.
<civodul>openat's in the house!
<technomancy>so for that issue with the web site documentation, should I email in a bug report or what?
<civodul>technomancy: hi! i'm not sure what issue you're referring to, but yes, bug-guile@gnu.org goes to debbugs so it's less likely to be lost
<technomancy>civodul: the tutorial that's linked from the footer on the main guile web page covers guile 1.8.7 and gcc 4.3.1 somehow, haha
<technomancy>not that it's *wrong* but it makes a very poor impression for people hoping to learn
*civodul looks
<technomancy>civodul: https://www.gnu.org/software/guile/docs/guile-tut/tutorial.html
<technomancy>"I will assume you're at least confident about the very basics of Scheme or LISP in general" plus it assumes you know C... if I were a newcomer and saw that I'd probably close the tab =\
<civodul>uh
<civodul>let's remove that
<technomancy>hehe
<civodul>a pointer to https://spritely.institute/static/papers/scheme-primer.html would be more appropriate
<technomancy>the footer also has a link to a FAQ which hasn't been updated since 2009
<civodul>fun
<technomancy>if you're in a cleaning-house mood
<dthompson>lol
<civodul>i lack the bandwidth, but i can at least clean up the front door
<technomancy>it quotes a mailing list message from 2000
<civodul>and mentions a CVS repo? :-
<civodul>:-)
***sauvin is now known as Sauvin
<technomancy>how'd you guess? =D
<technomancy>is it expected that cgit doesn't highlight scheme or is this misconfigured? https://git.savannah.gnu.org/cgit/guile/guile-web.git/tree/haunt.scm
<rekado_>technomancy: if there’s some configuration to make it highlight scheme I’d love to know
<technomancy>I guess it's more that I'm surprised that guile would pick a tool like this which doesn't actually support guile?
<technomancy>but I guess as a gnu project maybe you don't get to choose
<rekado_>yay for commit 793fb46a1e69fa2156805e4a97b340cf62e096a6!
<civodul>technomancy: the "learn" page should look better now
<technomancy>civodul: nice; thanks.
<dthompson>rekado_: you can highlight scheme with cgit
<dthompson>one sec...
<technomancy>civodul: looks like the FAQ link didn't get removed tho; might want to do that too.
<technomancy>it's going to raise more questions than it answers
<dthompson>rekado_: here's a cgit link to a scheme file, correctly highlighted, that contains the guix service configuration for the cgit server you are talking to :) https://git.dthompson.us/guix-config.git/tree/takemi.scm#n165
<technomancy>that's more like it; nice
<daviid>dthompson: how do we do that on savannah?
<daviid>dthompson: so we could all do that, including the guile source tree ...
<daviid>i am cgit config ignorant :)
<dthompson>daviid: the admins need to configure the "source-filter" setting in their cgit config file.
<civodul>FAQ's gone!
<technomancy>thanks!
<daviid>do you happen to know how to ask, is it by email, or the svannah 'ticket' system (I don't remember exactly how they call iy ...'
<dthompson>the new frequently asked question: where's the FAQ?
<civodul>:-)
<technomancy>maybe the real faq was the friends we made on the way?
<dthompson>daviid: looks like here? http://savannah.nongnu.org/support/?func=additem&group=administration
<daviid>dthompson: so, if we ask, if they accept, do i anderstand correctly that one 'proper' source-filter would afect all savannah cgit browsed projects?
<dthompson>yes, it would affect everything.
<dthompson>my past experience leaves me less than optimisitic that they would turn on syntax highlighting.
<dthompson>but maybe they will.
<technomancy>yikes
<dthompson>don't let my pessimism stop you. :)
<dthompson>I just wouldn't be surprised if it turned into a "whole thing"
<daviid>dthompson: did you asked in the past?
<dthompson>no
<technomancy>being a gnu project sounds rough
<dthompson>just generally gnu admins are resistant to change
<technomancy>I mean, even to have put up without syntax highlighting for this many years
<technomancy>I couldn't live like that
<dthompson>yeah my cgit was like that for quite some time and I just got fed up with it. I didn't realize it supported calling an external program to do the highlighting.
<daviid>dthompson: ok, as you know more about this then myself, and most of us i beleive, would you mind to ask? proposing the config you are using for your own cgit server ... (not trying to throw 'the hot potato' at you :), I'd hapiliy ask, but i think it would be better if by someoe who kowns what they're talikng about, not my case [i mean i have zero cgit server config knowledge and expewrience)
<daviid>going afk for a little, bbl
<rekado_>dthompson: thanks!
<dthompson>daviid: I think rekado_ volunteered ;)
<drakonis>technomancy: ah, learning guile, aren't we?
<dsmith-work>I guess I'm just old, but it seems strange to me that not everyone knows C.
<singpolyma>dsmith-work: it's not just not everyone. It's probably well under half of professional developers
<dsmith-work>Yep. Amazing to me.
<apteryx>what's the most natural primitive to walk a binary tree and accumulate results in Scheme? fold? something else?
<apteryx>the problem is I'm navigating a path, that contains archives that may contain more paths, and I want to accumulate all the paths in a depth first search style
<apteryx>why does guile allow this form? (if #f (pk 'not-run) (pk 'run)) it seems it'd be more useful to report a syntax error here, no?
<dsmith-work>apteryx: Not sure if it applies, but wingo had some kind of tree-walking code for sxml or something.
<dsmith-work> https://wingolog.org/pub/fold-and-xml-transformation.pdf
<dsmith-work>Probably not. Seems very sxml related: https://www.gnu.org/software/guile/manual/html_node/SXML-Tree-Fold.html
<technomancy>drakonis: at this point more like taking a quick peek and trying to help yall avoid some embarrassment.
<drakonis>heh, fair point
<drakonis>we could definitely avoid it by fixing some pain points with the docs
<technomancy>us lispers gotta look out for each other
<technomancy>drakonis: it was fixed pretty quickly once I pointed it out =)
***daviid` is now known as daviid
<apteryx>dsmith-work: ah, there's foldts, and I remember loosing a few evenings on it without getting to gripes with it :-)
<apteryx>smells like déjà-vu, eh
<rekado_>I’m using foldts here: https://git.savannah.gnu.org/cgit/gwl.git/commit/?id=037c0b3a5ea3e2d6a5a872836b7ac5daa9ba7717
<rekado_>to extract some information from Scheme code
<ArneBab>I cleaned up my solutions to the advent of code (first 12 days) and added a solution for the 13th day: https://www.draketo.de/software/advent-of-wisp-code-2021 — this now uses noweb / literate programming to make it easier to see how the first and the second solution for each day differ.
<ArneBab>Also I improved the PDF version to make it nice to print ☺ https://www.draketo.de/software/advent-of-wisp-code-2021.pdf — if you want to use that in a book, the source may be useful ☺ https://hg.sr.ht/~arnebab/draketo/browse/software/advent-of-wisp-code-2021.org?rev=tip
<daviid>dthompson, ok :) rekado_ is that so?
<daviid>we need to ask, that cost nearly nothing ...
<apteryx>rekado_: thanks
<apteryx>any clue why given (define tree '(top (level2-a (level3-a level3-b (level4-a) level3-c) level2-b))), (map (lambda (x) (if (symbol? x) x (car x))) tree) => '(top level2-a) ? I would have expected '(top).
<apteryx>hmm, nevermind, that's totally expected given the (car x)
<apteryx>rekado_: foldts seems exactly what I need
<apteryx>the here procedure visits each node in a depth first traversal
<apteryx>I can print them, but how can I accumulate the nodes visited in a flat list?
<apteryx>foldts*-values, perhaps?
<apteryx>ah, this seems a good starting point for what I'm after: https://wiki.call-cc.org/eggref/5/sxml-transforms#foldts
<rekado_>apteryx: it’s a fold so you can always accumulate stuff.
<rekado_>can you show us an example problem with desired output?