
Show HN: Strans – Sed alternative that automatically learns from examples - inventitech
https://github.com/Inventitech/strans
======
projectramo
So you are describing the end effect and the program figures out what you
want? Wow. This post has inspired me. I want to add a comment here that:

1\. makes you laugh

2\. blows your mind with its insight

3\. is considered deeply relevant

I can't actually come up with it, but now that I have given you the
description, please simulate the comment in your mind and give me credit for
it.

------
dopylitty
This is a good article to come up in Maruary or Apruary.

~~~
O_H_E
Does that refers for the months of March and April???

~~~
rgoulter
Jan -> January, Feb -> February; Mar -> ... Frequently used parts of language
are often irregular. Fortunately, I don't think plaintext you'd use sed
against is as irregular.

~~~
O_H_E
Well, I understand this comment, but your original is still unclear to me. You
might want to clarify it for others.

------
solarized
I'm interested. Till i read "You need dotnet to run strans." i close my
browser tab.

------
lysium
That’s pretty cool. I guess Excels flash fill uses the same engine?

Would like to see more examples than First Middle Last.

~~~
inventitech
I am not sure which implementation Excel uses under the hood -- Excel's flash
fill feature has been there for quite some time; PROSE (which strans uses) has
not, and Excel is not listed in its impact section. So this seems to hint at
the fact that the engine Excel uses is different. Anyhow, the idea behind both
definitely comes from the same team, and Sumit Gulwani in particular.

~~~
ygra
Oh wow. I've learned about Excel's Flash Fill only recently and wasn't even
aware that the same thing is available as a library as well.

PowerShell's Convert-String is very rough around the edges, though. Seems more
like a proof of concept that ended up slipping into a release.

~~~
inventitech
Yup, perhaps that's why it's missing in the latest PowerShell release ...
[https://docs.microsoft.com/en-
us/powershell/module/Microsoft...](https://docs.microsoft.com/en-
us/powershell/module/Microsoft.PowerShell.Utility/Convert-
String?view=powershell-5.1&viewFallbackFrom=powershell-6)

------
fooblat
I think this could use a better title. From the current one, I was expecting a
tutorial or a series of learning examples for using sed.

~~~
inventitech
Oh, I now see the ambiguity you refer to. What about this:

Strans – an alternative to sed that automatically learns from examples,
instead of having to program yourself

Unfortunately, I can't change the title anymore

~~~
O_H_E
I think you can mail "hn@ycombinator.com" for title change. You might also ask
for their input.

Strans – sed alternative that automatically learns a string-transformation
from an example

Strans - auto text manipulation from sample input-output

sed without the obscure part

