Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Schwartzian transform
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==History== The first known online appearance of the Schwartzian transform is a December 16, 1994 [http://groups.google.com/group/comp.unix.shell/browse_frm/thread/31da970cebb30c6d?hl=en posting by Randal Schwartz] to a thread in comp.unix.shell [[Usenet newsgroup]], crossposted to comp.lang.perl. (The current version of the [http://history.perl.org/PerlTimeline.html Perl Timeline] is incorrect and refers to a later date in 1995.) The thread began with a question about how to sort a list of lines by their "last" word: adjn:Joshua Ng adktk:KaLap Timothy Kwong admg:Mahalingam Gobieramanan admln:Martha L. Nangalama Schwartz responded with: <syntaxhighlight lang="perl"> #!/usr/bin/env perl require 5; # New features, new bugs! print map { $_->[0] } sort { $a->[1] cmp $b->[1] } map { [$_, /(\S+)$/] } <>; </syntaxhighlight> This code produces the result: admg:Mahalingam Gobieramanan adktk:KaLap Timothy Kwong admln:Martha L. Nangalama adjn:Joshua Ng Schwartz noted in the post that he was "Speak[ing] with a lisp in Perl", a reference to the idiom's [[Lisp (programming language)|Lisp]] origins. The term "Schwartzian transform" itself was coined by [[Tom Christiansen]] in a follow-up reply. Later posts by Christiansen made it clear that he had not intended to ''name'' the construct, but merely to refer to it from the original post: his attempt to finally name it "The Black Transform" did not take hold ("Black" here being a pun on "schwar[t]z", which means black in German).
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)