🦋 Welcome to Raku! raku.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: colabti.org/irclogger/irclogger_log/raku
Set by ChanServ on 14 October 2019.
jnthn japhb: gRPC is largely HTTP/2 + protobuf, iirc? 00:01
japhb jnthn: yeah, with bidi streaming and some pluggability/automation of the basics (auth, health checks, etc.) I suspect it would work quite well as a Cro protocol. 00:10
jnthn Yeah, that's what I was thinking :) 00:12
brass Does anyone here use the emacs plugin? I'm running into an indentation error imgur.com/a/tHW9I8a 00:13
MasterDuke brass: i don't, but i believe AlexDaniel, tbrowder, and TreyHarris all do 00:16
japhb At one point I considered doing a NativeCall binding of one of the "tiny C lib" implementations of protocol buffers, like unleaded (upb) or nanopb, but didn't have any more time for that than I did p6-pb, so ... 00:18
tbrowder brass: the indention of HERE blocks is a problem. i wish a smart emacs person could solve it.
japhb brass: I do, and I do see occasional indentation bugs. 00:19
AlexDaniel brass: I can reproduce it! 00:20
brass: weird, it doesn't look like it should be confused by something that simple 00:21
you can do this to work around it: if (%.cache{$key}) {
brass: but yeah, please report the bug, I think someone is actualy taking caring of the mode now 00:22
brass Do you know what causes the weird indentation?
Ok I'll open a report 00:23
cfa hmm, is the docs.raku.org build failing? 01:38
clarjon1 just ported a little snippet that i've used a lot with p5 over to p6, and i gotta say 06:26
i've not been that excited about coding in a while :D
rindolf hi all sup? 07:48
ZzZombo m: package Attribute::Foo { };use Attribute::Foo; 08:47
camelia ===SORRY!===
Could not find Attribute::Foo at line 1 in:
inst#/home/camelia/.perl6
inst#/home/camelia/rakudo-m-inst-1/share/perl6/site
inst#/home/camelia/rakudo-m-inst-1/share/perl6/vendor
inst#/home/camelia/rakudo-m-inst-1/s…
ZzZombo m: package Attribute { };use Attribute; 08:48
camelia ===SORRY!===
Attribute is a builtin type, not an external module
ZzZombo m: package AttributeQWE { };use AttributeQWE; 08:48
camelia ===SORRY!===
Could not find AttributeQWE at line 1 in:
inst#/home/camelia/.perl6
inst#/home/camelia/rakudo-m-inst-1/share/perl6/site
inst#/home/camelia/rakudo-m-inst-1/share/perl6/vendor
inst#/home/camelia/rakudo-m-inst-1/sha…
lizmat m: package A { sub a() is export { say "foo" } }; import A; a # ZzZombo: is that what you're looking for ? 08:59
camelia foo
ZzZombo No, I checked if my old RT ticket was resolved. 09:00
lizmat ah, ok
ZzZombo m: rule m:sym<123> { 123 } 11:53
camelia Potential difficulties:
Useless declaration of a has-scoped method in mainline (did you mean 'my rule m:sym<123>'?)
at <tmp>:1
------> 3rule 7⏏5m:sym<123> { 123 }
ZzZombo m: my rule m:sym<123> { 123 } 11:54
camelia ( no output )
ZzZombo m: my rule m:sym<*&asd> { 123 }
camelia ( no output )
ZzZombo m: grammar G { rule m:sym<*&asd> { <sym> }};G.subparse('*&asdd`).say 11:59
camelia 5===SORRY!5=== Error while compiling <tmp>
Unable to parse expression in single quotes; couldn't find final "'" (corresponding starter was at line 1)
at <tmp>:1
------> 3asd> { <sym> }};G.subparse('*&asdd`).say7⏏5<EOL>
expecting …
ZzZombo m: grammar G { rule m:sym<*&asd> { <sym> }};G.subparse('*&asdd').say
camelia No such method 'TOP' for invocant of type 'G'
in block <unit> at <tmp> line 1
ZzZombo m: grammar G { rule m:sym<*&asd> { <sym> };regex TOP {<m>} };G.subparse('*&asdd').say
camelia No such method 'm' for invocant of type 'G'
in regex TOP at <tmp> line 1
in block <unit> at <tmp> line 1
ZzZombo m: grammar G {proto rule m{*};rule m:sym<*&asd> { <sym> };regex TOP {<m>} };G.subparse('*&asdd').say 12:00
camelia #<failed match>
ZzZombo wut 12:01
m: grammar G {proto rule m{*};rule m:sym<*&asd> { <sym> };regex TOP {<m>} };G.subparse('*&asdd').perl.say 12:03
camelia Match.new(list => (), hash => Map.new(()), orig => "*\&asdd", pos => -3, made => Any, from => 0)
ZzZombo m: grammar G {proto rule m{*};rule m:sym<123> { <sym> };regex TOP {<m>} };G.subparse('123d').say 12:28
camelia #<failed match>
ZzZombo m: grammar G {proto rule m{*};rule m:sym<123> { <sym> };regex TOP {<m>} };G.subparse('123').say
camelia 「123」
m => 「123」
sym => 「123」
donaldh o/
tellable6 2019-11-01T23:55:37Z #raku <japhb> donaldh: \o/ # I can't even tell you how useful that is to me. I just ran out of time back then to work on it, and have wanted it at least once a week every week since.
donaldh japhb++ lots of gRPC stuff I want to do too. Looks like a good fit for a Cro protocol: github.com/grpc/grpc/blob/master/d...L-HTTP2.md 12:32
xinming SmokeMachine: github.com/FCO/Red/pull/404 13:23
SmokeMachine: When you have time, Please merge those patches, I know I should create 3 merge reqeusts, But as it's WIP, And patches are not large, So single merge reqeust for this. 13:37
lucs I'm using a 5.30.0 perlbrew built with -Duseshrplib (and -Dusemultiplicity), yet Inline::Perl5 appears to use the perl5 that was active when perl6 was built. 13:51
Am I doing something wrong?
Doc_Holliwood is there an offline version of the documentation? 14:14
MasterDuke Doc_Holliwood: p6doc. i think zef can install it? 14:16
Doc_Holliwood ah, allright. i was thinking more of a html version. 14:19
MasterDuke yeah, there's a giant one-page version 14:21
don't remember the link 14:22
you can find it if you search the irc logs 14:23
Altai-man_ Doc_Holliwood, github.com/perl6/doc/releases <- have you seen this? 14:29
uzl[m] Doc_Holliwood: Probably github.com/rakudocs/rakudocs.github.io ? 14:38
brass I'm trying to write a module using NativeCall but I'm getting these errors when I try to `use` it pastebin.com/zwzTrrxb 14:50
MasterDuke Doc_Holliwood: docs.perl6.org/perl6.xhtml 14:51
brass This is all the module does so far pastebin.com/97Gippeg
timo1 brass: the lock you're trying to lock isn't defined, i.e. not from a .new 14:52
brass timo1: what lock? 14:53
tellable6 brass, I'll pass your message to timo1
timotimo hard to tell without a stack trace
can you try if running it with "perl6 --ll-exception " gives a stacktrace for those errors?
brass ok 14:54
timotimo oh, hum, that lock in question can only be the one inside nativecall, or inside each of the subs?
brass I tried to run using ll exceptions but the error is the exact same 14:55
This error is happening just when I `use OpenBSD` without doing anything else
Also the functions appear but they don't work and cause their own errors
timotimo oh, i wonder if "is native" without a library name there is causing trouble
brass It's part of OpenBSD's unistd.h so I'm not sure what I would import 14:56
If I define the exact same functions in my REPL they work perfectly
They only break when I put them in a module
timotimo if it's already loaded into the executable, i believe you need to "is native(Str)", or maybe passing nothing has actually been added at some point? 14:57
brass it seems to work in the repl
I could try passing an empty string I suppose 14:58
This is the full session btw pastebin.com/QeXnr9TA 14:59
brass And here it is if I define it in the repl pastebin.com/sYTpmeiX 15:00
timotimo i meant an undefined string, i.e. the Str type object 15:02
rather than an empty string
timotimo that's super weird 15:03
timotimo can you give us your rakudo version, too? 15:03
brass Sure, 1 sec 15:04
timotimo perl6 --version will do it
brass "This is Rakudo version 2018.12 built on MoarVM version 2018.12
implementing Perl 6.d."
timotimo that's a little old
brass This is the latest version on OpenBSD :/
I could try downloading and compiling the newest version I suppose 15:06
lucs Problem with Inline::Perl5 + perlbrew : gist.github.com/lucs/a4c91c7a408b3...6ebfc0e1c4 15:06
AlexDaniel clarjon1: yay :) 15:09
uzl[m] Is SockAddr and Addrinfo supposed to be in the code block's configuration data?github.com/perl6/doc/blob/master/d...#L906-L922 15:16
It doesn't show up in the rendered HTML docs.raku.org/language/nativecall#...C_function 15:17
uzl[m] Only `sub getaddrinfo( Str $node, Str $service, Addrinfo $hints, Pointer $res is rw ){...}` is shown but the reader won't have idea where Addrinfo is coming from. 15:18
uzl[m] Never mind. They're defined later on. ;-) 15:24
Geth_ doc: uzluisf++ created pull request #3079:
Place C<> around types. Also Perl -> Raku
15:40
SmokeMachine xinming: I've made some comments there.... 15:47
uzl[m] \me wonder what's the process for Hackerrank (www.hackerrank.com/) to support a language. It'd be neat to have Raku on there. 15:49
Juerd Did a silly thing yesterday: twitter.com/Whreq/status/1190421899496570880 # if $foo and either $bar or $baz { ... } 16:04
Geth_ doc: d55ff61467 | (Luis F. Uceta)++ | doc/Language/nativecall.pod6
Place C<> around types. Also Perl -> Raku
16:16
doc: e1c1639b2a | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | doc/Language/nativecall.pod6
Merge pull request #3079 from uzluisf/master

Place C<> around types. Also Perl -> Raku
brass timotimo: I compiled the newest moarvm, nqp and rakudo and now there are no more issues with the module 😃 16:23
timotimo phew!
brass Also wow, the raku nativecall library is absolutely amazing! 16:35
It's so easy to use
[Coke] glad to hear it. :) 16:37
brass If I'm exposing some OpenBSD system calls (pledge, unveil), would it be better to export it from my module or declare it as "our sub"? 17:52
Any opinions? 17:53
japhb brass: You're creating a module for OpenBSD syscalls, I take it? 17:58
brass Yep :)
tadzik brass: well, you can do both I think :) 17:58
japhb If so, you should 'is export' your stuff. Import is lexical, so people can import in a smaller lexical scope as desired, plus 'is export' just exports them for tag DEFAULT. Users can choose not to import DEFAULT if they don't want to. 17:59
brass japhb: got it, thanks!
Kaeipi huh, a library for openbsd calls was something i didn't think was needed since there isn't a whole lot to defining the subs for them 18:10
brass Yeah, but if you're writing a lot of scripts on openbsd it's easier to import than redefine them every time 18:51
It's also practice for me, since I'm new to raku 18:55
colomon o/ 19:35
brass colomon: hello! 20:05
colomon trying to sort out how to handle Latin-1 characters being returned from a routine called by Inline::Perl5 20:08
called via, I guess a better way to say it.
veesh is zoffix gonna come back now that the rename happened? 21:13
or is that a sore topic
discord6 <kelly> who's zoffix? 21:14
lizmat veesh: I sincerely hope so... 21:16
that he will come back, I mean :-)
timotimo it sounded a little bit like he's not interested in coming back to programming stuff, but i'd also be happy to welcome him back 22:33
Tirifto Hello! Is anyone here using Emacs to work with Raku? 22:44
timotimo a few people are, not me though 22:49
AlexDaniel Tirifto: yes! 22:52
Tirifto AlexDaniel: Awesome! :D What mode are you using for that? 22:53
AlexDaniel Tirifto: perl6-mode
Tirifto: github.com/perl6/perl6-mode
Tirifto AlexDaniel: I've read that cperl-mode should supposedly work with Raku; have you ever tried that? 22:55
AlexDaniel Tirifto: any reason you can't use perl6-mode? 22:56
Tirifto Perl6-mode works well for me, but seems to ignore Pod and Heredoc.
AlexDaniel Tirifto: do you have an example? I'd like to reproduce
Tirifto AlexDaniel: Give this a try – coinsh.red/u/55p6modexample.txt 23:02
AlexDaniel Tirifto: ahh, indeed 23:04
I thought it was supposed to look like that? :)
now that I think about it, yeah, it should be highlighted like a comment 23:05
Tirifto Well, I can't say for sure what the author intended, but I'd expect it to work more like perl-mode for Perl 5. :P 23:07
That is, for that which won't be interpreted as code to not be highlighted as such.
AlexDaniel Tirifto: file a bug report! I think someone is taking care of perl6-mode now 23:21
.seen TreyHarris
tellable6 AlexDaniel, gist.github.com/3c99680744f5eb6d11...e9c1bd25b2
AlexDaniel if tellable6 gists another normal message I swear I'll kill it 23:22
:D