»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
Set by moritz on 22 December 2015.
lookatme :) 03:47
lookatme How could I get the sum of the anon sub result ? 08:30
m: say sum { $^s.substr(any(0 X..^ $^s.comb)) }("13214")'
camelia 5===SORRY!5=== Error while compiling <tmp>
Two terms in a row
at <tmp>:1
------> 3.substr(any(0 X..^ $^s.comb)) }("13214")7⏏5'
expecting any of:
infix
infix stopper
postfix
statement end
lookatme m: say sum { $^s.substr(any(0 X..^ $^s.comb)) }("13214") 08:31
camelia any(1, 132, 13, 1, 1321)
lookatme m: say { $^s.substr(any(0 X..^ $^s.comb)) }("13214")
camelia any(1, 132, 13, 1, 1321)
lookatme no difference ?
o_O 08:41
moritz m: say sum(any(3, 4)) 08:52
camelia any(3, 4)
moritz sum autothreads over junctions
m: sum(any(3, 4), 10)
camelia ( no output )
moritz m: say sum(any(3, 4), 10)
camelia any(13, 14)
lookatme I thought it only apply that to .substr :) 09:08
m: say chars { $^s.substr(any(0 X..^ $^s.comb)) }("13214") 09:09
camelia any(1, 3, 2, 1, 4)
moritz there is nothing that implicitly converts a junction to a list 09:10
Kaiepi anyone with libidn2 and not on *bsd got a minute to test something for me? 10:08
i want to check if an issue i'm having with one of its perl 6 bindings is a problem specific to my os or not
moritz Kaiepi: I'm on Ubuntu Linux and can install libidn2-0 10:09
Kaiepi can you install github.com/Kaiepi/p6-Net-LibIDN2 and try running Net::LibIDN2.check_version ? 10:11
it segfaults for me when moar's built with either dyncall or libffi, but i can't see any obvious issue with the code itself
moritz Kaiepi: perlpunks.de/paste/show/5a96818c.bd7.2bd 10:16
Kaiepi huh 10:17
moritz fwiw I only had a libidn2.so.0 and created a symlink libidn2.so to it
Kaiepi change the sprintf string to '%02%020000' at this line github.com/Kaiepi/p6-Net-LibIDN2/b...N2.pm6#L11 10:18
moritz # Failed test 'LibIDN2 v2.0.0 or greater must be installed!'
I can install with --force-test if you think it'll do any good 10:19
Kaiepi try that 10:21
Kaiepi oh i screwed up the sprintf string it should be %02x%02x0000 moritz 10:28
that's why the test's failing
moritz I get segfault on .check_version after installing it 10:30
in dc_callvm_call_x64
Kaiepi huh
moritz Backtrace stopped: previous frame inner to this frame (corrupt stack?)
Kaiepi i could've sworn this used to work
libffi gives a more informative stack trace hastebin.com/wixuzuwida.go 10:31
Kaiepi all i can think of that would be causing that is some problem with encodings 10:40
Kaiepi p6: my ($a, $b) = (1, 2) 10:46
camelia ( no output )
Kaiepi p6: my ($a, $b) = (1, 2); say $a, $b
camelia 12
Kaiepi p6: constant (A, B) = (1, 2); say A, B 10:47
camelia 5===SORRY!5=== Error while compiling <tmp>
Missing initializer on constant declaration
at <tmp>:1
------> 3constant7⏏5 (A, B) = (1, 2); say A, B
Kaiepi how do i apply an array of arguments to a function? 10:58
sena_kun m: sub a($a, $b) { $a.say; $b.say; }; my @a = 1, 2; a(|@a); 10:59
camelia 1
2
sena_kun Kaiepi, did you mean ^? 11:00
Kaiepi yeah like that 11:03
thanks
sena_kun np
Kaiepi nice, slurpy arguments let me cut the number of lines i needed for this in half hastebin.com/uselayeled.pl 11:53
perlawhirl any nqp ninjas about? 13:41
how do i use sprintf? nqp::sprintf('%d',1) tells me that 'd' is not valid in sprintf directive 13:42
lizmat "Directive d not applicable for type VMNull" is the error message ? 13:44
perlawhirl: second arg to nqp::sprintf is a nqp::list 13:45
m: use nqp; say nqp::sprintf("%d",nqp::list(1))
camelia 1
lizmat the error message is LTA, but that's acceptable to nqp, I think 13:46
*for
Kaiepi p6: sub memmem() is native('c') { * }; class Foo { method memmem { memmem } }; Foo.^methods[0].WHAT 13:47
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 nodal…
Kaiepi p6: use NativeCall; sub memmem() is native('c') { * }; class Foo { method memmem { memmem } }; Foo.^methods[0].WHAT
camelia ( no output )
Kaiepi p6: use NativeCall; sub memmem() is native('c') { * }; class Foo { method memmem { memmem } }; say Foo.^methods[0].WHAT
perlawhirl lizmat++
camelia (Method)
Kaiepi p6: use NativeCall; sub memmem() is native('c') { * }; say memmem.WHAT
camelia Cannot locate native library 'libc.so': /usr/lib64/libc.so: invalid ELF header
in method setup at /home/camelia/rakudo-m-inst-2/share/perl6/sources/24DD121B5B4774C04A7084827BFAD92199756E03 (NativeCall) line 289
in method CALL-ME at /home/camel…
Kaiepi its signature's supposed to be (Sub+{NativeCall::Native[Sub,Str]}) ? 13:48
ok what 13:49
in this core dump i'm looking at i get Sub+{Callable[Str]}+{NativeCall::Native[Sub+{Callable[Str]},Str]}
perlawhirl lizmat: one more question if you don't mind. say i'm in a while loop (eg. i = k; i > 0; i--) nqp-style... can i "break" out of the loop early and retain the `i` value 13:57
i kinda worked around it by assigning `i` to another var, and then using that after the while loop ended... but is there a better way
lizmat can you break out of a loop in nqp ? 13:58
perlawhirl yeh?
lizmat ah, yeah
somehow I had in my mind that things like "next" and "last" were HLL constructs 13:59
perlawhirl ahh, ok.. 13:59
lizmat perlawhirl: really don't know
perlawhirl i didn't even think to try just `last` 13:59
i was just searching the nqp::ops page and didn't see it
but, yeah... just `last` should work 14:00
lizmat yeah, some things in nqp don't need the "nqp::" prefix :-)
perlawhirl yep... i'm still trying to come to grips with all the parenthesis :D
dercsar hello 14:08
lizmat dercsar o/ 14:10
Geth doc: titsuki++ created pull request #1804:
Show attributes
14:28
doc: 480b0a7772 | (Itsuki Toyota)++ | doc/Language/classtut.pod6
Show attributes
14:29
doc: 7d8729e279 | (Itsuki Toyota)++ (committed using GitHub Web editor) | doc/Language/classtut.pod6
Merge pull request #1804 from titsuki/fix-inheritance

