»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_log/perl6 | UTF-8 is our friend! 🦋
Set by Zoffix on 25 July 2018.
AlexDaniel leont: yeah, feel free to rewrite it 00:01
leont: bisectable was also initially written in perl5
before IRC::Client module became great :)
leont Honestly, have you seen my github? I don't exactly lack projects. 00:05
Besides, I avoid web whenever I can
00:06 ferreira joined
AlexDaniel leont: feel free to open a ticket, then 00:07
00:13 telex left 00:15 telex joined 00:17 pecastro left 00:24 w_richard_w joined 00:42 w_richard_w left
Juerd leont: It's much less surprising than the weekly being published on Wordpress :) 00:43
leont: Personally, I think it's a great example of timtowdti and being open to different solutions if they happen to fit the problem at hand.
leont: As much as Perl 6 needs dog-fooding, having actually working infrastructure is more important and these seem like good ways to achieve that 00:44
AlexDaniel no, it's not a great example of timtowdti 00:49
it's an example of perl 6 and its compiler being inferior at the time of creation of the website 00:50
if the other “way” was possible or reasonable, I'm sure that way would've been chosen
leont I didn't say it was wrong, I'm just surprised. 00:51
Unlike writing a new wordpress, this seems quite doable, if only because it has been done before in p5.
00:59 w_richard_w joined 01:01 MasterDuke joined, MasterDuke left, MasterDuke joined 01:05 zachk left
leont I also have the impression such a transition could be done in steps 01:05
01:05 kurahaupo joined
Juerd Even if it's technically possible, it's unclear whether it's worth the effort 01:07
AlexDaniel: Timtowtdi doesn't mean that one way couldn't be better than another 01:08
01:17 w_richard_w left 01:18 WqZtM52a joined, daemon left 01:19 kurahaupo left, kurahaupo joined 01:22 kurahaupo_ joined 01:26 kurahaupo left 01:31 aborazmeh joined, aborazmeh left, aborazmeh joined 01:53 aindilis left 01:58 markoong left 02:09 aindilis joined 02:13 sena_kun left 03:02 Kaiepi left 03:03 Kaiepi joined 03:11 leont left 03:20 isomorphismes joined 03:30 kurahaupo joined 03:34 kurahaupo_ left 03:42 kurahaupo left, kurahaupo joined
cpan-p6_ New module released to CPAN! AttrX-Mooish (v0.5.0) by 03VRURG 03:48
03:49 jast left 03:52 ufobat_ joined 03:56 ufobat left 03:57 Khisanth left 04:04 jast joined 04:10 Khisanth joined 04:13 jast left
SmokeMachine Am I devoiced? 04:14
04:15 jast joined
MasterDuke SmokeMachine: doesn't look like it 04:16
SmokeMachine MasterDuke: ok, thanks! 04:17
m: use NativeCall; class C is repr<CStruct> { has int8 $.a }; say nativecast(C, Buf.new: 42).a 04:18
camelia 42
SmokeMachine m: use NativeCall; class C is repr<CStruct> { has Str $.a }; say nativecast(C, Buf.new: “a”.ord, 0).a 04:19
camelia (signal SEGV)
SmokeMachine How could I do that ^^?
04:20 aborazmeh left
Kaiepi i got the moar malloc panics to start happening again after reinstalling perl 6 04:20
i ran ktrace this time and found it tried to allocate 5203538026 bytes of memory in seconds 04:21
which is almost 5GB
04:24 molaf joined
MasterDuke Kaiepi: any idea where in moarvm it's happening? 04:32
Kaiepi no clue 04:33
i found a simpler golf to run into the issue so i'm writing up an issue for it rn
MasterDuke cool 04:34
Kaiepi disabling spesh and jit don't fix it
04:42 jast left 04:43 jast joined 04:46 KDr2 joined 04:47 molaf left 05:00 jast left 05:02 kurahaupo_ joined, kurahaupo left, jast joined
Kaiepi m: say [+] [1..100000000].hyper 05:16
camelia (timeout)
Kaiepi damn, guess i'll have to install 2018.12 again to see if that's a good golf or not 05:17
nope 05:23
05:30 jast left 05:32 jast joined 05:41 jast left 05:44 ravenousmoose joined 05:45 jast joined 05:51 dant_ joined 05:52 curan joined 05:55 dant left 05:57 jast left, jast joined, ravenousmoose left 06:00 sno left 06:09 ravenousmoose joined 06:13 sno joined 06:18 w_richard_w joined 06:29 jast left 06:41 ravenousmoose_ joined 06:43 jast joined 06:44 ravenousmoose left
ufobat_ tyil, would it be nice if someone adds a module to cpan that you display its repository on the chat as well? 06:44
06:46 jmerelo joined
jmerelo releasable6: status 06:55
releasable6 jmerelo, Next release will happen when it's ready. 4 blockers. 115 out of 246 commits logged (⚠ 41 warnings)
jmerelo, Details: gist.github.com/4c238eefa6584ee2bb...25e63552c9
jmerelo Really
06:56 random_yanek left 06:57 w_richard_w left 06:59 jast left
tyil ufobat_: already requested: git.tyil.nl/perl6/app-cpan-uploadn...t/issues/1 07:04
07:07 domidumont joined 07:08 random_yanek joined 07:11 w17t joined 07:14 w_richard_w joined 07:21 jast joined 07:29 kensanata joined 07:30 reach_satori left 07:34 jast left 07:36 abraxxa joined
Geth doc: 1f7e23baaf | cfa++ | doc/Language/operators.pod6
Fix broken link.
07:38
synopsebot Link: doc.perl6.org/language/operators
07:45 ambs left 07:47 AlexDaniel left, AlexDaniel joined 07:52 dant_ left 07:56 ravenousmoose_ left 07:57 ambs joined, ravenousmoose joined, ravenousmoose_ joined, ravenousmoose_ left 08:00 patrickb joined 08:01 sno left 08:02 sno joined 08:03 jast joined
Geth doc/master: 5 commits pushed by (JJ Merelo)++ 08:04
08:07 kurahaupo joined, reach_satori joined 08:09 kurahaupo_ left 08:12 reach_satori left, kensanata left 08:13 reach_satori joined 08:17 reach_satori left, holyghost joined
holyghost .seen jmerelo 08:21
yoleaux I saw jmerelo 06:55Z in #perl6: <jmerelo> Really
08:22 reach_satori joined
holyghost I've seen that I am working on some widgets kits of SDL2, game oriented etc 08:25
08:25 reach_satori_ joined, reach_satori left 08:26 lookatme_q left 08:31 rindolf joined, w_richard_w left 08:32 reach_satori_ left 08:37 lookatme_q joined 08:39 zakharyas joined 08:40 jast left 08:47 pmurias joined 08:50 cpan-p6 joined
cpan-p6 03cpan-p6 reporting for duty! [Perl 6] 02git.tyil.nl/perl6/app-cpan-uploadnotifierbot 08:50
08:51 cpan-p6_ left 09:03 dakkar joined 09:04 kensanata joined 09:20 jmerelo left 09:33 SCHAPiE left 09:46 SCHAPiE joined 09:53 jast joined 10:04 jast left
tyil timotimo: your suggestion to peek at modules.perl6.org's code/log seems to be paying off, thanks for the tip :) 10:16
10:46 ParsonsNose left, ParsonsNose joined
tyil progress thus far: a.uguu.se/7nIgPno2z3us_cpan.log 10:59
11:10 rindolf left, domidumont left 11:19 scimon joined 11:21 kst` joined 11:23 rindolf joined, kst left, leont joined 11:24 MasterDuke left 11:36 random_yanek left 11:38 random_yanek joined 11:53 sena_kun joined 11:59 smallick joined 12:07 smallick left 12:13 smallick joined
leont If I use a trait on a sub, I can assume that happens at compile-time/precompilation, right? 12:15
sena_kun yes, traits are compile-time, except the case when you are applying it manually, like... 12:16
`trait_mod:<is>($attr, :default($default-value));` <- call like this when run outside of "compile time zones" will be run at runtime. 12:17
12:19 smallick left 12:20 smallick joined 12:21 zakharyas left, smallick left, markoong joined 12:22 smallick joined, smallick left 12:26 lizmat left 12:27 vimal2012 joined, vimal2012 left 12:36 lizmat joined 12:39 SqrtNegInf left 12:48 patrickb left 12:51 SqrtNegInf joined 12:52 cpan-p6_ joined
cpan-p6_ 03cpan-p6_ reporting for duty! [Perl 6] 02git.tyil.nl/perl6/app-cpan-uploadnotifierbot 12:52
12:53 cpan-p6 left
tyil I wonder why cpan-p6 keeps growing in memory use until it dies :( 12:55
12:55 cpan-p6 joined
lizmat weekly: www.linkedin.com/feed/update/urn:l...539159552/ 12:57
notable6 lizmat, Noted!
lizmat Google summer of code call to action ^^
tyil I got a 404 opening that link :(
sena_kun too 12:58
cpan-p6 03cpan-p6 reporting for duty! [Perl 6] 02git.tyil.nl/perl6/app-cpan-uploadnotifierbot
pmurias leont: what I really think we needs with regards to modules.perl6.org is to have it display proper landing pages for modules like metacpan does
12:59 cpan-p6 left
timotimo tyil: maybe you have the same thing as kaiepi? 12:59
lizmat looks like you need to be known to LinkedIn :-(
tyil I don't know what thing he had :(
pmurias leont: I'm not sure if actually adding support to metacpan for Perl 6 stuff or evolving docs perl6 or some crazy hybrid of both is a way to achieve that
lizmat weekly: www.facebook.com/groups/perl6/perm...569953756/ 13:00
notable6 lizmat, Noted!
lizmat alternate link ^^^
tyil pmurias: what info would you like to see on a proper landing page for perl 6 modules?
pmurias tyil: all the docs and info people display on the github readme 13:01
tyil doesnt modules.perl6 already show the readme on the page of a module? 13:02
pmurias tyil: plus dependencies and dependence
tyil ah
yeah, that's not on modules.perl6 yet
fwiw, once App::CPAN correctly imports the entire cpan database, I can start working on an API to expose module info 13:03
and that can then be used by a frontend web application
pmurias for some modules modules.perl6.org just links to github
Kaiepi tyil github.com/rakudo/rakudo/issues/2635
tyil Kaiepi, timotimo: that might be related, actually 13:04
from timestamps in this chat, I can deduce it took about 4 hours to claim a gigabyte of ram (which is this server's max), and in the console I see it being killed by the OOMKiller 13:05
however, I am running with latest rakudo-star
which is on moarvm 2018.10 iirc 13:06
13:09 someuser joined
El_Che lizmat: the linked-in page is not accessible, the facebook one is full of nagware 13:11
the internet 2019
lizmat :-( 13:12
timotimo ah, damn 13:21
tyil: are you running it on linux? in that case, heaptrack could work, though i'm not entirely sure if the actual cause of allocations will be discernable 13:22
tyil it's running on a GNU+Linux host, yes
however, it's also running in a Docker container managed by Kubernetes
timotimo oh, hmm
tyil not sure if that complicates it 13:23
timotimo i think you can build a new docker image that just runs it with heaptrack and somehow™ makes the resulting file available after the program crashes
and then use k12s's "update" mechanism
tyil musashi (other bot) has been running for 18 days without interuption 13:24
so I would assume it's me doing something in cpan-p6 I shouldn't be doing that's leaking
lizmat tyil: are your 13:25
tyil I have persistent volumes available to write logs to if needed
lizmat are you using DBIish >
tyil yes
but not in this bot :p
lizmat ah...
ok
tyil it's doing an HTTP request to nntp.perl.org to get info on latest modules, parses that, ignores modules already shouted about 13:26
git.tyil.nl/perl6/app-cpan-uploadn...Notify.pm6 that's where it's doing its magic
lizmat this looks funny to me: my %item = @heralding-queue.shift; 13:30
but I guess that works as intended 13:31
tyil its a list of hashes, so that should work, right?
I'm queueing messages so the bot doesnt get killed for spam when there's a lot of updates
lizmat yeah, looks ok... I guess I was confused by pre-GLR behaviour 13:32
tyil GLR?
13:32 pmurias left
lizmat Great List Refactor, before your time :-) 13:33
tyil ah
lizmat what are you trying to achieve with: whenever Supply.interval(.8).skip((10 / .8).ceiling) {
tyil wait a bit before spamming the first messages 13:34
that IRC event is triggered on connect, the bot may or may not have been joined into the channels yet
13:34 pmurias joined
lizmat you can also specify an :in parameter with interval, afak 13:34
tyil if it start spamming to channels it has not joined yet, messages might get lost, the server might kill the bot 13:35
lizmat interval(.8, 12) would start doing .8 intervals after 12 seconds
tyil ah, it seems theres a $delay for .interval
lizmat I wouldn't be surprised if somehow that skip on the .interval would somehow be the leak 13:36
tyil I'll rebuild the image using Supply.interval(.8, 10) 13:38
(which can take a while, zef has been very slow for me lately)
lizmat yeah, it's still dependent on a slow JSON parser, among other things :-( 13:39
13:39 w17t left 13:42 cpan-p6 joined
cpan-p6 03cpan-p6 reporting for duty! [Perl 6] 02git.tyil.nl/perl6/app-cpan-uploadnotifierbot 13:42
tyil updated bot
13:42 cpan-p6_ left
tyil and running on minion1, which is the "problematic" node with only 1gb ram 13:43
too bad k8s didn't pull the newer image, and is still using code with .skip 13:44
lizmat: I'm still at work, so I'll continue on this when I get home
lizmat tyil++
tyil thanks for looking through the code and giving feedback :)
lizmat thanks for making all of this happen (which gets us closer to a recommendation manager :-) 13:46
13:50 jast joined 13:51 aborazmeh joined, aborazmeh left, aborazmeh joined
pmurias what would the recommendation manager do? 13:52
lizmat S22:115 13:53
synopsebot Link: design.perl6.org/S22.html#line_115
leont "You like X, you may also like Y and Z"
timotimo i think more like "you want JSON::Fast? use the one with :auth<github:timo>"
lizmat timotimo: indeed, with an option for "I trust you, give me the one that you recommend" 13:54
pmurias so the plan is that JSON::Fast might be provided by a distribution with more things insides or do we want to allow multiple people to provide JSON::Fast modules 13:58
lizmat allow multiple people to provide JSON::Fast modules 13:59
pmurias and how will the recommendation manager choose the correct one?
lizmat that's up to the recommendation manager :-) 14:00
if you implement one, you are completely free in how you recommend
tyil TIL that that's called a recommendation manager
lizmat well, it's a concept that I outlined a few years ago :-)
tyil I just wanted something to more quickly get answers to module queries :p
lizmat basically, make the Perl 5 package list pluggable 14:01
for the Perl 6 situation
14:01 zakharyas joined
lizmat so that conflicts can be solved in ways without needing to upset the whole ecosystem 14:01
so that conflicts such as JSON::XS vs Cpanel::JSON can be worked around without needing to change any code 14:03
tyil neat 14:04
I'm going to focus on having a clean DB that contains at least 90% of all perl 6 moduels from cpan
currently about 2/3rds are imported with no issue
pmurias I can imagine that can be useful at company level (so they can have their own set of patched and custom levels) but there will still be conflict who controls the main module name 14:05
lizmat pmurias: why ?
pmurias if a new user types say 'cpanm JSON::XS' cpanm needs to make a selection 14:06
lizmat but that cpanm is trusting a recommendation manager 14:07
and that recommendation manager makes the choice for you
zef currently will ask you which one you want if there is a conflict
pmurias the conflict will be in which option the "default" recommendation manager shows 14:08
tyil I don't think "casual" users will often have issues with the default recommendation they get
they oftentimes don't really care how things work, so long as it works for them (I still have that mentality most of the time)
lizmat and if you don't agree with the decision of the default recommendation manager, you find / create / augment another one
tyil for those that do care, they shoudl theoretically be able to set a different recommendatino manager 14:09
or build their own
lizmat indeed
that's the point
and if the whole Perl 6 community is using a different recommendation manager than the default one
then that's also ok :-) 14:10
14:16 aborazmeh left
cpan-p6 New module released to CPAN! EventSource-Server (0.0.4) by 03JSTOWE 14:21
leont Great. The backwards compatibility layer of the new main helpers isn't really backwards compatible. 14:23
lizmat leont: please elaborate 14:25
14:26 aborazmeh joined, aborazmeh left, aborazmeh joined
leont Previously I needed to analyse callframe(1), now it appears to be callframe(4) 14:27
And I'm not sure that will be stable
Guess I'll have to add a third implementation of the wiring, for the new API. 14:29
Though without a callframe, I can't really implement %*SUB-MAIN-OPTS :-/
It's just not there… 14:30
14:30 patrickb joined
lizmat leont: can you gist what you're trying to achieve ? 14:33
leont Getopt::Long still :-) 14:34
lizmat ah....
leont github.com/Leont/getopt-long6/blob...ng.pm#L408
lizmat but how does that interfere with %*SUB-MAIN-OPTS ? 14:35
leont Oh right, that's a dynamic variable
lizmat and that's one that influences how the *standard* arg parsing works 14:36
which you're superseding with GetOpt::Long >
?
why doesn't GetOpt::Long not call MAIN itself ?
wouldn't that work ? 14:37
El_Che zmat> ah.... 14:39
lizmat ah?
14:39 aborazmeh left
El_Che :) 14:39
copy paste error 14:40
leont solved it with the new API.
lizmat *phew* :-) 14:41
14:50 skids joined
leont Is there an easy way to copy all methods from one package to the other 14:59
lizmat copy? or perhaps inherit ? 15:00
leont I'm doing exports conditional on rakudo version, so «is export» won't dwim. 15:01
Need an easy way to put my helper functions in both EXPORT::DEFAULT and EXPORT::FOO
timotimo methods are not really part of a package, unless you use "is export" on actual methods 15:04
leont s/methods/functions/ 15:05
fg
(if two of them didn't have the same name, I'd just export them all and let rakudo figure it out)
timotimo you can have a sub EXPORT that does all the work, and you can iterate over packages to get all the things you need 15:06
15:13 w17t joined
leont It seems i was possible to mostly let rakudo figure it out itself :-) 15:17
Kaiepi i'm starting to make progress on my crypto module that takes care of the logic of block cipher modes for other cipher libraries
finished implementing ecb mode, which is probably my favourite because it has no logic hastebin.com/jahuqamocu.cpp 15:19
leont Though I'm not sure how GENERATE-USAGE is ought to be triggered from ARGS-TO_CAPTURE 15:33
Adding a «CATCH { note $*USAGE; exit(2) };» appears to do the trick, but it's a rather surprising interface. 15:38
15:50 kybr left 15:53 molaf joined
b2gills m: use NativeCall; say nativecast(Str, Buf.new: “a”.ord, 0); # SmokeMachine, a `has Str` in a struct is a pointer to a string 15:53
camelia a
15:55 curan left 15:57 ExtraCrispy joined
leont Though IMO that exception should be handled by rakudo 16:00
Geth doc: cfc847002a | cfa++ | doc/Language/concurrency.pod6
Markup.
16:06
synopsebot Link: doc.perl6.org/language/concurrency
16:09 ExtraCrispy left
ufobat_ m: <a b c>.join 16:13
camelia ( no output )
ufobat_ m: <a b c>.join.say 16:14
camelia abc
ufobat_ is the documentation wrong? because I would expect method join($seperator = '' --> Str:D) because you can leave out the seperator
?
lizmat m: dd (<a b c>.any,"c"d").join 16:16
camelia 5===SORRY!5=== Error while compiling <tmp>
Two terms in a row
at <tmp>:1
------> 3dd (<a b c>.any,"c"7⏏5d").join
expecting any of:
infix
infix stopper
statement end
statement modifier
lizmat m: dd (<a b c>.any,"c","d").join
camelia any("acd", "bcd", "ccd")
lizmat join can also return a Junction
or was that not the question? 16:17
16:17 jast left
ufobat_ well i wasnt aware of that 16:17
but that makes the singature that's documented double false? 16:18
lizmat ah... :-) 16:19
well it can act as a Str :-)
ufobat_ cant you stringify almost anything?
my point was, given from the doc you can not ommit the $seperator
lizmat ah, ok, yes, you can omit and I'm fixing the doc now :) 16:20
16:20 jast joined
ufobat_ ufobat_> m: <a b c>.join 16:21
( no output )
<ufobat_> m: <a b c>.join.say
abc
<ufobat_> is the documentation wrong? because I would expect method join($seperator = '' --> Str:D) because you can leave out the seperator
<ufobat_> ?
<lizmat> m: dd (<a b c>.any,"c"d").join
===SORRY!=== Error while compiling <tmp>
Two terms in a row
at <tmp>:1
------> dd (<a b c>.any,"c"⏏d").join
expecting any of:
infix
infix stopper
statement end
statement modifier
<lizmat> m: dd (<a b c>.any,"c","d").join
any("acd", "bcd", "ccd")
<lizmat> join can also return a Junction
<lizmat> or was that not the question?
* jast has quit (Ping timeout: 240 seconds)
<ufobat_> well i wasnt aware of that
<ufobat_> but that makes the singature that's documented double false?
<lizmat> ah... :-)
<lizmat> well it can act as a Str :-)
<ufobat_> cant you stringify almost anything?
<ufobat_> my point was, given from the doc you can not ommit the $seperator
oh fuck :( sorry
github.com/perl6/doc/issues/2586 <- that i wanted to paste
lizmat hehe...
leont Apparently returning a capture that will not match the sub will also do the trick. 16:22
So now's I'm at CATCH { note .message; return \(:this-will-not-match-anything-pinky-promise) } 16:26
Geth doc: 991c43c963 | (Elizabeth Mattijsen)++ | doc/Type/List.pod6
Document some peculiarities of join

As spotted by ufobat++ in D#2586
16:37
synopsebot Link: doc.perl6.org/type/List
synopsebot D#2586 [open]: github.com/perl6/doc/issues/2586 documented signature of join is wrong
ufobat_ lizmat, spotted a little typo 16:40
in the code, i never see mistakes in normal text :-(
Geth doc: e511bd2d00 | (Elizabeth Mattijsen)++ | doc/Type/List.pod6
Fix type, ufobat++
16:42
synopsebot Link: doc.perl6.org/type/List
16:43 SqrtNegInf left 16:44 rindolf left 16:48 rindolf joined 16:51 lucasb joined 16:52 jme` joined 16:53 cono joined
cono hi all 16:54
AlexDaniel hello!
cono have question about NativeCall
is this a bug? gist.github.com/cono/180795a34179c...d71b803eac
sena_kun cono, what if you run second version with `is native(LIB())` instead of `is native(LIB)`? 16:56
cono Cannot invoke this object (REPR: Null; VMNull) 16:57
scimon `is native(LIB.())` ? 16:58
cono yeah, works
scimon m: constant CON = sub{ "Hmnmm"}; say CON;
camelia sub { }
scimon m: constant CON = sub{ "Hmnmm"}; say CON.(); 16:59
camelia Hmnmm
cono I acutally trying to run this: github.com/perl6/DBIish/blob/maste...ive.pm6#L8 in perl6 alpine container, and digged to this boilerplate
probably some regression
don't think it didn't work previosuly in this module
scimon I think assigning a sub to a constant feels weird personally. 17:00
17:01 kensanata left 17:02 domidumont joined
cono so better to make merge request to DBIish with something similar to: sub LIB { NativeLibs::Searcher.at-runtime(Rakudo::Internals.IS-WIN ?? 'mysql' !! 'mysqlclient', 'mysql_init', 16..20).() } ? 17:03
sena_kun likely yes. And then it can be used like `is native(&LIB)`, at least it is what OpenSSL does. 17:04
github.com/sergot/openssl/blob/mas...Lib.pm6#L3 and then github.com/sergot/openssl/blob/mas...tx.pm6#L11 17:05
cono w/o & works for me too: perl6 -MNativeCall -e 'sub LIB { "mysqlclient" }; sub mysql_get_client_version(--> int32) is native(LIB) { * }; say mysql_get_client_version'
17:08 patrickb left
Geth DBIish/constant-lib-nativecall: 3311231d21 | cono++ | lib/DBDish/mysql/Native.pm6
Change constant LIB to sub LIB for NativeCall.native trait
17:14
17:16 patrickb joined
Geth DBIish: cono++ created pull request #139:
Change constant LIB to sub LIB for NativeCall.native trait
17:18
17:22 rindolf left 17:23 scimon left 17:28 dakkar left, rindolf joined 17:36 jmerelo joined
jmerelo Hi! 17:36
17:39 leont left
cono jmerelo: o/ 17:42
17:42 yqt joined, mowcat joined 17:47 jme` left 17:52 sno left 17:53 Aggressively_Alp joined
jmerelo hi! 17:54
You probably know we got a submission for the Google Summer of Code going, right? 17:55
I want you all as mentors, and for proposing projects github.com/perl-gsoc-2019/ideas
17:56 ParsonsNose left 17:57 ParsonsNose joined, leont joined 17:59 Aggressively_Alp left 18:00 mowcat left 18:01 jmerelo left 18:07 sno joined 18:14 moony joined
moony Perl 6 being overengineered is an understatement. 18:14
literally just comments alone are difficult to handle for parsing
18:15 |oLa| left
timotimo do you include Pod in that? 18:16
is the main problem the parenthesis pairings? 18:18
18:19 moony left 18:23 sno left
jnthn I think the comment parenthesis parsing just re-uses the normal strings with any delimiters parsing. So at least it's consistently engineered ;) 18:27
timotimo aye 18:28
18:32 |oLa| joined, |oLa| left
ufobat_ AlexDaniel, sorry, i forgot to add documentation, did another PR :-( 18:33
but i think you dont need to update the version :)
18:34 MilkmanDan left, MilkmanDan joined 18:36 sno joined 18:41 aindilis left 18:43 ravenousmoose left, ravenous_ joined 18:46 ravenous_ left, ravenousmoose joined
AlexDaniel ufobat_: I asked Zoffix to transfer their modules ( github.com/zoffixznet/perl6-buggab...-456918787 ) 18:47
ufobat_: once/if that is done, let me know if you want to maintain Temp::Path, we can transfer that to you 18:48
ufobat_ i can, if you like :-)
but if someone else wants i am absolutly okay with it
AlexDaniel timotimo: plz owner level privileges so that I'd be able to move stuff around github.com/orgs/perl6-community-modules/people 18:50
moritz: ↑ actually not sure if timotimo can add me :)
18:56 nightfrog left
moritz AlexDaniel: you are a member 19:05
19:07 zakharyas left 19:13 AlexDaniel left 19:17 AlexDaniel joined
AlexDaniel moritz: thanks! Uh, just to clarify, was I a member already or did you change something? Yes, I do indeed have access to the Settings page of repos, so was I just uh… being momentarily blind? 19:19
moritz AlexDaniel: I didn't change anything, so either somebody else added you in the 15 minutes between our interactions, or you missed it 19:20
though I think you get an email when you're added to a team, or something
AlexDaniel ok I definitely missed it then… sorry! 19:21
also that's probably not the first time I do that xD 19:22
moritz no problem 19:26
19:35 nightfrog joined, molaf left 19:37 pecastro joined 19:43 aindilis joined 19:48 reach_satori joined, SHODAN joined 19:49 domidumont left 19:54 dct joined 19:59 aindilis left 20:00 aindilis joined 20:01 veesh joined
ufobat_ assuming I have my Str $foo; and $foo does MyRole[$whatever]. Is it possible to add the very same mixin from $foo to a new my Str $another-one? 20:05
20:05 veesh left
ufobat_ the very same, because when i do so i woud not know the value$whatever 20:05
+of 20:06
20:06 veesh joined
timotimo it should be interned, or at least attempted :) 20:09
but you can pull the MyRole[$whatever] out into a variable
20:10 molaf joined
ufobat_ what do you mean with the first sentence? 20:12
timotimo if the $whatever is the same both times, rakudo is supposed to give the same result
moritz m: my Str $a; my Str $b; role A { }; say ($a does A).WHAT === ($b does A).WHAT
camelia Cannot use 'does' operator on a type object Str.
in block <unit> at <tmp> line 1
moritz m: my Str $a = 'a'; my Str $b = 'b'; role A { }; say ($a does A).WHAT === ($b does A).WHAT
camelia True
moritz ufobat_: ^^ if you mix in the same role into two Strs, it produces the exact same type again 20:13
ufobat_ ahm, yeah but i wanted to retrive the mixin of $a in order to apply it to $b, without storing it?
but i could write a method for that, as part of the mixin 20:14
so i can $a.apply-my-mixin-to($b);
20:14 zachk joined
ufobat_ would a potential submethod BUILD() {...} be invoked when i apply a mixin? 20:14
timotimo not exactly sure how BUILD-LEAST-DERIVED works 20:15
but that's what is used when mixing into objects
20:15 zachk left
moritz m: role A { }; my Str $a = 'a' but A; my Str $b = 'b'; $b does $_ for $a.^roles; say $a.WHAT == $b.WHAT 20:16
camelia Use of uninitialized value of type Str+{A} in numeric context
True
in block <unit> at <tmp> line 1
Use of uninitialized value of type Str+{A}+{Stringy} in numeric context
in block <unit> at <tmp> line 1
20:16 zachk joined
moritz m: role A { }; my Str $a = 'a' but A; my Str $b = 'b'; $b does $_ for $a.^roles; say $a.WHAT === $b.WHAT 20:16
camelia False
moritz hrmpf
ufobat_ m: role MixIn[$x] { submethod BUILD {say "mixin build: $x"}; method apply($other){ $other does MixIn[$x]} }; my Str $a = <a>; $a does MixIn; my Str $b = <b>; $a.apply($b) 20:17
camelia No appropriate parametric role variant available for 'MixIn'
in block <unit> at <tmp> line 1
ufobat_ no :(
20:17 aindilis left
leont Apparently POD's datamodel is linear instead of hierarchical. That does make my life a bit more difficult. 20:17
20:18 zachk left, zachk joined
ufobat_ in perl5 there was a __PACKAGE__ that i could use instead of the class/role name, thats not available in perl6, so i can fix me apply method? 20:19
timotimo there's ::?CLASS or something like that
ufobat_ there is $?ROLE 20:22
m: role MixIn[$x] { submethod BUILD {say "mixin build: $x"}; method apply($other){ say "apply to $other"; $other does ::?ROLE} }; my Str $a = <a>; $a does MixIn["yada"]; my Str $b = <b>; $a.apply($b); say $b.WHICH 20:25
camelia mixin build: yada
Could not instantiate role 'MixIn':

in any protect at gen/moar/stage2/NQPCORE.setting line 1099
in method apply at <tmp> line 1
in block <unit> at <tmp> line 1

apply to b
ufobat_ :-( nope
is this a bug? 20:28
m: role MixIn[$x] { submethod BUILD {say "mixin build: $x"}; method apply($other){ say "apply to $other"; $other does MixIn[$x]} }; my Str $a = <a>; $a does MixIn["yada"]; my Str $b = <b>; $a.apply($b); say $a.WHICH; say $b.WHICH # works 20:30
camelia mixin build: yada
apply to b
mixin build: yada
Str+{MixIn[Str]}|a
Str+{MixIn[Str]}|b
ufobat_ nice :)
and good night :)
20:32 dct left
tobs m: my $x = class { has @.nodes }.new(:nodes[5..10]); sub f ((:nodes([$, $, $_, *@]))) { .say }; f($x) 20:35
camelia 7
20:38 ravenousmoose left 20:44 aindilis joined, mowcat joined 20:45 zakharyas joined 20:47 ravenousmoose joined 20:50 ravenousmoose left 20:51 lucasb left 20:52 ravenousmoose joined 20:57 AlexDani` joined 20:59 atta left, atta joined, random_yanek left, sergot joined 21:01 AlexDaniel left 21:04 MasterDuke joined, MasterDuke left, MasterDuke joined 21:05 Kirisame joined 21:06 AlexDani` is now known as AlexDaniel
Kirisame Hey! I'm attempting to do some number comparisons (checking if a value is between two other values and I'm coming across an error suggestion I need an 'infix stopper'(?) I'm still pretty new to this but I was told I could do this kind of comparison like `min < $value < max`? 21:07
Gist with code sample; gist.github.com/kawaii/c422e246173...6e8126af23
gfldex lolibloggedalittle: gfldex.wordpress.com/2019/01/23/a-picky-caller/
tyil Kirisame: it looks like your control structures are incorrect 21:08
21:08 kensanata joined
tyil you seem to be trying to do else if statements, which in perl 6 are `elsif` 21:08
I'm not allowed to post a comment with a suggestio on that gist 21:10
'You can't comment at this time — your comment contains unicode characters above 0xffff.'
Kirisame oh probably because of emoji?
strip those out
tyil yeah, did just that
can you see if that works for you? 21:11
lizmat weekly: gfldex.wordpress.com/2019/01/23/a-picky-caller/ 21:12
notable6 lizmat, Noted!
Kirisame tyil: same error, I put a comment on the gist 21:13
tyil can you tell me the output of `perl6 --version`?
Kirisame tyil: This is Rakudo Star version 2018.10 built on MoarVM version 2018.10 21:14
lizmat gfldex: s/seams/seems/
Kirisame it's 6.c
tyil hmm, that's the same version I'm running
but the code sample works on my machine
can you provide me the entire file?
Kirisame sure, I'll add a comment to the gist
tyil it might be a syntax error coming from code before it
Kirisame tyil: file added 21:15
21:15 random_yanek joined
Kirisame ah 21:15
I see
tyil you forgot a ;
Kirisame missing ;
thanks for your help :) 21:16
tyil no worries :)
21:19 veesh left
gfldex lizmat: thanks 21:21
21:26 SqrtNegInf joined 21:30 yqt left 21:31 Kirisame left 21:34 petdance joined
petdance Howdy Perl 6 folks. 21:37
21:37 petdance left
lizmat wonders what scared petdance away 21:38
21:40 drolax joined 21:41 ravenousmoose left 21:42 Kirisame joined 21:44 someuser left
Kirisame tyil: I have one other question, my values are floating point numbers but sometimes a result can be like 0.707473183 and therefore not get 'caught' in the comparison because I was only checking for 0.71 - 0.8 (and then not get caught by the preceding check for 0.70) 21:44
21:44 patrickb left
Kirisame is there an easy way for me to catch all the awkward numbers like that? :) 21:45
tyil Kirisame: its because you have small gaps 21:46
you check .5 to .7, then until .71 doesn't match, but .71 to .8 match again
you first elsif should be .7 < $thing < .8 if you want to catch that value 21:47
and similar changes for the other elsifs
reading your question again, you might consider rounding the numbers up to two decimals 21:48
Kirisame: docs.perl6.org/routine/round 21:49
Kirisame I think your first suggestion has worked, needs more testing :)
tyil in your case that would be $thing .= round(.01) if you want to store the rounded value back into $thinng 21:50
I would suggest the former out of the two possibilities
21:51 kst` left
tyil I can't leave a comment on the gist :( 21:53
21:53 skids left
tyil Kirisame: you can write it as such as well: p.tyil.nl/4c9x 21:54
Kirisame oh I deleted the gist, sorry :P 21:55
thanks again for your help!
tyil no worries, just had a suggestion that might be cleaner :)
Kirisame I'm going to try it out now!
21:56 pmurias left 21:57 |oLa| joined
Kirisame Yep, works as expected! Amazing! :D 21:59
21:59 zakharyas left
tyil :D 22:00
glad you like it
if you're looking to get more familiar with Perl 6, someone made a very nice video tutorial recently: www.youtube.com/watch?v=l0zPwhgWTgM 22:01
Kirisame much appreciated! goodnight! :) 22:10
22:10 Kirisame left 22:15 drolax left 22:25 kensanata left 22:42 jme` joined 22:48 jme` left 22:50 pecastro left
Kaiepi m: use NativeCall; role Foo is repr('CStruct') { sub free(::?CLASS) is native {*}; has Str $.name } 22:54
camelia 5===SORRY!5=== Error while compiling <tmp>
Too many positionals passed; expected 2 arguments but got 3
at <tmp>:1
Kaiepi 3 arguments where? 22:55
timotimo i don't think a role can be a repr 22:56
m: role Foo is repr<CStruct> { } 22:57
camelia ( no output )
timotimo hm.
Kaiepi it's the ::?CLASS specifically 22:58
m: role Foo is repr('CStruct') { has Str $.bar }
camelia ( no output )
Kaiepi m: role Foo is repr('CStruct') { has Str $.bar; sub free() is native {*} } 22:59
camelia 5===SORRY!5=== Error while compiling <tmp>
Can't use unknown trait 'is' -> 'native' in a sub declaration.
at <tmp>:1
expecting any of:
rw raw hidden-from-backtrace hidden-from-USAGE pure default
DEPRECATED inlinable n…
Kaiepi m: use NativeCall; role Foo is repr('CStruct') { has Str $.bar; sub free() is native {*} }
camelia ( no output )
Kaiepi m: use NativeCall; role Foo is repr('CStruct') { has Str $.bar; sub free(::?CLASS) is native {*} }
camelia 5===SORRY!5=== Error while compiling <tmp>
Too many positionals passed; expected 2 arguments but got 3
at <tmp>:1
timotimo aha 23:00
it comes from NativeCall in check_routine_sanity
23:02 kst joined
Kaiepi ohhh 23:04
#FIXME, it's to handle case of class A { sub foo(A) is native) }, the type is not complete
shit i was relying on being able to do that
timotimo can just change NativeCall to not check the correctness of those 23:06
and rely on things exploding in subtler ways down the line if the programmer made a mistake
23:13 nekomune joined
Kaiepi ...things did since what i was doing was already pretty questionable 23:16
23:18 kurahaupo left, kurahaupo joined, kurahaupo left 23:21 kurahaupo joined, ParsonsNose left 23:26 kurahaupo left 23:27 kurahaupo joined, kurahaupo left, kurahaupo joined 23:28 kurahaupo_ joined
Kaiepi i really need to rethink the design of this module if i can pull off making moar try to allocate 32TB of memory at once 23:30
23:31 kurahaupo left
Kaiepi ohhhh 23:34
it's a bug in the c portion of my code
23:34 dant joined
dant p6: say @(@(1)) 23:34
camelia (1)
dant p6: say @(@(1), @(2)) 23:35
camelia ((1) (2))
SmokeMachine b2gills: that makes totally sense! Thank you! 23:39
dant I'm trying to resolve an apparent inconsitency: Expression [[1],[2]] is correctly a list that contains two other lists. But [[1]] is unexpectedly a list that contains the number 1. Why does the second expression not resulted in a nested list? 23:40
timotimo it's the "single argument rule"
when there's only a single thing, it'll get iterated over
because there's no , in the outer [] for the second one, there's only a single thing, and the outer [] iterates its argument to get the values from it
this makes things like [<foo bar baz>] work 23:41
dant timotimo: Thanks. I'll RTFM with this additional insight. 23:42
timotimo all you'll need is [[1],] 23:43
23:47 ferreira left, ferreira joined
b2gills dant: [] is a subroutine. Specifically a subroutine by the name of &circumfix:< [ ] >. In [[1]] the outer [] sees that its only argument is already an Array, so it just returns it. Adding a comma after the inner [] makes a List where the first and only value is the inner [1]. So use [[1],] 23:51
timotimo actually i believe it does copy the inner array 23:54
m: my @outer = 1; my @inner = [@outer]; say @outer.WHICH; say @inner.WHICH
camelia Array|86129728
Array|86138744
zachk so [[1,],] would make it a list of lists? 23:55
b2gills ((1),) is a List of Lists, [[1],] is an Array of Arrays
Lists are immutable, Arrays can change
zachk i dont need double , , nested? 23:56
b2gills The comma operator makes lists