»ö« 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.
ktown MasterDuke: hmm i was looking at this page: docs.perl6.org/language/functions#Signatures 00:39
raschipi ktown: docs.perl6.org/language/functions#...cion_Types 00:44
ktown I started forcing types becasue the dynamic types did not do what I was expecting 00:49
m: sub got( $x where ^10 ) { dd $x }; got "3" 00:51
camelia Constraint type check failed in binding to parameter '$x'; expected anonymous constraint to be met but got Str ("3")
in sub got at <tmp> line 1
in block <unit> at <tmp> line 1
ktown the option to enforce a type is good, as is the option to force a specific coercion, but failing on a simple int math comparison :( 00:58
raschipi m: "3" ~~ ^10
camelia ( no output )
raschipi m: say "3" ~~ ^10
camelia False
raschipi m: say +"3" ~~ ^10
camelia True
raschipi m: sub got( Numeric() $x where ^10 ) { dd $x }; got "3" 01:00
camelia 3
raschipi m: sub got( Numeric() $x where ^10 ) { dd $x }; got "13"
camelia Constraint type check failed in binding to parameter '$x'; expected anonymous constraint to be met but got Int (13)
in sub got at <tmp> line 1
in block <unit> at <tmp> line 1
ktown perl -e 'print "3" eq 3' => 1 01:01
perl -e 'print "3" == 3' => 1
raschipi Yeah, Perl 6 doesn't go that far, you need to use either explicit coercion or use one of the operators that will coerce automatically. Smartmatch doesn't autocoerce. 01:03
Smartmatch isn't a typed operator, it doesn't know if it should do numeric or string comparisson. 01:04
raschipi m: say "3" eq 3; say "3" == 3 01:06
camelia True
True
raschipi Those are typed, one will coerce to string and the other will coerce to numeric 01:07
That's because they have Str() or Numeric() in their signatures
ktown yes, but it did not do that with the signature, but more odd was sometimes is did and sometimes it did not 01:08
raschipi Well, if it doesn't coerce for you, prefix + and prefix ~ will 01:09
ktown the odd bit, I was looping a list of strings and after a few it would error
raschipi That would be odd indeed. 01:10
ktown well it's time to publish my turtle graphics for the terminal ascii eta sketch module 01:29
ktown googles how to do that 01:31
raschipi vector based or cartesian based? 01:32
ktown it's vi bindings... l is right
raschipi right of the turtle or absolute right? 01:33
ktown l one "pixel" to the right 01:36
raschipi To the right of the screen?
ktown relative to the current cursor position
raschipi So it's not really a turtle graphics program 01:37
ktown no, it's an etch-a-sketch 01:38
raschipi That would be fun too 01:39
ktown puzzle challenge what would this do?
1 4,3,0 h h k k l l j j 7,3,0 l l k k h h j j 4,7,0 h h k k l l j j 7,7,0 l l k k h h j j 5,5,0 6 l l k k h h j j 80 3,2,1 54 8,2,1 10 6,4,1 d
raschipi what do the number commands do? and the commas? 01:40
ktown number set the pen "colour" 01:41
commas are goto
pencolour 10 is a smiley 01:42
raschipi goto where?
ktown x,y 01:43
raschipi let me get graph paper
perlawhirl all of life's problems can be solved with graph paper 01:44
ktown grid is 10 by 10
raschipi starts at the center or at a corner? 01:46
does it paint or teleports when it goesto?
what does x,y,z do? 01:47
ktown teleport, x,y,p p=1 will write, p=0 is pen up 01:48
raschipi is the grid numbered starting at 0 or 1? 01:49
doesn't matter 01:50
ktown it's perl, array are zero indexed
the timer is running 01:51
raschipi I will take some more time then, can't have enought of it 01:52
No idea what it is 01:55
ktown i guess you will have to wait until how I figure out how to publish the module 01:56
raschipi Do you how to use git? 01:57
ktown git is one of those spells you cast at the commandline 02:02
raschipi yes it is, do you know how to do it? 02:26
Summertime just make an alias `git pulshmit` and use it for everything, works fine 02:27
Kaiepi git's confusing at first but it's not as bad as some of the alternatives out there 02:30
the only cvs command i know is up
ktown is that a real command?? or a euphemism for pull shit? 02:31
geekosaur short for update
geekosaur oh, the Summertime comment. that wasn't in base git/ but git is extensible to the point that there's noi promises there isn't one *somewhere* 02:32
ktown i have only used it a bit, need to learn more
geekosaur and some of the stuff I've seen in git extensions is ...
Summertime pulsh is common for pull push
I was joking that commit should be added to that as well
Kaiepi mercurial has some useful extensions 02:33
i've never checked out git's though
ktown raschipi: no ish, I will work through the docs and the blog post from 2016 from the guy with the cool license plate. 02:47
raschipi Now I know, it's the turtle! 02:58
atweiden-air if you have a module like `use ABC; use DEF; unit module XYZ;`, can you make it so that doing `use XYZ` elsewhere is also using `ABC` and `DEF`? 03:02
ktown I started with only 0-9 as ascii greyscale, then added unicode chars, then added 32-126, but really one can create any non standard char mapping.
atweiden-air how can unit class XYZ export `use ABC; use DEF`?
looking at the docs (docs.perl6.org/language/modules#EXPORT), `sub EXPORT` shortname looked promising, but it isn't working for me in unit module XYZ 03:03
ktown raschipi: yes the Numeric() changes the turtle! 03:07
Zoffix atweiden-air: what code you got? 03:09
atweiden-air: here's a sample of a module that uses a bunch of stuff and exports the symbols from the used sub whenever just the module is used: modules.perl6.org/dist/P5built-ins:...ins.pm6#L3
atweiden-air Zoffix: basically this ix.io/1b7w 03:11
Zoffix atweiden-air: put it before `unit ...`
s/it/sub EXPORT/; 03:12
Zoffix atweiden-air: works: gist.github.com/zoffixznet/eb5863c...400d76fe74 03:14
but if you place sub EXPORT after the `unit` bit, it becomes a sub inside that thing, rather than a global 03:15
raschipi Zoffix: do you have any plans for modules.perl6.org to render pod like Github does?
atweiden-air Zoffix: ic 03:16
atweiden-air does a barrel roll 03:17
Zoffix raschipi: but github doesn't render Pod6 03:18
raschipi: but regardless, I have no plans to work on modules.perl6.org this year
And probably neither in 2019
raschipi Right, I got confused because zef has a README.pod that is redered, but it's pod5 03:19
Geth doc: 792e1facdc | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Language/modules.pod6
Point out `sub EXPORT` must be before `unit`

  irclog.perlgeek.de/perl6/2018-05-23#i_16195729
synopsebot Link: doc.perl6.org/language/modules
skids technically you are supposed to be able to "use MyOtherModule :EXPORT;" 03:23
Zoffix that's be nice 03:24
[Coke] waves from Dallas, TX 04:06
skids waves from the same old place he always is :-) 04:10
Geth doc/master: 5 commits pushed by (Will "Coke" Coleda)++ 04:44
Geth doc: 4f480b76c4 | skids++ | doc/Type/WhateverCode.pod6
tiny language touch-up
05:00
synopsebot Link: doc.perl6.org/type/WhateverCode
Geth doc: 101fc1efad | (JJ Merelo)++ | 2 files
Adds instructions for using utf8-c8 encoding

Closes #2043 hopefully. Examples have been taken from roast, so maybe they are not ideal, but at least they are correct.
05:48
Geth ¦ doc: JJ self-assigned False positive in xt/examples compilation.t github.com/perl6/doc/issues/2048 06:25
Geth doc/master: 6 commits pushed by (JJ Merelo)++ 06:41
doc: 1b5df39e71 | (JJ Merelo)++ | t/02-pod-valid.t
Finish Test-Files documents|pods refactoring closes #2047
06:44
Geth doc: 2cb0d397bc | (Ben Davies)++ | util/perl-nbsp.p6
util/perl-nbsp.p6 refactor for #2047
06:48
Geth doc: a2413506ed | (JJ Merelo)++ | 2 files
Adds test for variants of "normalized" workds like filehandle

New words should be added to the `%variants` hash when they are effectively normalized. Closes #2041
07:30
dominix hi everyone 08:00
jmerelo hi
AlexDaniel o/ 08:01
dominix I have an infinite list, like this "((^∞).grep: *.is-prime)" and I would like to step into until I reach a maximum, let say 1000.
I was able to step for 1000, but not until $_ >= 1000 08:02
lizmat ah, not a 1000 steps, but the value 1000 ?
dominix it should be easy, but at this late hour, I just hang
dominix yes the value 08:03
jmerelo m: say (^1000).grep: *.is-prime 08:03
camelia (2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 127 131 137 139 149 151 157 163 167 173 179 181 191 193 197 199 211 223 227 229 233 239 241 251 257 263 269 271 277 281 283 293 307 311 313 317 331 337 347 349…
dominix $_.say for ((^∞).grep: *.is-prime) while ($_ < 1000); it didn't compile
jmerelo m: say (1 ... * < 1000 ).grep: *.is-prime 08:04
camelia ()
jmerelo m: say (1 .. * < 1000 ).grep: *.is-prime
camelia ()
jmerelo say 1… * < 1000
evalable6 (1)
jmerelo say 1, * + 1 … * < 1000
evalable6 (1)
jmerelo say 1, * + 1 … (* < 1000) 08:05
evalable6 (1)
jmerelo agh
dominix ok, I'm not alone
lizmat m: dd ^Inf .grep( *.is-prime ).toggle( * < 1000 ).tail 08:06
camelia 997
jmerelo dominix: yep, but the first one above should work, if that's what you are looking for
m: say (^1000).grep: *.is-prime
camelia (2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 127 131 137 139 149 151 157 163 167 173 179 181 191 193 197 199 211 223 227 229 233 239 241 251 257 263 269 271 277 281 283 293 307 311 313 317 331 337 347 349…
dominix ok, how could I say. I taken isprime as example,but my function is not linear, and is time based ... so basically I have to test on the result, not on the input. 08:08
dominix I will try until infinite, so "for ((^∞)." is a good begining, then my func apply ... and then I would like to test and stop if I have reached 1000 08:10
as a result
jmerelo dominix: you can try generators: docs.perl6.org/routine/....html 08:18
dominix: also, formulate the question in StackOverflow :-)
m: say 1, 1, * + * … * < 1000 08:19
camelia (1)
jmerelo m: say (1, 1, * + * … * < 1000) 08:20
camelia (1)
dominix yes generators seem the right way
thanks jmerelo 08:21
jmerelo dominix: good luck
m: say 1, 1, * + * … 1000 08:22
camelia (1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 1597 2584 4181 6765 10946 17711 28657 46368 75025 121393 196418 317811 514229 832040 1346269 2178309 3524578 5702887 9227465 14930352 24157817 39088169 63245986 102334155 165580141 267914296 433494437 70…
jmerelo m: say 1, 1, * + * … * > 1000
camelia (1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 1597)
jmerelo dominix: you can put as the third term any generator function you want...
lizmat m: say 1, 1, * + * …^ * > 1000 # if you want to exclude the last one 08:23
camelia (1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987)
dominix interesting 08:24
lizmat m: ^Inf .grep( *.is-prime ).toggle( * < 1000 ) 08:26
hmmm
tobs m: say (2, 4, 8, * ** * ** * … *).head(10)
camelia (timeout) 08:27
Numeric overflow
in block <unit> at <tmp> line 1
lizmat m: dd ^Inf .grep( *.is-prime ).toggle( * < 1000 ) 08:27
camelia (2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263,…
dominix m: dd ^Inf .grep( *.is-prime ).toggle( * < 1000 ) 08:36
camelia (2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263,…
dominix this one is neat
thans lizmat: 08:37
thanks
dominix so long way till I master perl6 ... 08:38
buggable New CPAN upload: User-grent-0.0.1.tar.gz by ELIZABETH cpan.metacpan.org/authors/id/E/EL/...0.1.tar.gz 08:43
buggable New CPAN upload: P5pack-0.0.6.tar.gz by ELIZABETH modules.perl6.org/dist/P5pack:cpan:ELIZABETH 09:43
Geth doc: Reko98++ created pull request #2049:
README.fr.md
11:40
Geth doc/master: 4 commits pushed by Reko98++, (Juan Julián Merelo Guervós)++ 11:41
raschipi jmerelo++ 11:48
lizmat
.oO( cool seeing changes to French version with Spanish commit messages )
11:49
jmerelo lizmat: she's someone from Granada, actually, although I don't really know her. 11:50
lizmat: that makes three translations from Granada: Spanish, French and Japanese... :-)
El_Che maybe it's the prelude of a Catalan version, being a language pretty much in the middle of Spanish and French linguistically
jmerelo El_Che: that, or occitan :-)
raschipi Gonna start sending changes to the English version with Portuguese commit messages. 11:51
El_Che papa, potato
jmerelo raschipi: I'll accept the pull request with klingon comments... 11:51
jmerelo I have made a new report related to the grant, this time analyzing the behavior of issues with respec to labels github.com/JJ/TPF-Grant/releases/tag/v0.5 11:54
jmerelo Rmarkdown, scripts, data is in the repo too. I'll upload it to ResearchGate pretty soon, when I've polished it a bit. 11:54
That's also open science (or source, or whatever), so feel free to send pull requests and comments. 11:55
El_Che jmerelo: are you having fun during the grant? :)
jmerelo El_Che: I always do when I learn new stuff :-)
Gist of it is: self organizing works pretty well, all things considered, but a thin management layer could boost productivity. 11:56
But no spoiler, you'll have to read the report beyond the pretty charts :-)
As an immediate conclusion, it would be good to label all open issues... There are quite a few with no labels yet. I'll try to do it later on today or maybe tomorrow, I'm doing a graffiti workshop this afternoon. 11:58
buggable New CPAN upload: User-pwent-0.0.1.tar.gz by ELIZABETH cpan.metacpan.org/authors/id/E/EL/...0.1.tar.gz 12:03
Geth doc/ronaldxs-patch-1: 084c6fde91 | (Ronald Schmidt)++ (committed using GitHub Web editor) | README.fr.md
Update README.fr.md - looks typo to my rusty french

My french isn't that good and hasn't been actively used in a while but after googling `exéxutez` still looks like a typo.
13:21
doc: ronaldxs++ created pull request #2050:
Update README.fr.md - looks typo to my rusty french
buggable New CPAN upload: P5getnetbyname-0.0.3.tar.gz by ELIZABETH modules.perl6.org/dist/P5getnetbyna...:ELIZABETH 13:43
raschipi u: 14:01
unicodable6 raschipi, U+0020 SPACE [Zs] ( )
donpdonp u:   14:01
unicodable6 donpdonp, U+200A HAIR SPACE [Zs] ( )
buggable New CPAN upload: Net-netent-0.0.1.tar.gz by ELIZABETH modules.perl6.org/dist/Net::netent:...:ELIZABETH 14:23
lucasb m: if 'x' ~~ /./ { say 'yes' } 14:28
camelia yes
lucasb m: for 'x' ~~ /./ { say 'yes' }
camelia ( no output )
raschipi lizmat: The META6.json in Net-netent has a link to github.com/lizmat/User-netent.git I think it should be github.com/lizmat/Net-netent.git
lucasb ^^ is this a worthy mention for the traps document?
raschipi m: for 'x' ~~ /(.)/ { say $_ } 14:30
camelia 「x」
Geth doc: 084c6fde91 | (Ronald Schmidt)++ (committed using GitHub Web editor) | README.fr.md
Update README.fr.md - looks typo to my rusty french

My french isn't that good and hasn't been actively used in a while but after googling `exéxutez` still looks like a typo.
doc: d05cae266e | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | README.fr.md
Merge pull request #2050 from perl6/ronaldxs-patch-1

Update README.fr.md - looks typo to my rusty french Thanks!
raschipi m: for 'x' ~~ /(.)/ { say yes }
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
yes used at line 1
raschipi m: for 'x' ~~ /(.)/ { say 'yes' }
camelia yes
jmerelo lucasb: it could be. Just create an issue.
lucasb jmerelo: ok, thanks 14:32
raschipi I agree it should, just showing how it can work.
araraloren m: subset XI of Code where { .signature ~~ :(int32)}; sub signal(int32, XI --> XI) is native(Str) { * } 15:01
camelia 5===SORRY!5=== Error while compiling <tmp>
Can't use unknown trait 'is native' in a sub declaration.
at <tmp>:1
expecting any of:
rw raw hidden-from-backtrace hidden-from-USAGE pure default
DEPRECATED inlinable nodal …
araraloren m: use NativeCall; subset XI of Code where { .signature ~~ :(int32)}; sub signal(int32, XI --> XI) is native(Str) { * } 15:03
camelia ( no output )
Geth doc: 4e34af1ced | (Lucas Buchala)++ (committed using GitHub Web editor) | doc/Language/traps.pod6
Trap: non-capturing, non-global matching in list context
15:04
synopsebot Link: doc.perl6.org/language/traps
lucasb ^^ feel free to tune the wording, or change the examples 15:05
callyalater s: Any, "lazy-if", \(1) 15:08
SourceBaby callyalater, Sauce is at github.com/rakudo/rakudo/blob/27e8...y.pm6#L472
Geth doc: coke assigned to JJ Issue Add tests for variants of normalized words github.com/perl6/doc/issues/2041
601c2bf4ee | (Will "Coke" Coleda)++ | 3 files
15:23
Geth doc: 46351b337b | (Will "Coke" Coleda)++ | xt/word-variants.t
tests need to be executable
15:40
mcmillhj m: [^^] 1, 1, 1, 2, 2, 2; 17:10
camelia ( no output )
mcmillhj m: say [^^] 1, 1, 1, 2, 2, 2;
camelia Nil
mcmillhj ^ can someone explain why this returns Nil?
raschipi From docs.perl6.org/routine/$CIRCUMFLEX...EX_ACCENT: "Returns Nil when more than one argument is true." 17:11
raschipi Because it's "EXCLUSIVE"-or. 17:14
docs.perl6.org/routine/$CIRCUMFLEX...LEX_ACCENT link above got mangled. 17:15
mcmillhj oh whoops, I was actually meaning to use docs.perl6.org/language/operators#infix_+^ 17:16
thanks raschipi
raschipi np
buggable New CPAN upload: Net-netent-0.0.2.tar.gz by ELIZABETH modules.perl6.org/dist/Net::netent:...:ELIZABETH 17:23
Geth doc: 96057564ab | (JJ Merelo)++ | xt/word-variants.t
Changed it to check just pods

Which is where it makes sense. Closes #2041
17:45
buggable New CPAN upload: Net-protoent-0.0.1.tar.gz by ELIZABETH modules.perl6.org/dist/Net::protoen...:ELIZABETH 18:23
Geth doc: fcefb9f22a | (JJ Merelo)++ | doc/Language/5to6-nutshell.pod6
Rewrites most of the section on references 5 to 6

This refs #1081. Leaves open because there might be some hanging internal references, and also for general review.
18:34
synopsebot Link: doc.perl6.org/language/5to6-nutshell
doc: 92e2d38d0d | (JJ Merelo)++ | doc/Language/5to6-nutshell.pod6
Fixes non-breaking space and some minor changes refs #1081
18:37
Success can i do SIMD operations w/ perl6? 18:46
skids Success: I see people ask whether PDL/Perl6 is available yet once in a while, and some hint they may start on it, but nothing seems to be in the ecosystem yet. 18:54
raschipi Success: Maybe Nativecall a C/C++ library? 19:00
moritz skids: it's a huge project 19:53
Qwerasd I'm getting too many positionals passed on a function even though it has a slurpy array for its arguments 21:33
skids can you golf it down? 21:41
Qwerasd Nvm fixed the issue 21:50
Summertime is there an opposite to next? as in `next if ! X` 22:54
Summertime oh is it just if 22:55
Summertime wait no that wouldn't work 22:56
context: perl6 -pe 'next if not s/"data: "//'
wanting to skip every line that doesn't match the s///, instead of printing it unaffected 22:57
MasterDuke Summertime: couldn't you just do perl6 -ne 'say if s/"data: "//' instead? 22:58
Summertime oh found `next unless X` 23:00
and yeah I could but then I need to work out if its say, gist, print, etc
for the output I want x-x 23:01
and it would need to be .say to pull the $_ in implicitly 23:02
buggable New CPAN upload: P5pack-0.0.7.tar.gz by ELIZABETH modules.perl6.org/dist/P5pack:cpan:ELIZABETH 23:03
Geth doc: 0fd6d6a0a6 | (Will "Coke" Coleda)++ | doc/Language/5to6-nutshell.pod6
whitespace
23:35
synopsebot Link: doc.perl6.org/language/5to6-nutshell