🦋 Welcome to the MAIN() IRC channel of the Raku Programming Language (raku.org). Log available at irclogs.raku.org/raku/live.html . If you're a beginner, you can also check out the #raku-beginner channel! Set by lizmat on 6 September 2022. |
|||
00:00
reportable6 left
00:02
reportable6 joined
00:13
jpn left
01:13
bloatable6 left,
releasable6 left,
sourceable6 left,
greppable6 left,
quotable6 left,
unicodable6 left,
notable6 left,
coverable6 left,
squashable6 left,
bisectable6 left,
committable6 left,
evalable6 left,
reportable6 left,
benchable6 left,
linkable6 left,
tellable6 left,
statisfiable6 left,
nativecallable6 left,
shareable6 left
01:14
nativecallable6 joined,
tellable6 joined,
benchable6 joined,
notable6 joined,
sourceable6 joined,
statisfiable6 joined,
releasable6 joined,
bisectable6 joined
01:15
linkable6 joined,
quotable6 joined,
shareable6 joined,
coverable6 joined,
committable6 joined,
greppable6 joined,
squashable6 joined
01:16
evalable6 joined,
unicodable6 joined,
reportable6 joined,
bloatable6 joined
01:46
xinming left
01:48
xinming joined
|
|||
rf | tonyo: I've having some troubles installing Fez on a SUSE server, it seems like it wants "libz" which I assume is zlib, which I have, what can I do? | 01:55 | |
japhb | rf: I've been getting that lately too. Just do `zef install fez --exclude=libz` | 02:04 | |
(This really shouldn't be necessary, but I find it so for several modules.) | |||
rf | Weird | 02:07 | |
Seems to work excluding "libz" but I don't think that's intended | |||
Xliff_ | How can I determine if a lexical variable is writeable? | 02:08 | |
m: my $a; $a.VAR.^methods.map( *.name ).say | 02:09 | ||
camelia | (<anon> <anon> new name of default dynamic WHICH BUILDALL) | ||
Xliff_ | m: my $a; $a.VAR.^name.say | ||
camelia | Scalar | ||
rf | @lizmat I may be the first person in the world to use Raku to smoke meats | ||
Got a contract offer to build a smart meat-thermometer for a large company, I would most likely write the scripted side in Raku :) | 02:11 | ||
Xliff_ | rf++ # Nice! Send me a demo unit? I can give you data! | ||
rf | Haha, I'll follow up in the coming weeks if they want to go ahead with it | ||
Xliff_ | m: sub a ($a) { $a.^name.say }; a | 02:13 | |
camelia | ===SORRY!=== Error while compiling <tmp> Calling a() will never work with declared signature ($a) at <tmp>:1 ------> sub a ($a) { $a.^name.say }; ⏏a |
||
Xliff_ | m: sub a ($a) { $a.^name.say }; a(1) | ||
camelia | Int | ||
Xliff_ | m: sub a ($a is copy) { $a.^name.say }; a(1) | ||
camelia | Int | ||
rf | Are you trying to see if a variable is constant? | ||
Xliff_ | No. I'm trying to see if the symbol itself can be written to. | ||
m: sub a ($a is copy) { CATCH { default { .name.say }; $a.^name.say; b() }; sub b { OUTER::<$a> = 42 }; | 02:15 | ||
camelia | ===SORRY!=== Error while compiling <tmp> Missing block at <tmp>:1 ------> .say; b() }; sub b { OUTER::<$a> = 42 };⏏<EOL> |
||
Xliff_ | m: sub a ($a is copy) { CATCH { default { .name.say }; }; $a.^name.say; b() }; sub b { OUTER::<$a> = 42 }; | ||
camelia | ( no output ) | ||
Xliff_ | m: sub a ($a is copy) { CATCH { default { .name.say }; }; $a.^name.say; b() $a.say}; sub b { OUTER::<$a> = 42 }; | ||
camelia | ===SORRY!=== Error while compiling <tmp> Two terms in a row at <tmp>:1 ------> ault { .name.say }; }; $a.^name.say; b()⏏ $a.say}; sub b { OUTER::<$a> = 42 }; expecting any of: infix infix stopper … |
||
Xliff_ | m: sub a ($a is copy) { CATCH { default { .name.say }; }; $a.^name.say; b(); $a.say}; sub b { OUTER::<$a> = 42 }; | ||
camelia | ( no output ) | ||
Xliff_ | m: sub a ($a is copy) { $a.^name.say; b(); $a.say}; sub b { CATCH { default { .name.say }; }; OUTER::<$a> = 42 }; | 02:16 | |
camelia | ( no output ) | ||
Xliff_ | WTF? | ||
m: sub a ($a is copy) { $a.^name.say; b(); $a.say}; sub b { CATCH { default { .^name.say }; }; OUTER::<$a> = 42 }; | |||
camelia | ( no output ) | ||
Xliff_ | m: sub a ($a is copy) { $a.^name.say; b(); $a.say}; sub b { CATCH { default { .^name.say }; }; OUTER::<$a> = 42; say "boop!" }; | 02:17 | |
camelia | ( no output ) | ||
rf | m: sub a ($a is copy) { $a.^name.say; b(); $a.say}; sub b { CATCH { default { .^name.say }; }; OUTER::<$a> = 42; say "boop!" }; b(); | ||
camelia | X::Assignment::RO | ||
Xliff_ | Thanks. I guess that will have to do. | ||
m: sub a ($a is copy) { $a.^name.say; b(); $a.say}; sub b { CATCH { default { .^name.say }; }; OUTER::<$a> = 42; say "boop!" }; a() | 02:18 | ||
camelia | ===SORRY!=== Error while compiling <tmp> Calling a() will never work with declared signature ($a is copy) at <tmp>:1 ------> }; }; OUTER::<$a> = 42; say "boop!" }; ⏏a() |
||
Xliff_ | m: sub a ($a is copy) { $a.^name.say; b(); $a.say}; sub b { CATCH { default { .^name.say }; }; OUTER::<$a> = 42; say "boop!" }; a(1) | ||
camelia | Int X::Assignment::RO 1 |
||
Xliff_ | m: sub a ($a is rw) { $a.^name.say; b(); $a.say}; sub b { CATCH { default { .^name.say }; }; OUTER::<$a> = 42; say "boop!" }; a(1) | 02:19 | |
camelia | Parameter '$a' expects a writable container (variable) as an argument, but got '1' (Int) as a value without a container. in sub a at <tmp> line 1 in block <unit> at <tmp> line 1 |
||
rf | Can't pass 1 to rw | 02:20 | |
Or any constant for that matter | |||
Xliff_ | I know, but "$a is copy" should make $a a lexical container | ||
rf | I thought it merely copied the container to $a | ||
Xliff_ | So OUTER::<$a> should be writeable. | ||
Otherwise this shouldn't work..., | 02:21 | ||
m: sub a ($a is copy) { $a.^name.say; $a = 2; $a.say }; a(1) | |||
camelia | Int 2 |
||
rf | m: my $s = 1; sub a ($a is copy) { $a := 3 }; a(5); say $s; | ||
camelia | 1 | ||
02:22
skyesoss joined
|
|||
rf | m: my $s = 1; sub a ($a is copy) { $a := 3 }; a($s); say $s; | 02:22 | |
camelia | 1 | ||
rf | m: sub f ($a) { $a := 5 }; f(10); | 02:23 | |
camelia | ===SORRY!=== Error while compiling <tmp> Cannot bind to '$a' because it was bound in a signature and variables bound in signatures cannot be rebound unless they were declared with the 'is rw' or 'is copy' traits at <tmp>:1 ------> su… |
||
rf | :) | ||
Xliff_ | m: sub f ($a is copy) { $a := 5 }; f(10); | 02:24 | |
camelia | ( no output ) | ||
Xliff_ | m: sub f ($a is copy) { $a = 5 }; f(10); | ||
camelia | ( no output ) | ||
Xliff_ | m: sub b { OUTER::<$a> = 42 }; sub f ($a is copy) { $a = 5; b() }; f(10); | ||
camelia | Cannot modify an immutable Nil value in sub b at <tmp> line 1 in sub f at <tmp> line 1 in block <unit> at <tmp> line 1 |
||
Xliff_ | m: sub b { OUTER::<$a>.say }; sub f ($a is copy) { $a = 5; b() }; f(10); | ||
camelia | Nil | ||
rf | Is OUTER RakuAST stuff? | 02:25 | |
Xliff_ | m: sub b { OUTER::.keys }; sub f ($a is copy) { $a = 5; b() }; f(10); | ||
camelia | ( no output ) | ||
Xliff_ | m: sub b { OUTER::.keys.say }; sub f ($a is copy) { $a = 5; b() }; f(10); | ||
camelia | ($_ $?PACKAGE $! $¢ EXPORT $=pod &b $=finish &f $/ GLOBALish !UNIT_MARKER ::?PACKAGE) | ||
Xliff_ | m: sub b { CALLER::.keys.say }; sub f ($a is copy) { $a = 5; b() }; f(10); | ||
camelia | ($¢ $/ $a $!) | ||
Xliff_ | AHAHAHAHA! | ||
m: sub b { CALLER::<$a> = 42 }; sub f ($a is copy) { $a = 5; b() }; f(10); | |||
camelia | Cannot access '$a' through CALLER, because it is not declared as dynamic in sub b at <tmp> line 1 in sub f at <tmp> line 1 in block <unit> at <tmp> line 1 |
||
Xliff_ | :S | ||
02:26
tea3po joined
02:29
teatwo left
02:30
tea3po left
02:31
tea3po joined,
Xliff_ left
03:31
reportable6 left,
benchable6 left,
nativecallable6 left,
quotable6 left,
committable6 left,
evalable6 left,
unicodable6 left,
notable6 left,
statisfiable6 left,
releasable6 left,
shareable6 left,
bisectable6 left,
tellable6 left,
squashable6 left,
coverable6 left,
sourceable6 left,
greppable6 left,
bloatable6 left,
linkable6 left,
benchable6 joined,
nativecallable6 joined,
tellable6 joined,
squashable6 joined
03:32
quotable6 joined,
evalable6 joined,
committable6 joined,
greppable6 joined,
sourceable6 joined,
notable6 joined
03:33
statisfiable6 joined,
unicodable6 joined,
releasable6 joined,
bisectable6 joined,
bloatable6 joined
03:34
shareable6 joined,
reportable6 joined,
coverable6 joined,
linkable6 joined
03:45
xinming left
03:47
xinming joined
04:47
shareable6 left,
sourceable6 left,
squashable6 left,
nativecallable6 left,
statisfiable6 left,
coverable6 left,
bisectable6 left,
tellable6 left,
notable6 left,
greppable6 left,
evalable6 left,
committable6 left,
quotable6 left,
benchable6 left,
bisectable6 joined,
nativecallable6 joined,
shareable6 joined,
coverable6 joined
04:48
greppable6 joined,
sourceable6 joined,
evalable6 joined,
committable6 joined,
statisfiable6 joined,
quotable6 joined
04:49
benchable6 joined,
notable6 joined,
squashable6 joined
04:50
tellable6 joined
05:45
xinming left
05:47
xinming joined
06:00
reportable6 left
06:01
reportable6 joined
06:02
RonaldR34g4m joined
06:03
Vyrus left
06:18
skyesoss left
06:40
zapwai left
07:24
derpydoo left
07:48
sena_kun joined
08:00
skyesoss joined
08:20
jpn joined
08:49
jpn left
08:51
jpn joined
|
|||
lizmat | .tell Xliff I understand what the .ast and .set-ast would do, but I seem to be missing how that would only make that "only available at BEGIN and CHECK" | 08:58 | |
tellable6 | lizmat, I'll pass your message to Xliff_ | ||
09:05
xinming left
09:07
xinming joined
09:13
jpn left
09:14
jpn joined
09:42
euandreh joined
10:09
tadzik left,
tadzik joined
10:10
jpn left
10:13
Sgeo left
11:03
Xliff joined
|
|||
Xliff | . | 11:03 | |
tellable6 | 2023-06-24T08:58:08Z #raku <lizmat> Xliff I understand what the .ast and .set-ast would do, but I seem to be missing how that would only make that "only available at BEGIN and CHECK" | ||
Xliff | lizmat: .ast and .set-ast are compile-time available items. Objects would not have them earlier. | 11:04 | |
lizmat: .ast and .set-ast are compile-time available items. Objects would not have them earlier. | 11:05 | ||
Does that make sense? | |||
11:46
Voldenet left
11:47
Voldenet joined
11:54
peder joined
12:00
reportable6 left
12:02
reportable6 joined
13:02
reportable6 left,
committable6 left,
evalable6 left,
squashable6 left,
squashable6 joined
13:04
committable6 joined,
reportable6 joined
13:05
evalable6 joined
13:38
uzl[m] left,
uzl[m] joined
13:49
euandreh1 joined
13:50
euandreh left,
euandreh1 is now known as euandreh
|
|||
leont | m: dd (False xor False), (True xor True) | 13:53 | |
camelia | Bool::False Nil |
||
leont | Why is True xor True Nil? That looks like a bug to me, or am I missing something | 13:54 | |
nemokosch | m: say(True ^^ True) | 13:57 | |
Raku eval | Nil | ||
nemokosch | oh right... this operator has funny semantics | 13:58 | |
docs.raku.org/language/operators#infix_^^ | 13:59 | ||
Xliff | Anyone here familiar with the Raku parser? | 14:04 | |
nemokosch | probably not familiar enough but you know | 14:07 | |
"don't ask to ask - just ask" | 14:08 | ||
Xliff | Yeah, well I'm wondering when the objects are created at compile time so that they can be accessed at BEGIN time | 14:15 | |
14:20
jgaz left
|
|||
Xliff | m: $a = 1; CHECK { $*CU.gist.say } | 14:22 | |
camelia | ===SORRY!=== Error while compiling <tmp> Variable '$a' is not declared. Perhaps you forgot a 'sub' if this was intended to be part of a signature? at <tmp>:1 ------> <BOL>⏏$a = 1; CHECK { $*CU.gist.say } |
||
Xliff | m: my $a = 1; CHECK { $*CU.gist.say } | 14:23 | |
camelia | ===SORRY!=== Error while compiling <tmp> An exception X::Dynamic::NotFound occurred while evaluating a CHECK: Dynamic variable $*CU not found at <tmp>:1 Exception details: Dynamic variable $*CU not found in block at <tmp> line 1… |
||
Xliff | m: use experimental :rakuast; my $a = 1; CHECK { $*CU.gist.say } | ||
camelia | ===SORRY!=== Error while compiling <tmp> An exception X::Dynamic::NotFound occurred while evaluating a CHECK: Dynamic variable $*CU not found at <tmp>:1 Exception details: Dynamic variable $*CU not found in block at <tmp> line 1… |
||
Xliff | Rut Roh! | ||
14:25
teatwo joined
14:28
tea3po left
|
|||
rf | Morning folks | 15:11 | |
Xliff | 'morning rf! | 15:20 | |
15:32
jgaz joined
15:33
jgaz left
15:34
jgaz joined
15:45
xinming left,
zapwai joined
15:47
xinming joined
|
|||
Anton Antonov | @rf You should like my "monadic parsers" efforts. Have you used parser combinators (in any language) ? | 15:55 | |
rf | Yes In Haskell and OCaml | 16:24 | |
Mostly for toys though I've never used them practically | 16:25 | ||
Anton Antonov | @rf Good to know. I should/will make a "very practical" example. | 16:28 | |
rf | Haha in Raku? :P | 16:29 | |
16:37
zapwai left
|
|||
Anton Antonov | @rf Yes in Raku. See "FunctionalParsers" : raku.land/zef:antononcube/FunctionalParsers | 16:48 | |
16:49
CIAvash left,
CIAvash joined
|
|||
rf | ◁ I like the choice in Symbols Anton | 16:59 | |
17:07
codesections joined
|
|||
Anton Antonov | @rf Thanks! I was still have not figured out which one is the best set of operators. | 17:16 | |
17:45
bdju left
18:00
reportable6 left
18:02
reportable6 joined
19:35
bdju joined
19:50
Sgeo joined
20:24
sena_kun left
21:03
rf left
21:47
rf joined
21:50
skyesoss left
22:14
rf left,
rf joined
22:57
Xliff left
23:42
derpydoo joined
|