Skip to content

Goldfish Scheme v17.11.1

Compare
Choose a tag to compare
@da-liii da-liii released this 08 Jan 04:43
· 83 commits to main since this release
> bin/goldfish --version
Goldfish Scheme 17.11.1 by LiiiLabs
based on S7 Scheme 11.2 (30-Dec-2024)

New Modules

  • (liii http)
  • (liii json)

Demo code to interact with Deepseek provided by SiliconCloud API:
https://github.com/LiiiLabs/goldfish/blob/v17.11.1/http/tests/chat_demo.scm

git clone https://github.com/LiiiLabs/goldfish.git
xmake config --http=y --yes -vD
xmake b http
bin/http -l http/tests/chat_demo.scm

Important New Functions

  • typed-define in (liii base) as an enhanced define* with type check
  • define-case-class in (liii case) provides a way to define the case class (Scala) in Goldfish Scheme
(define-case-class person
  ((name string?)
   (age integer?))
  
  (define (to-string)
    (string-append "I am " name " " (number->string age) " years old!"))
  (define (greet x)
    (string-append "Hi " x ", " (to-string))))

(define bob (person "Bob" 21))

(bob 'to-string) => "I am Bob 21 years old!"
(bob 'greet "Alice") => "Hi Alice, I am Bob 21 years old!"

New Contritubors

  • Andy Yu
  • 邢思宇
  • Yifan Lu
  • Jiayi Dong