IRC channel logs

2020-05-09.log

back to list of logs

***jonsger1 is now known as jonsger
***jonsger1 is now known as jonsger
<dsmith>sneek: later tell wingo Your .dir-locals.el is unbalanced
<sneek>Got it.
<tohoyn>guile 3.0 documentation says that Tree-IL form fix is only for unset lambda expressions. what does "unset" mean here?
<rndd>hi everyone! i'm trying to compile example from https://www.gnu.org/software/guile/manual/guile.html#Guile-Initialization-Functions section 5.2.2 "A Sample Guile Main Program" on guix but pkg-config gives me an error "fatal error: libguile.h: No such file or directory". does anyone know how to fix it?
<mwette>rndd: I'm not sure how your environment is set up on guix. Maybe if you do $ PKG_CONFIG_PATH=$HOME/.guix-profile/lib/pkgconfig:$PKG_CONFIG_PATH pkg-config --cflags guile-3.0
<rndd>mwette: thank you for the answer! i think my question is not proper for this room. this is a guixsd specific question. after all, i specified specifications manifest where i declared guile, but nothing -_-
<tohoyn>I get plenty of warnings "imported module (rnrs) overrides core binding xxx". is there a way to get rid of them?
<tohoyn>I use guile 3.0
<dustyweb>helo
<tohoyn>I'm using guile 3.0 as a target platform for Theme-D and those messages are really annoying.
<mwette>tohoyn: I hate those. Read the section of the manual Modules. You can use (use-modules ((rnrs xxx) #:select (foo bar))) or #:renamer -- something like that.
<tohoyn>mwette: should guile have a compiler option to suppress those warnings?
<tohoyn>mwette: I mean a command line option
<mwette>i dont know. i try to use the specifiers
<tohoyn>mwette: do you use #:select so that you don't import bindings that would override core bindings?
<tohoyn>mwette: the #:duplicate keyword might help
<tohoyn>mwette #:duplicates (replace last) works
***Aurora_iz_kosmos is now known as Aurora_v_kosmose
<andswitch>is there a specific category of programs in which Guile really shines coding wise?
<catonano>andswitch: this question is a bit vague. Guile is a scheme, it shines at everything scheme shines at
<catonano>andswitch: there's a category where it also shines, if not coding wise. Substituting bash scripts ans integrating such "scripts" with APIs provided by C libraries. Coding wise it could be a bit ugly but it's a use case that is covered really strongly
<catonano>andswitch: are you satisfed with my remarks ?
<andswitch>sure :) do you happen to an example of such a substitution?
<andswitch>sounds interesting
<catonano>andswitch: no, sorry I have no such example at hand 😐️
<andswitch>that's ok, thanks nonetheless
<catonano>andswitch: there's a Guile library for piloting git. You can check out repos, creating branches, maybe even creating patches
<catonano>andswitch: it wraps an API provided by a C based library
<catonano>that could be a partial example
<andswitch> https://gitlab.com/guile-git/guile-git ?
<catonano>andswitch: yes, that one
<andswitch>so in a sense you have the C functions available in REPL now
<catonano>exaclty. In the REPL you can call schme functions but in reality those functions are wrapping C functions
<andswitch>nice
<mwette>catonano: check https://www.nongnu.org/nyacc/, click on the FFI Helper page, the FFI Helper takes .h files and generates .scm files that use the GUile FFI API
<catonano>mwette: thank you ! Yes I know ! I was thinking of some bash script that was substituted by a Guile script but I couldn't come up with any
<andswitch>mwette: you culd try this on the kernel API
<mwette>Not sure what you mean about the kernel API.
<mwette>Do you mean libguile?
<andswitch>if i understand correctly, the linux kernel has an API for user-space programs to access kernel services. If you can create bindings for the whole kernel API, you can write all of user-space in Guile :D
<andswitch>probably i don't understand it correctly though
<mwette>OK. I was not familiar. When I look it up, it just mentions libc etc. I have used the FFI Helper to provide interfaces to dbus, epoll, glib, gtk+-2, etc. In the distro there is an examples directory with, well, examples.
<andswitch>that's a long list of libraries :) looks good
<mwette>A working demo gtk app is shown here: https://paste.debian.net/1145864/. The comments on lines 22-24 indicate the number of lines in the ".ffi" file and then autogenerated ".scm" file.
<andswitch>cool
<BlackMug>hello there
<BlackMug>is there comparison between guile and rust? or guile and rust and C?
*guix-vits "i'm so used to 'a = 4; b = a; // changing b will not change a.'"
<justin_smith>andswitch: maybe you mean system calls? when I used fortran it was a fun exercise to interact with the kernel via syscall invocations directly, skipping libc
<justin_smith>I'm not sure if guile has the kind of control you need to be able to operate at that level
<justin_smith>s/fortran/forth/ I'm tired
<dsmith>Ahh Forth!
<andswitch>justin_smith: don't know if that's the technical term, maybe. But if it's all C, I imagine a system call is just a function call?
<justin_smith>andswitch: it typically is, but there's an underlying implementation, IIRC it involves putting a magic number on the stack and then making a call to the syscall address
<justin_smith>which is kind of like a function call but much lower level
<justin_smith>the trick was that forth could do this directly, without the c machinery in between
<andswitch>i see
<pinoaffe> https://gitlab.com/pinoaffe/guile-words I implemented a couple of word / string / list utilities, such as (approximately) counting english syllables and calculating levenshtein distance, does anyone wanna take a look at my code?
<andswitch>i'm not familiar with that kind of communication