🦋 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.
00:15 guifa2 joined 00:38 guifa2 left 00:58 wildtrees left 01:27 pat_js joined 01:50 daemon-boy joined
daemon-boy hello everyone! I hope this is a quick question (which I couldn't find the answer to in FAQs or after googling) 01:51
Is there a raku equivalent of Perl's Task::Kensho? 01:53
If not, I'll use Inline::Perl5 etc etc etc 01:59
02:04 mjsir911 joined 02:06 marcusr left 02:07 johnjohn101 joined 02:08 marcusr joined
mjsir911 Is there any easy way to start a subprocess with unconventional file descriptors? 02:08
Geth_ ¦ problem-solving: vrurg assigned to jnthn Issue export trait must operate with declared package name github.com/perl6/problem-solving/issues/142 02:19
vrurg mjsir911: I think you're looking for Proc::Async, perhaps? 02:21
tellable6 2019-12-28T07:42:40Z #raku-dev <Xliff> vrurg Hmmm... If I am already overriding ClassHOW.compose, doesn't that mean I can use my own RoleToClassApplier?
vrurg .tell Xliff no, it won't work this way because you'd need to override RoleToClassApplier and somehow make the default compose use it which is... er... hard considering that the default is part of the core MOP. :) 02:23
tellable6 vrurg, I'll pass your message to Xliff
02:29 Voldenet left 02:36 Voldenet joined, Voldenet left, Voldenet joined 03:11 Xliff joined, Xliff left 03:12 Xliff joined 04:00 Merfont joined, Kaeipi left
xinming_ SmokeMachine: :-) That's quite fast. 04:27
SmokeMachine: I'll rewrite my bot to use Red. to see if any basic features are still missing. 04:32
05:07 evalable6 left 05:09 evalable6 joined 05:24 mahmudov left 06:12 Poohman left 06:22 johnjohn101 left 06:27 guifa2 joined 06:44 daemon-boy left
holyghost I am going to work some more on pagan, a graphics system for games 06:49
it's on Xliff's server
Just a week of vacation would be nice :-) 06:50
There's a MILESTONES.txt file on github.com/theholyghost2/pagan 06:56
xinming_ What is pagan? 06:59
holyghost a perl6 graphics project
it comes from Ultima 8
Hence pagan 07:01
Thing is, if you read the MILESTONES.txt file, you see where I will e going
It's in the main directory on githu mentioned above 07:02
SmokeMachine xinming_: thanks! And please, let me know if you need any help 07:13
holyghost It features AI code game entities within the graphics system 07:22
Each sucbclassed entity can provide you an AI 07:38
for your game
07:50 rindolf joined 07:52 vrurg left 07:55 wamba joined 07:58 mahmudov joined 08:16 gabiruh joined 08:19 gabiruh_ left 08:21 guifa2 left 08:37 sauvin left 08:38 sena_kun joined, sauvin_ joined
xinming_ Is there a job queue implementation in pure perl6? 08:49
If there are multiple, Which one is recommended please? :-)
09:03 sauvin_ is now known as Sauvin
sena_kun xinming_: you mean broker servers or? 09:43
there is e.g. rabbitmq client available 09:44
xinming_ sena_kun: I know rabbitmq, What I mean is, wether there is a full lib implmenetation for job queue like rabbitmq. 09:50
no need to be as featureful nor as powerful 09:51
github.com/retupmoca/P6-Net-AMQP This is the one I plan to use, But if there is a pure raku version sollution, I'll go and check that. 09:53
sena_kun xinming_: I see github.com/tony-o/perl6-mux and github.com/perl6-community-modules/perl6-Proc-Q
not sure how do they fit, but there are readme with some docs, so
xinming_ Yea, I'll check them. 09:54
BTW, if we use rabbitmq, Is P6-Net-AMQP recommended? I saw it last update is a year ago.
sena_kun xinming_: I am not sure we have anything else. if something is broken, you can, you know, patch it yourself as it sometimes happens with raku. :) 09:56
xinming_ Ok. got it, thanks. 09:57
I can troulbe here.
10:00 rindolf left, cpan-raku left, cpan-raku joined, cpan-raku left, cpan-raku joined 10:01 rindolf joined 10:05 libertas left 10:41 sena_kun left 10:56 sena_kun joined 10:57 Voldenet left 11:04 Voldenet joined, Voldenet left, Voldenet joined 11:09 Voldenet left 11:15 Voldenet joined, Voldenet left, Voldenet joined 11:53 chloekek joined 12:11 chloekek left 12:31 wamba left 12:34 wamba joined 12:41 sena_kun left 12:50 stoned75 joined 12:55 sena_kun joined 13:05 chloekek joined 13:13 pmf[m] joined 13:32 kensanata joined
Geth_ doc: acab7151fc | (Elizabeth Mattijsen)++ | doc/Type/Str.pod6
Remove documentation of "val-or-fail"

