🦋 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:00 __jrjsmrtn__ joined 00:02 _jrjsmrtn left 00:09 lostmywindows left 00:18 albino left, markong left 00:23 albino joined, albino left, albino joined 00:43 softmoth joined, softmoth left 00:45 vrurg left 00:46 vrurg joined 00:51 vrurg left 01:02 luci joined, luci left 01:08 vrurg joined 01:12 luci666 joined 01:15 molaf left 01:16 luci666 left 01:18 luci666 joined, luci666 left 01:28 molaf joined 01:34 Noisytoot left 01:46 luci666 joined 02:11 lostmywindows joined 02:17 Noisytoot joined 02:27 Noisytoot left 02:34 Noisytoot joined 02:54 lostmywindows left 03:11 lostmywindows joined 03:30 guifa2 left 03:46 abraxxa left 03:49 abraxxa joined 03:54 orinthe8 joined, orinthe left, orinthe8 is now known as orinthe 04:12 guifa2 joined 04:14 guifa2 left 04:27 lostmywindows left 04:30 kensanata joined 05:28 bocaneri joined 05:50 hungrydonkey left, hungryd24 joined
moritz fwiw I have a very good use case for a codepoint-based strings 06:10
JSON::Tiny had a bug where it didn't parse a string delimiter because it was followed by a combining character 06:11
having a codepoint-based string that I could do grammars on would have been the right fix 06:12
instead I had to do a very ugly workaround with :ignoremark and later extract the combining character in the action method
06:27 xinming_ joined 06:29 xinming left 06:36 andrzejku joined 06:42 Noisytoot left 06:44 vrurg left 06:45 vrurg joined, Noisytoot joined 06:49 vrurg left 06:56 xinming_ left, xinming_ joined 07:17 aborazmeh joined, aborazmeh left, aborazmeh joined 07:19 vrurg joined 07:25 andrzejku left 07:28 dakkar joined 07:38 dyske joined, dyske left 07:39 dyske joined, dyske left 07:44 Noisytoot left 07:46 andrzejku joined 07:48 Guest57659 is now known as poga 07:49 aborazmeh left 07:50 Noisytoot joined
cpan-raku New module released to CPAN! Raku-GitHub-Workflows (1.0.5) by 03PMQS 07:54
08:00 oddp joined 08:01 antoniogamiz joined 08:16 leont_ joined 08:19 Sgeo left 08:26 pecastro joined 08:32 antoniogamiz left 08:33 cpan-raku left 08:35 _jrjsmrtn joined 08:36 __jrjsmrtn__ left, cpan-raku joined, cpan-raku left, cpan-raku joined 08:40 rindolf joined 08:42 patrickb joined 08:48 sena_kun joined 08:53 Altai-man_ joined 09:09 rindolf left 09:11 Noisytoot left 09:13 sena_kun left, sena_kun joined 09:14 Altai-man_ left 09:17 camelCaser joined
lizmat clickbaits rakudoweekly.blog/2020/07/13/2020-28-bridges-7/ 09:18
jnthn ShimmerFairy: I was thinking more along the lines of introducing a .subuni and so that way you always know which units you are using and what you expect to get back. Also mirrors having .chars and .codes. I think ultimately we want them supported by the runtime's string subsystem rather than the current VMArray-based REPR of them, though... 09:19
09:21 Noisytoot joined 09:27 sena_kun1 joined 09:39 hungryd24 left, mniip left 09:40 hungrydonkey joined
Xliff \o jnthn 09:41
How goes RakuAST?
gfldex is there any way to force a segfault with Rakudo? 09:46
jnthn Xliff: Moving along steadily. I'm currently working through designing/implementing the RakuAST nodes for regexes. 09:48
gfldex: Well, nativecall and pass a junk pointer somewhere I guess will do it :) 09:49
m: use NativeCall; sub free(Pointer) is native {*}; free(Pointer.new(1))
camelia (signal SEGV)
gfldex tyvm that is just what I need. 09:50
I need to test error handling with Proc::Async and a segfault is as good as errors can get. :)
Xliff jnthn: Oh, excellent! 09:52
jnthn: Will RakuAST::Regex be able to walk the AST and rebuild the regex string? 09:55
09:57 sena_kun1 left
jnthn Xliff: I've not really thought about going back in that direction... Do you have a use case? 09:57
Xliff jnthn: Not a practical one, as yet. 09:58
However I have been working with native code and GLib has a GRegex class: developer.gnome.org/glib/stable/gl...sions.html
jnthn OK. I didn't really have one either aside from a Perl-alike deparse thingy 09:59
Xliff And I have been wondering about interoperability with Perl5 and Perl6 regexs
10:00 BuildTheRobots left, ChoppedBacon left
Xliff jnthn: Is EVAL the only way to evaluate string containing a regex (including metachars)? 10:00
Or would that be a better question posed to moritz?
jnthn Well, if you're embedding it in a regex, you'd do /<$regex-string>/
10:00 rindolf joined
jnthn Which does EVAL under the hood 10:01
10:01 jhill left, timeless left, cj left
Xliff m: my $r = 'a (b) c'; my $s = "abc"; ($r ~~ /<$r)/).gist.say 10:02
camelia 5===SORRY!5=== Error while compiling <tmp>
Unable to parse expression in metachar:sym<assert>; couldn't find final '>' (corresponding starter was at line 1)
at <tmp>:1
------> 3 = 'a (b) c'; my $s = "abc"; ($r ~~ /<$r7⏏5)/).gist.say
Xliff m: my $r = 'a (b) c'; my $s = "abc"; ($r ~~ /<$r>/).gist.say
camelia Nil
10:02 ChoppedBacon joined
Xliff m: my $r = 'a (b) c'; my $s = "abc"; ($s ~~ /<$r>/).gist.say 10:02
camelia 「abc」
10:02 timeless joined, cj joined 10:03 BuildTheRobots joined
Xliff m: my $r = 'a (b) c'; my $s = "abc"; ($s ~~ /<$r>/).gist.say ($s ~~ /a (b) c/).gist.say 10:03
camelia 5===SORRY!5=== Error while compiling <tmp>
Two terms in a row
at <tmp>:1
------> 3; my $s = "abc"; ($s ~~ /<$r>/).gist.say7⏏5 ($s ~~ /a (b) c/).gist.say
expecting any of:
infix stopper
10:03 hvxgr left
Xliff m: my $r = 'a (b) c'; my $s = "abc"; ($s ~~ /<$r>/).gist.say; ($s ~~ /a (b) c/).gist.say 10:03
camelia 「abc」
0 => 「b」
Xliff m: my $r = 'a \(b\) c'; my $s = "abc"; ($s ~~ /<$r>/).gist.say; ($s ~~ /a (b) c/).gist.say
camelia Nil
0 => 「b」
Xliff m: my $r = 'a \\\(b\\\) c'; my $s = "abc"; ($s ~~ /<$r>/).gist.say; ($s ~~ /a (b) c/).gist.say
camelia Nil
0 => 「b」
Xliff m: my $r = 'a (b) c'; my $s = "abc"; ($s ~~ /<$r>/).gist.say; ($s ~~ /a (b) c/).gist.say
camelia 「abc」
0 => 「b」
Xliff Odd.
10:04 hvxgr joined
Xliff So why isn't the grouping picked up in the first regex? 10:04
m: my $r = 'a (b) c'; my $s = "abc"; (EVAL "\$s ~~ /<$r>/").gist.say; ($s ~~ /a (b) c/).gist.say
camelia 5===SORRY!5=== Error while compiling <tmp>
EVAL is a very dangerous function!!! (use the MONKEY-SEE-NO-EVAL pragma
to override this error but only if you're VERY sure your data contains
no injection attacks).
at <tmp>:1
------> 3c'; my …
moritz m: my $re = 'a (b) c'; say 'abc' ~~ /$<foo>=<$re>/
camelia 「abc」
foo => 「abc」
0 => 「b」
10:04 jhill joined
moritz Xliff: you can get the capture like this 10:04
Xliff m: use MONKEY-SEE-NO-EVAL; my $r = 'a (b) c'; my $s = "abc"; (EVAL "\$s ~~ /<$r>/").gist.say; ($s ~~ /a (b) c/).gist.say
camelia No such method 'a' for invocant of type 'Match'. Did you mean 'at'?
in block <unit> at EVAL_0 line 1
in block <unit> at <tmp> line 1
moritz m: my $re = 'a (b) c'; say 'abc' ~~ /$0=<$re>/
camelia 「abc」
0 => 「abc」
0 => 「b」
Xliff moritz++: But that makes the first Match object different from the second. 10:05
Thanks for the hint!
moritz yes, it's wrapped in one layer of capture 10:06
Xliff m: use MONKEY-SEE-NO-EVAL; my $r = 'a (b) c'; my $s = "abc"; (EVAL "\$s ~~ /<\$r>/").gist.say; ($s ~~ /a (b) c/).gist.say
camelia 「abc」
0 => 「b」
moritz I don't think there's a way around it with <$re>
Xliff m: use MONKEY-SEE-NO-EVAL; my $r = 'a (b) c'; my $s = "abc"; (EVAL "\$s ~~ /\$r/").gist.say; ($s ~~ /a (b) c/).gist.say
camelia Nil
0 => 「b」
Xliff m: use MONKEY-SEE-NO-EVAL; my $r = 'a (b) c'; my $s = "abc"; (EVAL "\$s ~~ /$r/").gist.say; ($s ~~ /a (b) c/).gist.say 10:07
camelia 「abc」
0 => 「b」
0 => 「b」
10:07 mniip joined
Xliff ^^ That's what I'm looking for. 10:07
Have to use EVAL
jjatria I was surprised yesterday to realise that IO::Notification::Changed objects have a `.path` attribute that returns a Str rather than an IO.Path. Is there a reason for this? 10:09
I had to use an awkward looking `.path.path` 10:10
sena_kun jjatria, hmm, not `.path.IO`?
I think you can argue it either way, but Str is probably cheaper and not always you want to have a IO::Path object, sometimes just path is enough. 10:11
jjatria sena_kun: I didn't think about it at the time. `.path.IO` does look better 10:12
I think I was just surprised that it would return a Str, but I guess I can see why that is
jnthn Honestly, I suspect oversight more than anything, though. 10:14
lizmat yeah, IO::Path in that sense is a bit of a mess 10:20
jjatria Maybe it's for consistency with IO::Path.path, which returns a Str? 10:21
lizmat m: dd $*CWD.^name
camelia "IO::Path"
lizmat so, an IO::Path stores a $*CWD value (which is an IO::Path) as a Str :-)
10:23 matiaslina left, matiaslina joined
jjatria Is this something that we'd be willing to change? If so, I'd love to take a stab at it 10:24
lizmat jjatria: be careful what you're getting yourself set up for 10:28
10:28 rindolf left
jnthn It's one of those "in principle yes, but we don't have the mechanism for doing it with back-compat yet", I think. 10:29
lizmat I think the best thing would be to actually create a module that takes on IO::Path's functionality
jjatria I thought hubris was a requirement :P
lizmat and then by the time the newdisp branch has landed, we could think of integrating it as a language version change
jnthn: would that assessment be correct ? 10:30
10:30 markong joined 10:32 rindolf joined
jnthn lizmat: tbh, I'm not sure there'd be much of a module to write here, but yes, waiting until we have the means to do that (and somehow not forgetting...) makes sense. 10:37
And I suspect new-disp will be involved in the solution 10:39
10:39 hungryd11 joined 10:42 hungrydonkey left
jjatria What is new-disp? 10:43
sena_kun jjatria, a branch where the work is ongoing on rewriting current dispatching mechanism, see gist.github.com/jnthn/e81634dec57a...b92c722959 if interested. 10:46
10:47 oddp_ joined, oddp left 10:50 markoong joined 10:51 markong left 10:53 epony left, epony joined
jjatria sena_kun: Thanks! 10:54
11:06 vrurg left 11:07 vrurg joined 11:11 Altai-man_ joined, vrurg left 11:14 sena_kun left 11:15 xinming_ left, xinming_ joined 11:29 Petr37 joined 11:30 nj3ma|web joined
Petr37 Can i set sub as hash value? 11:32
11:32 andrzejku left
lizmat m: my %h; %h<a> = &sum; say %h<a>(42,666) 11:33
camelia 708
lizmat Petr37 ^^ 11:34
Petr37 Thanks!
So easy )
lizmat yup!
of course, it can be anything Callable 11:35
m: my %h; %h<a> = { $^a + $^b } ; say %h<a>(42,666)
camelia 708
lizmat m: my %h; %h<a> = * + * ; say %h<a>(42,666) # shorter still
camelia 708
Petr37 Great 11:36
11:42 sena_kun joined
Petr37 Can anyone provide me lambda example? )) 11:44
11:45 vrurg joined
Petr37 Can't find any info 11:45
elcaro Petr37: there's a few ways, but eg. -> $a, $b { $a + $b } 11:47
m: my $x = -> $a, $b { $a + $b }; say $x(3, 4)
camelia 7
elcaro or you could declare it and call it in one go 11:48
m: say (-> $a, $b { $a + $b })(3, 4)
camelia 7
elcaro but a lambda this simple could be defined as `* + *`
m: say (* + *)(3, 4) 11:49
camelia 7
Petr37 Thanks 😊
11:51 vrurg left, vrurg joined
Petr37 What means $^a ? 11:59
Special variable?
lizmat docs.raku.org/language/variables#i...LEX_ACCENT
Petr37 Understood 😊 12:02
12:32 squashable6 left 12:36 squashable6 joined 12:48 Petr37 left 12:53 Petr37 joined
Xliff m: $~Regex.say 12:58
camelia Slang.new(:grammar(Perl6::RegexGrammar), :actions(Perl6::RegexActions))
Xliff Does that imply I can add metachars to the P6 regexes?
The example given doesn't explain that enough, although I know that might not be its intended purpose. 12:59
13:13 nj3ma|web left 13:14 sena_kun left, Altai-man_ left 13:15 sena_kun joined 13:19 MasterDuke left 13:28 sena_kun left 13:29 sena_kun joined 13:31 markong joined 13:32 markoong left 13:33 yuplushi left 13:38 pilne joined, Altai-man_ joined 13:40 Petr37 left
pilne odd question, but here goes nothing! 13:40
can i use rakubrew to install raku to a usb stick for portable funzies? 13:41
dakkar probably? I think the main problem might be if full pathnames are stored somewhere 13:42
I say try it and see 13:43
(it's going to be easier and faster than reading all the source involved ☺)
pilne the part that "worries" me is that it says to change the location of where it puts the files, i need to modify .bashrc or the equivalent (so i'm assuming "environment variables" on win10) 13:44
tadzik heh, your nickname means "urgent" in polish O)
pilne lol!
never knew that
i just almalgamated pi, ln, and e :D
dakkar pilne: well yes, you need to change PATH at least
jnthn tadzik: Curious, in Czech it's more like "diligent" :) 13:45
pilne i should open a ticket asking for that to be something that can be changed in the program and not as an environment variable. 13:46
dakkar pilne: no, that's not possible
your command interpreter / shell has a list of places where it looks for programs to run 13:47
tadzik jnthn: huh, I didn't know the czechs were such false friends ;)
dakkar the only way to have it look in another place is to tell it
and due to the way processes and environment variables work, a program executed from the shell can't change stuff inside the shell itself
13:48 guifa2 joined
pilne yeah 13:48
i just have most of my free time to program these days during lulls at work
but anything i want to use has to run off of a usb stick for reasons :D
13:49 rbt left
pilne things like zerobrane (for lua) and strawberry perl work just fine (swi-prolog too with the portableapps.com version). 13:49
13:49 rbt joined
pilne but i'm assuming that raku is significantly more complicated due to it also having a vm. 13:49
dakkar how do you run strawberry from the command line?
(no, it should work very much the same way) 13:50
pilne i installed strawberry on the stick at home, and it just works when i launch it's dedicated shortcut to a "perl cmd window"
dakkar aha!
that's your trick
that "perl cmd window" sets the environment up for you
look at how that works, and do the same thing for your "portable raku" 13:51
pilne so, the concept would be to manually make a folder with the moarvm/raku on the usb stick
and then a shortcut like that one
dakkar "manually"… I'd let rakubrew make it
but yes
pilne so, install rakubrew
open a window, set the rakubrew_home variable 13:52
even if temporarily
install it to the stick
13:52 luci666 is now known as lucifer_h
pilne and then use the strawberry perl one as a template 13:52
dakkar that should be very close to everything you need, I think
pilne 104
errr 10-4
dakkar oh, also: write an article explaining what you did ☺
so that lizmat can include it in the weekly 13:53
pilne :D
dakkar even (especially) if there complicated parts, or if it doesn't work!
known problems are much easier to fix that unknown ones
pilne ngl, i'm still damn infatuated with prolog, but that's only driven me to try and make a "inline::Prolog" kinda thing, or just a grammar that "kinda" does some prolog-y things. 13:54
declarative/logic is an interesting paradigm, like all the others it has some areas where it makes things stupidly simple, and others where i sit around wondering what the fucking mess of code i wrote is going to do when trying to do something that would be "simple" in raku/perl/lua/scheme (my 13:56
non-prolog loves)
tyvm for the brain food
hopefully i can give it a whirl later today
dakkar keep the channel informed!
14:02 markoong joined, markong left 14:15 hungryd11 left, gabiruh left, gabiruh joined
patrickb dakkar, pilne: It's actually really simple to get raku running off a USB stick. You don't need rakubrew for that. 14:20
Download one of the precompiled releases from rakudo.org/downloads They are all relocatable.
pilne O.o 14:21
patrickb They do contain a script in /scripts/set-env.bat/sh that will set the PATH variable in your current shell.
pilne zef will behave too?
patrickb Yet, it will.
pilne mind blown
dakkar dammit, no new article then!
😁 14:22
pilne even on windows huh (i noticed your script reference was in *nix style)
patrickb dakkar: An article still be a good idea, as obviously noone in the last half an hour or so knew about this (I don't count as I'm responsible for all the relocatability stuff) 14:23
So if you are actually thinking about an article, please do write about it!
Have to leave. o/ 14:25
pilne tyvm
14:25 patrickb left
pilne so the process has changed to "download this relatively small zip folder, extract it to my usb, and then figure out the magic going on in the strawberry perl cmd shortcut and apply my knowledge :D" 14:25
14:27 sena_kun left
pilne now for the elephant in the room though, can comma run off a usb stick? 14:33
dakkar again, probably? try ☺ 14:34
pilne if no, i don't mind using a basic text editor for my dabblings at work :D
well, it takes a lot of time to try usually, since i do the install at home, and test it at work :D
dakkar I don't have any Windows machine, so I can't really say if/how it will work for you 14:35
pilne hehe
i only went back to windows to game better with the gf, our "at home quality time" often consists of pvp in world of warcraft (: i really do miss having my linux boxes setup too. 14:36
dakkar on a linux box, I'd expect it to JustWork™, regardless of the path where I'd unpack the tarball
14:36 dataangel left
dakkar a thing that will probably not magically work on windows is file association 14:37
but last time I looked at how that was implemented, we were still running 98 and NT3
pilne i don't really need file association for what i'm doing at work, as long as i can open comma, and point it at the files it needs, it should just work 14:38
jnthn pilne: On Linux, I think comma off USB stick probably just works out, because it runs wherever you unpack the tarball. For Windows, I'm not sure, but there's a decent chance it'll work out too. 14:39
pilne the day can't come too soon that i can have at least two computers and 3 monitors setup :D 14:40
but thanks for the reassurance that it's at least worth a shot jnthn (: 14:41
14:41 xinming_ left
dakkar not related, pilne, but: why are some of your smileys turned one way, and some the other? 14:42
pilne too much time on android where it makes the :) into an emoji way more often than i like
dakkar ooohh! lol
fair 14:43
14:43 xinming_ joined
[Coke] did a build of head. run make spectest, it says inline::p5 isn't installed, gives me a line to run to install it. do so, and rerun spectest... it's still not found. 14:45
ISTR mentioning this a few months ago. would ticket go in roast or rakudo? 14:46
14:48 Xliff left
[Coke] updates R#2815 14:51
linkable6 R#2815 [open]: github.com/rakudo/rakudo/issues/2815 Inline::Perl5 integration tests are no longer run
14:52 hungrydonkey joined, yuplushi joined 15:03 skids joined 15:13 sena_kun joined 15:14 Altai-man_ left 15:19 natrys joined 15:32 abraxxa left 15:33 abraxxa joined, andrzejku joined 15:37 abraxxa left 15:38 abraxxa joined 15:39 Petr37 joined, JJMerelo joined 15:40 Sgeo joined
Petr37 Have Raku html parsing module? 15:45
jdv79 should be on modules.raku.org
last time i tried to use some (2y ago?) i fell back on Perl/Mojo. maybe they are better now. 15:47
JJMerelo Petr37 there's DOM::Tiny modules.raku.org/dist/DOM::Tiny:cpan:HANENKAMP But you can use via Inline::Perl5 any perl module too 15:48
Petr37 several more too if you search HTML in modules.raku.org modules.raku.org/search/?q=HTML 15:49
15:52 Petr37 left
jdv79 iirc HTML::Parser::XML is afflicted with perf issues cause grammars. and gumbo used to have a mem issue? 15:52
15:52 Petr37 joined 15:54 JJMerelo left 15:55 JJMerelo joined, john_parr_ joined 15:56 JJMerelo left 15:57 john_parr_ left
Petr37 What about Bailador? 15:57
sena_kun jdv79, gumbo is quite okay and the old issues were fixed IIRC. 15:58
15:58 JJMerelo joined
Petr37 Can't find Mojo last updated 15:59
jdv79 i was referrring to Mojo::DOM, sorry. 16:01
Petr37 Ok)) 16:02
16:02 dataangel joined
jdv79 sena_kun: i noticed that lately but haven't had a chance to try it again. 16:02
Petr37 Anyone know GUI library for Raku? 16:03
I need something like webview 16:05
JJMerelo There's Gtk3 16:06
It works pretty well. Don't know about webview. If it's a bit like Electron, no, I don't think we have that yet. 16:07
16:09 Petr37 left
Geth_ ecosystem: 1a2182c735 | (Richard Hainsworth)++ (committed using GitHub Web editor) | META.list
Add Generic Pod Renderer to ecosystem

