Skip to content

Commit 568d78f

Browse files
committed
release v0.0.3
- misc. updates. ---- # improve unsafe - add #Safety section to unsafe functions - add unsafe sub-features, like in devela THINK ----------- - Add some pixel fonts a short selection, and option to import - (receiving some kind of slice, typed or interpreted - (array from one type to another as long as they both implement X - (this pattern can be reused throughout all libera --- - implement From/To Char enum from devela (TODO) --- - [ ] bring functions from devela - strcount - buffer fmt - strings … ---- - WIP TRY add TryFrom/ From? - DESIGN Decide whether to fail, (TryFrom) or return From converting up until capacity. ------ - add new search methods using memchr ---- - add new NulTerminatedString types - crate - https://github.com/CAD97/cstr8/ - take ideas from other crates - https://crates.io/crates/fstr (conversion of just the right size?) ----- update Egc - [ ] impl TryFrom Egc (using string) for both static - … ops ---------- impl From<CharXX> for given string type aliases. ---- update unicode strings - new type `StaticNonSpecificString`. - make `StaticNonNulString` a type alias of `StaticNonSpecificString`. - [ ] TODO generalize strings even more: - `StaticNonSpecificString<const CHAR: &str, const CAP: usize> {}` - specialize StaticNonNulString as a type alias: `pub type StaticNonNulString<const CAP: usize> = StaticNonSpecificString<'\x00', CAP>;` ---- - pop_egc - push_egc (convenience) - push_utf8_bytes (from a byte slice) (impl from functions from_utf8? - pop utf8_bytes? ------ - graphemes? &[egc] ? ---- ## IDEAS chars: - [ ] new constructor for `Chars` trait and for concrete types. - add TryFrom<T: Chars>? or as a methods in chars? try_to_XXX - new char types e.g.: CharMath, CharBoxDrawing - those would be... enums :) - macro to generate an enum from a list of correspondences. - [ ] TODO: impl partialEq & partialOrd between all 4 char types - [ ] TODO: add more constants? - [ ] NUL strings: - add more alias string sizes? 96 (32×3), 192 (64×3) 384 (128 * 3) - [ ] MAYBE make counter_string a CounterString trait - [ ] impl over String, str, StaticStringU8, StaticNonNullString. - add non-unicode strings (sixbit?) less bit? with custom translation using custom tables. (link to a slice of the specific const-generic size) - generalize over unicode strings and non-unicode strings… single trait? ------ - TODO: add more methods? - escape_unicode - escape_debug - escape_default - wrap fns that returns iterators: to_lowercase, to_uppercase - https://doc.rust-lang.org/nightly/std/primitive.char.html#method.to_lowercase ---- - make tests, and examples. - impl push_str & try_push_str & try_push_str_complete for StaticStringU8 ---- add indent format - add own `Align` enum, & impl from fmt::Alignmnent, instead of using that. ------- - TextCell - TextGrid (via ladata/Grid2?) to libera type grid2d?? (recuperar cuadra como grid2d? - TextLine (rows, or - TextRope - traits - Ascii - Utf8 - Utf16 - struct Str<const BYTES: usize> {} // owns its buffer - --- alignment functions WIP examples - think about using cow ----- - THINK - no_std functions (how to group them) - a trait over String? ------- - THINK alternatives - dirty utf versions? - stateful struct to customize these things? ------- ## improve box drawing chars - separate lines - add dotted - add half - add thin to heavy - eight vertical & horizontal lines (U 15) - diagonal lines (U15) - add block elements - shades - half block shades - quadrants - sextants - eight vertical & horizontal blocks - eight vertical & horizontal blocks upper & right (u15) - corners - diagonal blocks (U15) - add a binary encoding ---- ----- ## alt. unicode-width - add an opinionated wrapper over unicode-width - maybe create traits depending on UnicodeWidthStr / UnicodeWidthChar - save custom tables for special symbols - for the rest of symbols, derive to unicode-width - deal with >2 width chars - deal with https://github.com/unicode-rs/unicode-width/issues/ ---- - From rational to select unicode char on filling -------------- I want to provide scaffolding for apunta bin + revela lib) a text buffer that refreshes, that can be analized, strings positioned… areas detected, layers... analisys at certain frequency / Hz --- - refactor cargo manifest ---- # functions beneficial to implement in a Rust library for text manipulation - https://chat.openai.com/c/17b13959-8073-42ef-bcf4-0b9ef59eb97c ----------- # rope - example crop alternatives - https://docs.rs/crop - https://docs.rs/jumprope - https://docs.rs/ropey/*/ropey/struct.Rope.html - https://docs.rs/any-rope/*/any_rope ---- # TODO - unicode columns based on width + override specially long characters - (perfect ad-hoc hash-map associated) - https://github.com/AldaronLau/unicode-columns/blob/stable/src/lib.rs ----- # UNICODE BLOCKS - https://docs.rs/unicode-blocks/0.1.5/unicode_blocks/struct.UnicodeBlock.html - `block` module. re-export crate. - desired API: 'a'.block() -> UnicodeBlock UnicodeBlock.name() UnicodeBlock.start() UnicodeBlock.end() UnicodeBlock.contains('a') ------ # UNICODE SEGMENTATION - https://unicode-rs.github.io/unicode-segmentation/unicode_segmentation/index.html ------ # mixed blitter - dankamongmen/notcurses#1223 ---- add collections of unicode characters with metadata - allow to support pixel ttf fonts, etc... - e.g.: dots: … ‥ . · etc… codepages - https://crates.io/crates/codepage-strings - https://crates.io/crates/oem-cp # IDEAS - recreate sixbit, in a more general way… choosing bw 64 & 128-bit codepages - https://crates.io/crates/sixbit/ -------- - no_std formatting? - https://doc.rust-lang.org/core/macro.format_args.html - https://doc.rust-lang.org/core/fmt/struct.Arguments.html -------- - ASCII utilities - see: https://doc.rust-lang.org/std/ascii/trait.AsciiExt.html#tymethod.eq_ignore_ascii_case --- - CASE utilities - https://stackoverflow.com/questions/38406793/why-is-capitalizing-the-first-letter-of-a-string-so-convoluted-in-rust # ISSUES - "Available on non-crate feature `safe` only." rust-lang/rust#43781 (comment) ## FONTS (TODO move to `trazas` crate?) - https://news.ycombinator.com/item?id=34689213 # LEARN FFI cstring, etc. - https://www.reddit.com/r/rust/comments/s3x1e3/const_const_u8/ - u8 is always 8-bits, but it's a mistake to use u8 rather than std::os::raw::c_char # LEARN unicode - https://unicode.org/glossary/#byte_order_mark - https://en.wikipedia.org/wiki/Homoglyph#Unicode_homoglyphs # CRATES - https://github.com/bcmyers/num-format (also for numera, ladata…) - > https://docs.rs/memchr/2.5.0/memchr/ - https://crates.io/crates/texcore - https://crates.io/crates/tectonic :) a complete TeX/LaTeX engine - https://crates.io/crates/character-set (for inspiration) (source not in github) - https://docs.rs/crate/character-set/0.4.0/source/src/builtin/general_category.rs # WAITING for - https://doc.rust-lang.org/nightly/core/ascii/enum.Char.html - rust-lang/rust#110998 - rust-lang/rust#109814 string.leak for 1.72.0 ## DISCARDED IDEAS - [ ] remove Char types, move to devela? - better not, because I need good trait coupling…
1 parent 5a7ea10 commit 568d78f

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "textos"
33
description = "Texts, strings, formatting, unicode…"
4-
version = "0.0.2"
4+
version = "0.0.3"
55
edition = "2021"
66
rust-version = "1.72.0" # sync with readme, check.sh & .github/workflows/check.yml
77
authors = ["José Luis Cruz <[email protected]>"]

