Re: [Toybox] How can I contribute

2019-10-17 Thread Rob Landley
On 10/17/19 3:14 PM, Ryan Prichard wrote:
> I thought the order was the other way around (base character, then combining
> character). I tested it with:

The downside of "I had it backwards" is when you _do_ start to remember the
correct way you reverse it again...

Rob
___
Toybox mailing list
Toybox@lists.landley.net
http://lists.landley.net/listinfo.cgi/toybox-landley.net


Re: [Toybox] How can I contribute

2019-10-17 Thread Ryan Prichard via Toybox
On Wed, Oct 16, 2019 at 3:27 PM Rob Landley  wrote:

> Right now toys/posix/ls.c only puts one space between filenames in -C or
> -x mode
> (which is the default output), and I have a todo item to increase that to 2
> spaces (which is what other implementations do). The reason is I
> misunderstood
> how unicode worked and it turns out combining characters don't come
> _after_ the
> character they combine with but before, which means a filename that ends
> with a
> combining character will attach to the space after the filename, and thus
> make
> two filenames visually run together unless you have a two space gap. [...]


I thought the order was the other way around (base character, then
combining character). I tested it with:

printf 'o\xcc\x81o\n' >A.txt
google-chrome A.txt

I see: óo

I also tried printf 'x \xcc\x81a\n', and I sometimes see "x á", but the
terminal seems to think the accent is above the space (e.g. selecting 'a'
doesn't select the accent). The accent appears above the space if I use a
non-monospace font in a browser.

-Ryan
___
Toybox mailing list
Toybox@lists.landley.net
http://lists.landley.net/listinfo.cgi/toybox-landley.net


Re: [Toybox] How can I contribute

2019-10-17 Thread Jarno Mäkipää
On Thu, Oct 17, 2019 at 1:27 AM Rob Landley  wrote:
>
> On 10/14/19 3:07 PM, Denys Nykula wrote:
> >> saw one of the Toybox talks and wanted to see how I could contribute
> >
> > Completing landley.net/toybox/cleanup.html on toys/pending/{dhcp,route}.c
> > to help them out of pending would be most demanded I think.
>
> That's kind of a high bar, though. :)
>
> Right now toys/posix/ls.c only puts one space between filenames in -C or -x 
> mode
> (which is the default output), and I have a todo item to increase that to 2
> spaces (which is what other implementations do). The reason is I misunderstood
> how unicode worked and it turns out combining characters don't come _after_ 
> the
> character they combine with but before, which means a filename that ends with 
> a
> combining character will attach to the space after the filename, and thus make
> two filenames visually run together unless you have a two space gap. The loop
> that needs adjusting is probably the one starting around line 401, I don't
> _think_ tests/ls.test cares (since it has to pass with TEST_HOST and the host
> version generally uses different spacing anyway), but make sure that still 
> passes.

If terminal emulator behaves correctly, such as UXTerm/Xterm does.
Combining chars dont render in space after, but on same area as
previous char. So 'ls' implementation even with on space only between
filenames are readable. That been said most other terminals dont
render them correctly. I tested this on xterm, uxterm, st, alacritty,
termite, terminator (I have lots of terminals installed because i
were testing CSI escapes for vi)

with terminator even the two spaces are not enough between zalgo text
filenames... :)

but long story short this problem is mostly terminal emulators
problem, but having 2 spaces between filenames brings consistency with
other implementations anyway.

-Jarno




>
> Or, I just taught xargs to ignore -P but it would be nice if somebody actually
> implemented that instead of ignoring it.
>
> Rob
> ___
> Toybox mailing list
> Toybox@lists.landley.net
> http://lists.landley.net/listinfo.cgi/toybox-landley.net
___
Toybox mailing list
Toybox@lists.landley.net
http://lists.landley.net/listinfo.cgi/toybox-landley.net


Re: [Toybox] How can I contribute

2019-10-17 Thread Andrew Ilijic
Thank you Rob,

I'll start by taking a look at the `ls` command and let you know how I make out.

On Wed, Oct 16, 2019 at 6:27 PM Rob Landley  wrote:
>
> On 10/14/19 3:07 PM, Denys Nykula wrote:
> >> saw one of the Toybox talks and wanted to see how I could contribute
> >
> > Completing landley.net/toybox/cleanup.html on toys/pending/{dhcp,route}.c
> > to help them out of pending would be most demanded I think.
>
> That's kind of a high bar, though. :)
>
> Right now toys/posix/ls.c only puts one space between filenames in -C or -x 
> mode
> (which is the default output), and I have a todo item to increase that to 2
> spaces (which is what other implementations do). The reason is I misunderstood
> how unicode worked and it turns out combining characters don't come _after_ 
> the
> character they combine with but before, which means a filename that ends with 
> a
> combining character will attach to the space after the filename, and thus make
> two filenames visually run together unless you have a two space gap. The loop
> that needs adjusting is probably the one starting around line 401, I don't
> _think_ tests/ls.test cares (since it has to pass with TEST_HOST and the host
> version generally uses different spacing anyway), but make sure that still 
> passes.
>
> Or, I just taught xargs to ignore -P but it would be nice if somebody actually
> implemented that instead of ignoring it.
>
> Rob
___
Toybox mailing list
Toybox@lists.landley.net
http://lists.landley.net/listinfo.cgi/toybox-landley.net


Re: [Toybox] How can I contribute

2019-10-16 Thread Rob Landley
On 10/14/19 3:07 PM, Denys Nykula wrote:
>> saw one of the Toybox talks and wanted to see how I could contribute
> 
> Completing landley.net/toybox/cleanup.html on toys/pending/{dhcp,route}.c
> to help them out of pending would be most demanded I think.

That's kind of a high bar, though. :)

Right now toys/posix/ls.c only puts one space between filenames in -C or -x mode
(which is the default output), and I have a todo item to increase that to 2
spaces (which is what other implementations do). The reason is I misunderstood
how unicode worked and it turns out combining characters don't come _after_ the
character they combine with but before, which means a filename that ends with a
combining character will attach to the space after the filename, and thus make
two filenames visually run together unless you have a two space gap. The loop
that needs adjusting is probably the one starting around line 401, I don't
_think_ tests/ls.test cares (since it has to pass with TEST_HOST and the host
version generally uses different spacing anyway), but make sure that still 
passes.

Or, I just taught xargs to ignore -P but it would be nice if somebody actually
implemented that instead of ignoring it.

Rob
___
Toybox mailing list
Toybox@lists.landley.net
http://lists.landley.net/listinfo.cgi/toybox-landley.net


Re: [Toybox] How can I contribute

2019-10-14 Thread Denys Nykula
> saw one of the Toybox talks and wanted to see how I could contribute

Completing landley.net/toybox/cleanup.html on toys/pending/{dhcp,route}.c
to help them out of pending would be most demanded I think.
___
Toybox mailing list
Toybox@lists.landley.net
http://lists.landley.net/listinfo.cgi/toybox-landley.net