This is an untested documentation detail of val() processing and a hack to use the same code for numerification of strings.
13:36
13:40 veesh_ joined 13:43 veesh left 13:45 veesh_ left
Geth_ doc: threadless-screw++ created pull request #3134:
Fixes: #3107
13:49
14:08 Poohman joined
Geth_ doc: e0e866bc5c | threadless-screw++ | doc/Language/control.pod6
Fixes: #3107
14:09
doc: ab50c3ea14 | threadless-screw++ | doc/Language/control.pod6
Correction of variable name in example
doc: e8c626bbf0 | (Elizabeth Mattijsen)++ (committed using GitHub Web editor) | doc/Language/control.pod6
Merge pull request #3134 from threadless-screw/control-flow-loop

Fixes: #3107
14:13 cpan-raku left 14:21 cpan-raku joined, cpan-raku left, cpan-raku joined 14:25 mahmudov left 14:27 mahmudov joined 14:29 mensvaga joined
mensvaga I'm writing a module that I think I would like to upload. However, I'm unsure of what to name it. 14:30
It's an object oriented interface to constructing Nagios plugin output.
But, the way I'd name it "internally" (at least, inside my organization) would be something like: edu::university::net::Incident::Report::Nagios 14:31
tadzik the edu::univesity::net is probably more fitting for the :auth part of your module, not its name 14:32
mensvaga Yeah, the thing about it is, that I don't know if I'm "overstepping" my authority to name something like Incident::Report::Nagios , or to design, and subsequently take the namespace for an object oriented hierarchy 14:33
tadzik the :auth makes it so that you'll never really The Authority[tm]
14:33 AlexDaniel left
mensvaga I guess I need to read moar 14:33
tadzik you can have yuor Incident::Report::Nagios:auth<mensvaga.university>, I can have my Incident::Report::Nagios:auth<tadzik> and it's all fine :) 14:34
see design.raku.org/S11.html#Versioning for vague spec
mensvaga OK. I think I see what I have to do. Thanks for your help. 14:39
tadzik in general: don't worry about "hijacking" a name too much, it's not that big of a threat in Raku 14:40
it allows for multiple modules (installed, even) with the exact same name but with different versions by different authors
and they can peacefully coexist even inside the same codebase
14:41 sena_kun left 14:56 sena_kun joined 15:09 mahmudov left 15:10 mahmudov joined
mensvaga Yes. For this, I was experimenting with a "good" example for what I use Perl for in general, and wanted to apply some sort of Object Oriented thing to it. I'm not in to ITIL (much), but I began to think that Nagios Plugin output was a type of "Incident Report", even if the result was "OK". 15:11
But, I'm happy enough with it to actually publish it 15:12
xinming_ Is there a upper limit for doing something like my $promise = Promise.new; for @jobs -> $job { $promise = $promise.then(-> $x { ... }); }; 15:22
If the @jobs list is really large, Will this be a issue? If so, I'll think a way to avoid chaining promises like this. 15:23
15:28 mahmudov left 15:30 mahmudov joined 15:35 RobRaku joined
mensvaga The docs here, docs.raku.org/language/modules , say that I could name my project directory Incident-Report-Nagios , but what if I have a Ruby version of the module too? 15:37
Can I name my "project directory" "Raku-Incident-Report-Nagios" ? 15:38
moritz you can put your projects into any directory you like
tellable6 2019-12-27T22:08:40Z #raku <dakkar> moritz you may be interested in a case of strange slowness in regex matching: colabti.org/irclogger/irclogger_lo...12-27#l326
mensvaga and, under that have lib/Incident/Report/Nagios.pm6 ? 15:39
I'm gonna go ahead and try doing that. 15:40
moritz yes, that works
15:55 mensvaga left 15:58 mahmudov left 16:00 mahmudov joined
xinming_ termbin.com/b7j4 Anyone ehre knows why isn't my example work? The whenever block never got triggered. 16:08
If I have that tap uncommented, It works fine 16:09
But what I actually what is, the reach block reacts to the supply emit event. 16:11
16:13 guifa2 joined
Voldenet xinming_: are you sure you need Supplier and not Channel? 16:20
16:20 rindolf left
Voldenet nevermind, I understood what you wanted 16:21
16:29 mensvaga joined 16:31 kensanata left, dogbert2 left 16:32 dogbert2 joined
mensvaga If I have a file, lib/Incident/Report/Nagios.p6m , and in it, this class is defined: Incident::Report::Nagios , do I need to put something like "package Incident::Report::Nagios" above that (or anything?) 16:34
chloekek No.
Classes are packages.
mensvaga Kewl. 16:35
Someone got chocolate on my peanut butter! Somebody got peanut butter on my chocolate!
Perl6: It's a Reese's
chloekek got peanut sauce on her cauliflower 16:39
It’s nice.
16:41 sena_kun left 16:42 RobRaku left 16:44 rindolf joined
mensvaga giggity 16:47
Voldenet xinming_: I'm slightly not understanding the purpose of recursive 'do-one' call here, on top of it I'm not sure why there's non-whenever block in a react block
16:50 jmerelo joined
Voldenet maybe consider using `$supplier.Supply.act` and ditching the 'whenever' block 16:54
it does more or less what you wanted: ix.io/25Pp
(I'd spawn three threads with a channel for each worker, easier to fathom) 16:56
16:56 veesh joined 16:57 sena_kun joined, mahmudov left 16:59 mahmudov joined
chloekek p6: class C { method m { self!p }; method p { say 1 } }; C.new.m 17:04
camelia 5===SORRY!5=== Error while compiling <tmp>
No such private method '!p' for invocant of type 'C'. Did you mean any of these?
m
p

at <tmp>:1
------> 3class C { method m { self!7⏏5p }; method p { say 1 } }; C.new.m
chloekek p6: class C { method m { self.p }; method !p { say 1 } }; C.new.m
camelia No such method 'p' for invocant of type 'C'. Did you mean any of these?
m
!p

in method m at <tmp> line 1
in block <unit> at <tmp> line 1
xinming_ Voldenet: That's not what I meant. 17:33
docs.perl6.org/language/concurrency <--- Here, we have supply { whenever $supply.xxx { } } What I try is to replace supply with react. 17:34
supply { whenever $supplier.Supply { ... } }
the Supply.act thing, is almost the same as $supply.tap(-> { ... }) IMO 17:35
17:38 guifa2 left
Voldenet Supply.tap is used internally anyway 17:42
> github.com/rakudo/rakudo/blob/3f69....pm6#L1958
xinming_: it is possible to fix your snippet by replacing 'done' with '$supplier.done' 17:51
ix.io/25PM
`done` finishes the supply provided to react before whenever block can run, because 'do-one' is ran before whenever entirely 17:54
17:57 RobRaku joined 18:11 rindolf left 18:14 rindolf joined
xinming_ Voldenet: termbin.com/q0k0 I use channel to do what I wished. And now it worked. :-) 18:23
Voldenet: sorry, was testing in another terminal, I'll read your example now.
Voldenet: It's a bit strange, that without done unless @queue it works, and react block waits there. 18:35
I think maybe because the program runs so fast, and reacts quit, and stdout buffer is not flushed in this case? 18:36
As I see with $supplier.done works fine.
18:39 vrurg joined 18:42 sena_kun left
Voldenet xinming_: react block uses promises, so it's pretty much guaranteed that supplies will get exhausted 18:43
18:57 sena_kun joined 19:16 jmerelo left
mensvaga If I have lib/Incident/Report/Nagios.p6m , and I have bin/a_program.p6 , what do I put into bin/a_program.p6 to be able to load and use Incident::Report::Nagios ? 19:30
(I suspect I could add a library path relative to bin/../lib , buuuut I don't know if that's the "correct" way 19:31
)
(I suppose the same question would go for tests; like if I'm following docs.raku.org/language/modules , what would I put in "basic.t" )? 19:34
19:36 AlexDaniel joined, AlexDaniel left, AlexDaniel joined
mensvaga use lib $*PROGRAM.IO.resolve.parent.sibling('lib/'); ? 19:38
I suppose I'd use that if I *knew* I were in a repository
19:42 kensanata joined 19:55 dogbert11 joined 19:58 dogbert2 left
Xliff Is anyone here familiar with Cro? 20:06
Geth_ doc: stoned++ created pull request #3135:
Be more specific in selecting href to "external" sites
20:08
sena_kun Xliff: me is 20:10
Xliff Ah! You're awake, sena_kun!
sena_kun kind of 20:11
Xliff sena_kun: I'm trying to make a Cro-based application where routes can be defined in a modular way. Is that currently possible with Cro?
sena_kun sure
Xliff In other words, I'd like the ability to define the servers routes across many modules.
sena_kun include
will help you
;)
Xliff Got an example?
sena_kun Xliff: have you read the advent post? 20:12
Xliff: rakuadventcalendar.wordpress.com/2...-tutorial/ <-
tl;dr: github.com/Altai-man/sample-cro-crud code
Xliff sena_kun: Looking, thanks! 20:18
sena_kun: With auth-routes() the first parameter to each route is a Blog::Session. That gets ignored when looking at the actual route, right? 20:27
sena_kun Xliff: hmm, what do you mean? github.com/Altai-man/sample-cro-cr...th.pm6#L33 20:28
or I don't understand what do you ask, sorry. :S
Xliff So: "route { get -> Blog::Session $session, 'register' { ... } }" will be /register/ (assuming no include)
sena_kun yeah
Xliff Ah!
Do you have to pass that session object as the first parameter? 20:29
sena_kun the session parameter gets the session object out of request and check if the types are ok
no
Xliff: you can read the tutorial if you want, how it works in cro is presented in details there
Xliff: look up for `Auth` section
Xliff So wherever it is in the signature, if it is a Cro::HTTP::Auth derived class, it's ignored in the segment formulation? 20:30
So: "route { get -> 'register', Blog::Session $session, 'me' { ... } }" will be /register/me/ 20:31
And these would be, too:
route { get -> 'register', 'me', Blog::Session $session { ... } }
sena_kun Xliff: it has to be the first argument 20:32
Xliff route { get -> Blog::Session $session, 'register', 'me' { ... } }
OK. That's what was confusing.
So the last one would be /register/me/ 20:33
20:34 kensanata left
Xliff LOL! I could write a perl version of Wordpress with this. 20:34
WHY I would do that is a serious question, though.
20:35 rindolf left 20:40 sena_kun left
cpan-raku New module released to CPAN! IO::Glob (0.9.0) by 03HANENKAMP 20:48
20:49 no-n is now known as pony 20:56 sena_kun joined
SmokeMachine xinming_: any news about your Red project? 20:57
21:01 stigo joined
stigo hi, we're looking at creating nix packages for raku modules. is there an api listing all modules available on modules.raku.org? 21:02
21:02 adisbladis joined
Xliff sena_kun: Got error when running that sample-cro-crud: Type check failed in assignment to $!value; expected CookieValue but got Str ("\"2|1:0|10:157552209...) 21:09
stoned75 stigo: ecosystem-api.p6c.org/projects.json 21:12
sena_kun Xliff: yikes... 21:13
Xliff: can you file an issue/
?
stigo stoned75: does it include cpan? seems to only be p6c? 21:15
stoned75 I guess you should check out the README in github.com/perl6/ecosystem/ 21:18
sena_kun stigo: you can ping chloekek who works on nix packages wrt status of the project and what you can help with 21:22
chloekek stigo: I have a SQLite database with all the metadata necessary to generate Nix expressions.
stigo: I also have a Nix function to create a derivation for a Raku package. 21:23
(The metadata being tarball URLs for both CPAN and GitHub, as well as their hashes.)
All that’s left to do now is take the data in the SQLite database and generate Nix expressions from it. 21:24
stigo that's pretty cool! exactly what we're looking at now. got any code for it?
chloekek The Nix function rakuPackage is in github.com/chloekek/raku-nix and the SQLite database generation code is in github.com/chloekek/crai. 21:25
It’s all still WIP but I do use it for building the latter already. 21:26
21:37 stoned75 left
stigo chloekek: are you at 36c3 by any chance? 21:41
chloekek What is that? 21:43
stigo was thinking to generate nix expressions for all raku modules and PR them into nixpkgs.
the chaos communication congress :)
chloekek Oh I’m not interested in maintaining Nixpkgs. 21:48
But you can do it if you want.
stigo <3
Xliff sena_kun: Yeap. Will file it soon. Kinda busy atm. 21:53
21:54 adisbladis left 21:55 moritz left, moritz joined, adisbladis joined 22:08 Sauvin left 22:29 stoned75 joined 22:42 sena_kun left, RobRaku left
Xliff m: x21.chr.say 22:51
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
x21 used at line 1
Xliff m: 0x21.chr.say
camelia !
Xliff m: (0x23..0x2b).map( *chr ).say 22:52
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(0x23..0x2b).map( *7⏏5chr ).say
expecting any of:
…
Xliff m: (0x23..0x2b).map( *.chr ).say
camelia (# $ % & ' ( ) * +)
Xliff m: (0x2d..0x3a).map( *.chr ).say
camelia (- . / 0 1 2 3 4 5 6 7 8 9 :)
Xliff m: (0x3c..0x5a).map( *.chr ).say
camelia (< = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z)
Xliff m: (0x5d..0x7e).map( *.chr ).say
camelia (] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~)
Xliff m: (0x5e..0x7e).map( *.chr ).say 22:53
camelia (^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~)
Xliff m: (0x5c..0x7e).map( *.chr ).say
camelia (\ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~)
22:56 sena_kun joined 23:04 libertas joined 23:19 chloekek left 23:53 mahmudov left
cpan-raku New module released to CPAN! Algorithm::HierarchicalPAM (0.0.2) by 03TITSUKI 23:55