IRC channel logs

2021-04-17.log

back to list of logs

<brendyyn>guile -c '(expt 2 999999999999999999)' segfaults and crashes guile for me.
<brendyyn>Would have thought it would just tried for ages or error somehow at least if its too big
***brown is now known as Guest50215
***apteryx is now known as Guest86193
***apteryx_ is now known as apteryx
<cybersyn>hiya guilers, i've been programming in racket for about a year, and started using guix in the fall, and through this realized I prefer guile, due to the built in ,apropos documentation, as well as the realization that the many amazing languages in racket tend to be different enough that they don't associate well with others. tons of great stuff there, but guix has become more important for me. so now its time to properly learn guile!
<cybersyn>(until now I've mostly figured it out as I go along).
<cybersyn>any suggested guile roadmap?
<cybersyn>also, while i did a first "tourist" pass of SICP over a couple months last year, i've started working more seriously on it and lockywolf's wonderful study of it has inspired me to get more focused. has anyone added implemented srfi-216 in guile?
<lampilelo>cybersyn: the one thing i would suggest is reading guile's info manual if you haven't done it already
<cybersyn>i've read up to the section with C, but after that it seems to take on a more reference manual form. i'm wondering if there is anything that gives more of tour of the culture (interesting ways people customize their .guile, and stuff like this), the ecosystem, things to be weary of, and the like
<leoprikler>sneek, later tell brendyyn the hard limit seems to be (expt 2 (expt 2 28)) and likely has to do with the amount of continuous memory you'd need to allocate for that
<sneek>Will do.
<zzappie>hey guilers!
<zzappie>Anyone has a link to a completed guile beginner tutorial?
<zzappie>want to share with my friend but only found half completed tutorials
<leoprikler>What would that look like (as opposed to a crash course on Scheme)?
<zzappie>leoprikler: which crashcourse you are refering to?
<leoprikler>for instance Guix' crash course on Scheme
<leoprikler>which you can find in the cookbook iirc
<zzappie>ah forgot about that one!
<leoprikler>Is that me or does the language reference for elisp choke on keywords?
<leoprikler>s/reference/spec
<nckx>dsmith-work: People are clamouring for sneek! Just in case you were unaware and not at w--oh.
***brown is now known as Guest53609
<leoprikler>Is it possible to use Guile syntax transformers from Elisp?
<rlb>wingo: thanks regarding the general priorities.
***leoprikler_ is now known as leoprikler
<manumanumanu>I'm running the r7rs benchmarks just to compare 3.0.1 and 3.0.5. What happened with the tak benchmarks? :P
<manumanumanu>2x-2.5x faster
<manumanumanu>ah what times to be alive!
<manumanumanu>let me try that again: what a time to be alive!
<manumanumanu>never mind. benchmarking is hard. Still faster, but nothing that dramatic.
<lampilelo>now let's implement io_uring interface for guile to have even faster io!
<mwette>here is the nyacc .ffi file for liburing: https://paste.debian.net/1194100/
<lampilelo>i mean in the core as a backend for ports
<lampilelo>mwette: that's the first time i hear of nyacc
<civodul>mwette: impressive, again!
<manumanumanu>mwette: what is going on there?
<lampilelo>so it's a lalr(1) parser with a c parser implementation and a helper for generating bindings from c to guile?
<manumanumanu>nyacc is a lot more than that :) But that is indeed what seems to be going on.
<lampilelo>or is it a wrapper around bison?
<mwette>The ffi-helper will read include files and generate guile code using the guile's ffi front end and guile bytestructures. It's sort of a "get me started" approach to working with C libraries.
<mwette>Within nyacc, one generated the file posted and then executes "guild compile-ffi ffi/liburing.ffi". That generates a guile .scm file, 926 lines in this case.
<mwette>see output here: https://paste.debian.net/1194105/
<lampilelo>nice, is it stable?
<lampilelo>ah, it's 5 years old already
<mwette>nyacc is lalr written in scheme from ground up, based on algorithms in the dragon book
<mwette>It uses a C parser (which parses comments, too) and then expands typedefs as necessary to provide SXML representations of the C declarations. Once that is done it converts the declarations to ffi interface code.
<mwette>The ffi-helper supports "use-ffi-module". For example, (ffi gobject) uses (ffi glib), ... and (ffi gtk+) uses (ffi gobject) (ffi pango) (ffi gdk) ...
<lampilelo>now i wonder how does it compare with swig
<lampilelo>afaik swig generates c code, doesn't use guile's dynamic ffi
<mwette>I think so. But I don't know how much work you have to put into a config file for swig.
<mwette>Oh. It looks like the ffi-helper failed on converting unions altogether. Not gonna work for liburing right now.
<mwette>The anonymous unions at least.
<lampilelo>try parsing c++ next :D
<mwette>haha. Not with a lalr parser.
<leoprikler>Do a peg parser then :P
<mwette>thought of it
<mwette>I have also thought of converting lalr to use CPS for parse and lex functions.