🦋 Welcome to Raku! raku.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: colabti.org/irclogger/irclogger_log/raku Set by ChanServ on 14 October 2019. |
|||
00:03
xinming_ left
00:05
xinming_ joined
00:11
devmikey left
|
|||
cpan-raku | New module released to CPAN! Data::Record (0.0.3) by 03KAIEPI | 00:12 | |
00:45
xinming_ left
00:48
xinming_ joined
01:01
Doc_Holliwould left
01:15
xinming_ left
01:17
xinming_ joined
01:41
molaf left
01:54
molaf joined
02:01
Manifest0 left
02:02
Manifest0 joined
02:07
xinming_ left
02:27
xinming joined
02:45
xinming left
|
|||
cpan-raku | New module released to CPAN! Data::Record (0.0.4) by 03KAIEPI | 02:45 | |
02:47
xinming joined
02:51
hungrydonkey joined
03:12
aborazmeh joined,
aborazmeh left,
aborazmeh joined
|
|||
cpan-raku | New module released to CPAN! Data::Record (0.0.5) by 03KAIEPI | 03:24 | |
Kaiepi | ok done spamming releases now lol | ||
03:47
aborazmeh left
04:02
xinming left
04:03
xinming joined
|
|||
Geth | doc: 7e6082b87e | Coke++ | doc/Language/modules.pod6 remove doubled . |
04:07 | |
doc: 6d5adefaad | Coke++ | xt/words.pws learn new words |
|||
linkable6 | Link: docs.raku.org/language/modules | ||
04:10
cpan-raku left,
cpan-raku joined,
cpan-raku left,
cpan-raku joined
04:12
pilne left
04:13
molaf left
04:26
xinming left,
wamba joined,
xinming joined
04:36
Xliff joined
04:53
Sgeo_ joined
04:54
xelxebar left,
xelxebar joined
04:56
Sgeo left
05:12
xinming left
05:14
xinming joined
05:27
Doc_Holliwould joined
05:51
hungryd36 joined
05:55
hungrydonkey left
06:00
hungrydonkey joined
06:02
hungryd36 left
06:17
stoned75 joined
06:18
kensanata joined
06:37
hungryd6 joined
06:41
hungrydonkey left
06:47
stoned75 left
06:53
xinming left,
xinming joined
06:58
rindolf joined
|
|||
cpan-raku | New module released to CPAN! Data::Record (0.0.6) by 03KAIEPI | 07:05 | |
07:06
upupbb-user2 joined
07:34
sjm_uk joined
07:36
xinming left,
pecastro joined
07:38
xinming joined,
dakkar joined
07:47
sjm_uk left
07:50
hungryd6 left
07:51
Actualeyes joined
07:58
wamba left
08:12
xinming left
08:14
xinming joined
08:17
leont joined
08:26
sena_kun joined
08:32
sena_kun left
08:40
Doc_Holliwould left
|
|||
Kaiepi | m: say (a => 1, b => 2, c => 3) Z| (a => 4, b => 5) | 09:00 | |
camelia | (any(a => 1, a => 4) any(b => 2, b => 5)) | ||
Kaiepi | m: say (a => 1, b => 2, c => 3) <<|>> (a => 4, b => 5) | ||
camelia | (a => any(1, 4) b => any(2, 5) Nil) | ||
Kaiepi | m: say (1,2,3) <<+>> (4,5) | 09:01 | |
camelia | (5 7 7) | ||
Kaiepi | m: say (a => 1, b => 2, c => 3) <<|<< (a => 4, b => 5) | ||
camelia | (a => any(1, 4) b => any(2, 5)) | ||
Kaiepi | m: say (a => 1, b => 2, c => 3) >>|>> (a => 4, b => 5) | ||
camelia | (a => any(1, 4) b => any(2, 5) Nil) | ||
Kaiepi | is there already a way i can generate (a => any(1, 4), b => any(2, 5), c => 3) from these? | 09:02 | |
09:23
xinming left,
xinming joined
09:25
daxim left
09:31
daxim joined
09:41
cpan-raku left
09:42
cpan-raku joined,
cpan-raku left,
cpan-raku joined
09:52
xinming left
09:53
xinming joined,
Kaiepi left
09:57
Kaiepi joined
09:59
chloekek joined
10:13
helit left
10:16
helit joined
10:18
helit left
10:19
helit joined
10:20
helit is now known as helix7
10:24
wamba joined
10:25
helix7 is now known as clem16
10:27
clem16 is now known as helit
10:29
helit is now known as clem16,
clem16 is now known as clem_15
10:31
clem_15 is now known as helix7
10:36
helix7 is now known as wfh
10:39
LTM joined
10:40
LTM left
10:41
wfh is now known as helit
10:42
xinming left,
xinming joined
10:51
hungrydonkey joined
10:55
helit is now known as helix7,
helix7 is now known as clem16
10:56
clem16 is now known as helit
10:57
helit is now known as clem16
10:58
clem16 is now known as helit
11:01
natrys joined
11:14
helit is now known as clem16,
clem16 is now known as helit
11:15
kensanata left
11:17
helit is now known as revor
11:18
revor is now known as helit
11:21
kensanata joined
11:22
helit is now known as clem16,
clem16 is now known as helit
11:23
helit is now known as helix7,
helix7 is now known as helit
11:24
helit is now known as clem16
11:26
thundergnat joined
|
|||
thundergnat | Kaiepi: not easily in a single operation (that I can think of) Could do something like | 11:26 | |
m: say ({}.append: |(a => 1, b => 2, c => 3), |(a => 4, b => 5)).map: { .key => any(|.value) } | |||
camelia | (b => any(2, 5) a => any(1, 4) c => any(3)) | ||
chloekek | Set up CI for a bunch of Raku community modules using Nix and GitHub Actions. ☺ | 11:27 | |
11:27
clem16 left
11:28
thundergnat left
11:30
xinming left
11:31
aborazmeh joined,
aborazmeh left,
aborazmeh joined
11:32
leont left,
xinming joined
11:45
leont joined
11:46
upupbb-user2 left
11:48
kensanata left
12:27
aborazmeh left
12:33
mensvaga joined
|
|||
chloekek | TIL you can put next in map to skip it. | 12:41 | |
p6: say (1, 2, 3).map({ $_ %% 2 ?? next() !! $_ }) | |||
camelia | (1 3) | ||
chloekek | p6: say (1, 2, 3).map({ $_ %% 2 ?? Empty !! $_ }) | ||
camelia | (1 3) | ||
chloekek | p6: say (1, 2, 3).map({ $_ %% 2 ?? last() !! $_ }) | 12:42 | |
camelia | (1) | ||
lizmat | m: sub foo { last }; for ^100 { .say; foo } | 12:45 | |
camelia | 0 | ||
lizmat | next/last/redo are dynamic, not lexical | ||
chloekek | Yep. | 12:46 | |
p6: sub f($l, @xs) { @xs.map({ $_ == 3 ?? last($l) !! 0 }) }; l: for ^10 { say f(l, ^$_) } | 12:48 | ||
camelia | () (0) (0 0) (0 0 0) |
||
13:03
sena_kun joined
13:05
rba[m] left
13:06
sena_kun left,
sena_kun joined,
xinming left
13:08
xinming joined
13:13
kst` joined
13:14
Grauwolf_ joined,
Some-body_ joined
13:15
timeless left,
Grauwolf left,
oodani left,
leah2 left
13:16
timeless_ joined,
oodani_ joined,
ssm joined
13:17
hungrydonkey left
13:18
DarthGandalf left,
Some-body_ is now known as DarthGandalf,
timeless_ is now known as timeless
13:19
timeless left,
timeless joined,
leah2 joined,
rbt left
13:20
uzl[m] joined,
rbt joined,
BlackChaosNL[m] joined
13:22
unclechu joined
13:23
hungrydonkey joined
13:33
molaf joined
13:37
AlexDaniel left
|
|||
Altreus | That seems like a great way to have bugs | 13:37 | |
If other code is anything to go by, putting secret nexts in a function will seem like a good idea to a lot of people | 13:38 | ||
And then you'll call it from outside of a nextable construct and get an error you have *no idea* how to work around | |||
Personally I would have made those things lexical | 13:39 | ||
13:40
Sgeo_ left,
Sgeo_ joined
|
|||
lizmat | as always, there are tradeoffs | 13:43 | |
fwiw, I think Raku inherited that behaviour from Perl | 13:44 | ||
vrurg | Altreus: OTOH, I use a construct `$.for_children: { next unless .ready; #`{ do something with ready children } }` – for lock-protected iteration. | ||
lizmat | the code of ... in the setting uses this feature extensively | ||
chloekek | Altreus: Just don’t write or call bad code. ;) | ||
13:46
xinming left
13:49
xinming joined
|
|||
chloekek | What is wrong when moar --version prints “This is MoarVM version built with JIT support” without a version number? | 14:00 | |
Ah, git was not available during configure. | |||
14:05
Xliff left
14:09
statisfiable6 joined
14:10
shareable6 joined
|
|||
Altreus | chloekek: I shant | 14:10 | |
14:11
notable6 joined
14:13
Altai-man_ joined
14:16
sena_kun left
|
|||
Altreus | can zef install a specific branch from github? | 14:27 | |
not important, just QOL | |||
Altai-man_ | Altreus, if you clone and do `zef install .`... | 14:28 | |
Altreus | yeah :) | 14:29 | |
I cloned and used raku -I | |||
Just wondered if it had the feature | |||
14:29
dakkar left
14:30
dakkar joined
|
|||
Altai-man_ | Altreus, I think zef is rather agnostic to a lot of things like ecosystems, fetching protocols and so on, so probably writing a zef plugin could do. | 14:30 | |
Kaiepi | i think being able to call `next` from a routine called from a loop is useful, just not very often a good idea | 14:35 | |
earlier i had a pretty big block of code that was repeated in a loop, but the logic didn't allow for it to only be in the loop once, so i wrote it out into a routine | 14:36 | ||
14:43
perlmaros joined
14:44
Doc_Holliwould joined
14:46
chloekek left
|
|||
[Coke] | you could do something like next if long-routine and have it return a boolean. | 14:48 | |
14:53
xinming left
14:54
xinming joined
|
|||
Altreus | well that was my thought | 15:04 | |
The function itself could return information about what to do, but the loop is the only thing that can actually be nexted | 15:05 | ||
Which means you could end up writing a long routine you can't use outside of a loop, which seems silly to me | |||
You might as well return a boolean or something, and then you can do anything with it | |||
Coupling a function to a loop seems daft | |||
mind you, I don't know what the use-cases are, so I'm ready to be convinced | 15:06 | ||
Just enough rope to hang yourself, right? | |||
lizmat | it's the module that ... currently uses | ||
basically figure out a lambda that will produce the next value, and have it do a "last" if it is supposed to be done | |||
Altreus | The operator that makes a "virtual function"? | ||
oh | 15:07 | ||
the generator | |||
lizmat | m: dd 1,2,4 ... 100 | ||
camelia | (1, 2, 4, 8, 16, 32, 64).Seq | ||
15:07
jargan joined,
jargan is now known as jast
|
|||
Altreus | Why not a Last object | 15:07 | |
A terminator | |||
Seems very similar to Failures to me | |||
lizmat | you should ask TimToady :-) | ||
15:07
Alchemy joined
|
|||
lizmat | this is ~ 10 year old code now, am currently refactoring it to use iterators | 15:08 | |
Altreus | It seems ideal to have a value whose semantics mean "end of whatever it was" | ||
lizmat | and making it 4x to 15x as fast (preliminary benchmarks) | ||
Altreus: that would be IteratioEnd :-) | |||
15:09
tobs joined
|
|||
Altreus | I have the answer! | 15:09 | |
lizmat | which comes with its own set of issues: | ||
15:09
xelxebar_ joined
|
|||
Altreus | What if you put an IterationEnd in a list | 15:09 | |
15:09
sergot left,
linkable6 left
|
|||
lizmat | m: my @a = 1,2,3,IterationEnd,5,6; dd @a | 15:09 | |
camelia | Array @a = [1, 2, 3, IterationEnd, 5, 6] | ||
15:09
xelxebar left
|
|||
lizmat | m: my @a = 1,2,3,IterationEnd,5,6; .say for @a | 15:09 | |
camelia | 1 2 3 |
||
Altreus | That seems like a more sensible "don't do that" than calling a function with a last in it | ||
15:09
reportable6 left,
daemon left,
Alchemy is now known as daemon
15:10
shareable6 left
|
|||
Altreus | If you're allowed to say "Don't do that" then put it there | 15:10 | |
lizmat | putting IterationEnd in a list is a case of DIHWIDT | ||
15:10
notable6 left,
statisfiable6 left
|
|||
Altreus | that's a new initialism on me | 15:10 | |
15:10
literal joined,
Bucciarati joined
15:11
APic joined
|
|||
Altreus | I suppose it could show up in a variable | 15:11 | |
But that's exactly as dangerous as last showing up in a function | |||
15:11
rypervenche left,
masak joined
|
|||
Altreus | I guess the "don't do that" is putting last in a function unless you *really* have to | 15:11 | |
15:13
NODE left,
masak is now known as Guest54471
15:14
NODE joined,
AlexDaniel`1 joined
15:19
xinming left
15:20
xinming joined
15:23
rindolf left
15:29
chloekek joined
15:32
perlmaros left
15:33
hahainternet joined
15:38
justout joined
15:40
thundergnat joined
|
|||
thundergnat | Altreus: there are certain instances where I find being able to have a next or last in a map statement is quite useful. rosettacode.org/wiki/Magnanimous_numbers#Raku for instance. | 15:42 | |
15:42
Tirifto joined
|
|||
Altreus | but a map is nextable - although knowing that and including it in the rules for next is probably a lot harder than just allowing dynamic nexts | 15:43 | |
thundergnat | Could it be written differently? for sure, but that fits the way I think | ||
I may be misunderstanding your point... | 15:44 | ||
15:44
molaf left,
NODE left
15:45
thundergnat left,
awwaiid joined,
tbrowder joined,
matiaslina joined
15:46
NODE joined
|
|||
jdv79 | how come just "accessing" a promise seems to kick it off? | 15:46 | |
15:48
unclechu left,
awwaiid left,
matiaslina left,
BlackChaosNL[m] left,
uzl[m] left
15:49
AlexDaniel`1 left,
benkolera left
|
|||
jnthn | jdv79: A Promise has no concept of being "kicked off"; typically by the time you have it, whatever's behind it is already scheduled or underway. | 15:50 | |
jdv79 | i'm trying to golf it atm but i had some promises in a datastructure and when i pulled them out they ran. i map'd 2 times and they ran 2 times. it seemed odd. | 15:51 | |
maybe i did something dumb | |||
15:52
hungrydonkey left
15:54
ilbelkyr joined
15:55
linkable6 joined
15:56
rypervenche joined,
markoong joined
15:59
albongo joined
16:06
sourceable6 joined,
sergot joined,
greppable6 joined,
bisectable6 joined,
squashable6 joined
16:07
benchable6 joined,
unicodable6 joined,
bloatable6 joined,
statisfiable6 joined,
notable6 joined
16:08
committable6 joined,
Altai-man_ left,
releasable6 joined,
tellable6 joined,
reportable6 joined,
nativecallable6 joined,
sena_kun joined,
shareable6 joined
16:09
quotable6 joined
16:13
Grauwolf_ is now known as Grauwolf,
hungrydonkey joined
16:14
upupbb-user3 joined
16:31
regreg joined,
mowcat joined
|
|||
Altreus | jnthn: this GPW talk is very helpful! | 16:38 | |
jnthn++ | |||
16:39
kybr left
16:40
dakkar left
16:42
wbn joined
16:43
sergot left,
sergot joined
16:45
vike1 left
16:46
benkolera joined
16:50
stoned75 joined
16:51
kybr joined
16:54
vike1 joined
16:56
xinming left
16:58
xinming joined
17:00
vike1 left
17:11
rindolf joined
|
|||
Altreus | in fact I think I know what to do | 17:12 | |
just from this talk :) | |||
[Coke] | Nice. | 17:13 | |
17:17
sjm_uk joined
17:19
AlexDaniel` joined,
matiaslina joined,
BlackChaosNL[m] joined,
awwaiid joined,
unclechu joined,
uzl[m] joined
17:24
cognominal left
|
|||
jdv79 | what talk was this? | 17:27 | |
chloekek | Is there a fast way to find the index of a byte in a Blob, a la memchr? | 17:31 | |
17:38
ryn1x joined
|
|||
ryn1x | p6: try { start { die "died in thread" }; sleep 1; CATCH { say "reporting error"; exit 0; } } | 17:38 | |
camelia | Unhandled exception in code scheduled on thread 4 died in thread in block at <tmp> line 1 |
||
ryn1x | how can I bubble up an error from another thread? | 17:39 | |
is that even possible? | |||
17:42
upupbb-user3 left
|
|||
lizmat | ryn1x: if the error is not caught, the job will finish ? | 17:43 | |
ryn1x | the job on the thread will not finish, but the main program calling it can continue... | 17:45 | |
i can give the user a friendly error message to report and an option to return to the main menu | |||
the exit 0 in the example would happen only if the user chose to quit instead of return to the main menu in reality | 17:48 | ||
17:50
girafe left
17:51
girafe2 joined
|
|||
ryn1x | the example is very over simplified... i am actually launching other executables... not just using start blocks... but the behavior and errors are the same | 17:54 | |
[Coke] | you can wrap the threads in a catch so they don't die, and then the main thread can check status and keep going. | ||
lizmat | or just "try start { }" :-) | 17:55 | |
ryn1x | p6: try { try start { die "died in thread" }; sleep 1; CATCH { say "reporting error"; exit 0; } } | 17:57 | |
camelia | Unhandled exception in code scheduled on thread 4 died in thread in block at <tmp> line 1 |
||
18:04
hungrydonkey left
|
|||
ryn1x | p6: try start { die "died in thread"; CATCH { say "reporting error"; exit 0;} } | 18:05 | |
camelia | reporting error | ||
ryn1x | i guess that could work, but I have to do it everywhere a new thread it launched instead of around all of them | ||
18:06
Altai-man_ joined
|
|||
ryn1x | p6: try start { die "died in thread"; CATCH { say "reporting error"} }; say "hi from main thread" | 18:07 | |
camelia | reporting error hi from main thread |
||
18:08
sena_kun left
18:26
vike1 joined
18:34
regreg left
|
|||
chloekek | When I see Raku libraries from NASA all I can think of is $rocket-fuel ⚛️-= 1; | 18:45 | |
lizmat | And another Rakudo Weekly News hits the Net: rakudoweekly.blog/2020/03/30/2020-...f-reached/ | 18:47 | |
chloekek | lizmat⚛️++ | ||
lizmat | .oO( I feel radiant :-) |
||
chloekek | We need something to use the ☣ character with | 18:49 | |
lizmat | m: dd "☣".uninames | ||
camelia | ("BIOHAZARD SIGN",).Seq | ||
lizmat | hehe | ||
synthmeat | thanks, lizmat, i love these | 19:03 | |
19:08
lichtkind joined
|
|||
lichtkind | which celebration if 6.e named after? | 19:09 | |
19:13
someuser left
|
|||
chloekek | The obvious one would be Easter, but I am not certain. | 19:18 | |
19:23
genevino joined
|
|||
genevino | oh wow, there's a blue butterfly in the topic | 19:23 | |
chloekek | It used to be »ö« but then it matured. :) | 19:24 | |
genevino | it probably matured in exactly the moment when the caterpillar thought life is over | 19:26 | |
8) | 19:27 | ||
19:27
sjm_uk left
19:29
ryn1x left
20:02
xinming left,
xinming joined
20:07
sena_kun joined,
molaf joined
20:08
Altai-man_ left
|
|||
stoned75 | commit: releases say Bag.new-from-pairs: 'butter' => 0.22, 'sugar' => 0.1, 'sugar' => 0.02; | 20:09 | |
committable6 | stoned75, gist.github.com/c682ee687457093839...39b44b05fb | 20:10 | |
stoned75 | commit: releases say Mix.new-from-pairs: 'butter' => 0.22, 'sugar' => 0.1, 'sugar' => 0.02; | ||
committable6 | stoned75, gist.github.com/31556863c7c9914381...92168f6906 | 20:11 | |
20:16
pilne joined
20:22
leont left
20:43
bdju left
20:44
bdju joined
|
|||
Altreus | jdv79: www.youtube.com/watch?v=GdU5XUck8O...4&t=7s | 20:44 | |
GPW 2019 | 20:45 | ||
on react, supply, whenever | |||
jnthn: If you have a moment could you tell me if this looks reasonable? github.com/shuppet/p6-api-discord/...#L180-L213 | 20:52 | ||
maybe if I could spell discord | 20:53 | ||
jdv79 | Altreus: oh i thought jnthn's missing talk from this year was up. saw the concurrency one already. thanks. | 20:57 | |
Doc_Holliwould | Stackoverflow is down. We will all die | 21:02 | |
Altreus | These sentences seem unrelated, but both true | 21:03 | |
21:05
NODE left
|
|||
chloekek barely ever visits Stack Overflow. | 21:07 | ||
21:07
NODE joined,
erdic left
21:08
erdic joined
|
|||
jdv79 | i end up there via googling a lot - that's about it | 21:08 | |
chloekek | I find that Google got worse over the years when it comes to providing accurate and complete solutions to programming problems. | 21:09 | |
Altreus | that's probably because people got worse at it | 21:10 | |
chloekek | For PostgreSQL I stopped using it altogether and bookmarked the index of the documentation. | ||
Altreus | eh it is bothersome that it indexes a random version of each document page | ||
chloekek | Now I get accurate and complete results for the latest versions, instead of incomplete or wrong SO answers and blog posts, or links to docs of older versions. | ||
Altreus | rather than e.g. /latest/ | ||
Grinnz | stack overflow is a pretty decent way to provide google results that smarter people can fix later | 21:11 | |
whether they do that, is another matter | |||
chloekek | It’s sometimes useful when documentation for something is missing or impenetrably confusing. | 21:13 | |
jdv79 | i find many useful solutions on so on a regular basis - idk | 21:14 | |
Altreus | like postgres? :D | ||
low blow, PG has decent docs most of the time | |||
jdv79 | some of the pg docs are a bit difficult to read sometimes | 21:15 | |
chloekek | Just had an epiphany, I always wondered what I should call my variable for a string with JSON in it, and an object that is parsed JSON (in contrast with a validated and more specific data structure), can’t call both $json | 21:16 | |
So I came up with $raw for the string passed to from-json, and $rare for the value returned by from-json ☺ | |||
jdv79 | i don't get rare | 21:17 | |
chloekek | It’s less raw than raw, but not quite cooked | ||
Altreus | sounds cooked to me | 21:18 | |
chloekek | my $raw = '{ "foo": "123" }'; my $rare = from-json($raw); my $cooked = Foo.new(bar => +$rare<foo>); | ||
jdv79 | hopefully there are better names in situ for both but i guess if not | ||
would $well be something to do with a Factory/Repository/IOC/something else complex? | 21:19 | ||
Altreus | put the raw statement in from-json and never have an unparsed variable at all :) | ||
jdv79 | that was my first thought - why have a name if you can get away without one | 21:20 | |
chloekek | The raw one is a parametr. | 21:22 | |
21:22
mowcat left
|
|||
Grinnz | I tend to reserve $json for the actual string of json, since once you've decoded it to a data structure, it's not actually anything to do with JSON anymore | 21:25 | |
JSON is a string format | |||
Altreus | Also true! | ||
Grinnz | (technically more than that if you're in javascript, but) | 21:26 | |
21:26
rindolf left
|
|||
Altreus | Except for the incompatibilities | 21:27 | |
chloekek | Is it possible to slip a hash slice into named arguments? | ||
Altreus | I'm sure I've done |(%hash<...>:kv) before | ||
Grinnz | Altreus: afaik all of the weird stuff is actually because that's how it works in regular javascript syntax | ||
chloekek | p6: sub f(:$x, :$y) { say $x, $y; }; my %h = :x(1), :y(2), :z(3); f(|%h<x y>:p); | ||
camelia | Too many positionals passed; expected 0 arguments but got 2 in sub f at <tmp> line 1 in block <unit> at <tmp> line 1 |
||
Altreus | what's :p now | 21:28 | |
pairs | |||
Is that different from kv? | |||
chloekek | %h<x y>:p returns a list of pairs, but I need a hash. | ||
p6: sub f(:$x, :$y) { say $x, $y; }; my %h = :x(1), :y(2), :z(3); f(|%(%h<x y>:p)); | |||
camelia | 12 | ||
chloekek | Hmm that works. | ||
Altreus | magique | ||
chloekek | p6: sub f(:$x, :$y) { say $x, $y; }; my %h = :x(1), :y(2), :z(3); f(|%(%h<x y>)); | ||
camelia | Unexpected named argument '1' passed in sub f at <tmp> line 1 in block <unit> at <tmp> line 1 |
||
chloekek | Kinda ugly. | ||
Altreus | um | 21:29 | |
chloekek | Maybe I can define a :h adverb that returns a hash. | ||
Altreus | p6: sub f(:$x, :$y) { say $x, $y; }; my %h = :x(1), :y(2), :z(3); f(|(%h<x y>:p)); | ||
camelia | Too many positionals passed; expected 0 arguments but got 2 in sub f at <tmp> line 1 in block <unit> at <tmp> line 1 |
||
Altreus | p6: sub f(:$x, :$y) { say $x, $y; }; my %h = :x(1), :y(2), :z(3); f(|(%h<x y>:kv)); | ||
camelia | Too many positionals passed; expected 0 arguments but got 4 in sub f at <tmp> line 1 in block <unit> at <tmp> line 1 |
||
Altreus | welp | ||
I guess I haven't done that before :) | |||
21:30
Black_Ribbon joined
|
|||
jdv79 | being only one char less - is it worth more syntax at that point? | 21:37 | |
oh, i'm not looking - 3 less. not bad. | 21:39 | ||
21:40
ZaheerIsRight joined
|
|||
ZaheerIsRight | is perl 6 a good first language? | 21:41 | |
Altreus | Can't be worse than PHP | ||
chloekek | p6: sub f(:$x, :$y) { say $x, $y; }; my %h = :x(1), :y(2), :z(3); f(|%h); | ||
camelia | Unexpected named argument 'z' passed in sub f at <tmp> line 1 in block <unit> at <tmp> line 1 |
||
ZaheerIsRight | lol | 21:42 | |
Altreus | also it's raku now | ||
I think it's bedtime | |||
ZaheerIsRight | sorry | ||
chloekek | ZaheerIsRight: It depends: why does the pupil want to learn programming? | 21:43 | |
21:43
cpan-raku left,
cpan-raku joined,
cpan-raku left,
cpan-raku joined
|
|||
ZaheerIsRight | just for fun | 21:43 | |
Grinnz | mst: looks like some vhosts need updating ^ | ||
mst | eventually yes | 21:44 | |
21:44
mensvaga left
|
|||
chloekek | ZaheerIsRight: Plausible. I’ve had nothing but fun with Raku. | 21:45 | |
21:49
ZaheerIsRight left
|
|||
rbt | Is there anything for memory profiling? Specifically, memory taken by each Class (sum of objects for class) at a given point in time (when called)? | 21:52 | |
21:52
NODE left
|
|||
MasterDuke | rbt: look at the Telemetry class/snapper module (docs.raku.org/type/Telemetry), or the heap profiler (--profile-kind=heap) | 21:54 | |
21:54
NODE joined
|
|||
rbt | Thanks | 21:54 | |
MasterDuke | for the latter you'll need github.com/jnthn/p6-app-moarvm-heapanalyzer to process the resulting output file | 21:55 | |
21:57
stoned75 left
21:58
NODE left
22:00
NODE joined
|
|||
rbt | Anyone have commit access to DBIish? Getting this 1 liner pushed would be helpful: github.com/raku-community-modules/...h/pull/178 | 22:01 | |
22:06
Altai-man_ joined
|
|||
lizmat | rbt: merged it | 22:06 | |
rbt | Thanks! | 22:07 | |
22:07
cognominal joined
22:08
sena_kun left
|
|||
lichtkind | are parametric coles gone? | 22:18 | |
22:18
natrys left
|
|||
lizmat | lichtkind: you mean roles? no | 22:23 | |
m: dd Rat.^roles | |||
camelia | (Rational[Int,Int], Real, Numeric) | ||
lizmat | would be an example of the use of the parametrix role Rational in the rat class | ||
*Rat | 22:24 | ||
lichtkind | lizmat: thanks i aked becasue i cant find them in docs | ||
hugs | |||
lizmat hugs back | |||
lichtkind: then maybe make a documentation issue :-) | |||
22:25
wamba left
|
|||
MasterDuke | docs.raku.org/language/objects#Par...ized_roles | 22:29 | |
lizmat | MasterDuke++ | ||
sleep& | |||
lichtkind | MasterDuke++ oh man its too late | 22:36 | |
yes | 22:37 | ||
22:50
pecastro left
|
|||
tbrowder | can anyone give me a link to a good, detailed video or slide presento of using comma for debugging modules? thnx | 23:23 | |
23:24
upupbb-user3 joined
23:26
Altai-man_ left
23:32
xelxebar_ left
23:34
xelxebar joined
23:35
AlexDaniel joined,
AlexDaniel left,
AlexDaniel joined
23:36
lichtkind left
23:44
lichtkind joined
23:54
chloekek left
|