»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_log/perl6 | UTF-8 is our friend! 🦋
Set by Zoffix on 25 July 2018.
Kaiepi made an issue for it github.com/rakudo/rakudo/issues/2748 00:00
timotimo hey tadzik 00:12
common get your comma on, mon 00:13
did everybody see comma community being released?
Kaiepi heard about it 00:15
it looks neat, especially the debugging features, but i'm not sure if it'll run on my os 00:19
guifa Before I finish coding this stuff, any feedback on how I think the API for Fluent should go? github.com/alabamenhu/Fluent/blob/.../README.md 01:17
jmerelo .seen sena_kun 06:56
yoleaux I saw sena_kun 6 Mar 2019 20:28Z in #perl6: <sena_kun> I guess this time feels < reals. ;)
jmerelo .tell sena_kun can I set the number of columns in comma in some way?
yoleaux jmerelo: I'll pass your message to sena_kun.
jmerelo .tell sena_kun OK, I found it, in Code Style... 06:57
yoleaux jmerelo: I'll pass your message to sena_kun.
Geth doc: b1b1b40634 | (JJ Merelo)++ | doc/Language/setbagmix.pod6
Clarifies and summarizes unordered classes, closes #2613
07:06
synopsebot Link: doc.perl6.org/language/setbagmix
Summertime a question about mutating an array at compile time not being reflected at runtime, gist.github.com/Summertime/15b1bde...cc35e01c37 08:14
Summertime how should I best go about achieving what I want? (having the data available at runtime, either through use of trait as so, or some other method other than literally typing the name of the function into the list) 08:15
Summertime added python version to better explain what I want to anyone who also knows python and the decorator stuff 08:25
AlexDaniel Summertime: but if you change `my @funcs = [];` to `my @funcs;` it works, right? 08:29
so the problem is that you're reinitializing your array at run time 08:30
so either use just `my @funcs;` or do something like `BEGIN my @funcs = [‘foo’];` 08:32
timotimo m: class X {}; X.new.say 08:38
camelia X.new
timotimo m: class X {}; X.new.say; die "test"
camelia X.new
test
in block <unit> at <tmp> line 1
timotimo m: class X {}; X.new.say; X::AdHoc.new().throw
camelia X.new
Unexplained error
in block <unit> at <tmp> line 1
timotimo mhm mhm 08:39
timotimo daxim: i gave my colleague who also works on comma some details for that exception, i can ping you if/when there is an answer 09:11
i would try to fix it myself but my laptop kind of died and i now only have my smartphone with a keyboard 09:12
Summertime thanks Alex
timotimo Kaiepi: in theory you could use comma on a bsd if you get an appropriate JRE up and running; what that entails i don't know, but if there's something obvious in comma that makes it not work on BSD without a sensible reason, I can try if I can fix it perhaps 09:21
m: say 007 09:22
camelia Potential difficulties:
Leading 0 has no meaning. If you meant to create an octal number, use '0o' prefix; like, '0o07'. If you meant to create a string, please add quotation marks.
at <tmp>:1
------> 3say 0077⏏5<EOL>
7
timotimo m: say 0o07 09:23
camelia 7
timotimo andrew shitov has expanded the scope of the toy language a lot since last i saw the talk 09:24
very nice to see
timotimo ash just gave me the terrible idea to allow comments inside variable names, or perhaps even have something like an escaping construct that can put whole blocks of stuff inside variable names that become a part of it 09:39
m: my $foo:<this is a long explanation of what i mean>; 09:40
camelia ( no output )
timotimo oh no
we already have this
Kaiepi looks like comma works fine on bsd 09:43
Kaiepi it just needs openjdk to be installed and in your PATH 09:46
Summertime just so I'm understanding correctly, when using `for` with a block with no arguments, its equiv to using `given thingo` on the block? there isn't any magical argument created right? 09:51
timotimo fantastic! 10:00
Summertime: blocks without a signature get a default of an optional $_ parameter 10:01
Summertime hm, subs however do not, right?
timotimo blocks with just a -> before the {} gets the empty signature instead, which if you use ˋforˋon it will immediately error out at run time :) 10:02
m: say sub {}.signature
camelia ()
timotimo m: (sub {})(1) 10:03
camelia Too many positionals passed; expected 0 arguments but got 1
in sub at <tmp> line 1
in block <unit> at <tmp> line 1
timotimo m: (sub { say $_ })(1)
camelia Too many positionals passed; expected 0 arguments but got 1
in sub at <tmp> line 1
in block <unit> at <tmp> line 1
timotimo yep
Summertime I guess I could sub funky ($_) {say $_} 10:04
timotimo perl6 introspection is really useful here
that's right.alternatively you can use implicit parameters
m: sub test { say $^arg }; test(1) 10:05
camelia 1
Summertime I guess the question I'm actually wanting to ask is what is the most reasonable way to use `when` within a sub to do pattern matching
timotimo ^ using these gives you a signature made up of the variables as positionals sorted alphabetically 10:06
ah, yes, either have $_ in the signature explicitly or have a given inside the sub to set it for you
if you don't need to use "return" in the sub, you can also put a block into the &foo var 10:07
Summertime or use the signature and `multi` to do the pattern matching outside the sub 10:07
timotimo m: my &do-it = { say "$_ is the word" }; do-it("bird")
camelia bird is the word
Summertime can you pin arbitrary data to a block? a-la python `x = lambda:0; x.blerp = 'blerpy'` 10:08
timotimo you can mix roles in 10:09
with but or does, depending on where you want to put it
Summertime I think I've got a good enough idea of how to proceed now, thanks for your time :) 10:12
timotimo no problem :) 10:13
timotimo sitting at the gpw paying not full attention to a talk that is interesting but i don't need to know the particular details 10:13
cpan-p6 New module released to CPAN! Bailador (0.0.18) by 03UFOBAT 12:58
tadzik \o/ 13:24
patrickb \o\o/o/ 13:25
timotimo whee 13:31
El_Che releasable6: status 13:46
releasable6 El_Che, Next release will happen when it's ready. 2 blockers. 0 out of 341 commits logged
El_Che, Details: gist.github.com/da6bb05710c2ca1dd8...a3480b3469
AlexDaniel working on it! 13:49
El_Che So, that's how passive-aggressive El_Che looks like :) 13:50
just kidding
cpan-p6 New module released to CPAN! gtk-v3 (0.8.0) by 03MARTIMM 14:00
discord6 <kawaii> where do we file comma issues? :] 14:12
sena_kun Comma website. You need to create an account there (start from "Buy" button ( ;) ), but you may skip the subscription part). Once you're logged in, you can use `feedback application`. 14:14
yoleaux 06:56Z <jmerelo> sena_kun: can I set the number of columns in comma in some way?
06:57Z <jmerelo> sena_kun: OK, I found it, in Code Style...
discord6 <kawaii> sena_kun, very minor gripe, it complains about a missing 'license' from my META6 file, when the correct spelling is actually licence :] 14:16
<kawaii> 'license' is a verb, licence is a noun, i.e this is the licence for the perl module 14:17
sena_kun >In the US version, license is used to imply both the noun and verb forms
sena_kun tries to remember what is in META6.json... 14:18
discord6 <kawaii> ah yes but American spellings are inherently wrong :]
sena_kun well, in META6.json we mostly use "license"...
discord6 <kawaii> support both perhaps?
sena_kun and I am anon-native folk anyway, so both US and UK is the same foreign thing for me. :P 14:19
sena_kun but, well, regarding the support. 14:19
if META6.json allows both, I think we should check both, yes.
sena_kun But I've mostly seen "license" up to now. 14:19
s/anon-native/a non-native/ 14:20
sena_kun META6 module thinks its "license" too. 14:21
ugh, *it's
discord6 <kawaii> eh, no big issue, we'll be keeping licence since it's correct in our locale, might be worth having all the tools know about both in the future 14:24
scimon Being a English speaker (not American English) we're mostly resigned to their spelling having taken over in coding (color??? Sigh). 14:41
discord6 <kawaii> which is a shame given that Americal English is more or less a fork of British English ;] 14:43
<kawaii> American* 14:44
sena_kun any kind of unification == good. what thing to use in particular doesn't matter too much, I think. I mean, that's just some signs to express sequences of sounds to express an image of a thing or a concept from our minds. 14:46
when speaking about e.g. "red color" meaning color of a tomato, but not a color of the sky, there is not so much difference between using "red" sequence of sounds or "asdf" sequence of sounds. Except for "we are used to 1, but not to 2". 14:47
or *colour, if this is really important. :) 14:48
AlexDaniel kawaii: keeping that in your META6.json file makes no sense to me 14:58
that file is very often read by tools, not humans
scimon Note the fork was done to be specifically backwards incompatible by Noah Webster. 15:01
AlexDaniel and yes, adding all possible variants to the spec doesn't make much sense to me
scimon (Running away)
AlexDaniel I guess the same logic can be used to demand tools to understand the word “license” in your favorite language… please, no localization in META6.json 15:01
lucasb localisation even! 15:02
AlexDaniel is it source-url that you can write in different ways?
AlexDaniel that thing: github.com/moritz/perl6-all-module...on#L16-L22 15:06
Xliff \o
AlexDaniel I think there's a difference between the two, but personally I don't know what that difference is :) 15:07
discord6 <kawaii> AlexDaniel: is it not more nonsensical to use a blatant misspelling? ;]
AlexDaniel if there was a misspelling, we'd deprecate one of the variants and submit PRs to all modules 15:09
at least that's what I'd do… 15:10
AlexDaniel luckily, it is spelled correctly :) 15:10
AlexDaniel
.oO( spelt :P )
15:11
xinming_ m: my %h = <a b c d e f>; %h.perl.say; %h<a c>.perl.say; 15:12
camelia {:a("b"), :c("d"), :e("f")}
("b", "d")
xinming_ Is there a shortcut to generate can we generate pairs also with keys? So we can have a sub-hash createed. 15:13
AlexDaniel m: my %h = <a b c d e f>; %h.perl.say; %h<a c>:kv.perl.say; 15:14
camelia {:a("b"), :c("d"), :e("f")}
("a", "b", "c", "d")
AlexDaniel m: my %h = <a b c d e f>; %h.perl.say; %h<a c>:p.perl.say;
camelia {:a("b"), :c("d"), :e("f")}
(:a("b"), :c("d"))
xinming_ Got, it 15:15
thanks
timotimo m: say"hello world" 15:23
camelia 5===SORRY!5===
Argument to "say" seems to be malformed
at <tmp>:1
------> 3say7⏏5"hello world"
Two terms in a row
at <tmp>:1
------> 3say7⏏5"hello world"
expecting any of:
infix
infix stopper
timotimo aaw
greppable6: refine_slang 15:26
greppable6 timotimo, 1 line, 1 module: gist.github.com/ee2540028af671d152...0f18ed38ac
discord6 <kawaii> regarding language, is it file to use special characters such as é in my module names? 15:28
<kawaii> fine* 15:29
timotimo the suggestion came up to try building a p6 slang where function names (and also sub names) would be usable both as foo_bar and fooBar automatically like in Nim
sena_kun please, don't.
it will technically work, I think, though.
timotimo but without a big screen i'm having a real hard time coding anything up
we're going to quite a bit of pain to make module names support exotic characters 15:30
sena_kun timotimo, what's the usecase for such a slang?
discord6 <kawaii> such characters are normally used to emphasise pronunciation
<kawaii> so I assumed due to the perly nature of perl 6, they would be fine in namespaces, unit classes etc 15:31
timotimo m: unit class Bööööööh; 15:32
camelia ( no output )
sena_kun m: class 千夜が可愛すぎて死んじゃうよ {};  千夜が可愛すぎて死んじゃうよ.new.say; 15:34
camelia 千夜が可愛すぎて死んじゃうよ.new
sena_kun m: class 「千夜が可愛すぎて死んじゃうよ」と言ってた {};  「千夜が可愛すぎて死んじゃうよ」と言ってた.new.say; 15:35
camelia 5===SORRY!5=== Error while compiling <tmp>
Unable to parse class definition
at <tmp>:1
------> 3class7⏏5 「千夜が可愛すぎて死んじゃうよ」と言ってた {};  「千夜が可愛すぎて死んじ
expecting any of…
discord6 <Rogue> That's a quoting construct isn't it? 15:36
sena_kun yup 15:36
m: class 千夜が可愛すぎて死んじゃうよと言ってた {};千夜が可愛すぎて死んじゃうよと言ってた.new.say;
camelia 千夜が可愛すぎて死んじゃうよと言ってた.new
sena_kun well, grammar-wise this will work too.
jmerelo releasable6: status 16:14
Xliff And my poor IRC client didn't get a single character of that. I had to go to the web irc logs to see what was going on! :)
releasable6 jmerelo, Next release will happen when it's ready. 2 blockers. 0 out of 341 commits logged
jmerelo, Details: gist.github.com/b3280b1502a1c9bca6...d090dc7864
AlexDaniel jmerelo: you can review this :) github.com/rakudo/rakudo/blob/rele...2019.03.md 16:19
jmerelo AlexDaniel++ 16:20
AlexDaniel it will be out today, waiting for releasable to crunch through all tests 16:21
jmerelo AlexDaniel: I would put a couple of ++ more, but you already get the idea. Great work :-)
AlexDaniel the whole dev team deserves ++'s, it took a lot of effort to fix all issues 16:22
discord6 <kawaii> wait, star release tonight?
AlexDaniel just rakudo 16:23
discord6 <kawaii> ah, sad violin
lucasb no starry night :)
Xliff AlexDaniel++ 16:25
Kaiepi looking good 16:27
mijo888 Hi, (bear with me, first time here and I'm not sure how this works) I don't understand why my TWEAK isn't being called here: 16:47
class DataSet is SetHash { submethod TWEAK { say 'hi'; } }; DataSet.new(<a b c d>);
No 'hi' is output when I run the code. Anyone help with this? 16:48
jmerelo mijo888: let me see 16:49
jmerelo m: class DataSet is SetHash { submethod TWEAK { say 'hi'; } }; DataSet.new(<a b c d>); 16:50
camelia ( no output )
jmerelo m: class DataSet is SetHash { submethod TWEAK { say 'hi'; } }; my $þ = DataSet.new(<a b c d>);
camelia ( no output )
jmerelo m: class DataSet is SetHash { has $.ð = 7; submethod TWEAK { say 'hi'; } }; my $þ = DataSet.new(<a b c d>);
camelia ( no output )
jmerelo m: class DataSet is SetHash { has $.ð = 7; submethod TWEAK() { say 'hi'; } }; my $þ = DataSet.new(<a b c d>); 16:51
camelia ( no output )
jmerelo mijo888: I'm pretty sure this is something we're missing... because that should work. 16:52
m: class DataSet { has $.ð = 7; submethod TWEAK { say 'hi'; } }; my $þ = DataSet.new(); 16:53
camelia hi
jmerelo mijo888: OK, we're getting somewhere. 16:54
mijo888 Thanks, I wasn't sure if I was missing something. 16:54
jmerelo mijo888: might be because somewhere the build chain is being interrupted. Shouldn't happen, but it might. new should call bless which calls BUILD.. and so on, but we might be missing something about the signature. 16:56
mijo888: meaning, we need to use a TWEAK with the self same signature as that one in the base class if we want it to be called. That should probably be documented.
mijo888: if you want, open an issue in the documentation. You can also ask in Stackoverflow or later on, might be a completely different reason. 16:57
mijo888 SetHash takes positional instead of named arguments, so I thought maybe that had something to do with it. But SetHash is a built-in class, so it seems like it should work as usual.
Right, thanks. I tried different Signatures, but couldn't find one that worked. 16:58
jmerelo mijo888: that should be documented, probably, as I said. Or maybe it's a bug. The example in the documentation, as a matter of fact, takes no arguments. 16:59
cpan-p6 New module released to CPAN! gtk-v3 (0.8.1) by 03MARTIMM 17:19
melezhik Hi! I would like execute a piece of code before an object is destroyed, how can I do that? 17:50
sena_kun you can implement `DESTROY` submethod. 17:51
however, consider that as any(or almost any) language with GC, you cannot really argue when it will be and if it will be ever called. 17:52
read github.com/perl6/doc/issues/1606
b2gills .tell mijo888 The reason `class DataSet is SetHash {…}` doesn't call `TWEAK` is that `new` is overridden. (It is a bug that it doesn't fallback to the normal operation.) github.com/rakudo/rakudo/blob/mast...m6#L19-L36 18:04
yoleaux b2gills: I'll pass your message to mijo888.
jmerelo b2gills++ 18:05
discord6 <kawaii> What is my Perl 6 equivalent of IO::Socket::INET? 18:51
Kaiepi discord6, help 18:57
hm
tadzik kawaii: it's IO::Socket::INET :P 19:03
docs.perl6.org/type/IO::Socket::INET
built-in
discord6 <kawaii> that makes sense, thanks tadzik! 19:12
mantovani the downside in learn Perl6 is that you don't want to use anything else, and I can't use Perl 6 at work. 19:35
:(
:'(
now my work is 100x boring than before
tadzik what do you use at work? 19:45
mantovani: ^ 19:46
jmerelo .tell AlexDaniel can I do the extraofficial official announcement of the next version tomorrow? 19:53
yoleaux jmerelo: I'll pass your message to AlexDaniel.
discord6 <kawaii> docs.perl6.org/routine/pack 22:15
<kawaii> is this the same as perl 5's 'pack'?
tadzik pretty much, yes
AlexDaniel .tell jmerelo sure 22:22
yoleaux AlexDaniel: I'll pass your message to jmerelo.
SmokeMachine class DataSet  is SetHash { submethod TWEAK(|)  { say 'hi'; } };  DataSet.new(<a b c d>);
m: class DataSet  is SetHash { submethod TWEAK(|)  { say 'hi'; } };  DataSet.new(<a b c d>); 22:23
camelia ( no output )
AlexDaniel El_Che: IT HAPPENED!!! 22:25
El_Che: in case you later say that it was too quiet :) 22:26
discord6 <kawaii> I'm working on a Perl 6 port of Net::RCON, it's pretty much my first self-written module, would anyone be so kind as to perhaps provide any feedback so far, tips and ways I can improve? I'd really like to contribute to the ecosystem more. github.com/shuppet/p6-net-rcon/blo...t/RCON.pm6 22:30
discord6 <kawaii> (the original module can be found here, fastapi.metacpan.org/source/CHANDW...t/RCON.pm) 22:30
Kaiepi kawaii: i'd read docs.perl6.org/language/objects, you're writing this as if it's a perl 5 class 23:01
kawaii: also no need to 'use IO::Socket::INET', it's a core module
discord6 <kawaii> Keiepi: yes the idea is to refactor so it's $connection.authenticate(); and so on, but this is a start :] 23:17
<kawaii> and thanks! I assume no need for IO::Socket::INET in the dependencies section of my META6 file either? 23:18