🦋 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 ToddAndMargo joined
ToddAndMargo How do I erase an array (clear out all its entries)? 00:03
timotimo you can assign Empty to it 00:04
m: my @foo = 1, 2, 3, 4; dd @foo; @foo = Empty; dd @foo;
camelia Array @foo = [1, 2, 3, 4]
Array @foo = []
ToddAndMargo Thank you! I just found I can use Perl 5's method too: `@y = ();` 00:06
00:07 aborazmeh joined, aborazmeh left, aborazmeh joined
ToddAndMargo I like Empty better as it is more human readable. 00:08
bye bye 00:11
00:11 ToddAndMargo left 00:17 Dock_Holliwood left 00:26 Altai-man_ joined 00:29 sena_kun left 00:32 vike1 left
RaycatWhoDat Hmm. 00:33
Does `~` force the result of a subroutine into a Bool?
Belay that, I missed something silly. 00:36
00:36 lucasb left 00:47 mahafyi left, Maylay left 00:50 melezhik left 00:51 konvertex left 00:53 Maylay joined 00:55 mowotter joined, mowcat left 00:56 Maylay left, Maylay joined 00:59 lichtkind left 01:12 hungrydonkey joined 01:50 mowotter left 02:14 maggotbrain left 02:15 hungrydonkey left 02:27 sena_kun joined 02:29 Altai-man_ left 02:34 vike1 joined 02:55 ensamvarg_ is now known as ensamvarg 03:08 brtastic joined 03:18 marcusr left 03:19 marcusr joined 03:21 gugod joined 03:33 marcusr left, marcusr joined 03:39 aborazmeh left 04:06 hungrydonkey joined 04:09 hungrydonkey left, hungrydonkey joined 04:13 hungrydonkey left 04:26 Altai-man_ joined 04:29 sena_kun left 04:37 ShimmerFairy left, ShimmerFairy joined
cpan-raku New module released to CPAN! Term::Choose (1.6.7) by 03KUERBIS 04:45
04:46 stoned75 left 04:48 stoned75 joined 05:15 aborazmeh joined, aborazmeh left, aborazmeh joined 05:52 aborazmeh left 06:07 ensamvarg_g6 joined 06:08 ensamvarg_g6 left, ensamvarg3 joined 06:14 aborazmeh joined, aborazmeh left, aborazmeh joined 06:23 rindolf joined 06:27 sena_kun joined 06:30 Altai-man_ left 07:30 evalable6 left, linkable6 left, linkable6 joined 07:32 evalable6 joined 07:37 konvertex joined 08:09 poohmaan left 08:22 poohmaan joined 08:24 lichtkind joined 08:26 Altai-man_ joined 08:29 sena_kun left 08:36 sour joined, SoursBot joined 08:39 marcusr left 08:41 cpan-raku left, marcusr joined, cpan-raku joined, cpan-raku left, cpan-raku joined 08:44 Dock_Holliwood joined 08:46 pecastro joined 08:54 SoursBot left, SoursBot joined 09:10 leont joined 09:14 lichtkind_ joined, leah2 left 09:16 lichtkind left 09:21 brtastic left 09:31 Sgeo left 09:32 brtastic joined, marcusr left 09:34 marcusr joined 09:40 poohmaan left 09:44 sour left 09:46 SoursBot left 09:47 SoursBot joined 09:50 poohmaan joined 10:08 SoursBot left 10:09 leah2 joined 10:27 sena_kun joined 10:29 Altai-man_ left 10:31 aborazmeh left 10:33 poohmaan left, mowcat joined 10:59 ohmycloud joined 11:00 chloekek joined 11:15 chloekek left 11:42 pcop joined
cpan-raku New module released to CPAN! Gnome::N (0.17.7) by 03MARTIMM 11:44
11:45 Black_Ribbon left, pcop left, mowcat left
cpan-raku New module released to CPAN! Gnome::N (0.17.7.1) by 03MARTIMM 11:52
11:57 Dock_Holliwood left 12:10 chloekek joined 12:26 Altai-man_ joined 12:29 sena_kun left 12:52 aborazmeh joined, aborazmeh left, aborazmeh joined 13:02 domidumont joined 13:05 Dock_Holliwood joined 13:17 peteretep left 13:22 spycrab0 left 13:24 zostay joined, Grinnz left, peteretep joined 13:27 peteretep left, aborazmeh left, kawaii left 13:28 mithaldu_ left 13:30 kawaii joined, NODE left, mithaldu_ joined 13:31 Grinnz joined, peteretep joined 13:32 NODE joined 13:34 spycrab0 joined 13:40 lichtkind_ left 13:41 Dock_Holliwood left 13:47 lichtkind joined 13:48 lichtkind left 14:27 sena_kun joined 14:28 domidumont left 14:29 Altai-man_ left
RaycatWhoDat Is there a more concise way to do this? 14:32
lizmat ? 14:33
RaycatWhoDat gist.github.com/RayMPerry/6d3d300d...832428bba4
(Sorry, I was uploading it.)
lizmat you are aware that the Date class has an "is-leap-year" method on it ? 14:35
RaycatWhoDat This exercise wraps those classes and bails-out.
Can't use 'em for this.
lizmat sub IS-LEAP-YEAR(int $y --> Bool:D) {
$y %% 4 and not $y %% 100 or $y %% 400
}
is the logic in the Dateish role 14:36
RaycatWhoDat Huh. Yeah, that makes sense.
Dunno why I didn't think of that.
14:36 mowcat joined
RaycatWhoDat Thanks! 14:37
lizmat yw !
Geth doc: gfldex++ created pull request #3424:
show that substition works in enum subsript syntax
14:47
14:55 NODE left, aborazmeh joined, aborazmeh left, aborazmeh joined 14:57 NODE joined 15:07 NODE left 15:08 NODE joined 15:15 mowcat left
Geth doc: 05813680e5 | (Wenzel P. P. Peppmeyer)++ (committed using GitHub Web editor) | doc/Language/typesystem.pod6
show that substition works in enum subsript syntax
15:16
doc: a1373da06a | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | doc/Language/typesystem.pod6
Merge pull request #3424 from gfldex/patch-14

