IRC channel logs

2023-02-03.log

back to list of logs

<lechner>rekado / thanks!
<lechner>Hi, what is the right way to select the XPath "//head/title", please? http://paste.debian.net/1269525
<mfiano>lloda: Can you tell me about the status of newra? I'm mostly curious if it has been proposed as a replacement in Guile proper yet, or if that is even its intention, and how much work would be left to kick that process off?
<mwette>sxpath takes symbols not strings
<mwette>in that context
<lechner>mwette / thanks! although with filter that now gives an empty list
<lechner>and if i do '(html head title) I get the whole page
<lechner>nvm, i figured it out
<lechner>thanks, everyone for your help!
<lloda>hi mfiano, thx for your interest
<lloda>yeah replacing Guile's array library is the goal, bc I thought that was limited by being in C
<lloda>i'm not sure that's really true, but it seems easier to do most things Scheme side and go to C for specific ops, instead of rooting the whole thing in C
<lloda>because the array library is for Scheme. It has no value on the C side, where you can use any C array library, there are tons of those
<lloda>status is more or less described in the readme. Functionally, newra already gives you a lot more than Guile's array library, but that's not saying a lot, bc Guile's array library is the bare minimum, you get the types and little else
<lloda>some stuff is a bit slower in newra than native and i think that would need to be fixed. Like basic ra-ref is slower than array-ref, and i got into a mess of macros and inlining trying to fix that and mostly failed. I think someone who can actually program should be able to do it
<lloda>the main thing that needs to fixing tho is the compiler doesn't support the literals. So you have to do (list->ra ...) just to test stuff which is annoying. Of course if you replace Guile's library you can just reuse their literal syntax, but to test it side by side you need a different one
<chrislck>re: nan, "not a number".
<chrislck>try: (number? (nan))
<chrislck>lol
<chrislck>ACTION easily amused
<lloda>mfiano: to answer your question, newra needs to be stable before it is considered for inclusion in Guile, and that isn't close
<lloda>but last time i worked on it i was trying stuff in different directions rather than working with just that goal in mind
<lloda>i do a bunch of things there that i don't know if they're right or not
<mfiano>lloda: Thanks for that detailed response, but I disagree with "someone who can actually program".
<mfiano>You're doing awesome work
<lloda>aw
<stis>allaå allå guilers!
<sneek>wb dsmith :D
<dsmith>sneek, botsnack
<sneek>:)
<dsmith>Oi! Work inet is down most all the time. But I could see the logs. So many things I wanted to comment on! Very frustrating.
<dsmith>Oh well.
<dsmith>!uptime
<sneek>I've been running for one month and 1 day
<sneek>This system has been up 14 weeks, 2 days, 12 hours, 6 minutes
<mirai>for SRFIs that include a reference implementation, is it acceptable to just place a copy of them in guile's sources?
<mirai>equivalently, what would it take to have SRFI-233 support in guile?
<lloda>you have to fix the makefiles so that it gets installed, say something in the doc, maybe a test
<lloda>make a patch with all that and get it approved
<cow_2001>i've created my first loopy loop! a cons whose cdr points to itself! B€
<cow_2001>when i tell it to display it does not go into an infinite loop :\
<cwebber>Guess what? The Spritely Institute has launched a Guile->WebAssembly compilation project! https://spritely.institute/news/guile-on-web-assembly-project-underway.html
<cwebber>And... we're hiring... https://spritely.institute/jobs/compiler-engineer.html
<cow_2001>HURRAH!
<cow_2001>if only i knew what i were doing
<drakonis>oh, compiler engineer, eh?
<drakonis>is wingo getting hired for this?
<cow_2001>it's usa only. alas.
<cwebber>there's another announcement to come of who the external contractor is, but what I will say is that we are working with some kind of european contractor who's an expert in webassembly and guile both ;)
<cwebber>so you might infer something from that :)
<old>USA only :-(
<old>Could not extend it to Canada?
<drakonis>yes...
<drakonis>v. nice.
<ArneBab>mirai: AFAIK usually yes — but do look at the license: only LGPLv3 or later-compatible code can be included
<lechner>Hi, where may I read up on "and=>" please? I am familiar with continuation passing style from other languages. Thanks!
<mirai>lechner: higher order functions
<mirai>ArneBab: what about MIT?
<mirai>ah, I missed the __compatible__ part
<mirai>misread it as GPL family licenses only
<lechner>Hi, unfortunately and=> only takes one 'proc' argument. is there a style that avoids excessive indentation?
<lechner>mirai / thanks! also, thanks for the nm-wait thingy for NFS. it works great!
<rendar>can we say that guile is a complete scheme implementation based on standard scheme?
<mirai>lechner: yw
<rendar>so that guile *is* scheme
<singpolyma>Guile is a multilingual VM with two lisp frontends one of which is scheme ;)
<lechner>is scheme standardized?
<singpolyma>Yes
<rendar>singpolyma, and the other one is...?
<singpolyma>elisp
<lechner>Hi, what is the right way to implement multi-level CPS, please? (srfi srfi-1)
<mirai>CPS?
<lechner>wow, paste.debian.net not known.
<lechner>continuation passing style
<rendar>so, guile is a VM which implements a scheme implementation (among other langs) which is called *also* guile?
<lechner>how can i apply and=> successively here, please? https://www.pastery.net/qwuwyn/
<mirai>rendar: Guile Scheme
<rendar>i see
<rendar>so.. why Guile VM exists? what kind of problem it tries to solve, that (for instance) java VM can't?
<mirai>lechner: use compose on that gigantic centipede of functions
<mirai>you can use cadr since its car ° cdr
<lechner>i think i need cdr * car though
<dthompson>rendar: lots of language implementations have their own VM instead of using some other VM. guile's is built specifically for guile's needs, which are different than java.
<mirai>lechner: cdar
<dthompson>the guile vm boots way faster than java's.
<rendar>dthompson, i see.. what are specifically Guile needs?
<rendar>is it been thought to be a Lisp-like langs VM by the ground up?
<dthompson>rendar: here's one small example. lots of guile users write executable scripts with it. you'd expect a script to start up quickly and use little memory, so a vm with a slow startup time and large initial heap size wouldn't be a good fit.
<dthompson>there's lots of architecture decisions that are made based on what is needed to efficiently run Scheme programs and support the use cases of Guile's community.
<dthompson>I can't speak in any great detail because I don't do that work. I'm but a mere user (most of the time) :)
<dthompson>I recommend checking out some of Andy Wingo's past FOSDEM talks where he talks about the compiler and VM and the design decisions taken.
<mfiano>spoiler alert: they are absolutely fantastic talks
<rendar>that's very interesting
<mfiano>(at least the 2 I've seen)
<lechner>mirai / is 'compose' really the same as nested 'and=>'s, which would abort on #f?
<rendar>so, since Guile is a small footprint VM, i guess it's also very memory savvy, and little to install?
<mirai>lechner: no but what you're doing isn't going to work
<lechner>rendar / in 2016, it was at least 2.15 MB https://youtu.be/uwiaT3MoDVs?t=816
<dthompson>rendar: relatively speaking. guile's not the smallest and it's not nearly the largest.
<dthompson>my point is that it makes sense for language implementations to have their own VM for their own needs. lots of language implemenations do this.
<dthompson>some don't. Clojure runs on the JVM which has its pros and cons.
<cow_2001>i love how https://youtu.be/yedzRWhi-9E?t=1h00m31s he shakes his head
<dthompson>cow_2001: "I'm done with these damn parentheses"
<cow_2001>"Well, thank you. It's time for lunch."
<lechner>Hi, I operate an IRC bot elsewhere that scans hyperlinks for their HTML titles. i should probably check the MIME type, but my even bigger concern is a server crash due to someone posting an ISO. Can SXML deal with partial HTML? https://codeberg.org/lechner/guix-helper-bot/src/commit/383281d76029a8e09350ce2bb5848bacad7f558a/scm/scan/generic-urls.scm#L36-L46
<dthompson>lechner: I would use htmlprag from guile-lib for non-strict parsing.
<lechner>dthompson / am i not?
<dthompson>lechner: oh sorry I didn't read the code. ignore me!
<lechner>dthompson / not so fast, please! can i do a partial HTML get?
<dthompson>lechner: I haven't actually kicked the tires on htmlprag to see how well it does with incomplete html documents
<dthompson>you may need to do a little experimentation of your own and see what you find
<lechner>dthompson / thanks!
<ArneBab>rendar: Guile is an implementation that supports the Scheme standard. It is pretty efficient but not theh fastest, it has a lot of tools but not the most bells and whistles, it gives a lot of possibilities while staying practical, it has nicely low startup time, and it has pretty good unix support.
<mwette>Have you folks heard of the "nom" parser for bytestreams in Rust, which is based on combinators.
<lechner>mwette / yes, a little bit. i think it was inspired by parsec
<lechner>cwebber / Hi, what was that Scheme-based data exchange format that you contributed to (or maybe even invented) some time ago, please?
<jackhill>rendar: You also might get a feel for what Guile is about in comparison to other schemes. Since you mentioned the JVM, you might check out Kawa scheme. As for why are there other language implementations for the Guile VM? Why not? Scheme is a good tool for language creation, and the community has a rich history. :)
<jackhill>Hi Guilers! What's my best bet for interacting with C++ libraries? Go through a C compat layer?
<dthompson>jackhill: that's the only way I know of. maybe someone else knows more.
<jackhill>dthompson: thanks
<jackhill>An excuse to learn more about C++ I suppose
<cwebber>lechner: syrup I think? :)
<cwebber> https://github.com/ocapn/syrup has the intro
<cwebber>s
<cwebber>oops
<cwebber> https://gitlab.com/spritely/guile-goblins/-/blob/main/goblins/contrib/syrup.scm
<cwebber>has the implementation
<cwebber>and one more correct than the one it links to (oops)
<cwebber>been meaning to separate it out again
<cwebber>it was bundled in a hurry
<cwebber>guile-syrup would be a nice package to get up there tho
<cwebber>it's really an encoding of https://preserves.gitlab.io/preserves/
<lilyp>jackhill: there's schmutz IIRC
<jackhill>lilyp: cool, thanks, I'll check it out
<lilyp> https://github.com/arximboldi/schmutz
<jackhill>thanks. Ah, I see it also made an appearance on guile-user https://lists.gnu.org/archive/html/guile-user/2017-07/msg00095.html :)