lspitzner / lspitzner/hxtools

hxbrief: Support showing partial lines (stdout/stderr without a newline)

Open
#8 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Haskell
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

hxbrief currently is fully geared towards line-wise buffering. But what about more fine-grained output? Currently, it is not displayed at all by hxbrief.

Challenges:

- The haskell APIs for fetching partial input don't seem to make this easy. I guess one could use https://hackage.haskell.org/package/bytestring-0.10.10.0/docs/Data-ByteString.html#v:hGetNonBlocking together with https://hackage.haskell.org/package/text-2.0/docs/Data-Text-Encoding.html#v:streamDecodeUtf8. The fact that one might get the first byte of a utf8 four-byte-codepoint makes this a bit annoying. Lots of additional state-handling.
- There is the possibility of "incomplete lines" on both stdout and stderr simulatenously. Both may get "updates".

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with hxbrief's current line-wise buffering and the Haskell partial-input APIs linked in the issue. Trace how stdout and stderr are read, including simultaneous incomplete lines and split UTF-8 code points. Done means partial output from both streams is displayed correctly without newlines.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.