| 1 | import(prefix((vile,bytevectors),bv:), |
| 2 | prefix((vile,io,ports),io:), |
| 3 | prefix((vile,enums),en:), |
| 4 | prefix((vile,hashtables),ht:), |
| 5 | prefix((vile,sorting),so:), |
| 6 | prefix((vile,unicode),un:)) |
| 7 | bytes := make-bytevector(8,0) |
| 8 | bv:bytevector-u64-set!(bytes,0,18446744073709551615,bv:endianness(big)) |
| 9 | wide := bv:bytevector-u64-ref(bytes,0,bv:endianness(big)) |
| 10 | bv:bytevector-u16-set!(bytes,0,#x1234,bv:endianness(big)) |
| 11 | codec := io:make-transcoder(io:utf-16-codec(), |
| 12 | io:eol-style(none),io:error-handling-mode(raise)) |
| 13 | roundtrip := io:bytevector->string(io:string->bytevector("Aλ",codec),codec) |
| 14 | en:define-enumeration(color,(red,green,blue),colors) |
| 15 | table := ht:make-hashtable(ht:string-ci-hash,un:string-ci=?) |
| 16 | ht:hashtable-set!(table,"Straße",41) |
| 17 | ht:hashtable-update!(table,"STRASSE",fn(x){x+1},0) |
| 18 | list(wide,bv:bytevector-u16-ref(bytes,0,bv:endianness(big)), |
| 19 | roundtrip,en:enum-set->list(colors(blue,red)),color(green), |
| 20 | ht:hashtable-size(table),ht:hashtable-ref(table,"strasse",#f), |
| 21 | so:list-sort(<,list(3,1,2,1)), |
| 22 | un:string-normalize-nfc("e\x301;"), |
| 23 | eq?(bv:endianness(big),quote(big))) |
| 24 | |