Re: stolen uint's

2020-01-29 Thread Trey Harris
On Wed, Jan 29, 2020 at 20:20 ToddAndMargo via perl6-users < perl6-us...@perl.org> wrote: > On 2020-01-29 10:28, Trey Harris wrote: > > B is not a subset of A. That is the relationship of uint and int—two > > distinct types whose values happen to overlap in a way that describ

Re: stolen uint's

2020-01-29 Thread Trey Harris
On Wed, Jan 29, 2020 at 18:39 ToddAndMargo via perl6-users < perl6-us...@perl.org> wrote: > On 2020-01-29 15:32, ToddAndMargo via perl6-users wrote: > > `DWORD cbData` > > cbData is a 32 bit unsigned integer. It follows > all the rules for unsigned integers. You do not > terminate it. WinAPI kn

Re: stolen uint's

2020-01-29 Thread Trey Harris
On Wed, Jan 29, 2020 at 17:52 ToddAndMargo via perl6-users < perl6-us...@perl.org> wrote: > On 2020-01-29 14:20, Trey Harris wrote: > > I don’t care about IpData or ValueData—those are completely unremarkable > > fields. Showing me more code relating to them—or any other fie

Re: stolen uint's

2020-01-29 Thread Trey Harris
wanted or not. Thank you. On Wed, Jan 29, 2020 at 16:40 ToddAndMargo via perl6-users < perl6-us...@perl.org> wrote: > On 2020-01-29 13:01, Trey Harris wrote: > > > > On Wed, Jan 29, 2020 at 15:28 ToddAndMargo via perl6-users > > mailto:perl6-us...@perl.org>> wrote:

Re: stolen uint's

2020-01-29 Thread Trey Harris
On Wed, Jan 29, 2020 at 15:28 ToddAndMargo via perl6-users < perl6-us...@perl.org> wrote: > "Todd" would convert to > 84 00 111 00 100 00 100 00 00 00 I’m sorry, you misunderstood me. I wasn’t asking how to convert text into UTF. I was asking for an example of the 3-byte UTF plus 32-bit nul

Re: stolen uint's

2020-01-29 Thread Trey Harris
On Wed, Jan 29, 2020 at 14:39 ToddAndMargo via perl6-users < perl6-us...@perl.org> wrote: > On 2020-01-29 11:32, Trey Harris wrote: > > On Wed, Jan 29, 2020 at 13:50 ToddAndMargo via perl6-users > > mailto:perl6-us...@perl.org>> wrote: > > > > Why

Re: stolen uint's

2020-01-29 Thread Trey Harris
On Wed, Jan 29, 2020 at 14:01 ToddAndMargo via perl6-users < perl6-us...@perl.org> wrote: > On 2020-01-29 06:34, Trey Harris wrote: > > I was going to ask about that (but it seemed out of Raku-world, and I > > don’t even play someone who knows about Windows on TV), but

Re: stolen uint's

2020-01-29 Thread Trey Harris
On Wed, Jan 29, 2020 at 13:50 ToddAndMargo via perl6-users < perl6-us...@perl.org> wrote: > Why don't use use > > typeMappings[type_index( typeid(char) )] = "char"; > Finally, a definition I can work with... We can treat this as a request for typeid(); the mapping creation and lookup is an implem

Re: stolen uint's

2020-01-29 Thread Trey Harris
On Wed, Jan 29, 2020 at 13:28 Trey Harris wrote: > whose values happen to overlap in a way that describes a subset. Perl > isn’t Prolog; > It isn’t either, but that’s irrelevant; I meant Raku obviously. Thinko. >

Re: stolen uint's

2020-01-29 Thread Trey Harris
On Wed, Jan 29, 2020 at 13:04 ToddAndMargo via perl6-users < perl6-us...@perl.org> wrote: > On 2020-01-29 09:19, Trey Harris wrote: > > > > The first line of https://docs.raku.org/type/UInt is: > > > The `|Int`| is defined as a subset of `|Int|:` > > > &g

Re: stolen uint's

2020-01-29 Thread Trey Harris
Argh! Editing error... On Wed, Jan 29, 2020 at 12:19 Trey Harris wrote: > The first line of https://docs.raku.org/type/UInt is: >> > > The `Int` is defined as a subset of `Int:` > Should have been (and is in that URL) “The `UInt` is defined as…”

Re: stolen uint's

2020-01-29 Thread Trey Harris
On Wed, Jan 29, 2020 at 11:58 ToddAndMargo via perl6-users < perl6-us...@perl.org> wrote: > On 2020-01-28 22:16, Veesh Goldman wrote: > > Hi Todd, > > I'd just like to point out one thing. Your confusion here (and in a few > > related posts) is that you aren't grokking the difference between uint

Re: stolen uint's

