$epsilon = 1.0e-6 feels too big for Rat()
Folks, I am only beginning to unwrap the christmas present but I immediately fell in love with the perl6 arithmetic system. Not is it rich but it is also fast. % perl6 > 340282366920938463463374607431768211297.is-prime True > 340282366920938460843936948965011886881.is-prime False And type conversions between numbers are smooth and seamless. I couldn’t help loving Rat … except for one thing. % perl6 > pi 3.14159265358979 > pi.Rat 3.141593 > pi.Rat.nude (355 113) That’s so 5th century! https://en.wikipedia.org/wiki/Zu_Chongzhi And of course, > pi.Rat == pi False https://perl6advent.wordpress.com/2009/12/14/day-14-going-to-the-rats/ However, we can be more precise by simply giving 0 to $epsilon. > pi.Rat(0).nude (245850922 78256779) > pi.Rat(0) == pi True > e.Rat(0) == e True > log(2).Rat(0) == log(2) True This I feel more natural. http://doc.perl6.org/routine/Rat#role_Real says the default $epsilon is 1e-6. Why so large? Why not zero? Dan the Perl6 Newbie signature.asc Description: Message signed with OpenPGP using GPGMail
Re: $epsilon = 1.0e-6 feels too big for Rat()
Considering that a non-fat Rat has a 64-bit denominator, I would expect conversions from Num to make use of that full precision by default, and not round off to 6 decimal places. -- Darren Duncan
Re: release?
On Tue, Dec 29, 2015 at 11:39 AM, webmindwrote: > > Yes, wouldn't it make sense to couple the rakudo release version to the > language it implements? > Naw -- there'll be probably monthly rakudo releases but the Specification releases should be much less frequent -- like maybe every few months (at first) or yearly is my guess. This might be less confusing if: * We referred more often to rakudo instead of perl6 when we mean the implementation (you compile with gcc, not "c"; rakudo confusingly calls it's interpreter "perl6") * Get more implementations! If we had like 3-4 implementations to choose from then it might be more obvious what was going on. Probably there would be a stronger argument for the "perl6" binary to be either renamed to "rakudo" or to be a symlink to whatever your current-perl6-implementation is were there an alternative implementation ... but there isn't... so ... I guess someone should do that. :) ... though there actually ARE a few others, but none nearly as complete as Rakudo, afaik * https://github.com/sorear/niecza - CLR * http://fglock.github.io/Perlito/ - Perlito6 written mostly in Perl6 (lots of other interesting Perlito stuff) * http://perl6.org/compilers/features - comparison * several abandoned ones (e.g. Pugs) --Brock
Jonathan's "Perl 6 Introductory course"
Jonathan's intro course, in pdf, here: https://github.com/rakudo/star/raw/master/docs/2015-spw-perl6-course.pdf is excellent, of course. But I really like the presentation theme and the slide formatting! Does anyone know what slide-making process he uses? So far the best I have found that meets my needs is using asciidoc input with Asciidoctor's Deck.js backend. I think I can convert from the generated html to pdf but can't say for sure yet, but it is the good looks of his slides that I'm primarily interested in. Thanks. Best regards, -Tom
Re: release?
That's how I have Perl 6 (and a number of other packages) set up; a version-agnostic name in a $PATH place, symbolically linking to package directory. On 12/31/15, Philip Hazeldenwrote: > Note that if we want scripts to be interpreter-agnostic, the perl6 binary > needs to exist for #! purposes. So renaming it would be bad, but a simlink > would work. > > On Thu, Dec 31, 2015 at 2:27 PM Brock Wilcox > wrote: > >> On Tue, Dec 29, 2015 at 11:39 AM, webmind wrote: >> >>> >>> Yes, wouldn't it make sense to couple the rakudo release version to the >>> language it implements? >>> >> >> Naw -- there'll be probably monthly rakudo releases but the Specification >> releases should be much less frequent -- like maybe every few months (at >> first) or yearly is my guess. >> >> This might be less confusing if: >> * We referred more often to rakudo instead of perl6 when we mean the >> implementation (you compile with gcc, not "c"; rakudo confusingly calls >> it's interpreter "perl6") >> * Get more implementations! If we had like 3-4 implementations to choose >> from then it might be more obvious what was going on. >> >> Probably there would be a stronger argument for the "perl6" binary to be >> either renamed to "rakudo" or to be a symlink to whatever your >> current-perl6-implementation is were there an alternative implementation >> ... but there isn't... so ... I guess someone should do that. :) >> >> ... though there actually ARE a few others, but none nearly as complete >> as >> Rakudo, afaik >> >> * https://github.com/sorear/niecza - CLR >> * http://fglock.github.io/Perlito/ - Perlito6 written mostly in Perl6 >> (lots of other interesting Perlito stuff) >> * http://perl6.org/compilers/features - comparison >> * several abandoned ones (e.g. Pugs) >> >> --Brock >> >> >
Re: release?
On 29/12/15 17:13, andy_b...@wiwb.uscourts.gov wrote: > On Tue, Dec 29, 2015 at 01:57:57AM -0800, Darren Duncan wrote: >>> On that note, are there going to be Perl 6 versions 6.x.y where {x,y} are >> > integers? Will 6.0.0 be the first such one? -- Darren Duncan > > On Tue, Dec 29, 2015 Patrick Michaud wrote: >> "Perl 6" is a language, not an implementation of that language. Think > of "Perl 6" as being like "C", "C++", "Javascript", etc., where the > language is separate from the (many) implementations of that language. > > I'm just a very ordinary perl hacker here, but Alex's point I think > should be addressed. Most of us (i.e ordinary, un-language > implementation geeks) are looking to download a Perl6 and if it's rakudo > x.y.z, fine, but make that seem like something like perl.6.tar.gz. It > would seem that gently introducing the complete separation w/ a little > of Perl's famous (to me) "syntatic sugar" (meta-syntatic?) to help us > getting started. Maybe the lower case distinction, "perl6.x.y" vs "Perl > 6.c", would soothe both sides of the discussion. Yes, wouldn't it make sense to couple the rakudo release version to the language it implements? Thanks for all your replies. -- GPG Key: https://u2m.nl/data/webmind.asc GPG Fingerprint: 0506976E 234653B4 A628EC33 E23D16EE FCF154AE XMPP webm...@puscii.nl: D79970A8 7EC43E29 186D86BA 590F20F6 4C7930B8 XMPP webm...@laglab.org: 11E91112 091881F7 53EF6108 63C48543 C74D035C u2m.nl (exp: 08/04/2016) SHA256: C2:40:67:22:25:52:29:AF:DF:50:4E:2A:6B:32:6D:BC:5B:1E:CA:7D:52:3B:4C:4A:21:5D:C8:E5:AE:7D:1A:09 Puscii (exp: 04/03/2016) SHA256: F9:C7:B1:B7:90:6B:17:BF:84:93:93:7C:0F:B4:FD:BE:E3:C0:71:9D:83:01:ED:3A:96:FE:FC:82:9D:30:51:C9 0xFCF154AE.asc Description: application/pgp-keys signature.asc Description: OpenPGP digital signature
Re: Bug or PEBCAK?
Thank you. I'm not sure how to classify this one. It never occurred to me that a new Linux installation would NOT include a C compiler. Installing gcc fixed that. On 12/31/15, Dominique Dumontwrote: > On Wednesday 30 December 2015 19:42:38 Parrot Raiser wrote: >> probing whether your compiler thinks that it is gcc Can't compile >> simple gcc probe, so something is badly wrong at build/probe.pm line >> 92. > > Looks like probe.pm cannot find gcc when trying to compile a small program. > > > HTH > -- > https://github.com/dod38fr/ -o- http://search.cpan.org/~ddumont/ > http://ddumont.wordpress.com/ -o- irc: dod at irc.debian.org >
Re: release?
Note that if we want scripts to be interpreter-agnostic, the perl6 binary needs to exist for #! purposes. So renaming it would be bad, but a simlink would work. On Thu, Dec 31, 2015 at 2:27 PM Brock Wilcoxwrote: > On Tue, Dec 29, 2015 at 11:39 AM, webmind wrote: > >> >> Yes, wouldn't it make sense to couple the rakudo release version to the >> language it implements? >> > > Naw -- there'll be probably monthly rakudo releases but the Specification > releases should be much less frequent -- like maybe every few months (at > first) or yearly is my guess. > > This might be less confusing if: > * We referred more often to rakudo instead of perl6 when we mean the > implementation (you compile with gcc, not "c"; rakudo confusingly calls > it's interpreter "perl6") > * Get more implementations! If we had like 3-4 implementations to choose > from then it might be more obvious what was going on. > > Probably there would be a stronger argument for the "perl6" binary to be > either renamed to "rakudo" or to be a symlink to whatever your > current-perl6-implementation is were there an alternative implementation > ... but there isn't... so ... I guess someone should do that. :) > > ... though there actually ARE a few others, but none nearly as complete as > Rakudo, afaik > > * https://github.com/sorear/niecza - CLR > * http://fglock.github.io/Perlito/ - Perlito6 written mostly in Perl6 > (lots of other interesting Perlito stuff) > * http://perl6.org/compilers/features - comparison > * several abandoned ones (e.g. Pugs) > > --Brock > >
Re: Bug or PEBCAK?
On Wednesday 30 December 2015 19:42:38 Parrot Raiser wrote: > probing whether your compiler thinks that it is gcc Can't compile > simple gcc probe, so something is badly wrong at build/probe.pm line > 92. Looks like probe.pm cannot find gcc when trying to compile a small program. HTH -- https://github.com/dod38fr/ -o- http://search.cpan.org/~ddumont/ http://ddumont.wordpress.com/ -o- irc: dod at irc.debian.org
Re: Jonathan's "Perl 6 Introductory course"
On 31/12/15 20:43, Tom Browder wrote: > Jonathan's intro course, in pdf, here: > > https://github.com/rakudo/star/raw/master/docs/2015-spw-perl6-course.pdf > > is excellent, of course. But I really like the presentation theme and > the slide formatting! > > Does anyone know what slide-making process he uses? > > So far the best I have found that meets my needs is using asciidoc > input with Asciidoctor's Deck.js backend. I think I can convert from > the generated html to pdf but can't say for sure yet, but it is the > good looks of his slides that I'm primarily interested in. Looks like Beamer (latex+beamer). An easy step to beamer is to use pandoc, which is what I use when I need to make a presentation. Though it's not as flexible as writing latex directly, it's pretty decent because with pandoc, your input is just markdown. Much (much!) easier on the fingers and on the eyes :) (Not sure how strict we are on "off-topic" stuff so I will stop here!)
Re: Jonathan's "Perl 6 Introductory course"
On Thu, Dec 31, 2015 at 9:26 AM, Sitaram Chamartywrote: > On 31/12/15 20:43, Tom Browder wrote: >> https://github.com/rakudo/star/raw/master/docs/2015-spw-perl6-course.pdf ... >> Does anyone know what slide-making process he uses? ... > Looks like Beamer (latex+beamer). > > An easy step to beamer is to use pandoc, which is what I use when I need > to make a presentation. Though it's not as flexible as writing latex > directly, it's pretty decent because with pandoc, your input is just > markdown. Much (much!) easier on the fingers and on the eyes :) Great info, Sitaram, thanks so much! ...Oops, I see several paths leading there. Any hints on your work flow? Best regards, -Tom
Re: $epsilon = 1.0e-6 feels too big for Rat()
Considering that the Chinese 5th Century is 1849, I would expect http://babel.hathitrust.org/cgi/pt?id=mdp.39015046627348 to present less zuo. -jas On 31 December 2015 at 03:48, Darren Duncanwrote: > Considering that a non-fat Rat has a 64-bit denominator, I would expect > conversions from Num to make use of that full precision by default, and not > round off to 6 decimal places. -- Darren Duncan >
Re: Jonathan's "Perl 6 Introductory course"
Thanks Sitaram and Moritz! -Tom
Re: Jonathan's "Perl 6 Introductory course"
On 31/12/15 21:26, Tom Browder wrote: > On Thu, Dec 31, 2015 at 9:26 AM, Sitaram Chamartywrote: >> On 31/12/15 20:43, Tom Browder wrote: >>> https://github.com/rakudo/star/raw/master/docs/2015-spw-perl6-course.pdf > ... >>> Does anyone know what slide-making process he uses? > ... >> Looks like Beamer (latex+beamer). >> >> An easy step to beamer is to use pandoc, which is what I use when I need >> to make a presentation. Though it's not as flexible as writing latex >> directly, it's pretty decent because with pandoc, your input is just >> markdown. Much (much!) easier on the fingers and on the eyes :) > > Great info, Sitaram, thanks so much! > > ...Oops, I see several paths leading there. Any hints on your work flow? The basic stuff is fairly simple, and the pandoc site has decent help. It's basically markdown, except a simple (non-standard-markdown) syntax for the title and the author. Then you run a command like `pandoc -i foo.mkd -o foo.pdf -t beamer -V theme:Darmstadt [...]`. Note that pandoc can't do things like vertical split slides, etc. (AFAIK), and I've never really tried to figure out how to change the colors, fonts, etc., either. The nice thing about pandoc is that it can write several different formats; see [1] for an example that uses the "HTML Slidy" format. (The pictures are done by graphviz, not pandoc, as you will probably guess when you see it.) [1]: http://gitolite.com/gcs.html
Re: Jonathan's "Perl 6 Introductory course"
On 12/31/2015 04:26 PM, Sitaram Chamarty wrote: > On 31/12/15 20:43, Tom Browder wrote: >> Jonathan's intro course, in pdf, here: >> >> https://github.com/rakudo/star/raw/master/docs/2015-spw-perl6-course.pdf >> >> is excellent, of course. But I really like the presentation theme and >> the slide formatting! >> >> Does anyone know what slide-making process he uses? >> >> So far the best I have found that meets my needs is using asciidoc >> input with Asciidoctor's Deck.js backend. I think I can convert from >> the generated html to pdf but can't say for sure yet, but it is the >> good looks of his slides that I'm primarily interested in. > > Looks like Beamer (latex+beamer). The meta data of the PDF agrees, it says "LaTeX with Beamer class version 3.10" in the "creator" field. Cheers, Moritz