develooper Front page | perl.perl6.users | Postings from January 2020

Re: stolen uint's

Thread Previous | Thread Next
From:
Trey Harris
Date:
January 29, 2020 00:30
Subject:
Re: stolen uint's
Message ID:
CALKJ+Evd0DMfK2kOrGyWPy9R5YAm6jTDtzxYZTeD-iEbEPmqpQ@mail.gmail.com
On Tue, Jan 28, 2020 at 19:06 ToddAndMargo via perl6-users <
perl6-users@perl.org> wrote:

> On 2020-01-28 15:37, Trey Harris wrote:
> >
> >
> > On Tue, Jan 28, 2020 at 18:09 ToddAndMargo via perl6-users
> > <perl6-users@perl.org <mailto:perl6-users@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
> >           changes that phenomenon ... An especially unusual
> >           version of the observer effect occurs in quantum
> >           mechanics, as best demonstrated by the double-slit
> >           experiment
> >
> >     Seems Quantum theory has come to Raku, only we call it "unboxing".
> >
> >
> > As I wrote in your Raku/problem-solving issue (#154), your question is
> > not well-formed. A native value has no metadata, so how can it have a
> > type? Any experience at all with a language with pointer arithmetic
> > should make this clear.
> >
> > And you issue doesn’t seem to be with unboxing—as far as I can tell,
> > you’re unboxing (assigning to a native) just fine, it’s the autoboxing
> > that’s giving you fits.
> >
> > If you can show a language that can do what you want—whether it’s a
> > `typeof` equivalent or a binary data validity checker or a magic number
> > heuristic or something else, then we may be able to help you, but right
> > now you seem to be asking for something akin to wanting to know what
> > color the bits in your uint32 are—it’s not a question with meaning.
>
> Trey,
>
> If I ask what something is, I want an accurate answer back.


What does “accurate” mean for a native value? It’s a binary blob. It has no
type in the memory, only in the runtime. If you successfully assigned it
and haven’t done any OO operations on it, as far as the runtime’s
concerned, it’s still the type it was when you assigned it. If you have
done OO operations on it, then it’s been autoboxed and you can do `.^name`
against it.

I’ve only asked three times, but I’ll try once more: a problem statement
would be helpful here.  What are you trying to achieve other than poking
the spot to see if it still hurts when you poke it? It may be possible to
do what you want with either anonymous variables or with a class serving as
a container for a native attribute (which can ensure that the attribute
can’t be autoboxed).

But just saying “I want to run this method that is undefined on this thing
and has no well-formed answer for this thing apart from what I can see by
inspecting the code” isn’t helpful in understanding what you want. “And I
want it to give me an *accurate* answer” doesn’t help to understand what
that is, either.

>

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About