»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_log/perl6 | UTF-8 is our friend! 🦋
Set by Zoffix on 25 July 2018.
vrurg Demos[m]: not sure if I got you correctly, but is this what you're looking for: docs.perl6.wakelift.de/routine/assuming ? 00:02
Demos[m] sorta, but I want it to do that for a whole bunch of methods at once 00:03
Demos[m] and then call them 00:03
vrurg Demos[m]: no, there is nothing like that. Still, I don't see the point for this and how exactly it must work. But if you gonna do it then most likely you'd either need to introdpect a class, or use FALLBACK. 00:07
jnthn Demos[m]: Hm, maybe wrap the object up in another class that inserts the argument and forwards the call? Like: class C { has $.arg; has $.delegate; method FALLBACK($name, |args) { $!delegate."$name"($arg, |args) } }
heh, vrurg just beat me to mentioning FALLBACK :D 00:08
vrurg :D
Demos[m] nim used to have this feature (still might) called `using`
vrurg Demos[m]: not sure if it's possible to have all feature of all languages implemented. :) 00:16
Demos[m] I mean one could do it with macros I'm sure
vrurg Likely so. 00:17
Demos[m] oh, also: can I write a class "repr" in perl6 00:25
and how flexable is it?
vrurg Demos[m]: if you mean VM representations, then – no. 00:28
Demos[m] yeah like is repr('mythinghere')
vrurg Demos[m]: see my comment above. :) repr is a low-level thing. You can read about them here: github.com/edumentab/rakudo-and-nq...master/src – slides-day2 00:31
SmokeMachine twitter.com/smokemachine/status/11...7427134465 01:22
AlexDaniel SmokeMachine: holy cow that looks fancy 02:08
hythm hello, is there a way to use sigilless variable of reserved words? something like: `my \start = 0, say start;`
AlexDaniel m: my \start = 0, say start 02:09
evalable6 (Mu)
AlexDaniel m: my \start = 0; say start
evalable6 0
AlexDaniel m: my \start = 42; say start
evalable6 42
AlexDaniel hythm: so what's wrong with that?
I mean, I wouldn't do it, but who am I to judge :)
hythm hmm, when I tried this in repel, it showed different thing, like waiting to complete the statement 02:10
hythm > my \start = 0; say start 02:10
*
hythm may be it's only a reple thing then 02:11
hythm s/reple/repl 02:12
hythm needed semicolon at the end, to work for repl 02:15
dominix hi everyone 02:57
dominix I am seeking help on Text::CSV ? how do I pass options ? 02:58
like quote_char = '"'
or allow-looses-quotes
no way to got it right
Grinnz it literally shows you 03:13
metacpan.org/pod/Text::CSV#allow_loose_quotes 03:14
uzl[m] dominix: Look at the module's doc. For allow-loose-quotes, modules.perl6.org/dist/Text::CSV:c....pod6#L428 03:19
Grinnz oh sorry, wrong channel again :)
it's similarly well documented, though
uzl[m] Yeah, the Perl version is well documented. Is the P6 version probably a port of it? 03:21
Grinnz yes, it's by the author of Text::CSV_XS
uzl[m] OK. dominix might want take a look at it too. 03:22
* to take
dominix I am not able to pass options to the constructor. if I do 03:34
my $csv = Text::CSV.new(sep_char=";", allow_loose_quotes, );
I have errors like Undeclared routines: allow_loose_quotes used at line 3 03:35
I don't know how to set allow_loose_quotes ... have no exemple
documentation do not permit direc use of all the functionnality, or maybe my mind is full of perl5 because I have done such jobs in perl5 and I would like to do it in perl6 now 03:38
dominix my $csv = Text::CSV.new(); is OK 03:42
my $csv = Text::CSV.new(sep_char=";", allow_loose_quotes, quote_char='"', escape_char='\\', allow_loose_escapes ); is NOT
uzl[m] dominix: allow-loose-quotes is a Pair so you must pass it using either `allow-loose-quotes => True` or colon-pair syntax `:allow-loose-quotes`.
Grinnz the documentation has plenty of examples 03:44
dominix uzl[m]: thanks, I've tryed = 1 with no success, just missing the syntax allow_loose_quotes=>True, 03:59
Grinnz just like in perl 5, = and => are completely different 04:01
dominix is there something like WWW::Mechanize in perl6 ? 04:02
Ulti dominix: HTTP::UserAgent or Cro::HTTP::Client I believe are the most developed 07:05
the latter being good if you want all the other things from Cro 07:06
Ulti dominix: above typically you would do :allow_loose_quotes if its just a flag in a method call 07:08
Geth doc/master: 8 commits pushed by (JJ Merelo)++
holyghost hi FROGGS, great SDL code BTW ! 12:46
FROGGS hi holyghost and thank you :o) 13:11
tellable6 2015-05-23T10:37:04Z #perl6 <Ven> froogs: are you still looking at c++ name (un)mangling? this: github.com/kirbyfan64/unmangler might be interesting (even though it's in C)
2018-07-28T22:59:35Z #perl6 <benjikun> froggs: Interesting, perhaps we could do something somewhat similar with the GitHub side of things somehow. An aggregator server that does all of that for zef.
2018-08-06T09:38:57Z #perl6 <AlexDaniel> froggs: heyyo, github.com/FROGGS/p6-Games-BubbleBreaker/pull/6
2018-08-06T09:41:23Z #perl6 <AlexDaniel> froggs: also github.com/FROGGS/p6-Games-BubbleB...r/issues/7 (I was kinda disappointed that it doesn't run)
FROGGS are you referring to the Perl 5 module or the bit Perl 6 that I wrote in that matter?
holyghost perl 5, I am going to write tons of games with it in kubuntu sdl-perl module 13:21
I've written a super mario kart start with it 13:22
I'm probably going to do a kRPG program on it, but I need to think about it some more 13:25
a toolkit such as were in rpgrevolution.com, for writing qt/kde RPG games
e.g. zeldaclassic.com 13:26
FROGGS uhhh, that sounds awesome 13:29
holyghost needs lots of work :-)
cpan-p6 New module released to CPAN! Operator::dB (0.0.94) by 03ALLSOPP 13:31
netrino m: sub infix:<====>($a, $b) { $a == $b }; ($a ==== $b).say 14:19
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /tmp/38wY7JSjQ4
Variable '$a' is not declared
at /tmp/38wY7JSjQ4:1
------> 03sub infix:<====>($a, $b) { $a == $b }; (08⏏04$a ==== $b).say
netrino m: sub infix:<====>($a, $b) { $a == $b }; (10 ==== 10).say
evalable6 True
netrino Nice, fixed i see
Voldenet m: sub infix:<=>($a, $b) { $a == $b }; (10 = 10).say 15:36
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /tmp/bs63hOmRLz
Cannot …
Voldenet, Full output: gist.github.com/621d46045d58edc878...581f648060
Voldenet hm, I'm not sure if I should report inability to use infix:<=> as a bug - it could theoretically be used for debugging 15:37
masak hm, I just upgraded my Rakudo, and `use Test;` stopped working. 15:39
"Could not find Test at line 1 in [...]"
timotimo probably related to the build system changes recently-ish 15:42
masak I should add that the upgrade fast-forwarded past about 2 years of rakudo/nqp/moar development -- haven't used this machine for a while 15:43
timotimo ha 15:44
then we have a little more than just one change in the build system :) :)
masak but I'm at a loss what to do. the build/install otherwise succeeded
thowe nuke it from orbit and start over?
masak I guess. worth a shot 15:45
masak does so 15:46
timotimo aye
thowe Someone was saying yesterday that something cro needs is long-time broken... Is that the case? 15:49
gdonald webpacker I think? 16:04
thowe I just scrolled back and it seems he's writing an article about whatever he is doing, so maybe I can just read that and see what's up. 16:05
it was DrForr 16:06
Geth ecosystem: allsopp++ created pull request #469:
Migrate Operator::dB to CPAN
16:11
ecosystem: 52f1fbccc1 | (Owen Allsopp)++ | META.list
Migrate Operator::dB to CPAN

