🦋 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.
Geth doc: ff1e481239 | (JJ Merelo)++ | doc/Type/Any.pod6
Revision of Any.map prior to addressing #2632
06:46
doc: a9e8b9fc37 | (JJ Merelo)++ | doc/Type/Any.pod6
.map in sunk contest, refs #2632

Answer gleaned from roast and this answer by @lizmat in Stackoverflow stackoverflow.com/a/60185772/891440
linkable6 Link: docs.raku.org/type/Any
linkable6 DOC#2632 [open]: github.com/Raku/doc/issues/2632 [Hacktoberfest][RFE][big][docs][good first issue][help wanted][new][⚠ Top Priority ⚠] Checklist for 6.d
xinming m: my %h = ("b" => "yy"); my @c = (%h<y> ?? %h<y> !! Empty, "x"); @c.perl.say; 12:17
camelia ["x"]
xinming Is there a short cut to make Any to become Empty?
m: my %h = ("b" => "yy"); my @c = (%h<y> // Empty, "x"); @c.perl.say; 12:18
camelia ["x"]
xinming This one worked
cpan-raku New module released to CPAN! Uzu (0.3.5) by 03SACOMO
abraxxa what's the best construct to descend a directory and put all file IO objects into two arrays based on their name and included directory? 12:24
I have one solution using gather/take but now need to fill a second list 12:25
I'd just use a regular while loop without gather/take and push to the two arrays 12:27
moritz so, do it? 12:59
you can do something like 13:00
sub traverse($dir) { my (@f1, @f2); my sub inner($dir) { ... }; inner($dir); return @f1, @f2 }
where inner() recurses and fills @f1 and @f2
dakkar abraxxa: alternatively, you can use something like www.thenautilus.net/cgit/MaildirIn...od?h=bayes which gives you a Supply of IO::Path objects, which will keep emitting changes to the directories 16:04
dakkar should probably release that module
abraxxa dakkar: thanks, but way too high-tech ;) 16:07
abraxxa I've read the difference between when and if and gather/take and it's now a regular while loop with an if/elsif 16:07
El_Che mee door seffes? 16:20
lichtkind jnthn: is it possible to get an interview with you? 16:30
xinming m: my $s = "username:5"; my ($name, Int() $id) = $s.split(":"); $id.perl.say; 17:39
camelia "5"
xinming In this example, Should the Int() part be usable? 17:40
lizmat I think xinming has found a bug: 17:42
m: my (Int $a, $b) = "42:b".split(":")
camelia Type check failed in assignment to $a; expected Int but got Str ("42")
in block <unit> at <tmp> line 1
lizmat m: my (Int(Str) $a, $b) = "42:b".split(":")
camelia ( no output )
lizmat m: my (Int(Str) $a, $b) = "42:b".split(":"); dd $a
camelia Str $a = "42"
lizmat m: my (Int(Str) $a, $b) = "42:b".split(":"); dd $a; $a = "foo"
camelia Str $a = "42"
xinming lizmat: So, This is a bug, right?
lizmat m: my (Int(Str) $a, $b) = "42:b".split(":"); dd $a; $a = "foo"; dd $a 17:43
camelia Str $a = "42"
Str $a = "foo"
xinming the my Int() $x = "3"; should work as expected.
lizmat yeah, or a NYI
xinming Got it, thanks, it's just confirmation for this.
will add a issue
lizmat thanks!
bisectable6: my (Int(Str) $a, $b) = "42:b".split(":"); dd $a
bisectable6 lizmat, On both starting points (old=2015.12 new=5685648) the exit code is 0 and the output is identical as well
lizmat, Output on both points: «Str $a = "42"␤»
lizmat looks like it has been there like forever :-) 17:44
xinming lizmat: BTW, when we use my (Int() $a) Will this declare the $a as Int?
or, it's scalar, Just store the value Int in it.
lizmat m: my Int() $a; $a = "42"; dd $a 17:45
camelia 5===SORRY!5=== Error while compiling <tmp>
Coercion Int(Any) is insufficiently type-like to qualify a variable
at <tmp>:1
------> 3my Int() $a7⏏5; $a = "42"; dd $a
expecting any of:
constraint
lizmat looks like it should at least create a similar error
xinming So, the my Int() $a is an error
lizmat yeah...
so my (Int() $a, $b) should also be 17:46
xinming Got it, I thought that we can save a step further to coerce things directly for newly created var
lizmat yeah, that would be cool, but apparently we're not there yet :-) 17:47
xinming m: my (Int() $a) = "42" 17:50
camelia ( no output )
xinming m: my Int() $a = "42"
camelia 5===SORRY!5=== Error while compiling <tmp>
Coercion Int(Any) is insufficiently type-like to qualify a variable
at <tmp>:1
------> 3my Int() $a7⏏5 = "42"
expecting any of:
constraint
tbrowder hi, #raku
El_Che ukar# ih
tbrowder anyone here ever use Inline::Python? 17:51
El_Che: hi! lucky i can read pig latin 17:52
El_Che tbrowder: it took me soms tries to write it :)
lizmat m: say "pig latin".flip
camelia nital gip
tbrowder cool, good thing to demo to my grandson! 17:53
El_Che lizmat: showoff :) 17:54
lizmat m: my constant &pig-latin = &flip; say pig-latin "how are yoy" 17:55
camelia yoy era woh
lizmat *uoy :-)
tbrowder in a raku script using inline::python how would i express "from some-pything import foo, bar"? 17:57
lizmat: that is very neat! 17:58
lizmat m: sub pig-latin($s) { $s.flip.words.reverse }; say pig-latin "how are you" # maybe even neater ? 18:01
camelia (woh era uoy)
El_Che lol 18:02
lizmat m: sub pig-latin($s) { $s.flip.words.reverse.Str }; say pig-latin "how are you" 18:03
camelia woh era uoy
lizmat that's better
m: sub pig-latin($s) { ~$s.flip.words.reverse }; say pig-latin "it's hard to stop" 18:04
camelia s'ti drah ot pots
lizmat dinner&
tbrowder even better 18:04
El_Che (I was under the impression that regular English was pig latin :) ) 18:07
tbrowder otsna osna 18:44
jmerelo hey
tbrowder hey 18:45
hatswa pusa? 18:47
er, what's up,jj?
jmerelo working on a paper now, fighting with Python 18:49
lichtkind ll 18:51
jmerelo: github.com/pierre-vigier/Perl6-Mat...ix#authors 18:52
jmerelo lichtkind: glad to be of help!
tbrowder: also, will probably buy the ticket to Houston this week.
tbrowder great! i'm already signed up, as is an old classmate who is a raku wannabe (former fortran guy and current windows it guy) 18:54
jmerelo tbrowder: great! 18:55
tbrowder: I guess we'll meet there 18:56
tbrowder i hope so 19:02
tbrowder fun fact, def of pig latin from wikioedia: "a made-up language formed from English by transferring the initial consonant or consonant cluster of each word to the end of the word and adding a vocalic syllable (usually ˈpiɡ ˌlatn: so chicken soup would be translated to ickenchay oupsay . Pig Latin is typically spoken playfully, as if to convey secrecy." 19:17
so lizmat can fine-tune sub "pig-latin" and make a fun module to demo raku? 19:18
.tell lizmat ^^^ 19:19
.ask lizmat ^^^
hm, bots gone home?
jmerelo tbrowder: I would say so
m: say "Hi"
camelia Hi
jmerelo well, that one works.
tbrowder m: say pig-latin('hello jmerelo') 19:20
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
pig-latin used at line 1
tbrowder arg, have to start over, too much effort--sigh 19:22
pmurias is back from google onsite interviews (it didn't go as well as planned, now waiting for results) 20:43
I have a Raku focused day planned tommorow 20:44
lizmat pmurias++ 20:44
wildtrees pmurias, was it tougher then you expected? :-/
pmurias wildtrees: got stressed out on the algorithms interview (and it was the 5th on that day) and didn't solve it fully 20:59
wildtrees: had 2 js/frontend ones which I would guess went well
wildtrees oh, goodluck with getting a job there anyways pmurias , it was the 5th interview of the day? 21:00
pmurias yes
wildtrees sounds intense
pmurias wildtrees: had a googliness interview which I don't know how to judge and a system design one which the recruiter told me was supposed to be a frontend/backend interaction focused but was just a regular one which I wasn't really prepared for so I kind of winged it 21:01
wildtrees pmurias, what was the toughest question on the algorithm interview? 21:03
pmurias wildtrees: not sure if I'm allowed to mention it on IRC
wildtrees oh , :D that's fine 21:04
pmurias didn't sign an NDA but a guy who worked there he asked me if I signed one (he didn't too when he was interviewed) and he thought it was some administrative oversight 21:06
wildtrees gotcha 21:07
rypervenche Do we have any idea what the tutorials are going to be like for the Perl & Raku Conference? I'd like to purchase my ticket, but I'm not sure how many days to book the hotel for. 21:12
lizmat rypervenche: I assume you mean the one in Houston ? 21:14
rypervenche lizmat: Yes 21:15
lizmat I have no idea... I know that I won't be going to the US for the foreseeable future
rypervenche Oh :/ 21:16
guifa rypervenche: I’m going to be doing a presentation on internationalization/localization, but I don’t knwo what else is planned yet 21:23
The second round of talk submissions ends in two weeks. I imagine they’re waiting to announce all the speakers for when they have a schedule as well so it’ll probably all get dumped on the 8th 21:27
rypervenche Ah ok. 21:38
cpan-raku New module released to CPAN! Sparrow6 (0.0.13) by 03MELEZHIK 23:01