Hacker Newsnew | past | comments | ask | show | jobs | submit | birchb's commentslogin

Date 1.4.2023


I had a look at this library today.

Quote the author: "The script library is implemented entirely in Go, and does not require any external userland programs." Sorry but that's not scripting anymore. We all like using userland programs! it is The Way.

Most programs tell you why they failed on stderr. Seems like stderr is lost when a pipe component fails. Strangely stderr and stdout are conflated in the pipe structure - there is no way to get stderr!

You just get the numeric exit status.

IO redirection appears to be missing.

Difficult to use in production.


Orca is great fun. I was inspired to start write a derivative application - A live-coding logic simulator using the same TUI ideas. I've just got past the prototype-hackery stage and am using it to model a real piece of hardware.

https://asciinema.org/a/447367

https://github.com/birchb1024/betula/blob/trunk/README.md

Kudos to Devine Lu Linvega

  .1D2..V2..2D5.....2D3....5D8......8DD.......2D3..........
  ..\*:04......:01B....:03D...:04P.....:08F......:06J.......


No worries mate. Your point is basically 'What a fuss over a very simple bit of code.'? I'm as surprised as you are.


did you try the '-format json' option?


I love your enthusiasm, and thanks for the code. But 1) the above only works with sorted input and 2) adding it to find that would be like adding '-v' to 'cat' which as we know is considered harmful. http://harmful.cat-v.org/cat-v/


Actually, what it works with is a partially sorted input: an input in some tree-order input, which is what any recursive file system traversal will always put out. It will work with depth first or breadth-first order, with usefully different results, and that order preserved.

All it is doing is hiding the redundancy with spaces to improve the human readability of find's output.

Here it is on the same data in breadth-first. Note the lack of any lexicographic sort: "interfaces" is flanked by "if-down.d" and "if-pre-up.d":

  /etc/network
              /if-post-down.d
              /if-down.d
              /interfaces.d
              /interfaces
              /if-pre-up.d
              /if-up.d
              /if-post-down.d/wireless-tools
                             /wpasupplicant
                             /avahi-daemon
              /if-down.d/resolvconf
                        /wpasupplicant
                        /avahi-autoipd
              /if-pre-up.d/wireless-tools
                          /wpasupplicant
                          /ethtool
              /if-up.d/ntpdate
                      /wpasupplicant
                      /000resolvconf
                      /openssh-server
                      /ethtool
                      /avahi-autoipd
                      /slrn
                      /avahi-daemon
My first program in TXR Lisp in the grandparent comment builds the tree structure from the paths in any order and then prints that, so the paths could be scrambled into random order, yet it will recover the tree structure.

However, not munging the the output in that way and just tweaking the original output for readability has some advantages


Um you can get actual trees with graphviz, or my favourite, YeD. I will add an example of that. https://github.com/birchb1024/frangipanni/issues/7



Done


OK good idea, I was coming round to that myself. https://github.com/birchb1024/frangipanni/issues/5


I did not know that. But then it's BSD, right? http://harmful.cat-v.org/cat-v/.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: