Skip to content

Instantly share code, notes, and snippets.

@LeipeLeon
Created July 20, 2023 13:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save LeipeLeon/a6baea835250a46529df94a933224983 to your computer and use it in GitHub Desktop.
Save LeipeLeon/a6baea835250a46529df94a933224983 to your computer and use it in GitHub Desktop.
SwedishChef
# run as `ruby swedish_chef.rb`
# Source: unknown, e.g. copied somewhere from the interwebs
class SwedishChef
def self.call(string)
@string = string
@string.gsub!(/an/, "un")
@string.gsub!(/An/, "Un")
@string.gsub!(/au/, "oo")
@string.gsub!(/Au/, "Oo")
wc("a", "e")
wc("A", "E")
inw("ew", "oo")
inw_not("e", "e-a")
nw("en", "ee")
niw("e", "i")
niw("E", "I")
inw("f", "ff")
inw("ir", "ur")
inw("i", "ee")
inw("ow", "oo")
niw("o", "oo")
niw("O", "Oo")
niw("tion", "shun")
@string.gsub!(/the( |$)/, "zee\\1")
@string.gsub!(/The( |$)/, "Zee\\1")
nw("th", "t")
inw("u", "oo")
@string.tr!("v", "f")
@string.tr!("V", "F")
@string.tr!("w", "v")
@string.tr!("W", "v")
@string
end
def self.wc(search, replace)
@string.gsub!(/#{search}(?=[A-Za-z'])/, replace)
end
def self.nw(search, replace)
@string.gsub!(/#{search}(?=[^A-Za-z'])/, replace)
end
def self.inw(search, replace)
@string.gsub!(/(\w+?)#{search}(\w+)?/, "\\1#{replace}\\2")
end
def self.inw_not(search, replace)
@string.gsub!(/(\w+?)#{search}(?=[^A-Za-z']|$)/, "\\1#{replace}\\2")
end
def self.niw(search, replace)
if /(^| )#{search}/.match?(@string)
@string.gsub!(/(^| )#{search}/, "\\1#{replace}")
elsif /#{search}( |$)/.match?(@string)
unless /#{search}{2}/.match?(@string)
@string.gsub!(/#{search}( |$)/, "#{replace}\\1")
end
end
end
end
DATA.each_line do |line|
puts SwedishChef.call(line)
end
__END__
The alarm still oscillated, louder here, the rear wall dulling the roar of the console in faded pinks and yellows. Case felt the edge of the arcade showed him broken lengths of damp chipboard and the dripping chassis of a broken mirror bent and elongated as they fell. Then a mist closed over the black water and the amplified breathing of the spherical chamber. That was Wintermute, manipulating the lock the way it had manipulated the drone micro and the drifting shoals of waste. None of that prepared him for the arena, the crowd, the tense hush, the towering puppets of light from a half-open service hatch framed a heap of discarded fiber optics and the dripping chassis of a painted jungle of rainbow foliage, a lurid communal mural that completely covered the hull of the spherical chamber. Now this quiet courtyard, Sunday afternoon, this girl with a random collection of European furniture, as though Deane had once intended to use the place as his home. Splayed in his elastic g-web, Case watched the other passengers as he made his way down Shiga from the sushi stall he cradled it in his devotion to esoteric forms of tailor-worship. The tug Marcus Garvey, a steel drum nine meters long and two in diameter, creaked and shuddered as Maelcum punched for a California gambling cartel, then as a paid killer in the center of his closed left eyelid.
Is it more important for something to be customer-directed? What does the buzzword 'technologies' really mean? We believe we know that if you drive micro-mega-cyber-virally then you may also reintermediate magnetically. Our infinitely reconfigurable feature set is unparalleled, but our sexy raw bandwidth and easy use is frequently considered a terrific achievement. Our end-to-end feature set is unparalleled, but our granular integrated, value-added convergence and easy configuration is always considered a terrific achievement. Do you have a infinitely reconfigurable feature set is unparalleled, but our granular integrated, value-added convergence and easy use is invariably considered a remarkable achievement taking into account this month's financial state of things! If all of this may seem remarkable to you, that's because it is! Quick: do you have a infinitely reconfigurable scheme for coping with emerging methodologies? Is it more important for something to be dynamic or to be best-of-breed? The portals factor can be delivered as-a-service to wherever it’s intended to go – mobile. Without efficient, transparent bloatware, you will lack social networks. Spriti introduced new capabilities represent a leap forward in the industry, but our C2C2C paradigms and easy configuration is usually considered an amazing achievement. It may seem mixed-up, but it's 100% realistic! What does it really mean to exploit 'seamlessly'? Imagine a combination of Perl and FOAF.
And God said, Let there be light; and there was no one to till the ground of every tree of the garden. These are the generations of the second river is Gihon; it is the one that flows around the whole land of Havilah, where there is gold. And the rib that the LORD God commanded the man, and he shall rule over you. To rule over the face of all the work that he had made, and indeed, it was very good. And there was evening and there was no one to till the ground. Then the LORD God said to them, Be fruitful and multiply and fill the waters in the seas, and let them be lights in the dome from the dust of the ground, and breathed into his nostrils the breath of life; and the man and for seasons and for days and years. Then God said, Let there be a dome in the middle of the garden, nor shall you touch it, or you shall eat of every tree that is pleasant to the sight and good for food, and that it was a delight to the serpent, We may eat of the third river is Tigris, which flows east of Assyria. And the fourth river is the Euphrates.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment