Releases: LiiiLabs/goldfish
v17.11.3
> bin/goldfish --version
Goldfish Scheme 17.11.3 by LiiiLabs
based on S7 Scheme 11.2 (30-Dec-2024)
Goldfish Scheme v17.11.3, the community version of Liii Scheme, will be integrated into the next beta release of Liii STEM. It will be used to connect with DeepSeek, facilitating structured STEM communication between users and large models. Additionally, Goldfish Scheme v17.11.3 will be included in the community edition of Liii STEM, the Mogan STEM Suite v1.2.9.9.
New Contributors
- Yancheng Li
- Xinyi Yu
- Renkai Ge
- Qingyu Chen
Significant Changes
- Case classes have been largely refined, with
%
indicating instance methods and@
indicating static methods. - Instance methods of the
rich-string
case class (such as higher-order functionsmap
andfor-each
) now supportrich-char
parameters with Unicode support. - The
rich-string
case class has added a commonly used function:split
.
Example Code
(((box "2025/02/05/上午/11点") :split "/")
:make-string ":")
; => "2025:02:05:上午:11点"
box
converts the string"2025/02/05/上午/11点"
into arich-string
case class.- Using the
:split
instance method ofrich-string
, the string is split into arich-vector
of length 5. - Using the
:make-string
instance method ofrich-vector
, the delimiter is changed from/
to:
.
Goldfish Scheme v17.11.2
> bin/goldfish --version
Goldfish Scheme 17.11.2 by LiiiLabs
based on S7 Scheme 11.2 (30-Dec-2024)
Goldfish Scheme v17.11.2 will be built-in in Mogan STEM Suite v1.2.9.9.
New Modules (liii lang)
The module improves the usability of Goldfish Scheme significantly
- Functional Data Pipeline like Scala collection or Java Stream API
- Unicode support by
case-string
andcase-char
Demo Code for Unicode support
((box "你好,世界") 0) ; => 你
((box "你好,世界") 4) ; => 界
((box "你好,世界") :length) ; => 5
Demo code for functional data pipelines
((box (list 1 2 3 4 5))
:map (lambda (x) (* x x))
:filter even?
:collect) ; => (list 4 16)
((box (vector 1 2 3 4 5))
:map (lambda (x) (* x x))
:filter even?
:collect) ; => (vector 4 16)
Improved define-case-class
define-case-class
is the Scala case class alternative in Goldfish Scheme. For Goldfish Scheme v17.11.2, the only missing feature for define-case-class
is that generating hash-code method automatically.
(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!"
Goldfish Scheme v17.11.1
> 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
Goldfish Scheme v17.11.0
> bin/goldfish --version
Goldfish Scheme 17.11.0 by LiiiLabs
based on S7 Scheme 11.2 (22-Nov-2024)
S7 Scheme has been upgraded to 11.x
,as a result, the Goldfish Scheme version bumped from 17.10.x
to 17.11.x
.
New Modules
(liii argparse)
(liii alist)
New Functions
- path-getsize in
(liii path)
Goldfish Scheme v17.10.9
Goldfish Scheme 17.10.9 by LiiiLabs
based on S7 Scheme 10.12 (16-Aug-2024)
Goldfish Scheme v17.10.8
Goldfish Scheme 17.10.8 by LiiiLabs
based on S7 Scheme 10.12 (16-Aug-2024)
Goldfish Scheme v17.10.7
> bin/goldfish --version
Goldfish Scheme 17.10.7 by LiiiLabs
based on S7 Scheme 10.12 (16-Aug-2024)
You can use Goldfish Scheme v17.10.7 in Mogan STEM Suite v1.2.9.5.
v17.10.6
> bin/goldfish --version
Goldfish Scheme 17.10.6 by LiiiLabs
based on S7 Scheme 10.12 (16-Aug-2024)
Releases
Add GoldfishLiterateProgramming.pdf
for interacting with GPT services.
New Command Line options
-m
option to choose the mode of pre-defined modules.
New Functions
length=?
,length>?
,length>=?
in(liii list)
New Modules
(liii vector)
(liii comparator)
(srfi srfi-2)
:Provideand-let*
Goldfish Scheme v17.10.5
> bin/goldfish --version
Goldfish Scheme 17.10.5 by LiiiLabs
based on S7 Scheme 10.12 (16-Aug-2024)
New functions
- compose, identity in
(liii base)
- check-catch, check-true, check-false in
(liii check)
- any, every in
(srfi srfi-1)
New modules
- (liii case): Pattern Matching
- (liii hash-table), (srfi srfi-125): Hash-table
- (srfi srfi-133): Vector
- (liii stack): Stack
- (liii queue): Queue
Goldfish Scheme v17.10.4
> bin/goldfish --version
Goldfish Scheme 17.10.4 by LiiiLabs
based on S7 Scheme 10.12 (13-Aug-2024)
New functions
system
,unsetenv
in(liii os)
let1
in(liii base)