2020-01-29 Thread Trey Harris
On Wed, Jan 29, 2020 at 03:44 Tobias Boege wrote: > On Tue, 28 Jan 2020, ToddAndMargo via perl6-users wrote: > > This all came up when I tried to match > > > > RegSetValueExW( > > _In_ HKEY hKey, > > _In_opt_ LPCWSTR lpValueName, > > _Reserved_ DWORD Reserved,

Re: stolen uint's

2020-01-28 Thread Trey Harris
On Tue, Jan 28, 2020 at 22:03 ToddAndMargo via perl6-users < perl6-us...@perl.org> wrote: > Hi Trey, > > Any chance of you sneaking in on the doc pages > for ^name and range to explain the things you > explained to me? For `.^name`—I suppose, though I’m not sure what would be appropriate there—

Re: stolen uint's

2020-01-28 Thread Trey Harris
most of the work is shunted into C but the interface is native Raku: https://github.com/p6-pdf/Base64-Native-p6 On Tue, Jan 28, 2020 at 21:50 ToddAndMargo via perl6-users < perl6-us...@perl.org> wrote: > On 2020-01-28 18:18, Trey Harris wrote: > > my uint $z = -32; >

Re: stolen uint's

2020-01-28 Thread Trey Harris
On Tue, Jan 28, 2020 at 21:18 Trey Harris wrote: > Nope. If I give you: > > 0x41 > > and tell you that’s a single octet, and that’s all you have, and I and ask > you whether that’s an “A” or a decimal 97 or something else described by > 0101, how do you answer? You can

Re: stolen uint's

2020-01-28 Thread Trey Harris
On Tue, Jan 28, 2020 at 21:18 Trey Harris wrote: > values, such as 'undefined' and 'Nil' as well as its type. > > And that’s another thing: you’ll notice if you define a `my uint8 $x;` it will be set to 0. No undefined, no Nil. That doesn’t happen with non-native n

Re: stolen uint's

2020-01-28 Thread Trey Harris
ng* `UInt`, when it’s absolutely autoboxing into an `Int`, would be wrong; Raku would be lying to you. To answer your other questions in your prior mail: On Tue, Jan 28, 2020 at 20:32 ToddAndMargo via perl6-users < perl6-us...@perl.org> wrote: > On 2020-01-28 17:17, Trey Harris wrote:

Re: stolen uint's

2020-01-28 Thread Trey Harris
On Tue, Jan 28, 2020 at 20:32 ToddAndMargo via perl6-users < perl6-us...@perl.org> wrote: > On 2020-01-28 17:17, Trey Harris wrote: > > On Tue, Jan 28, 2020 at 20:04 ToddAndMargo via perl6-users > > mailto:perl6-us...@perl.org>> wrote: > > > >

Re: stolen uint's

2020-01-28 Thread Trey Harris
On Tue, Jan 28, 2020 at 20:04 ToddAndMargo via perl6-users < perl6-us...@perl.org> wrote: > On 2020-01-28 17:00, Trey Harris wrote: > > On Tue, Jan 28, 2020 at 19:58 ToddAndMargo via perl6-users > > mailto:perl6-us...@perl.org>> wrote: > > > >

Re: stolen uint's

2020-01-28 Thread Trey Harris
On Tue, Jan 28, 2020 at 19:58 ToddAndMargo via perl6-users < perl6-us...@perl.org> wrote: > On 2020-01-28 16:56, Trey Harris wrote: > > In other words—yes, you want Raku to attempt to provoke a segmentation > > fault, then recover and tell you whether it faulted or not. >

Re: stolen uint's

2020-01-28 Thread Trey Harris
On Tue, Jan 28, 2020 at 19:55 ToddAndMargo via perl6-users < perl6-us...@perl.org> wrote: > On 2020-01-28 16:52, Trey Harris wrote: > > On Tue, Jan 28, 2020 at 19:46 ToddAndMargo via perl6-users > > mailto:perl6-us...@perl.org>> wrote: > > > > > my

Re: stolen uint's

2020-01-28 Thread Trey Harris
On Tue, Jan 28, 2020 at 19:46 ToddAndMargo via perl6-users < perl6-us...@perl.org> wrote: > > my uint $u= 0xFF44; say $u.^name > Int > > Wrong answer > It’s absolutely the right answer. You autoboxed it by running a method—`.^name`—on it. A uint can’t respond to `.^name`, so you can never get that

Re: stolen uint's

2020-01-28 Thread Trey Harris
On Tue, Jan 28, 2020 at 19:06 ToddAndMargo via perl6-users < perl6-us...@perl.org> wrote: > On 2020-01-28 15:37, Trey Harris wrote: > > > > > > On Tue, Jan 28, 2020 at 18:09 ToddAndMargo via perl6-users > > mailto:perl6-us...@perl.org>> wrote: > > &g

Re: stolen uint's

2020-01-28 Thread Trey Harris
On Tue, Jan 28, 2020 at 18:09 ToddAndMargo via perl6-users < perl6-us...@perl.org> wrote: > Observer effect (physics) > https://en.wikipedia.org/wiki/Observer_effect_(physics) > > In physics, the observer effect is the theory that > the mere observation of a phenomenon inevitably >

Re: range doc page

2020-01-28 Thread Trey Harris
Sorry to keep replying to myself... On Tue, Jan 28, 2020 at 15:13 Trey Harris wrote: > All core class Exception objects, as a matter of convention, start with > `X::`. > ...to which a natural question arises: what about non-core Exception objects? Raku lets you call Exceptions wha

Re: range doc page

2020-01-28 Thread Trey Harris
On Tue, Jan 28, 2020 at 15:13 Trey Harris wrote: > (And, in case you were unaware, _every_ page in the /routine/... doc tree > is autogenerated from content elsewhere; those headers and links are added > to get you back to the context where the content canonically appears.) >

Re: range doc page

2020-01-28 Thread Trey Harris
On Tue, Jan 28, 2020 at 15:06 ToddAndMargo via perl6-users < perl6-us...@perl.org> wrote: > On 2020-01-28 11:59, Trey Harris wrote: > > > > > > On Tue, Jan 28, 2020 at 14:55 ToddAndMargo via perl6-users > > mailto:perl6-us...@perl.org>> wrote: > > >

Re: range doc page

2020-01-28 Thread Trey Harris
On Tue, Jan 28, 2020 at 14:55 ToddAndMargo via perl6-users < perl6-us...@perl.org> wrote: > No I am really confused: > > What part of > > my int8 $u = 0xF8; $u.range > > is not following > > method range(--> Range:D) > > ? > Unless you’re getting the line `method range(--> Range:D)` from

Re: range problems

2020-01-28 Thread Trey Harris
On Tue, Jan 28, 2020 at 08:27 Trey Harris wrote: > On Mon, Jan 27, 2020 at 23:57 ToddAndMargo via perl6-users < > perl6-us...@perl.org> wrote: > >> Hi Al, >> >> Now what am I doing wrong? >> >> > my Int $u = 0xF8; say $u.Range; >> >>

Re: range doc page

2020-01-28 Thread Trey Harris
On Tue, Jan 28, 2020 at 01:07 Kevin Pye wrote: > There's no need to ask essentially the same question three times. > And I answered before noticing there was more activity in another thread. > https://docs.raku.org/routine/range > is quite clearly the wron

Re: range problems

2020-01-28 Thread Trey Harris
On Mon, Jan 27, 2020 at 23:57 ToddAndMargo via perl6-users < perl6-us...@perl.org> wrote: > Hi Al, > > Now what am I doing wrong? > > > my Int $u = 0xF8; say $u.Range; > > Invocant of method 'Range' must be a type object of > type 'Int', not an object instance of type 'Int'. > Did you forget a 'm

Re: Using raku/perl6 as unix "cat"....

2020-01-20 Thread Trey Harris
On Mon, Jan 20, 2020 at 19:03 Trey Harris wrote: > On Mon, Jan 20, 2020 at 02:59 William Michels via perl6-users < > perl6-us...@perl.org> wrote: > >> Hi Yary (and Todd), >> >> Thank you both for your responses. Yary, the problem seems to be with >> &qu

Re: Using raku/perl6 as unix "cat"....

2020-01-20 Thread Trey Harris
On Mon, Jan 20, 2020 at 19:01 Norman Gaywood wrote: > > On Tue, 21 Jan 2020 at 03:12, Brad Gilbert wrote: > >> .say for lines >> > > Since .say calls gist(), would it be not be better/safer to call .put > instead? > >.put for lines > If being set directly from `lines`, I can’t see when

Re: Using raku/perl6 as unix "cat"....

2020-01-20 Thread Trey Harris
On Mon, Jan 20, 2020 at 02:59 William Michels via perl6-users < perl6-us...@perl.org> wrote: > Hi Yary (and Todd), > > Thank you both for your responses. Yary, the problem seems to be with > "get". I can change 'while' to 'for' below, but using 'get' raku/perl6 > actually returns fewer lines with

Re: GIT PR Help

2020-01-17 Thread Trey Harris
On Fri, Jan 17, 2020 at 17:35 ToddAndMargo via perl6-users < perl6-us...@perl.org> wrote: > Hi Trey, > > I wanted to add an example to > > https://docs.raku.org/routine/+$CIRCUMFLEX_ACCENT > > Do I Git the entire documentation project to do so? > Can I jsut Git that page? If so, where do I find >

Re: GIT PR Help

2020-01-17 Thread Trey Harris
On Fri, Jan 17, 2020 at 15:44 ToddAndMargo via perl6-users < perl6-us...@perl.org> wrote: > On 2020-01-17 12:20, Trey Harris wrote: > > If the issue is that you aren’t comfortable enough with Git¹, I assume > > as part of the basic toolkit of a sysadmin you know how to genera

Re: Once again - You say one thing and do another Re: Bug to report: cardinal called an integer

2020-01-17 Thread Trey Harris
If the issue is that you aren’t comfortable enough with Git¹, I assume as part of the basic toolkit of a sysadmin you know how to generate a unified diff patchfile (with `diff -ruN` or equivalent)? If so, if you generate one and upload it attached to a GitHub issue, we can figure out how to turn i

Re: Once again - You say one thing and do another Re: Bug to report: cardinal called an integer

2020-01-16 Thread Trey Harris
On Thu, Jan 16, 2020 at 15:04 ToddAndMargo via perl6-users < perl6-us...@perl.org> wrote: > On 2020-01-16 11:00, Trey Harris wrote: > and your apparent misapprehension that > merely explaining away a statement that some took offense to, without > any outward sign of contriti

Re: Once again - You say one thing and do another Re: Bug to report: cardinal called an integer

2020-01-16 Thread Trey Harris
On Thu, Jan 16, 2020 at 12:19 ToddAndMargo via perl6-users < perl6-us...@perl.org> wrote: > As far as the Dog remark, I have told you and others > ENDLESSLY what that meant. That you continue to > deliberately misrepresent me on this is a moral > issue on your part. The issue is not, now, just

Re: Once again - You say one thing and do another Re: Bug to report: cardinal called an integer

2020-01-15 Thread Trey Harris
On Wed, Jan 15, 2020 at 17:39 ToddAndMargo via perl6-users < perl6-us...@perl.org> wrote: > On 2020-01-15 14:18, Elizabeth Mattijsen wrote: > > Thank you Richard for this long and thoughtful answer. > > > > I have already given up on Todd, I'm glad to see others haven't (yet). > What will follow i

Re: OT: Git Hub repositories

2020-01-04 Thread Trey Harris
On Sat, Jan 4, 2020 at 18:14 ToddAndMargo via perl6-users < perl6-us...@perl.org> wrote: > On 2020-01-04 14:40, Trey Harris wrote: > > All the tooling (that cares at all about repos, anyway) generally expect > > one repo per exportable product (e.g., a module). > > >

Re: OT: Git Hub repositories

2020-01-04 Thread Trey Harris
On Sat, Jan 4, 2020 at 17:40 Trey Harris wrote: > All the tooling (that cares at all about repos, anyway) generally expect > one repo per exportable product (e.g., a module). > Argh, overloaded English: I meant “publishable product”, and “CPAN-like module”. Not export and module

Re: OT: Git Hub repositories

2020-01-04 Thread Trey Harris
All the tooling (that cares at all about repos, anyway) generally expect one repo per exportable product (e.g., a module). This shouldn’t be an issue unless you typically use modules directly from their repos without installing them—which is a bad practice you should avoid, particularly if you’re

Re: Fwd: Raku, docs, help [was: Re: vulgar?]

2019-12-10 Thread Trey Harris
On Mon, Dec 9, 2019 at 9:53 PM ToddAndMargo via perl6-users < perl6-us...@perl.org> wrote: On 2019-12-09 09:44, Trey Harris wrote: > > Signatures are important to Raku. > > Trey, > > The signatures are very important to the developers. > They only confuse the progr

Re: How do I do literal quotes in a regex?

2019-12-09 Thread Trey Harris
On Mon, Dec 9, 2019 at 03:54 Fernando Santagata wrote: > On Mon, Dec 9, 2019 at 9:38 AM Fernando Santagata < > nando.santag...@gmail.com> wrote: > >> It can be used this way: >> >> $ raku -e'say „Hello!“' >> Hello! >> But it must be used with that closing quote '“' (U+201C); it cannot be >> used

Re: Fwd: Raku, docs, help [was: Re: vulgar?]

2019-12-09 Thread Trey Harris
On Mon, Dec 9, 2019 at 10:25 Simon Proctor wrote: > I *highly* advise learning how signatures work. > This, this, a thousand times this. ToddAndMargo, I have watched you on these lists and on GitHub issues for years. I’ve engaged a few times but have generally pulled back again, always in react

Re: How to use sub/method 'dir'

2018-11-26 Thread Trey Harris
On Mon, Nov 26, 2018 at 19:26 Trey Harris wrote: > > > On Mon, Nov 26, 2018 at 04:56 Fernando Santagata < > nando.santag...@gmail.com> wrote: > >> On Sun, Nov 25, 2018 at 5:34 PM Brad Gilbert wrote: >> >>> The reason `dir('a', test => { .

Re: How to use sub/method 'dir'

2018-11-26 Thread Trey Harris
On Mon, Nov 26, 2018 at 04:56 Fernando Santagata wrote: > On Sun, Nov 25, 2018 at 5:34 PM Brad Gilbert wrote: > >> The reason `dir('a', test => { .IO.d })` doesn't work like you expect >> is that it is passed strings. >> > > Thank you! > I could have inferred that from the declaration of the 'te

Re: detecting running under the repl

2018-11-06 Thread Trey Harris
On Tue, Nov 6, 2018 at 1:24 PM Joseph Brenner doom...@gmail.com wrote: How do you write code that detects whether it's running under the repl? > The variable $*PROGRAM (or $*PROGRAM-NAME; they interpolate identically so I’m giving them raw to say below)—with the c

Diamond <> or fileinput-like input handling (was Re: what type $in,$out and $err is)

2018-11-05 Thread Trey Harris
On Mon, Nov 5, 2018 at 11:54 AM Ralph Mellor [ralphdjmel...@gmail.com](mailto:ralphdjmel...@gmail.com) wrote: On Sun, Oct 28, 2018 at 7:26 PM Xiao Yafeng wrote: > >> Besides, just curious, why choose '_' as default it looks

Re: bitwise or?

2018-10-05 Thread Trey Harris
On Fri, Oct 5, 2018 at 8:33 AM Timo Paulssen t...@wakelift.de wrote: It's important to point out that inside metaoperators ("composed > operators", "combined operators", ...) the [ ] are just for bracketing > things together — sometimes it's needed to disambiguate,

Re: routine declaration line question

2018-10-05 Thread Trey Harris
sm”; I only barely recognize that the thing that we do in Haskell more often than not, defining degenerate cases as separate function definitions, qualifies as “polymorphism”. (Elm doesn’t do it and it drives me batty.) ​ > > On Fri, Oct 5, 2018 at 2:03 PM Trey Harris wrote: > >>

Re: routine declaration line question

2018-10-05 Thread Trey Harris
On Fri, Oct 5, 2018 at 1:13 PM Brandon Allbery wrote: > My problem with it being in the signature is still that it doesn't say > which part of the contract it applies to; it appears to be claiming it's > part of dispatch, when it's not. > Explicit argument polymorphism has been shown to be usefu

Re: routine declaration line question

2018-10-04 Thread Trey Harris
phrased it makes it sound like it's an explicit > no-meaningful-result, as opposed to 'we don't know or care'. > > On Thu, Oct 4, 2018 at 3:02 PM Trey Harris wrote: > >> Ah (replying to both Brandon and JJ since their replies crossed): >> >> So `--> Mu` i

Re: routine declaration line question

2018-10-04 Thread Trey Harris
is the return > value, but you can't say ahead of time what type it will have. > > On Thu, Oct 4, 2018 at 2:48 PM Trey Harris wrote: > >> >> >> On Thu, Oct 4, 2018 at 02:13 JJ Merelo wrote: >> >>> >>> >>> El jue., 4 oct. 2018 a las 3

Re: routine declaration line question

2018-10-04 Thread Trey Harris
On Thu, Oct 4, 2018 at 02:13 JJ Merelo wrote: > > > El jue., 4 oct. 2018 a las 3:36, Trey Harris () escribió: > >> _All_ routines in Perl 6 return _something._ A lack of a "-->" simply >> indicates stylistically that the return is not useful because it's

Re: routine declaration line question

2018-10-03 Thread Trey Harris
On Wed, Oct 3, 2018 at 22:21 ToddAndMargo wrote: > >> On 04/10/2018 03:07, ToddAndMargo wrote: > >>> Hi All, > >>> > >>> In another thread, Timo wrote me: > >>> > >>> The "-->" part of the signature is optional. If there isn't > >>> one, it defaults to Mu, which is the type that e

Re: bitwise paper?

2018-10-03 Thread Trey Harris
Todd, Assuming you are suggesting your examples are showing differences between the languages, in all your examples of differences between Perl 6 and Perl 5 below, you are using the wrong operator or you changed one of the arguments between the Perl 5 and Perl 6 examples. I won't go through them

Re: routine declaration line question

2018-10-03 Thread Trey Harris
_All_ routines in Perl 6 return _something._ A lack of a "-->" simply indicates stylistically that the return is not useful because it's whatever "falls off the end". (There's a bit of variance here as I'm not sure it's a convention everyone has followed.) It's equivalent to "--> Mu" because anythi

Re: bitwise paper?

2018-10-03 Thread Trey Harris
On Wed, Oct 3, 2018 at 20:56 ToddAndMargo wrote: > On 10/3/18 1:50 PM, Trey Harris wrote: > > > > On Wed, Oct 3, 2018 at 13:38 ToddAndMargo > <mailto:toddandma...@zoho.com>> wrote: > > > > > Go to docs.perl6.org <http://docs.perl6.org> >

Re: bitwise paper?

2018-10-03 Thread Trey Harris
On Wed, Oct 3, 2018 at 13:38 ToddAndMargo wrote: > > Go to docs.perl6.org . Type "bitwise" into the > > search box. You will see a popup, "Numeric bitwise AND operator". Click > > it to be taken to > > > https://docs.perl6.org/language/operators#index-entry-Numeric_bitwise_

Re: bitwise paper?

2018-10-02 Thread Trey Harris
On Tue, Oct 2, 2018 at 23:57 ToddAndMargo wrote: > Hi All, > > Does anyone know of a paper out in web land showing how to > do bitwise operations? DuckDuckGo give me tons of hits > for Perl 5. > > Trying to AND 0010 with 0001 > > $ p6 'my $v = 32 & 16; say $v;' > all(32, 16) > > should

Re: need doc help with []

2018-10-02 Thread Trey Harris
On Tue, Oct 2, 2018 at 21:10 ToddAndMargo wrote: > If you have a free moment, speaking to "have", the diagram here > is a work of art: > > https://www.freethesaurus.com/have > > I know there a lot of English as a second language speaker on this > group. The above thesaurus uses diagrams and is w

Re: need doc help with []

2018-10-02 Thread Trey Harris
What Curt said, but also, this is a bit like trying to understand English's word "have" with a dictionary. No one who speaks English natively looks up "have" in the dictionary. Anyone who does so will find definitions like, "Used in forming the perfect aspect and the past perfect aspect." Well, tha

Re: case insensitive "contains"?

2018-09-11 Thread Trey Harris
'll be much better-equipped to understand them in Perl 6 if you understand them in general first. On Tue, Sep 11, 2018 at 18:49 Trey Harris wrote: > Oops— I sent the following yesterday and it somehow didn't go to the list: > > On Mon, Sep 10, 2018 at 19:02 ToddAndMargo

Re: case insensitive "contains"?

2018-09-11 Thread Trey Harris
Oops— I sent the following yesterday and it somehow didn't go to the list: On Mon, Sep 10, 2018 at 19:02 ToddAndMargo wrote: > Question, what the heck is > > my $rx1 = rx:i/a/; > > Are they talking over beginner's heads again? > In the sense of "beginners to Perl", perhaps, since "rx" is

Re: Functions and subroutines?

2018-09-11 Thread Trey Harris
To get directly at your question: in Perl 6, this is not an important delineation, so there are no simple names for the two Pascal/Modula concepts. Perl's never made a distinction between "procedures" and "functions" in the Pascal sense; they were all just subs. Eventually Perl gained classes and b

Re: 3 kinds of yadda

2018-09-10 Thread Trey Harris
When executed: - ??? is warn.- ... is fail. - !!! is ‘die`. Otherwise, they’re identical (notably, when *not* executed, which is the usual case). You’d use ??? when you’re not implementing something yet but it needs to be callable (say, a debugging function). Given the difference in behavi

Re: EVAL?

2018-06-14 Thread Trey Harris
Just a small stylistic thing to mention: On Thu, Jun 14, 2018 at 1:59 AM Todd Chester wrote: p6 >if not $dir.IO.d.bool {} >for slice "\n", $WebStr -> $Line { } > > and on and on and so forth. I know a lot of them by heart now. > By .bool, I assume you meant .Bool, but in

Re: What is P6 for P5 `use Term::ReadKey`?

2017-09-13 Thread Trey Harris
On Sat, Sep 9, 2017 at 3:55 PM ToddAndMargo toddandma...@zoho.com wrote: On 09/09/2017 07:00 AM, Timo Paulssen wrote: > > This should be enlightening: https://docs.perl6.org/routine/getc > > > > Problem: also from the link: > > method getc(IO::Handle:D: -

Re: Startup performance on OS X

2016-10-03 Thread Trey Harris
That is really lovely. I don’t know what criteria are used for Rosetta Code, but the article’s implementation is the clearest “program as concrete explication of algorithm” I’ve ever seen. It took me *years* to understand RSA’s internals to the point that I could explain it if asked to in an interv

Re: This seems to be wrong

2016-09-18 Thread Trey Harris
; seem to imply there should be…) ​ On Sun, Sep 18, 2016 at 6:15 PM Brandon Allbery wrote: > > On Sun, Sep 18, 2016 at 6:06 PM, Trey Harris wrote: > >> Not work? It results inMethod 'prefix:<+>' not found for invocant of >> class 'Any', but the docs

