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 | |||
00:39
aitron left,
aitron joined,
Manifest0 left
00:40
Manifest0 joined
00:56
[Coke] left
|
|||
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 | ||
01:55
frost joined
02:34
frost left
02:37
frost joined
04:31
frost left
04:56
aitron left
04:59
aitron joined
05:00
aitron left
05:08
aitron joined
05:41
aitron left
|
|||
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 | |
05:47
aitron joined,
aitron left
05:50
aitron joined
05:51
aitron left
05:59
aitron joined,
aitron left
06:09
aitron joined,
aitron left
|
|||
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 | |
06:20
aitron joined
06:24
aitron left
06:25
aitron joined
06:32
aitron left
06:34
aitron joined,
aitron left
06:44
aitron joined
06:45
aitron left
06:51
aitron joined
06:55
aitron left
07:00
aitron joined
07:04
aitron left
07:27
aitron joined
07:30
aitron left
07:35
aitron joined
07:37
aitron left
07:45
aitron joined,
aitron left
07:50
aitron joined
07:53
aitron left
08:05
aitron joined
08:12
aitron left
08:18
aitron joined
08:19
aitron left
08:28
aitron joined
08:35
aitron left
08:38
aitron joined
08:39
aitron left,
aitron joined
08:44
aitron left
08:51
aitron joined
08:52
aitron left
09:04
aitron joined
09:06
aitron left
09:11
dakkar joined
09:21
aitron joined,
aitron left
09:36
aitron joined
09:37
aitron left
09:52
aitron joined
09:53
aitron left,
aitron joined
10:07
aitron left
10:14
aitron joined
10:15
aitron left
10:24
aitron joined
10:29
aitron left
10:37
aitron joined
10:47
aitron left
10:48
aitron joined
10:51
aitron left
10:58
aitron joined
11:03
aitron left
11:06
aitron joined
11:10
aitron left
11:17
aitron joined
11:18
aitron left
11:27
aitron joined
11:29
aitron left
11:42
aitron joined
11:45
aitron left
11:49
aitron joined
11:51
aitron left
12:28
aitron joined,
aitron left
12:38
aitron joined
12:39
aitron left
12:58
aitron joined
13:00
aitron left
13:02
anight[m] joined
13:03
aitron joined
13:06
aitron left
13:10
aitron joined
13:13
aitron left,
qorg11 left
13:15
qorg11 joined
13:22
aitron joined,
aitron left
13:30
aitron joined
13:56
aitron left
14:57
aitron joined,
aitron left
15:39
aitron joined
15:44
aitron left
16:00
aitron joined
17:31
aitron left
17:35
aitron joined
17:36
aitron left
17:39
dakkar left
22:13
discord-raku-bot left
22:14
discord-raku-bot joined
22:18
discord-raku-bot left,
discord-raku-bot joined
|