Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
History for s2/unit/020-050-buffer.s2
2018-01-05
| ||
23:25 | Added experimental X.# s2 operator (a.k.a. "dot-length") as an in-language shortcut for the commonly-used length() method of arrays, tuples, strings, and buffers. We can later look at making it overloadable. file: [0eb8c13ed3] check-in: [0a0c756a38] user: stephan branch: trunk, size: 10613 | |
2017-11-15
| ||
08:38 | Changed the semantics of the 2nd parameter to s2.string/Buffer.substr(offset,len): a negative len means until the end of the string, instead of 0 meaning until the end (as it was before, which caused a weird corner case to show up). file: [20c6e365be] check-in: [549256543d] user: stephan branch: trunk, size: 10661 | |
00:44 | s2.Buffer/String.evalContents() now accepts (string,obj), (obj,string), (string), or (obj) params, where the string is a virtual filename and the obj is symbols to import into the eval'd scope. file: [d09a0889c2] check-in: [c565b39c62] user: stephan branch: trunk, size: 10660 | |
2017-11-12
| ||
09:06 | Migrated s2.Buffer.replace() implementations into core cwal functions. file: [a7f4d7d9af] check-in: [e980d01913] user: stephan branch: trunk, size: 10359 | |
2017-10-13
| ||
12:23 | s/\bUNUSED\b/CWAL_UNUSED_VAR/g. Minor s2 unit test tweak. file: [c6646d5a9c] check-in: [6eaa08f972] user: stephan branch: trunk, size: 10098 | |
10:53 | Defended Buffer.evalContents() against undefined behaviour by temporarily swapping out the buffer's contents while evalContents() is running. The alternative is undefined/unsafe behaviour if the buffer is modified while evalContents() is running. If truly needed (but that seems unlikely), we could first copy its contents instead of clearing them, but that would double the memory cost. My fingers have had enough programming for a while - gotta stop now :/. file: [8f898b0b7d] check-in: [3fa42f04ac] user: stephan branch: trunk, size: 10064 | |
2016-02-05
| ||
21:58 | fixed cwal_new_string() to work as expected when its argument starts with a NUL byte but has a positive length. file: [0734c0ad7f] check-in: [09c1d58eac] user: stephan branch: trunk, size: 9617 | |
21:46 | Added s2.Buffer.replace(), but with different semantics than string.replace() (namely, in-place replacement). file: [50993c6b9c] check-in: [0280fefcbc] user: stephan branch: trunk, size: 9293 | |
19:38 | a number of doc updates, internally restructured how keywords determine whether an EOL is an alias for EOX, and limited it to certain keywords (due to a buggy interpretation found while testing unrelated stuff). Added s2.Buffer.slice() to copy byte ranges. A bit of further s2 internal-vs-public code-moving and minor cleanups. file: [3ed4e8ee0a] check-in: [bd2fa6618f] user: stephan branch: trunk, size: 8763 | |
13:08 | minor semantics addition to s2.Buffer.un/compress(): both now accept a Buffer argument, so can be called without a Buffer instance. file: [e1a5760302] check-in: [1540bc26dc] user: stephan branch: trunk, size: 8309 | |
2016-02-02
| ||
19:25 | Added miniz and (theoretically, but untested and too tired) zlib support. Added s2.Buffer.compress/uncompress/isCompressed/uncompressedSize() and the Buffer.compression flag to determine if un/compress() are functional. The new unit tests demonstrate the API. file: [184bbdfb87] check-in: [fc568b29ce] user: stephan branch: trunk, size: 8305 | |
2016-01-30
| ||
11:51 | minor error reporting improvements in the new urlencode/decode bits. file: [acfee5643c] check-in: [e89798fd0f] user: stephan branch: trunk, size: 6474 | |
11:40 | Ported in url encoding/decoding format specifiers from libfossil to cwal_buffer_format(), but changed their designated letters to r/R. Limited to ASCII. file: [792905509e] check-in: [15b3f2e8d7] user: stephan branch: trunk, size: 6187 | |
2016-01-22
| ||
14:14 | added a couple unit tests. file: [7eeef2cebf] check-in: [2359168c4b] user: stephan branch: trunk, size: 6027 | |
2016-01-05
| ||
23:28 | Buffer.append(double) fix for trimming trailing zeroes (was lopping off the 0 right after a dot). Minor s2_check_interrupted() tweaking. file: [ed16c3015e] check-in: [a9990dcbdf] user: stephan branch: enum-with-value, size: 5815 | |
2014-12-03
| ||
17:12 | Buffer.substr() now treats an empty buffer like an empty string. file: [5a33329144] check-in: [a028f5bd34] user: stephan branch: trunk, size: 5674 | |
17:02 | s2: refactored String.substr() to work with a Buffer "this", added s2.Buffer.substr(). file: [0ae9c2d102] check-in: [c6d18765b5] user: stephan branch: trunk, size: 5590 | |
2014-11-19
| ||
20:25 | Added s2.Buffer.isEmpty(). file: [17f9b4259d] check-in: [a9e435c6ca] user: stephan branch: trunk, size: 5463 | |
2014-11-04
| ||
19:57 | s2: minor improvements in s2.Buffer.byteAt() and fill(). A build/portability fix (enum vs int) for the previous commit. file: [c37bdde654] check-in: [9a2ea6c894] user: stephan branch: trunk, size: 5414 | |
2014-08-31
| ||
08:45 | s2: ported in the th1ish buffer unit tests. file: [312c4d1a7e] check-in: [5aa1b5af6e] user: stephan branch: trunk, size: 5134 | |
2014-08-29
| ||
12:12 | s2: experimenting with the ability to interrupt a running script, e.g. via Ctrl-C handler. Results look fairly promising but not perfect. Added Buffer|String.evalContents() and minor API changes to accommodate them. file: [7f83162555] check-in: [cdf401e000] user: stephan branch: trunk, size: 1485 | |
2014-07-02
| ||
18:18 | s2: ported in the Hash class, other minor cleanups. file: [fe6ae5f88c] check-in: [62a274945f] user: stephan branch: trunk, size: 467 | |
2014-07-01
| ||
21:52 | s2: fixed the inherits keyword (was triggering a syntax error). file: [15c965bd1a] check-in: [2aab79ea4b] user: stephan branch: trunk, size: 470 | |
21:26 | Added: s2: ported in the Buffer class, a number of other tweaks. TODO: finish buffer unit tests. file: [365e8b9199] check-in: [5f6b5a8f85] user: stephan branch: trunk, size: 439 | |