»ö« 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.
AlexDaniel not sure how would that make a difference 00:00
samcv idk for my bot i just wrote to a file then ran a command line program on that file
samcv seems simpler 00:00
AlexDaniel yea but I guess your command line program wasn't a second piece of code its author wrote :) 00:01
samcv yeah
dalek rl6-most-wanted: 2c33138 | (Paweł Szulc)++ | most-wanted/modules.md:
Removed UNIX::Daemonize

Can be found at github.com/hipek8/p6-UNIX-Daemonize
00:02
AlexDaniel u: diamond 00:04
unicodable6 AlexDaniel, U+20DF COMBINING ENCLOSING DIAMOND [Me] (◌⃟)
AlexDaniel, U+22C4 DIAMOND OPERATOR [Sm] (⋄)
AlexDaniel, U+233A APL FUNCTIONAL SYMBOL QUAD DIAMOND [So] (⌺)
AlexDaniel, gist.github.com/6110d9652997c176d3...04cd997822
phatbot And it's not really my fault actually... It JSON-encodes stuff and ships it with HTTP::Tinyish (so `curl`) 00:05
AlexDaniel u: 🔷🔶 00:06
unicodable6 AlexDaniel, U+1F537 LARGE BLUE DIAMOND [So] (🔷)
AlexDaniel, U+1F536 LARGE ORANGE DIAMOND [So] (🔶)
AlexDaniel blue and orange???
samcv u: Lo
unicodable6 samcv, U+00AA FEMININE ORDINAL INDICATOR [Lo] (ª)
samcv, U+00BA MASCULINE ORDINAL INDICATOR [Lo] (º)
samcv, U+01BB LATIN LETTER TWO WITH STROKE [Lo] (ƻ)
AlexDaniel is there a “color” property? :-/
samcv unicode property?
no
AlexDaniel samcv: I do not think this is going to work :| 00:07
samcv there are 108 properties and that is not one of them
samcv double checks just in case
samcv yeah no 00:07
AlexDaniel I'm not sure what happens exactly, but something just eats a lot amount of memory at some point 00:08
phatbot Are you using any regexes? 00:09
samcv it's probably something wrong with HTTP::Tinyish 00:10
phatbot it basically just shells out to `curl`
AlexDaniel phatbot: I don't think so
samcv oh does it?
phatbot Yup
Doesn't even work if curl is not installed 00:11
AlexDaniel: read the sauce, Luke :)
github.com/skaji/perl6-HTTP-Tinyis...rl.pm6#L23
github.com/skaji/perl6-HTTP-Tinyis...rl.pm6#L44
AlexDaniel phatbot: I mean, I'm not using any regexes 00:12
phatbot Ah 00:13
I forgot I asked that :)
But I saw buggable nom ram due to a regex 00:14
samcv evalable6, say "\0"
evalable6 samcv, rakudo-moar 7b84adc: OUTPUT«␀»
samcv evalable6, for ^1000 { say "\0" }
evalable6 samcv, rakudo-moar 7b84adc: OUTPUT«␀␤␀␤␀␤␀␤␀␤␀␤␀␤␀␤␀␤␀␤␀␤␀␤␀␤␀␤␀␤␀␤␀␤␀␤␀␤␀␤␀␤␀␤␀␤␀␤␀␤␀␤␀␤␀␤␀␤␀␤␀␤␀␤␀␤␀␤␀␤␀␤␀␤␀␤␀␤␀␤␀␤␀␤␀␤␀␤␀␤␀␤␀␤…»
samcv, Full output: gist.github.com/
AlexDaniel samcv: so the question is: what should be done with control characters in gists?
phatbot hehe
samcv it's probably just the null byte doing it
just remove it 00:15
before gisting
AlexDaniel remove or replace with ␦ ?
samcv well... null bytes are against RFC for IRC protocol
you only need to remove the null byte
AlexDaniel hm
samcv just replace with \0
AlexDaniel no, there's a cool character for it 00:16
samcv because NULL is a unicode property name
u: null
AlexDaniel :|
samcv but
phatbot .u ␀
samcv \0 is not any unicode property
yoleaux U+2400 SYMBOL FOR NULL [So] (␀)
samcv while that is
so \0 is not found anywhere in it
AlexDaniel u: null 00:16
unicodable6 AlexDaniel, U+0000 NULL [Cc] (control character)
AlexDaniel, U+2400 SYMBOL FOR NULL [So] (␀)
AlexDaniel, U+1D159 MUSICAL SYMBOL NULL NOTEHEAD [So] (𝅙)
samcv so just make it \0 00:17
AlexDaniel why not ␀ ??
samcv because that's a different codepoint
AlexDaniel \0 is two different codepoints
samcv yes
so you can tell it's not the literal character
because it doesn't match any unicode name or property
AlexDaniel well, then how would you be able to tell that \0 are not just literal characters 00:18
nah, I'll go with ␀ I think
samcv because there's no \0 unicode character? lol
i would have said NULL but that is a unicode name 00:19
AlexDaniel evalable6: .chr.say for ^256 00:22
evalable6 AlexDaniel, rakudo-moar 003e654: OUTPUT«Cannot test 003e654dd6614f101c36151f290a95d4fa76cd0b (Commit exists, but a perl6 executable could not be built for it)»
AlexDaniel :O
rly?
phatbot I just pushed it. Still building it? 00:23
Just = 9m ago
samcv AlexDaniel, lornajane.net/posts/2012/posting-ra...-with-curl
AlexDaniel phatbot: no, it does not work that way. It does not know about new builds before they are actually built 00:24
samcv so yeah it's not working because you are sending the stream to the command that way, sending it with a file would not have the problem
AlexDaniel phatbot: I'll delete it to give it another go, let's see…
samcv: can you open a bug report for HTTP::Tinyish ?
samcv sure
i think i can fix it tho 00:27
maybe
phatbot Quick read through code tells me it's already using a file: github.com/skaji/perl6-HTTP-Tinyis...l.pm6#L121
AlexDaniel evalable6: .chr.say for ^256 00:28
evalable6 AlexDaniel, rakudo-moar 003e654: OUTPUT«␀␊␁␊␂␊␃␊␄␊␅␊␆␊␇␊␈␊␉␊␊␊␋␊␌␊␦␎␊␏␊␐␊␑␊␒␊␓␊␔␊␕␊␖␊␗␊␘␊␙␊␚␊␛␊␜␊␝␊␞␊␟␊ ␊!␊"␊#␊$␊%␊&␊'␊(␊)␊*␊+␊,␊-␊.␊…»
AlexDaniel, Full output: gist.github.com/
samcv oh?
phatbot The original author is pretty skilled in programming, so I doubt there'd be such an obvious issue.
samcv may need the --binary-data 00:29
command line option for curl
i think that's the issue
it's sending it as text
phatbot Right now it uses --data-binary is that the same?
samcv err i meant --data-binary
it does that already hm
phatbot evalable6: source 00:30
evalable6 phatbot, github.com/perl6/whateverable
AlexDaniel ummm 00:31
samcv well then maybe without that would make it work
AlexDaniel m: say ‘abc’.trans(‘a’ => ‘X’, ‘a’ => ‘Z’, ‘c’ => ‘C’) 00:31
camelia rakudo-moar 003e65: OUTPUT«ZbC␤»
AlexDaniel m: say ‘abc’.trans(‘a’ => ‘X’, ‘a’ => ‘Z’, /c/ => ‘C’)
camelia rakudo-moar 003e65: OUTPUT«XbC␤»
AlexDaniel should I expect any order? 00:32
commit: all say ‘abc’.trans(‘a’ => ‘X’, ‘a’ => ‘Z’, ‘c’ => ‘C’)
commit: all say ‘abc’.trans(‘a’ => ‘X’, ‘a’ => ‘Z’, /c/ => ‘C’)
committable6 AlexDaniel, gist.github.com/291e40850df56c95e2...c2db9fab81 00:33
phatbot s: ‘abc’, 'trans', \(‘a’ => ‘X’, ‘a’ => ‘Z’, ‘c’ => ‘C’)
SourceBaby phatbot, Sauce is at github.com/rakudo/rakudo/blob/003e...r.pm#L2361
committable6 AlexDaniel, gist.github.com/b3bd4d235f1d897f56...24707c2e45
AlexDaniel bisect: say ‘abc’.trans(‘a’ => ‘X’, ‘a’ => ‘Z’, ‘c’ => ‘C’) 00:34
bisectable6 AlexDaniel, Bisecting by output (old=2015.12 new=003e654) because on both starting points the exit code is 0
AlexDaniel, bisect log: gist.github.com/fe87e642d0332a578b...2fee760a72
AlexDaniel, (2016-02-19) github.com/rakudo/rakudo/commit/cc...51141775f6
samcv err or maybe
samcv it could be github's things don't allow post's with null bytes 00:34
AlexDaniel and yet another optimization that changed the behavior a lil bit
phatbot Never happy! :) 00:35
AlexDaniel mmm wait, that's the wrong commit
commit: cce7ca353^,cce7ca353 say ‘abc’.trans(‘a’ => ‘X’, ‘a’ => ‘Z’, ‘c’ => ‘C’)
committable6 AlexDaniel, ¦«cce7ca353^»: XbC␤¦«cce7ca3»: ZbC
AlexDaniel ah no, that's the right one
so, previously the ones on the left had more priority, kind of 00:36
samcv ok at least the 'gist' command line program made a gist with a null byte
phatbot it looks like a problem in JSON::Fast 00:38
it's too ... fast
star: use JSON::Fast; dd to-json "\0"
camelia star-m 2016.10: OUTPUT«"\"\0\""␤»
samcv oo 00:39
phatbot star: use JSON::Fast; print to-json "\0"
camelia star-m 2016.10: OUTPUT«"␀"»
phatbot star: use JSON::Tiny; print to-json "\0"
camelia star-m 2016.10: OUTPUT«"\u0000"»
phatbot star: print Rakudo::Internals.to-json: "\0"
camelia star-m 2016.10: OUTPUT«No such method 'to-json' for invocant of type 'Rakudo::Internals'␤ in block <unit> at <tmp> line 1␤␤»
AlexDaniel m: say “\0”
camelia rakudo-moar 003e65: OUTPUT«␀␤»
phatbot star: print to-json: "\0"
camelia star-m 2016.10: OUTPUT«Cannot resolve caller to-json(...); none of these signatures match:␤ (Version:D $v, :$indent = 0, :$first = 0)␤ (Real:D $d, :$indent = 0, :$first = 0)␤ (Bool:D $d, :$indent = 0, :$first = 0)␤ (Str:D $d, :$indent = 0, :$first = 0)␤ (Pos…»
phatbot star: print to-json "\0"
camelia star-m 2016.10: OUTPUT«"\u0000"»
phatbot u: t p 00:41
unicodable6 phatbot, U+0010 DATA LINK ESCAPE [Cc] (control character)
phatbot, U+001D INFORMATION SEPARATOR THREE [Cc] (control character)
phatbot, U+001C INFORMATION SEPARATOR FOUR [Cc] (control character)
phatbot, gist.github.com/b03e0ff9009d6b08d1...e431bd0ed9
phatbot unicodable6: you stupi
unicodable6 phatbot, Found nothing!
phatbot .u t p
yoleaux U+01AB LATIN SMALL LETTER T WITH PALATAL HOOK [Ll] (ƫ)
U+061E ARABIC TRIPLE DOT PUNCTUATION MARK [Po] (؞)
U+0752 ARABIC LETTER BEH WITH THREE DOTS POINTING UPWARDS BELOW [Lo] (ݒ)
phatbot 0.o
samcv All Unicode characters may be placed within the 00:42
quotation marks, except for the characters that must be escaped:
quotation mark, reverse solidus, and the control characters (U+0000
through U+001F).
phatbot Well... to me that looks like t separated by space followed by p
AlexDaniel yea? So what do you want to do with it?
phatbot And there was a nul char before p
AlexDaniel null character on IRC???
samcv that's not allowed....
that's the only not allowed character on irc
AlexDaniel commit: all my %x = ‘a’ => 42, ‘a’ => 69; say %x 00:43
committable6 AlexDaniel, gist.github.com/e69f083846eb7546a2...412219c900
AlexDaniel is this something I can rely on?
samcv which AlexDaniel ? 00:44
AlexDaniel … not sure how to find a test for that in roast
samcv about the null byte or something else
oh
that commit
thing
phatbot grap 00:44
note to self: git commit after git adding before you git reset --hard ~_~
samcv :( 00:45
phatbot AlexDaniel: fix to Pastebin::Gist pushed
AlexDaniel phatbot: and what is this fix going to do?
ah, I can see myself…
samcv i made an issue for json fast 00:46
AlexDaniel :-|
not sure I like this fix, but yea, okay
phatbot AlexDaniel: create a gist properly instead of croaking?
samcv what is the fix 00:47
phatbot I'm not gonna mangle user's data.
samcv oh ok
phatbot samcv: swap broken JSON encoder to non-broken
samcv i mean the fix is to have json fast replace json the rigth chars
phatbot Surival of the fittest :)
samcv it only replaces one of the 15 disallowed or whatever
though the other 14 are not very common 00:48
err more than that. but
samcv u: { .unimatch('Emoji') } 00:54
unicodable6 samcv, Found nothing!
samcv m: "🐧".uniprop('sc') 00:55
camelia ( no output )
samcv m: "🐧".uniprop('sc').say
camelia rakudo-moar 003e65: OUTPUT«Common␤»
samcv so we don't support the Emoji boolean either 00:56
should i open moarvm bugs on github or RT? 00:57
phatbot samcv: I believe github. 00:58
samcv kk
AlexDaniel phatbot: yeah, much better -_- 01:03
it throw
Input (4333 characters) is not a valid JSON string in sub from-json at ………… (JSON::Tiny) line 59 01:04
samcv guess there were 10 more properties than i knew about
AlexDaniel throws*
samcv so at least 118 unicode properties
AlexDaniel, wait but you are putting the gist inside JSON data structure right? 01:05
samcv but you are saying it throws if you parse the bad json 01:05
AlexDaniel samcv: that's what Pastebin::Gist does, I guess
samcv but it shouldn't throw if you try and encode it right 01:06
phatbot AlexDaniel: haha
phatbot star: use JSON::Tiny; say to-json "x"x4333 01:06
camelia star-m 2016.10: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3use JSON::Tiny; say to-json "x"7⏏5x4333␤ expecting any of:␤ infix␤ infix stopper␤ postfix␤ statement end␤ statem…»
phatbot star: use JSON::Tiny; say to-json "x" x 4333 01:07
camelia star-m 2016.10: OUTPUT«"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx…»
phatbot Oh, FROM json :o 01:07
AlexDaniel: what did you attempt to paste?
AlexDaniel phatbot: .chr.say for ^256
timotimo hey phatbot 01:13
timotimo if you already "git add"ed things, you can use "git fsck --lost-found" or what's it called to get your code back 01:13
phatbot oh, neat
star: use LWP::Simple; use JSON::Fast; say (from-json LWP::Simple.get: 'temp.perl6.party/Broken.json')<id> 01:16
camelia star-m 2016.10: OUTPUT«93b46259b3be867c36da3b6318940bc8␤»
phatbot haha 01:16
AlexDaniel: well, JSON::Tiny can encode this stuff, but only JSON::Fast can decode it :P
AlexDaniel /o\
phatbot star: use LWP::Simple; use JSON::Tiny; say (from-json LWP::Simple.get: 'temp.perl6.party/Broken.json')<id>
camelia star-m 2016.10: OUTPUT«Input (4071 characters) is not a valid JSON string␤ in sub from-json at /home/camelia/star-2016.10/share/perl6/site/sources/9B467EEF9267A777BB53BAA2F19BE2C9D756BEED (JSON::Tiny) line 59␤ in block <unit> at <tmp> line 1␤␤»
phatbot And Perl 5's JSON::Meth can decode it too, so there's ain't nothing wrong with that json 01:17
I'm glad tho. It makes it a good argument to dissuade people from poking in Rakudo's internals to use built-in JSON encoder to avoid a module dep :P 01:18
samcv build in json encoder? 01:20
oh json meth is a core module?
phatbot samcv: JSON::Meth is my Perl 5 JSON module.
samcv: we do have a built-in encoder/decoder, but that's just for META files. 01:21
samcv ah k
phatbot hm... OTOH we allow some free-form text content... I bet we choke on something then :/
samcv imo from::json should warn but not throw for json that just has errors 01:22
i mean it can still be decoded
with control chararcters in there. even though you are not supposed to do that
phatbot it uses a grammar, so that's just grammar failing
samcv ah
phatbot m: RAKUDO_NO_DEPRECATIONS=0; from-json '"x"'
camelia rakudo-moar a5dc98: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Undeclared name:␤ RAKUDO_NO_DEPRECATIONS used at line 1␤␤»
phatbot m: %*ENV<RAKUDO_NO_DEPRECATIONS>=0; from-json '"x"' 01:23
camelia rakudo-moar a5dc98: OUTPUT«Invalid JSON: "x"␤ in block <unit> at <tmp> line 1␤␤Saw 1 occurrence of deprecated code.␤================================================================================␤Sub from-json (from GLOBAL) seen at:␤ <tmp>, line 1␤Please use JSON::F…»
phatbot star: use LWP::Simple; use JSON::Tiny; say (from-json LWP::Simple.get: 'temp.perl6.party/Broken.json')<id>
camelia star-m 2016.10: OUTPUT«Input (4071 characters) is not a valid JSON string␤ in sub from-json at /home/camelia/star-2016.10/share/perl6/site/sources/9B467EEF9267A777BB53BAA2F19BE2C9D756BEED (JSON::Tiny) line 59␤ in block <unit> at <tmp> line 1␤␤»
phatbot star: use LWP::Simple; say (from-json LWP::Simple.get: 'temp.perl6.party/Broken.json')<id>
camelia star-m 2016.10: OUTPUT«Invalid JSON: {"url":"api.github.com/gists/93b46259b3be8...,"id":"9…»
samcv m: say Rakudo::Internals::JSON.to-json('hi') 01:26
camelia rakudo-moar a5dc98: OUTPUT«"hi"␤»
samcv lol
nifty 01:27
samcv m: say Rakudo::Internals::JSON.to-json("') 01:27
camelia rakudo-moar a5dc98: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unable to parse expression in double quotes; couldn't find final '"' ␤at <tmp>:1␤------> 3say Rakudo::Internals::JSON.to-json("')7⏏5<EOL>␤ expecting any of:␤ argument list␤ d…»
samcv m: say Rakudo::Internals::JSON.to-json("\0")
camelia rakudo-moar a5dc98: OUTPUT«"\u0000"␤»
tailgate how do I sort the keys of bag by how many times they appear? 01:28
phatbot tailgate: .sort: *.value ?
it may be .sort: :by{ .value } 01:29
m: bag(<a a a b c c>).sort.say
camelia rakudo-moar a5dc98: OUTPUT«(a => 3 b => 1 c => 2)␤»
phatbot m: bag(<a a a b c c c c>).sort.say
camelia rakudo-moar a5dc98: OUTPUT«(a => 3 b => 1 c => 4)␤»
phatbot m: bag(<a a a b c c c c>).sort(*.value).say
camelia rakudo-moar a5dc98: OUTPUT«(b => 1 a => 3 c => 4)␤»
phatbot m: bag(<a a a b c c c c>).sort(-*.value).say
camelia rakudo-moar a5dc98: OUTPUT«(c => 4 a => 3 b => 1)␤»
phatbot tailgate: ^
tailgate thanks
SmokeMachine nine: on case of ToUse Use and main, the INIT block worked... trying on Test::Fuzz... 01:31
:( 01:34
samcv this is a nice site unicode.org/cldr/utility/properties.jsp i just found this section of the unicode site today 01:35
sadly it's not really as easy to find as it should be
writing these uniprop tests is now 15x easier
kalkin- When i do zef install Task::Star it results in Failed to find dependencies: nqp 01:37
Hmm looks like a simple zef update solved this issue o_O 01:39
SmokeMachine nine: I rewrote that example to be loser to my real problem... gist.github.com/FCO/8bb0f2459b294a...731e71f10e 01:44
samcv what unicode.org/consortium/adopt-a-character.html 01:46
" 01:47
Oakland A’s became the official sponsor of the baseball emoji today…"
wtf am i reading
i would say this was BS except it's on the unicode.org website
AlexDaniel samcv: wtf is this
samcv ^
unicode.org/consortium/adopted-characters.html 01:48
goddamit jason jenkins
sponsoring poop emoji. srsly wtf
Zoffix Znet (for Perl 6 community) 01:49
AlexDaniel m: say 0x130BA.chr 01:51
camelia rakudo-moar a5dc98: OUTPUT«𓂺␤»
AlexDaniel m: say 0x130BA.uniname
camelia rakudo-moar a5dc98: OUTPUT«EGYPTIAN HIEROGLYPH D053␤»
samcv u: U+FFFD
unicodable6 samcv, U+FFFD REPLACEMENT CHARACTER [So] (�)
samcv what
somebody sponsored that one
i think it's literally supposed to be a box with a question mark 01:52
Each adoption is permanent.
AlexDaniel samcv: I see no null byte there
samcv i know
u: 1F98B.uniprop('Sponsor').say 01:53
unicodable6 samcv, U+0031 DIGIT ONE [Nd] (1)
samcv, U+0046 LATIN CAPITAL LETTER F [Lu] (F)
samcv, U+0039 DIGIT NINE [Nd] (9)
samcv, gist.github.com/595cc673169c862bc6...bf75266388
samcv m: 1F98B.uniprop('Sponsor').say
camelia rakudo-moar a5dc98: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Confused␤at <tmp>:1␤------> 0317⏏5F98B.uniprop('Sponsor').say␤ expecting any of:␤ whitespace␤»
samcv well wasn't gonna work anyway
but
tailgate what is the perl6 way to say "Strings that DO NOT match this regex" 02:09
samcv !~~ 02:12
All character adoptions are permanent. Adoption of a specific character at the limited gold and silver levels is on a first-come, first-served basis.
1000 dollars and perl 6 could be the only one with a butterfly emoji 02:13
AlexDaniel tailgate: what are you actually trying to do?
samcv u: 🈚 02:15
unicodable6 samcv, U+1F21A SQUARED CJK UNIFIED IDEOGRAPH-7121 [So] (🈚)
samcv :(
m: "🈚".uniname.say
camelia rakudo-moar a5dc98: OUTPUT«SQUARED CJK UNIFIED IDEOGRAPH-7121␤»
samcv oh my internet lagged
that's not what it's called tho
but i guess that sorta makes sense because it doesn't use any of the emoji data files 02:16
samcv it's called the Japanese Q[“free of charge” button] 02:17
er
Q[Japanese “free of charge” button] fancy quotes not added by me
also did you know that the # sign is an emoji? 02:18
u: ⏏️
unicodable6 samcv, U+23CF EJECT SYMBOL [So] (⏏)
samcv, U+FE0F VARIATION SELECTOR-16 [Mn] (◌️)
samcv well it gets that name correct 02:19
its emoji name is 'eject button' though i think all the emoji names have lowercase except for the ones that don't 02:20
err have only their normal name
www.unicode.org/Public/emoji/5.0//emoji-data.txt 02:21
SmokeMachine some one could give me some feedback of my second draft of perl6 advent calendar post? It's the "Generative Test" draft... 03:06
MasterDuke SmokeMachine: link? 03:09
SmokeMachine MasterDuke: perl6advent.wordpress.com/?p=5676 03:12
MasterDuke i don't have access to it there, but if you put it somewhere else i'll take a look 03:13
SmokeMachine MasterDuke: 1 sec! 03:15
MasterDuke: gist.github.com/FCO/e9c9815a059919...0d73e10c77 03:16
MasterDuke gist.github.com/FCO/e9c9815a059919...e1-txt-L27 "Looks that it do not accept Strs" should probably be "Looks like it does not accept Strs" 03:19
SmokeMachine MasterDuke: thanks! 03:20
MasterDuke "I didn't think every possibility of arguments." should probably be "I didn't think of every possibility for arguments." 03:21
SmokeMachine MasterDuke: thanks again!
MasterDuke "giving it (100, by default) entry data" i'd probably replace "entry data" with "different arguments" 03:23
SmokeMachine MasterDuke: changed! :) 03:24
kalkin-_ m: say ' '...'~'; say(<foo>, ' '...'~', <bar>);
camelia rakudo-moar a5dc98: OUTPUT«( ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~)␤(foo …»
kalkin-_ m: say(<foo>, ' '...'~', <bar>); 03:25
camelia rakudo-moar a5dc98: OUTPUT«(foo ...)␤»
MasterDuke "To test that our function, its simple like doing this:" might be better as "To test our function, all that's required is:"
kalkin-_ why? is the lsit constructed so weirdly?
is this is a bug or a misunderstanding on my side
MasterDuke "What that means?" should be "What does that mean?" 03:26
SmokeMachine MasterDuke: Great! Thanks!
kalkin-_ m: my @a = <foo>, ' '...'~', <bar>; # this will hang
camelia rakudo-moar a5dc98: OUTPUT«(timeout)» 03:27
MasterDuke "And $a and $b should have a types." could probably just be "$a and $b should have types."
SmokeMachine MasterDuke: I'm sorry about my terrible english...
MasterDuke SmokeMachine: no worries, it's perfectly understandable 03:28
itcharlie_linux Hello I want to update the prerequisites documentation for Rakudo Perl ( rakudo.org/how-to-get-rakudo/#Insta...tes-Debian ) on Ubuntu to include libssl-dev as one of the packages to install. $ panda install Task::Star will fail if libssl-dev is not installed. Anyone here can do that or know where should I go? 03:28
kalkin-_ m: my @a = <foo>, 'a'...'z', <bar>; say @a; # this works flawlessly
camelia rakudo-moar a5dc98: OUTPUT«[foo a b c d e f g h i j k l m n o p q r s t u v w x y z bar]␤»
SmokeMachine MasterDuke: :) 03:29
MasterDuke "isn't on perl6 ecosystem yet." to "isn't in the perl6 ecosystem yet."
SmokeMachine MasterDuke: Corrected! 03:30
MasterDuke good post, hope Test::Fuzz makes it into the wild soon 03:31
SmokeMachine MasterDuke: thank you! :) I think it can be very helpful... 03:32
MasterDuke: any other advice? should I explain more anything? or less? 03:33
tbrowder i need to use a p5 excel xlsx reader for a p6 prog. any suggestions for easiest to use and problem free with inline perl5? 03:36
MasterDuke itcharlie_linux: you might try contacting stmuk, phatbot, or moritz, they could probably point you to where the code for rakudo.org is 03:38
itcharlie_linux thank you MasterDuke
MasterDuke SmokeMachine: "If you read carefully the function" works, but "If you carefully read the function" is a little more natural 03:41
SmokeMachine MasterDuke: thanks (that was my first try... but I changed... :( ) 03:42
MasterDuke oh, and "There's my incredible sum function:". again it work, but "Here's my incredible sum function:" is a little more natural 03:43
SmokeMachine MasterDuke: Thank you again! 03:44
MasterDuke SmokeMachine: i think you'd be fine with the post as is, but i'm also slightly curious about how the generators work. even if you don't feel like explaining them, a link to the repo would let someone explore the code 03:52
SmokeMachine MasterDuke: great idea! 03:53
MasterDuke kalkin-_: the hanging definitely seems like a bug, mind submitting a report?
AlexDaniel download badge???? 04:17
SmokeMachine MasterDuke: I'll explain about generators... I think that was a good idea! 04:35
MasterDuke: but, if you are curious (before I write it) you can take a look if you want: github.com/FCO/Test-Fuzz
MasterDuke: the "generator engine" is here: github.com/FCO/Test-Fuzz/blob/mast...erator.pm6 04:36
MasterDuke: Today I only have generators for Int, UInt and Str... but if you use any type, the Test::Fuzz will try to discover whats the best generators to use... 04:39
MasterDuke: for example: if you use a subset Prime of Int where {.defined or .is-prime}... it will use the Int generator and grep Prime 04:40
MasterDuke: and if you use Any, it will try to discovery every generator that's a subtype of Any (actually all 3 (Int, UInt and Str)) 04:41
SmokeMachine MasterDuke: and if you don't specify the smiley :D it will try to find every type objects that's a subtype of your type. 04:43
SmokeMachine MasterDuke: Im sorry about the flood... 04:43
MasterDuke SmokeMachine: cool, could pretty much put that in as a paragraph 04:46
SmokeMachine MasterDuke: :) great idea! Saving it to polish it tomorrow... 04:48
MasterDuke: last question (and thank you very much!) Did you like the Test::Fuzz? Do you think its useful? 04:49
SmokeMachine good night #perl6! 04:55
BenGoldberg To all persons who live 🌎, good night, and to persons who live 🌍, good morning. 04:56
samcv u: EARTH GLOBE 05:45
unicodable6 samcv, U+1F30D EARTH GLOBE EUROPE-AFRICA [So] (🌍)
samcv, U+1F30E EARTH GLOBE AMERICAS [So] (🌎)
samcv, U+1F30F EARTH GLOBE ASIA-AUSTRALIA [So] (🌏)
samcv trying to think how i can add those three to my compose key 05:46
i mean which shortcuts to use
samcv m: '('.uniprop('Alpha').say 06:33
camelia rakudo-moar a5dc98: OUTPUT«False␤»
samcv m: '('.uniprop('Digit').say 06:34
camelia rakudo-moar a5dc98: OUTPUT«0␤»
samcv m: '('.uniprop('Number').say
camelia rakudo-moar a5dc98: OUTPUT«0␤»
samcv not sure what onimgura's \p{Digit} does but it allows parens..
samcv wait nm i think i just accidently used a - in a char class... 06:42
good thing i'm adding tests for this
RabidGravy boom! 07:18
[ptc] RabidGravy: o/ 07:21
RabidGravy: nice advent post, btw :-)
RabidGravy :) 07:22
RabidGravy right I'd better get off and ruin some Perl 5 07:24
RabidGravy catch you all later :) 07:24
moritz good morning 07:31
samcv atom's package management publishing thing is annoying.... tried to put out v1.9.6... so it fails partway through because i didn't have gnome-keyring working, even tho i put in my token from the site instead (it errored weirdly) 07:33
samcv then i couldn't fix it because github won't let me remove tags on the site :( 07:33
and i can't do 1.9.6.1
it wouldn't let me
good morning moritz
samcv the biggest problem is it tags it before it does other checks 07:35
and if the tag exists already it won't let you do it
ufobat good morning 08:38
i've got a question, where is actually the code that write the json, sql, html profile data to disk? is it in moarvm oder rakudo?
+s
arnsholt Looks like it's implemented in NQP 08:42
But there might be Rakudo-specific additions as well 08:43
AlexDaniel .tell yoleaux2 hi 🙋 10:06
yoleaux AlexDaniel: I'll pass your message to yoleaux2.
leont I'm trying while (@matches Z 0 .. *) -> $match, $index but it doesn't work, what am I doing wrong 10:16
moritz m: say (<a b c> Z 0..*).perl 10:16
camelia rakudo-moar 7b09be: OUTPUT«(("a", 0), ("b", 1), ("c", 2)).Seq␤»
moritz leont: Z returns a list containing sublists, not a flat list 10:17
leont: the idiomatic thing to do is use to .kv instead
for @matches.kv -> $index, $match { ... }
leont Ah, yeah that looks useful :-) 10:17
moritz leont: if you want to stick with Z, use (@matches Z 0 .. *) -> ($match, $index) { ... } 10:18
the () inside the signature introduce a sub-signature which will unpack the list into the two variables
leont kv is fine, thanks :-)
moritz you're welcome 10:19
leont Also, I'm clearly not awake since I should have converted the while in a for
moritz right
AlexDaniel m: say (<a b c> Z ^∞).perl 10:22
camelia rakudo-moar 7b09be: OUTPUT«(("a", 0), ("b", 1), ("c", 2)).Seq␤»
AlexDaniel leont: or maybe even .pairs ? 10:23
depends on what you need 10:24
m: my @a = 8, 5, 3, 15, 20; for @a -> $x where { $x < 10 } { say $x } 10:28
camelia rakudo-moar 7b09be: OUTPUT«8␤5␤3␤Constraint type check failed for parameter '$x'␤ in block <unit> at <tmp> line 1␤␤»
AlexDaniel cool
phatbot ufobat: in NQP: github.com/perl6/nqp/commit/8cbb0c...2205012646 11:02
itcharlie_linux: updated, thanks. 11:06
MasterDuke: rakudo.org is a WP installation with select people having access. With the exception of the download page, which is a PHP script (code's at github.com/perl6/web-rakudo )
which reminds me... I was meant to add archive thing to it doh 11:09
phatbot adds it to Holiday Hacking schedule 11:10
kalkin-_ MasterDuke: Do i submit it via Github or RT?
ok i see via RT 11:11
kalkin-_ How would I go about fixing it myself? 11:20
ufobat phatbot, thanks for the link :-) iwanted to look for it this night :) ty! 11:21
kalkin-_ I know the bug happens when i try to build a list consisting of element, Range, element, where do I start searching for the bug in rakudo/
phatbot kalkin-_: What's the code with the bug? 11:24
arnsholt kalkin-_: If you have a short test case that exhibits the bug, paste it here or in #perl6-dev and see what people say
Alternatively, a gist 11:25
phatbot m: dd (42, ^5, 45) 11:27
camelia rakudo-moar 7b09be: OUTPUT«(42, ^5, 45)␤»
phatbot m: dd eager (42, ^5, 45)
camelia rakudo-moar 7b09be: OUTPUT«(42, ^5, 45)␤»
phatbot m: dd eager (42, |^5, 45)
camelia rakudo-moar 7b09be: OUTPUT«(42, 0, 1, 2, 3, 4, 45)␤»
kalkin-_ m: my @a = <foo>, 'a'...'z', <bar>; say @a; #this works
camelia rakudo-moar 7b09be: OUTPUT«[foo a b c d e f g h i j k l m n o p q r s t u v w x y z bar]␤»
kalkin-_ m: my @a = <foo>, ' '...'~', <bar>; say @a; #this hangs 11:28
phatbot kalkin-_: it's not a problem with a list construction tho
camelia rakudo-moar 7b09be: OUTPUT«(timeout)»
phatbot Or a problem at all, as I'd think of it
m: .say for eager ' '...'~'
camelia rakudo-moar 7b09be: OUTPUT« ␤!␤"␤#␤$␤%␤&␤'␤(␤)␤*␤+␤,␤-␤.␤/␤0␤1␤2␤3␤4␤5␤6␤7␤8␤9␤:␤;␤<␤=␤>␤?␤@␤A␤B␤C␤D␤E␤F␤G␤H␤I␤J␤K␤L␤M␤N␤O␤P␤Q␤R␤S␤T␤U␤V␤W␤X␤Y␤Z␤[␤\␤]␤^␤_␤…»
phatbot m: .say for eager 'foo', ' '...'~' 11:29
camelia rakudo-moar 7b09be: OUTPUT«(timeout)»
phatbot kalkin-_: it's also not a Range. Ranges are constructed with .. The ... is a sequence operator
m: my @a = <foo>, (' '...'~'), <bar>;
camelia ( no output )
phatbot m: my @a = <foo>, |(' '...'~'), <bar>; say @a
camelia rakudo-moar 7b09be: OUTPUT«[foo ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~ bar]␤»
phatbot You were just missing parens. 11:30
kalkin-_: and it was building a sequence that starts with "foo", followed by " " etc...
kalkin-_: but to answer your question (if you want to see what it'
kalkin-_: but to answer your question (if you want to see what it's doing under the hood)
1 sec... need to grab my breakfast from the kitchen 11:31
kalkin-_ but why did the previous example with 'a'...'z' work?
phatbot Good question. Let's find out. 11:32
First golf it a bit
m: eager 'foo', 'a'...'z'
camelia ( no output )
phatbot m: eager 'foo', ' '...'~'
OK, so now we got just one infix operator: the ... 11:33
We have a bot
camelia rakudo-moar 7b09be: OUTPUT«(timeout)»
phatbot s: &infix:<...>, \('foo', ' ', '~')
SourceBaby phatbot, Sauce is at github.com/rakudo/rakudo/blob/7b09...rs.pm#L438
phatbot ^ you give it the sub (in this case infix ...) and args in a Capture
kalkin-_ i see
phatbot And it gives the link to code that handles that
psch well, infix:<...> takes the LHS as "extrapolate from this pattern" 11:34
m: say 1, 4 ... * > 10
camelia rakudo-moar 7b09be: OUTPUT«(1 4 7 10 13)␤»
phatbot And from that... one thing you could do is copy paste it to a code editor. Give it a different name (so it doesn't conflict with core one) and play around it, sticking debug statements here and there 11:35
kalkin-_ Wouldn't the issue be in concatenating the Range and the first list element?
phatbot kalkin-_: there isn't a range here 11:35
psch so, 'foo', ' ', $x = figure-out-the-change-between("foo", ' ') while $x lt '~'
kalkin-_ m: say ' '...'~'
camelia rakudo-moar 7b09be: OUTPUT«( ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~)␤»
psch m: eager 'foo', ' '... * lt '~' #
camelia ( no output )
psch m: say eager 'foo', ' '... * lt '~' #
camelia rakudo-moar 7b09be: OUTPUT«(foo)␤» 11:36
kalkin-_ phatbot: how do you call the '…'
Sequnce?
Sequence
phatbot Yup
m: dd (1…5).^name
camelia rakudo-moar 7b09be: OUTPUT«"Seq"␤»
kalkin-_ K thanks, will play around a bit with it
phatbot I get "Decrement out of range" if I rename that and give it same args :/ 11:37
psch m: say 10000, 10 ... 100 # same kind of behavior here 11:38
camelia rakudo-moar 7b09be: OUTPUT«(10000)␤»
psch except we're better at guessing direction with numbers i suppose
psch m: say 'foo', 'fos' ... 'fro' 11:39
camelia rakudo-moar 7b09be: OUTPUT«(foo fos fot fou fov fow fox foy foz fpa fpb fpc fpd fpe fpf fpg fph fpi fpj fpk fpl fpm fpn fpo fpp fpq fpr fps fpt fpu fpv fpw fpx fpy fpz fqa fqb fqc fqd fqe fqf fqg fqh fqi fqj fqk fql fqm fqn fqo fqp fqq fqr fqs fqt fqu fqv fqw fqx fqy fqz fra frb frc…»
psch m: say 'foo', 'fo' ... 'f'
camelia rakudo-moar 7b09be: OUTPUT«(foo fo fn fm fl fk fj fi fh fg ff fe fd fc fb fa ez)␤»
psch m: say 'foo', ' ' ... ' '
camelia rakudo-moar 7b09be: OUTPUT«(foo )␤»
psch ohh 11:40
m: say ' ' eq ' '.succ
camelia rakudo-moar 7b09be: OUTPUT«True␤»
psch there you go
kalkin-_ m: say 'foo', '0' … '~' # this works
camelia rakudo-moar 7b09be: OUTPUT«(foo 0 1 2 3 4 5 6 7 8 9)␤»
psch that's kind of weird tbh
kalkin-_ m: say 'foo', '/' … '~' # this doesnt
camelia rakudo-moar 7b09be: OUTPUT«(foo / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / ...)␤»
kalkin-_ ups
psch kalkin-_: well, it does, but it doesn't know what rate-of-change you mean with 'foo' -> '/' 11:41
kalkin-_: infix:<...> looks at the *list* on the LHS to extrapolate how to generate the next element
m: say 1, 10, 100, 1000 ... * < 2**32
camelia rakudo-moar 7b09be: OUTPUT«(1)␤»
psch m: say 1, 10, 100, 1000 ... * > 2**32
camelia rakudo-moar 7b09be: OUTPUT«(1 10 100 1000 10000 100000 1000000 10000000 100000000 1000000000 10000000000)␤»
kalkin-_ but why does it know how to generate 'foo, '0'…'~'?
psch kalkin-_: because it switches to numbers 11:42
m: say '0'.succ
camelia rakudo-moar 7b09be: OUTPUT«1␤»
psch m: say '9'.succ
camelia rakudo-moar 7b09be: OUTPUT«10␤»
kalkin-_ psch: does it? I thought it switches to ascii. 11:42
psch kalkin-_: at least i'd guess. is '~' the ASCII succ of '9'?
m: say '9'.ord.succ.chr
camelia rakudo-moar 7b09be: OUTPUT«:␤»
psch nope, it's not
kalkin-_ m: '~'.ord
camelia ( no output )
kalkin-_ m: say '~'.ord 11:43
camelia rakudo-moar 7b09be: OUTPUT«126␤»
kalkin-_ m: say ' '.ord, '0'.ord
camelia rakudo-moar 7b09be: OUTPUT«3248␤»
phatbot ... does a lot of DWIM and where's a DWIM there's a wat
m: dd eager 3, 9 … 27
camelia rakudo-moar 7b09be: OUTPUT«(3, 9, 15, 21, 27)␤»
lucasb can the sequence operator recognize if it's an arithmetic or geometric progression?
phatbot Yes
psch lucasb: i think those two, yes
lucasb: plus some weirds with alpha, as we notice :) 11:44
m: say 'aa' ... 'aaa'
camelia rakudo-moar 7b09be: OUTPUT«(aa)␤»
phatbot m: dd (3, 9, 27 … *)[^10]
camelia rakudo-moar 7b09be: OUTPUT«(3, 9, 27, 81, 243, 729, 2187, 6561, 19683, 59049)␤»
lucasb then, it should have its own count-only method, to calculate the result faster, no?
psch m: say 'aa', 'ab' ... 'aaa'
camelia rakudo-moar 7b09be: OUTPUT«(aa ab aa)␤»
psch m: say 'aa', 'ab', 'ac' ... 'aaa'
camelia rakudo-moar 7b09be: OUTPUT«(aa ab ac ab aa)␤»
psch m: say 'aa', 'ab', 'ac' ... 'az'
camelia rakudo-moar 7b09be: OUTPUT«(aa ab ac ad ae af ag ah ai aj ak al am an ao ap aq ar as at au av aw ax ay az)␤»
psch soo yeah, there's weird with Str.succ probably 11:45
or WAT in jargon i suppose
m: say 'za' ... 'aaa'
camelia rakudo-moar 7b09be: OUTPUT«(za yz yy yx yw yv yu yt ys yr yq yp yo yn ym yl yk yj yi yh yg yf ye yd yc yb ya xz xy xx xw xv xu xt xs xr xq xp xo xn xm xl xk xj xi xh xg xf xe xd xc xb xa wz wy wx ww wv wu wt ws wr wq wp wo wn wm wl wk wj wi wh wg wf we wd wc wb wa vz vy vx vw vv vu …»
phatbot lucasb: don't think so. Since you also give it an end of where to stop
psch m: say ('za' ... 'aaa')[*-10..*]
camelia rakudo-moar 7b09be: OUTPUT«(ak aj ai ah ag af ae ad ac ab)␤»
phatbot And it needs to check each point against that end (or continue infinitely)
psch m: say 'aaa' .. 'aa' 11:46
camelia rakudo-moar 7b09be: OUTPUT«"aaa".."aa"␤»
psch m: say 'aaa' ... 'aa'
camelia rakudo-moar 7b09be: OUTPUT«Decrement out of range␤ in block <unit> at <tmp> line 1␤␤Actually thrown at:␤ in block <unit> at <tmp> line 1␤␤»
psch m: say 'aaa'.prec
camelia rakudo-moar 7b09be: OUTPUT«No such method 'prec' for invocant of type 'Str'␤ in block <unit> at <tmp> line 1␤␤»
psch m: say 'aaa'.pred
camelia rakudo-moar 7b09be: OUTPUT«Decrement out of range␤ in block <unit> at <tmp> line 1␤␤Actually thrown at:␤ in block <unit> at <tmp> line 1␤␤»
psch m: say 'zz'.succ
camelia rakudo-moar 7b09be: OUTPUT«aaa␤»
psch soo that's kinda iffy
probably somewhat related, too, i think 11:47
phatbot It does templating logic
phatbot m: say eager 'tempfileAAA.txt' … 'tempfileZZZ.txt' 11:47
camelia rakudo-moar 7b09be: OUTPUT«(tempfileAAA.txt tempfileAAB.txt tempfileAAC.txt tempfileAAD.txt tempfileAAE.txt tempfileAAF.txt tempfileAAG.txt tempfileAAH.txt tempfileAAI.txt tempfileAAJ.txt tempfileAAK.txt tempfileAAL.txt tempfileAAM.txt tempfileAAN.txt tempfileAAO.txt tempfileAAP.txt…»
psch phatbot: .succ and .pred not being reversable does templating logic?
+in edge cases
phatbot Yes, yes, it doesn. 11:48
Sorry for not reading your mind correctly about what's iffy and related. 11:49
psch uh..?
psch apology accepted..? 11:49
psch kalkin-_: in the end, i think this is a trap, not a bug 11:59
kalkin-_ how so?
psch kalkin-_: you don't want a sequence generated from 'foo', ' ' with the following elements extrapolated via the rate of change between 'foo' and ' '
kalkin-_: you want a List that starts with 'foo', and then the sequence from ' ' to '~' 12:00
kalkin-_: unless the result of 'foo', (' ' ... '~') *isn't* what you want
kalkin-_: in that case infix:<...> isn't smart enough to understand what you want 12:01
kalkin-_ yes, but this doesn't explain the <foo>, <a>…<z> case, or does it?
psch m: say 'foo', 'a' ... 'z'
camelia rakudo-moar 7b09be: OUTPUT«(foo a b c d e f g h i j k l m n o p q r s t u v w x y z)␤»
kalkin-_ m: say 'foo', '0'…'~'
psch kalkin-_: pure alpha behaves different than other codepoints
camelia rakudo-moar 7b09be: OUTPUT«(foo 0 1 2 3 4 5 6 7 8 9)␤»
kalkin-_ hmm 12:02
psch kalkin-_: probably for that kind of template stuff phatbot++ was mentioning
kalkin-_: in any case, src/core/operators.pm:105 is what's called by infix:<...> afair
kalkin-_ i see thanks for the explanation and your time 12:03
psch kalkin-_: the problem is, again, really much waterbedding. the template stuff was deemed important and thus works. other cases didn't get thought of (or argued for) as much, so they often are probably surprising 12:04
kalkin-_: like, what *is* the predecedor for 'aaa'?
kalkin-_: and, what's the predecedor for '\x[PILE OF POOP]a'? 12:05
kalkin-_ may be it would make sense to add a template for ASCII sequence
psch *predecessor
kalkin-_ for '\x[PILE OF POOP]a` is chr(ord('\x[PILE OF POOP]') -1) ~ 'a' ?
psch kalkin-_: but that means that the pred for 'aa' is 'za'
erer 12:06
kalkin-_ or actually 'x[PILE OF POOP]`' (because '`' is ascii pred of 'a')
psch ...no it doesn't o.o
kalkin-_ but may be it's not an expected behavior
psch i mean, my last statement was bogus, sorry
psch m: say 'a'.pred 12:06
camelia rakudo-moar 7b09be: OUTPUT«Decrement out of range␤ in block <unit> at <tmp> line 1␤␤Actually thrown at:␤ in block <unit> at <tmp> line 1␤␤»
psch m: say 'a'.ord.pred.char.pred 12:07
camelia rakudo-moar 7b09be: OUTPUT«No such method 'char' for invocant of type 'Int'␤ in block <unit> at <tmp> line 1␤␤»
psch m: say 'a'.ord.pred.chr
camelia rakudo-moar 7b09be: OUTPUT«`␤»
kalkin-_ you can look at 'a'…'z' as just a slice of the Sequence chr(0)...chr(LAST_UNICODE_NUMBER) 12:08
psch kalkin-_: but that means that 'zz'.succ isn't 'aaa' anymore
kalkin-_ psch: yes this would be unexpected
psch so, yeah, there's lots of tradeoffs, and i'm not sure there's better ones to be made than the ones we have right now 12:09
brrt cygx++ nice post
i'd like to see that tool evolve
it could be useful for JIT testing, for one thing
kalkin-_ may add some kind of adverb. like '0'...'~':ascii 12:10
s/may/may be/g
psch m: say '0', { *.ord.succ.chr } ... '~'
camelia rakudo-moar 7b09be: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Malformed double closure; WhateverCode is already a closure without curlies, so either remove the curlies or use valid parameter syntax instead of *␤at <tmp>:1␤------> 3say '0', { *.ord.succ.chr }7⏏…»
psch m: say '0', *.ord.succ.chr ... '~'
camelia rakudo-moar 7b09be: OUTPUT«(0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~)␤»
psch kalkin-_: honestly, just be explicit about your rate of change seems more sensible than stuffing even more magic into infix:<...> 12:11
kalkin-_ psch: yeah you are right.
psch because every DWIM *is* a WAT with different expectations
kalkin-_ I think I just need more practice in perl6 to see other ways to solve an issue. 12:12
lucasb I saw the code '... !=:= IterationEnd' in the advent post today 12:17
lucasb ...and thought about an operator "=!=" :) 12:18
andrzejku it would be nice if there were buildbot version 12:19
in perl6
;P
phatbot fuck irc 12:20
waste of time full of dicks
andrzejku omg 12:20
someone hurts him
brrt i wonder what upset him :-o 12:21
psch probably the miscommunication earlier? although i'd suspect there's more involved somewhere 12:22
andrzejku brrt, okay guys but why are you doing that shit? you should connect people 12:24
be friendly
be good
not like dicks
brrt i'm sorry adrzejku, i have no idea what initiated this reaction 12:53
andross which signature should match both <a> and <a b>? 13:17
moritz *@ 13:18
andross it's too much 13:19
psch m: say \(<a>) ~~ :($); say \(<a b>) ~~ :($) 13:20
camelia rakudo-moar 7b09be: OUTPUT«True␤True␤»
psch m: sub f($) { say "matches" }; f <a>; f <a b> 13:21
camelia rakudo-moar 7b09be: OUTPUT«matches␤matches␤»
andross m: sub f($a) { say $a.perl }; f <a>; f <a b>;
camelia rakudo-moar 7b09be: OUTPUT«"a"␤$("a", "b")␤»
andross psch: i want ("a")
psch m: say <a>.WHAT 13:22
camelia rakudo-moar 7b09be: OUTPUT«(Str)␤»
psch m: say <a b>.WHAT
camelia rakudo-moar 7b09be: OUTPUT«(List)␤»
jnthn m: sub f([$a, $?]) { say $a.perl }; f <a>; f <a b>;
camelia rakudo-moar 7b09be: OUTPUT«Type check failed in binding to <anon>; expected Positional but got Str ("a")␤ in sub f at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
psch andross: well, then pass $(<a>)
jnthn Ah, right...if it's not consistently a list you can't just unpack 13:23
psch <a> always collapses right away into a single Str afaik
jnthn Probably easiest done wiht a pair of multis
andross psch: it makes code uglier, i use [<a>] but it's alot of typing as well
can i define custom quotes which always return list? 13:25
jnthn m: sub f(*@ [$a, $?]) { say $a.perl }; f <a>; f <a b>; 13:26
camelia rakudo-moar 7b09be: OUTPUT«"a"␤"a"␤»
jnthn Just realized, you can do that :)
psch jnthn: but *@ is too much
psch shrugs
jnthn oh :P
Too much what? :D
andross jnthn: it captures too much
andross m: sub foo($a where { $a.=list } , $b) { say $a.perl }; foo(<a>, 0); 13:31
camelia rakudo-moar 7b09be: OUTPUT«Cannot assign to a readonly variable ($a) or a value␤ in sub foo at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
andross m: sub foo($a is rw where { $a.=list } , $b) { say $a.perl }; foo(<a>, 0);
camelia rakudo-moar 7b09be: OUTPUT«Parameter '$a' expected a writable container, but got Str value␤ in sub foo at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
andross m: sub foo($a is rw where { $a=$=.=list } , $b) { say $a.perl }; foo(<a>, 0); 13:32
camelia rakudo-moar 7b09be: OUTPUT«Parameter '$a' expected a writable container, but got Str value␤ in sub foo at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
andross m: sub foo($a is rw where { $a.=list } , $b) { say $a.perl }; foo($ = <a>, 0);
camelia rakudo-moar 7b09be: OUTPUT«(my \List_65484000 = $(List_65484000,))␤»
andross m: sub foo($a is rw where { $a.=list } , $b) { say $a }; foo($ = <a>, 0); 13:33
camelia rakudo-moar 7b09be: OUTPUT«(\List_69504528 = (List_69504528))␤»
psch m: sub foo($a is rw where { $a = $_.list } , $b) { say $a }; foo($ = <a>, 0); 13:33
camelia rakudo-moar 7b09be: OUTPUT«(a)␤»
psch andross: in a where, $_ is the argument 13:34
andross: well, unless you supply a different parameter to the block of course...
andross can i avoid $= somehow? 13:36
m: sub foo($a coerce { $_.list } , $b) { say $a.perl }; foo(<a>, 0); 13:37
camelia rakudo-moar 7b09be: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Malformed parameter␤at <tmp>:1␤------> 3sub foo($a7⏏5 coerce { $_.list } , $b) { say $a.perl ␤ expecting any of:␤ constraint␤»
andross i can't just define 'coerce', can i? 13:37
[Coke] (fuzzy search) please add feedback on the ticket. 13:39
psch m: sub f(List() $a) { say $a.perl }; f <a>; f <a b> 13:41
camelia rakudo-moar 7b09be: OUTPUT«$("a",)␤$("a", "b")␤»
andross m: sub infix:<coerce>(Any $x, Block &b) { b($x) }; my $x = "12" coerce { .list } ; say $x.perl; 13:41
camelia rakudo-moar 7b09be: OUTPUT«Type check failed in binding to &b; expected Callable[Block] but got Block (-> ;; $_? is raw { #`...)␤ in sub infix:<coerce> at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
andross psch: thanks 13:42
i should have thought about about it 13:43
tbrowder ref new modules: should i add new module entries after my current ones in the ecosystem list, or add them at the end of the list? 14:48
jnthn tbrowder: I don't think it matters
tbrowder ok
jnthn (I always stick my new ones at the end)
('cus I'm lazy)
tbrowder roger >>
SmokeMachine MasterDuke: if you have some time, I just wrote my 3rd post draft... including informations about generator... if you would like to take a look... I'd thank you for some feedback... :) 15:11
MasterDuke: gist.github.com/FCO/79fc15e4fff850...81ca1e0181
If some one have some time to give me some feedback: gist.github.com/FCO/79fc15e4fff850...81ca1e0181 15:12
sena_kun SmokeMachine, can you provide a link to Test::Fuzz module? Is it on github? 15:16
SmokeMachine sena_kun: sure! github.com/FCO/Test-Fuzz 15:18
sena_kun: but there're no documentation yet... 15:20
:)
perlpilot SmokeMachine: Why "sub MAIN(:$fuzz!)" ? It looks like you were going to do a multi for fuzz and no fuzz, but didn't actually do it.
SmokeMachine perlpilot: you are right!! changing to multi MAIN(... 15:21
sena_kun SmokeMachine, does it use narrowing(?) to find a good edge-case examples or just use simple random values of some type? Ah, probably nevermind me, I'll look into the source. 15:22
perlpilot SmokeMachine: btw, Test::Fuzz is a neat idea.
sena_kun: heh, I was just doing that for the same reason :)
sena_kun Yes, definetely. Any QuickCheck analog is awesome. SmokeMachine++ 15:23
SmokeMachine sena_kun: the generators are hardcoded... so I put some usual edge cases and then a lot of random... for example: for int I use 0, 1, -1, 999999, -9999999, ... 15:24
perlpilot SmokeMachine: you might mention this in your article along with other ideas for generators that your readers could try. (Having pluggable generators would be nice too) 15:25
SmokeMachine perlpilot: thank you (sorry, I'm still searching the meaning of neat...)
perlpilot: that's on my wishlist! 15:26
perlpilot SmokeMachine: I meant "neat" as in "novel, interesting, useful, excellent, I like it, etc." :-)
SmokeMachine perlpilot: thank you!!! (I am sorry for my terrible english!) 15:27
perlpilot My personal philosophy about advent articles (or any programmer-centric article) is that they should provide some information and then encourage audience participation (fiddling with the code, contributing to the project, ... whatever gets them using Perl 6). 15:28
SmokeMachine perlpilot: on the first version of Test::Fuzz it has pluggable generators... (it had a function fuzz-generator() hat receives a generator name and a Positional of values...) but I splitter it in some classes and I loose this feature... but we'll have it back in a future version... 15:31
perlpilot: I hope to be doing something like that with this post... (it's the intention...) 15:32
sena_kun: did you find the generators on the code? 15:33
sena_kun SmokeMachine, yes, but it isn't the thing I thought about. As this winter goes by, I can try to help. I'm not sure I'm smart enough, but still. 15:37
tbrowder nine: i just tried to install Inline::Perl5 with zef but it failed. i do have libperl-dev installed with Deb 8. Do I have to go through the build process in the README (i assume so)? 15:39
perlpilot SmokeMachine: I noticed that you have a file that lists all (maybe?) of the built-in classes .. were you planning on eventually providing generators for all of them? 15:40
SmokeMachine perlpilot: Not yet... but I use that to get all possible type objects... 15:41
perlpilot: the generator grep all type object that smartmatches with the type of the argument (unless it has a :D) 15:42
it use that file to get the types and all type objects on ::.values too... 15:43
SmokeMachine perlpilot: makes sense? 15:46
sena_kun: I'd love you help! :) 15:47
gfldex SmokeMachine: You can get all buildin types from the docs 15:49
SmokeMachine: see github.com/perl6/doc/blob/master/u...methods.p6 15:50
SmokeMachine gfldex: do you mean progamaticaly? 15:51
SmokeMachine taking a look 15:51
gfldex yes
tbrowder .tell nine Inline::Perl5 is failing "make test" when building on Deb 8 according to README. perl6 -v => 16:02
yoleaux tbrowder: I'll pass your message to nine.
tbrowder www.irccloud.com/pastebin/7MQ8wKBN/ 16:03
tbrowder .tell nine see www.irccloud.com/pastebin/7MQ8wKBN/ 16:04
yoleaux tbrowder: I'll pass your message to nine.
nine tbrowder: libperl-dev sounds ok. Should install. But without details about those test failures I can't help you. 16:12
yoleaux 16:02Z <tbrowder> nine: Inline::Perl5 is failing "make test" when building on Deb 8 according to README. perl6 -v =>
16:04Z <tbrowder> nine: see www.irccloud.com/pastebin/7MQ8wKBN/
SmokeMachine gfldex: do you mean search every doc to get every class? 16:13
tbrowder nine: details are filed as an issue for the module
nine tbrowder: ah, that's a MoarVM regression that's been fixed some time last week 16:14
SmokeMachine gfldex: it wouldn't include every installed module? 16:14
tbrowder sorry, thanks. i'll upgrade and try again 16:15
gfldex SmokeMachine: installed modules are not included
SmokeMachine So I'll try that!!!
gfldex SmokeMachine: types, defined in line 64 will hold a LoL of a Str of a type name and a IO that the type name comes from. You don't need the latter. Line 73 does turns the type name into a type object 16:18
tbrowder nine: just checking...looks like a manual install unless one is using rakudobrew, yes?
SmokeMachine gfldex: what I didn't get is: how do I get the path to doc/Type? 16:19
gfldex SmokeMachine: line 49 contains the default. You need to git clone the docs and point to the right path. 16:20
SmokeMachine gfldex: that I cannot do progamatically... :( 16:21
gfldex: I was thinking on getting it at run time... 16:22
gfldex SmokeMachine: i'm pretty sure you can but if it's sensible is a different question
I can't see a way to get it at runtime because Rakudo sports quite a few types that are not part of Perl 6 16:23
SmokeMachine gfldex: at run time I have to get all the types to use on my generators...
gfldex all the types of what?
SmokeMachine gfldex: perl6 types...
gfldex: builtin types 16:24
gfldex Perl 6 builtin types are defined by roast. Sadly roast contains quite a few regression tests, so the docs (that have to follow roast closely) is your best bet 16:25
SmokeMachine gfldex: thanks 16:37
tbrowder nine: getting same errors (+1 => 1/5 Attempt to free nonexistent shared string '(eval 12)', Perl interpreter: 0x3464aa0 during global destruction.); perl6 -v => Rakudo version 2016.11-237-g8eef234 built on MoarVM version 2016.11-41-gd2139b5 16:57
jferrero m: $_ = "*\n"; m/^^(\s*)(\*+)$$/; say "\$0:[$0] \$1:[$1]"; s:g/(\s*)(\*+)/ $0$1/; say "\$0:[$0] \$1:[$1]"; 17:09
camelia rakudo-moar 8eef23: OUTPUT«$0:[] $1:[*]␤Use of Nil in string context␤ in block <unit> at <tmp> line 1␤$0:[*] $1:[]␤»
jferrero m: $_ = "*\n"; s:g/(\s*)(\*+)/ $0$1/; say "\$0:[$0] \$1:[$1]"; 17:11
camelia rakudo-moar a78d33: OUTPUT«Use of Nil in string context␤ in block <unit> at <tmp> line 1␤$0:[*] $1:[]␤»
jferrero m: $_ = "*\n"; m/(\s*)(\*+)/; say "\$0:[$0] \$1:[$1]"; 17:12
camelia rakudo-moar a78d33: OUTPUT«$0:[] $1:[*]␤»
jferrero Capturing parens are working differently, for substitution op? 17:15
CIAvash[m] m: $_ = "\n"; s/(\s)(*+)/ $0$1/; say "\$0:[$0] \$1:[$1]";
camelia rakudo-moar a78d33: OUTPUT«5===SORRY!5===␤Unrecognized regex metacharacter (must be quoted to match literally)␤at <tmp>:1␤------> 3$_ = "\n"; s/(\s7⏏5)(*+)/ $0$1/; say "\$0:[$0] \$1:[$1]";␤Quantifier quantifies nothing␤at <tmp>:1␤------> 3$_ = "\n"; s/(\s…»
jferrero m: $_ = "H\n"; m/(\s*)(H+)/; say "\$0:[$0] \$1:[$1]"; 17:16
camelia rakudo-moar a78d33: OUTPUT«$0:[] $1:[H]␤»
jferrero m: $_ = "H\n"; s:g/(\s*)(H+)/ $0$1/; say "\$0:[$0] \$1:[$1]"; 17:17
camelia rakudo-moar a78d33: OUTPUT«Use of Nil in string context␤ in block <unit> at <tmp> line 1␤$0:[H] $1:[]␤»
jferrero Substitution is not capturing $0 17:17
TimToady m: $_ = "H\n"; s/(\s*)(H+)/ $0$1/; say "\$0:[$0] \$1:[$1]"; 17:20
camelia rakudo-moar a78d33: OUTPUT«$0:[] $1:[H]␤»
TimToady what would $0 mean outside of a :g anyway? 17:21
perigrin naught 17:22
perigrin couldn't resist. 17:22
TimToady Sweets for the sweet, naughts for the naughty... 17:23
perigrin naught bad?
TimToady I donut know. 17:24
perigrin wonders if $0 in TCL is ... nautical.
TimToady
.oO(ship happens)
17:25
perigrin pun was so bad it knocked dakkar offline, I should stop before I clear the channel
[Coke] TCL... there's a name I haven't heard in a while. 17:31
perigrin I'd say something about a more elegant weapon for a more civilized age ... but I'm not sure it applies here. 17:32
[Coke] grins
(and peri grins, also) 17:33
nine tbrowder: your MoarVM is still too old. You'd need to pull directly in MoarVM
lucasb m: $_ = "abacad"; s:g/(a)(.)/ax/; .say; say ($0, $1, $2)>>.Str 17:52
camelia rakudo-moar a78d33: OUTPUT«axaxax␤(ab ac ad)␤»
lucasb so, after an s:g///, $0,$1,$2,etc. are the successive matches? 17:53
TimToady m: $_ = "H\n"; s:g/(\s*)(H+)/ $0$1/; say $/.WHAT 17:54
camelia rakudo-moar a78d33: OUTPUT«(List)␤»
TimToady m: $_ = "H\n"; s:g/(\s*)(H+)/ $0$1/; say $/[0][1] 17:55
camelia rakudo-moar a78d33: OUTPUT«「H」␤»
TimToady m: $_ = "H\n"; s:g/(\s*)(H+)/ $0$1/; say $0[1]
camelia rakudo-moar a78d33: OUTPUT«「H」␤»
[Coke] "parsing is such sweet sorry" (EROODE) 17:56
TimToady m: $_ = "H\nI\n"; s:g/(\s*)(\w+)/ $0$1/; say $1[1]
camelia rakudo-moar a78d33: OUTPUT«「I」␤»
AlexDaniel m: $_ = "abacad"; say S:g/(a)(.)/ax/; dd $/ 17:59
camelia rakudo-moar a78d33: OUTPUT«axaxax␤Str $/ = "axaxax"␤»
AlexDaniel wyh? 18:05
why?*
[Coke] which why? 18:06
nine tbrowder: Coke++ just pushed nqp and moar version bumps so upgrading rakudo should now suffice 18:08
loveperl How to create a global variable within a method? 18:09
AlexDaniel [Coke]: why with S there is no list of matches in $/ 18:11
tbrowder also i forgot to configure again after the first pull...duh
lizmat loveperl: why would you want to do that ? 18:18
dalek c: eb191b5 | (Zoffix Znet)++ | doc/Language/operators.pod6:
andthen returns Empty, not first undefined arg

By design, to make it flatten into lists
18:19
synopsebot6 Link: doc.perl6.org/language/operators
lizmat in Perl 5 it's generally a bad idea, in Perl 6 even more so
loveperl: if you want to check a possible "global" value, you should probably check for a dynamic variable
dalek c: 9700140 | (Zoffix Znet)++ | doc/Language/operators.pod6:
andthen execs any RHS Callable, not just block
18:20
synopsebot6 Link: doc.perl6.org/language/operators
lizmat loveperl: docs.perl6.org/language/variables#The_*_Twigil
samcv good morning perl 6 18:23
dalek c: 75c3729 | (Zoffix Znet)++ | doc/Language/operators.pod6:
orelse is not same but only similar to //

The diff is it'll exec RHS Callables and binds LHS to $_
synopsebot6 Link: doc.perl6.org/language/operators
andrzejku_ hi :) 18:26
lucasb IIUC, &(...) doesn't do much, except trick some constructs that expects an literal '&'. 18:30
should it stay like that, should it create a callable that returns the arguments, should it just type check the arguments are callables and die otherwise?
TimToady: ^^ any comments?
lucasb m: say &(1,2,3).perl # see? it doesn't do anything 18:34
camelia rakudo-moar be2ed0: OUTPUT«$(1, 2, 3)␤»
lucasb P6 can't waste a punctuation character like that! Assign some semantics to it :) 18:35
travis-ci Doc build passed. Zoffix Znet 'andthen returns Empty, not first undefined arg 18:39
travis-ci.org/perl6/doc/builds/184006073 github.com/perl6/doc/compare/d5c77...191b533d55
travis-ci Doc build passed. Zoffix Znet 'andthen execs any RHS Callable, not just block' 18:41
travis-ci.org/perl6/doc/builds/184006466 github.com/perl6/doc/compare/eb191...0014097b04
pmurias m: class Foo {method defined() {1}};with Foo {say "hi"} 18:41
camelia rakudo-moar be2ed0: OUTPUT«hi␤»
pmurias j: class Foo {method defined() {1}};with Foo {say "hi"}
camelia ( no output )
pmurias ^^ rakudo-jvm bug
dalek line-Perl5: f91ab9a | niner++ | / (4 files):
Rename v6::inline to v6-inline for compatibility with Perl < 5.18
18:42
line-Perl5: 3bdbd4e | niner++ | t/p6_object_destructor.t:
Make t/p6_object_destructor.t more stable

  lizmat++ for noticing the missing force_gc
tbrowder nine: all works fine now--i closed issue 81 18:43
travis-ci Doc build passed. Zoffix Znet 'orelse is not same but only similar to // 18:44
travis-ci.org/perl6/doc/builds/184007361 github.com/perl6/doc/compare/97001...c3729e6217
loveperl what is the error?This class already has a method named new 18:45
dalek c: e5adaa1 | samcv++ | template/search_template.js:
disable levenshtein search for now due to speed concerns
18:47
loveperl what is the error?This class already has a method named new 18:55
lizmat loveperl: what are you referring to ? 18:56
loveperl TO THIS fpaste.scsys.co.uk/540223?tx=on&...rmat+it%21 18:59
lizmat no need to shout :-) 19:00
AlexDaniel NO NEED TO SHOUT!!!
:)
lizmat are these supposed to live in a single file? or in 3 files? 19:01
loveperl sorry :D
3 files
gfldex loveperl: you may find gist-paste helpful, see: packages.debian.org/jessie/gist
loveperl om 19:02
ok
What I want to do is a builder? 19:04
perlpilot loveperl: we don't know what you want to do :) 19:06
lizmat perlpilot: the code is pretty straightforward 19:07
lizmat fwiw, I've confirmed the problem 19:07
lizmat loveperl: if you add a space between common and { in "class form is common{" 19:16
it seems to work
m: class A {}; class B is A{ } # underlying issue that got hidden 19:17
camelia rakudo-moar 3df431: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Cannot resolve caller trait_mod:<is>(B, A, Hash); none of these signatures match:␤ (Mu:U $child, Mu:U $parent)␤ (Mu:U $child, :$DEPRECATED!)␤ (Mu:U $type, :$rw!)␤ (Mu:U $type, :$nativesiz…»
lizmat m: class A {}; class B is A { }
camelia ( no output )
lizmat ^^ works
loveperl tank you 19:19
moritz
.oO( in sovjet russia, lizmat tanks *you* )
19:23
lizmat :-)
perlpilot Unless you're accessing a hash, be suspicious of any '{' that isn't immediately preceded by whitespace. Seems like a good rule to code Perl 6 by. :)
moritz also add space around infix operators 19:25
loveperl How to send an array as a parameter? 19:43
lizmat m: sub a(@a) { dd @a }; a( 1,2,3 ) 19:44
camelia rakudo-moar 3df431: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Calling a(Int, Int, Int) will never work with declared signature (@a)␤at <tmp>:1␤------> 3sub a(@a) { dd @a }; 7⏏5a( 1,2,3 )␤»
lizmat m: sub a(@a) { dd @a }; a( [1,2,3] )
camelia rakudo-moar 3df431: OUTPUT«[1, 2, 3]␤»
lizmat m: sub a(@a) { dd @a }; my @array = ^10; a @array
camelia rakudo-moar 3df431: OUTPUT«Array @array = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]␤»
lizmat afk&
loveperl tank you 19:50
How do I know if I have an array? 19:51
if @arr.WHAT == Array { say "soy un array"; #return($arr); } 19:54
geekosaur m: my @a; say so @a ~~ Array 19:55
camelia rakudo-moar 3df431: OUTPUT«True␤»
masak loveperl: when the variable is called `@arr`, it tends to be an Array :P 19:57
masak .oO( this has been "Sarcastic Tips For Programmers", by masak ) 19:58
geekosaur actually there is a serious question there. arguably for most purposes you don't care about Array, you care about Positional, and the @ tells you that 19:59
masak loveperl: what I meant to say was `@arr.WHAT == Array` works, but `@arr ~~ Array` rolls better off the tongue and is inheritance-safe 20:00
geekosaur what problem are you trying to solve?
RabidGravy boo!
loveperl tank you
yes
masak loveperl: what geekosaur said. that's why `@arr ~~ Positional` is (AFAIK) redundant
RabidGravy well you can make it something else but you'd have to try hard at it 20:03
m: my @a is Hash; say @a ~~ Positional 20:04
camelia rakudo-moar 3df431: OUTPUT«False␤»
moritz IMHO that should be an error
geekosaur inclined to agree
masak m: my @a is Hash; @a<foo> = "bar"; say @a.perl
camelia rakudo-moar 3df431: OUTPUT«{:foo("bar")}␤»
masak I think I agree, but... why should it be an error? 20:05
geekosaur because @ tells the programmer to expect a Positiona;l
moritz right, @ implies Positional 20:06
masak should `my @a is Set;` also be an error?
geekosaur if that isn't supposed to be meaningful, there comes a question of whether sigils other than $ should even exist
moritz masak: yes
geekosaur sets aren't positional. I'd expect % sigil 20:07
moritz masak: anything that violates the type constraint of the sigil
if we uphold that rule, you can be sure that you can pass an @ to a signature that uses an @
masak hokay -- makes sense
geekosaur actually worse than that: if I just look at the @, I may interpret your `my @a is Set` as meaning an array of sets 20:08
geekosaur because perl, and a Set is not positional but the @ says Positional 20:08
loveperl foreach in perl? 20:10
RabidGravy for
masak `foreach` in Perl 5 actually makes a lot of sense, since the "singular" variable (uncommonly) precedes the "plural" one in the syntax 20:11
in Perl 6, it would read very weirdly: `foreach @students -> $student {}` 20:12
[Coke] samcv: did you pull the trigger on backing out the fuzzy search? 20:19
samcv yeah :\
it was making search unusable for me
really impacted my productivity looking things up. 20:20
imo it should look up how it does now/used to, and then have a button to click to search more or fuzzily
it just kills my cpu.. even for 4 or 5 letter words sometimes
also while the cpu was computing the box would often lose focus and just make me have to do it all over again 20:22
[Coke] samcv: yup, no, that's fine; I had set it up in a branch because I only did minimal testing on it. 20:23
samcv kk. i think it was already to test it out tbh 20:24
alright*
RabidGravy Hmm I can't find the trait_mod:<is> (Variable:D, Mu $thing) that does that 20:25
dalek c/coke/levenshtein: 733a3bd | coke++ | template/search_template.js:
re-enable fuzzy search
20:27
[Coke] (on branch only!)
dalek c: 2447134 | coke++ | doc/Language/operators.pod6:
fix typo
20:34
synopsebot6 Link: doc.perl6.org/language/operators
travis-ci Doc build passed. Will "Coke" Coleda 're-enable fuzzy search' 20:45
travis-ci.org/perl6/doc/builds/184043927 github.com/perl6/doc/commit/733a3bdf03ad
loveperl How to put a hash inside another hash? 20:51
nicq20_ loveperl: Depending on how complex you want, just assign a hash to one of the keys. %h<hello> = { friend => 1 } 20:53
loveperl: Oops, nm. Was thinking of Perl5. :/ 20:54
AlexDaniel it should dwim, yea
m: my %h = a => { x => 42, y => 90 }; say %h<a>
camelia rakudo-moar 3df431: OUTPUT«{x => 42, y => 90}␤»
jnthn That works just fine in Perl 6 :)
AlexDaniel m: my %h = a => { x => 42, y => 90 }; say %h<a><x>
camelia rakudo-moar 3df431: OUTPUT«42␤»
jnthn m: my %h = to => { ke => 42 }; say %h<to><ke> 20:55
camelia rakudo-moar 3df431: OUTPUT«42␤»
jnthn ah, AlexDaniel beat me to it :)
loveperl <AlexDaniel> Thank you, I have it!
tank you 20:58
nicq20_ Oh, yep. Found my error.
The example I gave does work.
jferrero m: $_ = "H\n"; s:g/(\s*)(H+)/ $0$1/; say "\$1:[$1] \$2:[$2]"; 21:00
camelia rakudo-moar 3df431: OUTPUT«Use of Nil in string context␤ in block <unit> at <tmp> line 1␤Use of Nil in string context␤ in block <unit> at <tmp> line 1␤$1:[] $2:[]␤»
jferrero m: $_ = "H\n"; s/(\s*)(H+)/ $0$1/; say "\$1:[$1] \$2:[$2]"; 21:01
camelia rakudo-moar 3df431: OUTPUT«Use of Nil in string context␤ in block <unit> at <tmp> line 1␤$1:[H] $2:[]␤»
jferrero m: $_ = "H\n"; s:g/(\s*)(H+)/ $1$2/; say "\$1:[$1] \$2:[$2]";
camelia rakudo-moar 3df431: OUTPUT«Use of Nil in string context␤ in code at <tmp> line 1␤Use of Nil in string context␤ in block <unit> at <tmp> line 1␤Use of Nil in string context␤ in block <unit> at <tmp> line 1␤$1:[] $2:[]␤»
jferrero m: $_ = "H\n"; s/(\s*)(H+)/ $1$2/; say "\$1:[$1] \$2:[$2]"; 21:02
camelia rakudo-moar 3df431: OUTPUT«Use of Nil in string context␤ in code at <tmp> line 1␤Use of Nil in string context␤ in block <unit> at <tmp> line 1␤$1:[H] $2:[]␤»
shadowpaste "loveperl" at 217.168.150.38 pasted "hashes" (34 lines) at fpaste.scsys.co.uk/540224
loveperl Is this okay? fpaste.scsys.co.uk/540224?tx=on&...rmat+it%21 21:04
nicq20_ loveperl: Looks ok to me, and it seems to work ok on my machine. 21:10
loveperl nicq20: te sale esto: WARNINGS for /var/www/html/hola/generatehtml/call.pl: Useless use of "especialidad_id=>{type=>'number'}\n " in sink context (line 33) 21:12
nicq20_ loveperl: Yeah, I've run it a few times without any errors. Is it possible what you are trying to run is different than what was pasted? 21:17
nicq20_ What is used to view '.pod6' files? 21:35
moritz perl6 --doc thefile 21:38
nicq20_ moritz: Thank you! 21:39
n0tjack m: sub foo($) returns Array[Numeric] { my Array[Numeric] @a = [1,2,3]; return @a;} foo(7); 22:01
camelia rakudo-moar 7345e0: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Strange text after block (missing semicolon or comma?)␤at <tmp>:1␤------> 3Array[Numeric] @a = [1,2,3]; return @a;}7⏏5 foo(7);␤ expecting any of:␤ infix␤ infix stopper␤ …»
n0tjack I'm picking p6 up again after a year or so, and now I forget how type declarations work
Can someone show me what I really meant to say above, by declaring a function to return an array of numbers (of any type), and then doing so?
jnthn You missed the ; right where it says so :) 22:03
n0tjack m: sub foo($) returns Array[Numeric] { my Array[Numeric] @a = [1,2,3]; return @a;}; foo(7);
camelia rakudo-moar 7345e0: OUTPUT«Type check failed in assignment to @a; expected Array[Numeric] but got Int (1)␤ in sub foo at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
n0tjack sorry, wrong error message
geekosaur your declaration is for a Positional (which will default to Array) whose contents are Array[Numeric]
jnthn ah, shoulda spotted that :) 22:04
Just need my Numeric @a = 1,2,3
n0tjack geekosaur: can you unpack that for me? or rather show me what I mean to say?
jnthn The [...] should be fine too but not required
geekosaur m: my Num @a; @a[0] = 5.Num;
camelia ( no output )
geekosaur the Array is implied by the @
so what you asked for was an array of arrays of Numeric, not just array of Numeric 22:05
n0tjack Is the sub foo() returns Array[Numeric] the right syntax? 22:06
geekosaur should be, yes
n0tjack Wait, how do I make sure I must return an array, and cannot return a scalar?
geekosaur ok, so now you believe what I said about my applies to the sub also? 22:07
n0tjack m: sub foo($) returns Array[Numeric] { my Numeric @a = 1,2,3; return @a;} foo(7);
camelia rakudo-moar 7345e0: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Strange text after block (missing semicolon or comma?)␤at <tmp>:1␤------> 3ic] { my Numeric @a = 1,2,3; return @a;}7⏏5 foo(7);␤ expecting any of:␤ infix␤ infix stopper␤ …»
geekosaur (note, this is an inconsistency I'm actually not very fond of)
n0tjack m: sub foo($) returns Array[Numeric] { my Numeric @a = 1,2,3; return @a;}; foo(7);
camelia ( no output )
n0tjack m: sub foo($) returns Array[Numeric] { my Numeric @a = 1,2,3; return @a;}; say foo(7);
camelia rakudo-moar 7345e0: OUTPUT«[1 2 3]␤»
n0tjack m: sub foo($) returns Array[Numeric] { my Numeric $a = 1; return $a;}; say foo(7);
camelia rakudo-moar 7345e0: OUTPUT«Type check failed for return value; expected Array[Numeric] but got Int (1)␤ in sub foo at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
n0tjack ok, nice 22:08
thank you
n0tjack I have to say, a nice surprise was the code I wrote a year ago is still readable. Which I can't say about most programs I write in most languages. 22:10
maxp_ when I run a script with option --target=mbc (perl6 --target=mbc -- reg.p6) I've this error: 22:21
===SORRY!=== Cannot dump this object; no dump method
maxp_ could you explain me what is this? 22:21
jnthn mbc = moarvm bytecode, which is a binary format, so it won't just spew that out onto your console; adding --output=reg.moarvm will get it spit something out 22:23
maxp_ oh ok thank you very much. 22:24
jnthn (Note that these exist primarily for debugging/development purposes rather than being user-facing; module precompilation is managed automatically these days)
SmokeMachine m: my Int @a = <1 2 3 4 5>; say @a
camelia rakudo-moar 7345e0: OUTPUT«[1 2 3 4 5]␤»
SmokeMachine m: my Int() @a = <1 2 3 4 5>; say @a
camelia rakudo-moar 7345e0: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Coercion Int(Any) is insufficiently type-like to qualify a variable␤at <tmp>:1␤------> 3my Int() @a7⏏5 = <1 2 3 4 5>; say @a␤ expecting any of:␤ constraint␤»
SmokeMachine Why that's wrong? 22:25
n0tjack SmokeMachine: The <> are quote-y. The produce Cools. Not Ints.
jnthn SmokeMachine: So far coercion types are only support on parameters. I expect future versions of Perl 6 will support them in more places.
*supported
SmokeMachine n0tjack: yen, but Im trying to coerce it.. 22:26
jnthn: hum... thanks
m: sub f(Int() @a) {say @a}; f <1 2 3 4 5>
camelia rakudo-moar 7345e0: OUTPUT«Type check failed in binding to @a; expected Positional[Any] but got List ($(IntStr.new(1, "1"),...)␤ in sub f at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
SmokeMachine and now? 22:27
jnthn Heh, and only then on Scalars, I think. The syntax was introduced fairly late on, as a generalization of the earlier "Foo $a as Bar" syntax.
So that it could be scaled to other places later
SmokeMachine jnthn: ok! thanks! 22:28
nicq20_ SmokeMachine: In you example, when you use `<1 2 3>`, it makes IntStr objects, not just Int objects. That is usually what throws me off. 22:29
jnthn (And while the syntax was generalized, there just wasn't time yet to generalize it in the implementation. :))
SmokeMachine nicq20_: thats why I was trying to coerce it (Int())
jnthn Rest time for me; 'night 22:30
SmokeMachine m: my $a = IntStr.new(42, "the answer"); say ~$a; say +$a 22:31
camelia rakudo-moar 7345e0: OUTPUT«the answer␤42␤»
SmokeMachine that's cool (no, thats not Cool... thats IntStr) (sorry the joke)... but can be dangerous, can't it? 22:32
m: my $a = 42 but "the answer"; say ~$a; say +$a 22:33
camelia rakudo-moar 7345e0: OUTPUT«the answer␤the answer␤»
SmokeMachine i diânt get it... 22:34
*didn't
m: my $a = 42 does "the answer"; say ~$a; say +$a 22:35
camelia rakudo-moar 7345e0: OUTPUT«Cannot mix in non-composable type Str into object of type Int␤ in block <unit> at <tmp> line 1␤␤»
spebern m: grammar g { token TOP { <item> }; token item { \w+ }; }.parse('hi'); 22:37
camelia rakudo-moar 7345e0: OUTPUT«Too many positionals passed; expected 1 argument but got 2␤ in any !reduce at /home/camelia/rakudo-m-inst-1/share/nqp/lib/QRegex.moarvm line 1␤ in any !cursor_pass at /home/camelia/rakudo-m-inst-1/share/nqp/lib/QRegex.moarvm line 1␤ in regex item …»
SmokeMachine m: my $a = 42 but False; say ?$a; say +$a
camelia rakudo-moar 7345e0: OUTPUT«False␤42␤»
spebern would it make sense to give better error messages for tokens that collide with other keywords?
SmokeMachine m: my $a = 42.Int but "the answer"; say ~$a; say +$a
camelia rakudo-moar 7345e0: OUTPUT«the answer␤the answer␤»
SmokeMachine m: my $a = "the answer" but 42; say ~$a; say +$a 22:38
camelia rakudo-moar 7345e0: OUTPUT«the answer␤Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5the answer' (indicated by ⏏)␤ in block <unit> at <tmp> line 1␤␤Actually thrown at:␤ in block <unit> at <tmp> line 1␤␤»
SmokeMachine m: my $a = "the answer" but 42; say ~$a; say $a.Int 22:39
camelia rakudo-moar 7345e0: OUTPUT«the answer␤42␤»
SmokeMachine m: my $a = 42 but "the answer"; say $a.Str; say $a.Int 22:40
camelia rakudo-moar 7345e0: OUTPUT«the answer␤the answer␤»
SmokeMachine I can't get it...
SmokeMachine m: my $a = 42 but "the answer"; say $a.perl 22:41
camelia rakudo-moar 7345e0: OUTPUT«the answer␤»
SmokeMachine m: my $a = 42 but role {method Str(-->"the answer"){}}; say $a.perl 22:42
camelia rakudo-moar 7345e0: OUTPUT«the answer␤»
SmokeMachine m: my $a = 42 but role {method Str(-->"the answer"){}}; say $a.Int; say $a.Str 22:43
camelia rakudo-moar 7345e0: OUTPUT«the answer␤the answer␤»
SmokeMachine in method Str(--> "the answer"){} couldn't the {} be optional?
m: my $a = 42 but role {method Str(-->"the answer")}; say $a.Int; say $a.Str 22:44
camelia rakudo-moar 7345e0: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Missing block␤at <tmp>:1␤------> 0342 but role {method Str(-->"the answer")7⏏5}; say $a.Int; say $a.Str␤»
SmokeMachine m: my $a = role {method Int(--> 42){}}.new but role {method Str(-->"the answer")}; say $a.Int; say $a.Str 22:45
camelia rakudo-moar 7345e0: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Missing block␤at <tmp>:1␤------> 3ew but role {method Str(-->"the answer")7⏏5}; say $a.Int; say $a.Str␤»
SmokeMachine m: my $a = role {method Int(--> 42){}}.new but role {method Str(-->"the answer"){}}; say $a.Int; say $a.Str
camelia rakudo-moar 7345e0: OUTPUT«42␤the answer␤»
MasterDuke spebern: there's been some talk about that recently, but i don't believe a consensus has been reached yet, since you are allowed to redefine some built-ins 22:46
SmokeMachine m: my $a = 42 but role {method Str(-->"the answer")}; say $a.int; say $a.Str
camelia rakudo-moar 7345e0: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Missing block␤at <tmp>:1␤------> 0342 but role {method Str(-->"the answer")7⏏5}; say $a.int; say $a.Str␤»
SmokeMachine m: my $a = 42 but role {method Str(-->"the answer"){}}; say $a.int; say $a.Str
camelia rakudo-moar 7345e0: OUTPUT«No such method 'int' for invocant of type 'Int+{<anon|80069360>}'␤ in block <unit> at <tmp> line 1␤␤»
chuski1212 hello 23:31
chuski1212 hello 23:32