🦋 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:00 abraxxa joined
AncientWizard I've read the IO::Pipe page online I'm looking for the deeper suff that page left out. The page does not explain how to create a working pipe without using Proc::Async first 00:01
00:03 aborazmeh left 00:07 AncientWizard left
guifa .tell AncientWizard You can create a pipe manually by using IO::Pipe.new: :$on-read, :$on-write, :$on-close 00:08
tellable6 guifa, I'll pass your message to AncientWizard
00:17 Kaiepi left, Kaiepi joined, vrurg joined 00:22 vrurg left 00:54 vrurg joined, vrurg left, kurahaupo left, xinming_ joined, vrurg joined 01:02 kurahaupo joined 01:05 AncientWizard joined 01:10 AncientWizard left 01:20 kvw_5_ joined 01:23 kvw_5 left 02:23 bisectable6 left, statisfiable6 left, greppable6 left, tellable6 left, benchable6 left, unicodable6 left, linkable6 left, evalable6 left, releasable6 left, quotable6 left, coverable6 left, notable6 left, sourceable6 left, bloatable6 left, shareable6 left, nativecallable6 left, committable6 left, squashable6 left 02:24 greppable6 joined, linkable6 joined, quotable6 joined, benchable6 joined, squashable6 joined, sourceable6 joined 02:25 committable6 joined, evalable6 joined, bisectable6 joined, notable6 joined, statisfiable6 joined, unicodable6 joined 02:26 shareable6 joined, coverable6 joined, tellable6 joined, bloatable6 joined, releasable6 joined, nativecallable6 joined 02:42 kurahaupo left 02:45 kurahaupo joined 02:52 softmoth_ is now known as softmoth 02:58 kurahaupo left 03:00 kurahaupo joined 03:36 kurahaupo left 03:50 sxmx left 03:55 Sgeo left 04:05 Sgeo joined 04:06 kurahaupo joined 04:39 kurahaupo left 04:53 Doc_Holliwood joined 04:55 neshpion left 04:58 kurahaupo joined 05:05 Sgeo left 05:21 wamba joined 05:22 Sgeo joined 05:23 parv joined 05:41 aborazmeh joined 05:51 aluaces joined 05:58 parv left, parv joined 06:00 aborazmeh left 06:19 wingfold_ left, wingfold joined 06:30 ufobat joined 06:35 kurahaupo left 06:38 parabolize left 06:42 stoned75 joined 06:51 kurahaupo joined 06:52 domidumont joined 06:57 patrickb joined, sxmx joined 07:18 abraxxa left 07:20 abraxxa joined 07:21 kurahaupo left 07:30 dakkar joined 07:33 kurahaupo joined 07:34 Doc_Holliwood left 07:40 kurahaupo_ joined 07:42 kurahaupo left 07:43 linkable6 left 07:45 linkable6 joined 07:55 Sgeo_ joined 07:57 Sgeo left, pecastro joined 07:59 Sgeo_ left 08:09 |oLa| left 08:10 softmoth left 08:11 albino left
samebchase- What signature should MAIN have so that I can pipe data to it, as part of a UNIX pipeline 08:16
08:16 kurahaupo_ left 08:17 kurahaupo joined 08:32 stoned75 left 08:33 stoned75 joined 08:40 linkable6 left 08:43 linkable6 joined
moon-child samebchase-: nothing to do with your signature, you just read from $*IN and write to $*OUT 08:45
samebchase- thank you moon-child! let me try that out
moon-child (or just use get and say, but using $*IN and $*OUT make it easier for you to change in/out files according to params later on) 08:46
08:56 frost-lab joined 09:13 kurahaupo_ joined 09:15 kurahaupo left 09:18 jast joined 09:21 asd joined 09:22 asd left 09:27 kurahaupo_ left
lizmat when reading lines from STDIN, I would use "lines" 09:28
samebchase- moon-child ^^
m: .say for lines
camelia »Wann treffen wir drei wieder zusamm?«
»Um die siebente Stund‘, am Brückendamm.«
»Am Mittelpfeiler.«
»Ich lösche die Flamm.«
»Ich mit«

»Ich komme vom Norden her.«
»Und ich vom Süden.…
lizmat note that "lines" is lazy
m: .uc.say for lines 09:29
camelia »WANN TREFFEN WIR DREI WIEDER ZUSAMM?«
»UM DIE SIEBENTE STUND‘, AM BRÜCKENDAMM.«
»AM MITTELPFEILER.«
»ICH LÖSCHE DIE FLAMM.«
»ICH MIT«

