Page MenuHomePhabricator

kevincox (Kevin Cox)
User

Projects

User does not belong to any projects.

User Details

User Since
Jan 11 2018, 4:59 AM (99 w, 2 d)

kevincox@kevincox.ca

Recent Activity

Mon, Dec 2

kevincox accepted D7523: rust-hg-path: implement `Display` for `HgPath` and `HgPathBuf`.
Mon, Dec 2, 10:24 AM
kevincox accepted D7529: rust-dirstate-status: add `walk_explicit` implementation, use `Matcher` trait.
Mon, Dec 2, 10:16 AM
kevincox accepted D7526: rust-hg-path: add method to get part of a path relative to a prefix.
Mon, Dec 2, 10:15 AM
D7529: rust-dirstate-status: add `walk_explicit` implementation, use `Matcher` trait now requires changes to proceed.
Mon, Dec 2, 8:26 AM
kevincox accepted D7527: rust-matchers: add doctests for `AlwaysMatcher`.
Mon, Dec 2, 8:18 AM
D7526: rust-hg-path: add method to get part of a path relative to a prefix now requires changes to proceed.
Mon, Dec 2, 8:17 AM
kevincox accepted D7525: rust-matchers: improve `Matcher` trait ergonomics.
Mon, Dec 2, 8:09 AM
kevincox accepted D7524: rust-dirs-multiset: use `AsRef` instead of concrete types when possible.
Mon, Dec 2, 8:06 AM
D7523: rust-hg-path: implement `Display` for `HgPath` and `HgPathBuf` now requires changes to proceed.
Mon, Dec 2, 8:04 AM
kevincox accepted D7522: rust-dirs: handle forgotten `Result`s.
Mon, Dec 2, 7:59 AM

Nov 7 2019

kevincox accepted D7301: rust: introduce SIZE_FROM_OTHER_PARENT constant.
Nov 7 2019, 1:24 PM
kevincox accepted D7300: rust-status: refactor dispatch case for normal files.
Nov 7 2019, 1:24 PM
kevincox accepted D7299: rust-status: return a ParallelIterator instead of a Vec from stat_dmap_entries.
Nov 7 2019, 1:22 PM

Nov 6 2019

kevincox accepted D7255: rust-matchers: remove default implementations for `Matcher` trait.
Nov 6 2019, 12:43 PM
kevincox accepted D7253: rust-status: remove dead code.
Nov 6 2019, 11:25 AM
kevincox accepted D7254: rust-status: improve status performance.
Nov 6 2019, 11:23 AM

Oct 30 2019

kevincox added a comment to D7178: [RFC] rust-matchers: add `Matcher` trait and implement `AlwaysMatcher`.

I see a lot of the functions are here to give optimization hints. In order to make someone non-familiar with the code able to understand it each method should state the contracts that it is making. I am having a really hard time reconciling how the different functions interact and which methods have precedence over each other.

Oct 30 2019, 11:24 AM

Oct 19 2019

kevincox added a comment to D7116: rust-performance: introduce FastHashMap type alias for HashMap.

The following comparison shows that for input > 20 bytes, fnv has worse overall performance than xx

Oct 19 2019, 8:14 AM

Oct 16 2019

kevincox added a comment to D7116: rust-performance: introduce FastHashMap type alias for HashMap.

I've seen very good results with https://github.com/servo/rust-fnv in the past so it is probably worth including that in the comparison and possibly using it. It is especially good for small keys which seems like a common case in hg.

Oct 16 2019, 7:03 PM
kevincox added a comment to D7116: rust-performance: introduce FastHashMap type alias for HashMap.

OOC, have you compared this with the hashbrown crate for perf?

Oct 16 2019, 6:59 PM

Oct 15 2019

kevincox added a comment to D7058: rust-dirstate-status: add first Rust implementation of `dirstate.status`.

Thanks, looks good.

Oct 15 2019, 10:48 AM
kevincox accepted D7059: rust-dirstate-status: rust-cpython bindings for `dirstate.status`.
Oct 15 2019, 10:46 AM
kevincox accepted D7107: rust-cross-platform: remove `unimplemented!` to get compile-time errors instead.
Oct 15 2019, 10:44 AM
D7058: rust-dirstate-status: add first Rust implementation of `dirstate.status` now requires changes to proceed.
Oct 15 2019, 9:12 AM

Sep 13 2019

