Contracts macro example

2022-07-14 Thread Zelphir Kaltstahl
Hello Guile users! I've tried myself again at writing some macros. Some post about programming language features inspired me to try and write a macro, which adds contracts (or my naive idea of what they are) to function definitions. The code is at: https://notabug.org/ZelphirKaltstahl/guile-

UTF16 encoding adds BOM everywhere?

2022-07-14 Thread Jean Abou Samra
Hi, With this code: (let ((p (open-output-file "x.txt")))   (set-port-encoding! p "UTF16")   (display "ABC" p)   (close-port p)) the sequence of bytes in the output file x.txt is ['FF', 'FE', '41', '0', 'FF', 'FE', '42', '0', 'FF', 'FE', '43', '0'] FFE is a little-endian Byte Order Mark (BOM)

Using guile (running on a port) in Org Mode

2022-07-14 Thread Munyoki Kilyungi
Hi Guilers! Recently I worked out a way to point an org src block to any python environment I want: . WRT to scheme code, is there a way to tell a scheme source block to run a guile interpreter that runs on a given p