»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
Set by moritz on 22 December 2015.
buggable 🎺🎺🎺 It's time for the monthly Accidental /win Lottery 😍😍😍 We have 10 ballots submitted by 7 users! DRUM ROLL PLEASE!... 00:00
And the winning number is 23! Congratulations to raschipi! You win a roll of duck tape!
🎺🎺🎺 It's time for the monthly Accidental /win Lottery 😍😍😍 We have 0 ballots submitted by 0 users! DRUM ROLL PLEASE!...
And the winning number is 42! Congratulations to Zoffix! You win a can of WD40!
🎺🎺🎺 It's time for the monthly Accidental /win Lottery 😍😍😍 We have 0 ballots submitted by 0 users! DRUM ROLL PLEASE!...
And the winning number is 42! Congratulations to Zoffix! You win a roll of duck tape!
🎺🎺🎺 It's time for the monthly Accidental /win Lottery 😍😍😍 We have 0 ballots submitted by 0 users! DRUM ROLL PLEASE!...
And the winning number is 42! Congratulations to Zoffix! You win a roll of duck tape!
🎺🎺🎺 It's time for the monthly Accidental /win Lottery 😍😍😍 We have 0 ballots submitted by 0 users! DRUM ROLL PLEASE!...
And the winning number is 42! Congratulations to Zoffix! You win a can of WD40!
🎺🎺🎺 It's time for the monthly Accidental /win Lottery 😍😍😍 We have 0 ballots submitted by 0 users! DRUM ROLL PLEASE!...
And the winning number is 42! Congratulations to Zoffix! You win a can of WD40!
🎺🎺🎺 It's time for the monthly Accidental /win Lottery 😍😍😍 We have 0 ballots submitted by 0 users! DRUM ROLL PLEASE!...
And the winning number is 42! Congratulations to Zoffix! You win a roll of duck tape!
🎺🎺🎺 It's time for the monthly Accidental /win Lottery 😍😍😍 We have 0 ballots submitted by 0 users! DRUM ROLL PLEASE!...
And the winning number is 42! Congratulations to Zoffix! You win a roll of duck tape!
Zoffix Sorry.. Bot went insane :| 00:01
TEttinger looks like you both won 00:03
buggable And the winning number is 42! Congratulations to Zoffix! You win a roll of duck tape! 00:03
🎺🎺🎺 It's time for the monthly Accidental /win Lottery 😍😍😍 We have 0 ballots submitted by 0 users! DRUM ROLL PLEASE!...
buggable And the winning number is 42! Congratulations to Zoffix! You win a can of WD40! 00:03
buggable And the winning number is 42! Congratulations to Zoffix! You win a roll of duck tape! 00:05
🎺🎺🎺 It's time for the monthly Accidental /win Lottery 😍😍😍 We have 0 ballots submitted by 0 users! DRUM ROLL PLEASE!...
buggable And the winning number is 42! Congratulations to Zoffix! You win a roll of duck tape! 00:06
Zoffix buggable: don't worry we can control that with medications 00:18
ZofBot: all hail Zoffix the robot shrink \o/
ZofBot Zoffix, The former leads to some failing tests in S32-io/seek
timotimo m: say " \c[COMBINING ACUTE]" 00:19
camelia 5===SORRY!5=== Error while compiling <tmp>
Unrecognized character name [COMBINING ACUTE]
at <tmp>:1
------> 3say " \c[COMBINING ACUTE7⏏5]"
timotimo .u combining
yoleaux U+0300 COMBINING GRAVE ACCENT [Mn] (◌̀)
U+0301 COMBINING ACUTE ACCENT [Mn] (◌́)
U+0302 COMBINING CIRCUMFLEX ACCENT [Mn] (◌̂)
timotimo m: say " \c[COMBINING ACUTE ACCENT]"
camelia ́
timotimo m: use nqp; my $s = " \c[COMBINING ACUTE ACCENT]"; say nqp::ordat($s, 0); say nqp::ordat($s, 1) 00:20
camelia 32
-1
timotimo oh ffs, JSON::Fast would allow combining characters in between the jsony bits if they are on spaces 00:20
AlexDaniel heh, 17999 unread messages in gmail :) 00:31
buggable New CPAN upload: Font-FreeType-0.0.7.tar.gz by WARRINGD cpan.metacpan.org/authors/id/W/WA/...0.7.tar.gz 01:57
buggable New CPAN upload: Algorithm-AhoCorasick-0.0.9.tar.gz by TITSUKI cpan.metacpan.org/authors/id/T/TI/...0.9.tar.gz 02:17
New CPAN upload: Algorithm-NaiveBayes-0.0.1.tar.gz by TITSUKI cpan.metacpan.org/authors/id/T/TI/...0.1.tar.gz
buggable New CPAN upload: Algorithm-NaiveBayes-0.0.2.tar.gz by TITSUKI cpan.metacpan.org/authors/id/T/TI/...0.2.tar.gz 04:07
New CPAN upload: Algorithm-NaiveBayes-0.0.3.tar.gz by TITSUKI cpan.metacpan.org/authors/id/T/TI/...0.3.tar.gz
New CPAN upload: Algorithm-AhoCorasick-0.0.10.tar.gz by TITSUKI cpan.metacpan.org/authors/id/T/TI/....10.tar.gz 04:17
Geth_ ecosystem: d876a267fc | (Itsuki Toyota)++ (committed using GitHub Web editor) | META.list
p6-Algorithm-NaiveBayes was moved to CPAN
04:20
titsuki_ m: my subset A of Mu; sub func(A @a){ say @a; }; my @b = 1,2,3; say @b ~~ Mu; func(@b); 05:55
camelia True
Type check failed in binding to parameter '@a'; expected A but got Array ($[1, 2, 3])
in sub func at <tmp> line 1
in block <unit> at <tmp> line 1
titsuki_ Is this a bug? I think Array is Mu. 05:56
OK, I understand. it requires Positional[A] 05:58
m: sub func(Mu @a){ say @a; }; my @b = 1,2,3; say @b ~~ Mu; func(@b); 05:59
camelia True
Type check failed in binding to parameter '@a'; expected Positional[Mu] but got Array ($[1, 2, 3])
in sub func at <tmp> line 1
in block <unit> at <tmp> line 1
jmerelo Hi o/ 06:55
moritz \o jmerelo 07:00
jmerelo But I want the Singularity to be GPL! github.com/lizmat/Singularity/ Richard Stallman would never upload his brain to an Apache-licensed application!!! 07:02
jmerelo Anyway. Anyone's up for an April's fools? I was thinking about changing the first page of the Perl 6 docs to Perl 666, and turning Camelia into an Evil Camelia with tiny horns 07:05
Or something like that.
Geth_ ecosystem: 1efd907a19 | (Itsuki Toyota)++ (committed using GitHub Web editor) | META.list
p6-Chart-Gnuplot was moved to CPAN
07:10
moritz jmerelo: sounds good :-) 07:14
jmerelo moritz: Anyone's good with Inkscape? I can give it a try, but I am no good at that... 07:15
buggable New CPAN upload: Chart-Gnuplot-0.0.3.tar.gz by TITSUKI cpan.metacpan.org/authors/id/T/TI/...0.3.tar.gz 07:17
moritz my artistic abilities are... limited 07:18
Geth_ doc: 2577dc24d8 | (JJ Merelo)++ | htmlify.p6
Adds a little introduction to the 'language' page

Which is the most visited in the site. Not the best, but brief and to the point. Closes #1884
07:19
jmerelo moritz: can you try that while I look for the way of changing headers and somesuch? Or the other way round? 07:20
moritz twitter.com/zoffix/status/980343128556294145 lol
jmerelo: I'll give it a shot 07:21
jmerelo moritz: :-) 07:23
moritz jmerelo: hack.p6c.org/~moritz/Camelia-horns.svg 07:28
jmerelo moritz: more viking than evil, but let's not overengineer a prank :-) 07:29
What do you think about this as "evil" font? fonts.google.com/specimen/Eagle+Lake
moritz +1 07:32
jmerelo: I've created a branch 2018-04-01 in the perl6.org repo, and updated the cron job to poll from that branch 07:35
jmerelo: feel free to go wild there :-)
jmerelo moritz: I am working on docs.perl6.org, rather. I've tagged the previous situation, and will do everything in a single commit 07:41
Can do that afterwards...
travis-ci Doc build passed. JJ Merelo 'Adds a little introduction to the 'language' page 07:43
travis-ci.org/perl6/doc/builds/360811345 github.com/perl6/doc/compare/v666.pre
jmerelo moritz: drive.google.com/file/d/1dcvi7CLIp...sp=sharing 07:46
moritz jmerelo: +1 07:48
jmerelo OK, let's go live with that. 07:53
Geth_ doc: 95000e5d86 | (JJ Merelo)++ | 4 files
Deploying evil Camelia
07:54
Geth_ perl6.org/2018-04-01: e0d28d4171 | (JJ Merelo)++ | 2 files
Evilized perl6.org
08:01
jmerelo moritz: little change made to perl6.org, too :-) 08:02
moritz jmerelo: perl6.org upated
*updated
jmerelo What's happened to Camelia? 08:05
moritz: should I change it to png?
moritz jmerelo: yes, browsers don't always seem to like inline svg 08:06
s/inline/<img ...>/
Geth_ perl6.org/2018-04-01: 6f3e5746fc | (JJ Merelo)++ | 2 files
Changed to png
stmuk_ perl 666? and that's a sinister looking font (even worse than Comic Sans) 08:09
jmerelo stmuk_: the sinisterest I could find in little time :-) 08:10
stmuk_ also github.com/zoffixznet/perl6-666 :) 08:12
TEttinger camelia doesn't show up on perl6.org? 08:14
jmerelo TEttinger: It's coming. In an evil way.
TEttinger it's also easter, so, second coming 08:15
jmerelo TEttinger: :-)
moritz: that was an ephemeral prank... 08:16
TEttinger yeah, gone now
jmerelo Oh, no! The evil bug has infected the documentation too! docs.perl6.org/ 08:19
Zoffix Today's Easter Sunday and you guys are giving Camelia beastly horns? Fairly inappropriate, especially for a language with terminology influenced by Christianity. 08:21
jmerelo Zoffix: they are actually Viking horns.
TEttinger april fools, it's very appropriate!
jmerelo Come to think of the Viking thing, I should have changed the name to þerl 08:22
TEttinger is that thorn?
wynn would also work 08:23
u: wynn
unicodable6 TEttinger, U+01BF LATIN LETTER WYNN [Ll] (ƿ)
TEttinger, U+01F7 LATIN CAPITAL LETTER WYNN [Lu] (Ƿ)
TEttinger, U+16B9 RUNIC LETTER WUNJO WYNN W [Lo] (ᚹ)
Zoffix jmerelo: and 666?
TEttinger ᚹERL6
jmerelo TEttinger: way cool
Zoffix: it's the third year of Perl 6, so it's like three sixes. 08:24
TEttinger Zoffix: you could change it to Perl 69 and make the whole page NSFW 08:25
araraloren 666 :)
jmerelo 69 is actually the Piscis sign
Zoffix jmerelo: but why deface the site with antagonistic symbols?
TEttinger are you not familiar with april fool's day? 08:26
jmerelo Zoffix: it's an April fools prank. It's a single commit. I can revert it if anyone is going to be offended.
TEttinger i hope zoffix is pranking 08:27
Zoffix TEttinger: I'm not familiar with using antichrist symbolisms on April Fools Day.
jmerelo Zoffix: we can link your repo github.com/zoffixznet/perl6-666 if you want 08:28
TEttinger Zoffix frantically googles to make sure Google's CADIE AI is just a prank 08:29
Guest524 is it possible to use any file extension for importing scripts? 08:31
Zoffix TEttinger: so is there a point where you clarify to me the association?
Guest524: improting to where?
Guest524 sub EXPORT {%('$var'=>'test',)} # abc.pm6 08:32
use lib '.'; use abc:file('abc.pm6'); say $var;
instead of abc.pm6 could it be abd.def?
Zoffix Guest524: no, it has to be .pm6 08:33
Guest524 there's no other way to do it? 08:34
Zoffix Guest524: no simple way, no. 08:35
Guest524 what about a complex way?
Zoffix Guest524: can the importing code change?
Guest524 do you mean by editing? 08:36
Zoffix Guest524: yeah, like does it have to remain as `use blah blah` or can it be something else?
jmerelo Evil camelia un-deployed 08:39
Guest524 Zoffix: app.p6 has a subroutine f() and needs to import app.cfg which wants to call that subroutine f()
jmerelo Will take a while to move to the page, though.
Zoffix Guest524: usually it's the other way around tho, you import a routine *from* a module and call it in app.p6. 08:41
Guest524: what task are you trying to do?
I mean, as a general thing, not as importing something from somewhere else.
Guest524 use perl in a configuration file 08:42
araraloren I think they don't care the format
Zoffix Guest524: ok, that's easy enough: my %conf = EVALFILE 'conf.p6'; where conf.p6 has Perl 6 generate a Hash that's the last line of the file (and thus is used as return value). 08:44
araraloren m: my $x = 10; 'say $x'.EVAL 08:45
camelia 10
Zoffix Guest524: does that solve your entire problem or do you still need to import something? 08:46
Guest524 Zoffix: glot.io/snippets/ezpgermp27 08:59
the website doesn't allow changing file names, but dio.pl6 should be app.cfg and main.pl6 should be app.p6
Zoffix Guest524: what happens if main.pl6 doesn't have `sub f` defined? 09:00
Guest524 err? 09:01
Zoffix Guest524: well, what's the connection between `sub f` and its use in the config file? Why does the config file need to call any function as opposed to just giving a List of elements and main.pl6 doing whatever it needs to do with them, like calling `f` with each element? 09:02
jmerelo: thanks. 09:03
Guest524 Zoffix: to use perl for confuration? 09:05
Geth_ doc: ceebae4781 | (JJ Merelo)++ | doc/Type/Capture.pod6
Adds indexing terms to capture literals

