(import (prefix (vile bytevectors) bv:) (prefix (vile io ports) io:) (prefix (vile enums) en:) (prefix (vile hashtables) ht:) (prefix (vile sorting) so:) (prefix (vile unicode) un:)) (define bytes (make-bytevector 8 0)) (bv:bytevector-u64-set! bytes 0 18446744073709551615 (bv:endianness big)) (define wide (bv:bytevector-u64-ref bytes 0 (bv:endianness big))) (bv:bytevector-u16-set! bytes 0 #x1234 (bv:endianness big)) (define codec (io:make-transcoder (io:utf-16-codec) (io:eol-style none) (io:error-handling-mode raise))) (define roundtrip (io:bytevector->string (io:string->bytevector "Aλ" codec) codec)) (en:define-enumeration color (red green blue) colors) (define table (ht:make-hashtable ht:string-ci-hash un:string-ci=?)) (ht:hashtable-set! table "Straße" 41) (ht:hashtable-update! table "STRASSE" (lambda (x) (+ x 1)) 0) (list wide (bv:bytevector-u16-ref bytes 0 (bv:endianness big)) roundtrip (en:enum-set->list (colors blue red)) (color green) (ht:hashtable-size table) (ht:hashtable-ref table "strasse" #f) (so:list-sort < (list 3 1 2 1)) (un:string-normalize-nfc "e\x301;") (eq? (bv:endianness big) 'big))