»ö« 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. |
|||
00:13
zachk left
|
|||
discord6 | <Bearhug> Is there a reason why postfix:<,=> doesn't seem to work for Arrays? Seems like my @a = <a b c>; @a ,= 'd'; would make sense? | 00:18 | |
00:25
hamhu3 left
|
|||
MasterDuke | Bearhug: things don't automatically flatten in perl6 as much as they did in perl 5 | 00:25 | |
p5: my @a = ("a", "b", "c"); @a = (@a, "d"); say for @a | 00:26 | ||
perlbot: help | |||
perlbot | MasterDuke: Provides help text for a specific command. Try 'help echo'. See also the command 'plugins' to list all of the currently loaded plugins. | ||
MasterDuke | perlbot: plugins | ||
perlbot | MasterDuke: 8ball allowpaste arg cache_check compose conf conf_dump core default define echo eval factoids geoip get google head help host host_lookup join karma karma_modify karmatop more nick_lookup null oeis package part pastebinadmin perldoc plugins quote reload_plugins restart rss rss_title save_config seen shorten tell title translate twitter unicode utf8 zippit | ||
00:28
TimToady joined
|
|||
MasterDuke | oh well, i thought one of the bots could do perl5 also. anyway, the perl5 example above does result in @a having "d" appended. but perl6 creates a new array with @a in the first slot and "d" in the second, because it doesn't flatten @a | 00:29 | |
discord6 | <Bearhug> Yeah, probably more intuitive that way for anyone but Perl 5 programmers. Is there a better way to non-destructively append an item to the front/back of a List/Array than to do something like |@a, 'd'? | 00:31 | |
MasterDuke | what do you mean by non-destructively? you want something other than .push or .append? | 00:33 | |
you could use flat instead of | | 00:35 | ||
00:44
TreyHarris joined
00:46
Sgeo_ joined,
AlexDani` joined
00:47
AlexDani` is now known as AlexDaniel,
AlexDaniel left,
AlexDaniel joined
00:49
TreyHarris left,
Sgeo__ left
01:00
squashable6 left
01:02
squashable6 joined,
ChanServ sets mode: +v squashable6
|
|||
discord6 | <Bearhug> Non-destructively as in I want to return a new list rather than modify @a | 01:05 | |
MasterDuke | m: my @a = <a b c>; my @b = @a.clone.push("d"); dd @a; dd @b # only thing i could think of other than using | or flat | 01:15 | |
evalable6 | Array @a = ["a", "b", "c"] Array @b = ["a", "b", "c", "d"] |
||
01:15
TimToady left
01:16
TimToady joined
01:17
TreyHarris joined
01:23
netrino left
|
|||
SmokeMachine | m: my @a = 1,2,3; my @b = |@a, 4; say @b | 01:25 | |
evalable6 | [1 2 3 4] | ||
01:27
khisanth_ left
|
|||
discord6 | <Bearhug> Yeah that seems to be the most elegant | 01:27 | |
MasterDuke | if you can use clone, it seems to be much faster | 01:31 | |
benchable6: compare HEAD my @a = <a b c>; my @b; for ^100_000 { @b = @a.clone.push("d"); }; dd @b ||| my @a = <a b c>; my @b; for ^100_000 { @b = |@a, "d"; }; dd @b | 01:33 | ||
benchable6 | MasterDuke, starting to benchmark the 1 given commit | ||
MasterDuke, gist.github.com/ff2e793f3ae398da1e...fd109b2dac | |||
01:37
buffet_ joined
01:38
_jrjsmrtn joined
01:39
buffet left,
khisanth_ joined
01:41
__jrjsmrtn__ left
01:43
MidCheck joined
02:43
bloatable6 left,
releasable6 left,
squashable6 left,
undersightable6 left,
statisfiable6 left,
notable6 left,
unicodable6 left,
quotable6 left,
shareable6 left,
nativecallable6 left,
benchable6 left,
bisectable6 left,
committable6 left,
reportable6 left,
coverable6 left,
greppable6 left,
evalable6 left
02:44
squashable6 joined,
ChanServ sets mode: +v squashable6
02:45
releasable6 joined,
committable6 joined,
quotable6 joined,
ChanServ sets mode: +v quotable6,
benchable6 joined
02:46
bisectable6 joined,
ChanServ sets mode: +v benchable6,
ChanServ sets mode: +v bisectable6,
unicodable6 joined,
undersightable6 joined,
nativecallable6 joined,
ChanServ sets mode: +v nativecallable6,
reportable6 joined,
shareable6 joined,
ChanServ sets mode: +v shareable6
02:47
coverable6 joined,
evalable6 joined,
ChanServ sets mode: +v evalable6
02:48
greppable6 joined,
statisfiable6 joined,
ChanServ sets mode: +v statisfiable6,
bloatable6 joined,
ChanServ sets mode: +v bloatable6,
notable6 joined
02:57
hdee joined
|
|||
hdee | hello | 02:58 | |
AlexDaniel | hi! | 03:04 | |
03:04
lizmat left
03:05
woolfy left
03:07
hdee left
03:08
tony-o left
03:13
squashable6 left
03:14
squashable6 joined
03:17
hdee joined
03:21
hdee left
03:23
vrurg left
03:29
Cabanossi left
03:35
Cabanossi joined
03:56
MidCheck left
03:59
araraloren_ joined
|
|||
Seance[m] | I have a question, I'm getting 'Use of Nil in string context' when using .uc to test against .prematch | 04:13 | |
which has a .WHAT type of (str) | |||
Here is my conditional: | |||
if ($/.prematch ~~ /<upper>/) and ($/.prematch !~~ /<lower>/) and ($/.prematch == $/.prematch.uc) | |||
I was previously using 'eq' | |||
because comparing strings, so the == was me just trying random stuff to get this to quit throwing errors | |||
hastebin.com/uceyojojor.rb | 04:14 | ||
Seance[m] sent a long message: < matrix.org/_matrix/media/v1/downlo...CzQtAapPbB > | 04:15 | ||
I've traditionally done 3 via comparison of $str and $str.uc | |||
I must be missing something pretty basic | 04:16 | ||
04:24
xinming_ joined
|
|||
hobbs | you're resetting $/ every time you do a match, so I don't think your code does what you mean for it to do | 04:25 | |
grab $/.prematch into a variable first, and then do some tests against that variable | 04:26 | ||
04:27
xinming left
|
|||
Seance[m] | Does it reset between conditional checks? | 04:39 | |
hobbs | sure, if you're doing regex matches as part of them | ||
squashable6 | 🍕 titsuki++ wrote a comment on “Most wanted, 2019 edition”: github.com/perl6/perl6-most-wanted...-480558790 | 04:41 | |
🍕🍕🍕 First contribution by titsuki++! ♥ | |||
04:52
sacomo joined
05:17
tonyo joined
05:21
molaf joined
05:32
tonyo left
05:39
tony-o joined
05:50
vike1 joined
05:51
vike left
05:57
araraloren_ left
06:00
aborazmeh joined,
aborazmeh left,
aborazmeh joined
06:01
jmerelo joined
06:09
molaf left
06:20
fnux joined
|
|||
Geth | doc: ccb25adfd9 | (JJ Merelo)++ | 2 files Revises Buf for #2709, minor changes Also adds missing methods for Blob. Refs #2694. |
06:39 | |
06:41
MasterDuke left
07:04
quester left,
reach_satori left
07:25
domidumont joined
07:35
MidCheck joined,
aborazmeh left,
reach_satori joined
07:36
molaf joined
08:02
lizmat joined
08:04
molaf left
08:23
jmerelo left
08:32
lichtkind left
08:33
|Sno| left
08:49
lichtkind joined
08:58
woolfy joined
09:04
rindolf joined
09:09
aborazmeh joined,
aborazmeh left,
aborazmeh joined
09:10
rindolf left
09:11
antanst joined,
cpan-p6 left,
cpan-p6 joined,
cpan-p6 left,
cpan-p6 joined
09:13
rindolf joined
09:25
lizmat_ joined
09:27
lizmat left
09:34
andrzejku joined,
sena_kun joined
09:46
rindolf left
09:54
rindolf joined
10:02
Black_Ribbon left
10:04
hasuwiz joined
10:05
netrino joined
10:07
mowcat joined
10:17
mowcat left
10:20
aborazmeh left
10:25
atroxaper joined
11:01
rindolf left
11:02
[Sno] joined
11:19
rindolf joined
11:29
woolfy left,
woolfy joined
11:32
woolfy left
11:34
aborazmeh joined,
aborazmeh left,
aborazmeh joined
|
|||
[Sno] | lizmat_: /wave | 11:35 | |
11:36
lizmat_ is now known as lizmat
11:40
aborazmeh left
11:45
jmerelo joined
|
|||
jmerelo | squashable6: status | 11:56 | |
squashable6 | jmerelo, 🍕🍕 SQUASHathon is in progress! The end of the event in ≈2 hours. See github.com/rakudo/rakudo/wiki/Mont...Squash-Day | ||
jmerelo, Log and stats: gist.github.com/1b135a89bec1938423...305c31bf61 | |||
11:57
woolfy joined,
breinbaa1 left,
antanst left
11:58
breinbaas joined,
woolfy left
12:09
antanst joined
12:21
buffet_ is now known as buffet
12:23
andrzejku left
12:25
cpan-p6 left,
cpan-p6 joined,
cpan-p6 left,
cpan-p6 joined
12:52
jmerelo left,
araraloren joined
12:59
ben_m joined
|
|||
Geth | evalbot: stigtsp++ created pull request #11: run rakudo-moar in a firejail as restricted as possible |
13:03 | |
13:11
ufobat_ joined
13:15
ufobat__ left
13:26
domidumont left,
domidumont joined
13:28
atroxaper left
|
|||
ben_m | Is there a way to reload a module in the perl6 interpreter without restarting it? | 14:07 | |
14:13
atroxaper joined
14:14
MidCheck left
|
|||
ugexe | No. How would that work in a multi thread environment? | 14:20 | |
owild the compiler just say screw it and give two separate racing threads different versions (that claim they are the same) ? | |||
Should reloading in one thread be able to blow up every other thread that already loaded the module? | 14:21 | ||
ben_m | Meant the interactive interpreter, just for a simple REPL workflow | 14:22 | |
14:22
MidCheck joined
|
|||
ugexe | The compiler shouldnt change its behavior based on how simple the workflow is though | 14:23 | |
maybe someone else is using the repl for a multithreaded learning experience | 14:24 | ||
ben_m | Don't know how the compiler works, just used to from some other languages (mostly Lisp based that I remember) to be able to modify the code I'm working on, reload it in the REPL and test it right away without restarting | ||
I was just wondering if that's possible in Perl6 as well | 14:25 | ||
ugexe | How does parallel module loading work in lisp? | 14:27 | |
like does it actually load them in parallel or is it serialized | |||
14:35
[Sno] left
14:37
reach_satori left
14:56
kurahaupo left,
kurahaupo joined,
kurahaupo left
14:57
kurahaupo joined
14:59
antoniogamiz joined
|
|||
antoniogamiz | \o/ | 15:01 | |
ben_m | I don't really understand that question, when I recompile/evaluate a library in lisp it just replaces the symbol table in the VM, as far as I understand | 15:03 | |
So everytime a function gets called after that it uses the new one instead of the old one | |||
araraloren | You should consider multi thread environment , I don't know lisp very well. | 15:12 | |
15:13
kurahaupo left
|
|||
El_Che | I hope new libraries don't break the ABI :) | 15:13 | |
15:14
antoniogamiz left
15:19
zakharyas joined
15:26
kurahaupo joined,
jmerelo joined
|
|||
jmerelo | squashable6: status | 15:26 | |
squashable6 | jmerelo, Next SQUASHathon in 25 days and ≈20 hours (2019-05-04 UTC-14⌁UTC+12). See github.com/rakudo/rakudo/wiki/Mont...Squash-Day | ||
jmerelo | squashable6: log 2019-04-06 | ||
squashable6 | jmerelo, Log and stats: gist.github.com/870337c722bd40ef6d...ad84cdb5db | ||
jmerelo | Results for latest squashathon... github.com/JJ/p6-app-squashathons/...r-2019.csv | 15:30 | |
... and since AlexDaniel and myself are not eligible... | 15:31 | ||
... the winner is... | |||
.tell bduggan you're the squashathon winner! Contact lizmat to get your Camelia! | |||
yoleaux | jmerelo: I'll pass your message to bduggan. | ||
jmerelo | .seen bduggan | ||
yoleaux | I haven't seen bduggan around. | ||
jmerelo | Apparently he's not using the same nick in IRC. Anyway, Brian Duggan is the winner. Congrats! | 15:32 | |
15:36
zakharyas left
|
|||
tobs | I was looking forward to this squashathon but ended up being sick in bed all weekend | 15:38 | |
15:41
kurahaupo left,
kurahaupo joined,
domidumont left
15:49
pmurias joined
|
|||
pmurias | rakudo.js passed 806 test files in Chrome :) | 15:50 | |
15:51
zakharyas joined
|
|||
araraloren | how many the test file totally :) | 15:54 | |
atroxaper | Hi, #perl6! | 15:56 | |
AlexDaniel | hello o/ | ||
araraloren | atroxaper o/ | ||
atroxaper | I've just released a big module - production ready full customizable logger library. Please have a look. github.com/atroxaper/p6-LogP6 | 15:57 | |
AlexDaniel: \o | |||
Kaiepi | sweet | ||
atroxaper | araraloren: \o | 15:58 | |
Kaiepi | atroxaper++ | ||
AlexDaniel | weekly: colabti.org/irclogger/irclogger_lo...04-07#l275 | ||
notable6 | AlexDaniel, Noted! | ||
timotimo | atroxaper: cool, could you give a few words what makes it different from Lumberjack? | 15:59 | |
atroxaper | AlexDaniel: Thanks! | ||
16:01
leah2 left
16:02
jaldhar joined
|
|||
atroxaper | timotimo: First of all, you can add loggin calls in your code but configure io::handele, log levels and so on without touching the code. Even in runtime through change configuration file. | 16:03 | |
ugexe | timotimo: it uses 8 space indentation instead of 4 | ||
16:03
leah2 joined
|
|||
atroxaper | timotimo: This provide you possibility to use a logging even in libraries - end user can simply furn off it or redirect in separate file. | 16:04 | |
jaldhar | Hello. Is there some special processing for - arguments in MAIN()? The reason I ask is because while doing the perl weekly challenge, I tried to write a sub like this: | ||
multi sub MAIN('-f', $number) | |||
atroxaper | timotimo: more information in feature list github.com/atroxaper/p6-LogP6#features | ||
jaldhar | and it didn't match. | ||
multi sub MAIN('f', $number) | 16:05 | ||
did work however. | |||
pmurias | araraloren: 1310 (1191 not counting integration tests) | ||
araraloren | pmurias++, great job! | ||
ugexe | because -f is considered a named argument | 16:06 | |
pmurias | araraloren: a lot of the ones use something that won't work in the browser like file io or threads | ||
atroxaper | pmurias++ | ||
ugexe | or rather: its considered a named argument when its being passed in | ||
araraloren | pmurias oh, I see | ||
pmurias | araraloren: and some are broken on moar during precompilation too | ||
jaldhar | ugexe: do you know where this is documented. I didn't find it on perl6.org docs and I would like to read more. | 16:07 | |
araraloren | do you mean `sub MAIN(:$f, $number)` ? | 16:08 | |
jaldhar | araraloren: possibly :-) let me try it... | 16:09 | |
ugexe | it would have to be $number, :$f | ||
jaldhar | oh yeah. No that won't work | ||
ugexe | but the input would still be the way you wanted | ||
m: multi sub MAIN($number, :$f) { say 42 }; BEGIN @*ARGS = "-f", "1" | |||
evalable6 | 42 | ||
ugexe | m: multi sub MAIN($number, :$f) { say 42 }; BEGIN @*ARGS = "1", "-f" | 16:10 | |
evalable6 | (exit code 2) Usage: /tmp/cSn2yXyK_1 [-f=<Any>] <number> |
||
ugexe | m: multi sub MAIN($number, Bool :$f! where *.so) { say 42 }; BEGIN @*ARGS = "-f", "1" | ||
evalable6 | 42 | ||
ugexe | thats a more precise signature | ||
16:11
patrickb joined
|
|||
AlexDaniel | I wonder if you can drop * there | 16:11 | |
ugexe | if you want to accept -/f | ||
oh you mean just the * | 16:12 | ||
m: multi sub MAIN($number, Bool :$f! where .so) { say 42 }; BEGIN @*ARGS = "-f", "1" | |||
evalable6 | 42 | ||
jaldhar | what I am trying to do is option processing like getopt(3) with multiple subs for each option. | 16:13 | |
And actually it looks like this does work. Thanks! | |||
"multiple subs for each option" is a bit vague. I meant multiple subs; one for each option. | 16:14 | ||
timotimo | atroxaper: cool | 16:17 | |
atroxaper: my performance-oriented brain sees "/^LIBNAME .*/" and wishes for special syntax for begins-with and/or ends-with | 16:24 | ||
ben_m | Are classes open in Perl6 (e.g. like in Ruby), or is there something like C#/Kotlin extension methods? Can't find anything by googling | ||
atroxaper | timotimo: And `contains-that` :) Dunno. Probably. | 16:26 | |
hobbs | open, unless closed :) | ||
araraloren | ben_m what is extension method :) | 16:28 | |
timotimo | atroxaper: and maybe even support for junctions | ||
atroxaper | timotimo: I appreciate that you have a look. Btw I have a pure level of english. I'm sure I have a lot of mistakes and miss-meaning in README. If somebody can review the README it would be great. | ||
timotimo: I like junctions. But I need to imagine how we can describe junction in configuration file... | 16:30 | ||
timotimo | atroxaper: i kind of like that journald has structured log messages, that's kind of cool. any idea for that? | ||
ben_m | Extension methods let you add methods to existing classes without creating a derived class, or modifying the existing class | ||
timotimo | ben_m: you can call a sub on an object if you want | ||
araraloren | ben_m oh, yes you can in Perl 6 | ||
timotimo | m: sub not-a-method($obj) { say "being called on $obj" }; 99.¬-a-method | 16:31 | |
evalable6 | being called on 99 | ||
ben_m | Ah right | ||
atroxaper | timotimo: can you link me to journald? | ||
timotimo | 0pointer.de/blog/projects/journal-submit.html - maybe this gives you an idea? | 16:32 | |
ben_m | That's more explicit than extension methods, which might actually be cleaner, thanks. | ||
timotimo | that has to be in scope lexically, which may or may not be what you want | ||
araraloren | ben_m Also you can using Mixin feature :) | ||
timotimo | araraloren: not without changing the object in question | 16:33 | |
araraloren | hmm | ||
ugexe | ben_m: docs.perl6.org/syntax/augment | 16:34 | |
er, that modifies the existing class though | |||
atroxaper | timotimo: as I understand journald is something like syslog. Learning... | 16:35 | |
ugexe | m: class Foo { }; my $foo = Foo.new; $foo does role :: { method new-method { 42 } }; say $foo.new-method | ||
evalable6 | 42 | ||
araraloren | Hmm, is augment will affect all the things ? | 16:36 | |
timotimo | yes, it will | ||
hobbs | Affect ALL THE THINGS! | ||
timotimo | except not subclasses | ||
not at the moment | |||
you'll need to manually .^compose all subclasses that you want to affect | |||
araraloren | oh, anyway it's dangerous | 16:37 | |
ugexe | if you want dangerous you should use supercede | ||
timotimo | much like in ruby :P | ||
16:38
kurahaupo left,
kurahaupo joined
|
|||
araraloren | oh, ugexe don't know there is a thing like this :D | 16:38 | |
have to go to bed, have a good day #perl6 | |||
ben_m | good night | 16:39 | |
16:39
pmurias left
|
|||
araraloren | good night, and if anyone want more powerful getopt feature, you can consider my module Getopt::Advance :) haha | 16:40 | |
16:40
araraloren left
|
|||
atroxaper | timotimo: As I found we can write to journald through NativeCall. Then I can create a special IO::Handle for that and use Writer. Maybe it will require the new type Writer. I will put journald support into Roadmap. Thank you. | 16:51 | |
ugexe | ah, so no windows? | 16:54 | |
that will alienate 0.1% of your userbase | |||
17:01
molaf joined
17:13
AlexDani` joined
17:14
AlexDaniel left
17:18
domidumont joined
17:22
[Sno] joined
17:26
MasterDuke joined,
MasterDuke left,
MasterDuke joined
17:28
kurahaupo left,
kurahaupo joined
17:31
AlexDani` left
|
|||
atroxaper | How I can interpolate string from not interpolated one? For example, my $tab = '>\t<'; After that I want to make $tab be '> <'. | 17:33 | |
17:34
lizmat left
17:35
lizmat joined
|
|||
ugexe | if its just for escape sequences I would suggest doing it yourself | 17:37 | |
otherwise how could any answer but EVAL handle the various ways interpolation could be handled? | |||
m: my $tab = q|>\t<|; say $tab.subst(q|\t|, "\t") | 17:39 | ||
evalable6 | >␉< | ||
patrickb | Why is rakudobrew considered deprecated? | ||
lizmat | weekly: blogs.perl.org/users/laurent_r/2019...eek-2.html | 17:40 | |
notable6 | lizmat, Noted! | ||
discord6 | <פ ח ו ף> hello perl6 newbie here | ||
ugexe | i dunno. i think its just intended to steer the general public away from using it, but its not deprecaed | ||
patrickb | I've done quite some work on it recently and I'd like to know what's wrong with it to earn it the deprecated note... | ||
ugexe | i use it every day so... | 17:41 | |
discord6 | <פ ח ו ף> pastebin.com/raw/2TDVKYVb <<< im trying to figure out why this dosent work | ||
17:41
[Sno] left
|
|||
ben_m | rakudobrew was the only thing that let me install rakudo on Arch, I ran into different problems without it | 17:41 | |
17:42
dasdasdasd joined
|
|||
patrickb | But why shouldn't the public use rakudobrew? Does it somehow encourage bad practices? | 17:42 | |
discord6 | <פ ח ו ף> its saying it was expecting a symbol | ||
ugexe | again im not sure, likely because i understand what its doing so i dont see issues. | ||
sena_kun | maybe because using official packages is better than running some script from the internet. The second reason is, I guess, is that rakudobrew gets you latest commits by default, which may be very bad. I wasn't present that time, but I've heard there was some case where user files were accidentally damaged on master, so rakudobrew would be an awful thing to use that day. | ||
ugexe | i think one issue was `rakudobrew rehash` | ||
patrickb | Ah. | 17:43 | |
sena_kun | so it is not encouraged for "normal" users. but if you I Know What I Am Doing person. | ||
ugexe | the other was modules being installed to a central location | ||
patrickb | Then things should be better soon. I've implemented a no-shims-needed mode for rakudobrew. :-) | 17:44 | |
sena_kun | then its ok, like, if you just _must_ use latest commit where a critical (for you) bug was fixed, then rakudobrew is ok. but it is not encouraged as a tool for new users to pick up and use. | ||
17:44
MidCheck left
|
|||
ugexe | regular user should just be doing `rakudobrew build moar $RELEASE-VERSION` | 17:44 | |
patrickb | I think defaulting to the latest release is a good idea. That's what most non-dev users would want. | ||
sena_kun | yes | ||
such a default would be nice, but it is not how it is right now, I think | 17:45 | ||
ugexe | i almost only use `rakudobrew switch moar-$VERSION` and `rakudobrew switch moar-blead` | ||
sena_kun uses rakudobrew too | |||
17:47
[Sno] joined
17:48
netrino left,
woolfy joined
|
|||
discord6 | <פ ח ו ף> why is the regex ^[\S+] not matching [hello] | 17:50 | |
17:50
kurahaupo left
17:51
kurahaupo joined
|
|||
ugexe | m: say so "[hello]" ~~ /^[\S+]/ | 17:51 | |
evalable6 | True | ||
discord6 | <פ ח ו ף> that is malformed regex it says | 17:52 | |
<פ ח ו ף> ^[\S+] works | 17:53 | ||
<פ ח ו ף> do i not need to put \ to signify its the literal character [ | |||
dasdasdasd | who knows perl6 is all screwed up | ||
jmerelo | ^ is no longer beginning of string | 17:54 | |
17:54
AlexDani` joined,
molaf left
|
|||
jmerelo | But right, you need to do that | 17:54 | |
17:55
AlexDani` is now known as AlexDaniel
|
|||
jmerelo | m: say so "[hello]" ~~ /^\[\S+\]/ | 17:55 | |
evalable6 | True | ||
17:55
AlexDaniel left,
AlexDaniel joined
|
|||
jmerelo | m: say so "[hello]" ~~ /^^\[\S+\]/ | 17:55 | |
evalable6 | True | ||
jmerelo | m: say "[hello]" ~~ /^^\[\S+\]/ | ||
evalable6 | 「[hello]」 | ||
ugexe | m: say "[hello]" ~~ /^ "[" \S+ "]"/; # you can do this which is easier to read | 17:56 | |
evalable6 | 「[hello]」 | ||
discord6 | <פ ח ו ף> im trying to make an ini parser and its getting to be really difficult using grammar | ||
ugexe | perlgeek.de/blog-en/perl-6/2017-00...ammar.html | 17:57 | |
"Perl 6 By Example: Improved INI Parsing with Grammars" | |||
discord6 | <פ ח ו ף> that looks unreadable lol | ||
ugexe | you think /^[\S+]/ plus is readable? | 17:58 | |
discord6 | <פ ח ו ף> more readable than '[' <-[ [ ] \n ]>+ ']' \n+ | ||
AlexDaniel | weekly: perlweeklychallenge.org/blog/recap...lenge-001/ and github.com/manwar/perlweeklychallenge-club | ||
notable6 | AlexDaniel, Noted! | ||
ugexe | it is also more correct than /^[\S+]/ | 17:59 | |
17:59
dasdasdasd left
|
|||
ugexe | see docs.perl6.org/language/regexes-be...t_to_match | 18:02 | |
18:11
MasterDuke left
|
|||
atroxaper | ugexe: thank you for idea :) | 18:13 | |
18:15
andrzejku joined
|
|||
AlexDaniel | “Write a script or one-liner to remove leading zeros from positive numbers.” what does it even mean | 18:15 | |
like… can I have a test suite for this vague description? :) | 18:16 | ||
lucs | ugexe: Turns out my hung zef process was caused by a hung test it was running, but I couldn't tell because the output was being buffered by a wrapper I had it running under (to log stdout and stderr to files as well as having screen output); was fixed by an appropriate invocation of 'unbuffer'. | 18:24 | |
18:28
atroxaper left
|
|||
ugexe | there is a --test-timeout=... to bail out if a test takes too long (although I dont think this will kill the hung process) | 18:29 | |
18:29
syntaxfree joined
|
|||
syntaxfree | I just asked this question on #perl and I'm also reading through what Google tosses at me. But, should I learn Perl 5 or 6? | 18:29 | |
discord6 | <פ ח ו ף> 5 | 18:30 | |
syntaxfree | I'm in machine learning (for a paycheck) and use Python for everything. But I'm not looking for a replacement, I want to broaden my mind. | ||
lucs | ugexe: Well yes, that worked, but it took me a while to figure out what was going on. | ||
discord6 | <פ ח ו ף> perl5 is used alot more but perl6 is more similar to python | ||
ugexe | perl6 will give you more options for learning. perl5 will give you more options for money | 18:31 | |
18:31
ben_m left
|
|||
ugexe | python is more similar to perl5 than perl6 | 18:31 | |
discord6 | <פ ח ו ף> are you sure? perl5 dosent even have conventional paramters in functions no? | ||
ugexe | is that what your entire argument is based on? | 18:32 | |
lucs ponders words like "similarer" and "familiarer", but not for long. | |||
ugexe | and perl 5 has experimental support for parameters | 18:33 | |
it just seems odd to completely ignore threads/concurrency/gc | 18:35 | ||
18:39
crypto_bird joined
|
|||
crypto_bird | howdy! | 18:40 | |
I've got a list of 60 lists with 22 elements each, what's a good perl way of zipping them all together? | 18:41 | ||
syntaxfree | Python is changing fast. | ||
hobbs | syntaxfree: for mind-broadening, probably Perl 6 because it will throw a lot of things at you. But Perl 5 gives you decades of existing code, some of which bends the language in interesting ways. So really... whatever, you can't go wrong :) | 18:42 | |
18:42
vrurg joined
|
|||
syntaxfree | the newer REST API libraries assume you're writing async code by default. | 18:42 | |
18:43
vrurg left
|
|||
syntaxfree | type hints are also starting to be a thing. | 18:43 | |
18:43
vrurg joined
|
|||
crypto_bird | as in, ((1,2,3),(1,2,3),(1,2,3)) -> ((1,1,1),(2,2,2),(3,3,3)) | 18:44 | |
ugexe | m: my @lol = map { [$_ xx 22] }, (1..60); say [Z] @lol | 18:45 | |
evalable6 | ((1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 3… | ||
ugexe, Full output: gist.github.com/db742a63f6f2539146...1c53047b07 | |||
hobbs | m: zip (1,2,3),(1,2,3),(1,2,3) | 18:46 | |
evalable6 | WARNINGS for /tmp/nDh4rVujJv: Useless use of "zip (1,2,3),(1,2,3),(1,2,3)" in expression "zip (1,2,3),(1,2,3),(1,2,3)" in sink context (line 1) |
||
hobbs | m: say zip (1,2,3),(1,2,3),(1,2,3) | 18:47 | |
evalable6 | ((1 1 1) (2 2 2) (3 3 3)) | ||
hobbs | crypto_bird: zip is pretty good for zipping :) | ||
AlexDaniel | uhhhhhh… | ||
18:49
Black_Ribbon joined
|
|||
crypto_bird | m: my $stuff = (1,2,3;1,2,3;1,2,3;); zip $stuff | 18:50 | |
evalable6 | WARNINGS for /tmp/b8QxW94H0i: Useless use of "zip $stuff" in expression "zip $stuff" in sink context (line 1) |
||
AlexDaniel | m: dd ‘ALEX.DANIEL’.parse-base(35).Str.Rat.base(35) | 18:52 | |
evalable6 | "ALEX.DANIEL29" | ||
ugexe | thats not a list o flists | ||
AlexDaniel | m: dd ‘ALEX.DANIEL’.parse-base(35).base(35) | ||
evalable6 | "ALEX.DANIEL" | ||
AlexDaniel | what's the difference? | ||
ahhhh | 18:53 | ||
I think I get it | |||
18:56
vrurg left
|
|||
crypto_bird | @ugexe (1,2,3; 1,2,3; 1,2,3;) isn't a list of lists? | 18:56 | |
18:56
vrurg joined
|
|||
tobs | m: say zip (1,2,3; 1,2,3; 1,2,3) | 18:57 | |
evalable6 | ((1 1 1) (2 2 2) (3 3 3)) | ||
tobs | crypto_bird: it is, but putting it in a scalar container makes zip stop zipping: | ||
m: my $stuff = (1,2,3; 1,2,3; 1,2,3); say zip $stuff | 18:58 | ||
evalable6 | ((1 2 3) (1 2 3) (1 2 3)) | ||
crypto_bird | m: my @list = (1,2,3; 1,2,3; 1,2,3;); zip @list | ||
evalable6 | WARNINGS for /tmp/E0gkoUbSHG: Useless use of "zip @list" in expression "zip @list" in sink context (line 1) |
||
tobs | and the bot needs you to "say" something. Otherwise you get the useless use warning ^ | ||
crypto_bird | m: my @list = (1,2,3; 1,2,3; 1,2,3;); say zip @list | 18:59 | |
evalable6 | (((1 2 3) (1 2 3) (1 2 3))) | ||
crypto_bird | oh | ||
haha | |||
putting it in an @arr doesn't seem to help either | 19:00 | ||
19:00
jmerelo left
|
|||
tobs | m: my @list = (1,2,3; 1,2,3; 1,2,3;); say @list.elems | 19:00 | |
evalable6 | 3 | ||
crypto_bird | I've had problems manipulating lists in perl6 since I started messing with it | ||
tobs | huh | ||
(me too) | |||
m: my @list := (1,2,3; 1,2,3; 1,2,3;); say zip @list | 19:01 | ||
evalable6 | ((1 1 1) (2 2 2) (3 3 3)) | ||
moritz | m: my @list = (1,2,3; 1,2,3; 1,2,3;); say [zip] list | ||
evalable6 | (exit code 1) 04===SORRY!04=== Error while compiling /tmp/jt39Jikli5 Two ter… |
||
moritz, Full output: gist.github.com/c5cd35ff4f624c013b...fd1537e22c | |||
moritz | m: my @list = (1,2,3; 1,2,3; 1,2,3;); say [zip] @list | ||
evalable6 | (exit code 1) 04===SORRY!04=== Error while compiling /tmp/EnirU8Ro1k Two ter… |
||
moritz, Full output: gist.github.com/ff8093bc91adde9a78...dec3f4e0f7 | |||
ugexe | [Z] | 19:02 | |
19:02
mowcat joined
|
|||
moritz | right, thankx ugexe | 19:02 | |
m: my @list = (1,2,3; 1,2,3; 1,2,3;); say [Z] @list | |||
evalable6 | ((1 1 1) (2 2 2) (3 3 3)) | ||
lucs | r: my $a = <a b c>; my $n = <1 2 3>; say [Z] $a, $n | ||
perlbot | lucs: ((a 1) (b 2) (c 3)) | 19:03 | |
crypto_bird | that does it | ||
dang I be overthinkin | |||
thanks y'all | |||
ugexe | i said that 20 minutes ago :P | ||
moritz | but now *I* said it (SCNR) :D | 19:04 | |
lucs | r: my @A = (<a b c>, <1 2 3>); say [Z] @A | ||
perlbot | lucs: ((a 1) (b 2) (c 3)) | ||
lucs | Oh, that's moritz's version. | ||
ugexe | no respect! | 19:05 | |
lucs | :) | ||
crypto_bird | @ugexe you totally did | 19:06 | |
I just didn't understand cause I was in the midst of overthinking | |||
tyty <3 | |||
19:06
pmurias joined
|
|||
crypto_bird | got confused by the `my @lol = map { [$_ xx 22] }, (1..60)` bit | 19:06 | |
ugexe | yeah, that part isnt even right (should have been [$_ x 22]) | 19:07 | |
well its right, but it would have matched your input | |||
crypto_bird | I see now :D thanks y'all | 19:10 | |
19:13
pmurias left
19:14
pmurias joined
19:15
ufobat_ left
19:16
domidumont left
19:18
andrzejku left
|
|||
patrickb | I finished the rework of rakudobrew. I'd be grateful for testers. | 19:24 | |
pmurias | syntaxfree: if you want to broaden your mind Perl 6 is more interesting | ||
patrickb | This rework is incompatible with the old rakudobrew. To test it one has to remove the old installation and do a fresh clone. | ||
This should do the trick: `mv ~/.rakudobrew ~/.rakudobrew_old && git clone github.com/patzim/rakudobrew.git ~/.rakudobrew` | 19:25 | ||
AlexDaniel | patrickb: IMO that's not a big problem | ||
discord6 | <פ ח ו ף> just to see if im not going crazy what should "b o b".trim output? | ||
AlexDaniel | m: say "b o b".trim | 19:26 | |
evalable6 | b o b | ||
AlexDaniel | that :) | ||
discord6 | <פ ח ו ף> ok good | ||
patrickb | AlexDaniel: I'm currently pondering on how to best release this. Just pushing to tadziks repo kills rakudobrew for everyone that does `rakudobrew self-upgrade`. | ||
AlexDaniel | patrickb: if you find a way, great. If not, I don't care and IMO people who use rakudobrew can reinstall it | 19:27 | |
patrickb | Idea: Push to a different branch or repo and add a note to the current repo about the new version and how to upgrade. | 19:28 | |
pmurias | patrickb: if your rakudo is sane enough after the rework you might consider hooking it up to p6up.github.io/ | ||
AlexDaniel | <פ ח ו ף> are you seeing it behaving differently? Maybe there's something about unicode and text direction? | ||
pmurias | patrickb: p6up.github.io is currently just a mockup site | 19:29 | |
patrickb | pmurias: Also thought about promoting rakudobrew a bit more. But first is getting it released at all. :-) | 19:30 | |
AlexDaniel | patrickb: if we don't fall into the “nom” trap again then it's fine | ||
patrickb | pmurias: How would you measure "sane enough"? | ||
pmurias | patrickb: not sure, the old rakudobrew was considered discouraged | ||
patrickb | pmurias: Do you know why? | 19:31 | |
AlexDaniel | patrickb: yes, because most people use it to keep up with master | ||
patrickb | I asked that twice already and always only got answers like "Works for me." "Others shouldn't use, but I do." | ||
AlexDaniel | patrickb: which is a bad idea because master is not guaranteed to work properly | 19:32 | |
pmurias | patrickb: also if I remember correctly mst had some issues with it | ||
AlexDaniel | patrickb: also github.com/perl6/user-experience/issues/29 | ||
patrickb | AlexDaniel: I just changed it to default to the latest release earlier today. (ugexe and sena_kun gave respective feedback) | 19:33 | |
AlexDaniel | oh | ||
hm | 19:34 | ||
patrickb | The issues mst had were about a severe bug (rakudobrew deleted an entire home directory). That has been fixed by mst himself as a result. | ||
pmurias | mst: rakudobrew is being reworked so if you have any issues with it's design now there is a big chance they will be addressed ;) | 19:36 | |
mst | I don't think the bug actually affected me, I think it happened to a newbie and I got annoyed and happened to it | 19:38 | |
pmurias | patrickb: re sane enough well p6up doesn't do anything so if you want you could hook rakudobrew right now ;) | 19:39 | |
patrickb | mst: That's also what I remember. | ||
mst | and I think it ate the user's /usr/bin | ||
19:43
vrurg left
19:45
vrurg joined
19:48
lichtkind left
19:50
netrino joined
19:53
ufobat joined
20:00
lichtkind joined
20:05
cpan-p6 left
20:08
discord6 left
20:09
cpan-p6 joined,
cpan-p6 left,
cpan-p6 joined
|
|||
b2gills | rakudobrew's use case is to be able to build any triplet of Rakudo/NQP/MoarVM. So it is for developing/debugging the compiler and runtime. Most people just want the latest stable version, or the latest one in git. | 20:10 | |
20:13
discord6 joined
20:16
i1nfusion joined,
i1nfusion1 joined
20:19
tyil left
20:20
tyilanmenyn joined
20:21
someuser joined
20:27
tyilanmenyn is now known as tyil
|
|||
cpan-p6 | New module released to CPAN! LogP6 (1.3.1) by 03ATROXAPER | 20:31 | |
AlexDaniel | does anybody use the triplet feature? | 20:32 | |
I tried it once and it didn't work for me, maybe because of a user error | |||
20:35
|Sno| joined
|
|||
pmurias | b2gills: do you use it for that? | 20:36 | |
20:38
[Sno] left
|
|||
pmurias | b2gills: I don't see using mismatched triplets instead of just a checkout of the repo for all three being very usefull | 20:39 | |
b2gills | I created my own build script | 20:46 | |
That's part of the reason it is discouraged, most people don't need half of its features. | 20:47 | ||
crypto_bird | what is '⏏U' mean in perl? | 20:54 | |
timotimo | that's usually how rakudo shows you where a parse error happened | ||
moritz | crypto_bird: ⏏ is the marker where rakudo detects a syntax error | ||
crypto_bird | I keep getting this error "Cannot convert string to number: base-10 number must begin with valid digits or '.' in '⏏U' (indicated by ⏏)`" | 20:55 | |
so I suppose that makes sense | |||
timotimo | aye, it does that for integer/number parsing, too | ||
crypto_bird | it seems to fail randomly for no reason, frustratingly enough | 20:56 | |
there's no obviously unparseable strings in the file that I'm attempting to use as data | 20:57 | ||
pmurias | patrickb: what's the benefit of rakudobrew over plenv? | 20:58 | |
crypto_bird | y'all have any idea how I can figure out what perl is looking at when it throws that error? | 20:59 | |
timotimo | does it not show a backtrace? | ||
pmurias | patrickb: well p6env | ||
crypto_bird | it says a line | ||
patrickb | pmurias:p6env basically does the same thing rakudobrew does | ||
crypto_bird | that line shouldn't be doing any conversion of strings to integers | ||
patrickb | it uses shims | ||
it's written in bash instead of perl | 21:00 | ||
crypto_bird | "$block : $minute-avg \n"; | ||
patrickb | so p6env will not work on windows | ||
crypto_bird | where block is a timestamp and minute-average is a list of averages | ||
patrickb | also the shim approach has some drawbacks, as there is always a wrapper involved. | ||
timotimo | OK, in that case perhaps the line number isn't correct | 21:01 | |
patrickb | the new rakudobrew does path manipulation in env mode | ||
just like perlbrew does | |||
and rakudobrew also works on windows (in shim mode) | |||
the perl dependency doesn't really matter, since perl is required anyways to build perl6 | |||
crypto_bird | I wouldn't know how to tell where else it could be erroring, or why it would think that it should error there :/ | ||
timotimo | OK, let's try this: | 21:02 | |
21:02
zakharyas left
|
|||
timotimo | invoke perl6 with --ll-exception, that will give you many more frames to your backtrace | 21:02 | |
they show internals, but they may point us in the right direction | |||
patrickb | I guess rakudobrew has turned into a "feature creep" solution. | 21:03 | |
pmurias: Does that answer your question? | |||
crypto_bird | brilliant; running now. It'll take a minute or so haha this thing is tryna parse nearly 8 hundred thousand lines of data | 21:04 | |
patrickb | pmurias: Out of interest, what benefits does p6env have over rakudobrew? | ||
timotimo | sounds like something you'll want to try .hyper with :) | ||
21:05
vrurg left
21:06
vrurg joined
21:07
vrurg left
|
|||
crypto_bird | oh dang, that looks sick | 21:07 | |
timotimo | it's pretty rad | ||
crypto_bird | yeah, I'll probably end up trying to parallelism it once I have it working and not throwing ludicrous errors where it shouldn't haha | 21:08 | |
@timotimo gist.github.com/cryptobird/5b369ee...6fe0af0001 | 21:10 | ||
timotimo | OK, so it's trying to sum something for some reason | 21:11 | |
crypto_bird | it should be doing that slightly earlier in the script, to generate the averages | 21:12 | |
timotimo | you probably got a lazy list and it exploded when you actually requested the value | ||
that could very well be it | |||
crypto_bird | that makes sense | 21:13 | |
how do I make it not be lazy | |||
I need the greed | 21:14 | ||
timotimo | you can .eager on it, for more details i'd have to see the code | ||
crypto_bird | my $rows = $minute.map(-> $r { $r[2..$r.elems-1]}); my $minute-avg = ([Z] $rows).map(&sum).map({ ($_/60).round(.000001)}); | 21:15 | |
timotimo | yeah, at the end of the .map you'd .eager | ||
crypto_bird | .map.eager{} or .map{}.eager? | 21:16 | |
timotimo | the latter | ||
crypto_bird | cool | ||
time to give it a try :D | 21:17 | ||
timotimo | that $r[2..$r.elems - 1] is just supposed to skip the first two elements? | 21:18 | |
crypto_bird | yeah | ||
timotimo | .skip(2) may be more efficient | ||
crypto_bird | perl has so many tricks | ||
and I know none of them | |||
timotimo | it's totally fine to write "baby perl" | 21:19 | |
that's an explicit part of the language design | |||
crypto_bird | I do quite enjoy that face | 21:21 | |
fact* | |||
tobs | m: my $rows := (1,2,3; 1,2,3; 1,2,3); say ([Z] $rows).map(&sum); #`(could also try a "zip-with":) say [Z+] $rows | 21:22 | |
evalable6 | (3 6 9) (3 6 9) |
||
moritz | m: my $rows := (1,2,3; 1,2,3; 1,2,3); say [Z+] $rows | ||
evalable6 | (3 6 9) | ||
crypto_bird | oh wow | 21:25 | |
that's actually dang cool | |||
21:25
pmurias left
21:27
pmurias joined
|
|||
crypto_bird | still big error :/' | 21:29 | |
timotimo | time for some printf debugging? :) :) | 21:30 | |
well, dd probably | |||
crypto_bird | too many values for that | ||
frustratingly enough | 21:31 | ||
it's somewhere on this line my $minute-avg = ([Z+] $rows).map({ ($_/60).round(.000001)}).eager; | |||
21:36
reach_satori joined
|
|||
timotimo | is there a row with comments in it or something? | 21:37 | |
crypto_bird | not that I can find | 21:38 | |
I'm trying to dd before the line where it errors though to see | |||
timotimo | if one $rows comes from one line in the file, perhaps output line numbers to check which line it fails at | ||
crypto_bird | I tried removing the minute that it fails in (60 rows) out into it's own file | 21:39 | |
couldn't reproduce | |||
timotimo | now the problem happens already inside [Z+] $rows, right? | 21:40 | |
i don't think it'll very easily let you plop a debug or try/catch in there | |||
crypto_bird | yeah | 21:41 | |
timotimo | how about: .say for ([Z+] $rows).kv; | ||
crypto_bird | so I have to manually look through the 60 lines and look for a reason that it would fail | ||
timotimo | that'll give you line numbers and should display the failure when it happens | ||
crypto_bird | worth a shot | 21:42 | |
lizmat | weekly: bduggan.github.io/p6-practical-regexes | ||
notable6 | lizmat, Noted! | ||
crypto_bird | unless the error actually occurs in the rounding part | ||
timotimo | it's possible that suming them up gives you a failure, which is like a lazy/unthrown exception | 21:43 | |
and the rounding triggers the explosion | |||
crypto_bird | tru | ||
timotimo | m: my $input = [(1, 2, 3), (9, 8, 7), ("hi", 4, 3)]; .say for ([Z+] $input).kv | 21:44 | |
evalable6 | 0 9 |
||
timotimo | m: my $input = [(1, 2, 3), (9, 8, 7), ("hi", 4, 3)]; dd([Z+] $input) | ||
evalable6 | (9,).Seq | ||
timotimo | ah, that's not what | ||
m: my @input = [(1, 2, 3), (9, 8, 7), ("hi", 4, 3)]; dd([Z+] @input) | |||
evalable6 | (exit code 1) Cannot convert string to number: base-10 number must begin with valid digits or '.' in '03⏏04hi' (indicated by ⏏) in block <unit> at /tmp/dt5DeJOe_I line 1 |
||
timotimo | that's the one | ||
m: my @input = [(1, 2, 3), (9, 8, 7), ("hi", 4, 3)]; .say for ([Z+] @input).kv | 21:45 | ||
evalable6 | (exit code 1) Cannot convert string to number: base-10 number must begin with valid digits or '.' in '03⏏04hi' (indicated by ⏏) in block <unit> at /tmp/cz0IBgYXrW line 1 |
||
timotimo | OK, it'll explode earlier, it seems like | ||
another idea would be to just iterater through everything in $rows and try to .Num | 21:46 | ||
crypto_bird | yeah | ||
timotimo | m: [(1, 2, 3), (9, 8, 7), ("hi", 4, 3)].deepmap({ try +$_; CATCH { .say } }); | 21:47 | |
evalable6 | |||
timotimo | m: [(1, 2, 3), (9, 8, 7), ("hi", 4, 3)].deepmap({ say try +$_; CATCH { .say } }); | ||
evalable6 | 1 2 3 9 8 7 Nil 4 3 |
||
timotimo | m: [(1, 2, 3), (9, 8, 7), ("hi", 4, 3)].deepmap({ +$_; CATCH { .say } }); | ||
evalable6 | (exit code 1) WARNINGS for /tmp/qk9ETiaMMd: Cannot convert string to number: base-10 numbe… |
||
timotimo, Full output: gist.github.com/0fc7db05e783dd1f0e...8e8a91d5a7 | |||
timotimo | hah | 21:48 | |
m: [(1, 2, 3), (9, 8, 7), ("hi", 4, 3)].deepmap({ +$_ or .say }); | |||
evalable6 | hi | ||
timotimo | this'll get you the values that aren't properly numifiable | ||
crypto_bird | oh that's dope | ||
timotimo | m: [(1, 2, 3), (9, 8, 7), ("hi", 4, 3)].deepmap({ (state $row)++; +$_ or "$row: $_".say }); | 21:49 | |
evalable6 | 7: hi | ||
timotimo | well, that's not really the row, that's the field | ||
crypto_bird | what's staye $row | ||
(state $row) | 21:50 | ||
hahah haha | 21:52 | ||
dammit | |||
there are fields that contain NaN | |||
how dare they. | |||
21:55
aindilis left
|
|||
timotimo | that's mean | 21:55 | |
but NaN should parse, shouldn't it? | |||
m: say +"NaN" | |||
evalable6 | NaN | ||
21:56
aindilis joined
|
|||
crypto_bird | m: say 1 + "NaN" | 21:56 | |
evalable6 | NaN | ||
crypto_bird | m: say (1 + "NaN")/2 | ||
evalable6 | NaN | ||
crypto_bird | m: .say for [Z+] (1,2,3;1,"NaN",3;1,2,3;) | 21:57 | |
evalable6 | 3 NaN 9 |
||
crypto_bird | whelp, it's working now! that I deleted all the NaN's, at least | 22:08 | |
I appreciate your help timotimo | |||
<3 | |||
timotimo | \o/ | 22:09 | |
22:17
crypto_bird left
22:18
i1nfusion1 left
22:19
lichtkind left
22:43
i1nfusion1 joined
|
|||
patrickb | .tell tadzik I got some thumbs up to just put my changes to rakudobrew in the current repo (github.com/tadzik/rakudobrew) and not try to be clever about the upgrade. | 22:44 | |
yoleaux | patrickb: I'll pass your message to tadzik. | ||
patrickb | .tell tadzik The new version will just show a message when it detected the incompatibility and shortly explains what to do to fix it. | ||
yoleaux | patrickb: I'll pass your message to tadzik. | ||
patrickb | .tell tadzik Would you be OK with this? If yes, I'll prepare a PR. | 22:45 | |
yoleaux | patrickb: I'll pass your message to tadzik. | ||
patrickb is off for today. | |||
22:45
patrickb left
22:49
kurahaupo left,
kurahaupo joined
22:58
pmurias left
22:59
stigo left
23:03
stigo joined
23:05
sena_kun left
23:08
mowcat left
|
|||
guifa | Is there a way to sneak several very small modules into a single file but still reference them separately? (I’m guessing the answer is no but … worth a shot | 23:18 | |
ugexe | m: module Foo { our sub foo() { 1 } }; module Bar { our sub bar() { 2 } }; say Foo::foo(); say Bar::bar() | 23:22 | |
evalable6 | 1 2 |
||
ugexe | in your META6.json have an entry for each (both pointing to the same file) | ||
"Foo":"lib/SomeFile.pm6", "Bar":"lib/SomeFile.pm6" | 23:23 | ||
note this still precompiles into 2 files | |||
guifa | ^^ I’ll try that. I was doing just “use lib ‘lib’ and it wasn’t connecting for some reason | ||
ugexe | well | ||
dont use `lib "lib"` | |||
nobody should be using that over `use lib "."` if they have a META6.json | 23:24 | ||
because there is no way to map both names to a given file | |||
without explicitly mapping them in a META6.json | |||
and `use lib "lib"` does not point at a directory with META6.json | |||
guifa | Ah, I didn’t realize that the use will look for META6.json , I thought that was exclusively for zef installs. | 23:25 | |
ugexe | and honestly using `use lib ...` is discouraged as far as im concerned | ||
use (or explain) people need to use -I ... or PERL6LIB | |||
guifa just didn’t want to have to wait for a full install for quick tests | |||
ugexe | if you do `use lib "."` and it points at a directory with a META6.json it will be used. this ensures installed modules act the same as non-installed modules | 23:26 | |
this cannot be said for `use lib "lib"` | |||
guifa | But re precompile, that’s no problem. There’s about 70 numbering systems that I need to cover for CLDR, and *most* are literally just replacing 0..9 with foo..bar, so I’d rather not have a directory with 70 different modules. But for other systems that have far more complex logic (roman, etc) a module in its own file makes more sense. | 23:27 | |
ugexe | but most of the times it should not be the module author decision where it should look for libraries (including writing tests) | ||
so anytime i see a test with `use lib "lib"` i die a little | 23:28 | ||
guifa | Don’t worry I had no intention of releasing using use lib ‘lib’ lol | 23:29 | |
23:30
Sgeo joined
23:31
Sgeo left
23:32
Sgeo joined
23:33
Sgeo_ left
|
|||
ugexe | your life shall be spared then | 23:36 | |
23:46
jaldhar_ joined
23:49
jaldhar left
|
|||
guifa | tio.run/##nZHtTsIwGIX/7ypOFkw2lDpw.../bRq82rKoP | 23:50 | |
Interesting results for the different ways to do the substitution | |||
Using a hash lookup was actually faster than an array, though not by a lot. Using trans was monumentally slow | 23:52 | ||
Probably the array is going Int -> Str -> Int to slow it down by a teensy bit | 23:53 |