🦋 Welcome to the former MAIN() IRC channel of the Raku Programming Language (raku.org). This channel has moved to Libera (irc.libera.chat #raku) Set by lizmat on 23 May 2021. |
|||
00:02
reportable6 left
00:04
reportable6 joined
01:03
jgaz joined
01:11
jgaz left
01:47
frost joined
02:47
linkable6 left,
evalable6 left
02:49
linkable6 joined
02:50
evalable6 joined
03:05
RandalSchwartz left
03:51
Xliff joined
04:51
evalable6 left,
linkable6 left
04:52
linkable6 joined
04:54
evalable6 joined
05:32
bd3i left
05:35
ufobat_ joined
05:57
Eddward_ left
06:02
reportable6 left
06:04
reportable6 joined
06:45
Sgeo left
|
|||
Geth | examples: mykhal++ created pull request #78: Update 01-00introduction.raku |
07:02 | |
07:02
patrickb joined
07:09
mykhal joined
|
|||
Ulti | gist.github.com/MattOates/c5879a07b1ef2c013097 if you check out the comments you can see the difference in numerical performance of Raku from 2016 and now | 07:52 | |
I think more important is the standard deviation really showing that things are consistent and predictable in how they perform | 07:54 | ||
08:09
linkable6 left,
evalable6 left
08:10
evalable6 joined
08:11
linkable6 joined
08:13
archenoth joined
08:16
Oshawott left
08:28
Juerd left
08:52
Juerd joined
|
|||
Geth | examples: 2fd79e0298 | (Michal Bozon)++ (committed using GitHub Web editor) | categories/cookbook/01strings/01-00introduction.raku Update 01-00introduction.raku mistaken variable |
09:12 | |
examples: 1cbfc20b33 | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | categories/cookbook/01strings/01-00introduction.raku Merge pull request #78 from mykhal/patch-1 Update 01-00introduction.raku |
|||
09:38
sono left
|
|||
lizmat | trivia question of the day: what's so special about the number 129419 ? | 09:39 | |
sjn | nothing? :) | 10:05 | |
I pretty much has to be more interesting than 12407, at least, so there's that. | 10:08 | ||
lizmat | m: say chr(129419) | 10:20 | |
camelia | 🦋 | ||
pony | hehe | 10:33 | |
:) | |||
Xliff | m: 129419.sqrt.say | ||
camelia | 359.74852327702473 | ||
Xliff | Well...darn | ||
Well...darn | 10:34 | ||
10:58
sena_kun joined
|
|||
Xliff | m: use NativeCall; constant CARD8 = uint8; class AA { has CARD8 $!aa is rw }; | 10:59 | |
camelia | Potential difficulties: useless use of 'is rw' on $!aa at <tmp>:1 ------> 3ARD8 = uint8; class AA { has CARD8 $!aa 7⏏5is rw }; |
||
Xliff | ?? Why useless use? | ||
... /o\ # Oh! | 11:02 | ||
kawaii_ | can the contents of a subset be overridden/extended? at the moment I have `subset TerminationPoint of Str where * eq any(<system transfer reward penalty>);` but ideally users of my lib would be able to add their own termination points to that list | 11:14 | |
Xliff | m: sub myRoutine (\v) { True }; subset TerminationPoint of Str where *.&myRoutine; | 11:17 | |
camelia | ( no output ) | ||
Xliff | Huh! That worked... | ||
m: my %conditions; sub myRoutine (\v) { for %conditions.keys { return False unless %conditions{$_}(v) }; True }; subset TerminationPoint of Str where *.&myRoutine; %conditions<even> = -> $v { $v eq 'Even' }; sub testCondition(TerminationPoint $a) { say 'Terminated!' }; testCondition('Even'); testCondition(42); | 11:20 | ||
camelia | Unhandled exception: Failed to write 184 bytes to filehandle: No space left on device from gen/moar/stage2/NQPHLL.nqp:2117 (/home/camelia/rakudo-m-inst-1/share/nqp/lib/NQPHLL.moarvm:command_eval) from gen/moar/stage2/NQPHLL.nqp:2036 (/home/cam… |
||
Xliff | rut roh! | ||
11:32
ufobat__ joined
|
|||
kawaii_ | oh dear :D | 11:34 | |
11:34
patrickb left
11:35
patrickb joined
11:36
patrickb left
11:37
patrickb joined,
ufobat_ left
|
|||
Altreus | Can you use a class method in a subset I wonder | 11:39 | |
not sure how I would write it... | |||
class A { subset X of Str where * eq any ( ??? ); } | 11:40 | ||
&!foo? | |||
11:43
patrickb left
11:44
patrickb joined,
squashable6 left
11:45
squashable6 joined
11:47
patrickb left
11:48
patrickb joined
11:49
patrickb left
11:50
patrickb joined
11:51
patrickb left
11:52
patrickb joined
11:53
patrickb left
11:54
patrickb joined,
patrickb left
|
|||
Altreus | nope | 11:58 | |
12:02
reportable6 left
12:05
reportable6 joined
12:28
smarton left,
smarton joined
12:33
MasterDuke joined
12:40
Eddward_ joined
12:46
bd3i joined
12:47
xinming left
|
|||
tbrowder | ugexe: i think you said once that a bin/prog for one zef-installed module will not conflict with another module's bin/prog with the same name for installation, thus both will be available, is my memory correct? | 12:56 | |
if so, how does the user disambiguate them? (oops, i'll go check zef docs) | 12:58 | ||
13:00
sena_kun left
|
|||
ugexe | technically they are available, but it doesnt mean your shell lets you launch them by seeing them in PATH | 13:01 | |
github.com/rakudo/rakudo/pull/4153 this would solve your issue but i never merged it doh | 13:03 | ||
oh i left a comment on something saying it wasnt sufficient | 13:04 | ||
tbrowder | so at the moment it looks like dup names will overwrite in my .raku/bin dir, correct? at least for the same module | 13:15 | |
on another zef topic, did i see a convo recently about speeding up zef by cleaning up somehow (removing old versions helps i'm sure)? | 13:17 | ||
afk for awhile & | 13:18 | ||
ugexe | your bin scripts dont get installed to .raku/bin | ||
that is just a shim which is capable of loading some version of the actual bin script of the same name | 13:19 | ||
zef locate bin/zef | |||
===> From Distribution: zef:ver<0.11.7>:auth<github:ugexe>:api<0> | |||
bin/zef => /Users/ugexe/.rakubrew/versions/moar-blead/install/share/perl6/site/resources/9835BBA3FD98CC55CD826918B064F8A13616C14B | |||
like that is the actual bin file of zef | 13:20 | ||
if i run `raku /Users/ugexe/.rakubrew/versions/moar-blead/install/share/perl6/site/resources/9835BBA3FD98CC55CD826918B064F8A13616C14B --help` it will show zef help | 13:21 | ||
13:30
sena_kun joined
13:31
patrickb joined
13:33
Sgeo joined,
MasterDuke left
13:40
timo left,
MasterDuke joined,
timo joined
13:42
Juerd left
13:51
RandalSchwartz joined
13:55
Juerd joined
13:57
bd3i left
14:01
guifa joined
14:02
guifa left
14:16
patrickb left,
patrickb joined
14:18
patrickb left,
patrickb joined
14:20
patrickb left,
patrickb joined
14:22
patrickb left,
patrickb joined
14:26
patrickb left,
patrickb joined
14:28
littlebenlittle[ left,
Manifest0 left,
dogbert17 left,
synthmeat left,
RaycatWhoDat left,
dogbert17 joined,
Manifest0 joined,
RaycatWhoDat joined
14:29
synthmeat joined
14:30
patrickb left
14:31
patrickb joined
14:32
patrickb left
14:33
patrickb joined
14:34
patrickb left
14:35
patrickb joined,
patrickb left
|
|||
tbrowder | ok, forgot that, thnx | 14:40 | |
role question: i am creating a role that will be shared by two classes acting as a parent and children, say A and B (but no actual inheritance). in defining the role, in order to restrict the role's mehods to one or the other, is creating its signature similar to this a good practice:to use | 14:49 | ||
(A:D: $arg) # restricted to class A | |||
14:56
Juerd left
|
|||
vrurg | tbrowder: Not sure I'm getting you right, but do you mean `method foo(::?CLASS:D:) {}` or `method foo(::?ROLE:D:) {}`? | 15:09 | |
tbrowder | kinda, but usage only by a particular class, say A | 15:11 | |
before the role defintion i precede all the using class defs with stubs, class A {...} | 15:12 | ||
so i can use in the role: method foo(A:D:) so class B can't use it | 15:14 | ||
*definition | 15:15 | ||
so far i get no compilation errors, but i haven't yet tried to cause a problem, just investigating best practice | 15:17 | ||
i saw similar syntax in class DateTime | 15:18 | ||
but of course that was core... | |||
15:19
Juerd joined
|
|||
tbrowder | i'll try it here, take me some time, patience... | 15:21 | |
15:26
Kaiepi left
|
|||
tbrowder | m: class A {...}; class B {...}; role Foo { method bar(A:D:) { say "bar"}; method baz {say "baz};}; class A does Foo {}; class B does Foo {}; my $a = A.new; my $b = B.new; $a.bar; $a.baz; $b.baz; $b.bar; | 15:28 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Variable '$a' is not declared at <tmp>:1 ------> 3 A does Foo {}; class B does Foo {}; my 7⏏5$a = A.new; my $b = B.new; $a.bar; $a.ba |
||
15:28
Kaiepi joined
|
|||
tbrowder | arg, missed a " | 15:29 | |
15:30
Kaiepi left
|
|||
tbrowder | trying offline... | 15:30 | |
15:34
Kaiepi joined
15:36
Kaiepi left
|
|||
lizmat clickbaits rakudoweekly.blog/2021/07/12/2021-...splitting/ | 15:39 | ||
Altreus is baited | |||
tbrowder | ok, works as expected | ||
15:40
Kaiepi joined
|
|||
tbrowder | got a type check error when B tried to access method bar | 15:41 | |
lizmat++ | |||
if you add the missing " in say "baz" above that should dup my offline attempt | 15:44 | ||
Xliff | rut roh! | ||
m: my %conditions; sub myRoutine (\v) { for %conditions.keys { return False unless %conditions{$_}(v) }; True }; subset TerminationPoint of Str where *.&myRoutine; %conditions<even> = -> $v { $v eq 'Even' }; sub testCondition(TerminationPoint $a) { say 'Terminated!' }; testCondition('Even'); testCondition(42); | |||
camelia | Terminated! at SETTING::src/core.c/Exception.pm6:527 (/home/camelia/rakudo-m-inst-1/share/perl6/runtime/CORE.c.setting.moarvm:print_exception) from SETTING::src/core.c/Exception.pm6:583 (/home/camelia/rakudo-m-inst-1/share/perl6/runtime/CORE… |
||
15:49
Xliff left
15:59
Juerd left
16:05
Juerd joined
16:22
patrickb joined
16:30
RandalSchwartz left
16:33
RandalSchwartz joined
16:47
MasterDuke left
17:01
sena_kun left
17:12
jess left
17:14
RandalSchwartz left
17:17
RandalSchwartz joined
17:52
MasterDuke joined
18:03
reportable6 left
18:05
reportable6 joined
18:06
RandalSchwartz left
18:22
Juerd left
18:57
guifa joined
19:08
jess joined
|
|||
guifa | To what extent are traits supposed to be pervasive across composition and subclassing? | 19:25 | |
tellable6 | 2021-07-12T06:10:48Z #raku <raydiak> guifa "self" there is referring to the autopunned class, not the role itself. that's why .WHICH is different. e.g. try `role A { method new { say self.HOW; say A.HOW; } }; A.new` | ||
19:30
cnx left,
CIAvash left,
happy-dude left,
demostanis[m] left,
juanfra left,
aolko[m] left,
AlexDaniel left
|
|||
lizmat | a trait is nothing more / less than a piece of code that will get run during compilation time | 19:32 | |
with the (meta-)object as the invocant | 19:33 | ||
what it does, who knows? so you cannot answer that question like that in general | |||
m: sub trait_mod:<is>(Mu, :$foo!) { say "foo" }; sub bar is foo { } | 19:34 | ||
camelia | foo | ||
guifa | lizmat: okees, I guess then the question is more specific to particular traits ha | 19:38 | |
m: role Foo is repr('Uninstantiable') { }; class Bar does Foo { }; Bar.new.say; | 19:39 | ||
camelia | Bar.new | ||
guifa | This actually works *exactly* how I'd like it to (so yay), but it also feels like I'd expect the repr('Uninstantiable') trait to compose into the Bar class | 19:40 | |
(you know me, always doing weird things) | 19:41 | ||
20:01
MasterDuke left
20:13
melezhik joined
|
|||
melezhik | . | 20:13 | |
20:17
Guest1 joined
20:19
patrickb left
20:20
patrickb joined
20:23
sono joined
20:49
RandalSchwartz joined
20:52
juanfra joined
20:55
AlexDaniel joined,
demostanis[m] joined,
cnx joined,
happy-dude joined
20:56
aolko[m] joined,
littlebenlittle[ joined,
CIAvash joined
21:00
RandalSchwartz left
21:02
RandalSchwartz joined
21:26
linkable6 left
21:27
linkable6 joined
21:31
ufobat__ left
21:39
patrickb left
22:36
Guest1 left
23:29
Juerd joined
|
|||
japhb | (torch and pitchfork) DO ALLL THE WEIRD THINGS! | 23:30 | |
23:43
MasterDuke joined
23:44
jess left
|