»ICH KOMME VOM NORDEN HER.«
»UND ICH VOM SÜDEN.…
lizmat also note that using "lines" will automatically read from any number of files that you specify on the command line
raku foo.raku bar baz 09:30
will produce lines first from "bar", then from :baz"
parv lizmat, is there special syntax/idiom to get all the lines in a scalar variable? 09:31
lizmat slurp 09:32
parv ah. thanks lizmat.
lizmat m: say slurp
camelia »Wann treffen wir drei wieder zusamm?«
»Um die siebente Stund‘, am Brückendamm.«
»Am Mittelpfeiler.«
»Ich lösche die Flamm.«
»Ich mit«

»Ich komme vom Norden her.«
»Und ich vom Süden.…
lizmat also "words" has the same semantics: 09:33
m: .say for words
camelia »Wann
treffen
wir
drei
wieder
zusamm?«
»Um
die
siebente
Stund‘,
am
Brückendamm.«
»Am
Mittelpfeiler.«
»Ich
lösche
die
Flamm.«
»Ich
mit«
»Ich
komme
vom
Norden
her.«
»Und
ich
vom
S…
lizmat m: .tc.say for words
camelia »Wann
Treffen
Wir
Drei
Wieder
Zusamm?«
»Um
Die
Siebente
Stund‘,
Am
Brückendamm.«
»Am
Mittelpfeiler.«
»Ich
Lösche
Die
Flamm.«
»Ich
Mit«
»Ich
Komme
Vom
Norden
Her.«
»Und
Ich
Vom
S…
parv "words" is interesting to know in its own right. 09:34
lizmat yeah, people tend to forget about it 09:35
moritz_ Who maintains modules.raku.org/ these days? 09:43
lizmat has no idea 09:47
rba might know
09:56 renormalist left 09:57 renormalist joined, parv left 10:00 parv joined 10:09 |oLa| joined, asymptotically left, asymptotically joined 10:14 |oLa| left
samebchase- thank you for the tip lizmat 10:21
MasterDuke doesn't zef have two places where it gets the list of modules from? github.com/Raku/ecosystem/blob/master/META.list and somewhere else? 10:36
lizmat I think fez's list ? 10:40
dakkar MasterDuke: run `zef --verbose update` to see them all
MasterDuke thanks 10:41
dakkar also, `zef --help` tells you where its config file is, in case you want to change those URLs 10:43
MasterDuke ugexe: github.com/ugexe/Perl6-ecosystems/pull/3 in case you don't get GH notifications 10:50
10:52 Black_Ribbon left 10:54 parv left 11:02 asymptotically left, asymptotically joined 11:29 MasterDuke left, MasterDuke joined 11:32 |oLa| joined 11:33 rindolf joined 11:59 |oLa| left 12:04 Doc_Holliwood joined 12:08 frost-lab left 12:18 parv joined 12:19 jmerelo left
ugexe MasterDuke: that list is generated from the META.list link you posted earlier 13:09
a pull request to my repo will just get overwritten in an hour or two 13:10
MasterDuke but those typos aren't in github.com/Raku/ecosystem/blob/master/META.list
13:12 elcaro joined
Altreus Can you tap an array? And if not, how easy would it be to have «has @.messages but Tappable» or ... however that's done 13:14
So that you get a supply whenever it's appended to
It's a queue really
ugexe MasterDuke: sure they are 13:17
lizmat m: my @a = ^10; react whenever @a.Supply { .say }
camelia 0
1
2
3
4
5
6
7
8
9
ugexe just follow the link in META.list
lizmat m: my @a = ^10; react whenever @a.Supply { .say } # Altreus 13:18
camelia 0
1
2
3
4
5
6
7
8
9
Altreus yayaya
can I make it a live supply so I don't hear about existing values? :D
ugexe that isn't going to catch when you append things to the array is it?
Altreus m: my @a = ^10; react whenever @a.Supply { .say } @a.push(11)
camelia 5===SORRY!5=== Error while compiling <tmp>
Strange text after block (missing semicolon or comma?)
at <tmp>:1
------> 3= ^10; react whenever @a.Supply { .say }7⏏5 @a.push(11)
expecting any of:
infix
infix stopp…
Altreus m: my @a = ^10; react whenever @a.Supply { .say }; @a.push(11)
camelia 0
1
2
3
4
5
6
7
8
9
Altreus it is not
:(
ugexe yeah i wouldnt think so 13:19
MasterDuke oh, it's in *their* meta6, i was just looking at the values in the list
lizmat m: my @a = ^10; dd @a.Channel # meh 13:20
camelia No such method 'Channel' for invocant of type 'Array'
in block <unit> at <tmp> line 1
Altreus Could fairly easily write a subclass of Array, right? has Queue @.messages;
.=new 13:21
lizmat Well, what you'd want is a Channel, no ?
Altreus I defer to your expertise in that
not sure, because I also want it to act like an array 13:22
I could of course double up and have a supply that is fed when I add to the array
I could also rename @.messages so the supply itself held that spot 13:23
lizmat m: my $c := Channel.new; $c.send(42); react whenever $c { .say } 13:24
camelia (timeout)42
lizmat m: my $c := Channel.new; $c.send(42); $c.close; react whenever $c { .say }
camelia 42
lizmat hmmm... am about to go afk for a few hours 13:25
will think about it&
Altreus :)
13:29 softmoth joined 13:43 |oLa| joined 14:05 |oLa| left 14:10 wamba left 14:15 b2gills left 14:16 Sgeo joined 14:17 wamba joined 14:27 patrickb left 14:32 ufobat_ joined 14:33 ufobat left 14:50 parabolize joined 15:00 mowcat joined 15:18 Sgeo_ joined 15:19 Sgeo_ left 15:20 Sgeo left, Sgeo joined 15:21 neshpion joined 15:23 |oLa| joined 15:33 |oLa| left 15:34 |oLa| joined 15:39 |oLa| left 15:40 kurahaupo joined 15:47 Doc_Holliwood left 15:51 parv left 16:00 finsternis left
guifa I feel like I’m spending way too much time handling naming subs 16:43
16:46 abraxxa left 16:47 ufobat_ left 16:48 abraxxa joined, dakkar left 17:01 asymptotically left, asymptotically joined 17:03 gordonfish left 17:17 domidumont left 17:19 ufobat_ joined
Altreus use anonymous ones 17:22
guifa ha
17:23 b2gills joined
guifa This is for a module, so having to balance clarity, distinctiveness and brevity 17:23
Altreus naming things is the main challenge of programming 17:24
guifa especially when one of the words is “localization” and you have an insane hatred of “l10n” 17:25
17:25 shlomif joined 17:26 rindolf left
codesections guifa: agreed re: the difficulty. I have a cluster of related custom properties that I'm currently "namespacing" with the letter é 17:26
lizmat
.oO( l5z4n )
for the americans, and l5s4n for the more english inclined :-) 17:27
17:27 shlomif is now known as rindolf
guifa casts a butterfly summon spell to attack lizmat 17:27
you know Oxford actually prefers the z in those words haha
lizmat oops :-) 17:28
guifa in my case, I have names that would definitely be potentially used by other modules
lizmat that would only be an issue when used in the same scope ? 17:29
guifa Yeah — unfortunately I could see them possibly being used in the same scope too
I did one interesting solution with LanguageTag
use Intl::LanguageTag actually gives you Intl::LanguageTag::BCP47, but aliased to the former 17:30
so maybe I’ll do a similar one here, to give a longer / shorter import option based on what users want. Since it’s only a few subs, it’s minimal maintenance once made
Because gist.github.com/alabamenhu/a84cec3...b26fc74907 <— that is very wordy :-( 17:31
lizmat well, properly manipulating the EXPORT hash, would be the only thing to do then ?
Altreus Oxford can swivel
They're the same people who accept "aluminum" in scientific papers 17:32
Now if we're fixing *all* of the letters then by all means, gimme that z
17:33 |oLa| joined 17:38 |oLa| left 17:39 albino_ joined
guifa lizmat: actually yeah I guess I could just use a :long option. When I did LanguageTag, the issue was I had always used Intl::LanguageTag, but with the rewrite, that really just became a namepsace for different language tag types, so for backwards compatibility (and also a not-so-subtle hint that one is the preferred) I did the weird passthrough export 17:39
17:40 sena_kun left 17:41 sena_kun joined
codesections What's the syntax for calling a method via a Str, again? Not a tool I reach for very often, and I'm not seeing it right off in the docs 17:42
guifa .”$foo”
err
lizmat .:$foo"() 17:43
guifa .”$foo”() <— parentheses obligatory
lizmat yup
guifa one of my favorites
codesections ty. I was missing the parens
guifa in one of my modules where I do both attribute and hash access I have method AT-KEY($key) { self.”$key”() } 17:45
works like a charm
codesections ha
lizmat indeed... and if a key is not supported, that will throw :-) 17:47
much better than the other way around :-) 17:48
guifa I had it the other way around ( method FALLBACK ($method) { self.Hash::AT-KEY($method) }  ) originally 17:49
the undefined keys weren’t terrible for what I was doing, but the speed was the difference
attribute access > hash access for speed
codesections what are your/everyone's feelings about FALLBACK in general?
guifa codesections: did you see my $file.greatgreatgreatgreatgreatgreatgrandparent thing? 17:50
codesections I've been tempted, but have mostly stayed away
... that sounds familiar, but I'm not positive
guifa www.nntp.perl.org/group/perl.perl6...g9858.html 17:51
codesections ha 17:54
18:01 shlomif joined, rindolf left
guifa Though that shows a really good use for fallback: you can actually respond to the text of the method called. Any (or Mu?) uses this try to provide a recommend to you if you misspelled it 18:02
codesections yeah. I guess I'm concerned that I lose the _existing_ error messages, though, which tend to be pretty good 18:07
guifa you can always callsame if you can determine you don’t have a better error message 18:08
codesections you can? I guess I thought you were at the bottom of the call chain at that point 18:09
guifa FALLBACK can be multi’d :-)
18:09 shlomif is now known as rindolf
codesections oh, so you'd be falling back to other FALLBACKs, I get it 18:10
guifa but the error messages might be usefully tailored in some cases. For instance on CLDR trying to access an unknown attribute will display the available ones instead (tend to be no more than a dozen or so)
codesections yeah, that seems like a good use of fallback. The _tempting_ uses are more like the one you mentioned earlier, where I want to support calling something arbitrary (like your keys) 18:12
guifa I think the best question to ask yourself before using FALLBACK is “is there another way? And is it better?”
the greatgreatgrandparent one can’t really be done another way. So FALLBACK makes sense. Mimicking Javascript Objects (~~  Raku Hash) is another good use. Better error message is one. And … I can’t think of any off the top of my head ha 18:13
actually, if hypothetically 0x syntax didn’t exist, I guess you could do x.ff where class x { method FALLBACK ($n) { $n.base(16) } } 18:15
guifa is afk for a bit 18:16
18:20 Black_Ribbon joined, sena_kun left, sena_kun joined 18:27 Doc_Holliwood joined 18:49 aborazmeh joined 18:51 |oLa| joined 18:53 abraxxa left 18:55 abraxxa joined 19:02 neshpion left, neshpion joined 19:05 aborazmeh left 19:15 ufobat_ left
[Coke] (l10n) I know someone who named their l10n product "l10n" which is really frustrating to me. 19:18
19:21 patrickb joined 19:34 asymptotically left 19:38 simcop2387 left 19:45 asymptotically joined 19:46 simcop2387 joined 19:49 gordonfish joined 19:52 |oLa| left 19:54 shadowpaste left, stoned75 left 19:56 maggotbrain left 19:57 shadowpaste joined 19:58 maggotbrain joined 20:05 stoned75 joined 20:07 |oLa| joined
japhb [Coke]: Fitting our metamodel, perhaps "Localizable". (Localizer is already used!) 20:08
guifa japhb: Localizable is def more of a Role :-) 20:19
20:24 samebchase-6 joined 20:25 eater joined 20:26 eaterof left, samebchase left, ambs left, samebchase- left 20:27 ambs joined 20:28 samebchase joined 20:30 dotdotdot left 20:32 dotdotdot joined
Geth doc: b40c9b0bd1 | (Stoned Elipot)++ | doc/Type/Proc.pod6
Match example's code with its output
20:32
linkable6 Link: docs.raku.org/type/Proc
20:56 linkable6 left 20:57 linkable6 joined 21:01 |oLa| left 21:02 |oLa| joined 21:05 rindolf left 21:07 wamba left 21:12 patrickb left 21:20 timlegge joined
[Coke] Urk. I was using :skip-empty on split thinking it was just beginning/end skips 21:24
guifa d’oh 21:38
leont Urk? What does a conservative christian fishing town in The Netherlands have to do with this? 😛
21:38 stoned75 left
codesections wow, you're not kidding. At least judging by their Wikipedia page, they take fish _very_ seriously 21:41
It's not so much that they have a fish both on their Coat of Arms *and* on their flag… 21:43
it's more that they care enough to have made the two fish distinctly different, while still not being distinct
21:43 Kaiepi left
guifa codesections: there are all sorts of interesting things in those symbols in Europe 21:44
my favorite WTF is Madrid’s because it has a bear trying to eat fruit out of a strawberry tree … and Madrid has neither bears nor strawberry trees :P
codesections :D 21:45
guifa But look up Riumors in Spain 21:47
THAT’S an impressive one
( en.wikipedia.org/wiki/Riumors#/med...iumors.svg ) 21:52
21:55 Geth left 21:56 Geth joined 21:58 sxmx left 22:03 sxmx joined
[Coke] anyone here familiar with nuget packaging? have an OT question 22:14
stackoverflow.com/questions/670101...nd-the-api 22:15
22:37 Doc_Holliwood left
Geth ecosystem: JRaspass++ created pull request #588:
Update dists who've switched from master to main
22:42
23:03 abraxxa left 23:06 abraxxa joined 23:46 dataangel joined 23:51 tejr left 23:57 pecastro left