Hi Patrick,

I agree with you that, like bash, sed syntax could use an improvement (and
so could awk, find, and other unix utilities from the old days). For syntax,
there are several properties that can be traded off: consistency,
readability, succinctness, and probably others. Lack of consistency is often
caused by adding new features over time, like with bash. Readability and
succinctness are partly a trade-off, languages used interactively like
shells need more of the succinctness, while programs written to be reused
need more readability (e.g. in Python you always use parentheses to call a
function, in fish/shell you don't). Lack of consistency is often caused by
new features being added over time that weren't originally plannen, or by
'design by committee'.
I think your proposal with -in_regex / -out_regex is way to verbose for
interactive use, though it is probably more readable that way compared to
/complex/ sed clauses (the s/day/night/ is simple enough for me).

Good languages nearly always had one person that took all the design
decisions, so if others are willing to help you, don't try to form a design
committee. Also, successful open source projects are usually started with
someone who writes a minimally working prototype, and then attracts the
attention of others, not by having only a good idea and asking others to
help without there being any code to start with. That way you will mostly
get a lot of people who have other ideas and advice, but are not actually
interested or motivated enough to get busy with the code (case in point: me
right now. While the idea is nice, I don't have time to invest in coding on
this).

Also note that many people use shell on a daily basis, but specific tools
like sed are used much less often (at least speaking from my own
experience). Also, more and more I see people advise that if you write a
shellscript longer than five lines, switch to python or ruby, so larger
shellscripts in which sed is a common component are getting less popular.
Given that, compared to bash, the fish community is very small, I think the
number of people who'd go through the trouble to install a better sed is
very small.
On the other hand, a sed is much easier to write than a shell, so just go
ahead and make something, and see if it gets any traction.

Jan


On Thu, Jul 7, 2011 at 12:37, Patrick Mc(avery <
[email protected]> wrote:

> Hi Everyone
>
> I am only an enthusiast programmer and truthfully I have not done much
> with shell scripting, before realized what fish was about the syntax
> freaked me out. Sed also freaks me out, again due to the syntax. Do you
> think it would be in keeping with the goals of fish to create a wrapper
> around sed to make it more friendly(and verbose).
>
> For example:
> echo daytime | sed 's/day/night/'
>
> perhaps could be:
> echo daytime | fsed -s -in_regex 'day' -out_regex 'night'
>
> This is nearly useless for this example but perhaps might help once more
> complex options were involved? Has this already been done, is it useful?
>
> BTW I emailed Axel on github, hopefully I'll hear back.
>
> Thanks-Patrick
>
>
> ------------------------------------------------------------------------------
> All of the data generated in your IT infrastructure is seriously valuable.
> Why? It contains a definitive record of application performance, security
> threats, fraudulent activity, and more. Splunk takes this data and makes
> sense of it. IT sense. And common sense.
> http://p.sf.net/sfu/splunk-d2d-c2
> _______________________________________________
> Fish-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/fish-users
>
------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
Fish-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fish-users

Reply via email to