Commit Graph

325 Commits

Author SHA1 Message Date
f8ba027c38 Hash: use optimized rotation constants.
Also use random constants for the initial hash state.  Changed my
mind about using zero initialization.  It doesn't make a practical
difference, but helps esnure that the mixing is randomized.
2022-09-03 20:59:10 -07:00
776438e866 Hash: convert to hex string in a simpler way. 2022-09-02 21:59:34 -07:00
e81beb733e Add one more test for the hash. 2022-08-29 19:16:58 -07:00
c585e38a54 Hash: start with a state of zero.
This doesn't affect the quality of the hash at all, and an empty
message hashing to zero is kind of nice.
2022-08-29 18:47:31 -07:00
03e78299c6 Use hash perf leeway from prior commits to make the hash higher quality.
When incorporating a data block into the hash, it now does enough
mixing rounds to flip on average about 110 bits for any bit flipped
by the data block.

This reduces performance again, but not all the way to what they
were before.  It's still reasonably fast, hashing at around 6-7 GB/s.
2022-08-25 23:54:03 -07:00
e25e28d88b Slightly easier-to-modify hash code. 2022-08-25 19:56:38 -07:00
7d7ab1acf1 Significant speed up to the hash.
It can now hash data at 9-10 GiB/s.
2022-08-25 16:27:43 -07:00
a41e1dd7de Add benchmarks for LedHash256, and tweak for performance.
Also benchmark against Blake3.
2022-08-24 18:45:36 -07:00
3f3cf5dd3a Switch other backend code over to use transactions. 2022-08-23 12:30:14 -07:00
696ecb732d Implemented Transaction composition. 2022-08-22 21:10:28 -07:00
8a9388e816 Update readme to make the nature of the project clear. 2022-03-31 10:11:32 -07:00
19fa7b6abe Start implementing transaction composition. 2022-03-26 06:04:17 -07:00
f3c12d6cee More work on Transaction. 2021-11-14 14:33:52 -08:00
f9415d915f Merge branch 'master' of github.com:cessen/led 2021-11-14 11:36:16 -08:00
51a86dcfdc Beginnings of a Transaction type. 2021-11-14 11:35:25 -08:00
88c7ded976 Update dependencies to latest versions. 2021-06-16 11:27:47 -07:00
4cafe8093b Update to latest crossterm. 2021-06-15 23:38:03 -07:00
8776b96879 Fix bug in go-to-line.
Wasn't checking for maximum against the lines in the file.
2021-06-15 23:18:52 -07:00
27572c8838 More code cleanup of the hash. 2020-02-24 13:31:17 +09:00
4e435732d7 Cleaned up the hash implementation a bit. 2020-02-24 13:09:49 +09:00
dc9b3dd5c3 Removed all but one unsafe call from the hasher. 2020-02-24 12:50:18 +09:00
c38c83a8b5 Reduced the set of tests for the hash function.
Also added a couple new ones to test possible edge cases.
2020-02-24 12:33:36 +09:00
e810503e56 Slight tweak to the hash function.
The last swap isn't actually needed, and this makes the implementation
cleaner for different numbers of rounds if we want to tweak that
later.
2020-02-24 10:18:58 +09:00
905ff2c301 Cleaned up the hash implementation and made it endian-clean. 2020-02-24 10:09:13 +09:00
e1d91ff43d Move filepath into the Buffer struct. 2020-02-24 07:35:04 +09:00
4544efb299 Undo/redo wasn't marking the buffer as dirty. Fixed. 2020-02-23 20:14:13 +09:00
4a33750a6b Fix minor bug from the move to the new buffer. 2020-02-23 20:10:30 +09:00
c4fa72405f Switch to new backend buffer for text, cursor, and undo management. 2020-02-23 19:56:08 +09:00
6077be2dfd Add convenience fn's and impls for iterating and indexing MarkSets. 2020-02-23 16:24:41 +09:00
4267334303 Finish the bare-bones undo/redo system. 2020-02-23 15:37:16 +09:00
0c887d1eb9 Beginnings of an undo system for the new backend.
Just going to keep it stupid and simple for now.  More
sophisticated undo functionality can be added in the future.
2020-02-22 18:00:28 +09:00
62bfd9e49c Add hotkyes for moving up/down by several lines at a time. 2020-02-20 18:01:38 +09:00
9dc3f3aa4c Visual styling tweaks, including a line separating the gutter. 2020-02-20 07:57:45 +09:00
dcc749893b Fix minor bug in cursor-based view adjustment. 2020-02-18 20:19:49 +09:00
d7d98946e5 Handle zero-width graphemes (usually ill-formed) more gracefully. 2020-02-18 20:13:12 +09:00
a28629d8b4 Remove old formatter.rs file, which is no longer used. 2020-02-17 18:57:08 +09:00
e061603a6e Gutter styling improvements.
Instead of having the hard line numbers alternate colors, give soft
wrapped lines their own lighter color.  This still gives a nice
visual cue when lines are wrapped, but isn't as generally distracting.
2020-02-17 18:47:43 +09:00
6a736e0b66 Fixed the last obvious bug from the refactor. 2020-02-17 18:16:17 +09:00
0c29d104b1 Tweak for code clarity. 2020-02-17 07:46:27 +09:00
6d5cb16ef3 Another bug fix after the refactor. 2020-02-17 07:42:23 +09:00
3f0332b0ec Use git master branch of unicode-segmentation for now.
It includes some nice not-yet-released optimizations.
2020-02-16 22:27:52 +09:00
82df4d64bd Handle grapheme width more robustly. 2020-02-16 22:26:31 +09:00
7b71cf2fdd Some minor code cleanup and shuffling. 2020-02-16 21:06:06 +09:00
6e239a3c92 Yet more bug fixes. Getting pretty close to fully functional again. 2020-02-16 19:03:43 +09:00
d7d7b7cd2b More bug fixes from the refactor. 2020-02-16 18:09:49 +09:00
e5cac79829 Fix for two bugs from the previous refactor. 2020-02-16 17:14:36 +09:00
bfeaee602c A bunch more work on refactoring how formatting works.
This compiles, but does not yet work correctly again. Tons of bugs.
2020-02-16 17:03:37 +09:00
8c1778f674 Use alternating gutter colors for lines of text.
This makes for a clearer visual distinction of where soft line
wrapping occurs.
2020-02-15 11:43:53 +09:00
9512018983 Implemented indentation for soft-wrapped lines again. 2020-02-13 19:29:23 +09:00
7b652c98da Remove options for char wrap and non-wrapping. Always word-wrap. 2020-02-11 21:12:22 +09:00