Re: FFI questions

2020-05-17 Thread Jan Synacek
On Fri, May 15, 2020 at 10:09 PM Taylan Kammer wrote: > > On 15.05.2020 15:47, Jan Synacek wrote: > > Hello, > > > > Currently I have something like this: > > > > (define libxcb (dynamic-link "libxcb")) > > > > ... > > > &

FFI questions

2020-05-15 Thread Jan Synacek
checked how guile-xcb does it and it seems to be building hash tables with field names as keys. But that basically requires me to "redefine" all the C structs that I would be interested in at the Scheme level. Regards, -- Jan Synacek Software Engineer, Red Hat

Re: Incomplete backtrace

2020-03-11 Thread Jan Synacek
On Wed, Mar 11, 2020 at 7:07 PM Jan Synacek wrote: > Hello, > > consider the following piece of code: > > $ cat test.scm > (use-modules (ice-9 regex)) > > (define (change text) > (regexp-substitute #f (string-match "string" text) > 'pre > &q

Incomplete backtrace

2020-03-11 Thread Jan Synacek
acktrace actually doesn't even point in the right place, it's quite useless in my opinion. Am I doing anything wrong? I use guile 3.0.1. Regards, -- Jan Synacek Software Engineer, Red Hat

How to effectively insert into string?

2020-03-09 Thread Jan Synacek
to process the file and add "Patch0004...\nPatch0005..." after the Patch0003 line, then save the file. What is the best way to do this in guile? Is it better to read the entire file and then use something like regexp-substitute or is there a better way? Thank you, -- Jan Synacek Software Eng