IRCloggy #perl6 2019-05-22

Logs Search ←Prev date Next date→ Channels Documentation

Provider of IRC logs since 2005.
WARNING: As Freenode became unjoinable and lost all warnings in topics, we cannot log channels on Freenode anymore.

2019-05-22

netrino left00:01
newbie75 joined00:04
newbie75 left00:04
netrino joined00:07
DarthGandalf joined00:13
john_parr joined00:14
syntaxma1 left00:33
syntaxman joined00:33
netrino left00:40
netrino joined00:46
adu joined01:00
kent\n left01:03
kent\n joined01:04
xiaoyafeng joined01:13
atweiden-air joined01:18
Ven````` joined01:18
netrino left01:18
Ven```` left01:20
netrino joined01:25
Kaiepi left01:27
Kaiepi joined01:28
eythian left01:37
eythian joined01:38
eythian left01:38
eythian joined01:38
molaf left01:39
xiaoyafeng left01:43
noisegul_ joined01:48
xiaoyafeng joined01:50
qiqi joined01:50
noisegul left01:51
molaf joined01:52
netrino left01:57
Xliff Getting the following attempting to build rakudo;01:57
Can't locate object method "make_option" via package "NQP::Config::Rakudo" at /home/cbwood/Projects/rakudobrew/moar-master/tools/lib/NQP/Config/Rakudo.pm line 42901:58
holyghost left01:58
cpan-p6 left02:00
cpan-p6 joined02:01
cpan-p6 left02:01
cpan-p6 joined02:01
Manifest0 left02:01
Manifest0 joined02:02
Xliff After following suggestion in commit msg 0acd27f44e9495c78af02c986d5bb7a5124c7caf, I am now getting the following error:02:02
Found /home/cbwood/Projects/rakudobrew/moar-master/install/bin/moar version 2019.03-110-g081823ffc, which is too old. Wanted at least 2019.05-11-g248e29802:02
melezhik joined02:02
melezhik How to wrire regexp for everything not '@' simbol apperaing more then once at least?02:03
netrino joined02:04
Xliff m: say $a = '@@ wadads'; say $a ~~ / (<-[@]>+)/02:04
camelia rakudo-moar a643b8be1: OUTPUT: «=== SORRY!=== Error while compiling <tmp>␤Variable '$a' is not declared␤at <tmp>:1␤------> say $a = '@@ wadads'; say $a ~~ / (<-[@]>+)/ ␤»02:04
Xliff m: my $a = '@@ wadads'; say $a ~~ / (<-[@]>+)/02:04
camelia rakudo-moar a643b8be1: OUTPUT: «「 wadads」␤ 0 => 「 wadads」␤»02:04
Xliff m: my $a = '@@ wadads'; say $a ~~ / (<-[@]> ** 2..*)/02:05
camelia rakudo-moar a643b8be1: OUTPUT: «「 wadads」␤ 0 => 「 wadads」␤»02:05
Xliff m: my $a = '@@ w'; say $a ~~ / (<-[@]> ** 2..*)/02:05
camelia rakudo-moar a643b8be1: OUTPUT: «「 w」␤ 0 => 「 w」␤»02:05
Xliff m: my $a = '@@w'; say $a ~~ / (<-[@]> ** 2..*)/02:05
camelia rakudo-moar a643b8be1: OUTPUT: «Nil␤»02:05
Xliff melezhik: ^^ Only one, so two or more is working02:05
m: my $a = '@@wbb'; say $a ~~ / (<-[@]> ** 2..*)/02:05
camelia rakudo-moar a643b8be1: OUTPUT: «「wbb」␤ 0 => 「wbb」␤»02:05
melezhik thanks, Xliff:02:05
what about capturing?02:05
Xliff That is capturing.02:06
'wbb' in $/[0] aka $002:06
melezhik m: my $a = qq{foo-@}; $a ~~ / (< - [ @ ] > ** 2..* ) / ; say $002:08
camelia rakudo-moar a643b8be1: OUTPUT: «「-@」␤»02:08
Xliff <-[@]> ... you can' split it out like that02:08
m: my $a = '@@wbb'; say $a ~~ / (<-[ @ ]> ** 2..*)/02:08
camelia rakudo-moar a643b8be1: OUTPUT: «「wbb」␤ 0 => 「wbb」␤»02:08
Xliff ^ You can like that though02:08
melezhik m: my $a = qq{foo-@}; $a ~~ / (<-[ @ ] > ** 1 ) / ; say $002:09
camelia rakudo-moar a643b8be1: OUTPUT: «「f」␤»02:09
melezhik thanks. Xliff: I get the idea02:09
m: my $a = qq{foo-@}; $a ~~ / (<-[ @ ] > ** 1..* ) / ; say $002:10
camelia rakudo-moar a643b8be1: OUTPUT: «「foo-」␤»02:10
melezhik here we go ((=;02:10
Xliff =)02:10
atweiden-air left02:12
holyghost joined02:15
holyghost good morning02:15
I might take the day off, I just need to add tests to Bayes::Learn, after that I'll make docs for Game::QFG02:16
Geth ¦ ecosystem: faa5c61765 | dmaestro++ (committed using GitHub Web editor) | META.list02:17
¦ ecosystem: Add Seq::Bounded to ecosystem 02:17
¦ ecosystem: review: https://github.com/perl6/ecosystem/commit/faa5c6176502:17
Cabanossi left02:36
melezhik I have a foo=1,bar=2 string, I want to convert it to Hash02:37
netrino left02:37
melezhik m: my $a = qq{foo@foo=1,j=1}; $a ~~ /"@" (\S+) $$/; say "$0".split(",").map({ $_.split("=") }).perl02:37
camelia rakudo-moar a643b8be1: OUTPUT: «(("foo", "1").Seq, ("j", "1").Seq).Seq␤»02:37
melezhik so I need somehow "flattern" seq to array02:37
and assign to hash02:37
not sure how to do that02:37
Xliff m: my $a = "foo=1,bar=2"; for $a.split(/,/) { s/(<-[=]>+'=02:38
camelia rakudo-moar a643b8be1: OUTPUT: «=== SORRY!=== ␤Unrecognized regex metacharacter , (must be quoted to match literally)␤at <tmp>:1␤------> my $a = "foo=1,bar=2"; for $a.split(/ ,/) { s/(<-[=]>+'= ␤Unable to parse expression in single quotes; couldn't find final "'"…»02:38
Xliff m: my %h; my $a = "foo=1,bar=2"; for $a.split(/,/) { s/(<-[=]>+)'='(.+)/; %h{$0] = $1; }; %h.gist.say02:39
camelia rakudo-moar a643b8be1: OUTPUT: «=== SORRY!=== ␤Unrecognized regex metacharacter , (must be quoted to match literally)␤at <tmp>:1␤------> h; my $a = "foo=1,bar=2"; for $a.split(/ ,/) { s/(<-[=]>+)'='(.+)/; %h{$0] = $1; ␤Unable to parse expression in subscript; co…»02:39
Xliff m: my %h; my $a = "foo=1,bar=2"; for $a.split(/','/) { s/(<-[=]>+)'='(.+)/; %h{$0] = $1; }; %h.gist.say02:39
camelia rakudo-moar a643b8be1: OUTPUT: «=== SORRY!=== Error while compiling <tmp>␤Unable to parse expression in subscript; couldn't find final '}' (corresponding starter was at line 1)␤at <tmp>:1␤------> plit(/','/) { s/(<-[=]>+)'='(.+)/; %h{$0 ] = $1; }; %h.gist.say ␤ …»02:39
Xliff m: my %h; my $a = "foo=1,bar=2"; for $a.split(/','/) { s/(<-[=]>+)'='(.+)/; %h{$0} = $1; }; %h.gist.say02:39
camelia rakudo-moar a643b8be1: OUTPUT: «=== SORRY!=== Error while compiling <tmp>␤Malformed replacement part; couldn't find final /␤at <tmp>:1␤------> >+)'='(.+)/; %h{$0} = $1; }; %h.gist.say <EOL> ␤ expecting any of:␤ method arguments␤»02:39
Xliff m: my %h; my $a = "foo=1,bar=2"; for $a.split(/','/) { /(<-[=]>+)'='(.+)/; %h{$0} = $1; }; %h.gist.say02:40
camelia rakudo-moar a643b8be1: OUTPUT: «{bar => 「2」, foo => 「1」}␤»02:40
Xliff ^^02:40
m: my %h; my $a = "foo=1,bar=2"; for $a.split(/','/) { /(<-[=]>+)'='(.+)/; %h{$0} = $1.Str; }; %h.gist.say02:40
camelia rakudo-moar a643b8be1: OUTPUT: «{bar => 2, foo => 1}␤»02:40
cpan-p6 New module released to CPAN! Seq::Bounded (1.0) by DMAESTRO 02:40
Xliff m: my %h; my $a = "foo=1,bar=2,baz=3,name=Xliff"; for $a.split(/','/) { /(<-[=]>+)'='(.+)/; %h{$0} = $1.Str; }; %h.gist.say02:40
camelia rakudo-moar a643b8be1: OUTPUT: «{bar => 2, baz => 3, foo => 1, name => Xliff}␤»02:40
melezhik I'd prefer the way where one assing resulting array to hash, letting Perl6 to do the rest of the job02:40
Cabanossi joined02:40
Xliff melezhik: ?!?02:40
That is perl6 doing the job.02:41
melezhik not sure. does Perl6 forbid your to do like that02:42
m: my %h = ("foo", "1", "bar", "baz"); say %h.perl02:42
camelia rakudo-moar a643b8be1: OUTPUT: «{:bar("baz"), :foo("1")}␤»02:42
netrino joined02:43
melezhik Xliff, your solution works I see. Sorry I'm just a bit "picky" here ((=:02:43
Xliff :p02:43
melezhik or perfectionist, whatever you call it ((=;02:43
Xliff m: my %h; my $a = "foo=1,bar=2,baz=3,name=Xliff"; my %h = given for $a.split(/','/) { /(<-[=]>+)'='(.+)/; take $0; take $1.Str }; %h.gist.say02:44
camelia rakudo-moar a643b8be1: OUTPUT: «=== SORRY!=== ␤Word 'given' interpreted as a listop; please use 'do given' to introduce the statement control word␤at <tmp>:1␤------> ,bar=2,baz=3,name=Xliff"; my %h = given for $a.split(/','/) { /(<-[=]>+)'='(.+) ␤Unexpected bl…»02:44
Xliff m: my %h; my $a = "foo=1,bar=2,baz=3,name=Xliff"; my %h = do given for $a.split(/','/) { /(<-[=]>+)'='(.+)/; take $0; take $1.Str }; %h.gist.say02:44
camelia rakudo-moar a643b8be1: OUTPUT: «=== SORRY!=== ␤Undeclared routine:␤ for used at line 1␤␤Other potential difficulties:␤ Redeclaration of symbol '%h'␤ at <tmp>:1␤ ------> = "foo=1,bar=2,baz=3,name=Xliff"; my %h = do given for $a.split(/','/) { /…» 02:44
Xliff m: my %h; my $a = "foo=1,bar=2,baz=3,name=Xliff"; %h = do given for $a.split(/','/) { /(<-[=]>+)'='(.+)/; take $0; take $1.Str }; %h.gist.say02:44
camelia rakudo-moar a643b8be1: OUTPUT: «=== SORRY!=== Error while compiling <tmp>␤Undeclared routine:␤ for used at line 1␤␤»02:44
melezhik I just abit "obssesed" with the idea of coercing seqs to arrays02:44
it should be easy, huh?02:44
Xliff m: my %h; my $a = "foo=1,bar=2,baz=3,name=Xliff"; %h = do gather for $a.split(/','/) { /(<-[=]>+)'='(.+)/; take $0; take $1.Str }; %h.gist.say02:44
camelia rakudo-moar a643b8be1: OUTPUT: «{bar => 2, baz => 3, foo => 1, name => Xliff}␤»02:44
Xliff melezhik: ^^02:44
melezhik well, thanks, Xliff: let me find my the alternative, if any ... anyway thanks02:45
Xliff OK! Good luck!02:46
melezhik what about that Xliff: ?02:47
m: my $a = qq{foo@foo=1,j=1}; $a ~~ /"@" (\S+) $$/; my %h = "$0".split(",").map({ $_.split("=") }).flat.flat; say %h.perl02:47
camelia rakudo-moar a643b8be1: OUTPUT: «{:foo("1"), :j("1")}␤»02:47
melezhik flat.flat ... ha-ha ((=;02:48
Xliff Looks good.02:48
melezhik m: my $a = qq{foo@foo=1,j=1}; $a ~~ /"@" (\S+) $$/; my %h = "$0".split(",").map({ $_.split("=").flat }).flat; say %h.perl02:48
camelia rakudo-moar a643b8be1: OUTPUT: «{:foo("1"), :j("1")}␤»02:48
melezhik so for evert split, you just a flat02:49
so for evert split, you just add a flat02:49
Xliff Yep.02:49
melezhik anyway, thanks for help ((=; Perl6 community is always so friendly ((=;02:49
Xliff yw02:52
elcaro m: my $a = qq{foo@foo=1,j=1}; my %h = $a.substr($a.index('@')+1).split(',').map(|*.split: '='); say %h.perl;02:52
camelia rakudo-moar a643b8be1: OUTPUT: «{:foo("1"), :j("1")}␤»02:52
melezhik left02:54
elcaro actually..y02:57
m: my $a = qq{foo@foo=1,j=1}; my %h = $a.substr($a.index('@')+1).split(/<[,=]>/); say %h.perl;02:57
camelia rakudo-moar a643b8be1: OUTPUT: «{:foo("1"), :j("1")}␤»02:57
gregf_ left03:01
netrino left03:16
netrino joined03:22
Cabanossi left03:24
Cabanossi joined03:36
DarthGandalf left03:37
DarthGandalf joined03:40
netrino left03:54
netrino joined04:01
holyghost I've put docs in Game::QFG, version 0.1.904:08
cpan-p6 New module released to CPAN! Game::QFG (0.1.9) by HOLYGHOST 04:13
squashable6 left04:13
squashable6 joined04:16
holyghost stupid bot04:16
anyway, I'm going to the bar in a few hours, to get a coffee04:19
It's 6:20 am here04:20
I hope I can cope with the rule-based system in Game::QFG, I need to search for AI and learning and so on04:21
The meaning is to have rules for NPCs characters and features04:22
NPC == Non Player Character04:22
The storyline should also be rule based04:22
A semi-random story is e.g. in nethack04:23
Ven`````` joined04:23
qiqi left04:26
Ven````` left04:26
kaare__ left04:26
qiqi joined04:27
kaare__ joined04:27
aborazmeh left04:33
netrino left04:34
netrino joined04:40
curan joined04:42
qiqi left04:56
nadim left05:05
satori__ joined05:08
reach_satori_ left05:08
netrino left05:13
nadim joined05:13
nadim_ joined05:15
nadim left05:18
netrino joined05:19
sauvin joined05:21
qiqi joined05:25
hfjvjffju left05:27
PavelB left05:28
pnu__ left05:30
PavelB joined05:34
pnu__ joined05:34
hfjvjffju joined05:34
molaf left05:43
jeromelanteri joined05:48
netrino left05:52
nadim_ left05:55
netrino joined05:58
qiqi left05:59
domidumont joined05:59
nadim_ joined06:01
qiqi joined06:05
jmerelo joined06:06
qiqi left06:25
jmerelo releasable6: status06:28
yoleaux 20 May 2019 18:26Z <sena_kun> jmerelo: hi! please, ping me whenever you'll be comfortable06:28
20 May 2019 19:44Z <sena_kun> jmerelo: sorry, never mind me.06:28
releasable6 jmerelo, Next release in ≈29 days and ≈12 hours. 1 blocker. 140 out of 422 commits logged (⚠ 2 warnings)06:28
jmerelo, Details: https://gist.github.com/334b346e9bc1b4eaee9c046380cb672706:28
jmerelo .tell sena_kun I'm back06:28
yoleaux jmerelo: I'll pass your message to sena_kun.06:28
jmerelo squashable6: status06:28
squashable6 jmerelo, Next SQUASHathon in 8 days and ≈21 hours (2019-06-01 UTC-14⌁UTC+20). See https://github.com/rakudo/rakudo/wiki/Monthly-Bug-Squash-Day06:28
netrino left06:30
mowcat joined06:33
netrino joined06:36
antoniogamiz joined06:38
netrino_ joined06:39
netrino left06:41
adu left06:48
Geth ¦ doc/master: 4 commits pushed by (JJ Merelo)++06:51
¦ doc/master: 7dcb271d50 | Minor corrections and deindent 06:51
¦ doc/master: dc6a3882e5 | Moves EVAL from Cool, refs #2822 06:51
¦ doc/master: 94ff45fe20 | A bunch of other routines moved to the independent routines page 06:51
¦ doc/master: 649b9e9c73 | Moves EVAL as method back to Cool 06:51
¦ doc/master: review: https://github.com/perl6/doc/compare/a795b55476b7...649b9e9c73de06:51
satori__ left06:51
qiqi joined06:58
abraxxa joined06:58
El_Che morning07:01
jmerelo El_Che: Morning!07:01
holyghost gm07:04
ChoHag joined07:04
Sgeo__ joined07:05
antoniogamiz o/07:07
Sgeo_ left07:08
kurahaupo left07:24
kurahaupo joined07:24
xiaoyafeng left07:29
satori__ joined07:30
Ven`````` left07:30
xiaoyafeng joined07:31
qiqi left07:31
Sgeo_ joined07:31
ufobat__ left07:34
Sgeo__ left07:35
Sgeo_ left07:38
Sgeo_ joined07:38
rindolf joined07:41
ijneb left07:44
netrino_ left07:50
qiqi joined07:51
robertle joined07:52
antoniogamiz cd ..07:53
ups07:53
jmerelo antoniogamiz: :-)07:53
rindolf left07:53
zakharyas joined08:03
qiqi left08:10
dakkar joined08:12
chee i notice node.js's http library can listen on a unix socket, does anyone know if there's any such module for perl 6?08:17
jmerelo chee: you mean, as part of the standard library?08:17
tadzik Cro::HTTP is the cool thing these days and it can be an HTTP server08:18
qiqi joined08:18
jmerelo chee: there are many HTTP-listening modules in Perl 6, including, as tadzik says, Cro::HTTP08:18
holyghost a search for sockets and networking should get you to the docs of it08:19
netrino_ joined08:19
holyghost There's a CATCH based client-server system somewhere in the perl6 docs08:19
Kaiepi left08:20
chee jmerelo: i did check cro, but the only mention i saw of sockets was about websockets08:21
DarthGandalf left08:21
chee sorry, that was meant for holyghost08:21
or everyone really08:21
tadzik chee: http://doc.perl6.org/type/IO::Socket::INET those are the regular sockets08:22
that's just raw TCP thoughu :)08:22
holyghost chee : it's not cro, what I meant, but tadzik's link should help out08:22
use IO::Socket; etc08:23
chee yeah ^.^, i'm wondering if there's an http module that will listen on an IO::Socket rather than an ip and port08:23
oh08:23
http://doc.perl6.org/type/IO::Socket::Async08:23
sorry, i was unclear earlier. i meant a socket file08:24
holyghost in C, fileno(int socket) you mean ?08:24
*lol* I mean socket, int fileno(FILE *)08:25
tadzik ooh, a unix socket, I missed that earlier in a conversatino08:27
sorry, everything I said was wrong then :P08:27
I don't think there's anything for that, except for using NativeCall or maybe Inline::Perl508:28
chee ahh, okay. is there no unix domain socket support at all in p6?08:31
tadzik not that I know of, no :(08:31
on the plus side, you're in a prime position to make history by implementing it ;)08:32
Kaiepi joined08:32
chee :D08:35
tadzik (been there done that :P)08:36
DarthGandalf joined08:37
antoniogamiz left08:41
Kaiepi left08:42
antoniogamiz joined08:42
Kaiepi joined08:42
Kaiepi left08:45
Kaiepi joined08:48
rindolf joined08:49
satori__ left08:53
satori__ joined08:53
netrino_ left08:53
netrino_ joined08:56
antoniogamiz left08:58
antoniogamiz joined08:59
tobs ++Kaiepi had unix socket support on their agenda last time I asked09:10
Kaiepi i still do09:11
yoleaux 21 May 2019 21:10Z <lizmat> Kaiepi: my latest version of the feed processor: https://gist.github.com/lizmat/cecd280112920719f87cb5c9a8fe0ee709:11
21 May 2019 21:11Z <lizmat> Kaiepi: I think that combines the best of both worlds, please let me know if you need more info to integrate09:11
Kaiepi it's the last thing i'm doing as part of my grant work though09:12
i'll get started on it after i'm done with feed operators and after v6.e.PREVIEW is implemented since the first few things i need to do depend on it09:12
tobs godspeed!09:14
Sgeo_ left09:17
Sgeo_ joined09:17
Sgeo__ joined09:19
antoniogamiz left09:21
Sgeo_ left09:23
Kaiepi .tell lizmat your code looks pretty straightforward but what's the purpose of $!low-mark and $!high-mark?09:28
yoleaux Kaiepi: I'll pass your message to lizmat.09:28
lizmat high-mark is an indication of the maximum number of values that will be buffered09:29
yoleaux 09:28Z <Kaiepi> lizmat: your code looks pretty straightforward but what's the purpose of $!low-mark and $!high-mark?09:29
netrino_ left09:29
lizmat and low-mark is the number of elements in the buffer at which it will start filling again09:30
the values are pretty arbitrary at the moment09:30
it possibly makes sense to increase the high-mark to 100009:31
to avoid small size lists to avoid the parallelization overhead09:32
Kaiepi why are they needed?09:32
lizmat well.. the high-mark tries to adapt itself to an optimum size09:33
if the load on the mapping is too low, it will raise the high-mark09:34
if the load is too high, it will decrease the high-mark09:35
netrino_ joined09:35
lizmat Kaiepi: in an earlier version, I found that the reader would be reading values faster from the buffer than the writer could add them09:39
so that's why the initial buffer filling09:39
Kaiepi ahhh09:41
ok09:41
would using something like a semaphore work?09:45
jnthn I think what we really miss is a way to make a Channel have a bound09:48
mowcat left09:48
jnthn So that pushing something into it can also block09:48
Kaiepi in go you can create channels with a buffer length09:53
if the number of values on the queue is equal to the buffer length, pushing blocks09:53
jnthn Yes, same in Java, C09:55
*C#, etc.09:55
Something for us to have too, just nobody got around to it yet :)09:55
Well, they did, but in the ecosystem... :)09:55
And less efficiently than if we just support it "natively"09:55
Kaiepi lizmat, there's one problem with your implementation10:02
it assumes $source is a list of some sort when that's not always the case as used in the ecosystem10:03
m: sub base36(Int $num --> Str) { $num.base: 36 }; say do { 35 ==> base36() }10:04
camelia rakudo-moar a643b8be1: OUTPUT: «Z␤»10:04
domidumont left10:04
Kaiepi maybe PROCESS-FEED would need to be a multi sub to handle those cases if we should keep that behaviour10:05
jeromelanteri left10:07
DarthGandalf left10:21
satori__ left10:44
DarthGandalf joined10:52
kensanata joined10:54
sena_kun joined11:00
chee Kaiepi: oh this is great news, re: unix domain sockets11:01
lizmat Kaiepi: what are the cases where the source is not something that can provide an iterator?11:03
Kaiepi: but indeed, making it a multi should cover that case11:04
qiqi left11:07
xiaoyafeng left11:12
gregf_ joined11:13
DarthGandalf left11:14
DarthGandalf joined11:32
DarthGandalf left11:42
netrino_ left11:46
netrino_ joined11:48
sdoo joined12:09
zakharyas left12:14
timotimo http://wakelift.de/p/f9314876-3251-461f-b676-6020b3cc656b/ - i would appreciate proofreading <312:17
netrino_ left12:22
jeromelanteri joined12:26
netrino_ joined12:27
sdoo left12:30
sdoo joined12:31
masak timotimo: nice!12:38
I skimmed it -- didn't find any nits to pick12:38
timotimo yay12:39
cpan-p6 New module released to CPAN! Seq::Bounded (1.0.1) by DMAESTRO 12:40
sena_kun timotimo, ignore me right now, but shouldn't it be "An obligatory photo..."?12:41
yoleaux 06:28Z <jmerelo> sena_kun: I'm back12:41
timotimo sena_kun: maybe "The"?12:43
sena_kun ah, yes, or this one12:43
sena_kun tries to be better with articles, but has a long way ahead12:44
jast I would keep it as it is12:46
to keep with the standard form of the "obligatory X" meme12:47
timotimo put in some extra stuff at the end12:48
mowcat joined12:49
jast "The request was actually just to allow configuring only [...]" is a bit of a bumpy read12:50
same paragraph: "complicated" has a negative connotation, maybe "detailed" or "in-depth"12:51
timotimo refresh for different colors at the end12:51
jast "While deciding upon what exactly I should build" - not a complete sentence12:52
timotimo refresh, i reworded it12:52
ah, yes12:52
jast yeah, I like that better now12:52
timotimo have a look at the new start of that paragraph12:53
jast yeah, nice12:54
structural thing: after the first example program, you describe frame vs sf. this is a little hard to follow because at that point you have seen sf but not frame in the example, yet you talk about frame first. if the syntax/meaning allows for it, I'd include both frame and sf in the example somehow, so that you can see both in action, making it easier to understand an explanation of how the two relate12:55
timotimo sadly, frame can't go in this example12:55
jast yeah, I had an inkling that it might not12:56
you could either make it two examples, or skip over explaining 'frame' here and just focus on what 'static' means in this context12:56
I mean, once I finish reading the paragraph I understand it all, but in the middle I'm a bit "???"12:57
or you could explain the 'entry' line first, giving more context about this, before explaining frame vs sf12:58
timotimo that's valuable input, i'll see if i can reword it12:58
the thing with putting entry first that made me want to put it at the end instead is the big list of possible entry points i have below12:58
jast which would make it mostly about re-ordering a few paragraphs12:58
netrino_ left13:00
timotimo something's wrong with the font in the examples at the bottom13:00
things just don't line up ...13:00
jast how about something roughly like this... the 'entry' decides which stage of profiling the program is applied to. in this case, the 'profiler_static' means we're seeing a routine for the first time, before we enter any specific frame, so [...]. [...] these are the other types of entry points:13:00
veesh left13:01
timotimo perhaps the font it's using is missing a few of the glyphs and is falling back to another one for those13:01
veesh joined13:01
timotimo yeah i like that suggestion13:01
I'll give it a try after i defeat the font rendering at the bottom13:02
jast font woes, sounds like fun13:02
timotimo haha, when i set the font-family to "serif" the lines line up just fine13:02
it just looks totally out-of-place13:02
same for -webkit-pictograph, which wouldn't be cross-browser anyway13:03
mowcat left13:04
netrino_ joined13:06
jast aside on eBPF for socket routing - the main use case I'm thinking of is virtual networks (but it's not something I've really looked into)13:07
sdoo left13:07
jast rest of the post looks good to me, and it's an interesting read, too13:09
timotimo TYVM13:10
with virtual networks you mean vlan?13:10
jast I was thinking communication between virtual machines13:10
timotimo ah13:11
jast btw I would consider a different title maybe - it's a little vague right now13:11
potentially this might become very flexible, but for now it's about profiling for the most part, I guess...13:11
timotimo true, i just wanted to have a pun on the cat picture13:12
"a close look at" would be another possibility13:12
jast that pun went right over my head ;P13:12
pamplemousse joined13:13
jast either way "MoarVM features" doesn't really say much13:13
timotimo true13:13
"allowing close control over"?13:14
jast right now it's all about the profiler, isn't it?13:14
timotimo true13:14
jast A close look at controlling the MoarVM profiler13:15
timotimo that should work13:15
pamplemousse left13:20
timotimo refresh please, i rewrote it using mostly your suggested text13:21
pamplemousse joined13:22
jast okay, now you're explaining 'entry' twice, which is maybe not entirely necessary - but other than that, thumbs up )13:29
(I'm fairly picky btw :P)13:29
cpan-p6 left13:29
lizmat jast++13:29
timotimo ah, of course, the line before the list and perhaps the first entry in the list want change, too13:30
cpan-p6 joined13:30
cpan-p6 left13:30
cpan-p6 joined13:30
timotimo how's this?13:31
also, i'm grateful for your pickyness :)13:31
also, i'm not sure how to progress with the terminal output at the bottom >_<13:32
skids joined13:32
lizmat looks good to me now13:34
vrurg joined13:34
aborazmeh joined13:35
aborazmeh left13:35
aborazmeh joined13:35
timotimo yes! i found a font that works13:35
now my font-family is Consolas, Monaco, Monospace13:35
lizmat even better13:35
wish I could DDT to work on my Mac: I can't get the Terminal::Print dependency to install :-(13:35
timotimo oh damn. but perhaps it'd be enough to just add whatever TERM you have to the whitelist13:36
lizmat did that, didn't solve the problem13:36
timotimo damnit13:36
wanna try figuring it out together?13:37
lizmat sure13:37
I got a checkout of Terminal::Print locally13:37
perl6 lib/Terminal/Print/Commands.pm613:37
timotimo when i run that i get a bunch of messages from 'tput: unknown terminal "xterm-kitty"' and the same for "rxvt-unicode-256color"13:38
lizmat gives me a long list of: https://gist.github.com/lizmat/a966bc3b1de1639a0df28b215359f3f713:38
indeed13:38
$ perl6 lib/Terminal/Print.pm613:39
===SORRY!===13:39
Please update @valid-terminals with your desired TERM ('xterm-color', is it?) and submit a PR if it works13:39
set | grep TERM13:39
TERM=xterm-color13:39
timotimo OK, when i add that it gives the exact same output, so it seems to find xterm-color just fine on my machine as well13:40
lizmat added that to @valid-terminals13:40
and get the ===SORRY!=== again on running lib/Terminal/Print.pm613:41
timotimo cleared all precomps just in case?13:41
robertle left13:42
curan left13:42
lizmat when I run it as "perl6 lib/Terminal/Print.pm6" there is no precomp involved ??13:42
timotimo do you have a -I or something? perhaps it's using a precomp in an unexpected location, or something installed to the system13:43
lizmat nope, no -I13:43
timotimo well it has to find the other module somehow, right?13:43
molaf joined13:43
lizmat ok, turns out all of the "unknown terminal" crap was just a smoke screen13:45
robertle joined13:45
lizmat zef install . --force-install fails with: Tried to use an undefined capability 'civis' of the terminal type 'xterm-color'13:45
timotimo that's a lot more interesting already13:46
civis makes the cursor invisible, cnorm makes the cursor normal13:46
xiaoyafeng joined13:46
lizmat zef install . --force-install --/test did the trick (so far)13:47
timotimo there's also ve and vi13:47
if i understand correctly, ve is the same as cnorm and vi is the same as civis13:47
this document i have here says that BSD follows the ve and vi conventions13:47
which ... apple something something BSD something something darwin kernel something something13:48
lizmat got it installed now,, timotimo++ for nudging me :-)13:49
pamplemousse left13:51
nadim_ left13:51
pamplemousse joined13:51
timotimo did you change civis and cnorm to the other thing?13:52
lizmat doesn't like ve as a synonum for civis13:53
Tried to use an undefined capability 've' of the terminal type 'xterm-color'13:54
abraxxa left13:54
abraxxa joined13:54
timotimo odd13:56
so what does that terminal use to switch between invisible cursor, normal cursor, and block cursor?13:56
sdoo joined13:57
lizmat I have no idea...13:57
vrurg Here is output from infocap for xterm-256color:14:01
yoleaux 21 May 2019 20:05Z <timotimo> vrurg: passing things it doesn't know about, Configure.pl just stays silent - we had --optimize=0 debug=3 in moarvm's Configure.pl and had a hard time figuring out why breakpoints weren't working/showing up in gdb; anything you can do?14:01
vrurg bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, civis=\E[?25l,14:02
clear=\E[H\E[2J, cnorm=\E[?12l\E[?25h, cr=\r,14:02
Xliff \o14:02
Did anyone get my messages about moar-master not compiling properly?14:02
vrurg I see civis and cnorm.14:02
Xliff https://colabti.org/irclogger/irclogger_log/perl6?date=2019-05-22#l3414:03
lizmat look for "submodule update" in the log14:03
aindilis left14:03
Xliff https://colabti.org/irclogger/irclogger_log/perl6?date=2019-05-22#l4314:04
lizmat: I ended up having to switch to moar-blead for the time being.14:04
lizmat how is that different from master ?14:05
dakkar left14:05
Xliff Don't know. I just know that master kept dying when I tried to build it, and moar-blead went through clean.14:06
netrino_ left14:06
lizmat sounds weird :-)14:06
vrurg timotimo: did you pass --optimize and --debug=3 to rakudo's Configure.pl? It's not clear to me what happened and how it was expected to be.14:06
Xliff lizmat: Yes. Yes it does.14:06
dakkar joined14:07
netrino_ joined14:08
vrurg Xliff: best is to try re-cloning from scratch, if you can. Sometimes things go out of sync. I sometimes just delete nqp directory and re-configure.14:10
timotimo vrurg: we passed "--optimize debug=3" and we didn't get debugging, but we also didn't get a warning or an error14:10
Xliff vrurg++: Thanks. I will see about that.14:10
vrurg timotimo: My rakudo Configure.pl complains about unknown option optimize. Would it be possible for you to open a ticket?14:13
I'll be away for a while and it seems like more information would be needed for me to follow.14:14
timotimo it's the moarvm configure that gets it14:14
OK14:14
vrurg timotimo: Oh, I did nothing to MoarVM build.14:15
timotimo oh, i see!14:16
sorry about the noise, then :)14:16
aindilis joined14:17
vrurg NP. I'm not even sure if it makes sense to re-do moar's build.14:18
kawaii deployed our first production perl 6 app at $dayjob today :)14:23
moritz kawaii: that's awesome. What does it?14:25
nadim_ joined14:27
kawaii moritz: https://gist.githubusercontent.com/kawaii/1a46b3dc6913fc0286a046e7f4f07714/raw/d2f6ea2bfe3e0b10bee1c3b3620d7f1c953e07eb/ws-display.p614:27
so, it's quite hacky, but we have a client who has a point-of-sale system, and when they scan a barcode their application sends a full HTML payload to a second screen that the customer sees (showing price, item photo etc), we needed a small listener app to basically rebuild the DOM with each new payload14:27
tadzik cute :)14:28
or should I say: kawaii? ;)14:29
xiaoyafeng left14:29
kawaii ;)14:29
moritz kawaii: very nice14:32
kawaii nice is probably not the right word, a simple hack but it works very well :)14:32
DarthGandalf joined14:32
cpup left14:35
cpup joined14:35
robertle left14:36
moritz "works very well" and "simple" together meets my definition of "nice", even if it's not very elegant14:37
nadim_ left14:39
satori__ joined14:40
netrino_ left14:41
timotimo lol i blogged: https://wakelift.de/2019/05/22/close-look-at-controlling-moarvm-profiler/14:41
tadzik lol!14:42
feldspath joined14:44
lizmat weekly: https://wakelift.de/2019/05/22/close-look-at-controlling-moarvm-profiler/14:46
notable6 lizmat, Noted!14:46
netrino_ joined14:47
jast timotimo: the good news is you got my seal of approval now for the post :P14:48
pamplemousse left14:48
timotimo is there an image i can embed for that? :)14:49
zakharyas joined14:50
pamplemousse joined14:51
sena_kun left14:52
nadim_ joined14:55
kurahaupo left14:58
sdoo left14:58
kurahaupo joined14:59
kurahaupo left14:59
kurahaupo joined14:59
aborazmeh left15:11
jeromelanteri left15:14
nadim_ hi, is it possible to get more info when one gets messages like "Cannot find method 'ann' on object of type NQPMu", a file and line?15:15
jmerelo nadim_ there's a DEBUG environment variable you can use. It might be a bit too verbose.15:16
timotimo huh? i haven't heard of that15:17
nadim_ hehe!15:17
just DEBUG=1 perl6 ...?15:17
timotimo usually --ll-exception can get you a bit further, but that only works if you already get a stack trace, but it's too short15:17
nadim_ that's what I got, nothing more15:17
jmerelo nadim_: but that's an error that's deep down in NQP so it's better if you post the whole thing here or in StackOverflow... Or both15:18
timotimo: export RAKUDO_MODULE_DEBUG=115:18
timotimo: it's for compilation but it could still be useful here15:19
lizmat .ann points at something gone wrong in a grammar (there's a lot of \.ann() in src/Perl615:19
)15:19
timotimo try --stagestats to see if it happens in, for example, the optimizer15:19
nadim_ dumping a CallFrame has been challenging, between the Uninstantiable found it and that. not that15:20
lizmat so it looks like something did not get initialized, and then it gets annotated, and then boom15:20
nadim_ hmm, let me try to reproduce it, I was trying to make it go so far15:20
timotimo nadim_: maybe you already saw, but i gave ddt a shout-out in my latest blog post :)15:22
sdoo joined15:24
nadim_ here's the code that generates the error and the code that doesn't. https://nopaste.linux-dev.org/?120218315:27
timotimo: cool! url?15:27
timotimo https://wakelift.de/2019/05/22/close-look-at-controlling-moarvm-profiler/15:31
get_attributes just calls get_attributes and that's not part of the paste :(15:32
well, not "just"15:32
but, you know15:32
AlexDaniel left15:32
nadim_ output when run with RAKUDO_MODULE_DEBUG=1 https://nopaste.linux-dev.org/?120218415:35
netrino_ left15:35
robertle joined15:37
nadim_ timotimo: https://github.com/nkh/P6-Data-Dump-Tree/blob/68cd52eb53738bf0885f8b574d4d0b502760ef5e/lib/Data/Dump/Tree.pm#L80515:38
that's the previous version but get_attributes is the same. unfortunatelly the old version will not dump a CallFrame, it breaks before it gets there. if if it is of interest I can make a branch but changing the code removed the error so I don't thnk it's in get_attributes15:40
jmerelo nadim_: well, the last line is helpful...15:40
nadim_ which one?15:40
Ven`` joined15:40
Ven`` \o15:40
netrino_ joined15:41
jmerelo nadim_: line #91 in the pastebin. But I was actually kidding. It might have some info, but it's hidden in so much stuff that's it's difficult to say.15:41
nadim_ I kinda guessed you were joking ;)15:42
Sgeo__ left15:44
Sgeo__ joined15:45
nadim_ timotimo: /me bows down ...15:45
jmerelo nadim_: that's so weird... timotimo found the solution?15:47
timotimo what?15:47
i don't think i did anything?15:47
i was just about to say i don't see anything obvious, and that i would splatter the code with debug prints, maybe a call to DUMP or two15:47
Ven`` we'll bow to you anyway15:47
nadim_ haha, jmerelo, no, I thanked for the thanks in the blog entry15:47
timotimo thanks for the thanks for the thanks15:47
jmerelo bows too15:49
jmerelo anyway15:49
nadim_: as timotimo says, get_attributes is calling a get_attributes sub?15:49
nadim_ yes15:49
jmerelo nadim_: which is right below...15:49
and there's another _get_attributes... There are a bit too many *get_attributes*...15:50
I don't see anything that might cause the error, which is probably a bug anyway.15:51
um, you're defining @a and using it withing a try statement...15:51
Can you define @a in 807 and then assign it a value in the next one?15:52
@a is not exactly defined when you try and use it, I think...15:52
timotimo true, that's a little bit odd15:53
but the assignment should return the assigned value, so it *should* be fine15:53
jmerelo timotimo: but you can simply use some other variable. Or none. the try block should return its last value, right?15:54
timotimo: so simply eliminate @a = inside the try statement15:54
nadim_ yes, I probably needed it as a sub somewhere (my guess is filter, you want power you have to pay for it). and it got complex when I started supporting NativeCall, etc ... http://blogs.perl.org/users/nadim_khemir/2017/08/take-a-walk-on-the-c-side.html15:54
pamplemousse left15:55
jmerelo m: my @a = try { my @a = 3,7 }15:55
camelia rakudo-moar a643b8be1: ( no output )15:55
jmerelo m: my @a = try { my @a = 3,7 }; say @a15:55
camelia rakudo-moar a643b8be1: OUTPUT: «[3 7]␤»15:55
jmerelo No, that's not it...15:55
pamplemousse joined15:56
jmerelo m: my @a = try { @a = 3,7 }; say @a15:56
camelia rakudo-moar a643b8be1: OUTPUT: «[3 7]␤»15:56
jmerelo m: my @a = try { 3,7 }; say @a15:56
camelia rakudo-moar a643b8be1: OUTPUT: «[3 7]␤»15:56
nadim_ jmerelo: yes it looks like the <2a in the try is not necessary15:57
Ven`` left15:59
nadim_ Mehhhhh! now nothing works anymore, I need to learn to commit faster!16:00
jmerelo m: say (('DDT exception', ': ', "message"),)16:09
camelia rakudo-moar a643b8be1: OUTPUT: «((DDT exception : message))␤»16:09
jmerelo nadim_: is that kind of thing what you want? A list inside a list?16:10
robertle left16:10
jmerelo nadim_: also, why don't you raise an exception if it's an exception? It might be better than detect some particularly formatted thing16:10
pamplemousse left16:11
pamplemousse joined16:11
TreyHarris Is there an at all well-known interlingual for programs that are run in "cmd [GLOBAL_OPTS] subcommand [SUBCOMMAND_OPTS] [args...]" style, like git, docker, etc.? In Perl I think they're most commonly called "App::Cmd-style", but that's obviously not an interlingual term16:13
netrino_ left16:13
TreyHarris I've heard "command suite", but I don't think that's common enough--it's certainly not distinctive enough to search on it. I'm hoping there's a term such that, if I were using a new language whose ecosystem I'm not that familiar with, how I'd find if there were utilities for this CLI style, and what they are16:15
netrino_ joined16:20
nadim_ jmerelo: yes a list inside a list, it gets rendered as an element in the dump16:20
jmerelo: the last thing I want when debugging something is the debug tool raising an exception it can't handle16:20
abraxxa left16:21
nadim_ jmerelo: and since it's just display I believe it is abetter way to handle it. otherwise you get nothing at all, this way you get a partial dump16:21
abraxxa joined16:21
jmerelo nadim_: OK :-)16:21
TreyHarris seems like "subcommand" is the word that frequently turns up what I'm looking for, but by no means 100% (it doesn't Google up the results I'd like to see in Perl 5 or 6, for instance, though it does turn up on-point results that might through concatenation get me what I want)16:22
kawaii has there been much thought to type safety in perl 6?16:23
nadim_ TreyHarris: No name I know of, I once wrote a module to handle this kind of interface, handling commands written indifferent languages, a wrapper of sort, I ended with App::Chained because I couldn't find a better name.16:24
jmerelo kawaii: as in?16:24
nadim_ TreyHarris: with this description: Front end to sub applications in a Svn/Git fashion16:25
TreyHarris nadim_: *nod*16:26
kensanata left16:30
pamplemousse left16:30
dakkar left16:35
TreyHarris I was looking at the various packages ecosystem knows about and I was thinking--shouldn't it be possible with the new(ish) &ARGS-TO-CAPTURE to create a suite such that bin/foo is the executable calling Foo::&MAIN, and then dispatching commands like `bin/foo bar` to Foo::Bar::&MAIN, such that you leave the Perl 6 built-in opt handling basically intact? Just, given the cmdline `foo {@global_opts} $subcmd16:37
{@subcmd_opts} {@args}`, before Foo::&MAIN, strip out everything after @global_opts and hang on to it, then run Foo::&MAIN and gather its arguments in a dynamic variable, then do some housekeeping (like, if you used a "terminal" global option, like `--help` or `-V`, _and_ there was anything left squirreled away, fail with USAGE) and replace the @*ARGS with ($subcmd, @subcmd_opts), then call Foo::Bar::&MAIN and16:37
let it handle its arguments normally, too?16:37
jmerelo TreyHarris: zef uses multiple dispatch for its subcommands, with the subcommand as first argument to MAIN. It's not possible to distinguish between flags for command and for subcommand, anyway16:38
TreyHarris (of course, in practice, you'd probably want some intervening namespace, like Foo::Commands::Bar, etc., but that's trivial.)16:38
nadim_ you want to be abble to displatch to external programs too, git allows you to add your own commands, sleek16:40
TreyHarris jmerelo: Hmmm, yes, efficiently you may be right... but looking at &ARGS_TO_CAPTURE, I can see one way to do it: gather up all the known subcommands. Going right to left, look for a known subcommand. Grab the arguments beginning with that subcommand all the way to the right, squirrel them away, and try calling the top-level MAIN. If it fails, see if there's a known subcommand further left in the CLI, prepend16:42
those args to the ones you squirreled away, and try calling MAIN again. If you never get a successful call, die with USAGE. But if you get a successful call, then you know the squirreled arguments are ones to the subcommand that occupies the head of the remaining args16:42
domidumont joined16:43
zakharyas left16:44
TreyHarris nadim_: Putting aside jmerelo's good critique, there's a way: use environment variables for the global options, and if no subcommands match, call an external "main-subcommand" and see if it works. That's how git does it. Marrying that with the solution I just proposed seems difficult, though.16:44
If you specify that the top-level MAIN can't have freeform arguments (it necessarily has no position arguments), only constrained ones, you can do the dispatching more efficiently because there will never be a case where it's ambiguous whether an argument whose value is a string exactly matching a subcommand name is a subcommand or an argument to some prior subcommand or flag16:47
hrm, without monkey-patching augmenting, you can't do this in an importable package, though, can you? b/c the module has to mess with the commands' packages' namespaces16:55
it will always be the case that a single use of augmentation anywhere in a program will have a performance hit on the entire program, right?16:56
netrino_ left17:00
sdoo left17:03
netrino_ joined17:04
nadim_ timotimo: you know that when you have a very long dump you can get a folding UI in terminal, right? or generate ahtmlthat does folding too. Both are a bit primitive (I don't likedoing UI stuff much) but can help if you have a long output17:06
sena_kun joined17:07
AlexDaniel joined17:09
johnjohn101 joined17:14
vrurg left17:16
sdoo joined17:24
domidumont left17:28
ravenous_ joined17:30
ravenous_ left17:31
ravenous_ joined17:32
zakharyas joined17:37
vrurg joined17:40
rindolf left17:44
pecastro joined17:45
domidumont joined17:48
robertle joined17:48
ravenous_ left17:50
japhb left17:53
rindolf joined17:53
netrino_ left17:53
domidumont left17:54
netrino_ joined17:58
japhb joined17:59
espadrine_ joined18:03
sdoo left18:08
holyghost left18:13
sauvin left18:32
netrino_ left18:35
netrino_ joined18:36
molaf left18:41
kurahaupo left18:46
kurahaupo joined18:47
jmerelo left18:49
ugexe you can only setup mainline once, so having multiple files with parts of the MAIN will not work18:53
all MAINs must be in the same file18:53
you can still call Foo::MAIN, you just don't get &MAIN, nor the USAGE to show the stuff for Foo::MAIN (if it wasnt the first MAIN loaded)18:56
otherwise `bin/zef` would just be `require "bin/zef-fetch"; require "bin/zef-test"; ...`, where each command goes into its own bin/zef-command file18:57
(oversimplifying a bit, but still)18:57
ravenous_ joined19:02
timotimo hm, but can't you "use" multi candidates of the same name together to form your scope?19:02
ugexe not mainline19:03
mainline is setup once (the first time)19:03
timotimo oh, huh19:03
i didn't read the discussion that came before this, sorry19:03
dogbert17 .seen tadzik19:07
yoleaux I saw tadzik 14:42Z in #perl6: <tadzik> lol!19:07
tadzik dogbert17: hi :)19:08
dogbert17 hi tadzik, can I ask a question wrt rakudobrew?19:09
when trying to nuke an installed p6 version I get: Undefined subroutine &Rakudobrew::Build::match_and_run called at /home/dogbert/.rakudobrew/bin/../lib/Rakudobrew/Build.pm line 13219:09
tadzik dogbert17: shoot19:09
dogbert17 already asked :)19:10
tadzik :)19:10
hm19:10
sounds like a bug in v219:10
dogbert17 yeah; i'm using the new version19:10
tadzik I guess go ahead and open a bug :)19:11
I'm not very active in it these days, but patzim is on fire :)19:11
dogbert17 consider it done, thanks for your time :)19:11
I like rakudobrew, I find it very useful19:12
molaf joined19:16
zakharyas left19:34
hythm_ joined19:39
hythm_ m: my @a; my %h; %h<a> = @a; say %h<a>.perl; should not the out put be `[]` instead of `$[]` ?19:41
camelia rakudo-moar a643b8be1: OUTPUT: «=== SORRY!=== Error while compiling <tmp>␤Bogus term␤at <tmp>:1␤------> y %h<a>.perl; should not the out put be `[]` instead of `$[]` ? ␤ expecting any of:␤ argument list␤ infix␤ infix stopper␤ …»19:41
hythm_ m: my @a; my %h; %h<a> = @a; say %h<a>.perl; # should not the out put be `[]` instead of `$[]` ?19:42
camelia rakudo-moar a643b8be1: OUTPUT: «$[]␤»19:42
ugexe m: my @a; my %h; %h<a> = @a; say %h<a>.gist;19:42
camelia rakudo-moar a643b8be1: OUTPUT: «[]␤»19:42
hythm_ m: my @a = 1, 2; my %h; %h<a> = @a; say %h<a>.elems19:46
camelia rakudo-moar a643b8be1: OUTPUT: «2␤»19:46
hythm_ aah, i was thinking $[] in .perl means array is itemized19:47
oftl_ left19:59
xinming Anyone here has hints on what is the best way to share data with python with json?20:00
I'm thinking to write a socket server, and let python to connect, But I'm not sure wether this is the best way to do.20:01
I wrote a small bot with perl6, and I wish to write a query infos from the bot in perl6, exchange data with python.20:02
ugexe you could also use a MQ20:02
xinming rabbit mq?20:02
ugexe i imagine any of them will do20:02
lizmat is Inline::Python not an option ?20:02
xinming ugexe: Thanks for the hint.20:02
lizmat: No, Since there will be a big framework using python.20:03
lizmat too bad :-)20:03
xinming I'll write a small plugin in python, to let python to query the data from perl6.20:04
tobs hythm_: I think it's exactly that, itemized.20:04
xinming After I read python, I feel python is really a good programming language for practising typing....20:04
ugexe i'd like to see a pythonista out type me on symbols20:05
tadzik they may win on : ;)20:08
discord6 left20:12
discord6 joined20:12
discord6 left20:12
discord6 joined20:12
hythm_ tobs: yes right, so assigning an array to a hash key itemizes the array...20:12
but why?20:13
lizmat because a value in a Hash is an item20:13
tobs the hash itemizes its contents20:13
hythm_ ok. noted.20:14
tobs I like to think that an Array is just a List which achieves mutability by storing Scalar containers as elements. The same for Hash and Map.20:15
I wonder if that's (even technically) a correct picture. lizmat?20:15
lizmat tobs that is almost correct: it is true for Map vs Hash20:16
tobs cool, thanks20:16
lizmat but in the case of List vs Array: a List *can* contain a container20:16
ugexe note %h<foo> := @a is not the same as %h<foo> = @a20:17
lizmat m: my $a = (1,my $ = 42,3); dd $a; $a[1] = 666; dd $a # tobs20:17
camelia rakudo-moar a643b8be1: OUTPUT: «List $a = $(1, 42, 3)␤List $a = $(1, 666, 3)␤»20:17
tobs m: my $a = %(a => 1, b => my $ = 42, c => 3); dd $a; $a<b> = 666; dd $a20:18
camelia rakudo-moar a643b8be1: OUTPUT: «Hash $a = ${:a(1), :b(42), :c(3)}␤Hash $a = ${:a(1), :b(666), :c(3)}␤»20:18
tobs ah, and in a hash, a Pair can contain a container value20:18
oh no, wait20:19
I meant to make a Map20:19
m: my $a = %(a => 1, b => my $ = 42, c => 3).Map; dd $a; $a<b> = 666; dd $a20:19
camelia rakudo-moar a643b8be1: OUTPUT: «Map $a = $(Map.new((:a(1),:b(42),:c(3))))␤Cannot change key 'b' in an immutable Map␤ in block <unit> at <tmp> line 1␤␤»20:19
tobs huh20:19
well, it matches what you said exactly.20:20
ravenous_ left20:27
lizmat tobs: worked a lot on that part of the internals over the years :-)20:32
espadrine_ left20:48
espadrine_ joined20:51
robertle left21:00
skids left21:15
hythm_ general question: lets say I want to connect to two package repositories, make a query for a package, combine the result from all repos and process it21:15
what im thinking is to create an Array of Cro::HTTP:Client (with specific base-uri to each repo). and call @a>>.get. then process the result21:17
timotimo Cro::HTTP::Client can't be used for multiple things at once?21:17
sena_kun hythm_, what is the exact question? the approach you described is doable.21:19
hythm_ im not sure, ill check that21:19
jnthn If you're not re-using it for multiple requests, there's not that much point making an instance21:19
hythm_ the exact question is, is there a better way to do that? like the way described in "array based objects" advent post?21:20
let me rephrase21:22
sena_kun if you can afford it, you can run e.g. `zef info Foo::Bar` and then collect its output, as zef will collect and process metadata for you. if you don't want to rely on something external like this, using Cro::HTTP::Client will do.21:22
tbrowder hi, p621:24
timotimo hi TB21:24
tbrowder timotimo: hi!21:24
i'm looking at using win 10 (yuck) to intro folks to p6. can inline::perl5 work there?21:26
johnjohn101 left21:26
timotimo as long as there's access to a compiler that can build the p5helper, probably. also it needs a perl5 built with "multiplicity", so you'll potentially have to build your own perl5 anyway21:26
Xliff jnthn: Any further thoughts on https://github.com/croservices/cro-http/pull/3921:31
jnthn Xliff: Merged, thanks21:36
Cabanossi left21:36
Xliff \o/21:36
jnthn: You're welcome.21:37
rindolf left21:41
tbrowder wouldn't a complete p5/p6 win 10 installable be a good thing for marketng21:45
*marketing? for p5 and p6?21:45
probably21:46
ab6tract joined21:46
ab6tract o/21:46
yoleaux 24 Mar 2019 22:44Z <japhb> ab6tract: Saw the follow up email, thanks! SGTM, but can't work on it right now because of $day-job stuff. I'll keep it on my back burner for fun coding time though. :-)21:46
timotimo could be, but isn't building a perl 5 distribution a bunch of work?21:46
i mean, if you're on win10, why not use the built-in linux compatibility stuff21:47
tbrowder for one thing, i'm trying to deal with very restrictive win 10 networks like local county and city governments that don't like to change anything. for instance, our new senior center has no non-ms programs, and anything else has to be runnable in the edge browser.21:50
timotimo ah, i see21:50
lembark left21:50
hythm_ apology for the delay, i have created SO questionhttps://stackoverflow.com/questions/56265473/array-of-objects21:50
Cabanossi joined21:51
tbrowder timotimo: thnx21:51
timotimo sorry, i haven't a clue :(21:52
hythm_: that's fine, but it's a bit wordy; personally, i would perhaps not even have OO in there at all21:54
ab6tract left21:55
timotimo if you have an array-based object, you can't have attributes on top of the array storage21:55
(because arrays are arrays, not general objects, and general objects have attributes)21:56
hythm_ timotimo, the reason i started with OO is due to after making a request and getting result pack, i would follow that with other requests for every package dependencies , and so on. so i though OO would make it more managable21:57
aah makes sense21:57
ugexe https://github.com/ugexe/zef/blob/master/lib/Zef/Repository.pm6#L821:58
hythm_ thanks ugexe. checking the method...22:00
timotimo i suppose that makes sense. will it be fine to look up dependencies of a package first found in A in B?22:00
if you have p6c and cpan for example, would finding JSON::Fast in p6c mean that its dependency Make::Very::Fast would only be searched for on p6c?22:01
(because you're throwing out duplicates with the unique thing)22:01
if comparing the dists with eqv like that, then the dists can't actually have any data in it that says where it comes from, or else you'll never kick out packages that are "the same" from different ecosystems22:01
hythm_ timotimo, yes it should be fine to get depenedencies from different repo,22:03
for example if someone hosts a small local repo for a few packages, it would be nice to resolve deps from other repos as well22:04
timotimo right-o22:04
don't forget we have not only a module's name, but also its authority, which has the ecosystem it comes from as part of the name22:05
i.e. there are packages with github:timo and cpan:TIMOTIMO22:05
hythm_ aah right, i just tried to make something quickly, probably will end up changing the whole 'unique' part22:07
also worth noting this is more for Linux packages, like deb and rpm, not for cpan or pip22:08
timotimo OK22:08
do you know about the specs we have for "native" dependencies? to be put into META6.json?22:09
ugexe race map race reduce22:09
hythm_ i dont know about that, link?22:10
timotimo do we have race reduce?22:11
actually i'm not sure where that document lives. is it on design.perl6.org? i think that page is down still?22:11
ugexe m: say race reduce { $^a }, 1, 2, 3;22:12
camelia rakudo-moar a643b8be1: OUTPUT: «Too many positionals passed; expected 1 argument but got 2␤ in code at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»22:12
feldspath left22:12
feldspath joined22:12
hythm_ does load for me, but i know where to look now, thanks.22:14
ugexe one day we will sneak the dependency name parser into somewhere... CompUnit::DependencySpecification.from-string maybe https://github.com/ugexe/zef/blob/master/lib/Zef/Identity.pm6#L13-L2222:16
it will eventually be a requirement for emulates/supercedes/etc22:16
pecastro left22:19
hythm_ left22:20
ugexe if someone wants to write it in nqp they should totally do it22:21
:auth<First Last [email@hidden.address] :)22:24
timotimo do we want to have something like webfinger so there's like a https://bar.net/.well-known/perl6-module-authority/foo/modulename.json22:27
you know, for reasons22:28
a DNS entry :D22:29
discord6 left22:35
discord6 joined22:35
discord6 left22:35
discord6 joined22:35
cpup left23:29
netrino_ left23:31
aborazmeh joined23:34
aborazmeh left23:34
aborazmeh joined23:34
khisanth_ left23:36
netrino_ joined23:37
netrino_ left23:42
ijneb joined23:46
khisanth_ joined23:50

Logs Search ←Prev date Next date→ Channels Documentation