'CALL-ME' Math problem?

2021-03-02 Thread ToddAndMargo via perl6-users
Hi All, Math problem: x = 60÷5(7−5) raku -e 'say 60÷5(7−5)' No such method 'CALL-ME' for invocant of type 'Int' in block at -e line 1 Seems raku does not like the (). How do I fix this and maintain the flow and look of the equation? -T The correct answer is 24

Re: 'CALL-ME' Math problem?

2021-03-02 Thread Kevin Pye
Just because mathematics allows an implied multiplication doesn't mean Raku does -- in fact I can't think of any programming language which does. You need to stick an explicit multiplication operator ('*' or '×') between the 5 and the left parenthesis. The reason for the error message is that addi

Rakudo Star 2021.02.1

2021-03-02 Thread p.spek via perl6-users
Good morning/afternoon/evening Rakoons! Sadly, there was no Rakudo/MoarVM/NQP release in January, so Rakudo Star is going to use the next best thing, the release from February. This change was just pushed, and is ready to use. This is the first release that appears on GitHub as an actual release[

Re: 'CALL-ME' Math problem?

2021-03-02 Thread ToddAndMargo via perl6-users
On Tue, 2 Mar 2021, 08:13 ToddAndMargo via perl6-users, mailto:perl6-us...@perl.org>> wrote: Hi All, Math problem: x = 60÷5(7−5) raku -e 'say 60÷5(7−5)' No such method 'CALL-ME' for invocant of type 'Int' in block at -e line 1 Seems raku does not like t

Re: 'CALL-ME' Math problem?

2021-03-02 Thread ToddAndMargo via perl6-users
>> >> Hi All, >> >> Math problem: >> x = 60÷5(7−5) >> >> raku -e 'say 60÷5(7−5)' >> No such method 'CALL-ME' for invocant of type 'Int' >> in block at -e line 1 >> >> Seems raku does not like the (). How do I fix this >> and maintain the flow and look of the equation? >> >> -T >> >> The co

Alternative view of Raku Documentation

2021-03-02 Thread Richard Hainsworth
I've just passed a milestone in the development of a suite of modules for rendering a collection of POD6 content files. Please take a look at http://raku.finanalyst.org and especially http://raku.finanalyst.org/search.html Please let me know whether you find the search interface easier than t

Module Documentation

2021-03-02 Thread Richard Hainsworth
Hi, I want to create a system that will show documentation about Raku Modules that I have installed. There does not seem to be a Documentation standard, or best practice, for Raku modules. Hence the following post. In the Modules documentation in the Language section of the Raku documentati

Re: 'CALL-ME' Math problem?

2021-03-02 Thread Daniel Sockwell
Kevin Pye wrote: > Just because mathematics allows an implied multiplication doesn't mean Raku > does -- in fact I can't > think of any programming language which does. As a (potentially) interesting side note, while Raku doesn't provide implied multiplication, it _is_ one of the few programmi

Re: 'CALL-ME' Math problem?

2021-03-02 Thread Parrot Raiser
> Doing so would, of course, be a very bad idea. But still, you _could_. Something of an understatement, I think. :-)* Seriously, this made me wonder if inscrutable error messages might be clarifed by a (reverse) trace of the last few steps in parsing. That would show you what the compiler thoug

Re: Module Documentation

2021-03-02 Thread Daniel Sockwell
Richard Hainsworth wrote: > My suggestion is that some formal decision is made about documentation for > Raku modules, that some > documentation good practices are put together and included in the Modules > page. I think that this is a great idea (and that your suggestions afterwords are a go

Re: 'CALL-ME' Math problem?

2021-03-02 Thread Matthew Stuckwisch
But why do that when you can add a CALL-ME to the number classes that does multiplication? 😇 Int.^add_fallback( {$^i.defined && $^m eq 'CALL-ME'}, -> $, $ { * * * } ); say 5(4); # 20 On Tue, Mar 2, 2021, 09:08 Daniel Sockwell wrote: > Kevin Pye wrote: > > Just because mathematics al

Re: 'CALL-ME' Math problem?

2021-03-02 Thread Fernando Santagata
On Tue, Mar 2, 2021 at 4:08 PM Matthew Stuckwisch wrote: > But why do that when you can add a CALL-ME to the number classes that does > multiplication? 😇 > > Int.^add_fallback( > {$^i.defined && $^m eq 'CALL-ME'}, > -> $, $ { * * * } > ); > > say 5(4); # 20 > say 5(5)² # 625… oops! 😀 bu

Re: 'CALL-ME' Math problem?

2021-03-02 Thread Vadim Belman
Not in this case. The error happens at run-time. Syntactically the expression is a valid one because `5(...)` is interpreted as an invocation. Raku implements invocation protocol a part of which is method 'CALL-ME' defined on a class: class Foo { method CALL-ME(|c) { say "Foo invoked with

Re: Module Documentation

2021-03-02 Thread Tom Browder
On Tue, Mar 2, 2021 at 08:42 Daniel Sockwell wrote: > Richard Hainsworth wrote: > > My suggestion is that some formal decision is made about documentation > for Raku modules, that some > > documentation good practices are put together and included in the > Modules page. > I agree that's a good

Re: Module Documentation

2021-03-02 Thread Curt Tilmes
On Tue, Mar 2, 2021 at 11:13 AM Tom Browder wrote: > On Tue, Mar 2, 2021 at 08:42 Daniel Sockwell > wrote: > >> Richard Hainsworth wrote: >> > My suggestion is that some formal decision is made about documentation >> for Raku modules, that some >> > documentation good practices are put together

Re: Alternative view of Raku Documentation

2021-03-02 Thread Joseph Brenner
This is some very nice work, of course. I was wondering how difficult it would be to support other output formats (texinfo, nroff...). > Please let me know whether you find the search interface easier than the one > on the official site. I've got some problems with the existing search, myself,

A problem case for the site documentation search: the "^methods" method.

2021-03-02 Thread Joseph Brenner
If you go to docs.raku.org and type "^methods" into the search window, you get a drop down looking something like this: class Method Submethod method methods Reference ^methods methods Submethods Routine method Site Search sear