»ö« 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.
tony-o lizmat++ on failure is an option... 00:01
sena_kun good night, #perl6 00:05
o/
discoD What should I make of the error "CUnion representation only handles ... and types with representation: ...CStruct..." when the union's members all have CStruct representation? 00:42
SmokeMachine Does anyone has a better name suggestion for github.com/FCO/Protocol ? 00:44
lucasb it is just like Go interfaces? 00:49
just doing "constant protocol = MetamodelX::Protocol;" is enough to register a new keyword? 00:50
SmokeMachine lucasb: yes 00:52
lucasb I guess you're already decided with "protocol", but just adding some suggestions to the brainstorm: interface, contract, requirement
SmokeMachine lucasb: inside a DECLARE inside a EXPORTHOW 00:53
lucasb: I was thinking on contract too...
lucasb "method set" 00:55
hm, signature set
"object expectations" 00:57
ok, enough :)
Geth ecosystem: d22c44e2f8 | (Fernando Correa de Oliveira)++ (committed using GitHub Web editor) | META.list
Adding Protocol to the ecosystem
01:19
Xliff Can someone help me decipher this valgrind output? 02:48
gist.github.com/Xliff/8e402d623cea...45e820d7fd
.tell jnthn Well, I finally had time to try your valgrind idea. Have no idea how to parse the results, though. gist.github.com/Xliff/8e402d623cea...45e820d7fd 02:49
yoleaux Xliff: I'll pass your message to jnthn.
timotimo Xliff: is your moarvm built with --debug=3 or similar? it seems like debug symbols are missing from libmoar.so; also, it can probably help to download debug symbols for the gobject and gtk libraries on top of that; at least in fedora there's a tool for that 02:54
gotta go!
Xliff timotimo: What's the best way to build with --debug=3? 02:55
Xliff Have a good night 02:55
MasterDuke Xliff: how do you get/build Rakudo? 03:03
timotimo it just needs to get to moarvm's Configure.pl some way, but if that's too troublesome, it'd be enough to add -g3 near the beginning of the CFLAGS in moarvm's Makefile and just "make install" and done
Xliff MasterDuke: rakudobrew 03:04
timotimo: Thanks! Enjoy your night! 03:05
MasterDuke Xliff: then it’s add something like —build-option=‘—moar-option=“—debug=3”’ 03:07
Xliff MasterDuke++ 03:07
MasterDuke I’m not remembering the rakudobrew syntax/command correctly, but its help and what I wrote should be able to get you there 03:08
Might also want to check out Zoffix++’s z script, it’s more recommended nowadays than rakudobrew if you really need to build your own 03:10
Xliff m: my ($a, $b, $c) = ^5; say ($a, $b, $c) 04:00
camelia (0 1 2)
jmerelo Who's around? 04:30
Just a reminder that there're still 10 slots to fill in the Advent Calendar: github.com/perl6/mu/blob/master/mi...8/schedule 04:32
Poohman use Cro::HTTP::Client; 04:36
my $resp = await Cro::HTTP::Client.get('www.perl6.org/');
Cannot locate symbol 'SSL_CTX_set_default_verify_paths' in native library 'C:\Users\rajwinf\AppData\Local\Temp\2FC5F7EF8D0AFE518A95E331964D06DDC8B8529A\libeay32.dll' 04:37
does Cro work in Windows??
holyghost mostly there are versioning problems with windows libSSL 04:49
try a non-secure http 04:50
Poohman hi holyghost : non-secure work 04:59
Poohman im just reading up and it seems to be something to do with the default certificate path in windows 05:00
holyghost that's a common SSL problem, as you say, you can find a solution online 05:03
somtimes you can bypass the certificate, but I don't know if that's available in your Cro HTTP module. 05:04
you have to not use the certificate 05:05
That sould work AFAIK
This might mean hacking Cro to not verify the certificate 05:10
Poohman thanks holyghost. Wonder how jnthn gets it going in his Windows box - heard he also works on Windows sometimes 05:43
holyghost no problem 05:48
buggable New CPAN upload: Mathx-Stat-0.2.8.tar.gz by HOLYGHOST modules.perl6.org/dist/Mathx::Stat:...:HOLYGHOST 06:18
holyghost ^-- marginal keyword bugfix
It should be moe stable now 06:19
Poohman holghost: do you know how the dll files are generated in the zef store for modules 06:23
I think I need the ssleay32.dll to solve this
currently it is search in libeay32.dll 06:24
holyghost that's what I meant wit versioning problems of libSSL,
you need windows permission for using them IIRC
try something like dllfiles.com
Poohman ok i need to go out - will come back and check 06:25
thanks for the help
holyghost np
buggable New CPAN upload: Uzu-0.2.5.tar.gz by SACOMO modules.perl6.org/dist/Uzu:cpan:SACOMO 06:38
masak I'm probably a bit late to the party, but... any free slots for the advent calendar? 09:38
jnthn masak: Lots, last I heard. 09:39
masak ok, maybe I'll get more ambitious then 09:51
jnthn I'm pondering writing one, but still undecided what about :) 09:52
AlexDaniel huggable: advent 09:55
huggable AlexDaniel, Sign up to write an Advent blog post: github.com/perl6/mu/blob/master/mi...8/schedule
buggable New CPAN upload: CCLog-0.0.5.tar.gz by CCWORLD modules.perl6.org/dist/CCLog:cpan:CCWORLD 09:58
masak yeah, plenty of space 10:04
I was gonna do one 007-related (but Perl 6-focused) advent post, but I'll consider doing more
in general, I have a backlog of blog posts that I need to get out on strangelyconsistent too 10:05
Xliff jnthn: Do you have a moment? 10:36
Xliff Oh! n/m... I need to recompile rakudo with debug opts. 10:37
Xliff m: class A {}; my @a = (A.new, 1, 'b'); say +@a.grep( *.^can('Str').elems ); 10:37
camelia 3 10:38
Xliff m: class A {}; my @a = (A.new, 1, 'b'); say @a.grep( *.^can('Str').elems );
camelia (A.new 1 b)
Xliff m: class A {}; my @a = (A.new, 1, 'b'); say @a.grep( *.^can('Str').elems ); say @a[0].Str;
camelia (A.new 1 b)
A<81134016>
Xliff m: class A {}; my @a = (A.new, 1, 'b'); say @a.grep( *.^can('Int').elems; 10:41
camelia 5===SORRY!5=== Error while compiling <tmp>
Unable to parse expression in argument list; couldn't find final ')' (corresponding starter was at line 1)
at <tmp>:1
------> 3 'b'); say @a.grep( *.^can('Int').elems;7⏏5<EOL>
expecting …
Xliff m: class A {}; my @a = (A.new, 1, 'b'); say @a.grep( *.^can('Int') ).elems;
camelia 2
Xliff m: class A { method Int { 0 }; }; my @a = (A.new, 1, 'b'); say @a.grep( *.^can('Int') ).elems;
camelia 3
SmokeMachine Does anyone know if LPW will be streamed? 10:55
scimon *shrugs* 11:22
Possibly. They've got the kit from TPCiG so I don't see why not.
Geth mu: 6f2b61e91b | (Nigel Hamilton)++ (committed using GitHub Web editor) | misc/perl6advent-2018/schedule
Move entry forward by a week and add a new entry
11:27
Xliff m: use NativeCall; sub pp(Pointer $a) { say '1' }; pp(Nil) 12:03
camelia 5===SORRY!5=== Error while compiling <tmp>
Calling pp(Nil) will never work with declared signature (NativeCall::Types::Pointer $a)
at <tmp>:1
------> 3veCall; sub pp(Pointer $a) { say '1' }; 7⏏5pp(Nil)
buggable New CPAN upload: CCLog-0.0.6.tar.gz by CCWORLD modules.perl6.org/dist/CCLog:cpan:CCWORLD 14:38
tadzik hmm 15:09
nvm
tbrowder___ hi, #perl6 15:21
sena_kun o/ 15:22
tbrowder___ can anyone tell me how to use “zef install —install-to=“?
sena_kun: \o 15:23
i’m trying to install Perl6::Parser in ./lib and “—install-to=./lib” doesn’t work 15:24
jnthn tbrowder___: Wild guess, but it might have to be like --install-to=file#./lib (e.g. specify the kind of repo) 15:25
tbrowder___ oops, i just remembered i forgot something.,.
jnthn Or inst#./lib 15:25
tbrowder___ i think i made a mistake...be back soon 15:26
tbrowder___ no, it didn’t install in ./lib :( 15:30
i’ll try the file thingy
lucasb tbrowder___: can you run ".say for $*REPO.repo-chain.grep(CompUnit::Repository::Installable)" ? and install on one of the locations shown?
lucasb for example --install-to="inst#/home/user/.perl6", I wonder if it works :) 15:31
tbrowder___ well i’m trying to use Perl6::Parser with a locally installed ./perl6 but installing with system zef, 15:34
moritz uhm, don't do that 15:35
install a zef to your local ./perl6
and use that to install the module
tbrowder___ yes, i have that, but i forgot to set my paths, thank for the reminder 15:36
ls *sh
duh...
tbrowder___ moritz: i think all will be well now, thanks 15:40
SmokeMachine tbrowder___: you could try using 6pm... 15:57
tbrowder___ 6pm?
SmokeMachine github.com/FCO/6pm 15:58
tbrowder___: ^^
tbrowder___ ah, thanks!
for now I’m using the source lib and i think that will suffice for a while 15:59
lucasb m: use Test; is-deeply \(a=>1,b=>2), \('a'=>1,'b'=>2) 16:20
camelia not ok 1 -
# Failed test at <tmp> line 1
# expected: \(:a(1), :b(2))
# got: \(:a(1), :b(2))
lucasb almost got me insane 16:21
m: dd .list, .hash given \(a=>1,'b'=>2) 16:23
camelia (:b(2),)
Map.new((:a(1)))
jnthn Hmmm, that expected/got being the same is not ideal 16:24
\(...) following argument list semantics is correct 16:25
timotimo ooh, that's a good catch
jnthn But it should really dump itself in a better way
timotimo aye 16:26
ooh, i'm running a bit late, so maybe shouldn't go at it immediately :) 16:27
lucasb Maybe Pair.perl could receive tunning arguments: .perl(:pair) to output "'a'=>1", .perl(:named) to output "a=>1"
jnthn I'd probably just make Capture.perl wrap any Pair in parens if it's in the list part 16:28
Though yeah, the other way is also an option and might be prettier
Though a bit less self-contained
SmokeMachine m: my $a = \(a => 1, 'a' => 1); say $a.Array; say $a.Hash 16:43
camelia [a => 1]
{a => 1}
SmokeMachine m: my $a = \(a => 1, 'a' => 2); say $a.Array; say $a.Hash
camelia [a => 2]
{a => 1}
Geth doc: e336c414e7 | (JJ Merelo)++ | doc/Language/objects.pod6
Fixes output as indicated in #2469

