Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
str: a better tr command
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  10 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
elzr  
View profile  
 More options Oct 6 2007, 4:47 am
From: elzr <ely.pa...@gmail.com>
Date: Sat, 06 Oct 2007 08:47:50 -0000
Local: Sat, Oct 6 2007 4:47 am
Subject: str: a better tr command
The tr command has always been a blessing and yet I've always found it
bothersome. Not only do I always get confused with direction (is it
"1st word TO, 2nd word FROM" or the reverse?), I just hate having to
decide every single time. Worst, it wreaks havoc with my habits: after
a long time translating in the same direction my fingers learn it and
next time I want the opposite direction it takes several annoying
tries to unlearn the habit.

So I came up with str ("super/simple/synchronous tr"), which avoids
the direction decision by doing both at once, each one presented in an
individual vertical frame. This is not only much faster in practice,
it's more unconscious and habit-friendly. Remember, thought is
irksome!

Cheers!


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "a better tr command" by Jonathan Aquino
Jonathan Aquino  
View profile  
 More options Oct 6 2007, 8:04 pm
From: "Jonathan Aquino" <jonathan.aqu...@gmail.com>
Date: Sat, 6 Oct 2007 17:04:03 -0700
Local: Sat, Oct 6 2007 8:04 pm
Subject: RE: a better tr command
Beautiful idea and execution, elzr! You must be a student of Raskin/Cooper.

Jon


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
elzr  
View profile  
 More options Oct 7 2007, 4:50 am
From: elzr <ely.pa...@gmail.com>
Date: Sun, 07 Oct 2007 01:50:09 -0700
Local: Sun, Oct 7 2007 4:50 am
Subject: Re: a better tr command
Heh, you got me there, I'm a Raskin fan. Cooper has been under my
radar for a long while but I've never read him. Is he good?

On Oct 6, 7:04 pm, "Jonathan Aquino" <jonathan.aqu...@gmail.com>
wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jonathan Aquino  
View profile  
 More options Oct 7 2007, 1:12 pm
From: "Jonathan Aquino" <jonathan.aqu...@gmail.com>
Date: Sun, 7 Oct 2007 10:12:33 -0700
Local: Sun, Oct 7 2007 1:12 pm
Subject: RE: a better tr command
I enjoyed his About Face. Some are turned off by his opinionated style; I
didn't mind it.

Another opinionated book I am currently enjoying (about English grammar) :
The Elements of Style, by Strunk and White.

Jon


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
elzr  
View profile  
 More options Oct 8 2007, 3:38 am
From: elzr <ely.pa...@gmail.com>
Date: Mon, 08 Oct 2007 07:38:32 -0000
Local: Mon, Oct 8 2007 3:38 am
Subject: Re: a better tr command
Ah, Strunk & White--"vigor is a by-product of brevity." Great book.

I've found opinionated-ness, when clearly stated as so, to be actually
a mark of good writing. The Economist, for instance, introduces its
opinions with a classy "this newspaper believes".

Bad writers muddy the waters, good ones state clearly what is fact and
what is their opinion. Every writer has opinions on what she's writing
(otherwise, why write?). Being clear about them is just one more way
to be objective.

So let's give About Face a try. :)

On Oct 7, 12:12 pm, "Jonathan Aquino" <jonathan.aqu...@gmail.com>
wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "cool command: switch" by Jonathan Aquino
Jonathan Aquino  
View profile  
 More options Oct 20 2007, 9:35 pm
From: "Jonathan Aquino" <jonathan.aqu...@gmail.com>
Date: Sat, 20 Oct 2007 18:35:58 -0700
Local: Sat, Oct 20 2007 9:35 pm
Subject: cool command: switch
Here's a neat command: switch

    Example: switch tree | sky => blue, tree => green, sun => orange
    Returns: green

If the key cannot be found, the last option is returned.

    Example: switch rock | sky => blue, tree => green, sun => orange
    Returns: orange

Jon


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Brian  
View profile  
 More options Oct 21 2007, 4:54 pm
From: Brian <armkne...@gmail.com>
Date: Sun, 21 Oct 2007 20:54:24 -0000
Local: Sun, Oct 21 2007 4:54 pm
Subject: Re: cool command: switch
That's a good command, Jon.  Thanks!

It reminds me of this old discussion we had about boolean switches:
http://groups.google.com/group/YubNub/browse_thread/thread/fadfc48783...

On Oct 20, 8:35 pm, "Jonathan Aquino" <jonathan.aqu...@gmail.com>
wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Brian  
View profile  
 More options Oct 21 2007, 6:38 pm
From: Brian <armkne...@gmail.com>
Date: Sun, 21 Oct 2007 22:38:13 -0000
Local: Sun, Oct 21 2007 6:38 pm
Subject: Re: cool command: switch
I created a command "searchswitchtest" to test it out:

yubnub {switch {% 1 %s} | g => {url g {% 2- %s}}, y => {url y {% 2-
%s}}}

My command isn't very useful, but it's cool to see how "switch" could
be put to use.

On Oct 20, 8:35 pm, "Jonathan Aquino" <jonathan.aqu...@gmail.com>
wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jonathan Aquino  
View profile  
 More options Oct 21 2007, 7:00 pm
From: "Jonathan Aquino" <jonathan.aqu...@gmail.com>
Date: Sun, 21 Oct 2007 16:00:54 -0700
Local: Sun, Oct 21 2007 7:00 pm
Subject: RE: cool command: switch
Cool!


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Klink C  
View profile  
 More options Oct 26 2007, 10:29 am
From: Klink C <mrth...@gmail.com>
Date: Fri, 26 Oct 2007 07:29:45 -0700
Local: Fri, Oct 26 2007 10:29 am
Subject: Re: cool command: switch
I think I understand this now- It's much easier than continually
piping IfThen commands like I tried.

On Oct 20, 9:35 pm, "Jonathan Aquino" <jonathan.aqu...@gmail.com>
wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »