»ö« 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.
00:11 aborazmeh joined, aborazmeh left, aborazmeh joined 00:20 aborazmeh left 00:21 MasterDuke joined 00:22 MasterDuke left, MasterDuke joined, aborazmeh joined, aborazmeh left, aborazmeh joined
ugexe Juerd: anyway to get `my %h = map &{sub {}}.(), @foo` to be list context instead of scalar? 00:23
otherwise I can use the way AlexDaniel came up with using a &foo instead 00:27
00:32 cpan-p6 left, cpan-p6 joined, cpan-p6 left, cpan-p6 joined 00:33 aborazmeh left
Juerd ugexe: Hmmm 00:33
ugexe: What's the expression you're mapping? 00:35
00:37 MidCheck left
Juerd Can't you just join stuff and split it again? :D 00:38
Or is that too perl-4-ish?
00:49 hasuwiz left 00:51 w_richard_w joined
Xliff ugexe: Ah! Inline-Python/#33 updated. 00:54
Juerd m: sub meh { return @_ if @_ > 1; @_.shift.() }; my @foo = &{sub ($_) {$_, $_+1}}), @foo; print @h; 00:56
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /tmp/wFchmEw68i
Unexpected closing bracket
at /tmp/wFchmEw68i:1
------> 03t.() }; my @foo = &{sub ($_) {$_, $_+1}}08⏏04), @foo; print @h;
Juerd It worked on my perl6...
It's missing things 00:57
m: sub meh { return @_ if @_ > 1; @_.shift.() }; my @foo = 1..10; my @h = map meh(&{sub ($_) {$_, $_+1}}), @foo; print @h;
evalable6 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11
Juerd $ perl -e'sub meh { return @_ if @_ > 1; @_.shift.() }; my @foo = 1..10; my @h = map meh(&{sub ($_) {$_, $_+1}}), @foo; print @h;'
12233445566778899101011
Doesn't really work for single item lists 00:58
Isn't there some perl5+6 syntactically valid boolean expression that determines whether you're 5 or 6? :) 00:59
ugexe i dunno. the one trick i'm saving to a particular hard spot is the inline comment
Juerd ugexe: eval's even simpler :)
ugexe ah yeah, that seems like the most cheatiest solution 01:00
well i guess that does require knowing if you are in 5 or 6 01:01
Juerd Because of some monkeys? 01:02
ugexe m: eval(1)
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /tmp/5cAaigDeXH
Undeclared routine:
eval used at line 1. Did you mean 'EVAL', 'val'?
01:03 vrurg left
Juerd BEGIN { my $INC; $INC{"MONKEY.pm"} = 1 }; use MONKEY-SEE-NO-EVAL; print "hi" 01:04
evalable6 hi
ugexe but you have to know eval vs EVAL
Juerd Oh shit
ugexe i guess you can tell by testing "0" as true or false 01:05
Juerd Ooh!
Good one!
01:06 vrurg joined
Juerd 1;0 juerd@cxien:~$ p56 'BEGIN { my $INC; $INC{"MONKEY.pm"} = 1 }; use MONKEY-SEE-NO-EVAL; sub eval { EVAL(@_) }; eval "print 42" ' 01:07
5: 42
6: 42
Wasn't too hard :)
ugexe m: say &EVAL(1) 01:08
evalable6 1
ugexe no monkey stuff needed
Juerd sub meh { return @_ unless "0"; @_.shift.() }; my @foo = 1..10; my @h = map meh(&{sub ($_) {$_, $_+1}}), @foo; print @h;
evalable6 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11
ugexe but i still dont see how to call eval or EVAL 01:09
Juerd ugexe: Hm, is that a feature?
ugexe in your example EVAL(1) isnt a function
in perl 5
i'm not sure why &EVAL works like that
Juerd Which EVAL(1)?
01:10 vrurg left
ugexe well your example clearly does work. i dont understand how 01:10
01:10 pochi_ joined
Juerd My thing works because the core eval takes precedence over any sub called eval, so the sub is ignored, and it never finds out there is no EVAL 01:10
ugexe why isnt EVAL() blowing up in perl 5?
ah 01:11
01:12 titsuki_ joined
ugexe i wonder if there are any tricks with try { } 01:12
01:12 pochi left, w_richard_w left, kst left, kst` joined, titsuki left
ugexe i honestly dont even know what the hell core perl 5 try does 01:12
other than screw me over when i forget to include Try::Tiny 01:13
Juerd Anyway, does my map suggestion work for your use case?
Core Perl 5 try? Is there such a thing?
ugexe ah no there isn't. its syntax that gets me 01:14
Juerd Perl 5's try is called eval :)
ugexe try { die 111 }; dies with 111, so i was thinking try was a keyword
obviously thats what Keyword::Try or whatever is, so i dunon why i thought that
yeah your map suggestion works, although less than ideal. i was hoping for something like how you can force e.g. hash context inline with `+{ }` 01:15
Juerd I know, but I can't think of anything that calls a callable in 6, while passing a list unchanged in 5 01:16
I could think of the thing that calls in perl 6 and passes a string unchanged in 5 01:17
Which different ways are there to call &{ ... } in 6, anyway?
I can only think of postfix () or .()
ugexe m: say &{ sub foo() { } }.@ 01:20
evalable6 (exit code 1) Invocant of method 'CALL-ME' must be a type object of type 'List', not an object instance of type 'Array'. Did you forget a 'multi'?
in block <unit> at /tmp/L1CH6iDZIg line 1
ugexe m: say &{ sub foo() { } }.^methods 01:21
evalable6 (The 'ForeignCode' class is a Rakudo-specific
implementation detail and has no serviceable…
ugexe, Full output: gist.github.com/600e61ff0a0d7dfec1...c96dcb37c0
Juerd At some point it's easier to reimplement map ;)
ugexe yeah i could just inline comment the , in for perl6 maybe
but that breaks one-liners for perl 5 01:22
map { $_ => $_ }#`(),␤(1,2,3) 01:25
Juerd sub polymap { my $f = @_[0]; @_.shift; return map &$f, @_; }; my @foo = 1..10; my @h = polymap sub ($_) { $_, $_ + 1 }, @foo; print @h 01:26
evalable6 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11
ugexe i didnt know you could do @_[0] 01:28
Juerd You can if you ignore the warning :)
ugexe ah heh
learnin quite a few new tricks 01:29
Juerd perl 1/5 polyglots are easier than perl 5/6 01:30
The former only if you take a perl 5 old enough to still support the old function call syntax
I believe that was killed recentl 01:31
y
It used "do"
01:34 Xliff left
Juerd Oh, heh, Perl 6 allows shift as a non-method 01:38
MasterDuke m: .name.say for sub { }.^methods # ugexe
evalable6 onlystar
<anon>
cando
gist
yada
<anon>
<anon>
candidates
multi
soft
<anon>
<anon>
perl
pac…
MasterDuke, Full output: gist.github.com/6f23adbe73e336ea2f...c5ccc25a4c
Juerd sub polymap { my $f = shift @_; map &$f, @_ } is quite a bit shorted
ugexe hmm how about getting around the sigal difference for accessing a hash key `my $h = ...; %h{1}`
Juerd ugexe: Use a $ sigiled hash in Perl 6 :) 01:39
ugexe MasterDuke: but that is still a bug yeah?
Juerd: wont that give me scalar contet?
01:39 hythm joined
ugexe in perl 5 01:40
Juerd ugexe: ?
MasterDuke ugexe: dunno
doesn't recent perl5 allow %$h ?
ugexe Juerd: n/m, i didnt think my $x = +{ 1 => 1 } was going to do what i wanted
i guess the + isn't needed even 01:41
`my $x = (1 => 2, 3 => 4); say $x{1}` i was doing this earlier which is why i was confused 01:43
Juerd sub flat { @_ }; sub polymap { my $f = shift @_; flat map &$f, @_ }; my @foo = 1..10; my %h = polymap sub ($_) { $_, $_ + 1 }, @foo; my $h = %h; print $h{2} 01:46
evalable6 3
MasterDuke ugexe: re `sub { }.^methods`, i think we are ok with internalish/low-level enough stuff not having .gist, etc. defined. of course, then the question is whether your example is explicitly doing something internalish/low-level enough to not be a bug
Juerd evalable6: What's triggering you? 01:47
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /tmp/ohmPKVCmoQ
Bogus p…
Juerd, Full output: gist.github.com/7f0a6339ba6ff240d5...2e809578c1
MasterDuke maybe ^methods shouldn't return ForeignCodes 01:48
Juerd I'm off to bed. Good night
MasterDuke Juerd: camelia is shut down right now and evalable6 answers to m: if camelia gone 01:49
Juerd MasterDuke: But I didn't say m:
MasterDuke oh right, it also tries to guess if you accidentally left it off
01:49 w_richard_w joined 01:50 MidCheck joined
MasterDuke if it looks enough like code it'll run it (maybe only if there's non-error output, but i don't remember if that part was implemented) 01:50
02:17 khisanth_ left
guifa What should a list formatting routine be called? 02:23
somehow listify() just isn’t doing it for me haha
guifa just finished tackling the CLDR for localized list formatting
02:24 ijneb left 02:31 khisanth_ joined
hythm hi, if I have class A { has $.name }; class B is A { }; how to set attribute $!name for class B during object construction? 02:40
02:41 buffet_ joined, khisanth_ left, buffet left
guifa p6: class A { has $.name }; class B is A { }; my $foo = B.new( :name<bar> ); say $foo; 02:42
evalable6 B.new(name => "bar")
hythm if I'm not passing :$name to .new, can I do that in BUILD? like class B is A { submethod BUILD (:$name) { $!name = 'something' } } ? 02:47
02:50 ufobat__ joined
hythm rephrasing: how can I access attribute $1name, inside class B BUILD method? 02:51
s/$1name/$!name
without passing :$name to B.new
guifa Where are you getting the value of :$name from, if not from new() ? 02:52
02:53 cpan-p6 left, cpan-p6 joined, cpan-p6 left, cpan-p6 joined, ufobat_ left 02:54 MasterDuke left
hythm I want to sellect random name, so class B has @names = <a b c d>, and I want B.name be set to @name.roll 02:55
my @names = < a b c d>; unit class B is A; submethod BUILD () { $!name = @names.roll } 02:56
guifa Looks like you need to make sure that the $.name is rw 02:57
p6: class A { has $.name is rw }; class B is A { method BUILD { $.name = "bar" } }; my $foo = B.new; say $foo;
evalable6 B.new(name => "bar")
hythm makes sense, I was trying to avoid making it rw. but looks like I have to 02:58
02:59 khisanth_ joined 03:04 stux|RC-only joined
guifa Egads, the XML parer is sloooow. I unleashed my CLDR parser on the whole of all 754 languages. So far 708 seconds parsing XML, and less than 1 creating all the data from the XML files. 03:06
hythm p6: class A { has $.name }; class B is A { method new ( :$name = 'bar' ) { self.bless(:$name) } }; say B.new # this will do it 03:14
evalable6 B.new(name => "bar")
03:17 phoxtail joined
guifa Is there a way to generate messages during the install / testing phase for the user? Normally those are silenced, but the install time for this module may be 10-20 minutes and I want to warn the user. 03:17
AlexDaniel .tell MasterDuke yeah, it actually does run *every* message. Crazy. :) 03:19
yoleaux AlexDaniel: I'll pass your message to MasterDuke.
AlexDaniel .tell MasterDuke well, almost every. Most of them for sure
yoleaux AlexDaniel: I'll pass your message to MasterDuke.
AlexDaniel guifa: some modules definitely do that, but I don't know how 03:20
guifa AlexDaniel: good to know it’s possible. 03:27
03:34 Cabanoss- left 03:39 phoxtail left, phoxtail joined 03:44 phoxtail left 03:45 Cabanossi joined 03:48 molaf joined 03:49 agentzh left 03:51 agentzh joined, agentzh left, agentzh joined 03:52 aborazmeh joined, aborazmeh left, aborazmeh joined 03:53 aborazmeh left 03:56 aborazmeh joined, aborazmeh left, aborazmeh joined
guifa .tell jmarelo Would it destroy the system that autochecks modules for their installability if the install time is over 20 minutes? Asking for a friend. 04:08
yoleaux guifa: I'll pass your message to jmarelo.
04:14 hythm left 04:23 xinming joined 04:26 xinming_ left 04:29 sftp left 04:30 AlexDaniel left 04:31 aborazmeh left 04:42 jmerelo joined
jmerelo Yesterday season of docs was launched by Google, and we intend to submit Perl 6 docs to it. We need ideas! github.com/perl-gsoc-2019/season-of-docs-ideas 04:43
04:49 rindolf joined 04:50 MidCheck left
jmerelo squashable6: status 04:52
squashable6 jmerelo, ⚠🍕 Next SQUASHathon in 2 days and ≈7 hours (2019-04-06 UTC-14⌁UTC+12). See github.com/rakudo/rakudo/wiki/Mont...Squash-Day
jap6h .paste 04:54
perlbot japh pasted a new file at f.perl.bot/p/e78n6s - how do I get p6doc working? 04:55
04:59 curan joined
jmerelo jap6h: that's a good question. Where did it stop working? 04:59
jap6h jmerelo, it never started working :) 05:00
should I manualy add the doc files somewhere in my fs perhaps?
jmerelo If all you want is to check out the pod of a file, perl6 --doc is enough 05:01
jap6h: you need to set the path manually, though, as in perl6 --doc path/to/pod6
p6doc is not integrated with zef and does not index everything that's installed, as in the case of perldoc, I'm afraid. 05:02
jap6h well I want to learn the language, so I want to be able to look up functions and core functionality and modules and, yeah, all that stuff 05:03
jmerelo jap6h: also, p6doc is, as you might have seen, not working very well (if at all)
jap6h such a shame
don't wanna have to use a browser :/
jmerelo jap6h: that might be a problem...
jap6h: we do have someone interested in fixing p6doc during Google Summer of Code. 05:04
jap6h maybe I should write a perl5 script to rip the docs from the site, convert it to plaintext and write my own perl6doc :p
great
jmerelo jap6h: that seems easier said than done... If you do want to do that, please do it in perl6 and pull-request it to the repo. 05:05
jap6h jmerelo, I would, if I didn't write my first perl6 script yesterday. catch 22 :D 05:06
jmerelo jap6h: ... since you need to check the documentation. Right.
jap6h: I can upload a single-PDF version of the documentation to the site, if that could help
jap6h: text too, although that might miss some stuff 05:07
jap6h sure :) then I can make a hardcopy of it
05:07 jap6h is now known as japh
jmerelo japh: you don't need to downgrade yourself :-) 05:07
japh I might be weird but I like reading docs in the bath tub 05:08
05:08 skids left
jmerelo japh: it's going to be 1402 pages in PDF... May I suggest one of the books on Perl 6? 05:09
japh lol
jmerelo japh: well, it's a big language... 05:10
japh doesn't the books get outdated very quickly though?
since it's still an evolving language?
jmerelo japh: not really. The basics do not change a log; new classes are not introduced so easily. There might be some small changes or some ambiguous behavior gets disambiguated, but no biggie 05:11
japh I see 05:13
05:15 sauvin joined 05:17 aborazmeh joined, aborazmeh left, aborazmeh joined 05:23 aborazmeh left
jmerelo japh: uploading PDF and epub in a moment. Takes a while to convert... 05:26
05:27 llfourn left, molaf left
Geth doc: 45ed2530b3 | (JJ Merelo)++ | doc/Language/syntax.pod6
Revises text and closes #2704
05:28
synopsebot_ Link: doc.perl6.org/language/syntax
jmerelo japh: I'm going to open an issue anyway with links to your text above. 05:29
.tell guifa it will not; I think the Travis limit is 50 minutes 05:30
yoleaux jmerelo: I'll pass your message to guifa.
japh jmerelo, thank you
can you use cpan(m) to install perl6 modules? I've seen some perl6:: on the metacpan? 05:32
jmerelo japh: not really. zef is the only command-line utility that can be used now. It does tap CPAN, but mostly for storage. 05:33
japh okay
jmerelo japh: github.com/perl6/doc/issues/2705 please comment/add anything you can think about
japh: PDF uploaded: github.com/perl6/doc/releases/tag/v1.002.001 epub conversion is taking already 11 minutes. I'll upload it later when it finishes. 05:36
japh jmerelo, thank you, wgetting 05:37
05:49 w_richard_w left, w_richard_w joined
jmerelo japh: epub ready too: github.com/perl6/doc/releases/tag/v1.002.001 05:52
05:56 llfourn joined 06:00 llfourn left 06:10 domidumont joined 06:33 Sgeo_ joined 06:36 jmerelo left 06:37 Sgeo left 06:43 pmurias left 06:45 entonian joined 06:49 pistacchio left, entonian left, pistacchio joined 07:05 patrickb joined 07:08 llfourn joined 07:12 llfourn left 07:18 rindolf left 07:24 rindolf joined 07:41 rindolf left 07:42 llfourn joined 07:43 scimon joined 07:45 netrino joined, rindolf joined 07:46 llfourn left 07:52 netrino left 07:53 kensanata joined 07:58 kurahaupo_ joined, kurahaupo left 07:59 kurahaupo_ left, patrickb left, kurahaupo joined 08:00 kurahaupo_ joined 08:03 kurahaupo left 08:08 Sgeo__ joined 08:09 reach_satori left 08:10 buffet_ is now known as buffet 08:11 Sgeo_ left 08:14 zakharyas joined
ugexe gist.github.com/ugexe/c99b81654968...63afc76229 polyglot perl 5/6 base35 encode/decode 08:16
08:17 zakharyas left 08:18 zakharyas joined, dakkar joined 08:28 llfourn joined 08:33 llfourn left 08:37 antoniogamiz joined 08:40 MidCheck joined 08:43 kurahaupo_ left, kurahaupo joined 08:55 pmurias joined 08:57 mowcat joined, reach_satori joined 09:08 llfourn joined 09:12 llfourn left 09:14 reach_satori_ joined, reach_satori left 09:28 llfourn joined 09:33 llfourn left 09:35 wbn_ left 09:38 wbn joined 09:51 w_richard_w left 10:00 robertle_ joined 10:03 domidumont left 10:09 Praise left 10:12 pmurias left 10:31 kurahaupo_ joined 10:32 kurahaupo left 10:47 kurahaupo_ left 10:48 kurahaupo joined 10:49 zakharyas left, reach_satori_ left
Juerd Wow, that results in some really weird code :) 10:51
10:52 Black_Ribbon left 10:59 pmurias joined 11:00 reach_satori_ joined 11:10 sena_kun joined 11:19 reach_satori_ left 11:21 llfourn joined 11:40 llfourn left 11:52 reach_satori joined 11:57 antoniogamiz left
moritz ugexe++ 12:00
that's some scary shit right there :D
12:10 llfourn joined 12:15 llfourn left 12:20 lucasb joined 12:22 zakharyas joined 12:26 cpan-p6 left 12:27 cpan-p6 joined, cpan-p6 left, cpan-p6 joined 12:35 reach_satori left 12:48 llfourn joined 12:53 llfourn left 12:54 abraxxa left 12:56 abraxxa joined 13:08 domidumont joined 13:10 ufobat_ joined 13:14 ufobat__ left 13:32 vrurg joined 13:44 patrickb joined 13:45 skids joined 13:48 reach_satori joined 14:22 kurahaupo left 14:23 kurahaupo joined 14:25 rindolf left 14:27 rindolf joined 14:29 mowcat left 14:39 llfourn joined 14:42 Sgeo joined 14:43 llfourn left 14:45 Sgeo__ left 14:58 molaf joined 15:00 patrickb left
kawaii Can I run some Callable on an object like a method? 15:03
15:04 curan left
moritz the invocant of a method is just the first argument 15:06
15:06 AlexDaniel joined
moritz so &mycallable($obj) and $obj.&mycallable() work just like $obj.mymethod 15:06
a long way to say "yes", I guess :D 15:07
kawaii I want to be able to create a sub that will later be called on an object but the compiler won't let me use self or the ':' syntax on something that isn't a method
oh I can just accept it as a positional?
AlexDaniel guifa: re “Would it destroy the system that autochecks modules for their installability if the install time is over 20 minutes? Asking for a friend.”
15:07 amosbird left
AlexDaniel guifa: no, it will just time out, and your module will appear on github.com/perl6/ecosystem-unbitrot/issues 15:07
guifa: your friend's module, of course! :) 15:08
kawaii hey that does work
AlexDaniel hey, uh… I'm confused about this ticket github.com/perl6/ecosystem-unbitrot/issues/595 15:10
kawaii Doesn't help though because I wanted to be able to use self instead of accepting parameters I only use in some situations
same problem, just moved
AlexDaniel it's not April 1st, and I'm confused…
there's no module in the ecosystem related to doxygen, right? 15:11
greppable6: doxygen
timotimo very interesting that that'd end up in our repository
greppable6 AlexDaniel, 88 lines, 3 modules: gist.github.com/f3cf0092b91f810d2b...4632c4df80
AlexDaniel could it be about modules.perl6.org/dist/Libclang:cpan:AZAWAWI ?
“E: Unable to correct problems,you have held broken packages.” that's from apt, right? 15:12
timotimo that looks very much like APT output, yeah 15:13
AlexDaniel if there's a module that runs apt during install I'll kill ya all xD
moritz I'm just waiting for the module that uses ansible to run apt during installation :D 15:14
15:15 cpan-p6 left 15:16 cpan-p6 joined, cpan-p6 left, cpan-p6 joined 15:17 robertle_ left, llfourn joined 15:18 Sgeo_ joined 15:22 Sgeo left, llfourn left
pmurias ugexe: do you have any suggestions what nqp::uname should return in the browser? 15:23
15:23 molaf left
tadzik user-agent?:) 15:23
(/s) 15:24
15:24 reach_satori left, Sgeo__ joined 15:28 Sgeo_ left 15:30 jmerelo joined
ugexe pmurias: im not sure. maybe sysname = $browser_name, release = $browser_version, version = ??? (on windows this is empty, so thats a reasonable option), machine = ??? (no idea about this. usually x86_64 on a 64 bit system, so maybe whatever bits the browser was compiled to?) 15:35
timotimo include the flash player plugin version please
15:39 MidCheck left 15:41 llfourn joined
kawaii greppable6: posix 15:44
greppable6 kawaii, 209 lines, 47 modules: gist.github.com/a9b272d3cf4c64003f...20370bfd13
15:48 MidCheck joined 15:49 llfourn left 16:02 demanuel joined 16:11 pmurias left 16:12 demanuel left 16:17 agentzh left 16:18 agentzh joined 16:31 Chaz6 joined
Chaz6 hey ufobat_ bailador is not working for me with rakudo star 2019.03 // Cannot modify an immutable 'Any' type object in method dispatch 16:32
16:32 llfourn joined 16:33 epony left
Chaz6 ufobat_: sample code pastebin.com/2TBJEBfY 16:35
16:35 pistacchio left 16:36 pistacchio joined 16:37 llfourn left 16:38 scimon left
ufobat_ Ill have a look at it in the tonight or tomorrow 16:39
16:39 dakkar left
ufobat_ Chaz6, which version of Bailador have you installed on your box? 16:40
16:42 pistacchio left
Chaz6 ufobat_: 0.0.18 16:45
thanks!
It might be a PSGI issue
ugexe here is a benchmarkable version of the base35 stuff -- perl 5 does 100k round trips in 1m2s, and perl 6 in 1m12s: gist.github.com/ugexe/707df8eddc1f...c27fceba48 16:48
16:48 zakharyas left, mowcat joined
timotimo they're almost tied for performance? 16:49
16:49 mowcat left
ugexe yeah. at 10000 iterations its like 6.5s vs 8s 16:49
timotimo is that startup penalty or something?
16:49 mowcat joined
ugexe maybe a fraction of a second is startup time 16:50
timotimo is the number big enough to give it a good workout?
hold on, it uses /"."/ to split? even in the perl6 version? 16:51
ugexe yeah
16:51 epony joined
timotimo like, that sounds like it'd be an incredible performance penalty on rakudo at the moment 16:51
to_int accounts for about 50% of total run time :D 16:53
a bit more
ugexe heh
in perl5 it would be int(...) 16:54
timotimo split with "." instead of /"."/ makes it much less extreme
ugexe i tried using substr("...", 0, index(...)) but got frustrated 16:55
16:55 ravenousmoose joined
timotimo it's quite obviously not meant to perform well :) 16:55
just making it polyglot is of course not easy 16:56
ugexe perl 5 doesnt work with split("."
timotimo and of course $_.Int is loads faster still
ugexe m: sub int { Int($_) }; print int(1.5); # :( 16:57
evalable6 (exit code 1) Cannot invoke this object (REPR: P6int; int)
in block <unit> at /tmp/qk3kMFe5PU line 1
timotimo can you use "floor"? 16:58
(no negative numbers here, kids)
ugexe perl 5 has no floor
m: sub Xint($_) { ("0" and Int($_[0]) or int($_[0])) }; print Xint(1.5); 17:01
evalable6 1
ugexe updated gist to use the above 17:04
perl 6 now takes 27s
perl 5 now takes 1.79s
so perl6 Int(...) is really slow, or perl6 split(...) is fairly similar in speed to perl 5 17:07
timotimo what happens in perl5 if you change to_base35's first line to read +@_[0] at the end? 17:09
ugexe nothing 17:10
timotimo does it make perl6 faster? from looking at the profile it seems to do a little bit in perl6 17:11
ugexe fwiw thats not a valid constraint
to_base35("xxx")
timotimo oh, i thought that's the other way around 17:12
ugexe base35 can contain numbers and letters as well
17:13 kurahaupo_ joined, kurahaupo left
ugexe er no 17:13
17:13 kurahaupo_ left, kurahaupo joined 17:20 pistacchio joined 17:23 vrurg left 17:25 vrurg joined 17:26 domidumont left
Geth doc: db96fe0cf0 | (JJ Merelo)++ | doc/Type/Any.pod6
Junction + first + reflow, refs #2703, #2632
17:27
doc: 656008ca62 | (JJ Merelo)++ | doc/Type/Str.pod6
Adds positional adverbs, so far undocumented.

This closes #2706.
Additionally, there's a mention of their use with Junctions, refs #2632.
synopsebot_ Link: doc.perl6.org/type/Any
Link: doc.perl6.org/type/Str
doc: 98146c18df | (JJ Merelo)++ | doc/Language/regexes.pod6
This actually closes #2706 refs #2632
17:28
synopsebot_ Link: doc.perl6.org/language/regexes
17:28 vrurg left 17:29 vrurg joined 17:32 ravenousmoose left 17:34 kensanata left 17:37 epony left
timotimo ugexe: using 1..9 instead of "1".."9" in the beginning of from_base35 makes rakudo happy 17:42
17:42 epony joined 17:43 ravenousmoose joined 17:44 zachk joined 17:49 khisanth_ left 17:51 pistacchio left 17:52 pistacchio joined 17:54 ExtraCrispy left, ExtraCrispy joined 17:55 pecastro joined 17:56 zachk left, zachk joined 17:58 abraxxa1 joined, kurahaupo left 17:59 kurahaupo joined, kurahaupo left, kurahaupo joined 18:01 vrurg left
Juerd ugexe: How does that /"."/ thing even do something useful in 5? 18:02
18:04 pistacchio left, pistacchio joined 18:09 lucasb left 18:10 khisanth_ joined 18:13 vrurg joined 18:15 abraxxa1 left 18:19 MidCheck left
Juerd ugexe: sub Int{int(@_[0])}; print Int(4.5) 18:26
ugexe: Heck, it even works with $_[0] :)
18:27 Actualeyes left 18:29 skids left 18:30 ravenousmoose left 18:32 sauvin left 18:33 llfourn joined
guifa AlexDaniel: okay I guess I’ll preparse stuff haha. (I suppose CLDR doesn’t update so often I can’t just eventually do small point updates) 18:35
yoleaux 05:30Z <jmerelo> guifa: it will not; I think the Travis limit is 50 minutes
18:37 molaf joined 18:38 llfourn left
ufobat_ Chaz6, your script works on my box :-( 18:41
Chaz6, This is Rakudo version 2019.03.1 built on MoarVM version 2019.03
18:41 Possum left
ugexe i wonder how much the eval() for accessing @*ARGS/@ARGV is costing 18:41
18:41 Possum joined
Geth doc: 37f5244177 | Coke++ | xt/code.pws
handle spell check for new code sample
18:42
ugexe Juerd: i came up with /"."/ out of frustration, not by deducing from something logical like the docs
Chaz6 ufobat_: hmmm okay thanks! I will try to find out what the problem is 18:43
ufobat_ i've seen something like that before
Chaz6, github.com/Bailador/Bailador/issues/313 18:44
but it vanished for cfa
Chaz6 ufobat_: aha that's exactly my problem 18:46
ufobat_ yeah
and the fix would be to add 'is rw' to this line github.com/Bailador/Bailador/blob/...ext.pm#L12 18:47
Chaz6 Thanks :) 18:48
ufobat_ i dont see how one could not have the issue that you have, i am expecting it to happen on my box, too. but it works
maybe anyone from here could explain this to me :-) 18:49
18:56 mowcat left
guifa What does the error “Missing serialize REPR function for REPR VMException (BOOTException)” mean when installing via zef? I’m definitely not getting the error when running the module directly 19:00
It’s not giving me a trace or a line number =\ 19:01
SmokeMachine jmerelo: Idk if the problem is on my iPhone... but the ePub version of the docs seems all blank to me... 19:02
jmerelo: look: usercontent.irccloud-cdn.com/file/...317734.mp4 19:03
19:08 jmerelo left 19:15 reach_satori joined, netrino joined
ugexe guifa: run it like `perl6 --ll-exception /Users/ugexe/.rakudobrew/moar-2019.03.1/install/share/perl6/site/bin/zef` 19:24
a few lines from the bottom of `zef --help` shows where the CONFIGURATION file is, which gives you most of that path 19:25
guifa I ended up finding the error and ’twas a stupid one (forgot to switch from local to %?RESOURCES for file references)
But actually since I’ve got you here … is there a good way to output to the user during testing / install? 19:26
ugexe we should probably have a LL_EXCEPTIONS env var
are you using --verbose (-v) or --debug?
guifa put displays but only after the install completes, so warnings about slow installs (“No, seriously, don’t cancel, it’s going to take 20 minutes”) get suppressed
Re error catching or general output? 19:27
ugexe well you cant force zef to show the user anything... they opt into that stuff with a higher verbosity level. so at that point you see the regular test output, and could just use `diag "THESE TESTS ARE SLOW"`. unless i misunderstand 19:28
guifa ah ok
ugexe generally most people should be using -v if they really need to look at the output themselves 19:29
guifa I’m working to preprocess the stuff now so that ideally the install can be <10 seconds, but that definitely satisfied my curiosity for down the line.
ugexe that also enables output from the build phase, so you can have a Build.pm6 or something to inform the user it will be slow to install 19:30
19:30 cpan-p6 left
ugexe but they will see the test output so that probably isnt needed 19:30
19:30 cpan-p6 joined 19:31 cpan-p6 left, cpan-p6 joined
guifa ugexe++ 19:35
19:41 skids joined 19:49 jackfly26 joined
jackfly26 hey 19:49
are any devs online
timotimo i am 19:51
what can we do for you 19:52
jackfly26 i was just wondering how much code you needed to change to move from parrot to moar 19:53
because i discovered that their operator parsing is broken
and that's like the last thing i implemented 19:54
19:58 pmurias joined 20:08 Voldenet left
guifa I don’t know if that much has been documented on it. I’d just rely on the tests to figure out what needs to be edited 20:13
20:13 Voldenet joined, Voldenet left, Voldenet joined 20:15 vrurg left 20:21 molaf left, uzl joined 20:22 antoniogamiz joined
uzl How do I get a USAGE output for MAIN like this: `git hash-object [-w] [-t TYPE] FILE`? Specifically this part: `[-t TYPE]` 20:24
I guess I could've something like `sub MAIN($type, $file, Bool :$hash-object is required, Bool :$w, Bool :$t) {}` 20:25
and then check if both `t` and `type` are provided.
timotimo you can have :t(:$type) or something to that effect 20:26
20:26 Black_Ribbon joined 20:27 kurahaupo left, robertle left 20:28 kurahaupo joined
uzl timotimo: Wouldn't this just create a shortname alias for $type though? Allowing for the use of either -t or -type? 20:33
timotimo perhaps 20:34
20:34 llfourn joined
jackfly26 so timotomo you work on moar right 20:35
uzl ;
jackfly26 timotimo*
i saw the latest commit was by timo
timotimo that's me, yeah
jackfly26 ok 20:37
cool
uzl timotimo: ;-) but I think the use in [-t TYPE] is that whenever the -t flag is present it must be followed by TYPE. I could check for -t and TYPE but I thought there would be a more perlish way of achieving the same thing. 20:38
20:38 Exodist joined
timotimo there's pod comments you can attach to the parameters, but i'm not sure that does what you wish 20:38
20:39 llfourn left
uzl Do you mean #= ? 20:40
timotimo yeah, #= and #| 20:41
uzl Oh, I see but as you mention that wouldn't work. I'll stick with checking for the presence of both -t and TYPE then. 20:42
timotimo: Thanks! 20:43
timotimo i don't know if it would work or not tbh
maybe using a subset type named TYPE would do it?
haven't touched that code in a while
not sure if i ever even changed anything there actually 20:45
i'll be AFK for a bit for now
uzl I think #= would only attach a usage comment. I guess what I wanted was to make sure that whenever the -t flag it was followed by TYPE ("blob", "tree", etc.) without having to check for it myself inside MAIN.
Sure. See you! 20:46
20:46 uzl left 21:01 sena_kun left
Geth doc: chsanch++ created pull request #2707:
Change instances of 'timezone' with 'time zone'
21:01
21:23 skids left 21:30 Praise joined, Praise left, Praise joined 21:35 TreyHarris joined 21:44 vike left 21:47 vike joined 21:56 netrino left 22:08 pecastro left 22:18 mowcat joined 22:22 antoniogamiz left 22:32 SyrupThinker left, pmurias left, SyrupThinker joined 22:36 llfourn joined 22:40 llfourn left 22:53 john_parr left 22:55 Xliff joined
Xliff \o 22:58
What's the basic implementation of pull-one?
Iterator.pull-one, rather
timotimo how do you mean? 22:59
like, what's the smallest implementation of .pull-one that is correct?
Xliff Yes. 23:00
timotimo method pull-one { EndIteration } 23:01
Xliff LOL
timotimo actually, StopIteration i think
Xliff OK. How about this. I want to wrap an array in an object, but I would like to provide both .iterator and .pull-one on the object.
Would: "method pull-one { @A.iterator.pull-one }" be sufficient? 23:02
timotimo but pull-one goes on the result of .iterator
that's going to make a new iterator every time pull-one gets called
at least that's the semantics i expect from calling .iterator on something 23:03
Xliff OK. That's what I was worried about. I need a state var to hold that unless and until it matches EndIteration, don't I?
Or would it just be enough to wrap iterator and not worry about pull-one?
timotimo yeah, i wouldn't worry about .pull-one in your "own" class 23:04
Xliff class A { does Positional; does Iterator; has @!a; ... } <- What else do I need to make A behave like an array?
timotimo i think you actually want "also does Iterable"
rather than Iterator
Xliff OK. 23:05
So methods for: iterator, elems, AT-POS, EXISTS-POS, join, and sort?
method join(|c) { self!rebuild; @!a.join(c); } 23:06
timotimo actually .join will call .list.join for you if you derive from Any 23:07
i'm not sure where sort lives, perhaps Positional, but i'd assume that also does .list.sort for you if you don't have an implementation
Xliff Yeah, but wouldn't that be self.list.sort? I don't want that. I'd want @!a.sort. 23:08
So would the sample join method above work? 23:09
s/would/wouldn't/
timotimo you'll want to |c actually
otherwise a single positional gets passed, which is the capture object
Xliff Ah. Was wondering about that. Thanks! 23:10
timotimo NP
23:24 nebuchadnezzar left, MidCheck joined 23:35 jackfly26 left 23:39 vrurg joined, MasterDuke joined, MasterDuke left, MasterDuke joined 23:51 rindolf left