Closes #1443
09:08
synopsebot Link: doc.perl6.org/type/Capture
Zoffix Guest524: you can use it without having to call `f` inside the configuration: gist.github.com/zoffixznet/e1c26e5...4ce1065b77 09:09
Guest524: inside abc.def I have a list of lists. It's the last statement of the file so it gets returned when I call EVALFILE 'abc.def'; and then I iterate over that list, calling `f` with each inner list. 09:10
Zoffix Guest524: and the list of lists is just a return data structure in this case; you're free to execute arbitrary Perl 6 code inside that file to, for example, generate that list of lists (or some other datastructure). Basically, the idea is to separate the configuration from what's done with it, and then you don't need to import `f` into anything. 09:14
fatguy i got different result using rakudo star 2018.01 overriding method didn't work as v2017.04.3 09:15
pastebin.com/JHqhxhev
Zoffix c: 2018.01,2017.04.3 gist.githubusercontent.com/zoffixz...bf6b/p6.p6 09:16
committable6 Zoffix, Successfully fetched the code from the provided URL.
Zoffix, gist.github.com/cad4c9e4791410c235...7ed839c608
Guest524 Zoffix: what is the pipe in `f |$_ for @confs;`? 09:17
Zoffix Guest524: it causes the argument to be "slipped". $_ contains a list of 3 things. If I just call `f $_` that's a call with single argument (the entire list); but writing as `f |$_` slips that list, and I end up making the call with 3 arguments (each element of the list became an argument on its own) 09:19
Unsure where that's documented. docs.perl6.org/routine/%7C mentions what happens, but very briefly and without any examples. 09:20
Guest524 Zoffix: how do you learn about this stuff? 09:21
Zoffix Guest524: just hanging around here and seeing code, I guess. Some stuff by reading the compiler's code. I started back when there were very limited docs, but I think right now it should be documented somewhere, I'm just unsure where exactly. 09:22
fatguy: looks like it's not the overriding but the missing attribute's value, no? There's an empty array printed. 09:23
Guest524 Zoffix: thanks that solves my problem :) 09:24
Zoffix c: 2017.04.1,2018.01 class A { has @.a }; class B { has @.b }; dd class C is A is B {}.new :a<a b c> :b<d e fg>
committable6 Zoffix, ¦2017.04.1: «C.new(a => ["a", "b", "c"], b => ["d", "e", "fg"])␤» ¦2018.01: «C.new(a => ["a", "b", "c"], b => [])␤»
Zoffix Guest524: cool \o/
araraloren Guest524 docs.perl6.org/routine/|#(Operators)_prefix_| 09:25
Zoffix bisect: class A { has @.a }; class B { has @.b }; dd class C is A is B {}.new :a<a b c> :b<d e fg>
bisectable6 Zoffix, Bisecting by output (old=2015.12 new=dc1a3f5) because on both starting points the exit code is 0
Zoffix, bisect log: gist.github.com/fb1a783104d034d6a2...5c5cf4c366
Zoffix, (2017-10-03) github.com/rakudo/rakudo/commit/b5...969a4a94c0
fatguy zoffix: i passed the value at initialization 09:26
Zoffix fatguy: yeah. 09:28
fatguy: filed as github.com/rakudo/rakudo/issues/1679
fatguy zoffix: thanks ! 09:29
Zoffix fatguy: you could use this as a dirty workaround until the problem is fixed. Basically, manually calling BUILDALL of one of the ancestors so it sets the attribute's value: gist.github.com/zoffixznet/6bab930...p6-L16-L20 09:34
fatguy zoffix: alright thanks \o/ 09:37
Zoffix fatguy: oh wait, got a simpler one. Just add any attribute into the grafik-gabungan like `has $!dummy-until-rakudo-bug-is-fixed` 09:38
fatguy zoffix: cool thanks 09:39
lizmat clickbaits p6weekly.wordpress.com/2018/03/31/...-released/
jmerelo lizmat: :-) 09:40
moritz lizmat++ 09:42
Geth_ doc: maettu++ created pull request #1890:
fix broken links
10:13
maettu stupid question: running the doc locally (mojo, localhost:3000) using make run. How can I stop this? ctrl-c is ignored.. 10:14
Geth_ doc: 7b1b189f99 | (Matthias Bloch)++ | doc/Type/Iterable.pod6
fix broken links
10:18
doc: c91b2de5e0 | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | doc/Type/Iterable.pod6
Merge pull request #1890 from maettu/hyper_race_fix_links