Distribution contains Pod::To::HTML, Pod::To::MarkDown, and a Graphical README.md generator from Pod in Module file. Generates TOC and Glossary and puts them in HTML. Customisable CSS and favicon. Implements P<> format code (old Pod::To::HTML does not do this). Pod::To::HTML in this distribution passes all old Pod::To::HTML tests All output determined by customisable Templates (Mustache engine but this can be changed by subclassing) Lots of Documentation on usage and subclassing.
ecosystem: ccec92e3fc | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | META.list
Merge pull request #516 from Raku/finanalyst-patch-3

Add Generic Pod Renderer to ecosystem
16:34 Petr37 joined
Petr37 Where i can find lazy list example? 16:42
moritz m: my @squaress = (1..*).map(-> $x { $x * $x }); say @squares[12] 16:44
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '@squares' is not declared. Did you mean '@squaress'?
at <tmp>:1
------> 3ss = (1..*).map(-> $x { $x * $x }); say 7⏏5@squares[12]
moritz m: my @squares = (1..*).map(-> $x { $x * $x }); say @squares[12]
camelia 169
moritz Petr37: ^^ there you go
m: my @squares = (0..*).map(-> $x { $x * $x }); say @squares[12] # if you want the index to align :D
camelia 144
16:44 dakkar left
moritz raku-musings.com/gather-take.html for some other examples 16:46
Petr37 Thank you 😊
lucs Speaking of squares, I've never noticed anyone observing the totally useless fact that the number of RFCs that were submitted for the Perl 6 design happens to be 19 squared, the number of intersections on a Go board. 16:47
JJMerelo He
lizmat :-) 16:48
16:54 orinthe left, orinthe joined
codesections lucs: that raises the question of how well AlphaGo would have done at merging those RFCs 16:57
17:02 Petr37 left
lucs codesections: Heh :) 17:03
17:11 finsternis left 17:12 Altai-man_ joined 17:14 sena_kun left 17:15 xinming_ left, andrzejku left 17:17 xinming_ joined 17:18 abraxxa left 17:19 abraxxa joined 17:22 abraxxa left 17:23 abraxxa joined 17:24 abraxxa left, abraxxa joined 17:37 abraxxa left, abraxxa joined 17:38 Tirifto joined 18:01 Petr37 joined 18:02 hungrydonkey left 18:08 JJMerelo left 18:13 sena_kun joined 18:15 Petr37 left 18:18 squashable6 left 18:21 squashable6 joined 18:26 maettu joined
[Coke] 151271 18:29
oh noes, my 2 factor code!
18:33 fling_ joined 18:36 fling left, fling_ is now known as fling
kawaii m: say "hello, world!"; 18:41
camelia hello, world!
kawaii Who is responsible for maintaining camelia? :)
18:43 sena_kun left 18:44 xinming_ left
kawaii Ah, found it, perl6/evalbot repo. 18:45
18:45 xinming_ joined 18:52 molaf left 19:02 Black_Ribbon joined 19:06 Petr37 joined 19:12 fling left 19:13 sena_kun joined, Manifest0 left 19:14 Altai-man_ left 19:17 Manifest0 joined 19:23 squashable6 left 19:24 squashable6 joined 19:25 xinming_ left 19:26 xinming_ joined 19:27 Manifest0 left, Manifest0 joined, fling joined 19:31 xinming_ left, xinming_ joined 19:33 rindolf left
holyghost J,R,R Wall :-) 19:35
19:47 Petr37 left 19:48 Petr37 joined 19:55 Xliff joined
Xliff vrurg: You aroun? 19:56
vrurg Xliff: in a minute I'm all yours. :)
Xliff vrurg: vrurg.github.io/arfb-publication/0...ing-raku/. In section "Roast". Second sentence. "And it defines what Raku language is" seems to be better read as "And it defines what the Raku language is" 19:57
Xliff goes back to reading.
vrurg: Third paragraph. "and letting a compiler develoipers" → "and letting compiler developers" 19:58
Want me to take this to PM? 19:59
vrurg Xliff: event better as an issue at github.com/vrurg/vrurg.github.io/ if you don't mind. Thank you! 20:01
20:03 moon-child joined, skids left
Xliff Ah! OK! 20:05
I will still needlessly poke you with unnecessary PMs so I can put it all in one massive issue. 20:06
Just coz I <3 this article.
20:07 wildtrees joined 20:08 moon-child left, wildtrees left, wildtrees joined
vrurg Xliff: Thanks for it! I'm blush. :D 20:11
Xliff hehe
20:15 wildtrees left, wildtrees joined
Petr37 Where i can find "type exceptions" info (X::IO for example) ? 20:18
20:19 aborazmeh joined, aborazmeh left, aborazmeh joined
sena_kun Petr37, docs.raku.org/type/X::IO <- like this? 20:22
lizmat Petr37: if you want the source, look at src/core.c/Exception.pm6 20:26
20:28 Manifest0 left 20:34 Petr37 left, Petr37 joined
Petr37 Thanks 20:37
20:38 MasterDuke joined 20:40 xelxebar left, xelxebar joined 20:41 Manifest0 joined
Petr37 Sorry for stupid question... How can i print unicode simbol? 20:46
lizmat m: say "🐓"
camelia 🐓
lizmat ?
Petr37 Yes
Like this 20:47
lizmat m: say "\c[ROOSTER]"
camelia 🐓
lizmat m: say "\c[BUTTERFLY]" 20:48
camelia 🦋
Petr37 Ok, thanks)) 20:49
20:49 aindilis left
lizmat m: say "BUTTERFLY".uniparse 20:50
camelia 🦋
lizmat m: dd "BUTTERFL".uniparse 20:51
camelia Failure.new(exception => X::Str::InvalidCharName.new(name => "BUTTERFL"), backtrace => Backtrace.new)
Petr37 Can you provide me any good article s about Unicode? 20:52
lizmat in the context of Raku, or generally ? 20:55
Petr37 Yes, Raku. Sorry for my questions))
20:59 finsternis joined 21:03 aindilis joined 21:04 aindilis left, aindilis joined
lizmat docs.raku.org/language/unicode # Petr37 21:05
Petr37: if you feel something is missing there, please make a doc issue :-)
Petr37 Thanks so much 😊
lizmat yw 21:06
lucs I'm using urxvt in Linux, but a lot Unicode glyphs just show up as '�'. 21:08
What should I be doing to try to fix that?
lizmat update your support of unicode? 21:10
looks like it is a few versions behind ?
21:10 cpan-raku left, rbt left
lucs Yeah, I guess, but I'm not sure where that happens exactly :/ 21:11
21:11 rbt joined
lucs I suppose it's a terminal font or something. 21:11
21:12 Altai-man_ joined
[Coke] I did a google search (dont use urxvt) and there were some very hopeful responses there. 21:12
lucs Oh, hmm...
So I'd need a different terminal emulator?
21:13 cpan-raku joined, cpan-raku left, cpan-raku joined
lucs will google 21:13
21:14 sena_kun left
lucs [Coke]: "(dont use urxvt)": is that your personal recommendation or what google appears to suggest? 21:17
oddp_ Yeah, I gave in and ditched urxvt a while ago. Maintainer is sitting on so many patches for years now. The color patch especially.
lucs oddp_: What do you use?
oddp_ Fat terminal that's coming with my DE.
lucs DE?
oddp_ desktop environment. KDE + Konsole in my case. 21:18
lucs Oh, right.
21:19 natrys left 21:21 wildtrees left 21:22 kensanata left 21:24 wildtrees joined, wildtrees left
rypervenche Even "st" has better support for unicode, and that's a very minimal terminal emulator. 21:25
21:25 wildtrees joined
[Coke] lucs: sorry, was too short: I don't use it, so I don't have anything personal to say about it, but I googled, ... 21:25
21:26 __jrjsmrtn__ joined
lucs Ah, I see, thanks :) 21:26
rypervenche: I'll check it out.
21:27 _jrjsmrtn left
oddp_ Don't, unless you like to use tmux/screen along with it. It can't scroll back up. ;) 21:28
pilne ok, looks like rakubrew sucessfully installed on my desktop, i've got vim setup with raku hilighting, i'd say i'm off to a good start :D the repl will launch off the copy i have on a usb stick (so that's good too) 21:29
worst comes to worst i'll just have a very "honky rigged" setup on the usb stick
lucs oddp_: Yeah, I use tmux, so with a bit of luck, it should be good.
rypervenche lucs: Ahh, that was just an example. st is meant to be very minimal and you're supposed to edit the source code to edit its config file. Not for beginners. 21:37
lucs rypervenche: I'm not quite a beginner, but I'm pretty lazy :) 21:39
Freshly compiled, our /topic butterfly still shows up as '�'. 21:40
21:41 cpage left
lucs I'll give urxvt googling another go (I unsuccessfully tried to fix this a few months back). 21:41
21:42 cpage joined
lucs is probably just using an improper font. 21:44
rypervenche Try installing Noto Emoji.
lucs Ah, okay.
lucs needs to figure out how to install this nice font, right after dinner! :) 21:46
pilne is there a list somewhere of the environment variables I need to set, and folders I would need to create for my USB install of raku? 21:59
(going to use a .bat file or similar to set them in a cmd window)
Petr37 What is dd in Raku? 22:03
22:03 Xliff left
oddp_ docs.raku.org/programs/01-debuggin...x-entry-dd 22:07
The docs page has a search bar at the top right for cases like this.
Just make sure to enable javascript.
22:11 grumble left 22:12 grumble joined
rypervenche So I just realized that when I have variables at the top of my script, I don't need to add parameters for my subroutines for them... I guess that makes sense, since they're in the same scope. I've been stupidly adding parameters for them in my scripts >< 22:22
22:22 Tirifto left
guifa2 rypervenche: heh. I had a similar revelation once when I was repeatedly passing variables down a chain of function calls 22:24
Then I had the epiphany of dynamic variables :-)
codesections it can be helpful to be explicit in all the variables a sub uses, though (or at least the functional programmers would have us believe…) 22:25
guifa2 codesections: yeah, I definitely think twice before opting to go the "proper" functional route, but clarity can be often gained from brevity (esp if passing lots of vals) 22:31
22:58 MasterDuke left 23:03 Petr37 left 23:04 Petr37 joined 23:13 sena_kun joined 23:14 Altai-man_ left
pilne if i'm "starting fresh" and using .raku and a #!raku line, should i be using a "use v6;" line these days? 23:22
23:24 pecastro left
codesections :pilne My understanding is that it's not necessary. At the least, I can say that, as someone who came to Raku recently, I've not used `use v6` and haven't run into any issues 23:25
m: sub f(@foo) { @foo.sum }; f(<a b c>) 23:27
camelia Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5a' (indicated by ⏏)
in sub f at <tmp> line 1
in block <unit> at <tmp> line 1
codesections How do I put a type constraint on `f`, above, that requires it to take an Array of Ints? 23:28
I thought it would be `sub f([Int] @foo)` or `sub f(Array(Int) @foo)`, but neither of those work 23:30
m: sub f(Array(Int) @foo) { @foo.sum }; f([1, 2, 3]) 23:31
camelia Type check failed in binding to parameter '@foo'; expected Positional[Int] but got Array ($[1, 2, 3])
in sub f at <tmp> line 1
in block <unit> at <tmp> line 1
codesections That error message makes me think that's on the right track, but it also confuses me. Why does it expect a `Positional[Int]` when I just told it to expect an Array? 23:32
pilne codesections - ty , i wasn't expecting issues from not using it, i was just wondering if it was "good practice" (: 23:35
23:35 markoong left
codesections Er, wait, `Array(Int)` probably *isn't* on the right track – that looks like it's using the `Coercion type` syntax – that is, saying I want an Int and want to coerce it to an Array. Which isn't what I want at all 23:35
23:37 aborazmeh left
holyghost I am going to drink something, started 3 C# projects for work 23:40
23:50 hungrydonkey joined
elcaro codesections: kind of like `sub f(Int @foo) { ... }`, however, your code will still fail when you call `f([1, 2, 3])` 23:52
because `[1, 2, 3]` is an `Array` not an `Array[Int]`. If you create `my Int @a = 1, 2, 3` and pass `@a` to `f` it will work 23:53
or you could call `f(Array[Int].new(1, 2, 3))`
23:54 _jrjsmrtn joined 23:56 __jrjsmrtn__ left
codesections Aha, thanks! And, now that you explain it, that makes sense – `f(Int @foo)` requires an Array that can *only* hold `Int`s. And `[1, 2, 3]` isn't constrained to only hold Ints. It *happens* to only have Ints in it right now, but that's not part of its type. 23:58