<commit_before># Bugs, known limitations and todo

### Todo

* Lack of other Perl 6 types support
* Change die() statements with exceptions to notify caller and place further responsability there. This is done for Document.pm6
* make one BSON exception type for all exceptions. The differences are noted in an extra named argument.
* Perl 6 Int variables are integral numbers of arbitrary size. This means that any integer can be stored as large or small as you like. Int is coded as described in version 0.8.4. When integers get larger or smaller then 64bit can describe, then the Int should be coded as a binary array of some type.
* Support for decimal 128 type = BSON type ID \x13.
* Tests some more exceptions of Binary
* Better checks for wrong sizes of buffers along every type encountered
* Modify timestamp (en/de)coding to be an object
* The exception objects are subject to change into a simpler class: one instead of several. This will become X::BSON.



### Bugs

* An array in a document which is modified later with push, pop or otherwise will not be properly encoded.
<commit_msg>bug note of encoding/decoding double<commit_after># Bugs, known limitations and todo

### Todo

* Lack of other Perl 6 types support
* Change die() statements with exceptions to notify caller and place further responsability there. This is done for Document.pm6
* make one BSON exception type for all exceptions. The differences are noted in an extra named argument.
* Perl 6 Int variables are integral numbers of arbitrary size. This means that any integer can be stored as large or small as you like. Int is coded as described in version 0.8.4. When integers get larger or smaller then 64bit can describe, then the Int should be coded as a binary array of some type.
* Support for decimal 128 type = BSON type ID \x13.
* Tests some more exceptions of Binary
* Better checks for wrong sizes of buffers along every type encountered
* Modify timestamp (en/de)coding to be an object
* The exception objects are subject to change into a simpler class: one instead of several. This will become X::BSON.



### Bugs
in test 300-document.t it seems that a bug is found when handling a very large document.

{'fraction_non_alphanumeric': 0.04326047358834244, 'fraction_numerical': 0.013205828779599272, 'mean_word_length': 4.14519906323185, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '854100', 'n_tokens_mistral': 559, 'n_tokens_neox': 517, 'n_words': 355}