|
| 1 | +<html> |
| 2 | + |
| 3 | +<head> |
| 4 | + <title>Platypus</title> |
| 5 | + <link REL="SHORTCUT ICON" HREF="assets/ruby.png"> |
| 6 | + <style> |
| 7 | + body { font-size: 16px; font-family: sans-serif; padding: 0; margin: 0; color: #555; } |
| 8 | + pre { color: green; font-family: monospace; } |
| 9 | + a { color: #77aaff; font-family: sans-serif; text-decoration: none; } |
| 10 | + p { text-align: justify; } |
| 11 | + code { font-size: 0.8em; } |
| 12 | + #container { margin: 0 auto; width: 720px; position: relative; } |
| 13 | + #title { color: #dddddd; border-bottom: 0px solid #ccc; padding: 20px 5px 10px 5px; margin-bottom: 5px; } |
| 14 | + #nav { text-align: left; margin-left: 10px; } |
| 15 | + #nav a { text-decoration: none; padding: 3px; font-size: 10pt; font-weight: bold;} |
| 16 | + #nav a:hover { background: black; color: white; } |
| 17 | + #project { font: 16pt sans-serif; color: black; padding: 0 5px; letter-spacing: 4px; } |
| 18 | + #package { font: bold 46pt sans-serif; color: #ee9999; } |
| 19 | + #corpus { padding: 20px 20px 20px 10px; font-family: helvetica; font-size: 1em; color: #333; line-height: 1.5em;} |
| 20 | + #copy { border-top: 1px solid #ccc; font-size: 70%; padding: 20px; text-align: center; } |
| 21 | + #copy p { text-align: left; } |
| 22 | + #menu { margin-left: 30px; float: right; width: 300px; } |
| 23 | + .bold { font-weight: bold; } |
| 24 | + </style> |
| 25 | +</head> |
| 26 | + |
| 27 | +<body> |
| 28 | +<div id="container"> |
| 29 | + |
| 30 | + <img src="assets/whyduck.jpg" align="right" style="height: 450px; margin: 0 40px -190px 0;" /> |
| 31 | + |
| 32 | + <div id="title" style="clear: both;"> |
| 33 | + <div id="project">Rubyworks</div> |
| 34 | + <div id="package">Platypus</div> |
| 35 | + </div> |
| 36 | + |
| 37 | + <div id="nav"> |
| 38 | + <a href="https://rubydoc.info/gems/platypus">API</a> · |
| 39 | + <a href="https://github.com/rubyworks/platypus">Code</a> · |
| 40 | + <a href="https://github.com/rubyworks/platypus/issues">Issue?</a> |
| 41 | + </div> |
| 42 | + |
| 43 | + <div id="corpus"> |
| 44 | + <p class="bold">Platypus is a small inter-related collection of type-oriented libraries for Ruby. |
| 45 | + Among its quacking talents is a <i>type casting system</i>, a <i>pseudo-type superclass</i> and a |
| 46 | + <i>method overloading mixin</i>.</p> |
| 47 | + |
| 48 | + <div id="menu"> |
| 49 | + For more information see: |
| 50 | + <ul> |
| 51 | + <li><a href="https://rubydoc.info/gems/platypus">API Reference Guide</a></li> |
| 52 | + <li><a href="https://github.com/rubyworks/platypus">Source Code on GitHub</a></li> |
| 53 | + </ul> |
| 54 | + </div> |
| 55 | + |
| 56 | + <h2>Why?</h2> |
| 57 | + |
| 58 | + <p>Platypus is a project about <i>types</i>. Its three libraries address |
| 59 | + usecases for object types that are more nuanced than stock Ruby's provisions. |
| 60 | + It's not uncommon for a Rubyist, especially one new to Ruby, to wonder about |
| 61 | + method-overloading, or complex type checking, or why type conversion isn't more |
| 62 | + generalized. And I dare say, it is not without good reason. These constructs |
| 63 | + are rather intuitive and not without their merits. However, mature Rubyists |
| 64 | + tend to forgo such niceties when weighed against the disadvantages of |
| 65 | + YADSL and having an additional package dependency. Your mileage may of course vary. |
| 66 | + If you are still keen after making such considerations, or would just like |
| 67 | + to learn how such features can be implemented via Ruby's amazing |
| 68 | + metaprogramming capabilities, then the Platypus is here for the riding, |
| 69 | + with fairly mature implementations that have evolved over the years.</p> |
| 70 | + |
| 71 | + <p>Hi.. Ho.. Silver! Away!</p> |
| 72 | + <br/> |
| 73 | + </div> |
| 74 | + |
| 75 | + <div style="position: absolute; top: 9px; right: 0; font-size: 8px; text-align: right;"> |
| 76 | + "I know Why said you are a Duck.<br/> |
| 77 | + But I'm betting it's a Type Error.<br/> |
| 78 | + You ride like a thoroughbred<br/> |
| 79 | + Platypus." |
| 80 | + </div> |
| 81 | + |
| 82 | +</div> |
| 83 | + |
| 84 | +<div id="copy"> |
| 85 | + <div style="margin: 0 auto; width: 700px; font-size: 10pt;"> |
| 86 | + <p>"<i>If it looks like a duck, and quacks like a duck, we have at least to consider |
| 87 | + the possibility that we have a small aquatic bird of the family anatidae on our hands.</i>"</p> |
| 88 | + <p style="text-align: right;">--Douglas Adams</p> |
| 89 | + </div> |
| 90 | + <br/><br/> |
| 91 | + Copyright © 2010 Thomas Sawyer · Image of "Horse on Duck" by WhyTheLuckyStiff (<i>God Speed, Eigenman</i>). |
| 92 | +</div> |
| 93 | + |
| 94 | +</body> |
| 95 | + |
| 96 | +</html> |
0 commit comments