calimeroteknik

Results 24 comments of calimeroteknik

Suggesting this python implementation that can be called as a script as the comments indicate: ```python #!/usr/bin/env python # compatible with python2 and python3, no dependencies except python itself import...

The fix for the corner cases I mentioned introduced a regression: ```sh ~ $ dirname_pbb() { # Usage: dirname "path" dir=${1%%/} [[ $dir == */* ]] || dir=. printf '%s\n'...

Tests find errors, but unfortunately do not prove correctness: ```sh ~ $ dirname_pbb() { # Usage: dirname "path" dir=${1%%/} [[ $dir ]] || dir=// [[ $dir == */* ]] ||...

For `something/` it just strips the ending slash rather than returning dot.

To still find problems we now need to go into non-normalised paths, for example, `something//` I'm not even sure that the original `dirname(1)` is actually POSIX-conformant by all accounts anyway,...

Yes, as noted in my previous comment non-normalised paths are still problematic… but at this point, isn't it safer to just read POSIX rather than retro-engineer busybox through test cases?...

The direct implementation looks standard-conformant to me indeed. (beyond reasonable doubt although without machine-assisted checking) I did not verify the second implementation; unlike `basename` the problem is a little bit...

Using the same concepts as TyXML to generate valid documents via type enforcement, this potential issue came to mind, and I couldn't think of a strategy to handle it. @Drup...

Note: the main advantage in keeping the two separate, is that you can only have one init, but you can have many process/service supervisors. (some of which would run as...

Just keeping in sync with the colors announced by the user-defined theme (toolkit allowing) would be nice indeed. I personally have a dark GTK and Qt theme, so the flashy...