»ö« 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.
timotimo wow, turns out an array doesn't get entries if you don't put them into it 00:07
Garland_g[m] I think function pointers are the reverse of what I need here. I need to take a function from perl6-land and store it in a CStruct. 00:14
timotimo right, callbacks 00:16
those also exist
i wonder if the libssh bindings have any of those
as examples
Garland_g[m] My naive implementation looks something like: class Thing is repr('CStruct') { has Pointer $.method; submethod BUILD(method => &method) { $!method = &method } } 00:24
timotimo i think you want an actual callable in there, but i'm not sure 00:25
or perhaps you have to nativecast?
Garland_g[m] Nativecast on &method complains about receiving a P6Opaque (Block) 00:27
timotimo ah, mhm 00:28
Garland_g[m] Trying to assign to a Pointer attribute gives me "cannot assign to an immutable value." 00:31
timotimo that's potentially just missing "is rw"
Garland_g[m] Whoops. I forgot to add "is rw" to my example, but I have it in my code. 00:36
timotimo OK, i see now that libssh hasn't got CStruct in it 00:37
Garland_g[m] Thanks for all the help. 01:00
timotimo sorry i couldn't give the solution :( 01:01
ToddAndMargo Hi All, How do I get "contains" to tell me if a fragment exists starting at the beginning of the string? 01:08
p6 'my $x="-v abc"; if $x.contains( "^-v" ) {say "yes"}else{say "no"};'
timotimo m: my $x = "-v abc"; say $x.starts-with("-v") 01:10
camelia True
ToddAndMargo p6 'my $x="-v abc"; if $x.starts-with( "-v" ) {say "yes"}else{say "no"};' yes 01:12
Thank you!
timotimo no problem :)
ToddAndMargo is there a way to ask .contains to do a logical AND for two fragment in the same call? 02:03
AlexDaniel m: say ‘hello’.contains(‘h’ & ‘o’) 02:05
camelia all(True, True)
AlexDaniel m: say so ‘hello’.contains(‘h’ & ‘o’)
camelia True
AlexDaniel ToddAndMargo: ↑ yes, just use junctions
ToddAndMargo Thank you! what do you mean by "junctions"? 02:06
AlexDaniel ToddAndMargo: 'h' & 'o' creates an AND junction 02:12
ToddAndMargo: see some docs here: docs.perl6.org/type/Junction
ToddAndMargo Thank you! 02:19
Geth doc: 32d0bbc3f7 | ijneb++ | doc/Language/operators.pod6
consistent whitespace
10:57
synopsebot Link: doc.perl6.org/language/operators
Geth doc: 601d8c2a66 | (Douglas L. Schrag)++ | doc/Language/py-nutshell.pod6
Use of sigils consistent between code and description

Examples in py-nutshell use both scalar sigil and sigil-less variables in examples. Fix a couple of cases where the comment or description does not match the code.
14:30
synopsebot Link: doc.perl6.org/language/py-nutshell
stmuk www.programming-idioms.org/ <=- probably should include p6 16:16
timotimo the input field lets you write "Perl6" or "Perl 6" without turning red immediately 16:28
and the preview renders it, too
so maybe that's all it takes
if someone submits like 10 or 20 over the course of a day, surely the webmasters will accept the contributions
whereas if there's only one contribution, perhaps they'll be reluctant to add it immediately 16:29
feel absolutely free to disagree, of course
rindolf timotimo: hi 18:07
i've been refactoring some ancient perl 5 code and often when i had to write something a little complex i found myself thinking "fixed in p6" 18:09
moritz \o 18:18
back after them traveling (though not Glasgow) 18:19
timotimo :) 18:34
moritz (instead Black Forest and Strasbourg) 18:35
DavdiChipman Hi there. I'm trying to build perl 6 on Cygwin, and it's faiing ot compile. when trying to build NQP. 18:42
I have the stderr output in a file 18:43
timotimo can you put the text up on a nopaste site or something? 18:47
DavdiChipman I wil once I've retried compiling things. 18:48
I saw a path in the error output that made litle sense given the way the source archive was arranged.
DavdiChipman Sorry for taking so long. Here you go: pastebin.com/ubeVGuQu 18:58
jnthn Ah, it isn't even getting to NQP, it's MoarVM that's got a bunch of compiler errors. 18:59
Which isn't so surprising; MoarVM depends on libuv, and until recently that didn't support cygwin. I believe it does now, but probably there's other work needed for that to build on cygwin. 19:00
DavdiChipman Huh, OK... Thanks, jnthn 19:01
jnthn I know little about cygwin, but glancing the errors it seems it's trying to compile uses of the Win32 API
jnthn And I guess (though not sure) it's meant to use more POSIX-y things 19:02
DavdiChipman I saw that (tryign to use WIn32 API) 19:04
DavdiChipman Well, I did get the binary for windows, so.... 19:05
timotimo perl6.org/~timo/ - there's also this ... 19:06
oh wait 19:07
that's 32bit, which not everybody wants
(especially since it's jitless)
.o( rakudo is scared jitless )
DavdiChipman LOL!!!!
jnthn I think most folks are scared jitless of porting it to x86 :P 19:09
The lack of registers available would probably make that a less than fun exercise.
DavdiChipman *nods* 19:12
DavdiChipman Thank you for your help. 19:14
uzl The code block (C<Rat>, C<Num>, etc.) inside the table in docs.perl6.org/language/math#Arithmetic. are not being rendered as such. 19:42
Would it be fine to remove them and just display the regular text?
timotimo right, formatting codes in tables have been NYI for a long long time 20:09
uzl oh, great to know that. 20:19
timotimo i once tried to implement it, but it wasn't the right way and i didn't try again 20:20
Geth ecosystem: 38228b573d | thundergnat++ (committed using GitHub Web editor) | META.list
Add module Timer to the ecosystem
20:29
doc: uzluisf++ created pull request #2271:
Add minor corrections
20:30
uzl timotimo: I just removed them so they don't show up in the rendered html. 20:38
Geth ecosystem: bc11fcb678 | thundergnat++ (committed using GitHub Web editor) | META.list
Fixed broken link to no-longer existing META.info
21:17
doc: c1e89ae1f6 | (Luis F. Uceta)++ | 2 files
Add minor corrections

Add minor corrections such as removing dangling period in headers, fixing typo, removing C<> from table components given that are not rendered (NYI), etc.
21:24
doc: f085b09883 | Altai-man++ (committed using GitHub Web editor) | 2 files
Merge pull request #2271 from uzluisf/master

Add minor corrections
timotimo thank you for contributing \o/ 21:25