3 ms·
That article was a RIDE.
by justinator 2y ago
That article was a RIDE.
- db48x 2y agoYea, I think he has a knack for that. If you want some more I recommend a talk he gave a few years back called “Three Little Words” <https://www.youtube.com/watch?v=e1T7WbKox6s https://www.youtube.com/watch?v=e1T7WbKox6s>.
- agumonkey 2y agoHa, Conway, once again. His talks during early perl6 days were brilliant.. thanks for sharing
- db48x 2y agoYou’re welcome.
- justinator 2y agoDamian is an excellent writer and communicator for sure. But I don't know if it answers the question of what you would use these features in Raku for. If one wanted to compute e to higher precision, I feel like one would use a DSL. But we also don't need to compute e presently.
- db48x 2y agoNo, we don’t need to compute e very often; it’s value is pretty well known. The article is just showing off Raku (or Perl 6 as it was then known) by writing a small program of moderate complexity that still manages to show off some of Raku’s interesting features. Computing approximations of e is merely an interesting exercise; it’s not the point. The question that justinator asked was what good uses Raku’s indefinite series have. This article points out that different ways of approximating e grow at different rates, so it is appropriate to associate a different range of trial values with each of those methods. Dörrie's bounds uses powers of 10 as shown. Others use powers of 2. Newton’s method uses sequential trial values, since it grows really fast: #| Newton's series assess -> \k=0..∞ { sum (0..k)»!»⁻¹ } And several methods compute approximations in a single step, so they don’t take a trial value at all: #| Castellano's coincidence assess { (π⁴ + π⁵) ** ⅙ } #| Sabey's digits assess { (1+2**(-3×(4+5)))**(.6×.7+8⁹) } #| Piskorowski's eight 9s assess { (9/9 + 9**-9**9) ** 9**9**9 } These are a lot of fun, but of course they can also be profound: #| From Euler's Identity assess { (-1+0i) ** (π×i)⁻¹ } For those who are interested, the article shows off a lot of obvious syntactic features like superscripts and hyperoperators, but there are also things like classes and roles and new operators as well. It really is a nice tour.