Re: This seems to be wrong

2016-09-18 Thread Trey Harris
On Sun, Sep 18, 2016 at 6:30 PM Brandon Allbery allber...@gmail.com <http://mailto:allber...@gmail.com> wrote: > On Sun, Sep 18, 2016 at 6:29 PM, Trey Harris wrote: > >> But I see there’s a multi method Str defined on Any, and you can’t do >> @inputs.map( .Str ), eith

Re: Is this a bug?

2016-09-18 Thread Trey Harris
On Sun, Sep 18, 2016 at 16:49 Parrot Raiser <1parr...@gmail.com> wrote: say { $_ } was the correct thing to use there. (I'm trying to avoid > any mention of O-O for the moment.) > “Trying to avoid any mention of O-O” seems like a Perl 6 obfuscation or golf constraint, not a desirable development o

Re: This seems to be wrong

2016-09-18 Thread Trey Harris
Why does this: for @inputs.map( .prefix:<+> ) { ... } Not work? It results inMethod 'prefix:<+>' not found for invocant of class 'Any', but the docs say it is defined as a multi on Any…. Trey ​ On Sun, Sep 18, 2016 at 4:37 PM Brandon Allbery

Re: Justification for the "reversed" instruction format

2016-09-08 Thread Trey Harris
On Thu, Sep 8, 2016 at 9:23 AM Aaron Sherman a...@ajs.com wrote: I don't know Haskell, but isn't flip just: > > sub flip(&f) { -> $b, $a, |c { f($a, $b, |c) } } > > And then: > > perl6 -e 'sub flip(&f) { -> $a, $b, |c { f($b, $a, |c) } }; my &yas = flip > &say; yas(1,2

Re: Justification for the "reversed" instruction format

2016-09-08 Thread Trey Harris
> P: 617-440-4332 Google Talk, Email and Google Plus: a...@ajs.com > Toolsmith, developer, gamer and life-long student. > > > On Thu, Sep 8, 2016 at 2:41 PM, Trey Harris wrote: > >> On Thu, Sep 8, 2016 at 9:23 AM Aaron Sherman a...@ajs.com >> <http://mailto:a...@ajs

Re: Justification for the "reversed" instruction format

2016-09-07 Thread Trey Harris
There’s a very common functional programming pattern, usually called flip; its implementation in Haskell is simply: flip :: (a -> b -> c) -> b -> a -> cflip f x y = f y x Getting the same behavior out of a bespoke function in Perl 6 would be easy for any particular case, but writing a gene

Re: Should C and C work in C ?

2008-06-30 Thread Trey Harris
--Junction is a sister of Any, not a subtype of Any. That's how you get the autothreading--accept Any or a subtype thereof, and when you get a junction, you autothread. Accept Junction or Object and you can inspect the junction directly. At least, that's how *I* think it wo

Re: Rakudo test miscellanea

2008-06-26 Thread Trey Harris
In a message dated Thu, 26 Jun 2008, Moritz Lenz writes: I assume that 'Num' is meant to be a non-complex. Then it seems to make sense to assume: Int is Rat Rat is Num Num is Complex or am I off again? S29 seems to have been assuming this, if I'm reading the multis correctly.

Re: given vs for

2008-04-25 Thread Trey Harris
To loop back to my earlier question: In Perl 5.10: use strict; use warnings; use feature qw(switch say); my $foo = 10; for ($foo) { when ($foo < 50) { $_++ } } say "for: $foo"; $foo = 10; given ($foo) { when ($foo < 50) { $_++ } } say

Re: given vs for

2008-04-25 Thread Trey Harris
In a message dated Fri, 25 Apr 2008, Moritz Lenz writes: Paul Fenwick perltraining.com.au> writes: for ($foo) { when ($_ < 500) { ++$_ } when ($_ > 1000) { --$_ } default { say "Just right $_" } } Ahh... that's exactly what I was looking for. Thanks. Make

Re: $?OS semantics

2008-01-07 Thread Trey Harris
In a message dated Mon, 7 Jan 2008, Larry Wall writes: On Mon, Jan 07, 2008 at 11:42:06AM -0500, Trey Harris wrote: So $?OS isn't "the type of OS", it's *the OS*, and you can manipulate the OS through it. Note that $?OS is the OS that is-or-was running at compile time, wh

Re: what should be the default extension?

2008-01-07 Thread Trey Harris
In a message dated Mon, 7 Jan 2008, Richard Hainsworth writes: Yet, does my proposal *force* this? Is it not possible for the magical resource locator to coexist with a mechanism to allow local control? Yes--through C blocks and munging, you can get whatever complicated, platform- or machine-

$?OS semantics

2008-01-07 Thread Trey Harris
Sorry, quoting myself... In a message dated Mon, 7 Jan 2008, Trey Harris writes: given $?OS { when m:i:/win/ { use Foo in WinFoo.pm } when m:i:/nix/ { use Foo in UnixLikeFoo.pm } } It strikes me that $?OS and $?OSVER should probably not be strings (as they now are in Pugs) and

Re: what should be the default extension?

2008-01-07 Thread Trey Harris
In a message dated Mon, 7 Jan 2008, Richard Hainsworth writes: May I suggest the following extension to the 'use ' pragma, viz. use in constrained by local system> Oh please, no. The entire point of the wording currently in the synopsis is so that we can have platform-independent location o

:($obj) syntax (was Re: [svn:perl6-synopsis] r14479 - doc/trunk/design/syn)

2008-01-05 Thread Trey Harris
In a message dated Thu, 3 Jan 2008, [EMAIL PROTECTED] writes: +But these bindings I autovivify: my %hash; my $val := %hash; my @array; -my $obj = [EMAIL PROTECTED]; # $obj is a Capture object - see S02 +my $cap = [EMAIL PROTECTED]; # $obj is a Capture object - see S02 +m

Re: perl 6 and web open source projects

2007-12-03 Thread Trey Harris
In a message dated Tue, 4 Dec 2007, cdumont writes: oh, it might not be relevant in many ways but : http://iamseb.com/seb/2007/12/perl-on-rails-why-the-bbc-fails-at-the-internet/ http://www.bbc.co.uk/blogs/radiolabs/2007/11/perl_on_rails.shtml There's one thing I would like perl6 to shine in,

Re: pugs bugs (or features?)

2007-09-07 Thread Trey Harris
In a message dated Fri, 7 Sep 2007, Wim Vanderbauwhede writes: On 07/09/2007, Chas Owens <[EMAIL PROTECTED]> wrote: Even if strict weren't in effect this code should not work since the $x in the closure is not the one created after the closure: perl -le 'my$r=sub{print $x+1};my $x = 2;$r->()'

where constraints as roles (was Re: how typish are roles)

2006-10-28 Thread Trey Harris
In a message dated Sat, 28 Oct 2006, Trey Harris writes: In a message dated Sat, 28 Oct 2006, chromatic writes: When you specify a type to constrain some operation, you specify that the target entity must perform that role. That statement is very concise and direct. If the fuzziness I

Re: how typish are roles

2006-10-28 Thread Trey Harris
In a message dated Sat, 28 Oct 2006, chromatic writes: When you specify a type to constrain some operation, you specify that the target entity must perform that role. That statement is very concise and direct. If the fuzziness I observed about the identity of the basic building block of type w

Re: how typish are roles

2006-10-25 Thread Trey Harris
In a message dated Wed, 25 Oct 2006, TSa writes: from the recent threads 'class interface of roles', 'set operations for roles' and 'signature subtyping and role merging' I wonder how typish roles actually are. Some seem to consider roles as lightweight particles that serve to compose classes.

Re: Edge case: incongruent roles

2006-10-13 Thread Trey Harris
In a message dated Fri, 13 Oct 2006, Jonathan Lang writes: Since Baz does both Foo and Bar, you cannot use type-checking to resolve this dilemma. Why not? Why shouldn't this work: my Foo $obj1 = getBaz(); # object is a Baz $obj1.baz(); # Foo::baz is called my Bar $obj2 =

Re: "Don't tell me what I can't do!"

2006-10-08 Thread Trey Harris
In a message dated Wed, 4 Oct 2006, Smylers writes: Trey Harris writes: I remember not so many years ago when there were a lot of modules floating around that required you to do "no strict" of various flavors in order to use them. Really? How? I wrote imprecisely. Not to &qu

Re: Abstract roles, classes and objects

2006-10-04 Thread Trey Harris
In a message dated Wed, 4 Oct 2006, Jonathan Lang writes: In Perl 6, the abstract SystemMonitor could be a role, and a concrete ScriptedMonitor could be a class that does SystemMonitor, but it's not at all clear to me what HardwareMonitor would be, since classes can't be abstract and roles can't

Re: "Don't tell me what I can't do!"

2006-10-04 Thread Trey Harris
In a message dated Wed, 4 Oct 2006, jesse writes: On Wed, Oct 04, 2006 at 12:01:22PM -0700, chromatic wrote: The point is that the person writing the program decides which handcuffs or costumes all of the code has to wear, not the person writing the libraries. If you want to set a policy for you

Re: "Don't tell me what I can't do!"

2006-10-04 Thread Trey Harris
In a message dated Wed, 4 Oct 2006, chromatic writes: The assumption I remember from the design meetings was always "No library designer has the knowledge or the right to tell me how fast or strict my program has to run." Whatever B&D you do in the privacy of your own modules is fine, but if it

Re: Abstract roles, classes and objects

2006-10-04 Thread Trey Harris
In a message dated Sun, 1 Oct 2006, Aaron Sherman writes: Trey Harris wrote: In a message dated Fri, 29 Sep 2006, Aaron Sherman writes: [snip] However, that's not to say that a class can't be abstract, just that a class that does an interface (a role with nothing but abstract meth

Re: RFC: multi assertions/prototypes: a step toward programming by contract

2006-09-29 Thread Trey Harris
In a message dated Fri, 29 Sep 2006, Aaron Sherman writes: First the high-level point: I'm dropping the RFC, because, as TimToady pointed out on IRC, we're not quite far enough down the line to see the breadth or certainty of the need yet. Yes, but I don't think the conversation should stop.

  1   2   3   >