🦋 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.
kalkin-- tbrowder: yoou mean this: www.youtube.com/watch?v=Jes3bD6P0To? 07:06
kalkin- tbrowder: pod parser from scratch might be a good idea, because it's much more approachable for me, than understanding the whole Grammar.nqp 07:15
kalkin- tbrowder: after watching the tree-sitter video, I'm not sure if we can use a Perl6 Grammar with tree-sitter like approach. I need more details on what AlexDaniel meant, I couldn't find anything in the history 07:52
AlexDaniel` hmm? 08:42
what did I say? :) I can probably explain what I meant 08:43
kalkin- > tbrowder: kalkin: did you see reference to the "tree-sitter" streaming gramar parser mentioned i think by AlexDaniel a few weeks ago? 08:55
context is pod parsing
currently it's pretty buggy and there is the idea flowing in the room, to separate it from Grammar.nqp 08:56
lizmat and another Rakudo Weekly News hits the Net: rakudoweekly.blog/2019/12/24/2019-...-holidays/ 11:13
cpan-raku New module released to CPAN! App::Mi6 (0.3.0) by 03SKAJI 12:04
chloekek Spreadsheet function: sub löb(@fs) { my @xs = @fs.map({ &^f(@xs) }).lazy; @xs; } 13:02
p6: sub löb(@fs) { my @xs = @fs.map({ &^f(@xs) }).lazy; @xs; }; say löb([ -> @cells { 1 }, -> @cells { 2 }, -> @cells { @cells[0] + @cells[1] } ]).eager
camelia [1 2 3]
chloekek The Excel equivalent would be A1=1, B1=2, C1=SUM(A1, B1) 13:03
chloekek Shorter version: 13:06
sub löb(*@f) { my @r = @f.map({ $_(@r) }).lazy }; .say for löb({ 1 }, { 2 }, { [+] @^s[0, 1] })
evalable6 1
2
3
chloekek It suddenly occurred to me that this is a nice technique for implementing type checking of programming languages with both return type inference and mutually recursive functions. 13:13
Just write @definitions Z löb(@definitions.map(&type-check)) to pair each definition with its type. 13:14
cpan-raku New module released to CPAN! App::Mi6 (0.3.1) by 03SKAJI 13:21
tbrowder kalkin: how would you approach the rewrite? i'm thinking first about the start/end points as a grouping of similar behavior, that is, the several, quite different ways we jump into pod and then jump out again as independent chunks. then refactor and refit. 13:48
cpan-raku New module released to CPAN! Math::Libgsl (0.0.2) by 03FRITH 14:55
kalkin- tbrowder: I thought I would write a grammar, which parses POD and _only_ POD. So in Grammar.nqp you can just find a piece of pod and call PodGrammar.parse($stuff, actions=>PodActions.new); 15:15
kalkin- The grammar wouldn't be responsible in case of leading/trailing POD for attaching it to a Code object, because then it needs to be able to parse Perl6 15:16
but may be my approach is to naïve
tbrowder give it a shot. will you put it where you can take PRs? 16:14
kalkin- I will inform you once I have some code 16:22
I actually wanted to rewrite, cleanup & document my Git::Plumbing module. While documenting it I ended up writing my own POD Renderer and this lead me to finding a bunch of weird stuff in Pod :D 16:23
But the Pod::Renderer ( a fork of Pod::To::Pager, the author seems to abandoned it, I tried conctacting him), is coming along very well. Because I'm using it while writing POD 16:25
Long story short, once I finish up with Git::Plumbing and release it, I will start working on a Pod Grammar.
chloekek How does Inline::Perl5 cope with Raku threads? 20:12
I want to deploy a Cro::HTTP app that uses it but I’m scared my server gets owned due to a data race.
chloekek should stop using Inline::Perl5 just for Digest::SHA.
Grinnz perhaps you could nativecall to github.com/libtom/libtomcrypt ? 20:15
chloekek I already have a dependency on OpenSSL through Cro::HTTP so I’d probably use that. 20:16
chloekek Something funny happened with Cro::HTTP 0.7.6. :) 20:30
It has 0 dependencies and the tag list is ["Choose me!"]. 20:31
All other versions are more descriptive.
Ah, license, not tag list.
sena_kun chloekek: that was an unhappy accident. :S 20:42
chloekek Oh. :( 20:51
chloekek Why do functions like encode take a string with the encoding name, rather than some object that does encoding? 21:52
guifa2 chloekek: it's probably on a principle of keeping things simpler for the user. Internally it does a look up based on the encoding name 22:35
tellable6 2019-12-22T16:21:05Z #raku <kalkin-> guifa looking at Grammar.nqp there're two methods for attaching leading/trailing pod. I'm not sure why it's implemented this way
2019-12-22T16:25:02Z #raku <kalkin-> guifa never mind, it's for attaching it the actual code parts
guifa2 But if you notice the way that Str.encode() is defined, it's a multi, so it could be easily later implemented with encode(Str:D $name) or encode(Callable:D &conversion-code) or encode(EncoderRole $encoder) 22:37
[Coke] (string) wonder if we should move that to an enum
guifa2 (you could actually augment it to do that if you wanted)
guifa2 [Coke]: the problem is that enums can't be extended at runtime, so actually Str works best. Modules can call Encoding::Registry.register() to register names and allomorphs (e.g. 'utf8', 'UTF-8', 'utf-8'), and then when you call .encode<foo>, it uses Encoding::Registry.find('foo') to grab the encoder 23:13
Tirifto Merry Christmas! (Unless I'm late and the whole community has moved on to celebrating Diwali now. :)) 23:20
guifa2 It's not even the 25th yet for some of us :-) 23:21
sjn Yeah, merry christmas! 23:23
Tirifto Ah, perhaps my international information is a bit tangled. Over here (Czech Republic) we regard 24–26th of December as Christmas, but I'm not sure how well that carries over to elsewhere. xP 23:26
guifa2 is an old fashioned fogie and does Dec 25 to Jan 6th :-) 23:32
Plus despite being in the northern hemisphere, it's was a solid 22 C out today =\
guifa2 .say for "Merry Christmas", "Feliz Navidad", "Felices fiestes navadieges"  …  "Bom Natal" 23:34
xkr47 merry christmas! 23:54
I typed the first sentence into GPT-2 @ talktotransformer.com/ and this is what came out: "When I discovered the Raku language on wikipedia, I finally was converted. Reading the Raku project's source code, I was amazed at how comprehensive and rich it was. It's quite nice to be able to leverage the latest technologies, to develop fantastic new apps with them, and it's fun to interact with so many other... 23:55
... languages. Raku is a simple, easy to use language with powerful functionalities. Being able to use it in combination with CoffeeScript, HTML and CSS made the whole process much faster and also much more enjoyable."