This channel is intended for people just starting with the Raku Programming Language ( Logs are available at
Set by lizmat on 8 June 2022.
00:29 deoac joined 00:30 razetime left 00:31 razetime joined 00:35 razetime left 00:36 razetime joined 00:57 razetime left, razetime joined 01:27 deoac left 02:22 razetime left 02:23 razetime joined 03:19 siavash joined 04:23 razetime left 06:24 razetime joined
librasteve crag of the day crag 'r(0.1); say (:<1676 km> / (^<12:38> - ^<10:22>)).in: <mph>' #459.4mph 07:05
08:08 dakkar joined 08:17 teatwo joined 08:20 teatime left 08:35 razetime left 08:56 razetime joined 10:09 siavash left
lizmat and yet another Rakudo Weekly hits the Net: 11:23
11:52 razetime left 12:19 razetime joined
_elcaro_ Technically File::Stat is an updated module, I migrated it to from cpan to zef... but I did add support for lstat and improve the documentation substantially, so it feels like a new module! 😀 12:21
12:49 razetime left 14:49 wafflus joined 16:01 ab5tract joined 16:24 razetime joined 16:36 dakkar left 17:07 razetime left
wafflus is it possible to use map and get access to the entire map it's self without storing the map in a sperate variable? 18:25
nemokosch I don't think so. Of course this is not a counterproof. 18:26
Something to consider is that map returns a sequence and it's lazily evaluated 18:27
wafflus k :( 18:28
can i format a list to a string without spaces in it ? 19:06
when i use.fmt it has spaces in it and i need to replace or split  and join the array 19:07
nemokosch could you give an example? 19:11
wafflus <pie apple cake>.fmt("%s\n") 19:15
the apple and cake are idented 19:16
wafflus method fmt($format = '%s', $separator = ' ' --> Str:D) this looks interesting but i'm not sure how to write it 19:18
i find the manual pretty noob unfreindly tbh
nemokosch that's the signature of the method 19:20
there are two parameters, the first one is the format and it defaults to '%s', the second one is the separator of the elements and it defaults to ' ' 19:21
wafflus oh ok ty
whats  a STR:D what the d part? 19:22
i also dont get the defaults to %s 19:24
nemokosch not sure what's the problem with that 19:25
wafflus is it default argument only works with no arguments 19:26
nemokosch that's the value to be used when you don't pass a value for that argument 19:27
have you not used other languages?
wafflus how do i pass a value to only the 2nd argument and keep the dafault argument for the first? 19:29
yes i have
used ohter languages
raku is probably one of the hardest to learn no offence 19:32
nemokosch I don't think there is a way to do that
thinking of C++, Python, Javascript, C#, I think they work identically with regards to this 19:33
wafflus k is there some sort of syntax on the manual pages that explains that both arguments are required or no arguments? 19:34
nemokosch that's not true in any of these languages, Raku included 19:42
you just can't skip the first one
but it's perfectly fine to omit the second one and only define the first 19:43
so to summarize, here you can either pass in both, or the first, or none
wafflus ok i thought that was the case i thought maybe the manual might have some styling that could show that 19:44
i take it thats always the case (but maybe not for named arguments?) 19:45
nemokosch named arguments have no ordering at all 19:46
they won't get passed as an nth argument, you can only specify them by name 19:47
wafflus in powershell it would put optional arguments in [] and give you multiple signatures so It easier to understand at a glance 19:49
actually, I was thinking and Python also works a bit differently 19:50
in Raku, the concept of default values and the concept of named parameters are completely orthogonal
named (versus positional) parameters are about the way you can feed arguments into the function 19:51
the default values are values that get used if you didn't feed a value in, regardless the way it needs to be fed in
for a simple positional parameter, the caller side doesn't care about the name of the parameter; it is not exposed 19:54
wafflus ok  is there a reason why it mentions the name of the positional paramaters? on the documentation 19:56
just wondering
nemokosch I don't think there is an "interface" reason. I think it's because of how the signatures have been obtained, plus it's easier to describe what the function does if you don't have to always say "the first argument ...", "the second argument ..." 19:58
wafflus ok ty very much 20:01
nemokosch no problem 20:02
wafflus is there a smaller version of  manual page that just list the methods on a class/object instead of having to scroll through a big long page? 20:12
nemokosch isn't that more or less the "table of contents" on the left? 20:14
20:17 tea3po joined
wafflus k mine where hidden :P 20:18
20:18 tea3po left 20:19 tea3po joined 20:20 teatwo left
wafflus a breif explanation of that use method does would be nice I dopn't think I would ever guess what ord does 20:20
I was trying to find raku equivalent to JavaScript charCodeAt() i ended up having to use Ai 20:21
nemokosch what is charCodeAt? 20:23
wafflus "A".CharCodeAt() == 65 20:24
nemokosch It was Ord in Pascal as well fwiw 20:25
maybe in Python as well, couldn't say for 100% 20:26
SmokeMachine Shouldn’t the separator be a named parameter there? 20:27
(I men the .fmt)
nemokosch normative or descriptive?
20:28 deoac joined
SmokeMachine I mean wouldn’t it be more useful if the signature was `method fmt($format = '%s', :$separator = ' ' --> Str:D)` (note the : before the $separator) 20:30
nemokosch perhaps it would 20:54
21:18 deoac left 21:42 wafflus left 23:11 habere-et-disper joined
habere-et-disper Where is "<{ ... }>" documented ? I can't seem to find it under Grammars. 23:12
23:21 ab5tract left
habere-et-disper A broader search came up empty. Perhaps it has a name? 23:22
23:52 habere-et-disper left