Page MenuHomePhabricator

johnstiles (John Stiles)
User

Projects

User does not belong to any projects.

User Details

User Since
May 25 2018, 1:49 AM (64 w, 4 d)

Recent Activity

Jun 17 2018

johnstiles committed rHG9abe91a503da: graph: improve graph output by using Unicode characters.
graph: improve graph output by using Unicode characters
Jun 17 2018, 12:20 AM

Jun 16 2018

johnstiles closed D3665: graph: improve graph output by using Unicode characters.
Jun 16 2018, 8:57 PM
johnstiles committed rHG2064e78f3280: graph: improve graph output by using Unicode characters.
graph: improve graph output by using Unicode characters
Jun 16 2018, 8:57 PM
johnstiles added a comment to D3665: graph: improve graph output by using Unicode characters.

Thanks for the assist, @smf ! I appreciate it.

Jun 16 2018, 8:06 PM
johnstiles added a comment to D3665: graph: improve graph output by using Unicode characters.

Next patch, emoji!

Jun 16 2018, 5:18 PM
johnstiles added a comment to D3665: graph: improve graph output by using Unicode characters.

Thanks for the concrete feedback. I've uploaded a new diff. The (EXPERIMENTAL) tag has been added and I am now using hg export to generate the diff.

Jun 16 2018, 5:11 PM
johnstiles updated the diff for D3665: graph: improve graph output by using Unicode characters.
Jun 16 2018, 5:10 PM
johnstiles added a comment to D3665: graph: improve graph output by using Unicode characters.

I don’t disagree with your premise, but the comments section of this patch are not really the right venue for this discussion.

Jun 16 2018, 4:41 PM
johnstiles added a comment to D3665: graph: improve graph output by using Unicode characters.

Looks like your font is missing the dashed vertical line, and has an oddly small regular-circle glyph. I don't recognize the font at all so I can't really speak much more to that. Fortunately though...

Jun 16 2018, 3:51 PM
johnstiles added a comment to D3665: graph: improve graph output by using Unicode characters.

For what it's worth, it works great on Linux, so no need to feel sad. That's my primary dev environment. If you aren't interested in actually testing the extension itself I'm not sure why you are posting here, but thank you for the feedback about type con issues with UTF8 on Windows. It was very elucidating.

Jun 16 2018, 3:12 PM
johnstiles added a comment to D3665: graph: improve graph output by using Unicode characters.

Can you provide a screenshot of the actual Windows behavior?

Jun 16 2018, 2:24 PM
johnstiles added a comment to D3665: graph: improve graph output by using Unicode characters.

Are you capable of running the extension?

Jun 16 2018, 9:15 AM
johnstiles added a comment to D3665: graph: improve graph output by using Unicode characters.

Without more context I have no idea what you are trying to show. Windows is
certainly capable of rendering Unicode characters in the console. It is
also very possible to get ? characters if you're running a
non-Unicode-aware tool or if there are encoding mix-up issues. "type con"
and pasting in text from a text editor doesn't really prove anything one
way or the other. (What editor? What encoding did it think the data was?
How does "type con" handle Unicode text? etc.)

Jun 16 2018, 3:15 AM
johnstiles added a comment to D3665: graph: improve graph output by using Unicode characters.

What are you trying to demonstrate here? I'm lost.

Jun 16 2018, 2:45 AM

Jun 15 2018

johnstiles added a comment to D3665: graph: improve graph output by using Unicode characters.

I'm not worried about the date/time info. You can just add in my name.
Thanks :)

Jun 15 2018, 7:00 PM
johnstiles added a comment to D3665: graph: improve graph output by using Unicode characters.
In D3665#58828, @smf wrote:

I've looked this over today and have queued this up :-) Unfortunately, though, the metadata doesn't seem right? I'm not getting your name or email (nor timestamp) for the patch. Do you want me to use the same name from 24e517600b29 (John Stiles <johnstiles@gmail.com>)?

Jun 15 2018, 6:02 PM

Jun 14 2018

johnstiles added a comment to D3665: graph: improve graph output by using Unicode characters.

I have put together an album of various fonts from my discussions with @yuja earlier in the thread: https://imgur.com/a/xFkj4zv

Jun 14 2018, 8:52 PM
johnstiles added a comment to D3665: graph: improve graph output by using Unicode characters.

Side note: I'm unfamiliar with the lingo here, what's +0 on a feature? Indifference?

Jun 14 2018, 8:22 PM
johnstiles added a comment to D3665: graph: improve graph output by using Unicode characters.

It all depends on your terminal font. It looks like the font you're using now has issues with U+2506 ┆ and is otherwise working as expected.

Jun 14 2018, 8:10 PM

Jun 8 2018

johnstiles added a comment to D3665: graph: improve graph output by using Unicode characters.

Hi there @indygreg and @yuja -- are you happy with the diff as it currently stands? Do you think this needs any additional work?

Jun 8 2018, 2:45 PM

Jun 3 2018

johnstiles added a comment to D3665: graph: improve graph output by using Unicode characters.

How do the new glyphs look in PuTTY with Deja Vu?
Is there anything else that you need me to look at in this patch?

Jun 3 2018, 3:09 AM

May 31 2018

johnstiles added a comment to D3665: graph: improve graph output by using Unicode characters.

OK, I've fixed the latest nits in this diff, as well as changing the circle characters as discussed to:

May 31 2018, 2:01 AM
johnstiles updated the diff for D3665: graph: improve graph output by using Unicode characters.
May 31 2018, 1:59 AM
johnstiles added a comment to D3665: graph: improve graph output by using Unicode characters.

I experimented some more in Linux and got some surprisingly different outcomes. Fallback rules definitely vary! Anyway, I think these glyphs are going to work the best across the widest variety of fonts. They are in the same character group so they should all be roughly the same size and shape, and in most monospace fonts they are large enough to be visually distinct.

May 31 2018, 1:34 AM
johnstiles added a comment to D3665: graph: improve graph output by using Unicode characters.

I'm finding that on OS X, the following two glyphs get good results in almost every font, and great results in Menlo and DejaVu Sans Mono. I wish they popped a little more in Ubuntu Mono but they are still better than the current choices. I'll switch over to Linux now to verify there.
U+235F ⍟
U+25CB ○

May 31 2018, 1:22 AM
johnstiles added a comment to D3665: graph: improve graph output by using Unicode characters.

I think this is a cool idea! I could nitpick some of the glyph choices (e.g. U+233E ⌾ is really small and harder to read than @ and U+25CC ◌ looks like a circle and therefore the standard node type). But overall I like it!
We could roll this functionality into core pretty easily and put it behind an e.g. ui.graph-unicode config setting. Or we could find some way to templatize the graph characters so people could modify them more easily. Having all the edge and node characters hard-coded feels a bit awkward. But I think this is scope bloat and shouldn't block this feature from landing. Others may have different opinions...

May 31 2018, 12:59 AM

May 30 2018

johnstiles added a comment to D3665: graph: improve graph output by using Unicode characters.

I installed Dejavu Sans Mono from https://dejavu-fonts.github.io/ and it works great!

May 30 2018, 5:03 PM
johnstiles added a comment to D3665: graph: improve graph output by using Unicode characters.

FWIW, this isn't rendering nicely with PuTTY on Windows 10. The U+25EF ◯ glyph is being truncated on the right side. I'm also seeing empty squares for U+233E ⌾ and other code points. Using Courier New as the terminal font. LANG=en_US.UTF-8 and TERM=xterm-256color, so Mercurial detects the encoding as UTF-8.
Not a show stopper. But a bit disappointing. I can probably safely blame PuTTY/Windows here.

May 30 2018, 4:12 PM
johnstiles added a comment to D3665: graph: improve graph output by using Unicode characters.

A proper warning is now issued when the encoding is not UTF-8, or when East-Asian ambiguous characters will be rendered as wide characters.
The tests have been updated to check these warnings.
Yuya, I believe this should address everything we discussed. Let me know if you see a need for any further changes.

May 30 2018, 3:38 AM
johnstiles updated the diff for D3665: graph: improve graph output by using Unicode characters.
May 30 2018, 3:35 AM
johnstiles updated the diff for D3665: graph: improve graph output by using Unicode characters.
May 30 2018, 3:29 AM

May 29 2018

johnstiles added a comment to D3665: graph: improve graph output by using Unicode characters.
In D3665#57649, @smf wrote:

johnstiles (John Stiles) <phabricator@mercurial-scm.org> writes:

johnstiles added a comment.

yuya, I believe these patches should address all of your concerns except for `encoding._wide`. I am not sure what your expectation is for that. I don't think it would make sense to silently disable the extension if `encoding._wide` is set; IMO that would cause user confusion. If a user sees that the log lines are not lining up properly, that is easy to understand, diagnose and fix (change your Terminal font). If the extension just silently doesn't work, that is much harder to fix.
Let me know if you see anything else that you would like addressed! Thanks :)

Oh, crazy. I just started hacking something like this up last week. I'll
have to check this out.

May 29 2018, 10:20 PM
johnstiles added a comment to D3665: graph: improve graph output by using Unicode characters.

yuya, I believe these patches should address all of your concerns except for encoding._wide. I am not sure what your expectation is for that. I don't think it would make sense to silently disable the extension if encoding._wide is set; IMO that would cause user confusion. If a user sees that the log lines are not lining up properly, that is easy to understand, diagnose and fix (change your Terminal font). If the extension just silently doesn't work, that is much harder to fix.

May 29 2018, 3:20 AM
johnstiles updated the diff for D3665: graph: improve graph output by using Unicode characters.

getprettygraphnode now honors HGPLAIN and UI encoding type.
Added tests.

May 29 2018, 3:03 AM

May 28 2018

johnstiles updated the diff for D3665: graph: improve graph output by using Unicode characters.

Corrected indenting issue. (In converting from 2-space to 4-space indents, I misaligned this block.)

May 28 2018, 7:40 PM
johnstiles updated the diff for D3665: graph: improve graph output by using Unicode characters.

Addressed warnings found by test-check-code.t.

May 28 2018, 7:25 PM
johnstiles updated the diff for D3665: graph: improve graph output by using Unicode characters.

Converted non-ASCII characters to `\xNN' form for Python 3 compatibility.
Converted sys.stdout.encoding to encoding.encoding.

May 28 2018, 6:05 PM

May 26 2018

johnstiles created D3665: graph: improve graph output by using Unicode characters.
May 26 2018, 2:25 AM

May 25 2018

johnstiles committed rHG24e517600b29: graph: add outputgraph() function, called by ascii() to print.
graph: add outputgraph() function, called by ascii() to print
May 25 2018, 3:47 PM
johnstiles closed D3655: graph: add outputgraph() function, called by ascii() to print the graph to the ui..
May 25 2018, 3:47 PM
johnstiles created D3655: graph: add outputgraph() function, called by ascii() to print the graph to the ui..
May 25 2018, 2:14 AM