»ö« 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.
00:08 cdg joined 00:09 pecastro joined 00:12 cdg left 00:16 geekosaur left 00:17 geekosaur joined 00:29 itaipu joined 00:30 sacomo joined
andreoss m: use MONKEY-TYPING; augment class Cool {method even { self %% 2 }}; 10.even.say 00:46
camelia No such method 'even' for invocant of type 'Int'. Did you mean 'even'?
in block <unit> at <tmp> line 1
andreoss m: use MONKEY-TYPING; augment class Cool {method even { self %% 2 }}; augment class Int {} ; 10.even.say 00:47
camelia True
00:48 llfourn left
Zoffix m: use MONKEY-TYPING; augment class Cool {method even { self %% 2 }}; Int.^compose; 10.even.say 00:50
camelia True
Zoffix You need to recompose the classes before they'd see your augment of their base class
00:54 wamba left
andreoss m: use MONKEY-TYPING; augment class Cool {method even { self %% 2 }}; Numeric.^compose ; 10.even.say 00:55
camelia No such method 'compose' for invocant of type 'Perl6::Metamodel::ParametricRoleGroupHOW'
in block <unit> at <tmp> line 1
andreoss i see
01:03 _28_ria joined
andreoss is there a better way to alias method to several names? 01:04
other than FALLBACK
Zoffix The only one I know of is .^add_method
in a loop
m: class Foo { method x { say "meow" }; for <a b c> { ::?CLASS.^add_method: $_, ::?CLASS.^find_method("x") } }; with Foo.new { .x; .a; .b; .c; } 01:06
camelia meow
meow
meow
meow
Zoffix (I forget if that `for` needs to be in a BEGIN block
)
It's probably possible to make a trait that adds aliases and I think Rakudo used to have that, implemented by lizmat++. Perhaps she would know more how to do it. 01:09
01:20 perigrin left 01:26 dogbert2 left 01:28 geekosaur left 01:31 devmikey left 01:35 piojo joined 01:39 cdg joined, geekosaur joined 01:43 cdg left 01:46 ilbot3 left 01:51 ilbot3 joined, ChanServ sets mode: +v ilbot3 01:52 piojo left 02:05 snarkyboojum joined 02:27 noganex_ joined 02:29 perigrin joined 02:30 noganex left 02:40 eliasr left 02:56 MasterDuke joined
MasterDuke andreoss, Zoffix: it was the 'aka' trait, but i think asked her about it a while ago and she didn't have any interest anymore 02:59
Zoffix Ah.
MasterDuke some more info here: irclog.perlgeek.de/perl6/2017-03-06#i_14215119 03:00
Zoffix huggable: alias
huggable Zoffix, nothing found
Zoffix huggable: alias :is: Alias methods (with `aka` trait): irclog.perlgeek.de/perl6/2017-08-31#i_15093699
huggable Zoffix, Added alias as Alias methods (with `aka` trait): irclog.perlgeek.de/perl6/2017-08-31#i_15093699
SmokeMachine m: my $a = {bla => 42}; $a .= <bla>; say $a # should it print 42? 03:03
camelia No such method '&postcircumfix:<{ }>' for invocant of type 'Hash'
in block <unit> at <tmp> line 1
03:08 andreoss left 03:11 dustin joined 03:14 dustin left 03:21 Sgeo__ left 03:22 Sgeo joined 03:25 itaipu left 03:35 Sgeo_ joined 03:37 Sgeo left 03:50 unnecessarymulti joined 03:51 Cabanossi left 03:53 Cabanossi joined 04:09 cdg joined 04:13 cdg left 04:14 xtreak joined 04:20 xtreak left 04:22 xtreak joined 04:24 raschipi left 04:28 Ven`` joined 04:33 xtreak_ joined 04:36 xtreak left 04:44 aborazmeh joined, aborazmeh left, aborazmeh joined 04:47 pilne left 04:48 xtreak_ left 04:49 Sgeo_ left 05:01 aborazmeh left 05:03 llfourn joined, unnecessarymulti left 05:09 Sgeo joined 05:16 nadim joined
samcv yay. everyone reading for unicode database updating to unicode 10 05:17
05:18 skids left
samcv hangul characters will have names as well (they have to be algorithmically created in our unicode database script) 05:20
05:27 xtreak joined 05:28 u-ou- joined 05:30 khw left 05:32 xtreak left 05:37 Cabanossi left 05:38 Cabanossi joined 06:01 u-ou- left
teatime does one of the perl6 concurrency primitives resemble unix streams 06:05
bufferred, pipeable/chainable, blocking on write when buffer full, blocking on read when empty 06:06
ultimately, I want to be able to define transform-streams that are readable and writable 06:07
that act as filters, like unix commands
06:07 espadrine joined
teatime so like, two duplex streams (as abstract objects) can be composed into one 06:13
there's some underlying CS or practical knowledge I'm missing
rightfold > pipeable .oO(pineapple)
06:14 xtreak joined
teatime also there are probably some examples in the ecosystem already if I could find them 06:17
06:18 xtreak left 06:23 telex left, robertle left 06:24 telex joined 06:26 Exodist left 06:28 ufobat joined 06:31 u-ou- joined 06:34 lowbro joined, lowbro left, lowbro joined 06:42 Cabanossi left, espadrine left
samcv yay unicode 10 bump done. property values are now unique for each property as well 06:43
06:43 Cabanossi joined
teatime samcv++ 06:43
06:43 nadim left
u-ou- :) 06:44
samcv almost done with my grant 06:47
samcv wipes sweat from brow
TEttinger woah, there's a unicode 10 already? 07:00
and samcv already implemented most of it???
samcv uhm the database has been updated at least 07:01
so you can like
m: say "\c[ELF]"
camelia 🧝
teatime gotta have them newest emoji charnames
TEttinger haha clearly the most important feature in a language
samcv and they added some other things probably
TEttinger elf and wizard
samcv the only thing i need to test is new flags
07:02 jonas2 joined
TEttinger is there a flag composition engine yet? 07:02
samcv if how flags worked wasn't insane enough, there are now tags you can add
to the flag
www.unicode.org/reports/tr51/tr51-1...-sequences
TEttinger green female doctor united states flag
teatime in seriousness though, esp. since perl6 provides so many cool unicode things, it's super awesome that it's also quick to pick up new versions/characters
07:03 u-ou- left
teatime new unicodedata, I guess 07:03
samcv m: say "\c[England]"
camelia 🏴󠁧󠁢󠁥󠁮󠁧󠁿
07:03 wamba joined
samcv sweet. yeah cause we have emoji sequences 07:03
TEttinger can we have an elf that is a flag 07:04
samcv m: say "\c[ENGLAND]".uninames.say
camelia (WAVING BLACK FLAG TAG LATIN SMALL LETTER G TAG LATIN SMALL LETTER B TAG LATIN SMALL LETTER E TAG LATIN SMALL LETTER N TAG LATIN SMALL LETTER G CANCEL TAG)
True
samcv m: say "\c[ENGLAND]".uninames.perl.say
camelia ("WAVING BLACK FLAG", "TAG LATIN SMALL LETTER G", "TAG LATIN SMALL LETTER B", "TAG LATIN SMALL LETTER E", "TAG LATIN SMALL LETTER N", "TAG LATIN SMALL LETTER G", "CANCEL TAG").Seq
True
samcv yeah damn insane
m: say "\c[ENGLAND]".chars
camelia 1
samcv m: say "a\c[ENGLAND]a".chars
camelia 3
samcv ok seems to work.
TEttinger spontaneously combusts
samcv m: say "\c[California]" 07:05
camelia 5===SORRY!5=== Error while compiling <tmp>
Unrecognized character name [California]
at <tmp>:1
------> 3say "\c[California7⏏5]"
samcv they list that as an example but it must not be on the emoji sequences list. i think they just listed it as an example
england scotland and wales are the only ones on the emoji-sequences list. though unicode says you can make others and it's fine 07:06
with specs of how to properly format it
you can color elfs by skin tone wow 07:07
07:08 u-ou- joined
TEttinger no drow, sadly. 07:08
wonder when we get cthulhu emoji 07:09
samcv m: 0x1F6F8.uniname
camelia ( no output )
samcv m: 0x1F6F8.uniname.say
camelia FLYING SAUCER
TEttinger I guess lovecraft's works aren't in public domain in all jurisdictions
or are just getting there 07:10
samcv hah
TEttinger I mean, wizard of oz is public domain
early-ish 1800s
maybe mid
samcv m: 0xD4DB.uniname.say
camelia Hangul Syllable PWILH
TEttinger pwilh?
samcv i added all the hangul(korean) characters names 07:11
TEttinger wow
I hope not by hand
samcv we didn't have that before, i had to generate them
07:11 eliasr joined
samcv no, not by hand 07:11
m: 0xD4DB.chr.NFD».uniname.say
camelia (HANGUL CHOSEONG PHIEUPH HANGUL JUNGSEONG WI HANGUL JONGSEONG RIEUL-HIEUH)
samcv ah not that uh
but you can see how they have parts of it 07:12
TEttinger m: say "\c[YI SYLLABLE FAP]"
camelia
samcv there's a file with the Jamo names, and you decompose the codepoint and then you look up the name
josefwigren.com/wp-content/uploads/...hangul.jpg this is a 2x2 grid
07:13 darutoko joined
samcv it doesn't have the optional ending consonant. but hangul is consonat + vowel + (trailing consonant)? 07:13
TEttinger sounds about right. with the sound of the consonant dependent on what came before
rather complex language 07:14
nice script
07:16 rindolf joined
samcv complex? 07:18
ah the language itself. i wouldn't know
TEttinger there's something on wikipedia about how it's one of the languages with the highest class of difficulty for native english speakers to learn 07:21
US state dept. classification for translators I think
samcv the foreign language service you mean
err let me check 07:22
TEttinger I don't know what it was. it might have been a military body that needed to know so soldiers can obey road signs
samcv foreign service institute
yeah it's under the state department
TEttinger (would be pretty bad if an armed soldier couldn't get back to the base)
07:22 lizmat left
samcv yeah it's category V 07:23
with japanese arabic cantonese and mandarin
which says about 4x as many hours to reach a certain level of proficiency compared to dutch french italian norwegian portuguese romanian spanish or swedish or afrikaans 07:24
TEttinger "the tough ones"
07:24 lizmat joined
TEttinger french is definitely harder than spanish 07:24
they're both regular, but french has a lot more rules
and dutch is almost english 07:25
samcv well it's closer to english than german at least
TEttinger yeah. I wonder where german is on the list 07:26
samcv but i'd say there are easier romance languages just because they share more in common
category II
07:26 Cabanossi left
samcv TEttinger, www.effectivelanguagelearning.com/l...difficulty 07:26
07:26 u-ou- left
TEttinger russian is a notoriously hard language to translate literature from 07:26
07:26 dakkar joined
samcv why so? 07:27
TEttinger I think it's mainly due to connotations that words have in Russian and the words being used artistically to have more than one meaning 07:28
(and no English words share the same connotations, so you need more words)
jast same is true for all translations to some extent
07:28 Cabanossi joined
TEttinger there's some classic russian literature, for sure, but it's definitely difficult to read 07:28
jast and I've read my share of terrible translations (not Russian, though, I don't know the language at all) 07:29
samcv that's common in lots of cases though
unless russian just on average has words which don't have similar connotations available in english
TEttinger the extreme case is mat, the russian language of vulgarity, which primarily uses "the big four" obscenities in a dizzying conglomeration of arrangements to mean almost anything imaginable that is vulgar 07:30
samcv i have heard of mat 07:31
TEttinger USSR tried to outlaw it, failed, people continue to try that
samcv it's seen as not classy?
well swearing usually is. but i mean compared to other swear words
TEttinger I don't have the cultural background, but as I understand it, it is the bulk of the swear words 07:32
and compared to English, where new obscenities disseminate all the time, I think those 4 are old standards
teatime has flashbacks to The Brothers Karamazov
07:34 u-ou- joined
u-ou- where should I put my code I want to run when a class gets instantiated and when the instance gets deleted? 07:36
07:40 nattefrost joined 07:41 abraxxa left 07:47 nadim_web joined
nadim_web mornin' all. 07:47
07:48 mr-fooba_ left
samcv u-ou-, well BUILD or TWEAK 07:51
methods
not sure abotu destruction
07:51 u-ou- left, mr-foobar joined 07:53 wander4096 left 07:54 abraxxa joined, leont joined 07:56 u-ou- joined
u-ou- samcv, thanks 07:57
samcv u-ou-, DESTROY
u-ou- ahh
cool
samcv not sure how i destroy an object 07:58
i guess maybe call DESTROY on it
m: my $thing = 'hi'; $thing.DESTROY; say $thing
camelia No such method 'DESTROY' for invocant of type 'Str'
in block <unit> at <tmp> line 1
samcv but that's it 07:59
not sure when that gets called 08:01
u-ou- m: class A { method DESTROY() { say 'hi' } }; {my $a = A.new; } say 'there'
camelia 5===SORRY!5=== Error while compiling <tmp>
Strange text after block (missing semicolon or comma?)
at <tmp>:1
------> 3TROY() { say 'hi' } }; {my $a = A.new; }7⏏5 say 'there'
expecting any of:
infix
infix stopper…
u-ou- m: class A { method DESTROY() { say 'hi' } }; {my $a = A.new; }; say 'there'
camelia there
u-ou- I actually don't need this anymore but now I'm interested
08:03 zakharyas joined
u-ou- (I changed my design) 08:03
lizmat .tell andreoss check Tux's Text::CSV's CHECK block for aliasing methods 08:04
yoleaux lizmat: I'll pass your message to andreoss.
08:09 cdg joined 08:13 cdg left
teatime 'As opposed to a reference counted implementation (like CPython or perl5), fully garbage-collected implementations (like PyPy and Rakudo) cannot guarantee that your DESTROY methods are called soon after the object becomes unreachable. The DESTROY method may not even be called at all if the interpreter shuts down before that particular object gets collected. If you want your destruction timely and 08:18
guaranteed, you’ll have to “do it yourself”.'
also, github.com/perl6/roast/blob/master...truction.t
08:19 dogbert2 joined 08:25 rindolf left, rindolf joined 08:27 Cabanossi left 08:28 Cabanossi joined
Ulti moritz did you see your plot demo painted in Jupyter? 08:32
also moritz++ for the plotting tricks 08:34
lizmat .tell andreoss condensed to an "also" trait: sub trait_mod:<is>(Method:D $m, :$also!) { my $c := $m.package; $c.^add_method($_,$m) for @$also } 08:36
08:36 pmurias joined
yoleaux lizmat: I'll pass your message to andreoss. 08:36
08:37 u-ou- left
lizmat m: sub trait_mod:<is>(Method:D $m, :$also!) { my $c := $m.package; $c.^add_method($_,$m) for @$also }; class A { method a() is also(<b c>) { "foo" } }; dd A.a, A.b, A.c; dd A.d 08:37
camelia "foo"
"foo"
"foo"
No such method 'd' for invocant of type 'A'. Did you mean 'a'?
in block <unit> at <tmp> line 1
lizmat note that the levenshtein logic for missing methods only knows about "a", not sure we want to fix that
08:41 dogbert2 left 08:58 leont left 08:59 Sgeo left, leont joined 09:02 maettu_ joined 09:07 leont left 09:15 Ven`` left 09:16 Ven`` joined 09:17 mr-fooba_ joined 09:19 mr-foobar left 09:22 lizmat left 09:25 Sgeo joined 09:31 margeas joined 09:38 Sgeo_ joined 09:40 Sgeo left 09:43 Cabanossi left 09:47 Cabanoss- joined 09:49 Cabanoss- is now known as Cabanossi 09:53 Cabanossi left 09:55 Cabanossi joined 10:02 snarkyboojum left
moritz Ulti: no; got a link? 10:02
10:08 aindilis joined 10:14 xtreak joined
Ulti mattoates.co.uk/files/perl6/jupyter...t_html.png had to hack it locally to render 10:21
using github.com/bduggan/p6-jupyter-kernel
10:26 ShalokShalom_ joined 10:28 ShalokShalom left
BooK I'm having some trouble running the roast test suite as documented in the README 10:28
10:30 ShalokShalom_ is now known as ShalokShalom 10:31 aindilis left, pmurias left, aindilis joined
BooK paste.scsys.co.uk/565003 # here are all the details 10:33
10:33 pmurias joined
samcv bisectable6, "\c[man in suit levitating: medium skin tone]".say 10:36
bisectable6 samcv, Bisecting by output (old=2015.12 new=64dd94c) because on both starting points the exit code is 1
samcv, bisect log: gist.github.com/9904509a0de1c77ede...2ad245084f
samcv, (2017-01-22) github.com/rakudo/rakudo/commit/58...923d2004e7
10:37 TEttinger left 10:41 sena_kun joined
Zoffix BooK: unfortunately, the effort to make running roast while only having a roast checkout kinda stalled without being completed to the end. Many of the tests expect you to be running roast from a directory that's ../.. from the roast checkout, with the roast checkout located in t/spec/ 10:42
BooK: for example, that's the setup if you clone rakudo and run `make test` the make clones roast repo automatically into t/spec 10:43
BooK: That partilar test file can probably be made to work by using PERL6LIB=packages/ ./fudgeandrun … … to tell it where the Test::Util is at, but I know other files have more assumptions about the roast running from t/spec 10:44
BooK Zoffix: yes, the PERL6LIB=... with a single test file is what I tried 10:46
so there's still a lot of "scratch your own itch" to do :-) 10:47
on an unrelated subject, where can I find some nqp documentation?
seems like digging in src/core requires knowing about nqp :-)
Zoffix BooK: the ops are in github.com/perl6/nqp/blob/master/d...s.markdown the QAST are in github.com/perl6/nqp/blob/master/d...t.markdown and nqp::p6 ops are in github.com/rakudo/rakudo/blob/nom/...s.markdown 10:48
(some ops are unfortunatelly undocumented)
10:48 eliasr left
Zoffix This will checkout and build rakudo and clone the roast repo into a dir where it works. Run t/fudheandrun Some-Test (from rakudo dir) and it'll work for all test files: git clone github.com/rakudo/rakudo/ ; cd rakudo; perl Configure.pl --gen-moar --gen-nqp --backends=moar; make; make test; make install; git clone github.com/perl6/roast t/spec; 10:51
huggable: internals course
huggable Zoffix, Rakudo/NQP Internals Course: github.com/edumentab/rakudo-and-nq...s-workshop
pmurias BooK: for nqp:: ops you might want to also look at the t/nqp test suite in the nqp repo
Zoffix BooK: ^ a slightly outdated internals course that has more info on how the guts fit together
BooK thanks 10:53
11:09 cdg joined 11:11 xinming_ joined 11:12 itaipu joined 11:13 cdg left 11:14 xinming left 11:15 bob777 joined 11:16 bob777 left 11:37 Skarsnik joined 11:43 xtreak left 11:44 wenjie joined, konsolebox left 11:45 wenjie left 11:47 koto joined, xtreak joined, epony left 11:50 sena_kun left 11:52 konsolebox joined 11:54 xtreak left 11:58 koto left 11:59 grumble left, rumble joined, rumble is now known as grumble 12:11 zura joined 12:13 zura left 12:14 AlexDani` joined 12:15 AlexDaniel left 12:18 piojo joined 12:21 raschipi joined 12:25 Cabanossi left 12:26 Cabanossi joined 12:41 sena_kun joined 12:42 AlexDani` is now known as AlexDaniel 12:45 zakharyas left 12:51 jonas2 left 12:52 census joined, ShalokShalom left 12:53 jonas1 joined
census i'm running this program: pastebin.com/7mFtZfpT 12:53
12:53 huggable left, huggable joined, ChanServ sets mode: +v huggable
census I input the data from a .txt file. It seems if the .txt file is too large I get an error 'Malformed UTF-8' i tried looking this up in the logs but i couldn't understand how to fix it. all I realized is if I remove entries from the input .txt file and run the program it was okay 12:54
timotimo we're just now tracking down one cause of this very bug 12:55
12:55 Cabanossi left
sena_kun eater, o/ 12:55
12:55 mcmillhj joined
eater sena_kun o/ 12:56
Zoffix ❤❤❤ New blog post: "On Troll Hugging, Hole Digging, and Improving Open Source Communities": rakudo.party/post/On-Troll-Hugging...ommunities
12:56 Cabanossi joined
census timotimo are you refering to the bug i mentioned? 12:57
timotimo the "malformed utf-8" one, yeah
sena_kun eater, if cro's ipv6-related issue is yours, can you test the fix(latest commit)? Still silly ipv4 on this side.
eater sena_kun: It's running the test now :)
census do you have a guess at how large of a .txt input file i can have so that the program will run okay?
sena_kun \o/
eater sena_kun: fails D:
sena_kun ugh. 12:58
eater, can you paste the full log and pm me with a link?
eater sena_kun: yep! you're gonna love the name of the machine I'm on c: hastebin.com/raw/wavizequho 12:59
sena_kun :D
MasterDuke census: i don't think it's the size of the file that's the problem, but that certains characters are falling on the boundaries of the bytesize that's read at a time 13:00
eater sena_kun: I think you should put the host on `127.0.0.1`
that would fix it
MasterDuke so adding/removing individual lines might hide the problem for you 13:01
census MasterDuke I see. it's basically trial and error at that point
MasterDuke census: yep (but hopefully not for long)
census also i have 1 question about the code if that's okay please 13:03
my code is at:
pastebin.com/7mFtZfpT
13:03 mcmillhj left 13:04 mcmillhj joined
census if the input for a particular row into @terms has a space like in www.ncbi.nlm.nih.gov/pubmed/?term=...states[pl] for Aarskog Syndrome how may I account for that 13:04
when i do this part of the code: sub make-term (:$term, :$year) { '(' ~ $term ~ '[Title/Abstract] AND united states[pl] AND (("' ~ $year ~ '/01/01"[PDat] : "' ~ $year ~ '/12/31"[PDat])))' }
Zoffix census: it should already be accounted by &uri_encode in my @terms = "list.txt".IO.lines.map: &uri_encode; 13:05
census Zoffix yes i thought it would be but it doesn't seem to be
MasterDuke census: you are already "using" URI::Encode, i don't know the name of the routine, but you'd probaby do something like `uri-encode($term)` instead of just `$term` 13:06
Zoffix census: what if you change it to : my @terms = "list.txt".IO.lines.map: *.subst(:g, " ", "+").&uri_encode 13:07
MasterDuke i think it's actually `uri-escape` 13:08
Zoffix buggable: eco URI::Encode 13:09
buggable Zoffix, URI::Encode 'Encode and decode URIs according to RFC 3986': github.com/perl6-community-modules/URI-Encode
Zoffix Docs use uri_encode
moritz Zoffix++ # troll hugging community rambly sort of blog post :-) 13:10
Zoffix \o/
census Zoffix yes i think the way you set it up wil work
or maybe not
i'll let you know in a few
yes Zoffix it works perfectly now that aspect 13:11
Zoffix Sweet
census i really thought that was the purpose of the other uri coding so i had let it go
13:11 Cabanossi left
Skarsnik Should URI handling be in core? 13:12
census Zoffix did you catch my other note? that i'm trying to input many inputs in the input file but that doesn'tjive i get a malformed ut-8 error
MasterDuke oops, i was looking at the docs for URI::Escape (from the URI module)
census do you know if there's any way to guess in advance which ones might be causing that
Zoffix Skarsnik: no, considering it's not an exact science.
census without trial and error
13:13 Cabanossi joined
Skarsnik Zoffix, dunno was there a RFC for URI 13:13
MasterDuke census: i don't think we've figured out the bug to that level of detail yet
Zoffix Skarsnik: but there's also real world use. URI module for example crashes on many real-world URLs
13:14 xinming_ is now known as xinming
Zoffix (that you can get when, say, parsing some web page) 13:14
Skarsnik URL != URI
Zoffix URL is the only thing.
Didn't W3C say URI is ded and just use URL for all the things? 13:15
star: use URI; URI.new("foo.com/foo bar") 13:17
camelia Could not parse URI: foo.com/foo bar
in method parse at /home/camelia/star-2017.07/share/perl6/site/sources/791F2CA877C73A01F6D9BE0FAB586D948EA58B54 (URI) line 46
in method new at /home/camelia/star-2017.07/share/perl6/site/sources/791F2CA877…
Zoffix star: use URI; URI.new("foo.com/?Rakudo=♥")
camelia Could not parse URI: foo.com/?Rakudo=♥
in method parse at /home/camelia/star-2017.07/share/perl6/site/sources/791F2CA877C73A01F6D9BE0FAB586D948EA58B54 (URI) line 46
in method new at /home/camelia/star-2017.07/share/perl6/site/sources/791F2C…
Zoffix It's already included in Star. I don't see benefit to including anything in core.
13:17 skids joined
Skarsnik stae: use URI; URI.new("file://home/skarsnik"); 13:18
star: use URI; URI.new("file://home/skarsnik");
camelia ( no output )
Zoffix leaves for 2 days of relaxation... 13:19
Get some strength for theeeee... SQUASHathoooon \o/ \o/ \o/ blogs.perl.org/users/zoffix_znet/20...athon.html
dzove855 72
Zoffix \o
Skarsnik ^^
13:20 cdg joined, pmurias left
Skarsnik URL should be handled by a module. URI syntax is more generic and cover lot of usage 13:20
census Zoffix you've earned it ! 13:21
andrzejku hey people
:P
census i found a problematic entry. it has an apostrpohe in it: Addison’s Disease 13:23
perhaps i'm not doing the appropriate apostrophe ? 13:24
yes that helped significantly with the problem 13:26
MasterDuke fyi, the URI::Escape module turned that into: Addison%E2%80%99s%20Disease
census which may be a separate issue 13:27
but i just redid it to Addison's Disease and at least the program runs
but i don't think it's running correctly. it's giving me outputs of all 0's which i'm doubting is the case
13:28 pmurias joined 13:30 lizmat joined, cdg left 13:32 cdg joined 13:34 llfourn left
census Yes it's a legit issue for the ' 13:34
it's reading Alzheimer's Disease as Alzheimer%27s+Disease
and producing that there's no results
13:36 cdg left
andrzejku I am looking for Perl6 junior programmers :P for collaboration 13:42
census andrzejku i'm so perl6 junior hahah
andrzejku census, good
13:43 cdg joined
andrzejku census, want to help? 13:43
census if i can i might be too junior
andrzejku census, if you know another programming language then it is not bad
census yes i agree 13:44
lizmat Zoffix++ # blogs.perl.org/users/zoffix_znet/20...ities.html 13:46
13:52 andrzejku left
census sorry did anybody catch my comment before? i got the ' to compile but it doesn't work 13:53
13:58 zakharyas joined 14:00 piojo left
sena_kun github.com/Altai-man/BugTest/blob/...01-basic.t - this one is a rakudobug, right? 14:21
14:26 Kyo91_ joined, cdg left 14:28 zakame joined
Geth doc/molecules-patch-3: 3331c5210a | (Christopher Bottoms)++ (committed using GitHub Web editor) | doc/Language/syntax.pod6
More explanation, postcircumfix exception
14:36
ilmari[m] Zoffix++ # troll hugging
(just finished reading the article)
14:36 ChoHag left
ilmari[m] .hug Zoffix 14:36
huggable hugs Zoffix
ilmari[m] .hug 14:37
huggable hugs everyone
ilmari[m] Zoffix: I just noticed the <title> still says "Perl 6 Party", even though the domain is rakudo.party 14:40
Geth doc/molecules-patch-3: 99b1997c24 | (Christopher Bottoms)++ (committed using GitHub Web editor) | doc/Language/syntax.pod6
More concise trailing statement explanation
14:41 ChoHag joined
AlexDaniel ⚠ Community Bug SQUASHathon blogs.perl.org/users/zoffix_znet/20...athon.html 14:42
zakame hello 14:47
raschipi hey
14:50 rindolf left 14:51 lowbro left 14:55 rindolf joined 14:56 nattefrost left 15:12 travis-ci joined
travis-ci Doc build passed. Christopher Bottoms 'More explanation, postcircumfix exception' 15:12
travis-ci.org/perl6/doc/builds/270443962 github.com/perl6/doc/compare/4d069...31c5210a3c
15:12 travis-ci left 15:14 sivoais left 15:15 travis-ci joined
travis-ci Doc build passed. Christopher Bottoms 'More concise trailing statement explanation' 15:15
travis-ci.org/perl6/doc/builds/270446018 github.com/perl6/doc/compare/3331c...b1997c248e
15:15 travis-ci left, andrzejku joined 15:16 Sgeo_ left
andrzejku back 15:17
:)
15:20 ilmari joined 15:21 khw joined 15:22 sivoais joined 15:23 nadim_web left 15:26 wamba left 15:38 cdg joined
Skarsnik somone has an idea to have mardown on blog.perl.org to go to the line in ```code? 15:44
15:50 piojo joined 16:01 andrzejku left 16:02 piojo left, piojo joined
Skarsnik blogs.perl.org/users/sylvain_coline...ectly.html 16:03
16:03 ChoHag left
b2gills Dang-it, I was going to rewrite a shell script using Spit, but it is currently broken on the latest Rakudo. 16:05
16:05 Ven`` left, Ven`` joined 16:08 mcmillhj left 16:10 alexk joined
alexk m: for ^100 -> $i { say $i if ([+] (^100).list.hyper(:batch(2), :degree(4)).map({$_ + 1}).list) != 5050; }; say "done"; 16:11
camelia 62
93
done
alexk m: for ^100 -> $i { say $i if ([+] (^100).list.hyper(:batch(2), :degree(4)).map({$_ + 1}).list) != 5050; }; say "done"; 16:12
camelia 7
11
17
done
alexk m: for ^100 -> $i { say $i if ([+] (^100).list.race(:batch(2), :degree(4)).map({$_ + 1}).list) != 5050; } say "done";
camelia 5===SORRY!5=== Error while compiling <tmp>
Strange text after block (missing semicolon or comma?)
at <tmp>:1
------> 3egree(4)).map({$_ + 1}).list) != 5050; }7⏏5 say "done";
alexk m: for ^100 -> $i { say $i if ([+] (^100).list.race(:batch(2), :degree(4)).map({$_ + 1}).list) != 5050; }; say "done"; 16:13
camelia done
Zoffix alexk: hyper and race are currently experimental and are still awaiting being implemented.
alexk: a blog post about the new semantics in the works: 6guts.wordpress.com/2017/03/16/con...semantics/
alexk ah, ok 16:14
16:14 mcmillhj joined
MasterDuke alexk: also, i think your two .list's aren't needed 16:14
16:14 andrzejku joined
Zoffix ilmari[m]: thanks. And yeah, the title and most of the articles still need to be renamed. I haven't gotten around to it yet 16:14
alexk MasterDuke: the point is that hyper occassionaly fails wherby race seem to work ... 16:15
Zoffix Yeah, it was just never implemented beyond a proof of concept and accidentally made it into the language without requiring `use experimental` pragma :) 16:16
16:17 eroux joined 16:18 devmikey joined
MasterDuke alexk: yep, just trying to golf it down to a shorter representation of the problem (i.e., making sure the .list's weren't somehow contributing to the bug) 16:19
16:19 mcmillhj left
MasterDuke m: for ^100 -> $i { say $i if (^100).hyper(:batch(2), :degree(4)).map(* + 1).sum != 5050; }; say "done"; # this is a little shorter, but shows the same behaviour 16:20
camelia done
MasterDuke m: for ^100 -> $i { say $i if (^100).hyper(:batch(2), :degree(4)).map(* + 1).sum != 5050; }; say "done"; # this is a little shorter, but shows the same behaviour
camelia 39
60
63
done
16:20 ChoHag joined
raschipi Zoffix: your post about troll hugging was downvoted to death on /r/perl. Why was I expecting that? 16:22
mspo m: say 5千+5千 16:23
camelia 5===SORRY!5=== Error while compiling <tmp>
Confused
at <tmp>:1
------> 3say 57⏏5千+5千
mspo should that work?
raschipi u: 千 16:24
unicodable6 raschipi, U+5343 <CJK Ideograph> [Lo] (千)
AlexDaniel u: { .chr eq ‘千’ }
unicodable6 AlexDaniel, U+5343 <CJK Ideograph> [Lo] (千)
mspo m: say 三+三
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
三 used at line 1
sena_kun it shouldn't. 16:25
mspo m: say オ+オ
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
オ used at line 1
Zoffix mspo: no. Only Nd characters can be chained with other digits and No characters can also be used by itself. Despite 千 meaning "thousand" it's not a numerica character in Unicode
sena_kun see github.com/Altai-man/Slang-Kazu (although it's broken iirc).
mspo Zoffix: okay
u: オ
unicodable6 mspo, U+FF75 HALFWIDTH KATAKANA LETTER O [Lo] (オ)
Zoffix "Lo" => "Letter, other" 16:26
mspo Zoffix: yeah seeing it 16:27
u: セ
unicodable6 mspo, U+FF7E HALFWIDTH KATAKANA LETTER SE [Lo] (セ)
mspo u: 5 16:28
unicodable6 mspo, U+FF15 FULLWIDTH DIGIT FIVE [Nd] (5)
raschipi "Nd" => "Number, digit"
Zoffix raschipi: it usually picks up after a few hours. Maybe some of the users just aren't cat people :) rakudo.party/about 16:29
raschipi u: ½ 16:30
unicodable6 raschipi, U+00BD VULGAR FRACTION ONE HALF [No] (½)
raschipi 'No' can be used as a number by itself, but not as digits.
ilmari u: ²
unicodable6 ilmari, U+00B2 SUPERSCRIPT TWO [No] (²)
ilmari m: say ²³
camelia 8
mspo u: 壱 16:31
unicodable6 mspo, U+58F1 <CJK Ideograph> [Lo] (壱)
16:31 mcmillhj joined 16:32 dakkar left
Zoffix ilmari: in that instance, Rakudo's strong patterm of expecting term -> op -> term takes place. The ² is a term, since it can't be chained with other No or Nd chars, ³ is not a part of it. Next, the language expects an op to appear after the term, it sees ³, which in this context is an operator (and multiple Nos can form the power ops). Hence, the result is 2**3, without any ambiguity of meaning :) 16:33
Zoffix & :)
16:34 Celelibi left
ilmari Zoffix: I know, but it can be surprising (we've had this conversation before, I agree it's consistent and the right thing) 16:34
16:35 vendethiel- joined
raschipi the most useful thing about the superscript syntax is explaining the self-clocking properties of Perl6. 16:35
16:36 mcmillhj left, Ven`` left 16:39 ChoHag left
alexk Zoffix: so i suppose it doesn't make sense to open a ticket for the "hyper" failure now. 16:40
Skarsnik dunno, if you have a reiable test case that fail it's good
Zoffix alexk: don't think so. Also, a few of them already have been filed (e.g. rt.perl.org/Ticket/Display.html?id...et-history ) 16:41
huggable: rakudobugs 16:42
huggable Zoffix, Report bugs by emailing to [email@hidden.address]
Zoffix alexk: but if you like, you could always email your buggy test case to ^
(which could become part of the test suit when the .hyper and .race get nailed down)
16:42 ChoHag joined
raschipi alexk: have you tried doing those things using atomic operations? 16:44
16:45 pompomcrab joined 16:50 mcmillhj joined
pompomcrab how do i debug this error while using HTTP::UserAgent? "MoarVM panic: Internal error: invalid thread ID 119468032 in GC work pass" 16:51
census Zoffix if you were wondering I fixed my problem I told you about earlier
I forget the error message what it was called
16:52 perigrin left
Skarsnik pompomcrab, hm that sucksn try a --lvm-execptiob ? 16:52
census I realized if it had any non-English accent marks in a word that was a problem. Like to word fiancee with the accent mark. Also the apostrophe I had to reformat .
AlexDaniel pompomcrab: any chance of getting the code smaller so that we have something short to reproduce the issue? 16:53
pompomcrab: and how consistent is it? Could be a regression too 16:54
Skarsnik: did you mean --ll-exception? :)
alexk raschipi: no, I don't think it has anything to do with that in this case.
Skarsnik yes lol 16:55
16:55 mcmillhj left
AlexDaniel pompomcrab: in fact, if the code to reproduce the issue is in one file, we can already shove it into a bot and we'll get more info 16:56
16:56 setty1 joined
AlexDaniel doesn't have to be small 16:56
17:02 mcmillhj joined
alexk m: say [+] do for ^100 { (^100).list.hyper(:batch(2), :degree(4)).map({$_ + 1}).sum != 5050 } 17:03
camelia 3
alexk m: say [+] do for ^100 { (^100).list.race(:batch(2), :degree(4)).map({$_ + 1}).sum != 5050 } 17:04
camelia 0
17:05 mcmillhj left, mcmillhj joined, alexk left
MasterDuke pompomcrab: if you can't easily share your code, you can try running it with perl6-valgrind-m or perl6-gdb-m and report what they output 17:08
AlexDaniel pompomcrab: note that most likely this is a bug on our side, so any info is welcome 17:09
17:09 piojo left 17:13 epony joined 17:14 Skarsnik_ joined, zakharyas left 17:15 Skarsnik__ joined, Cabanossi left 17:16 Skarsnik left 17:17 Cabanossi joined 17:18 Skarsnik_ left 17:19 perigrin joined 17:25 eliasr joined 17:26 lostinfog joined 17:29 raschipi left 17:37 imcsk8 joined, ChoHag left 17:38 Kyo91_ left 17:40 dogbert2 joined 17:45 abraxxa left 17:50 Kyo91_ joined 17:53 census left 17:54 smls joined
smls bisectable6: my token foo { {} foo { say $/.to } }; "foo" ~~ /<foo>/ 17:55
bisectable6 smls, Bisecting by output (old=2015.12 new=e717d14) because on both starting points the exit code is 0
smls, bisect log: gist.github.com/23122ebe34ebeccfdf...04845c54f4
smls, There are 20 candidates for the first “new” revision. See the log for more details
smls Those 20 commits again... :P 17:56
17:57 mcmillhj left 17:58 samb1 left 17:59 lizmat_ joined 18:01 alimon left 18:02 lizmat left 18:03 Kyo91_ left 18:05 Kyo91 joined, nadim joined
smls They fixed a bunch of bugs, but somehow got on bisectable's bad side... :) 18:07
18:10 samb1 joined 18:11 mcmillhj joined 18:12 pompomcrab left 18:17 smls left 18:18 smls joined
Geth perl6.org: 91eab69e6b | (Zoffix Znet)++ (committed using GitHub Web editor) | source/index.html
List SQUASHathon in the news box
18:20
18:22 wamba joined
AlexDaniel Zoffix: SQUASHAthon or SQUASHathon ? :) 18:34
Zoffix the latter 18:37
18:37 robertle joined
Geth perl6.org: 2e40416c8d | (Zoffix Znet)++ (committed using GitHub Web editor) | source/index.html
Fix typo; AlexDaniel++
18:38
Aaronepower Hello, how do you check a variable's type? 18:40
geekosaur m: my $a; say $a.WHAT
camelia (Any)
geekosaur m: my Int $a; say $a.WHAT
camelia (Int)
AlexDaniel m: say 42 ~~ Int
camelia True
moritz Aaronepower: a variable's or a value's type? 18:41
Skarsnik__ .^name 18:42
moritz m: my Any $x = 42; say $x.^name; say $x.VAR.of.^name
camelia Int
Any
18:42 Skarsnik__ is now known as Skarnik 18:43 Skarnik is now known as Skarsnik
Skarsnik hm interesting 18:43
Aaronepower moritz: What's the difference? 18:44
18:44 Kyo91 left
moritz Aaronepower: in my example above, the variable $x is constrained to type Any, but holds a value of type Int. This works, because Int is a sub type of (more specific than) Any 18:45
ruoso__ Is there a way to dynamically ask for the value of an attribute of self ? 18:47
self.^attributes gives me the attribute meta-object, but I can't quite figure out how to use it to inquire the value from an object 18:48
Zoffix ruoso__: isn't it just $!some-attribute? 18:49
ruoso__ right, but I don't know the attribute name
Zoffix Ah
Aaronepower moritz: Well I want what it really is, so in that case Int. 18:50
smls m: class A { has $.x}; my $a = A.new(x => 42); say $a.^attributes[0].get_value($a)
camelia 42
smls ruoso__: ^^
sjn moritz: I just tried to look for documentation for $x.VAR.of.^name, and have trouble finding it on docs.perl6.org
ruoso__ oh, I was looking at the .^methods of the attribute meta-object but missed the get_value from it 18:51
sjn VAR docs say "Returns the underlying Scalar object", but .of seems to be something related to Variable
ruoso__ oh, I was looking at the .^methods of the attribute meta-object but missed the get_value from it...
oops, sorry
sjn is there a documentation bug there? 18:52
ruoso__ ah, I was using a native type to inspect the attribute meta object
which has a different type of meta-object
Zoffix sjn: possible. I don't see .of documented on docs.perl6.org/type/Scalar.html
ruoso__ m: say (1).^attributes[0].get_value(23)
camelia No such method 'get_value' for invocant of type 'BOOTSTRAPATTR'
in block <unit> at <tmp> line 1
Zoffix sjn: would you please report it? github.com/perl6/doc/issues/new 18:53
sjn sure
smls ruoso__: the argument to .get_value needs to be the object that has the attribute.
Zoffix sjn: hopefully it gets taken care of this Saturday during the SQUASHathon :) You should come. blogs.perl.org/users/zoffix_znet/20...athon.html
sjn yay! \o/
Skarsnik m: class A {has $.a is rw; method foo{self."a"()}}; my A $b .= new(:a<foo>); $b.foo; 18:56
camelia ( no output )
18:56 cognominal left
smls sjn: `.VAR` is still magic to me, as well... "Returns the underlying Scalar object"? Well, simply `$x` by itself also evaluates to the Scalar. Somehow VAR returns the Scalar in such a way that it no longer passes through (all) methods? Or something? :) 18:56
Skarsnik m: class A {has $.a is rw; method foo{self."a"()}}; my A $b .= new(:a<foo>); say $b.foo;
camelia foo
18:56 Kyo91 joined
Skarsnik how to acces attribue dynamicly x) 18:56
ruoso__ smls: not just that, but it has to be the attribute of a proper class... the attribute of the native int type is of a different meta type...
m: class Foo { has $.a }; say 1.^attributes[0].WHAT; Foo.^attributes[0].WHAT 18:57
camelia Cannot look up attributes in a BOOTSTRAPATTR type object
in block <unit> at <tmp> line 1
ruoso__ m: class Foo { has $.a }; say Foo.^attributes[0].WHAT 18:58
camelia (Attribute)
ruoso__ m: say 1.^attributes[0].WHAT
camelia Cannot look up attributes in a BOOTSTRAPATTR type object
in block <unit> at <tmp> line 1
sjn Zoffix, smls: Filed a bug: github.com/perl6/doc/issues/1482 19:01
Zoffix sjn++ Thanks! 19:03
ruoso__: if you dig into the deep ends, you get to more and more basic objects that don't necessarily know how to behave in the higher level end of the language (such as how to get output via .gist method) 19:04
19:05 ChoHag joined
Zoffix m: say 1.^attributes[0].^name 19:05
camelia BOOTSTRAPATTR
19:08 Ven joined 19:09 Ven is now known as Guest78495 19:10 Celelibi joined, darutoko left
Geth doc: b7ef4cb953 | (Moritz Lenz)++ | doc/Type/Scalar.pod6
Document Scalar.of

  sjn++ for pointing out it was not documented
19:14
19:15 Guest78495 left
Geth doc: 374066511c | (Moritz Lenz)++ | doc/Type/Variable.pod6
Mention Scalar in Variable docs
19:18
19:20 pecastro left 19:21 espadrine joined
Zoffix moritz++ 19:22
sjn that was fast :) 19:23
moritz++ # speed daemon :D
moritz you can tell I'm proprastinating :-) 19:24
sjn hehe
19:25 pecastro joined 19:30 Exodist joined, lizmat_ is now known as lizmat 19:32 pecastro left
Geth doc: 3f2098b4c9 | (Moritz Lenz)++ | doc/Language/objects.pod6
Remove paragraph with wrong claims about BUILD

replace it by something that clearly states that BUILD, TWEAK and BUILDALL are called on instances, and mention that virtual method calls in there are not a terribly bright idea.
Closes #1459
19:33
19:34 Exodist left
Aaronepower Hey, I'm having an issue with where one of the types in my array of Hash objects is an Array, however `$_.WHAT ~~ Array` returns True for Hash's too. 19:43
moritz m: say Hash.new ~~ Array 19:44
camelia False
moritz Aaronepower: please add "dd $_;" to the line before the test you've shown us, and copy&paste its result
19:44 pecastro joined
moritz Aaronepower: I suspect $_ does not contain what you think it does 19:44
Aaronepower moritz: What is the multi line syntax in perl6? 19:47
moritz Aaronepower: do you mean multi-line strings? or comments? or something else?
Aaronepower moritz: Sorry comments
Skarsnik there is none 19:48
Geth doc: 1bbe316cb2 | (Moritz Lenz)++ | doc/Language/syntax.pod6
Add another use case and more examples for term:<>

Closes #1445
Skarsnik well you cab use pod for tha
moritz there's also #`[....]
19:49 mcmillhj left
moritz which can be used both inline and multi-line 19:49
19:49 pecastro left
moritz but I tend to just stick a # on the start of every line. 19:49
Aaronepower Hmm, perl6 seems to take a long time to start up is there anyway to reduce that?
19:50 mcmillhj joined 19:51 zakharyas joined
sjn Aaronepower: first time, perl6 is creating precompile cache files for your code. is that's what's happening, perhaps? 19:51
second and later runs should be faster
moritz Aaronepower: in the long run, donating to www.perlfoundation.org/perl_6_core_...pment_fund helps
sjn hehe
moritz not using really old versions of rakudo can also help, if you're doing that 19:53
19:54 mcmillhj left
Aaronepower Hmm, maybe JSON::Tiny is the problem. 19:59
20:00 pecastro joined
AlexDaniel define “long time” :) 20:00
m: say now.Instant
camelia No such method 'Instant' for invocant of type 'Instant'
in block <unit> at <tmp> line 1
Aaronepower AlexDaniel: Like multiple seconds. 20:01
lizmat hmmm... that feels like an omission :-)
tadzik Aaronepower: just loading it, or actual parse time? 20:02
is perl6 -MJSON::Tiny -e '' long by itself?
takes 0.24 seconds here
Aaronepower tadzik: Parse is instant, it's actually running the code that takes so long.
tadzik oh, I meant JSON::Tiny parsing things
moritz Aaronepower: try JSON::Fast
20:03 Wander joined
tadzik also, try --profile to see what's slow :) 20:03
AlexDaniel JSON::Tiny is really slow, that's “normal” 20:04
20:04 andrzejku left 20:06 mcmillhj joined
b2gills Aaronepower: `$_.WHAT ~~ Array` doesn't tell you anything that `$_ ~~ Array` doesn't already tell you 20:06
20:07 Wander left
Aaronepower This is my code. It classify doesn't seem to do what I expect. The JSON is an array of objects and in classify $_ is just the same array as in @json paste.rs/fNw 20:11
20:11 mcmillhj left, leont joined
moritz Aaronepower: == Nil looks suspicious; == does numeric comparison 20:21
Aaronepower moritz: Well what is a better way to check if a key exists? 20:22
moritz m: my @json = ({a => 1}, { b => 1 }); say @json.classify({ $_<a>:exists }).perl
camelia (my Any %{Any} = Bool::False => $[{:b(1)},], Bool::True => $[{:a(1)},])
moritz m: my @json = ({a => 1}, { b => 1 }); say @json.classify({ $_<a>:exists }){True, False }
camelia ([{a => 1}] [{b => 1}])
20:24 mcmillhj joined
Geth doc: 2f734dba74 | (Moritz Lenz)++ | doc/Language/regexes.pod6
Document & and && in regexes. Closes #1145
20:24
moritz I might or might not make it to the squashaton on Saturday, but in any case, I've closed four doc issues now :-)
Aaronepower moritz: Could you try loading that from the file? and see if it works the problem i think is the type json is giving me? 20:25
Geth doc: f44b7124cd | (Moritz Lenz)++ | doc/Language/regexes.pod6
Actually document & in regexes
moritz Aaronepower: you could try my @json = from-json(...).list; 20:26
if it happens to return an array in a scalar, or something other weird
Skarsnik what does classify do?
20:27 cZBW joined
moritz Skarsnik: put values of a list into buckets according to a code block 20:27
Aaronepower Skarsnik: As I understand it's like filter but it also gives you what failed the filter. 20:28
moritz: How do you use `&&` with :exists it gives me `You can't adverb &infix:<&&>` error
moritz Skarsnik: for example @strings.classify: { .substr(0, 1) } gives you strings grouped by the first character
Aaronepower: parenthesis :( 20:29
20:29 mcmillhj left
moritz ($_<a>:exists) && ($_<b>:exists) 20:29
MasterDuke moritz: that's a good description. how would you describe categorize (/me can never remember the difference)?
20:31 sena_kun left
moritz MasterDuke: the difference seems to be that the block can return multiple categories for .categorize 20:32
m: say <abc ab>.categorize: *.comb 20:33
camelia {a => [abc ab], b => [abc ab], c => [abc]}
ugexe example cro json resource store service gist.github.com/ugexe/644d53553818...9c925f9817 20:36
Geth doc/molecules-patch-3: b733887eb1 | (Christopher Bottoms)++ (committed using GitHub Web editor) | doc/Language/syntax.pod6
removed mention of postcircumfix blocks

Deleting to avoid confusion
20:40
20:43 mcmillhj joined
Zoffix MasterDuke: returning a list of values for classify means multiple classifications while for categorize it means nested categories 20:44
MasterDuke ah, thanks 20:45
Zoffix Also, both can also take a hash or a list as mapper; it doesn't have to be a block
20:46 Cabanossi left 20:47 firefish5000 joined
Aaronepower moritz: So the classify is fine, but the results are like arrays of arrays for no apparent reason. 20:47
20:47 mcmillhj left, Cabanossi joined
Geth doc: 27721a05d2 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Type/Hash.pod6
Fix C<> used instead of L<>
20:48
20:49 leont left
firefish5000 If I want a new class Int_2, which is Int and accepts Int but has Str overridden. What would I need to do. Or what keywords should I google to find the answer myself? 20:52
moritz are we actually interested in the "(committed using GitHub Web editor)" that Geth reports?
firefish5000: class Int_2 is Int { method Str() { go crazy here } } 20:53
Skarsnik class Int_2 is Int {method Str() {}}
damn moritz too fast
firefish5000 But that doesn't seem to accept Int in assignment=.
MasterDuke firefish5000: if you're interested in only that case, IntStrs are a built in class 20:54
20:54 smls left
MasterDuke m: say <1>.WHAT 20:55
camelia (IntStr)
Skarsnik class Int_2 is Int {method Str() {"foo"}}; my Int_2 $a .=new; $a = 42;
m: class Int_2 is Int {method Str() {"foo"}}; my Int_2 $a .=new; $a = 42; say $a;
camelia Type check failed in assignment to $a; expected Int_2 but got Int (42)
in block <unit> at <tmp> line 1
Skarsnik m: class Int_2 does Int {method Str() {"foo"}}; my Int_2 $a .=new; $a = 42; say $a;
camelia 5===SORRY!5=== Error while compiling <tmp>
Int is not composable, so Int_2 cannot compose it
at <tmp>:1
moritz m: class Int_2 is Int {method Str() {"foo"}}; my Int_2(Cool) $a = 42; say $a.Str
camelia 5===SORRY!5=== Error while compiling <tmp>
Coercion Int_2(Cool) is insufficiently type-like to qualify a variable
at <tmp>:1
------> 3method Str() {"foo"}}; my Int_2(Cool) $a7⏏5 = 42; say $a.Str
expecting any of:
constrain…
moritz meh, we don't support coercion types in variables yet 20:56
firefish5000 Ok is it possible to access $!value (im assuming holds the value) inside Int_2 ?
20:57 mcmillhj joined
firefish5000 m: Int.^attributes 20:57
camelia ( no output )
firefish5000 m: Int.^attributes.say 20:58
camelia (bigint $!value)
samcv j: 0xD4DB.uniname.say 21:00
camelia java.nio.file.NoSuchFileException: /nqp/lib/Perl6/BOOTSTRAP.jar
in <anon> (gen/jvm/ModuleLoader.nqp:90)
in load_module (gen/jvm/ModuleLoader.nqp:77)
in <anon> (gen/jvm/CORE.setting)
in <anon> (gen/jvm/ModuleLoader.nqp:255)
in load_sett…
samcv uh oh
21:02 mcmillhj left
Skarsnik m: 0xD4DB.uniname.say 21:02
camelia Hangul Syllable PWILH
moritz firefish5000: what are you trying to achieve?
21:04 skids left
firefish5000 Simply make an Int like class that Str returns fmt to two digits by default. As a exercise 21:05
Aaronepower moritz: Now with the new ($_<foo>:exists) && ($_<foo>:exists) I get `Type check failed in binding to parameter '@correct'; expected Positional but got Any (Any)` on the assignment.
firefish5000 I could do it another way, but thought it would be a good idea to try inheriting or augmenting Int, since I have little experience doing those. I could augment Int to do what I want, but cant seem to easily duplicate the class with a different name and do the same. 21:08
moritz Aaronepower: sorry, I'm going to bed now. If you want help from others, it's always easiest if you include your current code in a nopaste (preferably in a way that doesn't require external input; just inline the data structures you are working with)
firefish5000: well, you can, you just can't assign an Int to your Int_2 variables; you have to go through the Int_2 constructor 21:09
firefish5000 thanks, moritz. Night!
moritz sleep&
Aaronepower moritz: Thanks and night
Hey why do I get `Type check failed in binding to parameter '@correct'; expected Positional but got Any (Any)` with paste.rs/efg 21:10
firefish5000 And yes, which is why I was also added in a Int and Int_2 method to Int_2 and Int.... but that hasn't worked well so far
21:10 mcmillhj joined 21:11 Skarsnik left 21:14 jonas1 left, Cabanossi left 21:15 mcmillhj left
firefish5000 m: class Int2 is Int {}; my Int2 $a = Int2.new(34); $a.WHAT.say # I guess my first problem is the non-overriden new returns an Int 21:16
camelia Type check failed in assignment to $a; expected Int2 but got Int (34)
in block <unit> at <tmp> line 1
21:17 Cabanossi joined
cZBW m: class Int2 is Int { method Str {"foo"}}; my Int2 $a .= new( value => 23); $a.WHAT.say 21:22
camelia (Int2)
Zoffix firefish5000: I wasn't following the discussion, but FWIW, the user-land-subclasses-from-core-types still needs some polish. There's a general ticket on the subject: rt.perl.org/Ticket/Display.html?id...et-history 21:23
cZBW firefish5000: clumsy, but is that what you want?
Zoffix moritz: I'm interested in it :) It makes it easy to spot when people likely adding a change they didn't spectest :P 21:24
moritz: also that space generally says "commited by SoandSo" which in that case would read "commited by Github" or something 21:25
firefish5000 cZBW, The problem here is the value doesnt actualy change at all. its basicly a class that says foo.
m: class Int2 is Int { }; my Int2 $a .= new( value => 23); $a.say #no overrides here 21:26
camelia 0
cZBW I see
firefish5000 the value is always 0 for Int2... and the $!value attribute cant seem to be accessed
Zoffix m: put 1 but role { method Str { self.fmt: "%.2f" } } 21:27
camelia Cannot allocate memory
Zoffix m: put 1 but role { method Str { self.fmt: "%.2f" } }
camelia Cannot allocate memory
Zoffix try harder!
m: put 1 but role { method Str { self.fmt: "%.2f" } }
camelia 1.00
El_Che Zoffix: nice post
Zoffix firefish5000: just mix in a role to a normal Int, I guess. $!value is both a private attribute and of a special lower-level type. You coul do Int2.new: 42; but then it'll complain that it wants Int2 but you gave an Int, which ultimately goes back to the ticket I mentioned :) 21:28
El_Che: thanks
firefish5000 Zoffix, That could work! thanks 21:29
Zoffix & for the day
\o
El_Che o/ 21:32
(after Charlottesville it looks like a neo nazi, sadly) 21:33
21:37 eroux left 21:38 ufobat left 21:39 zakharyas left 21:42 setty1 left 21:43 cognominal joined
firefish5000 A little more wordy than a special class, but definitly easy to implement and doesn't require augmenting. 'say $int but fmt_role; my Int $fmt_int = 4 but fmt_role ; say $fmt_int' basicly does exactly what I was aiming for, while the former would basicly be type conversion to Int2, and the latter creates an Int2 variable. I have no complaints :D 21:44
thanks again. I now see the light in roles!
21:45 pecastro left 21:46 stmuk_ joined 21:48 stmuk left 21:49 firefish5000 left
BooK so I've been looking more into S06 and the code for dealing with options/long options 21:53
and it seems the complexity is there: The short -foo form never assumes a separate argument, and you must use =. For the --foo form, if there is a named parameter corresponding to the switch name, and it is of type Bool, then no argument is expected. Otherwise an argument is expected. If the parameter is of a non-slurpy array type, all subsequent words up to the next command-line switch (or the end of the list) are bound to that parameter.
because from what I understand the processing of command-line arguments happens before the call to main, so we can't look at the signature(s) to figure out the bit about the long option described above 21:56
nadim hi, nopaste.linux-dev.org/?1161185 I have a bit of a problem with this code; the ticks keep coming, if I pres q first it quits properly. if I press a it also does what it should, once, then pressing a or q does not work. I am doing something wrong? it seems to me that there is a problem with the raw-input-supply. 21:58
BooK nadim: is the 'done' in the 'a' branch meant to be there? 22:02
22:03 TEttinger joined
BooK if I understand correctly, it exits the react, but $quit is not set, so you're stuck in the loop 22:03
nadim I want to stay in the loop and the react block to be run again 22:05
BooK: salut
jdv79 .seen konobi
yoleaux I saw konobi 4 Dec 2016 00:17Z in #perl6: <konobi> your IP transit provider should be able to delegate the in.arpa zones to a nameserver of your choice if you want them to be reverse resolvable
nadim I use the react block to act on keyboard input and the loop to keep doing that till I press q 22:06
BooK ok
22:07 niceperl joined
BooK the "when Tick" is not really needed, is it? since it does nothing 22:09
22:10 Rawriful joined
nadim it's just to see that something happens in the react, that works perfectly 22:10
BooK in fact, can't you put all the code you want to be run at the beginning of the whenever block? 22:11
so you spent all the time in the react, and only exit when q is pressed
(I speak from the point of view of someone whose only knowledge of these things comes from seeing a jnthn talk a few days ago)
so I know barely more than a teddy bear :-)
and am willing to act as such 22:12
cZBW BooK: they are on par with rubber ducks when it comes to debugging.
22:13 u-ou- joined
cZBW ( en.wikipedia.org/wiki/Rubber_duck_debugging ) 22:13
u-ou- what's a good way to insert a value into an arbitrary position in an array? e.g. [1 3] becomes [1 2 3] 22:14
22:14 Kyo91 left
BooK cZBW: I first learnt of this technique under the name "teddy bear", so I never use the "rubber duck" one :-) 22:14
MasterDuke u-ou-: splice() 22:15
cZBW glad I could expand your expertise on that :D
BooK actually, I also knew the rubber duck term, just never use it 22:16
archive.oreilly.com/pub/a/perl/exce...guide.html # this is where I learnt about the bear
u-ou- MasterDuke: can you show me an example usage?
cZBW BooK: thx :) 22:17
BooK u-ou-: docs.perl6.org/routine/splice
22:17 niceperl left
geekosaur actually I have one small problem with "rubber duck debugging" 22:17
BooK cZBW: different schools of debugging :-) there should probably be a religious war, and a schism
MasterDuke m: my @a = ^3; @a.splice(2, "b"); say @a
camelia Cannot resolve caller splice(Array: Int, Str); none of these signatures match:
(Array:D \SELF: *%_)
(Array:D $: Whatever, *%_)
(Array:D $: Callable:D $offset, *%_)
(Array:D $: Int:D $offset, *%_)
(Array:D $: Whatever, Whatev…
cZBW BooK: naah :D
BooK, I really believe they are idempotent :) 22:18
22:18 leont joined
MasterDuke m: my @a = ^3; @a.splice(2, 1, "b"); say @a 22:18
camelia [0 1 b]
MasterDuke m: my @a = ^3; @a.splice(2, 0, "b"); say @a
camelia [0 1 b 2]
geekosaur I first learned those were things from my little sister watching sesame street. so it's permanently linked with ernie singing in the bathtub >.>
u-ou- ahhh, thanks 22:19
I didn't think about 0 for the elms arg
cZBW geekosaur: well, and does that help?? XD
BooK cZBW: feathers and fur? inconceivable! 22:22
22:22 vendethiel- left
cZBW BooK: rubber feathers and polyester fur... same class 22:22
BooK heh
preaction one seems more comforting when things are _really_ broken though... 22:23
Aaronepower Hey why do I get `Type check failed in binding to parameter '@correct'; expected Positional but got Any (Any)` on the classify line? paste.rs/efg
geekosaur 'Gods be feathered!' >.> 22:24
BooK my bear is usually an irc channel, anyway 22:25
22:25 Ven`` joined
cZBW I can recommend using coworkers. the longer they have to walk from their desk after I ask them to look at my code / problem - the more probable it becomes that by the time they arrive I spotted my own very embarassing mistake. Must be some kind of reciprocal law. 22:28
22:32 Sgeo joined
tony-o m: my @j = [{ duration => 1 }, { x => 0 }]; @j.classify({ $_<duration>:exists}, (True, False)).perl.say; 22:32
camelia Cannot resolve caller classify(Array: Block, List); none of these signatures match:
($: *%_)
($: Whatever, *%_)
($: $test, :$into!, :&as, *%_)
($: $test, :&as, *%_)
in block <unit> at <tmp> line 1
tony-o gah
22:34 pmurias left
tony-o m: my @j = [{ duration => 1 }, { x => 0 }]; @j.classify({ $_<duration>:exists} ?? True !! False).say; 22:34
camelia Cannot resolve caller classify-list(Hash[Any,Any]: Bool, Array, :as(Callable)); none of these signatures match:
(Hash $: &test, \list, :&as, *%_)
(Hash $: %test, |c is raw)
(Hash $: @test, |c is raw)
(Hash $: &test, **@list, |c is…
tony-o m: my @j = [{ duration => 1 }, { x => 0 }]; @j.classify({ $_<duration>:exists ?? True !! False }).say;
camelia {False => [{x => 0}], True => [{duration => 1}]}
22:35 Sgeo_ joined, nadim left
Aaronepower tony-o: So why do I get that type error? 22:37
22:38 Sgeo left 22:39 ShalokShalom joined 22:40 cognominal left 22:41 cognominal joined 22:43 cZBW left, espadrine left 22:50 jferrero joined 22:57 cdg left 23:00 leont left, Cabanossi left 23:02 Cabanossi joined 23:05 pecastro joined
BooK m: enum Foo < a b c >; Foo.^add_enum_value( d => 3 ); Foo.^enum_values.say 23:10
camelia Too few positionals passed; expected 3 arguments but got 2
in block <unit> at <tmp> line 1
BooK I was reading Metamodel::EnumHOW and was trying out some of the methods I found there
all because docs.perl6.org/type/Metamodel::EnumHOW gave me a 404 23:12
23:13 MasterDuke left
Aaronepower I though perl6 didn't have enums? 23:19
23:20 lostinfog left
Geth doc/book/class-how: 0b58f3716d | (Philippe Bruhat (BooK))++ | doc/Type/Metamodel/ClassHOW.pod6
Add a missing invocant to the method definition
23:24
doc: book++ created pull request #1483:
Add a missing invocant to the method definition
BooK m: say Order.HOW; say Order.^enum_values; 23:26
camelia Perl6::Metamodel::EnumHOW.new
{Less => -1, More => 1, Same => 0}
23:33 Ven`` left 23:35 u-ou- left 23:36 Sgeo_ left 23:37 u-ou- joined
u-ou- my $x = 1; given $x { $x = 2 when 1; say 'hi' when 2; } 23:37
m: my $x = 1; given $x { $x = 2 when 1; say 'hi' when 2; }
camelia hi
u-ou- is this a bug?
23:37 cpage_ left
BooK m: say Bool.enums; say Order.enums; 23:38
camelia {False => 0, True => 1}
Map.new((:Less(-1),:More(1),:Same(0)))
BooK why the difference ? 23:39
23:40 margeas left
BooK m: say Order.HOW ~~ Bool.HOW 23:40
camelia False
BooK mmm
m: say Order.HOW.WHAT ~~ Bool.HOW.WHAT 23:41
camelia True
23:41 skids joined
ugexe u-ou-: i would assume so since there is no continue 23:42
u-ou- ugexe: it acts differently if the whens are blocks
ugexe ah nm
u-ou- I think the behavior is supposed to do that with a proceed
m: my $x = 1; given $x { when 1 { $x = 2 }; when 2 { say 'hi' } } 23:43
camelia ( no output )
u-ou- m: my $x = 1; given $x { when 1 { $x = 2; proceed }; when 2 { say 'hi' } }
camelia hi
23:44 Sgeo joined
u-ou- no proceed in my first example and still it executes 23:44
maybe it's supposed to. just checking
ugexe m: my $x = 1; given $x -> $_ is copy { $x = 2 when 1; say "hi" when 2; } 23:45
camelia ( no output )
ugexe yeah im not sure if its a bug or not 23:47
u-ou- alright
23:47 rindolf left
BooK m: my $x = 1; given $x -> $_ is copy { $x = 2 andthen proceed when 1; say "hi" when 2; } 23:50
camelia proceed without when clause
in block at <tmp> line 1
in block <unit> at <tmp> line 1
BooK I still don't much it seems :-)
u-ou- lunch time :) 23:51
23:51 u-ou- left
BooK m: say Order.HOW; say Order.^enum_values; 23:52
camelia Perl6::Metamodel::EnumHOW.new
{Less => -1, More => 1, Same => 0}
BooK I think the above is because of:
Bool.^add_method('enums', my method enums() { self.^enum_values });
method enums() { self.^enum_values.Map } # in Enumeration.pm (which is a Role) 23:53
23:54 travis-ci joined
travis-ci Doc build passed. Philippe Bruhat (BooK) 'Add a missing invocant to the method definition' 23:54
travis-ci.org/perl6/doc/builds/270627884 github.com/perl6/doc/commit/0b58f3716dce
23:54 travis-ci left, Sgeo_ joined 23:55 Sgeo left
skids .tell u-ou- According to S04: "There is a C<when> statement modifier, but it does not have any breakout semantics; it is merely a smartmatch against the current topic." 23:56
yoleaux skids: I'll pass your message to u-ou-.
23:56 mcmillhj joined 23:58 Sgeo_ left