IRC channel logs

2021-01-02.log

back to list of logs

***evhan is now known as Guest97139
<daviid>Aurora_v_kosmose: did you send an email to the guile s/w list maintainer about nomad?
<Aurora_v_kosmose>daviid: I haven't. Working on other stuff atm. (And I haven't setup my email for this nick yet with Emacs)
<daviid>sneek: a_v_p nice! this is because gtk3, window do not have an alpha channel, so you have to ask gdk to instantiate and give you sucn a window - but both clutter and gtk4, all window, have a de-facto alpha channel -
<sneek>Got it.
<daviid>sneek: later tell a_v_p nice! this is because gtk3, window do not have an alpha channel, so you have to ask gdk to instantiate and give you sucn a window - but both clutter and gtk4, all window, have a de-facto alpha channel -
<sneek>Got it.
<daviid>Aurora_v_kosmose: ok, I just sent a message for nomad ..
<Aurora_v_kosmose>I have to set it up eventually, given I want to actually contribute some things to Guix
<holri1>is there a library for web scraping?
<ryanprior>The best web scraping library is still beautiful soup. You can use Python sexpdata library to read s expressions directly from Guile and send them back. Or you could use JSON to serialize or whatever.
<Aurora_v_kosmose>You could use xmlrpc to have Guile control a Python blob doing the parsing parts.
<Aurora_v_kosmose>Oh, that was 3 hours ago.
<wleslie>I don't think beautifulsoup has been worthwhile since python 3. use lxml, which has a typesafe interface, has non-confusing reprs, and uses the native unicode support.
<Aurora_v_kosmose>I personally use lxml which has very nice css-selector support.
<Aurora_v_kosmose>elfeed has something similar which could probably be used as the basis for a Guile/CL implementation.
<Aurora_v_kosmose>"xml-query"
<wleslie>don't forget to turn off the SSRF features if your network isn't ocap-safe
<Aurora_v_kosmose>ocap?
<wleslie>"object-capability" - resources you have authority to access are precisely those you can name.
<Aurora_v_kosmose>Ah, right that.
<Aurora_v_kosmose>SSRF features?
<Aurora_v_kosmose>Though to secure the xmlrpc server, the easiest way would probably be to simply use unix sockets.
<wleslie>I forget precisely which ones. I guess lxml disables them by default now. basically you could send it a document and get it to load other resources from the parser.
<Aurora_v_kosmose>Ah... https://owasp.org/www-community/attacks/Server_Side_Request_Forgery https://cheatsheetseries.owasp.org/cheatsheets/XML_Security_Cheat_Sheet.html This sorta thing
<Aurora_v_kosmose>I don't think those would work if you use the HTML parser included with lxml, would they?
<wleslie> https://lxml.de/resolvers.html#i-o-access-control-in-xslt
<Aurora_v_kosmose> https://lxml.de/validation.html This seems to be the option you mean?
<wleslie>maybe it's specific to xslt
<wleslie>it's pretty rare to get served an xslt template, I doubt lxml.html would even handle it; but old browsers used to
<Aurora_v_kosmose>So namespace-away your xml parser and communicate on a unix socket should cover most issues.
<Aurora_v_kosmose>Still needs explicit consideration though, which is a gotcha.
<Zelphir>Hi! Is there any comprehensive guide to creating Guix packages? What I mean by "comprehensive": How to write all the required GNU Guile files, how to write your Makefile, how to use auto(tools?), etc, for a pure GNU Guile library. Last time I tried to write one, I hit my non-existing autotools knowledge and gave up again.
<Zelphir>I sometimes see a git repository and then in that there is some ac files and makefiles, which do not look like manually created. I think that is what autoconf or autotools or how it is called actually does, but I have no idea how to use that.
<Zelphir>Here is an attempt I made: https://notabug.org/ZelphirKaltstahl/guix-package-manager-tutorials/src/master/make-a-package
<Zelphir>I've also seen repositories without ac files and only Makefiles. I would like to learn a minimal setup, which enables me to add something as Guix package.
<RhodiumToad>autoconf is what takes configure.ac and creates configure
<RhodiumToad>autoconf is horrible, but the alternatives are often worse
<Aurora_v_kosmose>hah
<Zelphir>I'd be happy with writing a makefile, that I can understand.
<Zelphir>For example the recently released shapefile library seems to get by with only a makefile.
<wleslie>I don't know of a comprehensive autotools primer, but I refer to the diagram on wikipedia a lot
<wleslie>oh, specifically for a pure guile library, good one
<stis>Hey guilers!
<a_v_p>Hello stis
<sneek>a_v_p, you have 1 message!
<sneek>a_v_p, daviid says: nice! this is because gtk3, window do not have an alpha channel, so you have to ask gdk to instantiate and give you sucn a window - but both clutter and gtk4, all window, have a de-facto alpha channel -
<manumanumanu>stis: tjena!
<manumanumanu>what are you up to?
<Aurora_v_kosmose>Zelphir: https://www.amazon.com/Autotools-Practioners-Autoconf-Automake-Libtool/dp/1593272065 This is a fairly good primer. Though it requires some effort to obtain.
<Aurora_v_kosmose>It also requires intent to invest the time in autotools, which you might not feel liek.
<Zelphir>Oh hey, thank you. Does this explain what is required on the make/autotools/etc. side to make everything fit for a Guix package?
<Aurora_v_kosmose>Zelphir: Unfortunately no, it's purely autotools centric.
<Aurora_v_kosmose>It'd give you a pretty good idea of how the tools work together and how to get the result you'd want.
<Zelphir>Ah right, M4 was another thing in that area of expertise.
<Zelphir>So many things I do not have a firm grasp of ^^'
<daviid>Zelphir: https://www.lrde.epita.fr/~adl/autotools.html
<daviid>we may help you of course, just start by copyiong the files from one of our projects, then ... note that you dongcarl 1t need autotool to package for guix, and pure guile project (no C code/libdependencies), you should may be start usig guile-hall
<Zelphir>Right, hall was also a thing.
<daviid> https://www.erikedrosa.com/2017/10/29/guile-projects-with-autotools.html
<daviid>Zelphir: where is the source code of your project?
<Zelphir>Thank you people for all the pointers! I think part of the problem before for me was also, that different projects seem to do things differently and I don't know, which way to go, while not knowing the tools well either. (Never used guile-hall for a project yet, seemed intimidating, not yet looked into autotools, at least somewhat looked into GNU Make).
<Zelphir>The guile-projects-with-autotools link looks interesting.
<daviid>Zelphir: yes, a good start, it lacks the set-up for the tests and the doc, but you may add those later
<Zelphir>I found Make quite useful already even at the job as a partial replacement for docker-compose, which I usually want to avoid and replacement for the poor thing that are npm scripts in package.json. Things like that. And this directed acyclic graph structure comes up quite often.
<daviid>Zelphir: I would not 'just' use make, but ...
<Zelphir>Lets see how it looks when I get through that tutorial. I like to keep things minimalistic. Not too many tools to rely on etc.
<Zelphir>Perhaps I'll then be an autotools enthusiast :D
<daviid>Zelphir: I would read the above guile-projects-with-autotools, then copy the config files from one of our projects, like haunt (test-suite uses srfi-64), g-golf (test-suite uses guile-lib unit-test) ... clean and adapt those to your own projects of course, push and publish, so we can look at it and help ...
<Zelphir>Have used SRFI-64 before and that is the testing lib I am most familiar with, so haunt then seems like a good point to start with.
<daviid>Zelphir: perfect
<daviid>Aurora_v_kosmose, str1ngs - Nomad has been added to the guile-software list
<dongcarl>daviid: That Autotools Tutorial you linked is a work of art
<daviid>dongcarl: yes, I agree
***lfam_ is now known as lfam
<Zelphir>Bye for now and thanks again!