»ö« 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:00 dugword joined 00:01 zoll left 00:04 cdg joined 00:07 cdg_ left 00:08 cdg left 00:10 pompomcrab left 00:12 zoll joined 00:13 Celelibi joined 00:14 sufrostico joined, nadim left 00:20 Cabanossi left 00:23 Cabanossi joined 00:24 Ptolemarch joined 00:28 someuser left 00:31 espadrine left 00:36 jeromelanteri joined 00:39 lookatme joined
lookatme morning 00:39
yoleaux 25 Jul 2017 15:08Z <zengargoyle> lookatme: that video has been make public now, so it's all good.
00:42 mcmillhj joined 00:43 sufrostico left 00:47 Ptolemarch left, mcmillhj left 00:52 Cabanossi left 00:53 Cabanossi joined 00:59 mcmillhj joined 01:03 mcmillhj left 01:05 adu left 01:22 cdg joined 01:25 Actualeyes joined 01:27 cdg left 01:29 mcmillhj joined 01:34 mcmillhj left 01:46 mcmillhj joined 01:47 ilbot3 left 01:50 Cabanossi left 01:51 mcmillhj left, ilbot3 joined, ChanServ sets mode: +v ilbot3 01:52 Cabanossi joined 02:02 noganex joined 02:04 dugword left 02:05 jeromelanteri left, noganex_ left 02:12 mcmillhj joined 02:14 geekosaur left 02:15 geekosaur joined 02:17 mcmillhj left 02:19 moritz_ joined, konsolebox left, notbenh left, zengargoyle left, xinming left, moritz left, zengargo1le joined, xinming_ joined, freeze left, MilkmanDan left, notbenh joined, freeze joined 02:20 MilkmanDan joined, charsbar joined, Guest89848 left 02:21 giraffe joined, konsolebox joined, giraffe is now known as Guest17892, Cabanossi left 02:22 Cabanossi joined 02:24 mcmillhj joined 02:28 benjikun joined
benjikun Could someone help 02:28
I keep trying to do zef install Text::CSV
but I keep getting: ===> Fetching [FAIL]: Text::CSV:ver('0.008'):auth('github:Tux') from git://github.com/Tux/CSV.git
02:29 mcmillhj left
lookatme It should be [email@hidden.address] 02:30
benjikun why is zef getting it from the wrong source 02:31
MasterDuke benjikun: i can `git clone git://github.com/Tux/CSV.git`. do you have ssh keys set up with github? 02:33
benjikun no i dont
lookatme I depend on the META file provide by author 02:34
raw.githubusercontent.com/Tux/CSV/...META6.json
The url in the meta file is wrong
benjikun so how do I fix it 02:35
MasterDuke benjikun: you can always clone the module manually, and then do something like `zeg install .` from its directory
lookatme maybe this also working: zef install github.com/Tux/CSV.git 02:36
MasterDuke so you'd clone from the https url (which i think it just the git:://<...> url with https:// instead of git://)
lookatme yeah, it works, benjikun you can manual provide the repo url
zef install github.com/Tux/CSV.git
MasterDuke lookatme++ that's even easier
lookatme Yeah 02:37
benjikun gist.github.com/anonymous/466b8dec...faf8af077d
02:38 pharv joined
benjikun even zef install <github link> won't work 02:39
lookatme maybe u should install `zip` package
benjikun I get what I posted at the gist
already have it
lookatme Is unzip command available ? 02:40
benjikun yep
02:40 mcmillhj joined
lookatme OH, IDK.. 02:40
MasterDuke what if you try `zef install github.com/Tux/CSV/archive/master.zip`? 02:41
lookatme The last way is `git clone github.com/Tux/CSV.git` and `cd **directory**` and `zef install .`
benjikun gist.github.com/anonymous/522dcb79...99c558d635
02:41 dj_goku joined, dj_goku left, dj_goku joined
MasterDuke benjikun: what version is your zef and perl6? 02:42
lookatme zef --version
perl6 --version
02:43 rjk joined
benjikun gist.github.com/anonymous/80933cd5...2b2a63c053 02:43
ugh
02:43 rjk is now known as Guest65208
lookatme maybe you can update your zef command 02:45
02:45 mcmillhj left
lookatme zef --force install zef 02:45
or upgrade ? 02:46
ugexe clone zef and `perl6 -Ilib bin/zef uninstall zef && perl6 -Ilib bin/zef install .`
your perl6 is likely too new to run the old version of zef you are using 02:47
oh rakudobrew
rakudobrew nuke moar-nom
rakudobrew build moar 2017.07
rakudobrew switch moar-2017.07 02:48
rakudobrew build zef
02:51 Cabanossi left 02:52 Cabanossi joined
Guest65208 Yeah I guess you failed to keep that from me and why would you keep it from me 02:52
02:57 mcmillhj joined 03:00 noganex_ joined 03:02 mcmillhj left, noganex left 03:05 AlexDani` joined, Actualeyes left 03:06 AlexDaniel left 03:09 cpage_ left 03:13 mcmillhj joined
benjikun ugexe: I did all of that 03:16
still doing the same thing
03:17 mcmillhj left
benjikun "No fetching backend available" 03:18
"No extracting backend available"
any more recommendations anyone? 03:19
ugexe impossible, the instructions i gave you do not require a fetching or extracting backend 03:20
lookatme IDK, all works well on my fedora
03:20 Cabanossi left
benjikun I rebuilt rakudo and zef 03:20
still did the same thing
lookatme benjikun, show us `zef info zef` 03:21
benjikun gist.github.com/anonymous/84b90c9e...2f5966baca
lookatme I dont' think it's last zef release 03:22
my version is 0.1.13
zef
benjikun it's the one rakudobrew built hm
03:22 Cabanossi joined
ugexe zef if version 0.1.25 03:23
is
benjikun how can i remove zef with rakudobrew
lookatme I'm not using rakudobrew, I install rakudo from source 03:24
Yeah, the last version is 0.1.25, I see it 03:25
benjikun gist.github.com/anonymous/a86c589f...8165a3c417 03:26
03:26 pompomcrab joined
benjikun how does that not update it 03:26
lookatme benjikun, I recommend you uninstall all thing about rakudo, and do a clean install
benjikun how do I uninstall it all if I compiled it with rakudobrew
ugexe rakudobrew nuke moar-nom, which i thought you said you did 03:27
03:27 AlexDani` left, AlexDani` joined
ugexe if you have to ask how to use rakudobrew you should probably not use it 03:27
03:27 mcmillhj joined
benjikun I did 03:28
ugexe try `rm -rf ~/.perl6`
benjikun alright now I'm compiling it without rakudobrew 03:30
03:32 mcmillhj left, AlexDani` left 03:35 Cabanossi left 03:36 Cabanossi joined
benjikun gist.github.com/anonymous/04c49ec7...7f053d1988 03:37
That arose from be running 'perl6 -Ilib bin/zef install .'
lookatme ugexe ^^ 03:40
03:43 ufobat joined 03:44 mcmillhj joined
ugexe did you check your perl6 -v to make sure you are running the version you think you are? 03:45
03:46 cpage_ joined 03:49 mcmillhj left 03:50 pompomcrab left 03:53 Guest65208 left 04:05 Actualeyes joined 04:09 raiph joined 04:13 mcmillhj joined 04:14 dead1 joined 04:15 skids left 04:18 mcmillhj left 04:19 dead1 left 04:20 deep-book-gk_ joined, raiph left 04:22 deep-book-gk_ left 04:28 mcmillhj joined 04:32 mcmillhj left 04:35 GhostKenical joined 04:36 GhostKenical left 04:42 baest left 04:47 pompomcrab joined, pompomcrab left 04:48 mcmillhj joined 04:54 khw left 04:55 mcmillhj left 05:20 Cabanossi left 05:21 Cabanossi joined 05:29 baest joined 05:30 astj left, astj joined 05:38 xtreak joined 05:42 baest left 05:44 AlexDani` joined 05:49 Cabanossi left 05:52 Cabanossi joined 05:53 benjikun left 05:58 wamba joined 06:00 dugword joined 06:02 astj left 06:03 astj joined 06:04 abraxxa joined 06:12 andrzejku joined 06:13 mr-foobar joined 06:14 dugword left 06:16 AlexDani` left 06:17 baest joined 06:20 unop joined
lookatme :) 06:25
06:28 Ven joined, Ven is now known as Guest24574 06:34 wamba left 06:39 AlexDani` joined 06:40 domidumont joined, AlexDani` is now known as AlexDaniel 06:41 lowbro joined, lowbro left, lowbro joined
lizmat www.evanmiller.org/why-im-learning-perl-6.html # nice! 06:45
news.ycombinator.com/item?id=14848255 # HN comments
06:46 domidumont left
lookatme lizmat++ 06:47
06:47 domidumont joined, lowbro left 06:49 lowbro joined, lowbro left, lowbro joined 06:50 Cabanossi left 06:51 Cabanossi joined 06:52 Guest24574 left 06:53 Ven_ joined 06:54 xtreak left 07:01 xtreak joined 07:03 Ven_ left 07:04 xtreak_ joined, xtreak left 07:07 kst` left 07:09 nadim joined 07:12 k-man left 07:16 xtreak_ left 07:22 robertle left 07:25 parv joined 07:34 rindolf joined 07:35 darutoko joined 07:36 wamba joined
samcv what's a better error for this: 07:48
m: my @a; @a[Int]
camelia Indexing requires an instance, tried to do: @a[ (Int) ]
in block <unit> at <tmp> line 1
samcv maybe Indexing requires a defined variable? # though still this doesn't really match how our other errors are 07:49
07:53 k-man joined
samcv Unable to call postcircumfix @a[ ] with an undefined Int. Indexing requires a defined object 07:53
maybe that?
07:53 mcmillhj joined
lookatme samcv, with an type object ? 07:58
samcv Unable to call postcircumfix @a[ (Int) ] with a type object. 08:00
Indexing requires a defined objec
lookatme, how's that?
lookatme samcv, seems like ok 08:01
samcv cool. yeah that sounds more like other error messages-
08:01 zakharyas joined, jonas1 joined 08:03 mcmillhj left 08:04 parv left 08:11 jeromelanteri joined 08:15 dakkar joined 08:25 amalia__ joined 08:29 andreoss joined 08:40 xtreak joined, brrt joined 08:43 xtreak left 08:46 dakkar_ joined 08:47 brrt left 08:49 dakkar left 08:59 robertle joined 09:03 wamba left 09:06 exprosic joined, exprosic left, pmurias joined 09:09 wamba joined 09:15 lumimies left, Spot__ left, melezhik left 09:17 hahainte1net joined 09:21 hahainternet left, benchable6 left, bloatable6 left, quotable6 left, unicodable6 left, bisectable6 left, evalable6 left, obra left, evalable6 joined, Cabanossi left, plicease left, ChanServ sets mode: +v evalable6, lumimies joined, Spot__ joined, Spot__ left, Spot__ joined, lumimies left, lumimies joined 09:22 obra_ joined, Cabanossi joined, plicease_ joined 09:24 TEttinger left, camelia left, bisectable6 joined, ChanServ sets mode: +v bisectable6, unicodable6 joined, ChanServ sets mode: +v unicodable6 09:28 camelia joined 09:29 ChanServ sets mode: +v camelia 09:44 brabo left 09:45 brabo joined 09:48 nadim left, nadim joined 09:54 bjz joined 10:01 eliasr joined 10:11 AlexDani` joined, AlexDaniel left 10:14 parv joined 10:16 araujo left 10:20 parv left, Cabanossi left, Actualeyes left 10:21 Cabanossi joined 10:28 emeric joined 10:30 AlexDani` is now known as AlexDaniel 10:36 rindolf left 10:39 espadrine joined 10:46 diegok joined 10:48 bjz left 10:50 Cabanossi left 10:51 Cabanossi joined 10:54 Woodi joined
Woodi hallo :) 10:54
Perl6 was hacknewsed :) 10:55
10:57 ZofBot left, ZofBot joined, ChanServ sets mode: +v ZofBot 10:58 gdonald left
pmurias if I want to write a slang what should I look at? 11:01
timotimo maybe Tuxic, maybe the SQL one, maybe Piersing 11:02
pmurias I found some old slang docs: mouq.github.io/slangs.html, but it seems to be removed from the current ones
timotimo perhaps all you need to do is use refine_slang 11:04
instead of fiddling with %*LANG (which is going away)
the whole section about export and the language braid could be replaced with like two lines of text and a short code example
11:06 someuser joined 11:10 gdonald joined 11:17 pharv left 11:22 parv joined 11:26 adu joined
jeromelanteri timotimo, how to pass a string where content is kind of %type<my_key> ? (like "%type{my_key}" ... "%type<my_key>" doesn't woks to) 11:29
11:29 wamba left
jeromelanteri :m %try = { first => "waw", second => "re-waw"}; say "waw => %try<first>"; 11:30
timotimo i don't understand the question
m: my %try = { first => "waw", second => "re-waw"}; say "waw => %try<first>";
camelia Potential difficulties:
Useless use of hash composer on right side of hash assignment; did you mean := instead?
at <tmp>:1
------> 3 = { first => "waw", second => "re-waw"}7⏏5; say "waw => %try<first>";
waw => waw
jeromelanteri if i want to put a value (who is Str) from inside a string ?
timotimo m: my %try = { first => "waw", second => "re-waw"}; say "waw" => %try<first>";
camelia 5===SORRY!5===
Two terms in a row
at <tmp>:1
------> 3d => "re-waw"}; say "waw" => %try<first>7⏏5";
expecting any of:
infix
infix stopper
postfix
statement end
statement modifier
timotimo m: my %try = { first => "waw", second => "re-waw"}; say "waw" => %try<first>;
camelia Potential difficulties:
Useless use of hash composer on right side of hash assignment; did you mean := instead?
at <tmp>:1
------> 3 = { first => "waw", second => "re-waw"}7⏏5; say "waw" => %try<first>;
waw => waw
timotimo oh, of course 11:31
m: my %try = first => "waw", second => "re-waw"; say "waw" => %try<first>;
camelia waw => waw
timotimo you mean how to interpolate a value from inside a hash into a string?
m: my %try = first => "waw", second => "re-waw"; say "here's waw: %try<first>"
camelia here's waw: waw
11:32 andrzejku left 11:34 Cabanossi left 11:35 adu left 11:36 Cabanossi joined 11:47 rindolf joined 12:01 zakharyas left 12:07 MilkmanDan left, MilkmanDan joined 12:11 raschipi joined 12:12 Geth left 12:15 parv left 12:33 wamba joined, sherwool joined
nadim hi, what's the use of the 'provides' section in META6? 12:33
timotimo it tells "use"rs what things can be "use"d from this distribution 12:36
i.e. if it isn't in provides, you can't "use" it without a "use lib" (which should be considered a hack if you're making a distribution) 12:37
12:37 Geth joined
Woodi installing R* 2017.07 tries to scan filesystem from / to find git repos, probably some strange defaults... 12:41
timotimo i think it does that to make sure you're not accidentally running the installation procedure from inside the rakudo star repository 12:42
Woodi also DBish probably didn't install becouse tests failed, eg. trying to connect to mysql with specific user and pass :)
timotimo no, when the tests can't connect to the db in question, the whole test suite for that driver is skipped
Woodi but modules will bi installed ? 12:43
jeromelanteri timotimo, yes, i have to go with prompt-for("my string..."); but i can not use prompt-for(%hash<key>); then i try to do something like prompt-for("%hash<key>"); 12:44
but failed
timotimo you can either .Str at the end or ~ in the front
jeromelanteri like prompt-for("~%hesh<key>"); ? 12:45
or prompt-for(%hash<key>.Str) 12:46
12:46 andreoss left
jeromelanteri i try... 12:46
12:46 faraco joined
timotimo without " " around it when you put ~ in front 12:47
but just "%hash<key>" should also work (as long as you don't typo the variable name)
jeromelanteri timotimo, works together, but warning said "Useless use of hash composer on right side of hash assignment; did you mean:= instead? at .... 12:48
12:49 zakharyas joined
jeromelanteri so it is a CLI use script... may it be better ? 12:49
12:51 wamba left
timotimo you have to remove the { } around your hash literal 12:52
it must be either my %foo = a => 1, b => 2;
Aaronepower Hello, how do you turn a dictionary into named arguments?
timotimo or, if you have a specific reason to do exactly that, and you know why you're doing it: my %foo := { a => 1, b => 2 }
12:52 lucasb joined
timotimo Aaronepower: just put a | in front when you do the call 12:52
12:53 mcmillhj joined
jeromelanteri timotimo, that's it ! why this happened ? does it mean it was a reference of hash ? 12:53
timotimo assignment to a hash wants a list of contents. either pairs or an even number of things that will become key, value, key, value, ... 12:54
assignment into lists and hashes is "copying", which means that my %foo = { a => 1, b => 2
oops 12:55
faraco sounds like list and scalar context plays a big role.
timotimo assignment into lists and hashes is "copying", which means that my %foo = { a => 1, b => 2 } ends up unpacking the hash on the right hand side and putting the individual thigns into the hash on the left hand side
jeromelanteri oh ok. thenk you for explications. fine. 12:57
faraco How can I start contributing to Rakudo? I want to try to fix bugs as a learning experience (never did in for any programming language community) 12:58
timotimo faraco: that's probably easiest to explain when you've got a particular bug you'd like to fix
there are many parts to rakudo that all need slightly different expertise 12:59
the core setting, i.e. all classes, their methods, and subroutines, as well as operators, are implemented in perl6. that's the core setting and you find all that code in src/core and src/core.d for anything only in v6.d
faraco sounds like an advanced thing to even begin with :O 13:00
timotimo if something doesn't parse or parses wrong, that'd be in src/Perl6/Grammar.nqp and if the parse results in something wrong, that'd be src/Perl6/World.nqp or src/Perl6/Optimizer.nqp
those three are written in nqp, which has slightly different rules from perl6
but the grammar is mostly just perl6 grammars & rules, which are the same in perl6 and nqp 13:01
the core setting has many parts that have been written using nqp::blah ops, even though the code is perl6 code
if you get stuff like segfaults, you'll most probably have to look into MoarVM, which is written in C. that requires completely different expertise, IMO
faraco timotimo++ thanks. I'll gonna learn nqp if it is the key to get into the rakudo development. 13:02
timotimo we have something very good for that :) 13:03
github.com/edumentab/rakudo-and-nq...als-course
hard to believe this is already 4 years old
Woodi R* installed ! just 2h. but panda was installed succesfully ;) P4 32bit here. and it runs a bit faster then before :) 13:04
13:04 LeCamarade left
faraco again thanks 13:04
Woodi thanks and later 13:05
13:05 Woodi left, shlomif joined, LeCamarade joined
timotimo but woodi 13:07
please use zef instead of panda
13:07 rindolf left, shlomif is now known as rindolf
jeromelanteri :m %a = a => '_a', b => [ c=>'b', d => 'b']; $b = "c"; say %a<$b>; 13:11
m: %a = a => '_a', b => [ c=>'b', d => 'b']; $b = "c"; say %a<$b>; 13:12
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '%a' is not declared
at <tmp>:1
------> 3<BOL>7⏏5%a = a => '_a', b => [ c=>'b', d => 'b']
jeromelanteri m: %a = (a => '_a', b => [ c=>'b', d => 'b']); $b = "c"; say %a<$b>;
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '%a' is not declared
at <tmp>:1
------> 3<BOL>7⏏5%a = (a => '_a', b => [ c=>'b', d => 'b'
faraco Also, I see that Perl 6 has something called Parser and token. Are they used to create programming language or DSLs? 13:13
jeromelanteri m: %a = a => '_a', b => [ c=>'b', d => 'b']; $b = "c"; say %a{$b};
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '%a' is not declared
at <tmp>:1
------> 3<BOL>7⏏5%a = a => '_a', b => [ c=>'b', d => 'b']
jeromelanteri m: my %a = a => '_a', b => [ c=>'b', d => 'b']; $b = "c"; say %a{$b}; 13:14
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '$b' is not declared
at <tmp>:1
------> 3 = a => '_a', b => [ c=>'b', d => 'b']; 7⏏5$b = "c"; say %a{$b};
jeromelanteri m: my %a = a => '_a', b => [ c=>'b', d => 'b']; my $b = "c"; say %a{$b};
camelia (Any)
jeromelanteri m: my %a = a => '_a', b => [ c=>'b', d => 'b']; my $b = "c"; say %a<$b>;
camelia (Any)
jeromelanteri m: my %a = a => '_a', b => [ c=>'b', d => 'b']; my $b = "c"; say %a<b><$b>; 13:15
camelia Type Array does not support associative indexing.
in block <unit> at <tmp> line 1
perlpilot faraco: where did you see that Perl 6 has something called "Parser"?
timotimo you have to use <<$b>> if you want $b to mean "what's inside $b"
faraco perlpilot: whoops my mistake. it is called 'grammar'. 13:16
13:16 andrzejku joined
perlpilot faraco: yeah, grammars are composed of regex, rules, and tokens, and they can be used to make other languages or DSLs. 13:17
timotimo or for parsing whatever data you come across 13:18
faraco perlpilot: that is cool! I did a few rackets and interested in building DSL. I hope I knew this earlier.
few programs in racket*
timotimo there was a presentation about perl6 and DSLs
fosdem.org/2017/schedule/event/informal_dsl/ 13:19
faraco thanks!
timotimo it may not look like it but the little play button gives you a video recording
jeromelanteri i have this: [ {g => 'def', repos => []}, {g=>'try', repos => [{title => 'a title', url => 'my_url'}] } ]
inside this: %datas
and, my %group = %datas<group>.first: {$_<group> eq 'try'}; 13:20
but at: %repo = %group<repos>.first: {$_<<$object>> eq $object_name }; 13:21
perl6 no happy... it said that
timotimo you've put a hash object on the RHS of that assignment? 13:22
jeromelanteri odd number of elements found where hash initializer expected: Only saw 1 element.
RHS ?
timotimo right. here's where you either unpack the hash by putting an @(...) around it (gives you the individual pair objects that then go into %repo)
Right Hand Side
or you use := which makes %repo the exact same object that's inside your %datas 13:23
i.e. any change to %repo will also change the hash that's somewhere inside %datas
13:23 araraloren joined 13:24 skids joined
jeromelanteri use of := for %repo show erre Type check failed in binding: expected associativ,e but got Nil (Nil) 13:25
perlpilot jeromelanteri: can you show us the real code? Or a small, complete example that exhibits the behavior you see? 13:26
jeromelanteri yes
timotimo m: my %datas = foo => { a => 1, b => 2 }; my %foo-data = %datas<foo> # doesn't work 13:28
camelia ( no output )
timotimo er, it does, huh?
13:28 araujo joined, araujo left, araujo joined
timotimo i wonder how you get your error, then 13:29
Zoffix m: my %datas is default(Nil) = foo => Nil; my %foo-data := %datas<foo> 13:33
camelia Type check failed in binding; expected Associative but got Nil (Nil)
in block <unit> at <tmp> line 1
jeromelanteri gist.github.com/jerome-diver/0930e...8540eb8ffe 13:34
Zoffix jeromelanteri: .first returns Nil when it doesn't find anything
jeromelanteri: doesn't look like you're using %repo anywhere; if that's all of the code, you can rewrite that return to `return so Nil !=== %group<repos>.first: { $_<<$object>> eq $object_name };` 13:35
timotimo Zoffix: you think if we only have one value on the RHS of hash assignment we should output the type that's been found? 13:36
Zoffix jeromelanteri: or `return defined .... first ...`
jeromelanteri: depending on whether you want to find if .first found anything or whether the found thing is defined also
timotimo: I don't understand the question... 13:37
jeromelanteri Zoffix, i check first that %group<repos> has sone or more element(s).
i ckechED
at ligne 7
timotimo m: my %foo = 1
camelia Odd number of elements found where hash initializer expected:
Only saw: 1
in block <unit> at <tmp> line 1
timotimo "only saw one Int"
Zoffix jeromelanteri: this is wrong: $_<<$object>>
jeromelanteri Zoffix, what it should be ? (IDK) 13:38
Zoffix jeromelanteri: should be $_.{ $object } or just .{ $object }; «» interpret whispace
jeromelanteri ok, let's try...
Zoffix m: my $o = "one two three"; dd «$o».elems
camelia 3
Zoffix jeromelanteri: won't fix your problem. I'm just saying that code is wrong.
jeromelanteri ok 13:39
timotimo oh damn, i hadn't thought of whitespace in << >>
jeromelanteri m: %g = a=>'_a', b=>[]; say %g<b>.elems; 13:40
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '%g' is not declared
at <tmp>:1
------> 3<BOL>7⏏5%g = a=>'_a', b=>[]; say %g<b>.elems;
Zoffix jeromelanteri: %group<repos>.elems is also wrong, unless you can guarantee <repos> will always have a list in it
jeromelanteri m: my %g = a=>'_a', b=>[]; say %g<b>.elems;
camelia 0
Zoffix jeromelanteri: should be %group<repos>:v.elems
m: my %group; dd [%group<repos>.elems, %group<repos>:v.elems ]
camelia [1, 0]
Zoffix jeromelanteri: without `:v` you get an `Any` which .elems'es to a 1-element list containing an Any 13:41
jeromelanteri Zoffix, ok
Zoffix, but same error 13:42
m: my %g = a=>'_a', b=>[]; say %g<b>.elems;
camelia 0
jeromelanteri not Any.
Zoffix jeromelanteri: what's the error? 13:43
perlpilot m: my %g = a=>'_a', b=>[]; say %g<q>.elems; # jeromelanteri
camelia 1
jeromelanteri Type check failed in binding; expected Associative but got Nil (Nil)
Zoffix jeromelanteri: did you fix your issue with attempting to assign the Nil from .first to %hash? 13:44
13:44 mr-foobar left
jeromelanteri Zoffix, did you see my code ? and the content of the datas ? 13:45
nothing is empty when error happen.
when something empty, the condition check with elems jump this line
so the error occur when it is NOT empty. 13:46
Zoffix jeromelanteri: there's no jumping here: gist.github.com/jerome-diver/0930e...eck-pm6-L9
jeromelanteri: and it's comparing URL to TITLE because I guess you've used $title instead of $url here: gist.github.com/jerome-diver/0930e...ck-pm6-L18 13:47
jeromelanteri ligne 8
unless (%group<repos>.elems ==0) {
so litteraly, do that if the content is NOT empty.
so ligne 9 code occur when it is not empty. 13:48
correct ?
(sorry, but it is the iddentation who is wrong... )
Zoffix jeromelanteri: yes, but if the line 9's .first doesn't find any it'll return a Nil, which they will be bound to %repos which causes the error you're seeing;
jeromelanteri i do update and iddent well the ligne 9
Zoffix jeromelanteri: untested, but I think your first sub can be cleaned up and written like this: gist.github.com/zoffixznet/3d74bdc...b1c12f4987 13:49
jeromelanteri Zoffix, that's strange... i'm going to do a say %group<repos> before for see
Zoffix jeromelanteri: fix line 18. You're using $title instead of $url 13:50
jeromelanteri Zoffix, yes, exact. 13:51
but actualy, the error occur from line 17
and say %group<repos> show that it is NOT empty
Zoffix jeromelanteri: also, in Rakudo you don't need parenstheses on if {}/unless {} conditions. You can just write them as `unless git_repo_exist $url { return "remote repo failed"; }` or even `return "remote repo failed" unless git_repo_exist $url` 13:52
jeromelanteri: sure, but does it have the matching data?
jeromelanteri there is: [{title => air-line, url => .....}]
Zoffix, ok
Zoffix jeromelanteri: and what's in $title and $url? 13:53
jeromelanteri title => air-line
Aaronepower Hello, in HTTP::UserAgent how do you send json? It seems it only supports form data?
jeromelanteri url (see in my code the yaml file... it is exactly the same content...
Zoffix jeromelanteri: OK, so line 18 will fail, because it's checking whether `url` field has value `air-line` 13:54
jeromelanteri Zoffix, oh well... waiting
Zoffix jeromelanteri: and your code is broken so instead of returning False, it'll fail when binding a Nil to %repos
m: my %group = repos => [{title => "air-line", url => ".....}] 13:55
camelia 5===SORRY!5=== Error while compiling <tmp>
Unable to parse expression in double quotes; couldn't find final '"'
at <tmp>:1
------> 3e => "air-line", url => ".....}]7⏏5<EOL>
expecting any of:
double quotes
Zoffix m: my %group = repos => [{title => "air-line", url => "....."}]; my %repos := %group<repos>.first: *<url> eq 'https'
camelia Use of Nil in string context
in whatevercode at <tmp> line 1
Type check failed in binding; expected Associative but got Nil (Nil)
in block <unit> at <tmp> line 1
jeromelanteri Zoffix, $title (so the title i want to check if exist or not) is a string, and it exist same i write it at prompt question time 13:57
same for $url.
the principe is to check inside datas that it exist already or not.
oh waiting, i'm try to understanding what i'm reading from your code test
i'm trying to understand 13:58
Zoffix Well, fix your .first so it returns False instead of trying to bind a Nil to %respos. I explained a problem, showed it, and gave you alternate code without the problem. I don't know what else to do.
Aaronepower: briefly looking at source, don't see that option for .post but you can make your own HTTP::Request and use .add-content on it 13:59
jeromelanteri Zoffix, oh i think i understand... there is no occurence ofon test, then it can not store the data inside %repo... correct ?
it return Nil 14:00
Zoffix Right.
jeromelanteri OMG!
Zoffix, thank you. and thank you timotimo to... 2 errors in one line ! 14:01
14:03 AlexDaniel left
faraco I believe I did try distribute a module to perl 6 modules. I used something like Perl Dist::Zilla, but I forgot the name. Is there any similar tool that does the similar thing? 14:03
14:03 AlexDaniel joined, lucasb left
Zoffix buggable: eco mi6 14:04
buggable Zoffix, App::Mi6 'minimal authoring tool for Perl6': github.com/skaji/mi6
jeromelanteri Zoffix, timotimo like this, it works: gist.github.com/jerome-diver/0930e...8540eb8ffe
faraco AlexDaniel: Hi, the formatting works great. However, how can I test the code examples with running make xtest. It takes too much memory for me (32 bit pc)
Zoffix: that's it. Thanks.
Zoffix faraco: that? ^ it's a far cry from Dist::Zilla but IIRC it works
faraco AlexDaniel: without running make xtest* 14:05
AlexDaniel faraco: perhaps you can run the test file directly (the one you are interested in)
Zoffix Aaronepower: perl6 -MHTTP::UserAgent -e 'my $req = HTTP::Request.new: POST => "httpbin.org/post", Authorization => "Zofmeister"; $req.add-content: "[42]"; with HTTP::UserAgent.new.request($req) { .content.say }'
jeromelanteri may i write (if need) something like that:
Zoffix Aaronepower: there should definitely be an easier way to do that. Maybe you could hack up a PR? :) 14:06
jeromelanteri %x := $_ if %y<z>.first *$_.{$z} eq $aa;
Aaronepower Zoffix: I'm only just learning perl6
Zoffix jeromelanteri: change `if` to `with` 14:07
pmurias how should a module that implements a JSX-like slang in Perl 6 be called?
AlexDaniel faraco: … but I wonder why would it need any huge amounts of memory
pmurias it would allow stuff like my $foo = <span>Here is a span</span> 14:08
jeromelanteri Zoffix, ok
Zoffix pmurias: JSX.pm6 :)
AlexDaniel faraco: do you know at what point exactly it runs out of memory?
Zoffix pmurias: Though I guess Slang:: prefix could be useful as a warning to people that the module is using unsupported, unspecced, can-=break-at-any-time features.
Zoffix & 14:09
faraco AlexDaniel: Oh I'm sorry for my vague statement. By a lot of memory, I meant it takes around 2 hours to complete test. Not including how my other running programs became unresponsive quickly. Installing App::mi6 and I just got 7 seconds delay on the app testing. 14:10
I don't blame the tools, I blame my hardware. 14:11
AlexDaniel faraco: what about doing just: perl6 xt/examples-compilation.t
faraco: in other words, just test examples and don't run any other xtests 14:12
faraco AlexDaniel: thanks. I didn't know what to test before. Now I know, and that saves a lot of time from now on.
AlexDaniel++
14:12 linuksz joined
AlexDaniel faraco: ah, also, it seems to accept a list of files as arguments 14:12
faraco: github.com/perl6/doc/blob/master/x....t#L22-L23 14:13
faraco: so you can tell it to test some specific file only
[Coke] faraco: if you can't run make xtest, don't worry about it; thank you for trying, though. 14:14
... and also what alexd said.
linuksz this code is in the signature of MAIN, and it don't work if $rotate is not given in the command line:
Str :$rotate
where { $rotate ~~ /right|left/ || note "Direction only can be 'left' or 'right'." },
[Coke] (I need to make a utility that runs all the tests but only on a given file) 14:15
perlpilot Aaronepower: submitting a PR is a great way to learn things :)
faraco awesome!
timotimo linuksz: you need a case for rotate not being set; the where clause will always be called 14:16
i.e. !$rotate.defined || $rorate ~~ ... || note blah
linuksz in the where clause? 14:17
timotimo yup
linuksz it works! thanks! 14:19
14:19 nadim left
timotimo YW 14:19
Aaronepower perlpilot: Sure, but I'm having enough trouble making a basic script. 14:21
Zoffix linuksz: you have a bug in your code "foobarlefter" will also be accepted. Use `$rotate eq <left right>.any or note "blah blah"`. There's also Subset::Helper module: sub MAIN ($foo where subset-is <right left>.any, "Direction only can be 'left' or 'right'.") {…} 14:24
buggable: eco Subset::Helper
buggable Zoffix, Subset::Helper 'create awesome subsets': github.com/zoffixznet/perl6-Subset-Helper
Zoffix Oh, it wants a Callable *sigh*
sub MAIN ($foo where subset-is * eq <right left>.any, "Direction only can be 'left' or 'right'.") {…} 14:25
That module could use more love to make it better
jeromelanteri Zoffix, and can i write:
faraco Aaronepower: are you a Rust programmer?
14:25 Actualeyes joined, sufrostico joined
faraco if yes, damn. You are really good at what you are doing. 14:26
jeromelanteri defined $_ with %a.first: *<x> eq $y ?? return True !! return False;
Aaronepower faraco: Yes I am. How would I be good?
Zoffix You could improve NativeCall module to work with Rust libs :}
faraco I found this github.com/Aaronepower/tokei
Aaronepower Oh yea
That is me. 14:27
linuksz Zoffix, thanks
Aaronepower Zoffix: Rust -> language amounts to "Compile lib with C FFI functions and have the language call those". 14:28
Zoffix jeromelanteri: no, you're passing the result of the ternary as the arg to .first() and `with` already checks for definedness, so that defined() is useless. `return defined %a.first: *<x> eq $y`
Aaronepower: yeah, that don't work tho. One of the hypotheses for the issues we had was that the borrow checker thinks something was borrowed when we use the stuff from Rakudo
jeromelanteri Zoffix, oh yes... better ! 14:29
Aaronepower Zoffix: That wouldn't make sense since the borrow checker is at compile time.
Zoffix Ah
Then it was something else :) I recall lots of segfaults
14:30 raschipi left
Aaronepower faraco: tokei is inspired by a perl script. github.com/AlDanial/cloc 14:30
faraco that's cool. Thanks for introducing me to cloc also. 14:31
it looks like unix wc, but more descriptive? 14:32
14:33 sufrostico left
timotimo cloc also knows about comments and empty lines 14:33
at least sloccount does
i'm just assuming cloc also does that
huh, cloc contains stuff from sloccount, so maybe it's an enhanced version? who knows 14:34
faraco installing that right now. that is actually gonna be helpful for me.
Aaronepower faraco: I would recommend tokei over cloc if you're counting large repos brings minutes -> milliseconds. 14:35
14:36 domidumont left
faraco Aaronepower: will do. 14:38
14:39 sufrostico joined 14:44 sufrostico left 14:49 lowbro left, sufrostico joined, sufrostico left, sufrostico joined, Cabanossi left
Zoffix $ perl6 -MJSON::Fast -MWWW -e 'dd jpost("httpbin.org/post", to-json({:42a, :foo<meows>}), :Authorization<Zofmeister>).<json><foo>' 14:49
Str %result = "meows"
14:49 sufrostico left
Zoffix Aaronepower: ^ just added post that can post a body to WWW 14:49
and jpost automatically decodes response as JSON 14:50
14:50 andreoss joined
Zoffix zef --force install github.com/zoffixznet/perl6-WWW/ar...master.zip 14:50
How come GitHub removed .tar.gz option? Kinda annoying 'cause zip isn't available on debian by default :/
14:51 Cabanossi joined 14:52 sufrostico joined
Zoffix but they do provide a .tar.gz option for releases :/ github.com/zoffixznet/perl6-WWW/ar...001.tar.gz 14:52
14:54 jonas1 left 14:56 sufrostico left, astj left 14:57 astj joined 14:59 sufrostico joined
faraco question, if someone use 'use v6.c', will the user able to use the next version (eg. v6.d)? 15:00
15:00 khw joined
pmurias faraco: yes, but it will try to preserve compatability 15:01
faraco pmurias: alright I see. Thanks. I thought it will incompatible with each version (that gonna be sucks)
mspo is there a changelog for .c -> .d ?
faraco be incompatible*
15:02 wamba joined
Zoffix mspo: there's no .d yet, so no. 15:03
faraco github.com/perl6/6.d-prep - maybe that? not sure
oh
Zoffix faraco: use v6.c; will use 6.c version of the language. That script won't see any improvements/additions of 6.d
faraco that sounds familiar 15:04
thanks for the advice tho
Zoffix m: use v6.d.PREVIEW; await ^1000 .map: {start await Promise.in(2)}; say now - INIT now 15:05
camelia 2.3192678
Zoffix m: await ^1000 .map: {start await Promise.in(2)}; say now - INIT now
camelia (timeout)
Zoffix ^ when 6.d gets released, the default will be the 2.3s and any script that has use v6.c; will get the timeout version
faraco ain't it will be better if we just use v6; ? 15:06
15:06 wamba left 15:07 abraxxa left
Zoffix faraco: I'd imagine `use v6;` would give you latest stable, same as no version specified 15:07
mspo so it's like use perl5.000020 or whatever? 15:09
Zoffix m: use nqp; say v6.c ~~ v6
camelia True
mspo Zoffix: github.com/perl6/6.d-prep/blob/mas...EATURES.md ?
Aaronepower Why are there so many numbers for a version?
Zoffix mspo: not exactly, in Perl you get "old" version by default; in Rakudo you get latest stable by default; I think use v5.020 just gets you new features up to that version; it doesn't use the v5.020 compiler 15:11
mspo Aaronepower: in which case?
Zoffix mspo: URL ? <--- what are you asking?
Aaronepower: there's just one :) 6 and one letter :)
mspo Zoffix: those are the differences proposed for .d ?
Zoffix mspo: not even close. Those are just the features still to implement.
Aaronepower Zoffix: I mean in your version numbers. 1.003001 as an example
Zoffix Aaronepower: semver without the second dot 1.003001 == 1.003.001 == 1.3.1 15:12
semver.org/
Aaronepower Zoffix: Why all the extra zeroes> 15:13
ugexe in perl5 you cannot do 1.2.3
Aaronepower ?*
15:13 unop left
Zoffix mspo: a lot of 6.d features are already implemeneted in 6.c compiler. They're just not "officially" part of the language. Though now that we'll have proper infrastructure, they'll be more strict process. We'll also be releasing point language releases quarter,ly 15:13
Aaronepower: because otherwise I can only do 10 releases of each subversion and patch levels 15:14
Aaronepower Zoffix: ???
Zoffix: 1.9 -> 1.10 -> 1.11 ? 15:15
Zoffix Aaronepower: that doesn't have patch in it
semver is 3 numbers
Aaronepower Zoffix: I just omitted it, you can imagine a .0 on the end and it's still the same question. 15:16
Zoffix Aaronepower: you can't imagine a .0 on the end, since as I've said, I don't use the second dot. I use a proper good looking number, with a single dot
So lacking the second dot, I use two triplets of digits after the dot to indicate subversion and patch 15:17
mspo so you max out at 999 in the second and third positions
Zoffix Yeah. That's a long way to go tho :)
mspo can you use hex?
Zoffix I don't 15:18
mspo modified hex with roman numerals?
ugexe you can use whatever if the tooling knows what format it is
mspo I'm just making jokes. I don't even know where these numbers are listed 15:19
Zoffix in github.com/zoffixznet/perl6-WWW/ar...001.tar.gz
15:19 wamba joined 15:20 faraco left
ugexe metacpan.org/source/URI/File-Slurp-9999.18 15:21
15:22 cdg joined
mspo so cpan doesn't support two dots? 15:22
Zoffix metacpan.org/pod/release/ZOFFIX/Ac...ullAuto.pm
I win :)
15:25 nadim joined 15:26 wamba left
ilmari Zoffix: version is only varchar(16), so that won't index properly 15:29
(in the PAUSE DB)
Zoffix ilmari: yeah, I heard :)
timotimo we need version to be BLOB 15:30
ilmari LONGTEXT
15:31 nebuchadnezzar left
timotimo how i long for some good text 15:31
Zoffix yeah, it was tossed from PAUSE already. That's just Metacpan's page picking it up; probably from backpan
timotimo backpan, so, like, nap? 15:32
15:32 nebuchadnezzar joined
Zoffix doesn't know what nap is 15:32
Everything you ever uploaded to CPAN lives on on BackPAN, even after you delete it from PAUSE: backpan.perl.org/authors/id/Z/ZO/ZOFFIX/
ilmari y nap?
Zoffix hehe, Acme::BabyEater... good times :) 15:33
15:34 Skarsnik joined 15:40 st_elmo joined, robertle left 15:50 sufrostico left
Skarsnik hm, I think there is a regression in memory usable since 2017.05 when calling a command gist.github.com/Skarsnik/6adfba55f...e923112393 15:52
timotimo Skarsnik: could very well be different positions in the GC cycle 15:54
15:54 someuser left, bronious joined
timotimo try a force gc before the sleep 5 and measure again between that and the sleep 15:54
Skarsnik well what it bother me the most is the sleep 5 make it take ~1Mb more 15:55
How I can force the gc?
Zoffix Skarsnik: use nqp; nqp::force_gc() 15:56
Skarsnik similar result 15:58
skarsnik@vps300582:~/perl6/benchmark$ ./rakudo-2017.07/install/bin/perl6 -I p6-linux-proc-statm/lib/ ../testshell.p6 qqx
Before shell call : 78.728 kb
html is 258974 chars
After shell call : 113.488 kb
After sleep 5 : 113.488 kb
15:58 sena_kun joined
Skarsnik I put it before the 'after shell call' 15:58
(I switch to qqx since it works for old version of rakudo) 15:59
16:00 cdg left
timotimo i wonder what heaptrack would show here. 16:01
Skarsnik still no nice tool in moar to query memory usage? x)
sena_kun Is JSON::Marshal maintainer here? 16:02
Zoffix sena_kun: nope. They seem to have quit using IRC. I see them post in our Facebook group once in a while 16:03
sena_kun :c 16:04
gist.github.com/Altai-man/fe3df2e3...f96235d2d9 - I wonder where I should sent a bug-report about this. It's either zef || JSON::Marshal || JSON::Fast. 16:07
16:07 faraco joined, faraco left, faraco joined
Zoffix holy hell the "Why I'm learning P6" thread got 175 HN comments :o news.ycombinator.com/item?id=14854418 16:08
Skarsnik tl;dr x) 16:09
Seriously, anything interesting in that?
faraco m: say WHAT .first; 16:11
camelia (Any)
faraco m: say WHAT sum; 16:12
camelia (Int)
Zoffix Skarsnik: based on past experience, doubt it. I bet it's a bunch of "Why have language X when I have {«Ruby Python "Any other 25 year old language that replaced an earlier language"».pick}" 16:13
And the other bunch is people arguing about $CS-concept and why it <sucks rocks>.pick
faraco I found sum is in TODO list. I want to define the method definition like, method sum(Int:D --> Int:D)
Zoffix
.oO( HN/CommentsGenerator.pm6 )
faraco but not sure if it only receives Int. 16:14
Zoffix faraco: method on what? 16:15
m: &sum.candidates».signature.say
camelia (() (\SELF) (+ is raw))
Zoffix m: ().^lookup('sum').candidates».signature.say
camelia ((List $: *%_))
Zoffix heh
16:15 obra_ is now known as obra
Zoffix faraco: it don't take no Int:D 16:16
andreoss can i have anonymous hashes with default?
faraco how do you document these 'undocumented' methods :((
Zoffix s: &trait_mod:<is>, \(%, :42default) 16:18
SourceBaby Zoffix, Something's wrong: ␤ERR: Could not find candidate that can do \({}, :default(42))␤ in sub sourcery at /home/zoffix/services/lib/CoreHackers-Sourcery/lib/CoreHackers/Sourcery.pm6 (CoreHackers::Sourcery) line 37␤ in block <unit> at -e line 6␤␤
Zoffix s: &trait_mod:<is>
SourceBaby Zoffix, Sauce is at github.com/rakudo/rakudo/blob/5d89...its.pm#L13
Zoffix don't even see one for Variable 16:19
faraco: find implementation. Find tests that spec that implementation. Document your findings. 16:20
faraco seems myself doing say WHAT on these methods looks primitive as hell. 16:21
16:22 lucs joined
Zoffix faraco: it seems wrong. WHAT returns the type object of the return value 16:23
16:23 linuksz left
Skarsnik map.perl6.party/ hm sig for sum are weird 16:23
Zoffix Oh, right, I forgot about that website. 16:24
faraco: you could use that ^. But note that it's rakudo implementation, not the language definitions
Skarsnik You have too much perl6 related stuff x)
Zoffix andreoss: I'm gonna tentatively say "no". What are you trying tod o?
faraco Skarsnik, Zoffix: Hey thanks guys, I'll PR on these things since I don't know the accuracy. 16:25
Zoffix andreoss: well, without nqp that is
16:26 robertle joined
Zoffix m: use nqp; my %foo is default(42); nqp::p6bindattrinvres({:70a}, Hash, q|$!descriptor|, nqp::getattr(%foo, Hash, q|$!descriptor|))<foo>.say 16:27
camelia 42
Zoffix hehe 16:28
16:29 zakharyas left
El_Che "I hate perl 16:32
6"
but he doesn't
news.ycombinator.com/item?id=14855781 16:33
16:33 cosimo left
El_Che heh hates haskell ;) 16:33
andreoss m: use MONKEY-TYPING; augment class Hash { method with-default(\a) { my %s is default(a) = self.clone }}; say({}.with-default(0){1})
camelia (Mu)
16:34 dakkar_ left
andreoss not Any for some reason 16:34
Zoffix andreoss: because traits are compile-time 16:35
m: use MONKEY-TYPING; augment class Hash { method with-default(\a) { "my %s is default({a}) = self.clone".EVAL }}; say({}.with-default(0){1})
camelia 0
16:35 Cabanossi left
Zoffix (not a recommended way of solving that) 16:36
16:36 Cabanossi joined 16:37 colomon joined, cpage_ left
andreoss .with-default or mutable .default would be nice for parsed hashes 16:39
Zoffix doesn't see the point... 16:40
Just stick em into a container
faraco ok, now I'm annoying. I looked for the tests in Rakudo t/ , but I didn't find any tests for the methods implementations. Can anybody point me out where to look for the methods test. Or I'm looking at the wrong place? 16:41
colomon back in Feb, Zoffix asked: “I don't get how .grep-not(/foo/) is better than .grep({!/foo/}).” My answer is every six months or so I want to do this operation, and I have never once remembered how to code it. The ONLY reason I figured out this time is I googled “grep not” on the IRclog — and that after about ten minutes of searching everything I could think of.
Aaronepower Hello, is there any way to condense to multiple .trans calls?
colomon faraco: by default most spectests don’t come with a standard Rakudo build
faraco: if you do “make spectest” it will download them from github before running them. 16:42
faraco oh thanks.
Zoffix Aaronepower: .trans: [<a b c>] => [<A B C>]
16:42 aindilis left
Zoffix faraco: the spec is in github.com/perl6/roast 16:43
faraco tyvm
geekosaur Aaronepower, note that the general case may not be possible, if there is overlap that must happen in a specific order
Aaronepower geekosaur: There is. 16:44
16:44 araraloren left
Aaronepower geekosaur: My current line looks like this `q:to/END/.trans(/\x20/ => '').trans(/\n/ => ' ').trans(/"/ => '\"')` 16:44
16:45 raschipi joined
andreoss Zoffix: what kind of container? 16:45
geekosaur right, so you could combine the last two but the first needs to stay separate.
Zoffix colomon: that statement assumes everyone reaches for "grep-not" when they want one. We don't have .first-not or .^can-not or .so-not, so ".grep-not" would be an oddity compared to the rest of the language. You can equally write .grep({not /foo/}). An elitist in me says just learn your tools: .grep checks by True/False. If you have a True, you'd reverse it with a not or ! op. No googling required :/ 16:47
andreoss if i get a hash from YAML file, i should either clone it with `is default` on each level or guard every hash lookup with ||$DEFAULT
*`is default`.EVAL 16:48
geekosaur Zoffix, I think the confusion here is grep(!/foo/) vs. grep( {!/foo} ) 16:49
Zoffix m: say (my % is default(0) = {:42a},){1}
camelia 0
geekosaur the former is "natural" but wrong
colomon Zoffix: the problem with that (from my perspective, anyway) is that it’s totally not obvious why that works.
faraco from the sum test, it says it always return Int even if endpoints are Num or Rat integers.
16:50 setty1 joined
faraco so, my current hypothesis is: method sum(--> Int) 16:50
geekosaur Aaronepower, the combined part is something like .trans(["\n", '"'] => [' ', '\"'])
colomon Zoffix: and you can say what you want, but I spent five years actively working on Rakudo, and I might have been the stupidest developer present, but if I cannot reliably figure out it / remember it, I don’t know why we would expect newcomers to do so.
Zoffix m: (1.5, 2e-1).sum.say 16:51
camelia 1.7
Zoffix faraco: ^ not true
faraco hmm, about this? github.com/perl6/roast/blob/d1baf2...int.t#L486
andreoss m: sub with-default(%h, \default) { -> $k { %h{$k} || default } }; say with-default({1=>2}, 0)(2) 16:52
camelia 0
16:52 shadoxx joined
faraco just want to see how the verify the arguments and the return value. After I know the process, maybe I can do it on my own. 16:52
andreoss will settle with this
shadoxx Ok. I want to get into Perl 6. I come from a Python/PHP/C background
AlexDaniel \o/ 16:53
Zoffix shadoxx: there's a python-to-perl6 guide. Don't know how good it is: docs.perl6.org/language/py-nutshell
colomon Zoffix: honestly, it isn’t at all obvious to me why grep({! /foo/}) should work. I know why grep(/foo/) works (no brackets) — it’s a smartmatch. but it isn’t obvious to me that grep({/foo/}) should work. and adding a negation to it just seems like magic.
raschipi grep(!/foo/) obviously won't work, casting a regex to bool won't give something grep can use
16:54 hahainte1net is now known as hahainternet
Zoffix colomon: and you spent 5 years actively working on Rakudo? 16:54
faraco maybe I should try something more obvious..
colomon Zoffix: yes.
16:54 LeCamarade left
Zoffix colomon: I spent 1.5 years with Perl 6 and just a year working on Rakudo... That shit's basic 16:55
16:55 cdg joined
Zoffix If you don't know how .grep works, I don't see how adding a whole nuther method solves anything. 16:56
faraco: that's just poor test description.
faraco even grep is not documented
Zoffix Yeah it is: docs.perl6.org/routine/grep#(List)_routine_grep 16:57
shadoxx Zoffix: this guide is pretty ok, exactly what i was looking for. Perl syntax seems familiar enough. :]
thanks!
colomon Zoffix: I know how .grep works. I don’t know how smartmatching a code block with a negated regular expression translates to things that don’t match the regular expression.
faraco urm, so method and routine is not same? - docs.perl6.org/routine/grep#class_Any
jnthn colomon: A regex in boolean context applies itself to $_ 16:58
shadoxx /buffer jan
Zoffix shadoxx: see also "For Newcomers" resources section ( perl6.org/resources/ ) and perl6book.com/ for a list of books ("Tink Perl 6" one is free to download)
jnthn colomon: The !/foo/ thing thus boolifies it forcing it to run against $_ and then negates the result :)
shadoxx whoops.
colomon jnthn++ # an exlanation 16:59
*explanation
jnthn It's an odd construct if you don't know the /foo/ automatic matching on $_ in Bool/sink context
16:59 Ven joined
Zoffix m: say <foo bar ber foods>.grep: *.match(/foo/).not 17:00
camelia (bar ber)
17:00 Ven is now known as Guest92612
colomon and it’s a uniquish construct: You cannot negate .grep(Int) by saying .grep({!Int}), correct? 17:00
jnthn Correct
You'd need .grep(* !
raschipi m: given "foo" { !/foo/ }; given "bar" { !/foo/ }
jnthn oops
camelia WARNINGS for <tmp>:
Useless use of "!" in expression "!/foo/" in sink context (lines 1, 1)
jnthn You'd need .grep(* !
argh
You'd need .grep(* !~~ Int)
faraco docs.perl6.org/routine/grep#class_Any is that supposed to be there. 2 place of grep documentaton? 17:01
17:01 eliasr left
Zoffix faraco: more than one type provides the method 17:01
faraco aww....I should take a break...
AlexDaniel m: my @a = ‘foo’, 25, ‘z’, 3; say @a.grep(none(Int))
camelia (foo z)
raschipi m: given "foo" { say !/foo/ }; given "bar" {say !/foo/ } 17:02
camelia False
True
Zoffix AlexDaniel++ right, you can use Junctions too 17:03
m: say <foo bar ber foods>.grep: none /foo/
camelia (bar ber)
AlexDaniel m: my @a = ‘foo’, 25, ‘z’, 3; say @a.grep(none(/foo/)) # it feels like a stupid way to do it, but it works
camelia (25 z 3)
AlexDaniel yea
Zoffix not far away from .grep-not :) 17:04
17:04 Dunearhp left 17:05 Dunearhp joined, Skarsnik_ joined, faraco left
Zoffix m: dd WHAT (1.0 .. 10.0).sum 17:06
camelia Int
Zoffix m: dd WHAT (1.1 .. 10.0).sum
camelia Rat
Zoffix
.oO( lame )
AlexDaniel Zoffix: why does this happen, by the way? 17:07
Zoffix .tell faraco so the .sum test description is not too wrong. Indeed Range.sum produces an Int for non-Int endpoint, but only if it can; (1.1 .. 10.0).sum gives a Rat :/
yoleaux Zoffix: I'll pass your message to faraco.
Zoffix AlexDaniel: it was made that way, I'd guess :) There's roast test covering it
s: ^4, 'sum', \()
SourceBaby Zoffix, Sauce is at github.com/rakudo/rakudo/blob/5d89...ge.pm#L642 17:08
AlexDaniel is it a call to .narrow somewhere or something?
17:08 Skarsnik left
[Coke] colomon: this seems like something that could be listed under .grep with a "BTW, if you're trying to ..." 17:08
AlexDaniel mm
Zoffix s: (), 'sum', \()
SourceBaby Zoffix, Sauce is at github.com/rakudo/rakudo/blob/5d89...st.pm#L375
AlexDaniel [Coke]++
[Coke] (like a trap, but closer to the "source")
colomon: if you open a doc ticket, I'll even promise to write it. :)
AlexDaniel colomon: please do, it's a good idea 17:09
17:10 Guest92612 left
Zoffix m: class Foo { method x { say "Foo" } }; class Bar { method x { say "Bar"; nextsame } }; Bar.new.x 17:11
camelia Bar
Zoffix What is it `nextsame`ing to here? It's not a multi method :/ github.com/rakudo/rakudo/blob/5d89...ge.pm#L643
AlexDaniel m: class Foo { method x { say "Foo" } }; class Bar is Foo { method x { say "Bar"; nextsame } }; Bar.new.x 17:12
camelia Bar
Foo
AlexDaniel Zoffix: doesn't have to be
colomon [Coke]++
Zoffix Oh, I forgot `is` duh :)
AlexDaniel on a relevant note, can I ask a noob question :) 17:13
do I get it right that TWEAK in a role is a bad idea?
17:13 mr-foobar joined
AlexDaniel because, basically, it will never be called if the class does-ing this role has its own TWEAK 17:14
and nextsame/nextwhatever will not reach role's TWEAK ever
well, that's unless I'm a complete monkey
Zoffix m: dd (1.0 .. 10.0).int-bounds 17:16
camelia (1, 10)
Zoffix "AlexDaniel │ Zoffix: why does this happen, by the way?" ... ^ that's why
.int-bounds gives Ints even on ranges made outta Rats (when possible) 17:17
17:18 sufrostico joined 17:22 Ven joined 17:23 Ven is now known as Guest78208 17:25 Hotkeys joined, Hotkeys left, Hotkeys joined, Hotkeys left, Hotkeys joined
Hotkeys howdy 17:26
raschipi heya
Hotkeys haven't been here in a while or used p6 in a while 17:27
but I heard about 6.d coming so I thought I might come back
Zoffix heh 17:29
Hotkeys: nothing special will happen when it comes out, though :)
Hotkeys still :P
Zoffix Most of the new features are already implemented in the compiler (without needing 6.d pragma)
Hotkeys I had sort of forgotten about p6 but then a post popped up on /r/programming about it and here I am again 17:30
Zoffix I didn't even notice you left :)
Hotkeys 3 17:31
<3 I think
unless you didn't notice me in the first place :P
17:32 cdg left
Zoffix I do remember your nick. 17:33
Hotkeys I did make a very small contribution to p6 and I think my name is forever immortalized on the contributors list for 6.c so that's something 17:35
mspo Hotkeys: I'm in a similar boat
geekosaur I remember you being here but asking me to notice going away is a bit of a reach. (both of you actually...) 17:36
Hotkeys :P
fair enough
I do remember y'all too
mspo <bender> REMEMBER ME!
Hotkeys I used to do a lot of codegolfing in p6
perlpilot Hotkeys: but, but, ... why did you leave?!? ;)
mspo I made a doc thing for grammers but I think it's been lost 17:37
geekosaur (mind, that's also true in person. fsvo "mind"...)
mspo Hotkeys: oh yeah I *do* remember you linking to those a lot
I left because I started trying to write a udp network thing and there was practically no support for it
geekosaur there still isn't much in the way of udp support 17:38
Hotkeys codegolf.stackexchange.com/users/4...ab=answers practically all of my posts are p6 golf :P
mspo I'm out of here!
geekosaur not much demand I guess
Hotkeys mspo: time for you to write a udp library I suppose :D
mspo Hotkeys: apparently
geekosaur except that can't really be done in perl 6, there needs to be moarvm bindings to the appropriate libuv apis 17:39
mspo IIRC networking isn't spec-ed at a langauge level and you just get whatever libuv offers
oterhwise you're told to use NativeCall
erlang has the best networking stuff 17:40
geekosaur otoh perl 6 isn't the only language in this boat, if you want to do udp in haskell you don;t get much help beyond a very raw socket-level binding that iirc is missing some useful pieces 17:41
mspo although even it had a lot of pain points
it stopped supporting unix sockets for something like 6 years :)
but recently got them back
17:45 iviv joined
perlpilot geekosaur: It would still be a shame to lose that vibe that Perl has generally good IO support (especially including sockets) 17:46
raschipi How was it supposed to interact with a modern Unix without unix sockets? 17:47
geekosaur erlang's "thing" is network services, not local 17:48
raschipi Well, P6 doesn't have a D-Bus library too, so it can't do it too.
too manys toos 17:49
AlexDaniel Hotkeys: welcome back o/
Hotkeys: I did notice :)
jnthn IO::Socket::Async certainly has some basic UDP support, but I don't recall seeing any RTs asking for it to be improved, so yes, low demand I guess :) 17:50
mspo: There are spectests covering networking stuff, which means it is decidedly part of the language. 17:51
timotimo uses i know for udp: 1) gamedev (though you'd nativecall to enet most likely), 2) multimedia streaming, 3) DNS
perlpilot NFS 17:52
(if everyone hasn't switch to TCP yet)
17:53 domidumont joined, unop joined
AlexDaniel by the way, if somebody wants to work on a networking LHF, then here is one: RT #131766 ;) 17:53
synopsebot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=131766
AlexDaniel although quite possibly it's not as easy as it looks…
17:53 gabiruh left
colomon [Coke]: perl6/doc issue on github is appropriate way to do it? 17:54
AlexDaniel I might get to it myself some day maybe, after all I can't connect any new bots now :)
colomon: yes
colomon hits “New issue"
mspo jnthn: I think my complaining wsa what mainly got udp into io::socket::async 17:56
perlpilot mspo: were you writing a game in P6? ;)
mspo perlpilot: I was trying to write a dns client
but now I'm too busy at $work to do much of that 17:57
Hotkeys AlexDaniel: o/ 17:58
17:58 wamba joined 17:59 shlomif joined
geekosaur timotimo, tftp/bootp/dhcp :p 17:59
perlpilot I wish I could wrap my head around all this async stuff. I mean I can do stuff, but I haven't internalized it enough such that I don't feel like a monkey banging on a keyboard when I try to create something.
17:59 rindolf left 18:00 shlomif is now known as rindolf 18:05 sftp left 18:06 unop left
colomon [Coke]: github.com/perl6/doc/issues/1425 18:06
mspo also udp for memcached
and a million other things
QUIC
18:07 domidumont left
perlpilot colomon: What if there was an adverb to negate the test? 18:07
18:07 sftp joined
mspo I didn't even check p6's support for unix sockets 18:08
18:08 domidumont joined
AlexDaniel perlpilot: an adverb for .grep you mean? 18:08
colomon perlpilot: I briefly hoped :v would do exactly that, but no such luck.
mspo jnthn: there won't be "demand" without initial support 18:09
perlpilot AlexDaniel: yes
Zoffix Stop wanting to add stuff the second you think of something :/
perlpilot colomon: :v is already meaningful, it would have to be something else
colomon perlpilot: yes, I figured that out
18:10 mcgyver joined, Skarsnik_ is now known as Skarsnik
geekosaur :v would be a bad choice if we're not planning to duplicate perl 5's "of course you're an ancient unixer" vibe 18:10
18:10 mcgyver is now known as Guest49234
AlexDaniel it's already taken anyway 18:10
Skarsnik Zoffix, I wanted extra sprinkles on my donuts :(
raschipi If the "grep" didnt do that already
18:11 Guest49234 left
Zoffix Skarsnik: well, hang around, maybe someone will come up with an option to add. 18:11
Maybe a couple more methods + new syntax
perlpilot Zoffix: Adding things is fine. We can do it the traditional way: prototype in a module, get people to try it out, if there's enough support migrate it into the language
raschipi It should be called "Where-Object" to avoid the Unix stink 18:12
Zoffix perlpilot: the common objection to that strategy I hear is "I don't wanna use a module; I want it in core"
geekosaur "tough"
perlpilot Zoffix: sure ... just garner enough support and your wish comes true.
:-)
geekosaur yes, we're going to put the kitchen sink in core for all the "I don wanna use a module" crowd 18:13
AlexDaniel m: ‘庖’.sink 18:14
camelia ( no output )
AlexDaniel it's already there
perlpilot I suppose there's always "convince TimToady and it goes in by fiat" but hopefully that's *extremely* rare
Zoffix perlpilot: the approach I observe is propose an idea that's considered singularly and not in the context of the entire language, then get mad with Zoffix for rejecting the ticket :) 18:15
Like, it's not just .grep-not, there's at least .first-not that comes together with it.
Skarsnik .dont-match(/foo/) 18:16
Zoffix .don't-match :)
AlexDaniel Zoffix: well, according to that logic you can also reject RT #131766
synopsebot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=131766
perlpilot Well, I'd propose a :n(egate) adverb (or something like that)
18:16 Rawriful joined
Zoffix AlexDaniel: why according to that logic? 18:17
ugexe but this only really makes sense in the case of implicit smart match negating yes?
Zoffix I've seen that ticket already; I have nothing to say about it.
ugexe if you do * !~~ ..., which is only 2 extra characters via adding *-not 18:18
AlexDaniel Zoffix: adding stuff is bad, very few will benefit from it anyway, yada-yada
Zoffix Ah.
AlexDaniel so far I'm probably the only person needing it anyway, so
Skarsnik I think lot of peple does not use unless instead of if !
18:19 FROGGS joined
Zoffix Yes, adding stuff is bad. It leads to more things to learn. How many of you ever read a `grep` man page in entirety? 18:19
Skarsnik (I love unless)
geekosaur which grep, a sensible one or the gnu monstrosity?
Zoffix Either :)
Hotkeys I also like unless
it's more readable imo, if only slightly
AlexDaniel doesn't like unless, but loves “without”
perlpilot I've read enough of the grep man page to find the handful of options I use regularly :) 18:20
Skarsnik printf manpage is already long enough for me x)
Hotkeys I feel like adding a grep-not, etc. is unnecessary when you can just negate your predicate
Zoffix .grep({!/foo/}) can be understood just from the bits you already probably know and use elsewhere .grep(/foo/, :n) has extra knowledge of specific `:n` adverb to grep
geekosaur Hotkeys, except you don't "just" negate it 18:21
ugexe right, and that becomes more apparently when you don't write implicit smart match version of (/.../)
geekosaur you have to convert it to a closure and negate *that*
Zoffix m: [].^lookup('splice').candidates.elems.say
camelia 31
Zoffix AlexDaniel: ^ mindlessly adding stuff is why we have 31 candidates to .splice.
AlexDaniel Zoffix: not saying that this is good
Zoffix I challenge someone to name all possible ways to call it without looking at docs. 18:22
Zoffix goes away to yell at the cloud
Zoffix &
18:22 sena_kun left
Skarsnik I don't even know wat splice do x) 18:23
perlpilot heh
Hotkeys I didn't realize there was more splice than just like @foo.splice($start, $n?, @bar) 18:25
18:25 jimlenz joined
perlpilot I wonder how much of those splice variations are documented even. 18:26
Hotkeys Skarsnik: given the above, it removes $n elements starting at $start in @foo and replaces them with @bar
ugexe splice(*) and splice(0) and various edge cases
Hotkeys but apparently there is more too
Skarsnik can you rewrite perl6 with splice? 18:27
18:27 sfc joined
masak in 007, I realized we'll want .splice, but that it should be two methods: github.com/masak/007/issues/238 18:27
but maybe I've missed some edge cases too ;)
Zoffix perlpilot: it's fully documented
masak reads docs.perl6.org/routine/splice 18:28
Hotkeys ah, $start and $elems can both take Whatever and Callable 18:29
that sounds fun 18:30
masak the Callable is mostly for the WhateverCode case, I'll bet
perlpilot 31 is suspiciously 2**5-1 ;-)
masak m: my @xs = [1, 2, 3, 4, 5, 6]; @xs.splice(*/2); say @xs.perl
camelia Cannot resolve caller splice(Array: Rat); none of these signatures match:
(Array:D \SELF: *%_)
(Array:D $: Whatever, *%_)
(Array:D $: Callable:D $offset, *%_)
(Array:D $: Int:D $offset, *%_)
(Array:D $: Whatever, Whatever, *…
Hotkeys is that suspicious
Zoffix $offset, $size?, **@replacement is basically the nutshell, but $offset and $size can be either Int, or Whatever, or Callable, which permutes all the candidates (since not doing that leads to large perf loss in cases of needless slurpie)
masak m: my @xs = [1, 2, 3, 4, 5, 6, 7]; @xs.splice(*/2); say @xs.perl 18:31
camelia Cannot resolve caller splice(Array: Rat); none of these signatures match:
(Array:D \SELF: *%_)
(Array:D $: Whatever, *%_)
(Array:D $: Callable:D $offset, *%_)
(Array:D $: Int:D $offset, *%_)
(Array:D $: Whatever, Whatever, *…
masak hmm
m: my @xs = [1, 2, 3, 4, 5, 6, 7]; @xs.splice(floor */2); say @xs.perl
camelia Cannot resolve caller Numeric(WhateverCode: ); none of these signatures match:
(Mu:U \v: *%_)
in block <unit> at <tmp> line 1
Hotkeys lol
masak m: my @xs = [1, 2, 3, 4, 5, 6, 7]; @xs.splice((*/2).Int); say @xs.perl
camelia [1, 2, 3]
masak surprisingly unwilling to coerce other numbers to Int
perlpilot masak: thus we circle back to Zoffix's original point ;) 18:32
Zoffix But wait! There's more!
masak perlpilot: heh; I didn't backlog that far ;)
Zoffix The performance enhancements lost the coersion we do in many other routines. The actual number of candidates is supposed to be 52
Ticket: rt.perl.org/Ticket/Display.html?id...et-history
Oh, it's fixed already
lizmat++
Hotkeys m: my @xs = [1, 2, 3, 4, 5, 6, 7]; @xs.splice(* - 3); say @xs.perl 18:33
camelia [1, 2, 3, 4]
Hotkeys handy
Zoffix Oh wait, that's not the full fix
jnthn mspo: Yes, so I implemented the initial support, and nobody yet told me it's missing anything, so afaik it's sufficient.
AlexDaniel “If so, please treat this ticket as [LTA] (the amount of candidates printed is insane).” XD
lizmat wotdidifix?
Zoffix lizmat: rt.perl.org/Ticket/Display.html?id...xn-1444716
lizmat: but I read later comments in the ticket saying it was reverted
AlexDaniel m: my @a = <a b c d e f g>; say @a.splice: ^3
camelia Cannot resolve caller splice(Array: Range); none of these signatures match:
(Array:D \SELF: *%_)
(Array:D $: Whatever, *%_)
(Array:D $: Callable:D $offset, *%_)
(Array:D $: Int:D $offset, *%_)
(Array:D $: Whatever, Whatever,…
AlexDaniel e: my @a = <a b c d e f g>; say @a.splice: ^3
evalable6 (exit code 1) Cannot resolve caller splice(Array: Range); none of these signatures match:
18:34
AlexDaniel, Full output: gist.github.com/f6dd4bfb7eecf41cd2...10b7d159b0
masak lizmat++ # fixing stuff and then acting all innocent about it :P
lizmat
.oO( you don't want to know how innocent I act when I have broken things :-)
.oO( who, moi? )
18:35
perlpilot lizmat: yeah, but you put them back together like they did to the bionic man: stronger, faster, better. :)
lizmat *blush* :-) 18:36
masak .oO( qui, me? ) 18:40
18:43 andrzejku left 18:44 cdg joined 18:45 Exodist left, kybr left
zengargo1le only HN thread thing that caught my eye was Q about creating static executables. almosy said 'yes someday' when things settle down and somebody actually tries to do it. 18:45
jdv79 the quip about concurrency by rurban caught my eye 18:46
18:46 Exodist joined
zengargo1le heh 18:46
18:46 kybr joined
jdv79 is a static executable very useful these days when we have containers? 18:47
or is it about obfuscation of source
mack[m] i think yes it would still be useful with containers because the containers could be smaller 18:48
zengargo1le it can be very nice. i made a 'emergency backup of documents' thing that included a static Go http(s) server. no worries it won't work whenever the need arises.
jdv79 as long as the OS abi doesn't change too much 18:49
zengargo1le libc and libm.
mack[m] for example, a container we used to build latex documents was like 2GB - would be nice to have one that can handle the perl6 runtime without having to download all the bits to just run the binary
jdv79 yeah
zengargo1le yeah, generic backcompat support, but no libraries, scripts, modules, etc. 18:50
mack[m] +1
zengargo1le include the Windows/OSX versions of the server and the whole subdir is a thing that can copy and work. 18:51
data and a couple Go static executables.
18:51 noganex_ left 18:52 zengargo1le is now known as zengargoyle
lizmat afk for some Valerian& 18:53
zengargoyle or a cross-platfome password manager on a USB stick. 18:54
mack[m] it's one of the magic things i like about rust-lang too
mspo static linking?
mack[m] copying the binary around w/o the dependencies
mspo yeah static linking
18:55 unop joined
mspo jar files are nice too 18:55
zengargoyle i had the thought that p6 way could even include the libfoo.so.x.y.z in the CUR like other .so that can be in CUR.
one of my modules builds a .so that's entirely not-perl-related-at-all and it's stored and loaded from the CUR as part of the module.... 18:56
18:58 andreoss left
b2gills Hotkeys: I noticed your lack of presence. Mostly because I noticed that you stopped posting code golfs, so that meant more that I had to write. 18:58
geekosaur zengargoyle, that was tried and breaks things that do dynamic loading
18:58 noganex joined
zengargoyle does preloading not work? 18:58
geekosaur for example gtk loads a bunch of stuff dynamically at runtime (dlopen()) and handles renamed stuff poorly
Zoffix zengargoyle: there's already something like that for Windows, innit? 18:59
geekosaur how portable is that?
Zoffix buggable: eco wix
buggable Zoffix, App::InstallerMaker::WiX 'Tool to make basic WiX installers for Perl 6 apps, bundling MoarVM/Rakudo.': github.com/jnthn/p6-app-installermaker-wix
Hotkeys b2gills: oh hey it's you the other code golf person :D
raschipi Static linking should just die already. 19:00
zengargoyle geekosaur: that's one of the reasons i asked about the appveyor Windows CI thingy... :)
b2gills There have been a few other people posting Perl 6 code golfs in the mean time
zengargoyle not sure if LibraryMake helper magically makes simple C library work. (works on OSX and Linux....) 19:01
b2gills: where is this code golf thing?
19:01 nicq20 joined
b2gills codegolf.stackexchange.com/ 19:02
nicq20 Hey-o
b2gills I'm user 1147 codegolf.stackexchange.com/users/1...rt-b2gills
It is a spin-off from Stack Overflow (where I'm user 1337) 19:03
zengargoyle did /r/dailyprobrammer for a while until just didn't have the time.... 19:04
Hotkeys meanwhile I'm user 46687 codegolf.stackexchange.com/users/4...ockopeners
wow I've gotten rep in the past 30 days 19:05
thanks codegolf users
zengargoyle always thing the APL derivative peeps won. :P 19:06
b2gills Most of the time it is languages devoted to code golfing that win. Though Perl 6 sometimes even beats them 19:07
19:07 nhywyll joined
Hotkeys I mostly ignore the golfing languages 19:07
they're almost entirely uninteresting to me
19:07 Guest78208 left
Hotkeys congratulations you wrote the shortest code in a language specifically designed to have the shortest code 19:08
b2gills I look at the explanations to see if there is another way to write it that might be smaller
Hotkeys I think I might have a couple that get close to or beat golflangs
I'd have to go through my answers though 19:09
b2gills Most of the time I would say that Perl 6 is at least within spitting distance of the shortest of the non-golfing languages
zengargoyle i think 2 of my modules came directly from p6 no having that thing yet.
2 more if you count things i p6-ified but don't understand enough to thrust out to the worl. 19:11
19:11 andrzejku joined
nicq20 Anyone know where I can find out how the :sym<> thing works? 19:13
zengargoyle nicq20: as in the magic colon pair thing or the grammar thing? 19:15
nicq20 The grammar thing.
Well, I guess it would be more of a proto thing? 19:16
zengargoyle yeah, you've read the docs.perl6.org Grammar sections...
19:19 Cabanossi left
b2gills stackoverflow.com/questions/417691...2#41770672 19:20
for the :sym<> thing ^ 19:21
19:21 Cabanossi joined
zengargoyle i fulmbled through the docs then the synopses then just look at modules in the ecosystem that use grammar. 19:23
Zoffix There's a blurb in docs too docs.perl6.org/language/grammars#Protoregexes 19:24
19:27 darutoko left
nicq20 Ok, so it's actually a lot simpler than I had thought. Thanks! 19:27
zengargoyle b2gills++ nice link. 19:30
nicq20 As a side note, is the `augment slang MAIN {}` thing still in use, or should `$?LANG.refine_slang` be used instead? 19:31
Zoffix nicq20: neither should be used, in a sense that neither is an official or supported way to use slangs
nicq20: but $?LANG.refine_slang is it, if you got 2017.07 rakudo or newer 19:32
19:32 domidumont left
Zoffix BEGIN $?LANG.refine_slang('MAIN', role YourGrammar {…}, role YourActions {…}) 19:33
with actions being an optional arg
nicq20 Zoffix: Thanks! 19:35
m: BEGIN {$?LANG.refine_slang('MAIN', token comment:sym<###> { <sym> {} \N* {say $/.Str} }, $?LANG.actions) }; say "Hi 19:37
camelia 5===SORRY!5=== Error while compiling <tmp>
An exception occurred while evaluating a BEGIN
at <tmp>:1
Exception details:
5===SORRY!5=== Error while compiling
Cannot find method 'specialize' on object of type Perl6::Metamodel::ClassH
nicq20 m: BEGIN {$?LANG.refine_slang('MAIN', token comment:sym<###> { <sym> {} \N* {say $/.Str} }, $?LANG.actions) }; say "Hi"; ### test
camelia 5===SORRY!5=== Error while compiling <tmp>
An exception occurred while evaluating a BEGIN
at <tmp>:1
Exception details:
5===SORRY!5=== Error while compiling
Cannot find method 'specialize' on object of type Perl6::Metamodel::ClassH
nicq20 m: BEGIN {$?LANG.refine_slang('MAIN', token comment:sym<###> { <sym> {} \N* {say $/.Str} }) }; say "Hi"; ### test 19:38
camelia 5===SORRY!5=== Error while compiling <tmp>
An exception occurred while evaluating a BEGIN
at <tmp>:1
Exception details:
5===SORRY!5=== Error while compiling
Cannot find method 'specialize' on object of type Perl6::Metamodel::ClassH
Zoffix nicq20: note that my example uses a role, not a token 19:41
nicq20 Oh, gee whiz. Mis-type.
m: BEGIN {$?LANG.refine_slang('MAIN', role {token comment:sym<###> { <sym> {} \N* {say $/.Str} }}) }; say "Hi"; ### test 19:42
camelia Hi
Zoffix m: BEGIN $?LANG.refine_slang('MAIN', role { token apostrophe { <[ - ' \\ ]> } }, role { method apostrophe($) { say "That's one good-lookin' apostrophe you got there, bruh!" } }); my $foo\bar = 42; say $foo\bar;
camelia ===SORRY!===
Type check failed in binding to parameter '<anon>'; expected Any but got Perl6::Grammar+{<anon|55680560>} (Perl6::Grammar+{<anon...)
Zoffix m: BEGIN $?LANG.refine_slang('MAIN', role { token apostrophe { <[ - ' \\ ]> } }, role { method apostrophe(Mu $) { say "That's one good-lookin' apostrophe you got there, bruh!" } }); my $foo\bar = 42; say $foo\bar; 19:43
camelia That's one good-lookin' apostrophe you got there, bruh!
That's one good-lookin' apostrophe you got there, bruh!
42
Zoffix bummer all the action methods need a Mu type constraint :| 19:44
nicq20 m: BEGIN {$?LANG.refine_slang('MAIN', role {token comment:sym<###> { <sym> {} \N* {say $/.Str} }}) }; say "Hi"; $*LANG.^methods>>.name.grep(/'comment'/).say 19:45
camelia Hi
()
nicq20 m: BEGIN {$?LANG.refine_slang('MAIN', role {token comment:sym<###> { <sym> {} \N* {say $/.Str} }}) }; say "Hi"; BEGIN {$*LANG.^methods>>.name.grep(/'comment'/).say} 19:46
camelia (comment comment:sym<#> comment:sym<#`(...)> comment:sym<#|(...)> comment:sym<#|> comment:sym<#=(...)> comment:sym<#=> pod_block:sym<delimited_comment> pod_block:sym<paragraph_comment> pod_block:sym<abbreviated_comment> comment:sym<line_directive>)
Hi
Zoffix nicq20: somewhat easier way of seeing all the available methods: github.com/rakudo/rakudo/blob/nom/...rammar.nqp 19:47
nicq20 Huh. The comment:sym<###> method is not listed. 19:48
19:48 dwarring joined 19:49 itaipu joined
Zoffix m: BEGIN {$?LANG.refine_slang('MAIN', role {token comment:sym<###> { <sym> {} \N* {say $/.Str} }}) }; say "Hi"; BEGIN $?LANG.^name.say 19:50
camelia Perl6::Grammar
Hi
Zoffix Don't look like it got anything mixed into it yet at that point 19:51
And they seem to be kept separate: github.com/perl6/nqp/blob/master/s...#L221-L233 19:52
Zoffix &
19:54 amalia__ left
nicq20 Zoffix: What part indicates it would be separate? 19:55
19:55 nicq20 left 19:56 nicq20-mobile joined
Geth ecosystem: 7c3024d686 | (Tony O'Dell)++ (committed using GitHub Web editor) | META.list
an auto yaml router for HTTP::Server::Router
19:56
19:58 itaipu left 20:00 nicq20_mobile joined 20:01 wamba left 20:02 nicq20Mobile joined 20:03 nicq20-mobile left 20:04 mkaufman2 joined 20:05 nicq20_mobile left 20:06 kaare_ left, kaare_ joined 20:09 aindilis joined 20:11 andrzejku left 20:12 nicq20Mobile left 20:13 nicq20-mobile joined 20:14 nhywyll left
Zoffix nicq20-mobile: that it pops it into $!slangs and that .^name has an unmixed name 20:18
I've no idea how the lanfuage switch in the braid happens tho
nicq20-mobile Oh, sorry. I thought that's what you were referring to. 20:19
20:19 mr-foobar left 20:26 cpage_ joined, sfc is now known as mbailey_j 20:27 colomon_ joined 20:28 Hotkeys left 20:29 colomon left, colomon_ is now known as colomon 20:30 TEttinger joined 20:41 cpage left 20:44 cpage joined, colomon left 20:45 raschipi left, mbailey_j left 20:49 colomon joined 20:50 mbailey_j joined 20:52 colomon left 20:56 colomon joined
Geth doc: 69b25a390f | (David Warring)++ | doc/Type/Buf.pod6
document Buf subbuf-rw routine and method

closes #1148
20:58
21:02 |oLa| left 21:04 ufobat left 21:05 emeric left 21:06 mkaufman2 left
nadim Is the debugger up and running again? 21:10
21:11 profken joined 21:12 skids left
profken When will I be able to compile perl6 to a binary/executable? 21:12
El_Che profken: not soon
21:13 cono joined
profken Dang 21:13
Is it hard to get a language to that stage?
El_Che It's not the language, it's the dynamic VM 21:14
(like you don't create java or ruby binaries)
maybe somehting like perl5's fatpack should be possible 21:15
so you need a rakudo installation (a pkg) + a program file
profken I see
I really enjoy using perl6 on the go 21:16
Being able to make stand-alone executables would be great though
El_Che I agree
21:18 mcmillhj left 21:19 cpage__ joined 21:20 Cabanossi left 21:21 Cabanossi joined 21:22 cpage left, cpage__ is now known as cpage, pecastro left 21:26 cpage__ joined 21:28 shmibs left, wamba joined, cpage_ left 21:29 cpage left, cpage__ is now known as cpage, cpage_ joined, shmibs joined 21:30 jimlenz left 21:33 Skarsnik left 21:37 robertle left, Rawriful left 21:38 colomon left, colomon joined 21:41 mcmillhj joined 21:42 cpage left 21:46 Hotkeys joined, mcmillhj left 21:50 pharv_ joined 21:58 mcmillhj joined 22:02 cpage joined, mcmillhj left 22:04 st_elmo left, chuck3 joined
chuck3 is perl 6 suitable for general puprose programming, ie applications? 22:06
join #linux 22:09
22:09 chuck3 left 22:17 FROGGS left 22:22 pecastro joined, nadim left 22:26 mbailey_j left 22:27 cdg left 22:30 alimon left 22:32 mbailey_j joined 22:33 cpage_ left 22:38 rindolf left 22:39 nicq20-mobile left 22:41 cpage_ joined
Zoffix chuck3, yup 22:41
profken: it's already possible on windows 22:42
buggable: eco wix
buggable Zoffix, App::InstallerMaker::WiX 'Tool to make basic WiX installers for Perl 6 apps, bundling MoarVM/Rakudo.': github.com/jnthn/p6-app-installermaker-wix
22:42 mcmillhj joined
Zoffix the "fatpack" approach 22:42
22:46 AlexDani` joined, mcmillhj left 22:48 AlexDaniel left 22:51 pharv_ left 22:53 AlexDani` is now known as AlexDaniel 22:54 unop left, pmurias left
profken Zoffix: How big do the installers come out to be? 22:55
22:57 setty1 left
Zoffix No idea 22:57
22:58 mcmillhj joined 23:02 mcmillhj left 23:14 mcmillhj joined 23:19 mcmillhj left 23:20 imcsk8_ left 23:25 mbailey_j left 23:28 imcsk8 joined 23:32 cdg joined 23:41 pilne joined, zollX joined 23:42 cdg left 23:43 pompomcrab joined 23:44 steven_ joined
steven_ does anyone have a link to a good example of creating your own module then using it from another source file? 23:46
23:55 mcmillhj joined
llfourn I don't have a link but I usually just make a file like 'MyProject/lib/MyModule.pm6' 23:55
and then cd MyProject 23:56
create a src file like MyProject/main.p6
and then perl6 -Ilib main.p6
steven_ ok i am trying it now 23:58
thank you 23:59
23:59 mcmillhj left, sivoais joined