🦋 Welcome to the MAIN() IRC channel of the Raku Programming Language (raku.org). This channel is logged for the purpose of keeping a history about its development | evalbot usage: 'm: say 3;' or /msg camelia m: ... | Log inspection is getting closer to beta. If you're a beginner, you can also check out the #raku-beginner channel!
Set by lizmat on 25 August 2021.
00:02 melezhik left 00:05 reportable6 left 00:06 reportable6 joined 01:06 evalable6 left, committable6 left, reportable6 left, notable6 left, linkable6 left, statisfiable6 left, coverable6 left, releasable6 left, nativecallable6 left, shareable6 left, bisectable6 left, benchable6 left, bloatable6 left, unicodable6 left, greppable6 left, sourceable6 left, quotable6 left 01:07 benchable6 joined, notable6 joined, linkable6 joined, sourceable6 joined, statisfiable6 joined, coverable6 joined 01:08 evalable6 joined, reportable6 joined, shareable6 joined, committable6 joined, bisectable6 joined, greppable6 joined, quotable6 joined, nativecallable6 joined, bloatable6 joined 01:09 releasable6 joined, unicodable6 joined 01:20 japhb left 01:23 japhb joined 01:37 swaggboi left 02:15 swaggboi joined 02:19 atweiden_air-- joined
atweiden_air-- m: role A { has $.a = prompt('a: ') }; role B does A { has $.b = prompt('b: ') }; class AA does A { submethod TWEAK() { say('AA.TWEAK') } }; class AB is AA does B { submethod TWEAK() { say('AB.TWEAK') } }; AB.new.raku.say; 02:20
camelia a: AA.TWEAK
b: a: AB.TWEAK
AB.new(b => " »Um die siebente Stund‘, am Brückendamm.«", a => " »Am Mittelpfeiler.«", a => "»Wann treffen wir drei wieder zusamm?«")
atweiden_air-- why does this prompt twice?
2 repetitive rounds, i mean
m: role A { has $.a = prompt('a: ') }; role B does A { has $.b = prompt('b: ') }; class AA does A {}; class AB is AA does B {}; AB.new.raku.say; 02:22
camelia a: b: a: AB.new(b => " »Um die siebente Stund‘, am Brückendamm.«", a => " »Am Mittelpfeiler.«", a => "»Wann treffen wir drei wieder zusamm?«")
atweiden_air-- m: role A { has $.a = prompt('a: (Str)') }; role B does A { has $.b = prompt('b: (Str)') }; class AA does A {}; class AB is AA does B {}; AB.new.raku.say;
camelia a: (Str)b: (Str)a: (Str)AB.new(b => " »Um die siebente Stund‘, am Brückendamm.«", a => " »Am Mittelpfeiler.«", a => "»Wann treffen wir drei wieder zusamm?«")
atweiden_air-- I want to TWEAK() $!a in AB 02:26
this is fine, but repeats twice
m: role A {has $.a = prompt 'a (Str): '}; role B does A {has $.b = prompt 'b (Str): '}; class AA does A {}; class AB is AA does B {submethod TWEAK() {$!a = False}}; AB.new.raku.say;
camelia a (Str): b (Str): a (Str): AB.new(b => " »Um die siebente Stund‘, am Brückendamm.«", a => Bool::False, a => "»Wann treffen wir drei wieder zusamm?«")
atweiden_air-- not fine, $!a not declared in class AB 02:27
m: role A {has $.a = prompt 'a (Str): '}; role B {has $.b = prompt 'b (Str): '}; class AA does A {}; class AB is AA does B {submethod TWEAK() {$!a = False}}; AB.new.raku.say;
camelia ===SORRY!=== Error while compiling <tmp>
Attribute $!a not declared in class AB
at <tmp>:1
------> does B {submethod TWEAK() {$!a = False}}⏏; AB.new.raku.say;
expecting any of:
horizontal whitespace
postf…
atweiden_air-- DWIM without TWEAK() 02:28
m: role A {has $.a = prompt 'a (Str): '}; role B {has $.b = prompt 'b (Str): '}; class AA does A {}; class AB is AA does B {}; AB.new.raku.say;
camelia a (Str): b (Str): AB.new(b => " »Um die siebente Stund‘, am Brückendamm.«", a => "»Wann treffen wir drei wieder zusamm?«")
atweiden_air-- m: role A {has $.a = prompt 'a (Str): '}; role B does A {has $.b = prompt 'b (Str): '; submethod TWEAK() {$!a = False}}; class AA does A {}; class AB is AA does B {}; AB.new.raku.say; 02:29
camelia ===SORRY!=== Error while compiling <tmp>
Attribute $!a not declared in role B
at <tmp>:1
------> tr): '; submethod TWEAK() {$!a = False}}⏏; class AA does A {}; class AB is AA doe
expecting any of:
horizontal whites…
03:19 linkable6 left, evalable6 left 03:22 evalable6 joined, linkable6 joined 04:22 benchable6 left, coverable6 left, sourceable6 left, notable6 left, releasable6 left, greppable6 left, committable6 left, statisfiable6 left, linkable6 left, unicodable6 left, shareable6 left, evalable6 left, nativecallable6 left, bisectable6 left, reportable6 left, bloatable6 left, quotable6 left, greppable6 joined 04:23 quotable6 joined, nativecallable6 joined, bloatable6 joined, sourceable6 joined, notable6 joined, unicodable6 joined, benchable6 joined, reportable6 joined, committable6 joined 04:24 linkable6 joined, bisectable6 joined, statisfiable6 joined 04:25 releasable6 joined, coverable6 joined, evalable6 joined, shareable6 joined 04:46 xinming left 04:48 xinming joined 05:12 lockywolf left 05:16 lockywolf joined 05:27 frost joined, frost left 05:30 lockywolf left 05:34 lockywolf joined 05:35 razetime joined 05:51 frost joined 06:07 reportable6 left, reportable6 joined 06:38 guifa left
CIAvash atweiden_air--: `AB` does not have the `$!a` attribute, `AA` does, so it can access it via `$.a`. You can do at least three things: 1. make `$.a is rw`, and in AB do `$.a =False`. 2. move `TWEAK` method inside `AA`. 3. Avoid inheritance and do `class AB does B does A { method TWEAK { $!a = false } }`. 06:38
atweiden_air--: But I think it's best not to use prompt in attributes, and leave it inside `TWEAK`: `role R {has $.a; has $.b; method TWEAK { self!prompt_a; self!prompt_b; }; method !prompt_a { $!a = prompt 'a (Str): ' }; method !prompt_b { $!b = prompt 'b (Str): ' } }; class A does R {}; A.new.raku.say;` 06:39
atweiden_air--: or if you want to override things: `role R {has $.a; has $.b; method TWEAK { self!prompt_a; self!prompt_b; }; method !prompt_a { $!a = prompt 'a (Str): ' }; method !prompt_b { $!b = prompt 'b (Str): ' } }; class A does R { method TWEAK { self!prompt_b } }; A.new.raku.say;` 06:41
06:43 guifa joined 07:05 razetime left 07:38 razetime joined 07:40 lichtkind_ joined 08:05 razetime left
lizmat .tell Xliff please, if you notice any changes, please make an issue. A workaround is nice, but if we don't know about issues, they continue to exist :-( 08:12
08:13 razetime joined 08:15 oodani left 08:17 oodani joined 08:24 Sgeo left 08:25 jjido joined 08:32 Manifest0 joined 08:41 razetime left 08:49 xinming left, xinming joined 08:53 n1to joined 09:09 phil1 joined
phil1 Hello, I am trying to translate Dough Hoyte's football-game macro (cf. Let Over Lambda, p. 77), to Raku. 09:10
Here's my first attempt.
Uploaded file: uploads.kiwiirc.com/files/b48d7dc3...pasted.txt
When I run it, I get this message: "expecting any of: argument list" 09:12
Sorry, my uploaded file doesn't containt "use experimental :macros;". 09:13
Are macros within macros allowed in Raku? 09:14
And here's the original Lisp code: 09:15
Uploaded file: uploads.kiwiirc.com/files/7a0b9047...pasted.txt
09:19 jjido left
phil1 Hello, I found a solution without macros. 09:26
Uploaded file: uploads.kiwiirc.com/files/4827162b...pasted.txt
Please ignore my question.
09:30 phil1 left 10:04 jjido joined 10:06 guifa left 10:36 linkable6 left 10:39 linkable6 joined 10:46 silasfox joined 10:47 silasfox left 11:17 jjido left 11:38 sena_kun left 11:39 sena_kun joined 12:06 reportable6 left 12:08 reportable6 joined
atweiden_air-- CIAvash i’ll take a look when i get a moment. thanks 12:22
12:26 atweiden_air-- left 12:32 hhcryfqnut joined 12:49 hhcryfqnut left 13:09 coleman joined 13:21 hhcryfqnut joined 13:30 guifa joined 13:31 guifa left 13:32 jjido joined 13:33 razetime joined 13:35 silasfox joined 13:36 jjido left
Manifest0 Hi! 13:41
When we define a main function like "sub MAIN(Int $v)" shouldn't the type constraint be enforced when we invoke from the command line (in this example, shouldnt $v be Int and not IntStr)?
lizmat m: dd IntStr ~~ Int 13:42
camelia Bool::True
lizmat that's why an Int is also ok
Manifest0 m: dd IntStr ~~ Str 13:43
camelia Bool::True
Manifest0 This is problematic if i'm passing them to a new multi function 13:44
13:45 silasfox left
Manifest0 example: 13:47
Ambiguous call to 'sqlite3_bind(DBDish::SQLite::Native::STMT, Int, IntStr)'; these signatures all match:
(DBDish::SQLite::Native::STMT $stmt, Int $n, Int:D $i)
(DBDish::SQLite::Native::STMT $stmt, Int $n, Str:D $d)
(DBDish::SQLite::Native::STMT $stmt, Int $n, Real:D $d) 13:48
:-(
14:09 guifa joined 14:51 dogbert17 joined 15:01 eseyman left 15:03 eseyman joined 15:09 frost left 15:19 n1to left, bd3i left, hhcryfqnut left 15:20 bd3i joined 15:24 hhcryfqnut joined
nine Manifest0: $v.Int 15:35
Or maybe declare it as sub MAIN(Int() $v) 15:36
15:45 sena_kun left 15:46 sena_kun joined 16:22 razetime left
hhcryfqnut syntax question: 16:43
stackoverflow.com/questions/718099...es-in-raku
lizmat hhcryfqnut: answered it 16:56
16:57 sena_kun left, guifa left 16:58 sena_kun joined
hhcryfqnut thanks! 17:09
lizmat you're welcome :-)
17:14 hhcryfqnut left 17:26 jadedctrl joined 17:40 melezhik joined
melezhik Hi community! I have dropped future design of SparkyCI - github.com/melezhik/sparkyci/blob/...ocs/dsl.md , would appreciate for comments 17:40
17:43 melezhik left 17:53 melezhik joined
lizmat melezhik: perhaps also post on reddit ? 17:54
melezhik @lizmat, yeah maybe ... just decided to start with irc first ...
Still not sure where people visit more ... 17:55
17:58 melezhik left 18:04 p6steve_ left, discord-raku-bot left 18:05 p6steve left, discord-raku-bot joined 18:06 p6steve joined, p6steve_ joined 18:07 reportable6 left 18:08 reportable6 joined 18:11 p6steve left, p6steve_ left 18:15 Sgeo joined 18:32 melezhik joined 18:37 melezhik left 18:45 melezhik joined 18:47 melezhik left 18:49 jjido joined 18:59 jjido left
Geth doc: dd2c13d77d | (Elizabeth Mattijsen)++ (committed using GitHub Web editor) | doc/Language/exceptions.pod6
Some tweaks on CATCH (#4050)

  * Some tweaks on CATCH
In resoponse to github.com/Raku/doc/issues/4049
  * typo
... (7 more lines)
19:10
linkable6 Link: docs.raku.org/language/exceptions
19:11 linkable6 left 19:13 jjido joined, linkable6 joined 19:35 coleman left 20:11 p6steve joined, p6steve_ joined 20:20 Geth left, Geth joined 20:28 melezhik joined 20:29 melezhik left 20:45 guifa joined 20:48 p6steve_ left 20:50 p6steve left 20:57 p6steve joined, p6steve_ joined 21:06 guifa left 21:14 p6steve_ left, p6steve left 21:26 lichtkind__ joined 21:29 guifa joined, lichtkind_ left 22:05 discord-raku-bot left 22:06 discord-raku-bot joined 22:12 guifa left 22:54 jjido left 23:54 reportable6 left, committable6 left, bloatable6 left, nativecallable6 left, linkable6 left, releasable6 left, benchable6 left, quotable6 left, shareable6 left, sourceable6 left, statisfiable6 left, bisectable6 left, coverable6 left, evalable6 left, greppable6 left, unicodable6 left, notable6 left, reportable6 joined 23:55 linkable6 joined, greppable6 joined, bloatable6 joined 23:56 coverable6 joined, bisectable6 joined, quotable6 joined, releasable6 joined, benchable6 joined, nativecallable6 joined, committable6 joined, sourceable6 joined 23:57 notable6 joined, statisfiable6 joined, evalable6 joined, unicodable6 joined, shareable6 joined