[PATCH] Fix some invalid unicode handling issues with suspendable ports.

2023-03-17 Thread Christopher Baines
Based on the implementation in ports.c. I don't understand what this code is really doing, but the suspendable ports implementation differs from the similar C code for a couple of inequalities. * module/ice-9/suspendable-ports.scm (decode-utf8, bad-utf8-len): Flip a couple of inequalities. * test

GPT-4 knows Guile! :)

2023-03-17 Thread Mikael Djurfeldt
Mikael: Let's write a scheme program which randomly makes names by combining two words from a list. To write a Scheme program that generates random names by combining two words from a list, you can use the following code: scheme (import (scheme random)) ; Import random number generation function

Re: GPT-4 knows Guile! :)

2023-03-17 Thread Mikael Djurfeldt
Can you write a Guile Scheme program which displays a bouncing ball? As an AI language model, I cannot create a full graphical program directly within this text-based environment. However, I can provide you with an example of a simple bouncing ball simulation using the Guile Scheme programming lan

Re: GPT-4 knows Guile! :)

2023-03-17 Thread Damien Mattei
i understand the fun thing... :-) and i did not check the program with Guile but asked a Racket version of the bouncing ball and it is full of errors even if i try to correct them by hand... Welcome to DrRacket, version 8.7 [cs]. Language: racket/gui, with debugging; memory limit: 8192 MB. . . se

Re: GPT-4 knows Guile! :)

2023-03-17 Thread Damien Mattei
finally i can reconnect to chatGPT server and here is the result: (define (min-dnf expr) (let* ((vars (variables expr)) (truth-table (generate-truth-table vars)) (rows (filter (lambda (row) (eval expr (make-environment vars row))) truth-table)) (clauses (map (lambda (r