3 ms·
All I see in this thread are a bunch of pre-modernists stuck in the middle of the 20th century. Perl 6 is the only language in the world suitable for metaphori
by logicallee 9y ago
All I see in this thread are a bunch of pre-modernists stuck in the middle of the 20th century.
Perl 6 is the only language in the world suitable for metaphorical programming.
For example, how would you implement a load-balanced pool of HTTP web servers over Port 80 in a language like Python, serving Hello World?
In Perl 6 this is just five lines:
imagine web servers, like the droplets of mists of fog
as many as the sun shines through. A clarion: Hello world.
The sun? An http server, its port 80.
Cast off!
I'll steer when I'm ready.
And that's it. What's great about Perl is that you're not stuck with a nautical analogy, you are free to mix metaphors. For example this is another way to do the exact same thing:
race, ye hogs of web servers
the killing time is near. Your cries? Hello world.
The abattoir? An http server, its port 80.
Cast off!
I'll steer ye when I'm ready.
Even though it would hurt any poet's brain to read a metaphor this mixed, there's more than one way to do it, and this is really where Perl 6 shines.
- lilactown 9y agoI now want to try writing web-sonnets using Perl 6's grammar...
- Ultimatt 9y agoLooks more like this... via http://mi.cro.services/ http://mi.cro.services/ use Cro::HTTP::Server; use Cro::HTTP::Router; my $app = route { get -> { content 'text/html', 'Hello World! ' ~ DateTime.now() } } my Cro::Service $service = Cro::HTTP::Server.new( :host('localhost'), :port(9000), :$app ); $service.start; react whenever signal(SIGINT) { $service.stop; say "Goodbye!"; exit; }