kevincox accepted D6773: rust-hgpath: add HgPath and HgPathBuf structs to encapsulate handling of paths.
Sep 13 2019, 6:49 AM

Sep 12 2019

kevincox accepted D6774: rust-hgpath: replace all paths and filenames with HgPath/HgPathBuf.
Sep 12 2019, 4:25 AM

Aug 30 2019

kevincox accepted D6773: rust-hgpath: add HgPath and HgPathBuf structs to encapsulate handling of paths.
Aug 30 2019, 11:13 AM
D6773: rust-hgpath: add HgPath and HgPathBuf structs to encapsulate handling of paths now requires changes to proceed.

It looks good overall. I just would like to have a bit more strict definition of what an HgPath can contain and preferably some init-time validation.

Aug 30 2019, 5:38 AM

Aug 28 2019

kevincox accepted D6770: rust: fix warnings about trait objects without dyn being deprecated.
Aug 28 2019, 8:24 AM
kevincox added inline comments to D6765: rustfilepatterns: shorter code for concatenating slices.
Aug 28 2019, 7:48 AM
kevincox accepted D6766: rustfilepatterns: refactor the pattern of removing a prefix from a &[u8].
Aug 28 2019, 5:33 AM
kevincox accepted D6765: rustfilepatterns: shorter code for concatenating slices.
Aug 28 2019, 5:26 AM
kevincox accepted D6756: rust-utils: add normalize_case util to mirror Python one.
Aug 28 2019, 5:21 AM

Aug 12 2019

kevincox added a comment to D6631: rust-cpython: add macro for sharing references.

@kevincox I've renamed the file since it no longer just contains macros.
I've moved whatever I could move to separate structs and used Cell instead of RefCell on those scalar types. I'm not so keen on using UnsafeCell, espacially since the target py_class!-resulting struct could be using RefCell-specific APIs.

Aug 12 2019, 12:11 PM

Jul 22 2019

kevincox updated kevincox.
Jul 22 2019, 11:30 AM
kevincox added a comment to D6516: rust-discovery: accept the new 'respectsize' init arg.

It seems weird to add this argument without using it. I would much rather it was added as the implementation was added.

Jul 22 2019, 11:25 AM
kevincox accepted D6632: rust-dirstate: rust implementation of dirstatemap.
Jul 22 2019, 11:10 AM

Jul 17 2019

kevincox added inline comments to D6629: rust-dirstate: use EntryState enum instead of literals.
Jul 17 2019, 7:35 AM

Jul 16 2019

kevincox added a comment to D6631: rust-cpython: add macro for sharing references.

Is there any reason this can't be done using Rc<RefCell<DirsMultiset>>? I have an example here: https://rust.godbolt.org/z/MNNR_F

Jul 16 2019, 9:13 AM
kevincox added a comment to D6631: rust-cpython: add macro for sharing references.

Is there any reason this can't be done using Rc<RefCell<DirsMultiset>>? I have an example here: https://rust.godbolt.org/z/MNNR_F

Jul 16 2019, 7:12 AM

Jul 15 2019

kevincox accepted D6628: rust-parsers: switch to parse/pack_dirstate to mutate-on-loop.
Jul 15 2019, 12:24 PM
kevincox accepted D6629: rust-dirstate: use EntryState enum instead of literals.
Jul 15 2019, 12:08 PM
kevincox accepted D6630: rust-docstrings: add missing module docstrings.
Jul 15 2019, 11:52 AM

Jul 12 2019

kevincox accepted D6626: rust-dirstate: create dirstate submodule in hg-cpython.
Jul 12 2019, 11:52 AM

Jul 10 2019

kevincox added a comment to D6594: [ABANDONED] RFC dirstatemap.
In D6594#96518, @yuja wrote:

Yes, so we'll probably want to minimize the data exchanged between Rust
and Python. This means we'll eventually move more logic to Rust side, which
hopefully reduce the number of elements to be exposed through the iterator
interface. Until then, it might be better to move iterator-heavy objects
to CPython/PyO3 layer. Just my guess.

Jul 10 2019, 11:28 AM
kevincox added inline comments to D6593: rust-minor-fixes: remove Deref in favor of explicit methods.
Jul 10 2019, 11:22 AM
kevincox added a comment to D6597: rust-2018: switch hg-core and hg-cpython to rust 2018 edition.

Is the SliceExt change related to the 2018 change? If not could you split the two?

Jul 10 2019, 10:53 AM

Jul 4 2019

kevincox accepted D6591: rust-minor-fixes: run rfmt on all hg-core/hg-cpython code.
Jul 4 2019, 11:20 AM
kevincox added inline comments to D6594: [ABANDONED] RFC dirstatemap.
Jul 4 2019, 11:19 AM
kevincox accepted D6592: rust-minor-fixes: simplify overly complicated expression.
Jul 4 2019, 11:01 AM

Jun 28 2019

kevincox added inline comments to D6393: rust-dirstate: add "dirs" Rust implementation.
Jun 28 2019, 5:01 AM

Jun 24 2019

kevincox added a comment to D6393: rust-dirstate: add "dirs" Rust implementation.

Sorry. I was busy. In general don't worry about blocking on me, I can't promise any sort of reasonable response time. Worst case I can review the changes after submission and changes can be made afterwards.

Jun 24 2019, 9:46 AM

Jun 14 2019

kevincox accepted D6395: rust-dirstate: call new "dirs" rust implementation from Python.
Jun 14 2019, 6:18 AM

Jun 13 2019

kevincox added a comment to D6429: rust-discovery: optimization of add commons/missings for empty arguments.

Thanks, looks good.

Jun 13 2019, 10:00 AM
kevincox accepted D6517: rust-discovery: read the index from a repo passed at init.
Jun 13 2019, 6:05 AM

Jun 10 2019

kevincox accepted D6489: rust-regex: fix shortcut for exact matches.
Jun 10 2019, 9:14 AM
kevincox accepted D6485: rust-filepatterns: use bytes instead of String.
Jun 10 2019, 9:12 AM
kevincox accepted D6394: rust-dirstate: add "dirs" rust-cpython binding.
Jun 10 2019, 9:06 AM
kevincox accepted D6428: rust-discovery: using the children cache in add_missing.
Jun 10 2019, 8:59 AM
kevincox requested changes to D6429: rust-discovery: optimization of add commons/missings for empty arguments.

Wouldn't it be better to make add_missing_revisions work properly on empty inputs? It seems like it is too error prone to try and catch every caller. If possible I would like to push this check down as far as possible.

Jun 10 2019, 8:53 AM
kevincox accepted D6427: discovery: new devel.discovery.randomize option.
Jun 10 2019, 8:39 AM

May 24 2019

kevincox accepted D6389: rust-dirstate: create dirstate submodule.
May 24 2019, 5:53 AM
kevincox added inline comments to D6389: rust-dirstate: create dirstate submodule.
May 24 2019, 5:07 AM

May 23 2019

kevincox accepted D6426: rust-discovery: optionally don't randomize at all, for tests.
May 23 2019, 11:15 AM
kevincox accepted D6425: rust-discovery: exposing sampling to python.
May 23 2019, 10:55 AM
kevincox accepted D6424: rust-discovery: takefullsample() core implementation.
May 23 2019, 10:53 AM
kevincox accepted D6423: rust-discovery: core implementation for take_quick_sample().
May 23 2019, 10:47 AM

May 17 2019

kevincox added inline comments to D6389: rust-dirstate: create dirstate submodule.
May 17 2019, 9:37 AM

May 10 2019

kevincox requested changes to D6348: rust-dirstate: add rust implementation of `parse_dirstate` and `pack_dirstate`.
May 10 2019, 11:04 AM
kevincox accepted D6345: rust-discovery: optionally don't randomize at all, for tests.

The code and rust style looks fine. I'm not sure that taking the N smallest elements is the best approach for testing though. I can imagine it hiding some issues with larger values.

May 10 2019, 9:46 AM

Apr 24 2019

kevincox accepted D6271: rust-filepatterns: add a Rust implementation of pattern-related utils.

Thanks for the changes.

Apr 24 2019, 5:58 AM

Apr 20 2019

kevincox requested changes to D6271: rust-filepatterns: add a Rust implementation of pattern-related utils.
Apr 20 2019, 4:22 PM
kevincox accepted D6257: rust-discovery: core implementation for take_quick_sample().
Apr 20 2019, 2:52 PM

Apr 17 2019

kevincox added a comment to D6231: rust-discovery: starting core implementation.

