[00:11] *** aborazmeh joined [00:11] *** aborazmeh left [00:11] *** aborazmeh joined [00:13] *** Kaiepi left [00:16] *** Kaiepi joined [00:56] *** Cabanossi left [00:58] *** Cabanossi joined [01:12] *** aborazmeh left [01:26] *** molaf left [01:39] *** molaf joined [01:40] *** Xliff left [02:05] *** Manifest0 left [02:06] *** Manifest0 joined [02:12] *** rbt left [02:20] *** Cabanoss- joined [02:24] *** Cabanossi left [02:24] *** Cabanoss- is now known as Cabanossi [02:38] *** poga left [03:22] *** NODE left [03:23] *** NODE joined [03:44] *** KindOne left [03:49] *** KindOne joined [03:52] *** brtastic joined [03:57] *** albongo is now known as albino [04:07] *** KindTwo joined [04:09] *** devmikey left [04:09] *** KindOne left [04:11] *** KindTwo is now known as KindOne [04:30] *** affaf joined [04:30] Hey dudes. Quick question. [04:30] ``` [04:30] ```sub foo(Str $s) { "" };say "this shouldn't run";if (0 == 0){ my Int $x = foo(""); say $x}``` should not type check but why does this work? [04:31] Ugh here's a hastebin link https://hasteb.in/vetoqowe.pl [04:37] *** clarjon1 left [04:45] As in I still get the print. [04:53] *** wamba joined [05:08] *** clarjon1 joined [05:15] m: sub foo(Str $s --> "") {}; say foo [05:15] rakudo-moar 986f8ab6b: OUTPUT: «5===SORRY!5=== Error while compiling ␤Calling foo() will never work with declared signature (Str $s --> "")␤at :1␤------> 3sub foo(Str $s --> "") {}; say 7⏏5foo␤» [05:15] m: sub foo(Str $s --> "") {}; say foo("") [05:15] rakudo-moar 986f8ab6b: OUTPUT: «␤» [05:15] m: sub foo(Str $s --> "") {}; my Int $a = foo("") [05:15] rakudo-moar 986f8ab6b: OUTPUT: «Type check failed in assignment to $a; expected Int but got Str ("")␤ in block at line 1␤␤» [05:15] m: sub foo(Str $s --> "") {}; my Int $a = foo(""); say "never runs" [05:15] rakudo-moar 986f8ab6b: OUTPUT: «Type check failed in assignment to $a; expected Int but got Str ("")␤ in block at line 1␤␤» [05:15] m: sub foo(Str $s --> "") {}; say "runs"; my Int $a = foo(""); say "never runs" [05:15] rakudo-moar 986f8ab6b: OUTPUT: «runs␤Type check failed in assignment to $a; expected Int but got Str ("")␤ in block at line 1␤␤» [05:15] that's runtime, too [05:23] *** xinming left [05:24] *** xinming joined [05:31] *** sauvin joined [05:33] *** brtastic left [05:43] *** holli__ joined [05:45] *** affaf left [05:49] *** gordonfish left [05:51] *** skids left [05:51] *** aborazmeh joined [05:51] *** aborazmeh left [05:51] *** aborazmeh joined [06:05] *** brtastic joined [06:18] *** Sgeo left [06:18] *** stoned75 joined [06:38] *** JJMerelo joined [06:40] *** molaf left [06:44] *** Kaiepi left [06:48] *** Kaiepi joined [06:52] *** domidumont joined [07:13] *** pecastro joined [07:16] *** soursBot joined [07:17] *** andrzejku joined [07:18] *** wamba left [07:36] Hello, Say I have a hash %h with many keys, and now I want a smaller hash with just the keys a, b. I know I can do %h:p, but that gives me a list. How do I get a smaller "subset" hash? [07:37] *** JJMerelo left [07:38] *** holli__ left [07:44] *** chloekek_ joined [07:52] I would imagine that this is not an encouraged workflow because we don't have structural-sharing... It would allocate a whole new map. [07:58] *** JJMerelo joined [08:02] m: my %a = %(:1a, :2b, :3c); my %b = %a:p; dd %a; dd %b [08:02] rakudo-moar 986f8ab6b: OUTPUT: «Hash %a = {:a(1), :b(2), :c(3)}␤Hash %b = {:b(2), :c(3)}␤» [08:03] *** chloekek_ left [08:03] *** tailgate joined [08:08] woah, let me try that out. The documentation says that "The adverb :p returns a Pair or a List of Pair instead of just the value." [08:08] So it would need to be assigned to a new hash [08:12] *** soursBot left [08:17] *** vike1 left [08:23] Another useful feature of the `:p` on hash slices is that it will "collapse" undefined values [08:23] so oyu can fearlessly give a list of keys that may or may not be in the original hash [08:23] m: my %h = (:1a :2b :4d); my @k = ; say %h{@k}; say %h{@k}:p [08:23] rakudo-moar 986f8ab6b: OUTPUT: «(1 2 (Any))␤(a => 1 b => 2)␤» [08:25] similar to doing a set intersection [08:25] m: say set() ∩ set() [08:25] rakudo-moar 986f8ab6b: OUTPUT: «Set(a b)␤» [08:30] *** soursBot joined [08:35] *** aluaces left [08:50] *** sena_kun joined [08:56] *** vike1 joined [09:00] *** JJMerelo left [09:11] *** aborazmeh left [09:15] *** hacktor left [09:25] *** raku-bridge left [09:26] *** cpan-raku left [09:26] *** raku-bridge joined [09:26] *** raku-bridge left [09:26] *** raku-bridge joined [09:26] *** cpan-raku joined [09:26] *** cpan-raku left [09:26] *** cpan-raku joined [09:31] *** wamba joined [09:34] *** soursBot left [09:35] *** soursBot joined [09:40] *** rindolf joined [09:40] *** kensanata joined [09:44] *** Geth left [09:44] *** Geth joined [09:45] *** raku-bridge left [09:46] *** cpan-raku left [09:47] *** raku-bridge joined [10:01] *** cpan-raku joined [10:01] *** cpan-raku left [10:01] *** cpan-raku joined [10:05] *** wamba left [10:13] *** lichtkind joined [10:16] *** kensanata left [10:16] *** Demos[m] left [10:18] *** chloekek_ joined [10:21] *** girafe2 left [10:27] *** girafe joined [10:27] *** Altai-man_ joined [10:30] *** sena_kun left [10:39] *** soursBot left [10:58] *** Black_Ribbon left [10:59] *** soursBot joined [11:07] *** El_Che joined [11:13] thank you MasterDuke and elcaro! [11:19] *** holli__ joined [11:19] np [11:24] *** suman joined [11:28] https://github.com/Raku/problem-solving/blob/master/solutions/language/Path-to-Raku.md [11:30] *** soursBot_ joined [11:30] *** soursBot left [11:39] *** chloekek_ left [11:47] .seen jmerelo [11:47] uzl[m], I saw jmerelo 2020-05-28T10:07:04Z in #raku-dev: jnthn by all means. [11:50] .tell jmerelo I think some doc issues that were addressed by respective PRs and could thus be closed. From the top of my head: https://github.com/Raku/doc/issues/3389 , https://github.com/Raku/doc/issues/3308 [11:50] uzl[m], I'll pass your message to JJMerelo [11:51] *** sarna joined [11:54] *** holli__ left [12:02] *** soursBot_ left [12:11] *** suman left [12:20] *** soursBot joined [12:26] *** aluaces joined [12:26] *** aluaces is now known as alberto [12:26] *** alberto is now known as Guest62 [12:28] *** sena_kun joined [12:30] *** Altai-man_ left [12:46] *** wamba joined [12:53] *** leont joined [13:03] *** aborazmeh joined [13:03] *** aborazmeh left [13:03] *** aborazmeh joined [13:07] *** konvertex joined [13:19] <[Coke]> I get "type check failed" [13:21] <[Coke]> (the code in the bin said "if true, run this code"... so yes, it was going to run. :) [13:37] *** andrzejku left [13:40] *** holli__ joined [13:57] *** brtastic left [13:57] *** andrzejku joined [14:14] *** wamba left [14:21] *** lucasb joined [14:25] *** sarna left [14:27] *** Altai-man_ joined [14:29] *** sena_kun left [14:34] *** gordonfish joined [14:35] *** soursBot left [14:35] *** soursBot joined [14:41] I found a broken link on https://raku.org/community/ : the smoke testing links to http://smoke.perl6.org/ which is the default nginx page. Is there a working page somewhere or should it be removed ? [14:53] *** brtastic joined [14:58] *** aborazmeh left [15:00] *** soursBot left [15:03] *** skids joined [15:07] *** soursBot joined [15:09] *** holli__ left [15:15] Tilwa: there's a link at the bottom of hte page about how to contrib/fix that [15:15] though what the fix would be is unclear [15:16] Well, I'll open a github issue later then. Thanks! [15:17] i guess that was zoffix so maybe just remove that section...? [15:21] Maybe it could link to rakudist instead? dunno [15:30] *** poohman joined [15:30] hi [15:31] was trying to use the module XML::Class and was aiming at using a method called from-xml [15:32] it throws an error saying none of the signatures match [15:32] what does the second argument in the signature below stand for [15:32] ? [15:32] (XML::Class:U: Str $xml, *%_ --> XML::Class) [15:33] just to be sure that I was making no typos I generated an xml string using the to-xml method and passed that [15:33] but got the same error [15:34] *** _jrjsmrtn joined [15:34] this is a class method, as the first parameter is an undefined XML::Class. the second is the $xml string, the third just stores and pairs/named args in the %_ hash [15:34] *** __jrjsmrtn__ left [15:35] are there three arguments or two? [15:35] so it looks like it would just be XML::Class.from-xml('<...>') [15:35] well.. it's a method, so "first" is the invocant [15:36] and what does *%_ mean? [15:36] it's just an anonymous hash... similar to how we have $_ [15:36] ok [15:37] m: sub foo($bar, *%_) {say %_}; foo('one', two => 2, :!three) [15:37] rakudo-moar 986f8ab6b: OUTPUT: «{three => False, two => 2}␤» [15:37] just a way to capture any named args [15:38] m: sub foo($bar, *%_) {say %_}; foo('one', two => 2, :!three) [15:38] rakudo-moar 986f8ab6b: OUTPUT: «False␤» [15:38] ok [15:41] *** soursBot left [15:41] thanks elcaro [15:41] *** soursBot joined [15:45] np [15:46] I've not used to module before.. so i'm not sure if i've given correct info [15:49] one more question - XML::Class:U - what does the U here stand for?? undefined? [15:51] yeah, the type object [15:52] ah [15:52] I was all these days forgetting to instantiate it and when I finally remember to do it [15:52] I get this [15:53] so I dont use new?? [15:56] yeah, then it's like a "class" or "static" method in other languages [16:06] *** soursBot left [16:07] but I dont understand how one would pull the data into a type object - wont I need a instamtiated object to assign the data I deserialise from the xml [16:08] *** chloekek_ joined [16:08] classes with static data store them in the lexical scope of the class body [16:08] *** soursBot joined [16:09] how would I be able to access them - could you give a smll example [16:09] you'd need an accessor method [16:10] m: class Flob { has $.attribute; my $static-one; my $static-two; method access-one is rw { $static-one }; method read-two { $static-two } }; Flob.new(attribute => 1).raku.say; Flob.access-one = 99; say Flob.access-one; [16:10] rakudo-moar 6ead4ce16: OUTPUT: «Flob.new(attribute => 1)␤99␤» [16:10] m: class Flob { has $.attribute; my $static-one; my $static-two; method access-one is rw { $static-one }; method read-two { $static-two } }; my $inst-one = Flob.new; $inst-one.access-one = 99; say Flob.access-one; [16:10] rakudo-moar 6ead4ce16: OUTPUT: «99␤» [16:12] ok - let me look at the example again - maybe I missed the static member part of it [16:13] i didn't read further up, so i may have missed something [16:21] ok - I see some light now - thanks - need to take a break [16:21] seems like a lot of MOP there [16:23] *** holli__ joined [16:26] *** vike1 left [16:28] *** vike1 joined [16:28] *** sena_kun joined [16:30] *** Altai-man_ left [16:38] *** ShimmerFairy left [16:39] *** ShimmerFairy joined [16:53] *** domidumont left [16:56] *** poohman left [17:12] *** poohman joined [17:15] *** mahafyi joined [17:15] *** sena_kun left [17:16] *** sena_kun joined [17:17] *** stoned75 left [17:19] *** stoned75 joined [17:19] i feel somewhat ready to start trying somethings with raku. i was looking at web modules, i can undertsnad the cro architecture but can't do a react redux site. But i understand Uzu, and the template6 / mustache. i am planning to start directly writing html files from raku, with inline javascript as needed. any guidance on starting website with [17:19] raku? [17:27] *** Guest62 is now known as aluaces [17:31] *** patrickb joined [17:33] the reason why cro uses react/redux is just that it's pleasant to use [17:33] cro can work with any framework as well as frameworkless; there's a template language now, too [17:35] *** holli__ left [17:35] i haven't looked at uzu at all yet [17:35] *** holli__ joined [17:35] oh, and of course cro can use any template engine that spits out any kind of data that is to be delivered to the client [17:36] as well as just writing your html in your code if you like [17:37] HTML::Tag: say HTML::Tag::p.new(:text('This is my paragraph'), :class('pretty')).render; [17:38] Typesafe::HTML: my $html = HTML.new('

this will not be quoted

'); $html ~= '

this will

'; [17:39] https://modules.raku.org/dist/HTML::BoreDOM:cpan:ALLSOPP here you nest calls to a sub called "h" [17:39] https://modules.raku.org/dist/HTML::Lazy:cpan:SAMGWISE - haven't looked at this one at all yet [17:40] timotimo : ah ok. so we can just use the cro pipelines to generate content on the flow by directly writing the html files needed. we can make the grammars needed to build links across all sitemap pages. I hadnt seen the Typesafe::HTML :) [17:41] as far as Uzu goes i was thinking just to start with an apache httpd instead for web server. as it provides authentication for users out of the box. [17:42] well, don't have to "write files" really [17:43] how will the user have a html file in the web server then? [17:44] there doesn't have to be a file for some html to be served [17:44] the server can literally make shit up :) [17:44] i see. i didn't know about that. [17:45] having to have one file correspond to one URL is probably a thing you are used to from coding with php or cgi scripts directly [17:46] over there you'd often put a .htaccess file that rewrites URLs [17:46] but "web applications" and "web frameworks" just grab the whole request, so you can decide on your owh whether you look at the filesystem, at a database, at a random number generator, at the stars, etc [17:48] wow. look like i need to understand this whole thing afresh. [17:59] *** Xliff joined [18:00] \o [18:00] I'm tryint to print color sequences to the console. I'm doing something like this... [18:00] m: print "\033Hello!\033" [18:00] rakudo-moar 6ead4ce16: OUTPUT: «␀33Hello!␀33» [18:01] So only the "\0" part is being recognized. What's the proper way to implement this? [18:01] ( I hope it isn't chr.... } [18:02] ah so that how things like Uzu does its 'live reloads' etc, where any content changed in the 'watch' paths immediately shows up in browser.i was wondering about that [18:02] *** ctilmes1 joined [18:03] Well... "{ chr(27) }" but is more verbose than I'd like. [18:03] \o ctilmes! [18:06] *** ctilmes left [18:09] <[Coke]> Xliff: This answers a different question, but have you seen: https://github.com/tadzik/Terminal-ANSIColor [18:10] I've not looked deeply into it, no. [18:10] Oh, LOL!\ [18:10] \e... much better! :) [18:11] <[Coke]> m: print "\0d12" [18:11] rakudo-moar 6ead4ce16: OUTPUT: «␀d12» [18:11] <[Coke]> (nope) [18:13] <[Coke]> m: print "\c[33]" [18:13] rakudo-moar 6ead4ce16: OUTPUT: «!» [18:13] <[Coke]> m: print "\x033" [18:13] rakudo-moar 6ead4ce16: OUTPUT: «3» [18:18] *** KindTwo joined [18:20] *** KindOne left [18:23] *** KindTwo is now known as KindOne [18:27] *** Altai-man_ joined [18:29] *** sauvin left [18:30] *** sena_kun left [18:33] m: print "\o033 [18:33] rakudo-moar 6ead4ce16: OUTPUT: «5===SORRY!5=== Error while compiling ␤Unable to parse expression in double quotes; couldn't find final '"' (corresponding starter was at line 1)␤at :1␤------> 3print "\o0337⏏5␤ expecting any of:␤ argument l…» [18:33] m: print "\o033" [18:33] rakudo-moar 6ead4ce16: OUTPUT: «» [18:36] *** ctilmes1 left [18:37] *** patrickb left [18:38] *** picmyk left [18:38] *** picmyk joined [18:38] *** soursBot left [18:39] *** patrickb joined [18:40] <[Coke]> m: "\o033".uninames.say [18:40] rakudo-moar 6ead4ce16: OUTPUT: «()␤» [18:40] <[Coke]> timotimo++ [18:41] greppable6: \\0\d\d [18:41] timotimo, 175 lines, 32 modules: https://gist.github.com/8d0ca6466379338db355fa3ce28ce9c7 [18:45] *** soursBot joined [18:49] not going through all of that now [18:49] the first few i looked at were in readme and pod [18:54] *** patrickb left [18:56] *** soursBot left [19:02] *** soursBot joined [19:07] *** poohman left [19:08] *** mahafyi left [19:14] *** kensanata joined [19:18] *** soursBot left [19:24] *** mahafyi joined [19:30] *** poohman joined [19:31] *** Altai-man_ left [19:36] so cro istelf is a webserver, doesn't need something like apache http to serve up web content. and can do secure https connections as well.. [19:41] *** hacktor joined [19:41] *** hacktor left [19:45] *** patrickb joined [19:47] *** devmikey joined [19:53] *** [Sno] left [19:56] *** sno joined [19:56] usually you'd want to have an nginx in front, much like you would with other web frameworks [19:57] let the webserver handle TLS and load balancing, and static file hosting is something nginx is quite fast at [20:03] oh ok. just working thru the cro examples now. [20:08] but in the first cro example localhost:20000 says HELLO, and i can't find the word HELLO and how it is served up anywhere in the dir (that was stubbed) files, except there is some binary file that matches. [20:12] it's not under lib/Routes.rakumod (or .pm6 or whatever)? [20:15] https://pastebin.com/cx2DHFGR this is all i see [20:16] so it shows as a binary file match in lib/.precomp [20:19] well, what is in lib/Routes.pm6? [20:20] oh so sorry, i did a case sensitive grep forgot the -i flag. [20:20] *** brtastic left [20:21] ah :) [20:21] it happens [20:22] *** wamba joined [20:22] I've been playing with the fancy superscripts [20:22] 5⁶⁷ is the same as 5 ** 67 -- well and good [20:23] plain ⁶ is the same as 6. That means that ⁶⁷⁸ is the same as 6 ** 78, which feels inconsistent and not obvious [20:23] yeah [20:23] m: say 5⁶⁷5⁶ [20:23] rakudo-moar 6ead4ce16: OUTPUT: «5===SORRY!5=== Error while compiling ␤Two terms in a row␤at :1␤------> 3say 5⁶⁷7⏏055⁶␤ expecting any of:␤ infix␤ infix stopper␤ postfix␤ statement end␤ statement modifie…» [20:25] *** mowcat joined [20:25] I think it might be better to straight up outlaw leading superscript. But if not that, then ⁶⁷⁸ should be 678 [20:27] *** patrickb left [20:29] i'd only outlaw mixing the interpretation of superscript as superscript after a superscript digit [20:32] timotimo : thanks - here is a first html page (i slurped a file i downloaded from w3 css) https://pasteboard.co/JaFe8b7.png [20:33] i suppose its singularly uninteresting to anyone, but i am very happy lol [20:37] *** xinming left [20:37] *** xinming joined [20:42] is there any reason to choose ngnix over apache http (since i have setup apache only so far) [20:44] *** Black_Ribbon joined [20:44] timotimo: hmmm. That's probably reasonable [20:44] mahafyi: nginx is faster and simpler. But apache is a totally fine choice. And it shouldn't be hard to switch later on, if you need to [20:45] moon-child ty [20:48] *** cpage left [20:50] *** cpage joined [20:52] ok first onto learning Cro::HTTP::Router :) [20:57] *** poohman left [21:01] *** mahafyi left [21:03] *** bdju left [21:04] *** bdju joined [21:07] *** agentzh joined [21:07] *** agentzh left [21:07] *** agentzh joined [21:12] trying to install IO::Socket::Async::SSL gives 'Could not find OpenSSL in: (bunch of paths)' I have openssl installed (obviously). How do I tell the package about it? [21:19] *** rindolf left [21:26] *** mahafyi joined [21:36] *** mahafyi left [21:46] *** kensanata left [22:08] *** foo222 joined [22:08] *** foo222 left [23:07] *** ToddAndMargo joined [23:08] Hi All. Over on https://github.com/tadzik/perl6-Config-INI/blob/master/README What does he mean "For example usage, see SYNOPSIS in the Pod"? What is a Pod and where do I fid it? [23:09] https://github.com/tadzik/perl6-Config-INI/blob/master/lib/Config/INI.pm#L45 [23:10] "POD" used to stand for "plain old documentation" i think? it's a more complex format of comments with things like sections, links between things, formatting, etc [23:10] and it usually lives in a perl module file, usually at the end [23:11] raku has a format that's just called "Pod" rather than it being an abbreviation [23:11] it's the format in which the whole raku documentation site's content is written [23:12] Would that be in his code section? [23:13] Found it. https://github.com/tadzik/perl6-Config-INI/blob/master/lib/Config/INI.pm starts at line 45. Thank you! [23:17] *** Sgeo joined [23:49] *** chloekek_ left [23:50] *** mowcat left [23:53] *** devmikey left