Changelog.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ The format is based on [Keep a Changelog], and this project adheres to
77

88
## [Unreleased]
99

10+
## [0.0.3] - 2023-08-27
11+
1012
### Added
1113
- new features: `nightly_docs`, `unsafest`.
1214
- impl conversions from scalars to strings & egcs.
@@ -23,7 +25,7 @@ The format is based on [Keep a Changelog], and this project adheres to
2325
- remove `int_buf` module, move to `devela`.
2426

2527
### Changed
26-
- bump devela `0.8.0`.
28+
- bump devela to `0.8.0`.
2729
- bump MSRV to `1.72.0`.
2830
- deprecate and rename `no-std` feature to `no_std`.
2931
- include in the crate any markdown files in `src/`
@@ -50,7 +52,8 @@ First release.
5052
- new macro: `ascii_eq_uncased`.
5153

5254

53-
[unreleased]: https://github.com/andamira/textos/compare/v0.0.2...HEAD
55+
[unreleased]: https://github.com/andamira/textos/compare/v0.0.3...HEAD
56+
[0.0.3]: https://github.com/andamira/textos/releases/tag/v0.0.3
5457
[0.0.2]: https://github.com/andamira/textos/releases/tag/v0.0.2
5558
[0.0.1]: https://github.com/andamira/textos/releases/tag/v0.0.1
5659

0 commit comments

Comments
 (0)