However, I'm not so sure now the text (which mentions *arguments*) corresponds to what's there. So I leave this open just in case there's more fixing to make.
17:56
synopsebot_ Link: doc.perl6.org/language/objects
perlbot Geth: Error: DBD::SQLite::db do failed: database or disk is full at ./plugins/karma_modify.pm line 68.
timotimo oh? whoops? 17:59
AlexDaniel ?? 18:01
:D
simcop2387: ↑ what's that? :) 18:02
timotimo ah, cool, the owner is here, too
lucasb that's too much karma 18:06
AlexDaniel oh, right, that makes sense :) 18:12
I was wondering what triggered it, apparently I can read “karma_modify” but not comprehend it :P 18:13
simcop2387 AlexDaniel: something ate my disk space. 18:41
fixed now
simcop2387 (JJ Merelo)++ 18:50
Poohman hello all, I have a question regarding the zef installed modules - if the module uses native bindings how does zef now which dll or lib to save in the store 19:30
?
does zef also fetch the dlls or does it use the dlls already in the system 19:31
?
I am having a problem with IO::Socket::Async::SSL - it seems like a change in dll could help - I looked in the module code and I ended up at the "&gen-lib" 19:33
now trying to figure out how the &gen-lib gets hooked to the dll - it seems like zef has something to do with it- since the dll is stored in a folder under .zef/store 19:35
sena_kun Poohman, I know there are some means to ship a .dll/.so with a module, but not a lot of authors use it iirc.
Poohman sena_kun : can you point me to some documentation regarding this 19:36
sena_kun for IO::Socket::Async::SSL you need to install manually `ssleay32.dll` and `libeay32.dll` and `libeay32.dll`. How do I know it... Firstly, I've looked at github's page of async openssl bindings: github.com/jnthn/p6-io-socket-async-ssl/ <- it uses OpenSSL and there is a `&gen-lib` you saw. But there was not definition for it. So I went to github.com/sergot/openssl and looked at github.com/sergot/openssl/blob/master/ 19:39
lib/NativeLib.pm6 <- it has definitions of `gen-lib` and so on.
github.com/sergot/openssl/blob/mas...ib.pm6#L10 <- consindering you are using Windows, it's first route here.
sena_kun but that is a bit odd, github.com/sergot/openssl/blob/mas...6.json#L30 <- here, Windows dll are set to be installed by zef. Hmmmm. 19:41
Poohman, did you do `zef install IO::Socket::Async::SSL`? Can you post an error at some paste service like e.g. pastebin? 19:42
Poohman sena_kun: I did a zef install IO::Socket::Async:SSL an dhad to jump through some loops to get installed as the it had to extract a tar.gz file 19:43
I ended up installing perl5 to get it done using p5tar 19:44
ill try to for reinstall it again
Poohman pastebin.com/fZNnjBxm 20:00
sena_kun hmm, that is pretty odd. is OpenSSL module installed? as in, output of `perl6 -e 'use OpenSSL::NativeLib'` results into an error or not? 20:05
Poohman sena_kun: no error - it is installed 20:08
sena_kun hmm, I wonder what is wrong then. :S It is possible to install a module ignoring failing tests, but that is not a real solution, just workaround. 20:10
Poohman i have problems when trying use Cro with https 20:11
sena_kun that's because `Cro::TLS` is either not installed or being broken for you, hmm.
Poohman this module IO::Socket::Async::SSL is a dependency for cro::HTTP::client 20:13
I get the error thrown from here
Original exception:
Cannot locate symbol 'SSL_CTX_set_default_verify_paths' in native library 'C:\Users\rajwinf\AppData\Local\Temp\2FC5F7EF8D0AFE518A95E331964D06DDC8B8529A\libeay32.dll'
in method setup at C:\rakudo\share\perl6\sources\24DD121B5B4774C04A7084827BFAD92199756E03 (NativeCall) line 283
in method CALL-ME at C:\rakudo\share\perl6\sources\24DD121B5B4774C04A7084827BFAD92199756E03 (NativeCall) line 570
in block at C:\rakudo\share\perl6\site\sources\9185AF0B330E61F6756B436B9695D044E0F403B7 (IO::Socket::Async::SSL) line 289
sena_kun Poohman, I can only recommend to open an issue at github.com/jnthn/p6-io-socket-async-ssl/issues with a description of what you tried and an error log.
Poohman issue has been opened in 2017 and I added my comment as well 20:14
sena_kun sorry, don't have a windows box to try to help more.
ah, opened back in 2017. that's unfortunate.
Poohman sena_kun : no problems - but thank you so much for your help
let me keep trying - will get somewhere hopefully 20:15
but thanks a lot - appreciate the help
jnthn Could it just be that the version of libssl that's bundled is too old? 20:23
sena_kun ouch 20:23
last commit there is 2 years ago. 20:24
jnthn We rely on IO::Socket::SSL for the DLL
jnthn sena_kun: 2 years ago for the bundled DLLs? 20:25
sena_kun jnthn, it was for `OpenSSL`, so if we are using `IO::Socket::SSL` there, then never mind.
sena_kun github.com/sergot/openssl/tree/master/resources <- 20:25
jnthn sena_kun: Ah, probably IO::Socket::SSL depends on OpenSSL 20:26
Maybe we're actually depending on OpenSSL in IO::Socket::Async too; I forget.
sena_kun well, the reason is that `IO::Socket::SSL` does not bundle anything, and dependencies in `OpenSSL` are two years old.
sena_kun so. 20:26
those need to be updated. 20:27
jnthn Ah, yeah, OpenSSL is what we depend on in IO::Socket::Async::SSL. Sorry for the confusion :) 20:27
And yeah, they do.
jnthn That'll probably resolve at least that problem. 20:28
sena_kun .seen sergot
yoleaux I saw sergot 14 Mar 2018 21:46Z in #perl6: <sergot> ufobat_: ping
sena_kun sergot, ping? 20:28
tbrowder___ can anyone give me a link to lizmat’s article or blog on p6 containers referenced earlier? thanks. 21:42
El_Che opensource.com probably
Xliff \o 22:01
What's the best way to create a Pointer in NativeCall created from a P6 Scalar?
m: use NativeCall; my $a = 42; my $b = nativecast(Pointer, $a); say $b; say $b.deref 22:02
camelia Native call expected return type with CPointer, CStruct, CArray, or VMArray representation, but got a P6opaque (Int)
in sub nativecast at /home/camelia/rakudo-m-inst-2/share/perl6/sources/947BDAB9F96E0E5FCCB383124F923A6BF6F8D76B (NativeCall) line …
Xliff m: use NativeCall; my uint32 $a = 42; my $b = nativecast(Pointer, $a); say $b; say $b.deref
camelia Native call expected return type with CPointer, CStruct, CArray, or VMArray representation, but got a P6opaque (Int)
in sub nativecast at /home/camelia/rakudo-m-inst-2/share/perl6/sources/947BDAB9F96E0E5FCCB383124F923A6BF6F8D76B (NativeCall) line …
Xliff m: use NativeCall; my uint32 $a = 42; my $b = Pointer.new; say $b; say $b.deref 22:03
camelia NativeCall::Types::Pointer<NULL>
Can't dereference a Null Pointer
in method deref at /home/camelia/rakudo-m-inst-2/share/perl6/sources/8660F65A7B3492675BB3B2058DB30E411A4C4E54 (NativeCall::Types) line 41
in block <unit> at <tmp> line 1
Xliff m: use NativeCall; my uint32 $a = 42; my $b = Pointer[uint32].new; $b.deref = $a;
camelia Can't dereference a Null Pointer
in method deref at /home/camelia/rakudo-m-inst-2/share/perl6/sources/8660F65A7B3492675BB3B2058DB30E411A4C4E54 (NativeCall::Types) line 58
in block <unit> at <tmp> line 1
Xliff m: use NativeCall; my CArray[uint32] $a = CArray[uint32].new(42); 22:10
camelia ( no output )
Xliff m: use NativeCall; my CArray[uint32] $a = CArray[uint32].new(42); say $a;
camelia NativeCall::Types::CArray[uint32].new
Xliff m: use NativeCall; my CArray[uint32] $a = CArray[uint32].new(42); say $a.deref
camelia No such method 'deref' for invocant of type 'NativeCall::Types::CArray[uint32]'
in block <unit> at <tmp> line 1
Xliff m: use NativeCall; my CArray[uint32] $a = CArray[uint32].new(42); say $a[0]
camelia 42
timotimo Xliff: i don't think you can have a pointer into a lexical, since the C side isn't able to say "i'm holding on to that closure, please don't GC" 23:51
using a single-slot CArray is the way to go here, indeed. 23:52