I believe to have addressed your immediate concerns.
I played with splitting in different structs for the various stages of the process. It is indeed cleaner and clearer Rust code.
However mutating in place of Enums exposed to Python is a bit of a headache, because of the wrapping in RefCell<Box<T>>, and I don't have a solution for that, so I'm gonna think about that in a follow-up.

Apr 17 2019, 8:58 AM
kevincox accepted D6260: rust-discovery: takefullsample() core implementation.
Apr 17 2019, 8:58 AM
kevincox accepted D6261: rust-discovery: exposing sampling to python.
Apr 17 2019, 8:38 AM

Apr 15 2019

kevincox added inline comments to D6231: rust-discovery: starting core implementation.
Apr 15 2019, 12:59 PM
kevincox added a comment to D6231: rust-discovery: starting core implementation.

Yes, that's what I had in mind. Not sure where that enum would be defined (hg-cpython or hg-core) but it doesn't matter so much.

Apr 15 2019, 12:43 PM
kevincox added inline comments to D6230: rust-dagops: roots.
Apr 15 2019, 6:23 AM
kevincox added a comment to D6231: rust-discovery: starting core implementation.

That's an interesting idea. I expect it to solve my gripes with ensure_undecided() neatly. I'm not sure how it'd fare on the Python side, and probably wouldn't do it in the bindings to maintain compatibility, but I'll play with it a bit.

Apr 15 2019, 6:21 AM

Apr 14 2019

kevincox accepted D6233: rust-discovery: implementing and exposing stats().
Apr 14 2019, 4:15 PM
kevincox accepted D6231: rust-discovery: starting core implementation.

I'm not a huge fan of the design of this class because it has a strong protocol to use correctly. It would probably be better to have 3 classes and when you apply new information each class transitions into the next one. This allows the type system to ensure that you are using the class correctly. However it appears that this is just re-implementing an API so improving that API is probably out of scope for the time being.

Apr 14 2019, 4:14 PM
kevincox accepted D6232: rust-discovery: cpython bindings for the core logic.
Apr 14 2019, 4:11 PM
kevincox accepted D6230: rust-dagops: roots.
Apr 14 2019, 3:51 PM
kevincox accepted D6229: rust-dagops: range of revisions.
Apr 14 2019, 3:45 PM

Feb 16 2019

kevincox added inline comments to D5945: rust: itering less on MissingAncestors.bases for max().
Feb 16 2019, 1:37 AM

Feb 12 2019

kevincox added inline comments to D5945: rust: itering less on MissingAncestors.bases for max().
Feb 12 2019, 5:20 PM
kevincox accepted D5945: rust: itering less on MissingAncestors.bases for max().
Feb 12 2019, 9:58 AM
kevincox accepted D5944: rust: stop putting NULL_REVISION in MissingAncestors.bases.
Feb 12 2019, 9:54 AM
kevincox accepted D5943: rust: less set lookups in MissingAncestors.
Feb 12 2019, 9:42 AM

Jan 15 2019

kevincox accepted D5579: rust: factorized testing Graphs.
Jan 15 2019, 2:58 PM
kevincox accepted D5580: rust: dagop.headrevs() Rust counterparts.
Jan 15 2019, 2:55 PM
kevincox accepted D5581: rust-cpython: set conversion for MissingAncestors.bases().
Jan 15 2019, 2:46 PM
kevincox added inline comments to D5550: rust-cpython: bindings for MissingAncestors.
Jan 15 2019, 3:02 AM

Jan 14 2019

kevincox added inline comments to D5550: rust-cpython: bindings for MissingAncestors.
Jan 14 2019, 6:16 PM

Jan 12 2019

kevincox added inline comments to D5550: rust-cpython: bindings for MissingAncestors.
Jan 12 2019, 6:30 AM

Jan 3 2019

kevincox added a comment to D5441: rust-cpython: binding for LazyAncestors.
In D5441#81222, @yuja wrote:

Anyway, I just thought using CamelCase in Rust would be slightly nicer and
simpler. If that makes things complicated, I'll drop my idea and stick to
anything that is simpler.

Jan 3 2019, 10:24 AM

Dec 22 2018

kevincox accepted D5441: rust-cpython: binding for LazyAncestors.
Dec 22 2018, 11:57 AM

Dec 15 2018

kevincox accepted D5441: rust-cpython: binding for LazyAncestors.
Dec 15 2018, 8:14 AM
kevincox accepted D5440: rust: core implementation for lazyancestors.
Dec 15 2018, 8:08 AM