Show attributes
synopsebot Link: doc.perl6.org/language/classtut
Kaiepi oh i figured out what that type signature was supposed to be 15:10
p6: use NativeCall; sub memmem(Str, int32, Str, int32 --> int32) is native('c') { * }; say &memmem.WHAT
camelia (Sub+{Callable[int32]}+{NativeCall::Native[Sub+{Callable[int32]},Str]})
AlexDaniel squashable6: nex 16:09
squashable6 AlexDaniel, I cannot recognize this command. See wiki for some examples: github.com/perl6/whateverable/wiki/Squashable
AlexDaniel squashable6: next
squashable6 AlexDaniel, ⚠🍕 Next SQUASHathon in 1 day and ≈17 hours (2018-03-03 UTC-12⌁UTC+14). See github.com/rakudo/rakudo/wiki/Mont...Squash-Day
AlexDaniel whoosh! Time flies 16:10
Geth whateverable/master: 8 commits pushed by (Aleks-Daniel Jakimenko-Aleksejev)++ 20:49
lichtkind how do you steal a perl 6 module? 20:53
Kaiepi how can i better write the async stuff here? this doesn't feel quite right to me hastebin.com/wimucazodo.rb 21:01
moritz lichtkind: you use it without heeding its license? 21:07
lichtkind moritz: i was coauthor of a module and want to get my latest fixes into the main line and i was thinking about taking it it over 21:11
or does anybody know her ehow to contact pierre vigier ? thanks 21:14
lizmat_ lichtkind: you don't need to steal anything: just upload one under your name
moritz lichtkind: how did you manage to co-author a module with somebody you don't know how to contact? 21:15
lichtkind moritz,: becasue for a time he accepted by patches
lizmat, hejho sure but how to set the module adress to my account? 21:16
lizmat i rather talk to him but he doesnt reacted to patch since month
or two
lizmat lichtkind: what is the module address ? 21:18
what do you mean by that?
lichtkind github.com/pierre-vigier/Perl6-Math-Matrix
lizmat you can also upload your version of the module to CPAN 21:19
and zef will find it
lichtkind i dont want really stal something but i gotta do something since my last patch is just pure maintanance
lizmat modules.perl6.org/dist/App::Mi6:cpan:SKAJI 21:20
lichtkind lizmat so zef prefers CPAN or zef can handle several sources?
ah
thanks
lizmat zef handles multiple sources
lizmat not sure which one it will take if it finds two 21:21
but then the person installing will just need ton specify your :auth
lichtkind meaning author
lichtkind aka LICHTKIND 21:22
APic 😸
lichtkind cheers apic cat 21:23
thanks liz and hugs
APic B-)))
*purrrrrrr*