Nemokosch anyways, I seriously doubt there is a legitimate reason to mix definite and indefinite values, even if we assume that indefinite values are necessary for some reason 00:01
and once we are on a meta-level where we actually want to treat type objects as values - now, that's the point where still treating them undefined just doesn't feel right 00:02
Raku is a sort of pantheistic language tbh, with this treating of all value instances as manifestations of the type object 00:03
[Coke] those are a lot of words, for sure 00:04
Nemokosch I can understand why some people would find this approach of default values and definiteness elegant but I'm not yet convinced it really pays off, considering the conceptual anomalies 00:05
gfldex Please be careful not to mix up definite with defined. 00:06
m:```
my \f = Failure.new('bad');
say f.DEFINITE, f.defined;
```
Nemokosch I have heard these two words separated before - talking about anomalies... 00:08
okay, not as bad as the (in)famous [] == ![] in Javascript 00:09
[Coke] m: my \f = Failure.new('bad'); say f.DEFINITE, f.defined; 00:11
camelia TrueFalse
Nemokosch still, it seems like a similar paradox to me - there was a cute abstraction and another cute abstraction and they have a bizarre interaction
I guess the rationale is that Failures descend from Nil and Nil is the epitome of undefinedness 00:12
in the meantime, it's clearly not a type object but an instance so it's "definite" 00:14
yes, let me say, it's very much like [] == ![] to me
[Coke] docs.raku.org/type/Mu#index-entry-...od_defined - A few types (like Failure) override defined to return False even for instances:
Could use a sentence as to *why*, for sure.
Nemokosch it made sense that [] can be converted to an empty string - and it also made sense that an empty string can be converted to zero 00:16
it made quite a lot of sense that booleans get compared by integer value rather than truthyness
it also made sense that an object is truthy
and bang, [] == ![]
gfldex At least in my head, Nil is neither defined nor undefined. It is the absence of a type check and as such the concept that allows us to transport Expections from one thread to another.
Nemokosch Well... this is a very technical approach, lol 00:20
the opposite of JS undefined vs null which is rather metaphysical
anyway, Nil doesn't seem to live in the universe of values, definite or indefinite 00:22
Considering rather the metaphysics than the pragmatics, Nil in Raku is more like undefined than null in JS 00:24
gfldex m:``` 00:26
class Exfiltrator is Nil {
method new { self.CREATE }
has $.payload is rw;
}
sub subish( --> Int:D) {
Exfiltrator.new.&{ .payload = "important document"; $_ }
}
say subish.WHAT;
say subish.payload;
```
My mind is now sufficiently boggled and I shall head for bed. 00:28
Nemokosch lol
anyway, this is insane
jaguart Thanks @coke - that was enough of a hint to get my ``use lib`` et al working 01:02
My problem was due to the recommends in the docs that you put your .rakumod files in a X/lib directory - if they sit in X itself, things work better 01:04
jaguart a regex question, in my grammer this works: token head { ^^ '='+ .*? '='+ $$ } but this fails: token head { ^^ '=' ** 2..* .*? '='+ $$ } - error is "Invalid to edge 0 in NFA statelist" - all I was trying to do is change the quantifier from 1-or-more to 2-or-more? 05:46
jaguart Hmm - seems related to alternation - if I switch to || aka first-wins the error does not occur, and as first-wins is what I'm after - solved. 06:11