Skip to content

Commit 3afabe0

Browse files
committed
Include (srfi 223). Finalize release 2.0.1.
1 parent d42a7e2 commit 3afabe0

File tree

10 files changed

+287
-8
lines changed

10 files changed

+287
-8
lines changed

CHANGELOG.md

+10
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# Changelog
22

3+
## 2.0.1 (2021-07-02)
4+
5+
- New procedures in library `(lispkit draw)`: `bitmap->bytevector`, `bitmap-blur`, `bitmap-crop`
6+
- Support tables and definition lists in library `(lispkit markdown)`
7+
- Support gzip and zlib container formats for deflate compression via library `(lispkit bytevector)`
8+
- Support symlink resolution via procedure `file-path` of library `(lispkit system)`
9+
- Bug fixes in library `(lispkit system)`: `home-directory` also supports a non-sandboxed mode, `file-path` handles tilde correctly
10+
- Bug fixes for a few procedures of library `(lispkit archive zip)`
11+
- Included new libraries: `(srfi 219)`, `(srfi 221)`, `(srfi 223)`
12+
313
## 2.0.0 (2021-05-01)
414

515
- Support for iOS

LispKit.xcodeproj/project.pbxproj

+16-4
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@
6666
CC0E57BF268BB8A100693DD2 /* SRFI-221.scm in Copy tests */ = {isa = PBXBuildFile; fileRef = CC0E57BD268BB80D00693DD2 /* SRFI-221.scm */; };
6767
CC0E57C0268BB8BE00693DD2 /* 221.sld in Copy pre-installed SRFI libraries */ = {isa = PBXBuildFile; fileRef = CC0E57BC268BB7C900693DD2 /* 221.sld */; };
6868
CC0E57C1268BB8D100693DD2 /* SRFI-221.scm in Copy tests */ = {isa = PBXBuildFile; fileRef = CC0E57BD268BB80D00693DD2 /* SRFI-221.scm */; };
69+
CC0E57C4268FAAC100693DD2 /* 223.sld in Copy pre-installed SRFI libraries */ = {isa = PBXBuildFile; fileRef = CC0E57C2268FAA4200693DD2 /* 223.sld */; };
70+
CC0E57C5268FAAD400693DD2 /* SRFI-223.scm in Copy tests */ = {isa = PBXBuildFile; fileRef = CC0E57C3268FAA7800693DD2 /* SRFI-223.scm */; };
71+
CC0E57C6268FAAE800693DD2 /* 223.sld in Copy pre-installed SRFI libraries */ = {isa = PBXBuildFile; fileRef = CC0E57C2268FAA4200693DD2 /* 223.sld */; };
72+
CC0E57C7268FAAFB00693DD2 /* SRFI-223.scm in Copy tests */ = {isa = PBXBuildFile; fileRef = CC0E57C3268FAA7800693DD2 /* SRFI-223.scm */; };
6973
CC0EBFF91ED37FB7004510B2 /* Math.scm in Copy examples */ = {isa = PBXBuildFile; fileRef = CC0EBFF81ED37A76004510B2 /* Math.scm */; };
7074
CC10404D1F53789D0045144A /* pdf.sld in Copy pre-installed LispKit libraries */ = {isa = PBXBuildFile; fileRef = CC10404C1F5378660045144A /* pdf.sld */; };
7175
CC1227391CBFE74500821EB7 /* main.swift in Sources */ = {isa = PBXBuildFile; fileRef = CC1227381CBFE74500821EB7 /* main.swift */; };
@@ -967,6 +971,7 @@
967971
dstPath = Root/LispKit/Tests;
968972
dstSubfolderSpec = 7;
969973
files = (
974+
CC0E57C5268FAAD400693DD2 /* SRFI-223.scm in Copy tests */,
970975
CC0E57BF268BB8A100693DD2 /* SRFI-221.scm in Copy tests */,
971976
CC879888264D49CC006950A7 /* SRFI-219.scm in Copy tests */,
972977
CCD5E566262E348100C45EA0 /* SRFI-189.scm in Copy tests */,
@@ -1428,6 +1433,7 @@
14281433
dstPath = Root/LispKit/Libraries/srfi;
14291434
dstSubfolderSpec = 7;
14301435
files = (
1436+
CC0E57C4268FAAC100693DD2 /* 223.sld in Copy pre-installed SRFI libraries */,
14311437
CC0E57BE268BB88700693DD2 /* 221.sld in Copy pre-installed SRFI libraries */,
14321438
CC879887264D49B0006950A7 /* 219.sld in Copy pre-installed SRFI libraries */,
14331439
CCD5E55C262E342600C45EA0 /* 189.sld in Copy pre-installed SRFI libraries */,
@@ -1520,6 +1526,7 @@
15201526
dstPath = Root/LispKit/Libraries/srfi;
15211527
dstSubfolderSpec = 7;
15221528
files = (
1529+
CC0E57C6268FAAE800693DD2 /* 223.sld in Copy pre-installed SRFI libraries */,
15231530
CC0E57C0268BB8BE00693DD2 /* 221.sld in Copy pre-installed SRFI libraries */,
15241531
CC879889264D49E5006950A7 /* 219.sld in Copy pre-installed SRFI libraries */,
15251532
CCD5E561262E343E00C45EA0 /* 189.sld in Copy pre-installed SRFI libraries */,
@@ -1851,6 +1858,7 @@
18511858
dstPath = Root/LispKit/Tests;
18521859
dstSubfolderSpec = 7;
18531860
files = (
1861+
CC0E57C7268FAAFB00693DD2 /* SRFI-223.scm in Copy tests */,
18541862
CC0E57C1268BB8D100693DD2 /* SRFI-221.scm in Copy tests */,
18551863
CC87988A264D4A00006950A7 /* SRFI-219.scm in Copy tests */,
18561864
CCD5E56B262E34A500C45EA0 /* SRFI-189.scm in Copy tests */,
@@ -2119,6 +2127,8 @@
21192127
CC0D7B392544AF6800FB9301 /* SRFI-210.scm */ = {isa = PBXFileReference; lastKnownFileType = text; path = "SRFI-210.scm"; sourceTree = "<group>"; };
21202128
CC0E57BC268BB7C900693DD2 /* 221.sld */ = {isa = PBXFileReference; lastKnownFileType = text; path = 221.sld; sourceTree = "<group>"; };
21212129
CC0E57BD268BB80D00693DD2 /* SRFI-221.scm */ = {isa = PBXFileReference; lastKnownFileType = text; path = "SRFI-221.scm"; sourceTree = "<group>"; };
2130+
CC0E57C2268FAA4200693DD2 /* 223.sld */ = {isa = PBXFileReference; lastKnownFileType = text; path = 223.sld; sourceTree = "<group>"; };
2131+
CC0E57C3268FAA7800693DD2 /* SRFI-223.scm */ = {isa = PBXFileReference; lastKnownFileType = text; path = "SRFI-223.scm"; sourceTree = "<group>"; };
21222132
CC0EBFF81ED37A76004510B2 /* Math.scm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Math.scm; sourceTree = "<group>"; };
21232133
CC10404C1F5378660045144A /* pdf.sld */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pdf.sld; sourceTree = "<group>"; };
21242134
CC1227361CBFE74500821EB7 /* LispKitRepl.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = LispKitRepl.app; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -2659,6 +2669,7 @@
26592669
CCD5E55A262E32EE00C45EA0 /* SRFI-214.scm */,
26602670
CC879886264D48A3006950A7 /* SRFI-219.scm */,
26612671
CC0E57BD268BB80D00693DD2 /* SRFI-221.scm */,
2672+
CC0E57C3268FAA7800693DD2 /* SRFI-223.scm */,
26622673
);
26632674
path = Tests;
26642675
sourceTree = "<group>";
@@ -2977,6 +2988,7 @@
29772988
CCD5E559262E31AE00C45EA0 /* 214.sld */,
29782989
CC879885264D4739006950A7 /* 219.sld */,
29792990
CC0E57BC268BB7C900693DD2 /* 221.sld */,
2991+
CC0E57C2268FAA4200693DD2 /* 223.sld */,
29802992
);
29812993
path = srfi;
29822994
sourceTree = "<group>";
@@ -4158,7 +4170,7 @@
41584170
"@executable_path/../Frameworks",
41594171
"@loader_path/Frameworks",
41604172
);
4161-
MARKETING_VERSION = 2.0.0;
4173+
MARKETING_VERSION = 2.0.1;
41624174
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
41634175
MTL_FAST_MATH = YES;
41644176
PRODUCT_BUNDLE_IDENTIFIER = net.objecthub.LispKitTools;
@@ -4194,7 +4206,7 @@
41944206
"@executable_path/../Frameworks",
41954207
"@loader_path/Frameworks",
41964208
);
4197-
MARKETING_VERSION = 2.0.0;
4209+
MARKETING_VERSION = 2.0.1;
41984210
MTL_FAST_MATH = YES;
41994211
PRODUCT_BUNDLE_IDENTIFIER = net.objecthub.LispKitTools;
42004212
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
@@ -4440,7 +4452,7 @@
44404452
"@executable_path/Frameworks",
44414453
"@loader_path/Frameworks",
44424454
);
4443-
MARKETING_VERSION = 2.0.0;
4455+
MARKETING_VERSION = 2.0.1;
44444456
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
44454457
MTL_FAST_MATH = YES;
44464458
PRODUCT_BUNDLE_IDENTIFIER = net.objecthub.LispKit;
@@ -4480,7 +4492,7 @@
44804492
"@executable_path/Frameworks",
44814493
"@loader_path/Frameworks",
44824494
);
4483-
MARKETING_VERSION = 2.0.0;
4495+
MARKETING_VERSION = 2.0.1;
44844496
MTL_FAST_MATH = YES;
44854497
PRODUCT_BUNDLE_IDENTIFIER = net.objecthub.LispKit;
44864498
PRODUCT_NAME = LispKit;

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,8 @@ framework:
205205
- [SRFI 214: Flexvectors](https://srfi.schemers.org/srfi-214/srfi-214.html)
206206
- [SRFI 219: Define higher-order lambda](https://srfi.schemers.org/srfi-219/srfi-219.html)
207207
- [SRFI 221: Generator/accumulator sub-library](https://srfi.schemers.org/srfi-221/srfi-221.html)
208-
208+
- [SRFI 223: Generalized binary search procedures](https://srfi.schemers.org/srfi-223/srfi-223.html)
209+
209210

210211
## Project
211212

Sources/LispKit/Info.plist

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<key>CFBundlePackageType</key>
1818
<string>FMWK</string>
1919
<key>CFBundleShortVersionString</key>
20-
<string>2.0.0</string>
20+
<string>2.0.1</string>
2121
<key>CFBundleSignature</key>
2222
<string>????</string>
2323
<key>CFBundleVersion</key>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
;;; SRFI 223
2+
;;; Generalized binary search procedures
3+
;;;
4+
;;; Generalized procedures for binary search of vector-like data structures are provided
5+
;;; which can be applied to any sequence type, including ones defined by the user,
6+
;;; together with applications of these procedures for Scheme’s built-in vector and
7+
;;; bytevector types.
8+
;;;
9+
;;; Copyright © 2021 Daphne Preston-Kendal. All rights reserved.
10+
;;;
11+
;;; Permission is hereby granted, free of charge, to any person obtaining a copy of this
12+
;;; software and associated documentation files (the "Software"), to deal in the Software
13+
;;; without restriction, including without limitation the rights to use, copy, modify, merge,
14+
;;; publish, distribute, sublicense, and/or sell copies of the Software, and to permit
15+
;;; persons to whom the Software is furnished to do so, subject to the following conditions:
16+
;;;
17+
;;; The above copyright notice and this permission notice shall be included in all copies or
18+
;;; substantial portions of the Software.
19+
;;;
20+
;;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
21+
;;; INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
22+
;;; PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
23+
;;; FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
24+
;;; OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
25+
;;; DEALINGS IN THE SOFTWARE.
26+
;;;
27+
;;; Adaptation to LispKit
28+
;;; Copyright © 2021 Matthias Zenger. All rights reserved.
29+
30+
(define-library (srfi 223)
31+
32+
(export bisection
33+
bisect-left
34+
bisect-right
35+
vector-bisect-left
36+
vector-bisect-right)
37+
38+
(import (lispkit base))
39+
40+
(begin
41+
42+
(define (bisect-left a val ref less? lo hi)
43+
(if (>= lo hi) lo
44+
(let ((mid (floor-quotient (+ lo hi) 2)))
45+
(if (less? (ref a mid) val)
46+
(bisect-left a val ref less? (+ mid 1) hi)
47+
(bisect-left a val ref less? lo mid)))))
48+
49+
(define (bisect-right a val ref less? lo hi)
50+
(if (>= lo hi) lo
51+
(let ((mid (floor-quotient (+ lo hi) 2)))
52+
(if (less? val (ref a mid))
53+
(bisect-right a val ref less? lo mid)
54+
(bisect-right a val ref less? (+ mid 1) hi)))))
55+
56+
(define bisection
57+
(case-lambda
58+
((ref lo-hi-proc)
59+
(values
60+
(case-lambda
61+
((a val less?)
62+
(let-values (((lo hi) (lo-hi-proc a)))
63+
(bisect-left a val ref less? lo hi)))
64+
((a val less? lo hi)
65+
(bisect-left a val ref less? lo hi)))
66+
(case-lambda
67+
((a val less?)
68+
(let-values (((lo hi) (lo-hi-proc a)))
69+
(bisect-right a val ref less? lo hi)))
70+
((a val less? lo hi)
71+
(bisect-right a val ref less? lo hi)))))
72+
((ref)
73+
(bisection ref
74+
(lambda (a)
75+
(error "both lo and hi arguments must be given to this procedure"))))))
76+
77+
(define-values (vector-bisect-left vector-bisect-right)
78+
(bisection vector-ref (lambda (v) (values 0 (vector-length v)))))
79+
)
80+
)

Sources/LispKit/Resources/Tests/All.scm

+1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
(load "Tests/SRFI-214")
4444
(load "Tests/SRFI-219")
4545
(load "Tests/SRFI-221")
46+
(load "Tests/SRFI-223")
4647

4748
(test-end)
4849

Sources/LispKit/Resources/Tests/Import.scm

+1
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@
143143
(import (srfi 214))
144144
(import (srfi 219))
145145
(import (srfi 221))
146+
(import (srfi 223))
146147

147148
; this needs to be last
148149
(import (srfi 101))

0 commit comments

Comments
 (0)