show that substition works in enum subsript syntax
linkable6 Link: docs.raku.org/language/typesystem
15:31 lucasb joined 15:35 rainmanjam joined, brtastic left
gfldex I just started a blog post with a title. That's a first! I usually write the post and then stare for 20 minutes at the screen to find a title that works. :) 15:51
15:54 ohmycloud left 15:58 sno left 16:00 sno joined 16:01 aborazmeh left 16:13 RaycatWhoDat left, wbn joined 16:17 brtastic joined 16:23 NODE left 16:24 NODE joined 16:26 Altai-man_ joined 16:29 sena_kun left 16:37 konvertex left 16:41 konvertex joined, lembark joined 16:47 mowcat joined
gfldex lolibloggedalittle: gfldex.wordpress.com/2020/05/24/th...ous-infix/ 16:47
16:51 natrys joined
lembark Oddity: V6.c of CU::Repository::Installation creates non-executable #! wrappers for *-j, *-js if the backends don't exist. 16:53
Q: Would it make more sense to check for .IO.e of the executable prior to writing the wrapper? 16:54
e.g., if rakudo-j doesn't exist then zef-j w/ #!/bin/env rakudo-j isn't going to get very far.
pastebin.com/TMayNbjN 16:55
17:04 Woodi_ left 17:05 rainmanjam left, Woodi joined 17:12 sour joined
sour m: for {a => [1, 2]}<a> -> $x { say $x } 17:13
camelia [1 2]
sour this is super weird
17:13 melezhik joined 17:14 mowcat left
sour m: my @v = {a => [1, 2]}; say @v; 17:14
camelia [a => [1 2]]
sour m: my @v = {a => [1, 2]}<a>; say @v;
camelia [[1 2]]
MasterDuke m: for {a => [1, 2]}<a><> -> $x { say $x } 17:20
camelia 1
2
lizmat weekly: gfldex.wordpress.com/2020/05/24/th...ous-infix/ 17:23
notable6 lizmat, Noted! (weekly)
chloekek p6: say 「ミームな人」.lc; 17:33
camelia ミームな人
17:39 oneeggeach joined 17:40 sour left 17:45 m_athias left 17:55 m_athias joined 18:01 Sgeo joined, stoned75 left 18:03 stoned75 joined 18:04 Dock_Holliwood joined 18:20 chloekek left 18:27 sena_kun joined 18:29 Altai-man_ left 18:31 NODE left 18:32 Benett left 18:34 Benett joined
oneeggeach is there an article/example of someone using multiple versions/APIs of a module in the same Raku program? 18:40
I've heard a couple times that this is possible, read about it in the design docs 18:41
but I was wondering how common it was to use that Raku feature
18:47 NODE joined 19:00 ensamvarg3 left
lizmat oneeggeach: not that common yet, but production sites are using that feature afaik 19:02
19:09 wamba joined 19:33 lembark left 19:42 xinming_ joined 19:45 xinming left 19:53 woolfy joined, woolfy left
oneeggeach cool -- It's similar to NPM modules for JavaScript, yes? Each module downloads its specified versions of dependencies, so you can end up with multiple module versions being used within a single project 20:07
unlike NPM, though, seems like Raku is more explicit by lexicially specifying which module version is used with `use Module:ver<1.0.0>` 20:08
lizmat right
20:09 konvertex left
oneeggeach awesome, thanks lizmat -- just trying to square my learning of Raku modules with my prior experience from Ruby and JavaScript :) 20:09
20:13 chloekek joined 20:16 brtastic left 20:19 suman joined
suman m: say map *.Str.chars, 'hello', 1, 22/7, 42, 'world'; 20:19
camelia (5 1 8 2 5)
20:20 molaf joined
suman m: say "22/7".Str.chars 20:20
camelia 4
suman m: say map *.Str.chars, 'hello', 1, 22/7, 42, 'world';
camelia (5 1 8 2 5)
suman Why is 8 ?
Isn't it 4? 20:21
m: say "22/7".Str.chars
camelia 4
20:26 natrys left, Altai-man_ joined 20:29 sena_kun left, stoned75 left
lizmat m: say 22/7 # say calls .gist 20:31
camelia 3.142857
lizmat suman ^^
20:31 aborazmeh joined, aborazmeh left, aborazmeh joined 20:33 suman left 20:34 stoned75 joined
daxim moritz, re news.ycombinator.com/item?id=23080192 : it's imperfect, but not awfully so. if one is competent in Unicode matters, then IntlChar/IntlCollator do 70% of the job and the rest can be worked around manually/inefficiently. old.reddit.com/r/lolphp/comments/c...9/es9eg06/ 20:41
the biggest problem is the lack of separation between encoded and decoded character data, similar to perl there are just strings. that makes it not easy to keep track what's what.
20:43 rindolf left
moritz daxim: ok, thanks! 20:52
chloekek daxim: Note that in PHP a string is always an array of bytes. In Perl, the elements of a string can be integers ≥ 256. 20:54
For some language features, PHP does assume that these byte strings have a particular encoding. For example (int)$s, assumes ASCII digits. 20:57
But always thinking of strings as byte strings, or arrays of bytes, or Blob, is the right thing to do, and when you need to extract linguistic properties, you need to assert a particular encoding. 20:58
20:59 mowcat joined
Grinnz that's basically how it worked before perl 5.6. but instead of adding workarounds for it, they added an upgraded storage format 21:00
21:23 guifa2 joined
Geth ¦ problem-solving: vrurg assigned to jnthn Issue More language revision related questions needs resolving. github.com/Raku/problem-solving/issues/199 21:37
21:46 Altai-man_ left 21:47 melezhik left 21:58 chloekek left 22:15 Altai-man_ joined 22:21 Altai-man_ left 22:31 aborazmeh left 22:36 lucasb left 22:53 girafe2 joined 22:55 girafe left 22:59 Dock_Holliwood left 23:04 aborazmeh joined, aborazmeh left, aborazmeh joined, wamba left 23:34 guifa2 left 23:51 aborazmeh left 23:53 pecastro left 23:57 leont left