This module can be removed from p6c ecosystem because it is now on CPAN:
  - modules.perl6.org/dist/Operator::d...an:ALLSOPP
16:12
ecosystem: 5b998335a0 | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | META.list
Merge pull request #469 from allsopp/master

Migrate Operator::dB to CPAN
Geth ¦ problem-solving: JJ assigned to AlexDaniel Issue Ecosystem stability issues github.com/perl6/problem-solving/issues/105 16:18
cpan-p6 New module released to CPAN! HTML::BoreDOM (0.0.5) by 03ALLSOPP 16:42
thowe perl6 stuff is on CPAN? 17:12
timotimo aye 17:13
thowe HTML::BoreDOM isn't found on metacpan. What am I missing 17:14
timotimo metacpan doesn't give perl6 results
AlexDaniel try modules.perl6.org/ 17:15
masak hm, nope. a clean install did not bring back my Test.pm6 :/ 17:17
timotimo can try finding out what's happening with the module debug env var
masak yes, sure. how? 17:18
vrurg masak: set RAKUDO_MODULE_DEBUG=1
timotimo right
vrurg m: my @a = 1,2; my $j = all @a; say 1 ~~ $j; @a[0] = 3; say 1 ~~ $j; 17:19
evalable6 False
False
vrurg m: my @a = 1,2; my $j = any @a; say 1 ~~ $j; @a[0] = 3; say 1 ~~ $j;
evalable6 True
False
vrurg Hackedy-hack... 17:20
masak ok, that printed more lines, but nothing illuminating, I think
timotimo what are the lines it's looking for Test in? 17:22
masak it's searching in inst#/home/masak/.perl6, inst#/usr/local/share/perl6/site, inst#/usr/local/share/perl6/vendor, inst#/usr/local/share/perl6/core, ap#, nqp#, and perl5# 17:23
timotimo which of those locations got nuked? 17:24
masak I... don't know how to answer that. I clone and build+insall my rakudo in ~/ours/rakudo -- that's the directory I nuked 17:25
timotimo why is it looking in /usr/local/share at all? 17:26
is "which perl6" the right one? "perl6 --version"?
masak yes, seems to be the right one 17:29
oh!
if I do ./perl6 in the rakudo/install/bin directory, it works 17:30
ok, mystery solved
/usr/local/bin/perl6 is an old wrapper script that I set up, back in 2015 -- apparently, it's bitrotted 17:31
timotimo ha
masak ...now it works :> 17:32
timotimo++ # asking the right questions
and all this was so that I could reproduce and fix a Travis regression in Alma. that will have to wait till tomorrow :) 17:33
DrForr sena_kun: reactjs.org/docs/create-a-new-react-app.html has a list of recommended JSX toolchains, I note that babel appears at the bottom of the list. 18:21
sena_kun: As a side note, raw React WFM - I'm resorting right now to having CodePen do decompilation from JSX for me, and dropping the 'var XX = () =>' in favor of 'const XX ='. 18:23
sena_kun: I'm also adding my comments to sample-app-spa-react on github. If I can get the rest of this working minus the JSX compiler it'll be an article. 18:25
sena_kun DrForr, thank you for the info! I'll take a look a bit later after some other debugging. 18:33
DrForr No worries. If I can get the React side working with sockets (I.E. Redux) I'll probably switch to using Vue, which is what we've standardized on at work. It's just that I couldn't get that to work, I figured some prior xperience with React/Redux would be the thing. 18:34
DrForr sena_kun: "Babel having dependency issues as a compiler?" along with a few thoughts. 18:40
Aaaand the Redux section requires '...' so thre's more JSX decompilation to go, maybe. 18:56
MasterDuke might be some useful info here arxiv.org/abs/1908.04219 re promoting perl6/raku, but haven't read it yet myself 19:03
cpan-p6 New module released to CPAN! ORM::ActiveRecord (0.0.4) by 03GDONALD 19:37
dduncan Question: In some other languages such as .NET or Java it is possible for character strings to contain invalid codepoints such as UTF-16 surrogates not in proper pairs. Does a Perl 6 Str potentially have this problem too, or does Perl 6 guarantee that all Str are well-formed and don’t have any UTF-16 surrogate codepoints, because it would have checked for and failed such input when creating the Str. Or if a Str can be invalid, what i 21:26
the best way to test if a Str is well formed, eg the “…” I can put in a “Str where …” to ensure I only get valid Str. Thank you.
MasterDuke dduncan: samcv would know more, but i would say that perl6 strings are guaranteed to be valid, trying to create an invalid one would throw an exception 21:36
dduncan Thank you, that is what I was hoping for. 21:37
MasterDuke m: my Buf $a .= new(0x61, 0x62, 0x63); say $a.decode("utf-8"); my Buf $b .= new(0xff, 0x62, 0x63); say $b.decode("utf-8"); 21:42
evalable6 (exit code 1) abc
Malformed UTF-8 at line 1 col 1
in block <unit> at /tmp/cenhXBQjXO line 1
SmokeMachine m: my Buf $a .= new(0x61, 0x62, 0x63); say $a.decode("utf-8-c8"); my Buf $b .= new(0xff, 0x62, 0x63); say $b.decode("utf-8-c8"); 23:02
evalable6 abc
􏿽xFFbc