fix broken links
synopsebot Link: doc.perl6.org/type/Iterable
FROGGS_ maettu: if it is a background process than just kill it 10:31
rindolf hi all 10:32
rindolf is excited about the perl 6 singularity
maettu FROGGS_: thx, I did :-) 10:35
travis-ci Doc build failed. Juan Julián Merelo Guervós 'Merge pull request #1890 from maettu/hyper_race_fix_links 10:37
travis-ci.org/perl6/doc/builds/360838488 github.com/perl6/doc/compare/ceeba...1b2de5e01b
buggable [travis build above] ☠ Did not recognize some failures. Check results manually. 10:37
jmerelo maettu: sometimes you have to do control-c several times... 10:55
It's a weird travis-ci bug in an unrelated file... I'm trying to reproduce it locally and there seems to be no problem.
El_Che lizmat: if you'd been really evil, you would have written dat Perl 6 Singularity was meant to absorb all the Perl implementations :) 11:07
jmerelo El_Che: :-) 11:08
lizmat El_Che: I'm already considered really evil by some :-) 11:33
Zoffix++ # lol twitter.com/zoffix/status/980343128556294145 11:47
stmuk_ have there been any perl 5 jokes? blockchain jokes seem typical this year? 12:14
timotimo i am pleased to announce the official release of CameliCoin 12:16
(TPF stock prices increase threefold in the span of an hour)
stmuk_ web.archive.org/web/20010412234353...arrot.html 12:22
lizmat see the ADD link in the weekly, there's a bunch of them there 12:42
I guess the best ones are the ones playing on the preconceptions of others: when they find out they've been had, it's hard to admit that they were had 12:44
Guest524 is this possible `say 'abcdef' ~~ s/c/z/`? 12:54
and is it possible to get the opposite of `say 'abcdefg' ~~ /c.*/`? 12:55
lizmat m: say 'abcdef' ~~ s/c/z/
camelia Cannot modify an immutable Str (abcdef)
in block <unit> at <tmp> line 1
12:56
lizmat m: say "abcdef".subst(/c/, "z")
camelia abzdef
Guest524 is there a way to do it with `s/c/z/` syntax? 12:57
lizmat m: say "abcdef".subst("c", "z") # faster
camelia abzdef
timotimo m: say "abcdef" ~~ S/c/z/ 13:03
camelia Potential difficulties:
Smartmatch with S/// is not useful. You can use given instead: S/// given $foo
at <tmp>:1
------> 3say "abcdef" ~~ 7⏏5S/c/z/
False
timotimo m: say S/c/z/ given "abcdef"
camelia abzdef
Guest524 timotimo: where is that in the docs? 13:10
timotimo docs.perl6.org/language/regexes#Substitution - here maybe? 13:14
no, that doesn't have S 13:15
can't really find anything 13:16
lizmat in a case insensitive world, S is hard to find
Guest524 `/S\:/` has samemark & samespace 13:17
how did you find out about it? 13:18
Guest524 what happened to the rings of saturn? 13:23
Guest524 and backticks? they're still used in multiline comments, so why not qqx? 13:26
timotimo how do you mean? 13:45
Guest524
Guest524 about what?
timotimo backticks 13:46
sorry, i'll be afk again 13:47
jnthn timotimo: In Perl 5, `foo` is a shorthand for - at least if I remember its Perl 5 semantics correctly - qqx/foo/
timotimo ah, ok
well, we simply support pretty much every kind of quotes for multiline strings
jnthn One can write qqx`...` too if feeling nostalgic :-) 13:48
Guest524 that's 3 characters too many!
mst I see it's "stmuk and virtualsue make the perl6 community look like assholes" day again 14:04
El_Che mst: do I dare to open twitter? 14:06
lizmat wonders where mst sees that 14:07
El_Che nope, twitter is perfectly fine (besides the usual crazy angry people) 14:08
lizmat shakes her head 14:09
El_Che mst: gph.is/1m8dAcQ 14:10
Guest524 -Ofun hive mind: turn trolls into committers
Kaiepi wwhat i i wwas already both 14:12
Guest524 what class do you occupy? 14:13
Kaiepi committer on github, shitposter everywhere else 14:14
Guest524 strangelyconsistent.org/blog/perl-6-is-my-mmorpg
Kaiepi oh 14:19
not sure yet, either priest or warrior 14:20
i'll find out once i'm more familiar with the codebase
Guest524 I'm a warrior, fleeing from the Cylon tyranny, on the last battlestar, Galactica, leading a ragtag fugitive fleet on a lonely quest: a shining planet known as Earth. 14:29
Kaiepi i'm a refugee from an autocratic commune that collapsed once because soemeone stopped selling sticky notes 14:41
El_Che lizmat: I see you went on reddit :) 14:42
Kaiepi i can't think of a good analogy for what i'm talking about
lizmat El_Che: sometimes people force you to 14:45
El_Che yeah, I noticed the title magic trick 14:46
tobs Only half a question about perl6: I used to get OOM Killed sometime last year while downloading binary files using WWW::get. It only happened with certain files, presumably because get returns decoded-content(?). At some point I installed rakudo 2017.10 which now gives me its own "MoarVM panic: Memory allocation failed"s instead, but when I ran it a few times and used HTTP::UserAgent.get with :bin, it didn't 14:54
terminate but froze my computer. Had to do a hard reset after a minute of no reaction.
Can anyone tell me how to debug this safely, to find an offending file first of all? Would a ulimit -m be enough?
timotimo ulimit should definitely help 14:56
for extra extra safety, maybe try running a full VM
buggable New CPAN upload: Lingua-Pangram-0.1.0.tar.gz by FISCHER cpan.metacpan.org/authors/id/F/FI/...1.0.tar.gz 14:57
tobs slaps forehead 14:58
tobs yes, I'm gonna do that 14:58
Guest524 it is so disorientating when someone changes their name 15:37
Geth_ ecosystem: 5a950c23ad | (Itsuki Toyota)++ (committed using GitHub Web editor) | META.list
p6-Algorithm-MinMaxHeap was moved to CPAN
15:46
buggable New CPAN upload: Algorithm-MinMaxHeap-0.13.3.tar.gz by TITSUKI cpan.metacpan.org/authors/id/T/TI/...3.3.tar.gz 15:47
buggable New CPAN upload: Algorithm-Evolutionary-Simple-0.0.4.tar.gz by JMERELO cpan.metacpan.org/authors/id/J/JM/...0.4.tar.gz 15:57
Geth_ ecosystem: 70eae0be7b | (Itsuki Toyota)++ (committed using GitHub Web editor) | META.list
p6-Algorithm-Manacher was moved to CPAN
16:09
herby_ o/ 16:14
buggable New CPAN upload: Algorithm-Manacher-0.0.1.tar.gz by TITSUKI cpan.metacpan.org/authors/id/T/TI/...0.1.tar.gz 16:17
herby_ got a rookie question 16:44
I have a simple module I'm working on. I want the user to either be able to use it from the command line and pass in arguements, or use it from within their own script 16:45
I know I should use MAIN for command line use. is MAIN ignored if the script isn't used from the command line?
moritz it's supposed to be ignored if it's not in the top-level script 16:53
no idea how well that works
herby_ I think I'm missing a simple design step. If I have a module that has a "test" function, and a "MAIN" function, and I call the "test" function, it will return both functions automatically 16:55
rather, if I call the "test" function from within the module, it runs the "test" function and MAIN function
probably not explaining that clearly
jmerelo bench: compare HEAD (Bool.roll xx 2048).race.rotor(4).grep( so (*.all == True|False) ).elems ||| (Bool.roll xx 2048).race( degree => 8).rotor(4).grep( so (*.all == True|False) ).elems 16:57
benchable6 jmerelo, starting to benchmark the 1 given commit
jmerelo, gist.github.com/ffff45d4940cf7f5b0...4f36b87c69 16:58
masak herby_: not sure it directly fixes your problem, but I usually have a `multi MAIN("test") { ... }`, so that I can run tests easily from the command line
jmerelo bench: compare HEAD (Bool.roll xx 4096).race.rotor(4).grep( so (*.all == True|False) ).elems ||| (Bool.roll xx 4096).race( degree => 8).rotor(4).grep( so (*.all == True|False) ).elems
benchable6 jmerelo, starting to benchmark the 1 given commit
jmerelo, gist.github.com/517f36d0935fa3f99f...d9c629b99d 16:59
jmerelo bench: compare HEAD (Bool.roll xx 4096).race.rotor(4).grep( so (*.all == True|False) ).elems ||| (Bool.roll xx 4096).race( degree => 8, batch => 32).rotor(4).grep( so (*.all == True|False) ).elems
benchable6 jmerelo, starting to benchmark the 1 given commit
jmerelo, gist.github.com/7561880884853308c5...a3f43c2146
herby_ masak: thanks. I probably just need to find a good CLI example for perl 6 and see how they did it 16:59
jmerelo bench: compare HEAD (Bool.roll xx 4096).race.rotor(4).grep( so (*.all == True|False) ).elems ||| (Bool.roll xx 4096).race( degree => 8, batch => 128).rotor(4).grep( so (*.all == True|False) ).elems 17:00
benchable6 jmerelo, starting to benchmark the 1 given commit
jmerelo, gist.github.com/ebbe75c85924df2d50...60b726ebf9
timotimo herby_: i think we generally have a launcher in bin/ and a module that exports a MAIN sub to it 17:02
github.com/ugexe/zef/blob/master/bin/zef - check this example 17:03
github.com/ugexe/zef/blob/master/l...ef/CLI.pm6 - this is the module in question
it's a package that has a bunch of multi MAIN ... is export { }
herby_ timotimo: thanks, i'll give that a read 17:05
benjikun What's the best way you guys can figure out how to generate a "look and say" sequence (1, 11, 21, 1211) 18:04
can you do it with a one-liner? 18:05
maybe with the ... operator thing
cfa benjikun: rosettacode.org/wiki/Look-and-say_...nce#Perl_6 18:12
masak oh, that's pretty
I started in on a solution, but mine was veering off in the wrong direction, trying to do everything in a single regex 18:14
benjikun cfa: that's a good one
cfa to be clear: not my solution 18:15
i'm just the link butler
benjikun yeah I understand
ty anyhow
cfa np
benjikun How would I output that to a file 18:25
benjikun I can't do $fh.say for ... 18:25
or spurt
jnthn $fh.say($_) for ... 18:26
benjikun oh 18:27
ty
herby_ If I want to validate if a supplied IPv4 address is valid or not, does p6 have anything built in? 18:49
a quick google shows that python can utilize the "socket" library, didn't know if p6 had something similar
El_Che herby_: docs.perl6.org/type/IO::Socket::INET (dunno if it soes what you want) 18:52
herby_ El_Che: thanks. I was poking around there but I couldn't see anything that explicity talks about it, and my socket/networking knowledge is pretty much zero 18:54
I'll do some more reading :)
El_Che herby_: it sould be pretty easy to write a small ip validation function 18:55
herby_ yep, I found one in Think Perl 6 for IPv4. If there wasn't already an ip validator that was widely available, I was going to write a small module for it
timotimo just don't try to validate ipv6 addresses by yourself unless you know about the weirder parts of the spec :)
herby_ but I didnt want to clutter the ecosystem
timotimo: yeah, it looks like ipv6 is a tad more complex than ipv4 18:56
El_Che timotimo: doest sound that hard
buggable New CPAN upload: Lingua-Pangram-0.1.1.tar.gz by FISCHER cpan.metacpan.org/authors/id/F/FI/...1.1.tar.gz 18:57
timotimo :)
jmerelo p6: my @array[4] = <1 2 3 4>; say @array.tail(1); 19:09
camelia (4)
jmerelo p6: my @chromosome2[16] = Bool.roll xx 16; say @chromosome2.tail(1); 19:12
camelia (False)
benjikun jmerelo: Whatcha makin? 19:23
El_Che funny questions when chromosomes are involved 19:26
benjikun lmao 19:29
jmerelo benjikun: As usual, evolutionary algorithms... 19:30
benjikun jmerelo: Oh, that's neat.
Do you have a GitHub?
jmerelo github.com/JJ
Right now I'm working on this github.com/JJ/perl6eo 19:31
p6: my $len=16; my @chromosome2[$len] = Bool.roll xx $len; say @chromosome2.tail(1);
camelia (False)
jmerelo Hum
That fails in my installation. 19:32
benjikun How much slower is perl6 for these sorts of algorithms compared to C/C++
jmerelo It's actually faster than C++ for most things.
benjikun hm
jmerelo benjikun: working now on this paper github.com/JJ/2016-ea-languages-wc...-perls.Rnw 19:33
benjikun: except for crossover. Which is what I want to find out.
benjikun Interesting
I'd like for Perl6 to catch on more 19:35
masak like wildfire, or a flu
jmerelo commit: 2018.01,2018.03,HEAD my $len=16; my @chromosome2[$len] = Bool.roll xx $len; say @chromosome2.tail(1);
committable6 jmerelo, ¦2018.01,2018.03: «Index 16 for dimension 1 out of range (must be 0..15)␤ in block <unit> at /tmp/4gyTV_4uPa line 1␤␤ «exit code = 1»» ¦HEAD(dc1a3f5): «(False)␤» 19:36
benjikun jmerelo: Do you have this rendered as a PDF or anything yet?
masak: Especially this year's flu
jmerelo benjikun: I'll upload it in a minute.
masak benjikun: oh? we have a good one this year?
benjikun masak: Vaccines didn't work out too well this year 19:37
masak oh no :/
jmerelo Looks like I got into a bug that just got fixed... 19:38
jmerelo benjikun: github.com/JJ/2016-ea-languages-wc.../v2018-0.9 just uploaded the report. For everyone else, too. Comparing Perl 6 to Perl (and other languages) in several usual evolutionary algorithm operations 19:40
jmerelo commit: 2018.03,HEAD my @chromosome2[10] = Bool.roll xx 10; say @chromosome2.tail(1); 19:41
committable6 jmerelo, ¦2018.03: «Index 10 for dimension 1 out of range (must be 0..9)␤ in block <unit> at /tmp/xbOAW2xtIN line 1␤␤ «exit code = 1»» ¦HEAD(dc1a3f5): «(True)␤»
jmerelo p6: my $len=16; my $start = now;for 1..$how-many {my $start = ($len -2 ).rand.Int;my $this-len = 1+($len-$start-2).rand.Int;my @chromosome1[$len] = Bool.roll xx $len;my @chromosome2[$len] = Bool.roll xx $len;my @out1[$len] = flat @chromosome2.head($start), @chromosome1.skip($start).head($this-len), @chromosome2.tail($len-$this-len-$start);my @out2[$len] = flat @chromosome1.head($start), 19:44
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '$how-many' is not declared
at <tmp>:1
------> 3my $len=16; my $start = now;for 1..7⏏5$how-many {my $start = ($len -2 ).rand.
jmerelo @chromosome2.skip($start).head($this-len), @chromosome1.tail($len-$this-len-$start); }; say "perl6-BitVector,$len,",now - $start;
p6: my $len=16; my $start = now;for 1..1000 {my $start = ($len -2 ).rand.Int;my $this-len = 1+($len-$start-2).rand.Int;my @chromosome1[$len] = Bool.roll xx $len;my @chromosome2[$len] = Bool.roll xx $len;my @out1[$len] = flat @chromosome2.head($start), @chromosome1.skip($start).head($this-len), @chromosome2.tail($len-$this-len-$start);my @out2[$len] = flat @chromosome1.head($start), 19:45
camelia 5===SORRY!5=== Error while compiling <tmp>
Missing block
at <tmp>:1
------> 3[$len] = flat @chromosome1.head($start),7⏏5<EOL>
expecting any of:
postfix
prefix
statement end
statement modifi…
jmerelo @chromosome2.skip($start).head($this-len), @chromosome1.tail($len-$this-len-$start); }; say "perl6-BitVector,$len,",now - $start;
benjikun jmerelo: Thanks, I'll give it a read 19:46
jmerelo benjikun: thanks! 19:47
jmerelo commit: 2018.03-137-gdc1a3f5a3,HEAD my @chromosome2[10] = Bool.roll xx 10; say @chromosome2.tail(1); 19:55
committable6 jmerelo, ¦2018.03-137-gdc1a3f5a3: «(True)␤» ¦HEAD(dc1a3f5): «(False)␤»
lizmat jmerelo: you'e expecting repeatable results from a rand) ? 19:56
jmerelo lizmat: No, there was an error in 2018.03. I was checking to see if it was fixed... 19:57
commit: 2018.03,HEAD my @chromosome2[10] = Bool.roll xx 10; say @chromosome2.tail(1);
committable6 jmerelo, ¦2018.03: «Index 10 for dimension 1 out of range (must be 0..9)␤ in block <unit> at /tmp/JoAEySRUCj line 1␤␤ «exit code = 1»» ¦HEAD(dc1a3f5): «(True)␤»
lizmat ah, ok :-)
jmerelo p6: my @c1[4]=<a b c d>; my @c2[4] = <1 2 3 4>; say @c1.head(2), @c2.tail(2) 20:03
camelia (a b)(3 4)
jmerelo p6: my @c1[4]=<a b c d>; my @c2[4] = <1 2 3 4>; say flat @c1.head(2), @c2.tail(2)
camelia Index 4 for dimension 1 out of range (must be 0..3)
in block <unit> at <tmp> line 1
jmerelo lizmat: would that be a bug? Looks like the previous one has not been totally erradicated...
p6: my @c1[4]=<a b c d>; my @c2[4] = <1 2 3 4>; say @c1.head(2).append( @c2.tail(2) ) 20:04
camelia Cannot resolve caller append(Seq: Seq); none of these signatures match:
(Any:U \SELF: |values is raw)
in block <unit> at <tmp> line 1
jmerelo p6: my @c1[4]=<a b c d>; my @c2[4] = <1 2 3 4>; @new = @c1.head(2); say @new.append: @c2.tail(2) 20:05
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '@new' is not declared
at <tmp>:1
------> 3c1[4]=<a b c d>; my @c2[4] = <1 2 3 4>; 7⏏5@new = @c1.head(2); say @new.append: @c
jmerelo p6: my @c1[4]=<a b c d>; my @c2[4] = <1 2 3 4>; my @new = @c1.head(2); say @new.append: @c2.tail(2)
camelia [a b 3 4]
jmerelo p6: my @c1[4]=<a b c d>; my @c2[4] = <1 2 3 4>; say Array.new( @c1.head(2)).append: @c2.tail(2) 20:08
camelia [a b 3 4]
Kaypie zef install --force-install zef is reminding me of the monthly weird npm i -g npm thing npm keeps requiring 20:09
jmerelo Leaving now. Until tomorrow! 20:14
cfa hunh, interseting 20:22
also, interesting
m: my @a = <a b c d>; say @a.tail: 1 # or 2, 3, 4
camelia (d)
cfa m: my @a[4] = <a b c d>; say @a.tail: 1 # or 2, 3, 4 20:23
camelia (d)
cfa m: my @a[4] = <a b c d>; say @a.tail: 2
camelia (c d)
cfa hmm
gfldex m: my @a[4] = <a b c d>; dd @a.Seq.tail; 20:26
camelia Str <element> = "d"
gfldex m: my @a[4] = <a b c d>; @a[3] = <1 2 3 4>; dd @a; 20:27
camelia Array.new(:shape(4,), ["a", "b", "c", (IntStr.new(1, "1"), IntStr.new(2, "2"), IntStr.new(3, "3"), IntStr.new(4, "4"))])
cfa oh, here we go 20:28
m: my @a[4] = <a b c d>; say flat @a.tail: 1
camelia Index 4 for dimension 1 out of range (must be 0..3)
in block <unit> at <tmp> line 1
gfldex m: my @a[4] = [1, 2, 3]; say @a.tail; 20:29
camelia (Mu)
gfldex m: my @a[4] = [1, 2, 3]; dd @a;
camelia Array.new(:shape(4,), [1, 2, 3, Any])
gfldex m: my @a; @a[4] = $[1, 2, 3]; say @a.tail; 20:30
camelia Cannot allocate memory
gfldex m: my @a; @a[4] = $[1, 2, 3]; say @a.tail; 20:32
camelia [1 2 3]
MasterDuke bench: compare HEAD my $l = 100000; my @a[$l] = Bool.roll xx $l; ||| my $l = 100000; my @a = Bool.roll xx $l; say now - INIT now 21:56
benchable6 MasterDuke, starting to benchmark the 1 given commit
MasterDuke, gist.github.com/494f5c2a1e9343e170...b3d568e8c3
MasterDuke m: my $l = 1_000_000; my @a[$l] = Bool.roll xx $l; say now - INIT now 21:57
camelia 1.469947
MasterDuke m: my $l = 1_000_000; my @a = Bool.roll xx $l; say now - INIT now
camelia 0.6839025
MasterDuke bench: compare HEAD my $l = 100000; my @a[$l] = Bool.roll xx $l; ||| my $l = 100000; my @a = Bool.roll xx $l;
benchable6 MasterDuke, starting to benchmark the 1 given commit
MasterDuke, gist.github.com/3912c39076c1c527d1...4f18c46439
MasterDuke don't know why benchable6 shows the opposite, but on my system i definitely see that the non-shaped version is faster 22:00
MasterDuke shaves multiple seconds off of jmerelo's xover code 22:02
Kaiepi for the vim users here, here's a vim-easy-align rule that lets you align a list of variables by typing in gaipv in normal mode hastebin.com/juqowucemo.bash 22:52
b2gills .tell jmerelo `Bool.roll xx $len` is probably better written as `Bool.roll($len)` 22:54
yoleaux b2gills: I'll pass your message to jmerelo.
buggable New CPAN upload: Lingua-Lipogram-0.1.0.tar.gz by FISCHER cpan.metacpan.org/authors/id/F/FI/...1.0.tar.gz 22:57
AlexDaniel Kaiepi: I wonder if it can be added directly to github.com/vim-perl/vim-perl6 23:01
Kaiepi possibly, but i don't know anything about vimscript 23:05
AlexDaniel Kaiepi: that sounds pretty good! I don't know anything about vim 23:06
although maybe I still have some muscle memory from a year of using spacemacs 23:07