»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: irc.perl6.org | UTF-8 is our friend!
Set by masak on 12 May 2015.
awwaiid I did something like $data = from-json(slurp('data.json')); $grepped_data = $data.grep(*<foo> == 7); now I try $data.elems and get "This Seq has already been iterated, and its values consumed", though I can see into the data. What gives? 01:36
awwaiid $grepped_data.round gives me the count, as does +$grepped_data (forcing number context) 01:37
ah, 'say $grepped_data.WHAT' tells me it is a Seq. interesting. 01:38
hmm. putting this into @grepped_data instead of $grepped_data is doing interesting things... 01:40
right. I think I read about greps doing more Seq like stuff. alright, your silence has taught me a valuable lesson. 01:41
BenGoldberg Try, $data = from-json(slurp('data.json')).cache; 01:47
Herby_ Hello! 01:48
BenGoldberg Hi. 01:49
Herby_ I'm relatively new to programming, and completely new to Perl 6 01:53
I've on Windows 7. I installed Rakudo. I created a simple .p6 file
how do I execute it from the cmd prompt? 01:54
Herby_ nm, just figured it out :) 01:55
Herby_ just created my first perl6 program. The journey has started! 01:58
[Coke] woot! 01:59
gfldex Herby_: please tell us when you killed the dragon. 02:00
Herby_ if the dragon's weak spot is someone telling him "Hello, Perl 6 World!"... then consider him dead. 02:01
is see a variety of tutorials on perl6.org but is there a recommended "go to" tutorial for starting from scratch? 02:02
or should I sample all of them
[Coke] Herby_: not really; I've heard good things about the xiny, though. 02:05
Herby_ xiny? 02:06
gfldex learnxinyminutes.com/docs/perl6/
Herby_ ahh
i'm a dummy
gfldex Herby_: rosettacode might be useful too: rosettacode.org/wiki/Category:Perl_6 02:07
Herby_ great, thanks 02:09
dj_goku if we find editor specific (vim) in *.pod files perl6/doc it is ok to remove it right? 02:19
dj_goku example: # vim: expandtab shiftwidth=4 ft=perl6 02:21
dj_goku wrote a p6 script to open each file found with vim settings, search and replace with Str.subst() and write the contents back out! 03:03
et09 what's the verdict on perl 6 03:20
one sentence or less ;)
dj_goku et09: Really it is up to you, to make the decision. I just wrote a 4 line script, used all new shiny p6 bits. It didn't seem too different from Perl5 03:27
et09 let me see your script 03:32
uberbaud exit 03:34
dj_goku et09: gist.github.com/djgoku/46166d26f3dbbdc454d0 03:38
et09 vimrc? 03:39
dj_goku et09: I don't use vim, but for some reason that was added to some perl6/doc files. 03:42
so I cleaned it up and submitted this MR: github.com/perl6/doc/pull/172
et09 dj_goku: it controls tab formatting in vim
may not be the worst idea really 03:43
of course i dunno what it's doing in the middle of the file
dj_goku et09: right, but it shouldn't be in the files. IMO
et09 scratches head
dj_goku use a vimrc file local to your environment instead of adding it to files directly in perl6/doc. 03:47
et09 i'm not even aware of vim being able to interpret something like that 03:48
but (assuming that's what it is?) the benefit would be that people wouldn't be using different conventions for tabs in your files, which makes such a mess
strange
dj_goku et09: vim.wikia.com/wiki/Modeline_magic 03:50
et09 i have 'find' scripts to delete __MACOSX, Thumbs.db, .DS_Store, etc. ;) 03:51
but this one, hmm 03:52
dj_goku for the most part the files I removed the modeline magic stuff was from *.pod files 03:53
moritz don't 04:40
the modelines are there for a reason
mayuresh hello :) 05:21
mayuresh just an off-topic question; is there any way to earn a livelihood by working "on" perl6? 05:24
instead of simply using perl6?
as a programmer!
llfourn mayuresh: there's a Perl 6 core development fund www.perlfoundation.org/perl_6_core_...pment_fund :) 05:32
mayuresh: but I think you can count the number of people getting paid on one finger! 05:33
mayuresh :D
llfourn and it's probably not enough :\
mayuresh hmnn
i am caught in a dilemma, on one hand, i have great interest in working on the 'pxn', but, since it won't fetch me my daily bread, i am leaning towards working on my other idea, a 'ai' network analysis tool. 05:34
llfourn pxn? 05:35
mayuresh pxn == Perl6 eXecution eNvironment
it's going to be an "interpreter" for p6 instead of a compiler + vm combo 05:36
llfourn mayuresh: sounds fun does that exist at all? 05:38
mayuresh llfourn, no, it does not exist yet, not even a concrete design.
just a whole lot of diagrams in my design book. 05:39
llfourn sounds like many years of fun then 05:40
mayuresh llfourn, just that working on 'pxn' will help me grow as a programmer
just can't figure out how to capitalize on the knowledge i'll gain
bartolin r: say all("a", "b") ~~ /a/ # RT #120992
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=120992
mayuresh :\
camelia rakudo-{moar,jvm} 5d83db: OUTPUT«all(「a」, Nil)␤»
bartolin \o/ # FROGGS++
dalek ast: 50c2c6c | usev6++ | S03-junctions/misc.t:
Add test for RT #120992
05:42
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=120992
mayuresh alrighty, that does it, i am going to work on 'pxn', it will help me acquire technological maturity
what i do after that is something i will leave to the will of god
llfourn mayuresh: have you worked on a language interpreter at all? 05:44
mayuresh i am currently self-training for the same
my instructor has given me the liberty to choose any language for my final project 05:45
the rite of passage as they call it. :)
the instructor is a nice gentleman from germany
who imparts me tech wisdom remotely :)
his name is mr. nils m holm
all through my 23 years in software, all i did was database oriented stuff. 05:47
while i like 'rdbms' oriented stuff, i hated the other languages required to do something useful with 'rdbms'.
around 9 months back i realized that is have accumulated enough funds to support self-training for actual computer science stuff 05:48
and that i can survive 36 months without earning a dime.
and then i started off pursuing the regimen outlined by mr. holm. 05:49
he writes excellent books on computer science.
you could check out www.t3x.org
llfourn mayuresh: good luck with your endeavor :) 05:52
mayuresh yeah, thanks. :)
it's very mind-expanding.
llfourn thinks for him starting to write a Perl 6 interpreter from scratch would be more mind-exploding 05:53
mayuresh don't worry about it, i have worked on crazy stuff like industrial robotics. 05:54
they are a lot more painful than perl6. ;)
mayuresh alrighty, i gotta go now, my ubuntu is requesting an update process. 05:55
:)
bye, and thanks for the links llfourn. :) 05:56
azawawi hi #perl6 09:11
Ven o/! 09:13
mrf \o/ 09:14
azawawi Just finished github.com/azawawi/scripts/blob/ma...nchmark.p6 to test User::Agent slowness :) 09:18
azawawi gist.github.com/azawawi/fa1e8a4b67482d19811c # User:Agent compile load results 09:24
RabidGravy azawawi, I think right at this moment in time I might be making it *worse* 09:25
azawawi RabidGravy: make what worse? 09:26
RabidGravy: and hi :)
RabidGravy the load time of HTTP::UserAgent
azawawi actually i seem to have caught the problem source 09:28
URI :)
URI is using URI::Escape inside it 09:29
RabidGravy tricky
azawawi RabidGravy: ping 09:51
RabidGravy pong
azawawi RabidGravy: i remember also that deprecation notice can slow down a module also
RabidGravy: im 'need'-ing instead of 'use'-ing stuff and so far it is becoming faster :)
brrt good * #perl6 10:03
Ven o/ 10:06
llfourn m: .say for Date.new('2015-10-15') .. Date.today # This actually works <3 p6 10:07
camelia rakudo-moar 5d83db: OUTPUT«2015-10-15␤2015-10-16␤2015-10-17␤2015-10-18␤2015-10-19␤2015-10-20␤2015-10-21␤»
brrt llfourn: that is.. quite nice, i can't actually get that to work easily in python 10:11
sort of a litmus test on feature coolness :-)
ollej I'm having an issue when using the URI module inside a Promise. Unless I've used the URI module before awaiting the result, the program never finishes. Using rakudo 2015.09.
I've boiled it down to the following example: await Promise.in(1).then({ say URI.new('www.example.com'); }); 10:12
llfourn brrt: hehe well at least it has an inbuilt date obj
ollej Does anyone have any idea what I'm doing wrong?
brrt not sure you're doing anything wrong there
it doesn't look wrong tome
llfourn ollej: that sounds a hell of a lot like the problem ovid was having 10:12
llfourn looks for RT 10:13
llfourn ollej: rt.perl.org/Public/Bug/Display.html?id=126390 10:14
"The last example just hangs. As far as I can tell, I have to make at least one get($url) call outside of the promise for it to work.
brrt what's the source of the URI module?
ollej Yeah, sounds very similar. 10:15
github.com/perl6-community-modules/uri 10:16
llfourn bets LWP::Simple uses this URI as well
ollej Sounds very plausible.
llfourn ollej: github.com/cosimo/perl6-lwp-simple.../Simple.pm 10:17
would be cool if we could get to the bottom of this
RabidGravy that would explain why I couldn't replicate the problem CurtisOvidPoe rt'd with plain IO::Socket::INET code 10:18
ollej I'm using a Mac btw, installed Rakudo via homebrew. But I think I get the same when running in a Ubuntu VM.
RabidGravy it shouldn't matter
llfourn ollej: according to ticket it happens in linux distros as well 10:19
brrt mysterious stuff
URI.new doesn't seem to do anything but parsing
RabidGravy yep, confirmed 10:20
ollej Yeah, I can't see why it would cause an issue with the Promise.
RabidGravy no, neither can I 10:22
but it definitely does
llfourn same for me :| 10:23
azawawi question, do we need to put a " use lib 'lib'; " in a p6 test always or not? 10:24
RabidGravy azawawi, probably not, it's partly superstitious as e.g. panda test will run the tests with -Ilib anyway 10:25
azawawi what about `prove -Ilib -e perl6` ? 10:26
RabidGravy it's only useful if you're given to running the tests individually without providing the -Ilib yourself
llfourn even URI.new with no args hangs
RabidGravy I'll update the ticket, lest someone goes off looking in the wrong place 10:27
brrt llfourn 10:28
it may be a lazy deserialization issue
llfourn brrt: with the grammar? yes that's what I was thinking
RabidGravy++ thanks 10:29
brrt no, just with the URI module 10:30
llfourn brrt: I mean with the new here: github.com/perl6-community-modules...Grammar.pm
from BUILD in URI
brrt oh, that's actually quite plausible 10:31
RabidGravy yep, it definitely is the same problem - hangs at "futex(0x711f5c4, FUTEX_WAIT_PRIVATE, 1, NULL ....)" just as the original example 10:32
brrt so, it's a deadlock 10:33
brrt possibly because of EVAL 10:33
llfourn RabidGravy: what magic did you use to determine that?
RabidGravy strace 10:34
strace perl6 <script>
llfourn vague memories of strace return
thanks
RabidGravy I'm glad it's in URI and not in IO::Socket::INET as in someways it makes it easier to fix 10:37
llfourn tries to determine what is happening with perl6-debug but to no avail 10:39
RabidGravy I'm going to stick an issue on URI too just for completeness 10:41
ollej Sounds good. 10:43
In some way I'm glad it's not an issue with my code. Lots of hair was pulled out trying to figure out the issue. =) 10:44
RabidGravy ollej, glad you found it - the problem is afflicting quite a few http client libraries ;-) 10:45
llfourn yes it was a very good issue to stumble on becasuse it precisely demonstrates the problem 10:46
ollej RabidGravy: Glad to help. 10:47
RabidGravy Added github.com/perl6-community-modules.../issues/21 if anyone wants to have a fiddle ;-) 10:50
brrt m: Promise.in(1).then({ say "OH HAI"; }); 10:52
camelia ( no output )
llfourn m: await Promise.in(1).then({ say "OH HAI"; });
camelia rakudo-moar 5d83db: OUTPUT«OH HAI␤»
RabidGravy So, CurtisOvidPoe you could fix your original code by the simple expedient of getting a URI object outside the start { } and passing it to HTTP::UserAgent.get() ;) 10:54
itz_stmuk github.com/rakudo/rakudo/pull/557 10:55
*cough*
CurtisOvidPoe Yeah, that’s not fragile :)
RabidGravy sucks, but at least we know where the fault is 10:56
CurtisOvidPoe itz_stmuk: that looks great. I was wondering if there are tests for that in a different commit? We’ve had issues in that area before.
itz_stmuk CurtisOvidPoe: I was going to add a test based on your "420" (dude!) example 10:57
CurtisOvidPoe Heh.
brrt it's not just the EVAL, though 11:04
maybe the require 11:05
m: await Promise.in(1).then({ EVAL("say <hi>") });
camelia rakudo-moar 5d83db: OUTPUT«hi␤»
llfourn brrt: i'd say it's the require because if you make a single URI.new outside the promise the URI.new inside will be fine. 11:14
ilmari m: awayt Promise.in(1).then({ require URI }) 11:15
camelia rakudo-moar 5d83db: OUTPUT«5===SORRY!5=== Error while compiling /tmp/tFcBjPkcUX␤Undeclared routine:␤ awayt used at line 1. Did you mean 'await'?␤␤»
ilmari m: await Promise.in(1).then({ require URI })
camelia rakudo-moar 5d83db: OUTPUT«Could not find URI in any of:␤ file#/home/camelia/.perl6/2015.09-431-g5d83db3/lib␤ inst#/home/camelia/.perl6/2015.09-431-g5d83db3␤ file#/home/camelia/rakudo-inst-1/share/perl6/lib␤ file#/home/camelia/rakudo-inst-1/share/perl6/vendor/lib␤ fil…»
ilmari m: await Promise.in(1).then({ require Promise })
camelia rakudo-moar 5d83db: OUTPUT«Could not find Promise in any of:␤ file#/home/camelia/.perl6/2015.09-431-g5d83db3/lib␤ inst#/home/camelia/.perl6/2015.09-431-g5d83db3␤ file#/home/camelia/rakudo-inst-1/share/perl6/lib␤ file#/home/camelia/rakudo-inst-1/share/perl6/vendor/lib␤ …»
llfourn I can't get a require loading a valid or invalid file to work 11:18
by work I mean hang (not work)
RabidGravy I was going to the shared access to the hashes to be honest 11:25
brrt very hypothesis 11:26
such debugging
RabidGravy :) I just had a shower, I have all my stupid ideas in the shower 11:27
itz_stmuk RabidGravy: you mean you went outside? 11:29
RabidGravy nah, that's crazy talk
(I will have to sooner or later I'm running out of non-finale rack beer) 11:30
itz_stmuk I only have .be beers in the fridge :( 11:34
RabidGravy itz_stmuk, yeah I have a large bottle of Leffe, three different types of deadly Imperial Stout, a rather toxic Brewdog IPA and a "chocolate lager" 11:43
brrt by the way, perl5 question: is Test::More removed from perl 5.22.0 11:45
RabidGravy I don't think so 11:46
brrt my fedora doesn't have it, and my perlbrew version also doesn't seem to have it
so it's a fedora issue then
itz_stmuk In this example, the result of the comparison (which is a 11:47
L<Junction|/type/Junction>), is
converted to Bool before being printed.
oops
I intended to C&P "perldoc corelist"
not sure if the vendors patch it anyway 11:48
itz_stmuk ~//perl5/perlbrew/perls/perl-5.22.0/lib/5.22.0/Test/More.pm 11:49
azawawi m: require MIME::Base64 11:50
camelia rakudo-moar 5d83db: OUTPUT«Could not find MIME::Base64 in any of:␤ file#/home/camelia/.perl6/2015.09-431-g5d83db3/lib␤ inst#/home/camelia/.perl6/2015.09-431-g5d83db3␤ file#/home/camelia/rakudo-inst-1/share/perl6/lib␤ file#/home/camelia/rakudo-inst-1/share/perl6/vendor/li…»
itz_stmuk RabidGravy: you are running low :) 12:00
RabidGravy :) 12:03
I think I have disproved my shared hash hypothesis
llfourn perl6 -MIETF::RFC_Grammar::URI -e "await Promise.in(1).then({ require IETF::RFC_Grammar::URI });" will hang 12:09
pmurias konobi: ping 12:10
lizmat .botsnack 12:20
yoleaux :D
synbot6 om nom nom
itz_stmuk building doc takes ages ... I wonder if thats the pygment python steo 12:27
^ step
RabidGravy riight, actually going out into the real world now 12:36
|Tux| was/is Jeffrey Thalhammer on IRC here?
moritz itz_stmuk: it's much faster if Inline::Python is installed
Zoffix RabidGravy, don't fall into the sky!! 12:37
itz_stmuk moritz: ah thanks! maybe I'll compare that with a Text::VimColour branch :) 12:39
dalek kudo/nom: 5e8e234 | lizmat++ | src/core/Supply.pm:
Make sure increase in limit starts processes
12:45
Woodi hallo today :) 12:50
lizmat Woodi o/ 12:51
colomon \o 12:52
lizmat colomon o/
Woodi found somehow: www.norvig.com/design-patterns/desi...tterns.pdf it's about (better ;) ) patterns in lisp. also some other topics like: loops are bad, internal/lazy iterators, and more
lizmat m: my $l = gather { take-rw my $ = 1 }; $l[0] = 42 # this should work 13:02
camelia rakudo-moar 5d83db: OUTPUT«Cannot modify an immutable Int␤ in block <unit> at /tmp/I6VRhseFAr:1␤␤»
lizmat m: my $l = gather { take-rw my $ = 1 }; for @$l { $_ = 42 }; say $l[0] # this does 13:03
camelia rakudo-moar 5d83db: OUTPUT«42␤»
dalek c: d06a5f4 | (Steve Mynott)++ | bin/p6doc:
fix typo
13:03
lizmat the former is using the "push-exactly" form of the iterator
the latter is using the "pull-one" form of the iterator
I think this is a basic problem of the current Iterator interface :-( 13:04
azawawi question, what's wrong with this code? require MIME::Base64; say MIME::Base64.new.encode_base64(''); 13:05
lizmat azawawi: why require? why not use ?
azawawi lizmat: i need it to be loaded at runtime 13:06
lizmat star-m: require MIME::Base64
camelia ( no output )
azawawi lizmat: to lighten compile time for a module that is... like in Perl 5
star-m: use MIME::Base64; say MIME::Base64.new.encode_base64('');
camelia star-m 2015.09: OUTPUT«␤»
lizmat star-m: require MIME::Base64; import MIME::Base64; say MIME::Base64.new.encode_base64('');
camelia star-m 2015.09: OUTPUT«5===SORRY!5=== Error while compiling /tmp/G15IW2firz␤Could not find module MIME::Base64 to import symbols from␤at /tmp/G15IW2firz:1␤------> 3equire MIME::Base64; import MIME::Base647⏏5; say MIME::Base64.new.encode_base64('')␤»
azawawi star-m: require MIME::Base64; say MIME::Base64.new.encode_base64('');
camelia star-m 2015.09: OUTPUT«Could not find symbol '&Base64'␤ in block <unit> at /tmp/nuBBG8jNwz:1␤␤Actually thrown at:␤ in block <unit> at /tmp/nuBBG8jNwz:1␤␤»
hahainternet quick q: is the delete adverb mentioned anywhere obvious on the docs site? i couldn't find it to link to someone, maybe i'm an idiot 13:07
lizmat star-m: class MIME::Base64 { ... }; require MIME::Base64; say MIME::Base64.new.encode_base64(''); 13:07
camelia star-m 2015.09: OUTPUT«5===SORRY!5=== Error while compiling /tmp/uHhgX2odHZ␤The following packages were stubbed but not defined:␤ MIME::Base64␤at /tmp/uHhgX2odHZ:1␤------> 3 say MIME::Base64.new.encode_base64('');7⏏5<EOL>␤»
itz_stmuk hahainternet: to be frank I find "git grep" in a doc checkout better than the web search 13:08
azawawi lizmat: bug or by design?
lizmat I would say it's a bug
azawawi :)
so i finally caught one :)
hahainternet itz_stmuk: yeah probably a better plan, but it's not a big issue, just was of minor interest :)
azawawi lizmat: please note that first namespace is working (i.e. MIME) but the problem is in the n > 1 namespace part 13:10
lizmat yeah, that's exactly the problem... I think :-)
star-m: dd MIME
camelia star-m 2015.09: OUTPUT«5===SORRY!5=== Error while compiling /tmp/eJRKlBOLuI␤Undeclared name:␤ MIME used at line 1␤␤»
brrt gotta catch 'm all 13:11
azawawi lizmat: im working on optimizing module load time for HTTP::UserAgent (~ 5.95 secs)
lizmat azawawi: well, that optimization would be short lived, once we have precomp working properly again 13:12
azawawi lizmat: sometimes we need that MIME::Base64 module in a weird case (e.g. for POST) that does not happen and that module should be lazily used (at runtime via require) 13:13
lizmat: i see
dalek c: 11172ad | (Steve Mynott)++ | README.md:
explain make html and run
13:21
azawawi lizmat: does an API deprecation notice slow down module load in general? 13:23
timotimo azawawi: in the mean time, maybe installing with Zef instead of panda can help 13:24
lizmat only when it actually fires 13:25
afak
lizmat *afaik :-) 13:26
azawawi timotimo: what's Zef? 13:28
FROGGS azawawi: an alternative module installer 13:29
azawawi please link it
FROGGS m: require ::('MIME::Base64'); say ::('MIME::Base64').new.encode_base64(''); 13:31
camelia rakudo-moar 5e8e23: OUTPUT«Could not find MIME::Base64 in any of:␤ file#/home/camelia/.perl6/2015.09-432-g5e8e234/lib␤ inst#/home/camelia/.perl6/2015.09-432-g5e8e234␤ file#/home/camelia/rakudo-inst-2/share/perl6/lib␤ file#/home/camelia/rakudo-inst-2/share/perl6/vendor/li…»
FROGGS star-m: require ::('MIME::Base64'); say ::('MIME::Base64').new.encode_base64('');
camelia star-m 2015.09: OUTPUT«␤»
FROGGS star-m: require ::('MIME::Base64'); say ::('MIME::Base64').new.encode_base64('foo');
camelia star-m 2015.09: OUTPUT«Zm9v␤»
FROGGS star-m: require MIME::Base64; say ::('MIME::Base64').new.encode_base64('foo');
camelia star-m 2015.09: OUTPUT«Zm9v␤»
azawawi FROGGS: weird lol
FROGGS not weird... 13:32
FROGGS just... 13:32
hmmm
unexpected?
azawawi :)
FROGGS no, unfortunate :o)
azawawi tries it on HTTP::UserAgent
FROGGS azawawi: this is zef: github.com/ugexe/zef 13:33
dalek c: 6fcaaeb | (Steve Mynott)++ | doc/Language/faq.pod:
[FAQ] explain Any is sort of like undef
[Coke] that is a big runon sentence. 13:35
itz_stmuk the commit message or commit? 13:35
FROGGS the commit itself 13:36
dalek c: acb5ba7 | (Steve Mynott)++ | doc/Language/faq.pod:
[FAQ] split up
13:37
mrf itz_stmuk: Having spent a large amount of last night trying to find what Any meant this is awesome
itz_stmuk hopefully that's better
mrf: I was trying to document what I found odd on first looking at perl6 13:38
mrf itz_stmuk: Yeah. It really confused me when trying to debug a grammar and was doing say $match and was getting Any rather than undef or some sort of Match object 13:39
itz_stmuk I kept forgetting the matches were objects not strings 13:40
itz_stmuk probably typical perl5er experience 13:40
jdv79 github.com/perl6-community-modules/uri/pull/22 if anyone wants to look at it 13:41
mrf itz_stmuk: yeah though I have seen some unexpected behavious when running parse with :rule()
azawawi FROGGS: thx
PerlJam good $localtime all 13:42
mrf As a point does anyone know why I don't get a $/<foo> named group on the Match object when I do .parse("foo", :rule(<foo>)).
m: grammar G {rule foo {*}}; G.parse('foo', :rule(<foo>)); 13:43
camelia rakudo-moar 5e8e23: OUTPUT«5===SORRY!5=== Error while compiling /tmp/bWhrctwvzq␤Quantifier quantifies nothing␤at /tmp/bWhrctwvzq:1␤------> 3grammar G {rule foo {*7⏏5}}; G.parse('foo', :rule(<foo>));␤»
mrf m: grammar G {rule foo {.*}}; G.parse('foo', :rule(<foo>));
camelia ( no output )
ShimmerFairy mrf: $/ is the result of matching to the foo rule, that's why :) 13:44
mrf ShimmerFairy: so you would always use the top level $/ directly if you wanted to get complete matched string? 13:45
so in a test for a grammars rule is($/, 'foo') for example
dalek kudo/nom: 26617f9 | lizmat++ | src/core/ (2 files):
Add some "is raw" to AT-POS methods

They seem to need it.
13:47
c: f471356 | moritz++ | util/new-type.p6:
Add vim modeline to template for new types
13:48
ShimmerFairy mrf: yes, $/ is always the whole matched thing, as you asked for it. If you happen to be familiar with 'chroot' on unix-y systems (and are willing to follow an odd analogy), then the :rule<> option is like using 'chroot', where $/ is always the 'root match' :P
lizmat m: my $l = gather { take-rw my $ = 1 }; $l.AT-POS(0) = 42 # still trying to figure out why this doesn't work
camelia rakudo-moar 5e8e23: OUTPUT«Cannot modify an immutable Int␤ in block <unit> at /tmp/AuIja3iruA:1␤␤»
mrf ShimmerFairy: That makes sense now you have explained it.
lizmat m: my $l = gather { take-rw my $ = 1 }; for @$l { $_ = 42 }; dd $l[0] # whereas this does
moritz "hey dude, where's my container?"
camelia rakudo-moar 5e8e23: OUTPUT«42␤»
FROGGS m: m: grammar G {rule foo {.*}}; say G.parse('foo', :rule('foo)); 13:49
camelia rakudo-moar 5e8e23: OUTPUT«5===SORRY!5=== Error while compiling /tmp/nO4JfDv3v4␤Unable to parse expression in single quotes; couldn't find final "'" ␤at /tmp/nO4JfDv3v4:1␤------> 3 {.*}}; say G.parse('foo', :rule('foo));7⏏5<EOL>␤ expecting any of:␤ sing…»
FROGGS m: m: grammar G {rule foo {.*}}; say G.parse('foo', :rule('foo'));
camelia rakudo-moar 5e8e23: OUTPUT«「foo」␤»
llfourn does p6 have a way of getting user's home dir?
moritz m: say $*HOME # for llfourn
camelia rakudo-moar 5e8e23: OUTPUT«"/home/camelia".IO␤»
ShimmerFairy (incidentally, the use of / as the match variable name makes the comparison easier :P)
PerlJam moritz: and if he doesn't want the current user, but some other? :) 13:50
llfourn moritz: thanks...I should have tried something like that...
moritz PerlJam: the NativeCall docs have an example for calling getpwent (or whatever it's called) :-) 13:50
mrf ShimmerFairy: I hadn't thought of it like that. My tests currently do "my $match = Grammar.parse" style so it hadn't occured as a comparison 13:51
PerlJam llfourn: the $*VARS are stull sub-documented as far as I know, so don't sweat it.
ShimmerFairy mrf: hadn't occurred to me until just now either :)
PerlJam s/stull/still/ even 13:52
llfourn PerlJam: mmm this $*HOME is so sub-documented that it doesn't even exist in design documents :\
PerlJam llfourn: S16 mentions it 13:54
design.perl6.org/S16.html
llfourn PerlJam: ah my bad was looking at S22
mrf ShimmerFairy++ 13:55
llfourn s/22/28/
azawawi sergot: ping 13:59
jdv79 just FYI - the code in URI that's tripping up is unnecessary, at least for now. 14:01
afaict at least
azawawi so i looked at 'use HTTP::UserAgen't slowness and shaved off like 0.9 seconds overall. not bad right? :) 14:04
jdv79 how? 14:05
Zoffix azawawi++ # that's not bad at all
gfldex m: my $a; say $a.^name, ' is ', $a.DEFINITE; my $b = Any.new; say $b.^name, ' is ', $b.DEFINITE; # itz_stmuk++ for answering undefinedness. However, there may be problems with your example.
camelia rakudo-moar 5e8e23: OUTPUT«Any is False␤Any is True␤»
azawawi github.com/sergot/http-useragent/pull/102
sergot azawawi: pong 14:06
azawawi i couldnt apply require trick because the rakudo bug ofcourse
jdv79 that bug is funky
azawawi require Foo::Bar; Foo::xyz();
we used that a lot in Padre to speed up load time 14:07
lizmat moritz: I think the decont here github.com/rakudo/rakudo/blob/nom/...ray.pm#L39 is faulty
FROGGS azawawi: and this works? github.com/sergot/http-useragent/p...bbdc8777b5
jdv79 as long as you avoid threads its seems to lay dormant
FROGGS azawawi: why do we want to load Encode at runtime when we can load it at compile time?
lizmat FROGGS: because Perl 6 atm suffers from the basic delay in loading modules from P5 14:08
and in P5 you try to delay it to as late as possible
azawawi FROGGS: for the simple fact that other module will be using it. Hence test suites will be slower
FROGGS lizmat: yes, but this will change in a not too distant future
lizmat exactly
azawawi FROGGS: s/module/modules
moritz lizmat: possible. I can't really judge it.
lizmat I get one spectest fail in the zip-latest test
lizmat somehow Test::Tap is exposing it 14:08
# expected: $[(IntStr.new(2, "2"), "a"), (IntStr.new(2, "2"), "b"), (IntStr.new(2, "2"), "c"), (IntStr.new(3, "3"), "c"), (IntStr.new(4, "4"), "c")] 14:09
# got: $[(IntStr.new(4, "4"), "c"), (IntStr.new(4, "4"), "c"), (IntStr.new(4, "4"), "c"), (IntStr.new(4, "4"), "c"), (IntStr.new(4, "4"), "c")]
FROGGS azawawi: we will have precomp soon again and then your patch will slow things down
lizmat so it's checking the final value 3 times, rather than the intermediat :-(
azawawi sergot: the 5 seconds in HTTP::UserAgent will be propogated to hours of CPU time when you calculate module user test suites
timotimo yay, more oversharing 14:09
azawawi FROGGS: i see
timotimo didn't we have that problem with zip-latest already at the last workshop?
i think nine worked on it in the hotel lobby late one night 14:10
azawawi FROGGS: i have no problem, at least take the deprecated fix :)
timotimo well, "until late one night" probably
FROGGS azawawi: maybe at least open an issue that the require will be removed again once we have precomp back?
lizmat timotimo: hmmm.... rings a bell
azawawi FROGGS: what's this precomp everyone is mentioning btw? 14:11
FROGGS: let me create another PR then
spider-mario hm, why are our boolean operators left-associative? 14:12
itz_stmuk azawawi: those Foo.pm.moarvm files
FROGGS azawawi: precompiling modules
azawawi: like, compiling a Foo.pm from source code to a Foo.pm.moarvm, so every use after that dont have to parse the source file 14:13
azawawi FROGGS: the thing that panda removed?
spider-mario for example, it makes [||] (True xx *) hang instead of returning immediately
n0tjack m: my $a := Mu.CREATE; say $a; 14:13
camelia rakudo-moar 5e8e23: OUTPUT«Mu.new␤»
FROGGS azawawi: aye, which really belongs to rakudo
azawawi FROGGS: long live rakudo :) 14:13
itz_stmuk couldn't module owners stick a temporary Build.pm to precompile anyway? 14:14
jdv79 as i undertand it precomp loading is also broke atm 14:15
itz_stmuk ah
FROGGS itz_stmuk: that wont play well with testers.perl6.org sadly
jdv79: that's news to me 14:16
jdv79 i didn't try but ugexe said something like that y'day i think
FROGGS how can it be? our setting, Test.pm and other things get precompiled and loaded
lizmat To give you an idea of the benefits of precomp: the setting compiles in ~ 1 minute, yet it loads in 110 msecs 14:17
lizmat so a factor of 500 or so 14:17
masak yowza 14:18
jdv79 oh, nm. i misread him.
FROGGS ohh good
:o)
jdv79 irclog.perlgeek.de/perl6/2015-10-19#i_11401252
i'm actually not sure what he meant
gfldex itz_stmuk: i would like to suggest this change: gist.github.com/anonymous/87f0f253547ae2fc6404 14:19
itz_stmuk gfldex: thanks! that is useful but a little long. I will cherry pick some of it 14:21
moritz please don't equate "defined" with DEFINITE
moritz also it might be useful to explain something like "in Perl 6, 'defined'ness is a property of an object. Usually instances are 'defined' and type objects are 'undefined'" 14:22
itz_stmuk I think explaining (Any) is often similar to Perl 5 undef might be enough of a pointer for most 14:23
moritz: I'll add that
I think adding "the parens indicate type object" is also useful (?) 14:24
moritz +1 14:25
gfldex m: my $foo; say so $foo.^name eq "(Any)"; # some javascript victim might fall for that trap
camelia rakudo-moar 26617f: OUTPUT«False␤»
gfldex m: my $foo; print $foo.WHAT.gist(), "\n";
camelia rakudo-moar 26617f: OUTPUT«(Any)␤»
moritz this whole "say uses .gist instead of .Str" is a trap 14:26
gfldex m: my $foo; say $foo; say so $foo ~~ Any:D; my $bar = Any.new; say so $bar ~~ Any:D; 14:27
camelia rakudo-moar 26617f: OUTPUT«(Any)␤False␤True␤»
itz_stmuk I'll add a caveat about not explicitly checking for definedness using (Any)
its a bit of a can of worms :/
gfldex can of worms may be undefined too :->
dalek c: c2333fb | (Steve Mynott)++ | doc/Language/faq.pod:
[FAQ] new modules section to contain more content
14:28
gfldex for the FAQ "if you want to check for undefinedness do '$yourvar ~~ Any:D'" may be the shortest answer 14:29
jdv79 .tell ugexe now i'm curious - what did you mean here exacltly?: irclog.perlgeek.de/perl6/2015-10-19#i_11401252 & irclog.perlgeek.de/perl6/2015-10-19#i_11401292 14:31
yoleaux jdv79: I'll pass your message to ugexe.
gfldex m: my $foo = Mu.new; say so $foo ~~ Any:D; 14:32
camelia rakudo-moar 26617f: OUTPUT«X::Multi::NoMatch exception produced no message␤ in block <unit> at /tmp/LRGERSLs9t:1␤␤»
gfldex another worm, i think 14:33
m: sub f($p){ True unless $p ~~ Any:D }; f(Mu.new); 14:35
camelia rakudo-moar 26617f: OUTPUT«X::TypeCheck::Binding exception produced no message␤ in sub f at /tmp/6J2e6NHen0:1␤ in block <unit> at /tmp/6J2e6NHen0:1␤␤»
gfldex i'm leaning towards LTA for both cases 14:35
m: sub evil-sub-from-some-module(){ Mu.new }; sub f($p){ True unless $p ~~ Any:D }; f(evil-sub-from-some-module); 14:37
camelia rakudo-moar 26617f: OUTPUT«X::TypeCheck::Binding exception produced no message␤ in sub f at /tmp/8nLqYUNzMC:1␤ in block <unit> at /tmp/8nLqYUNzMC:1␤␤»
gfldex and that's why
m: sub evil-sub-from-some-module(){ Mu }; sub f($p){ True unless $p ~~ Any:D }; f(evil-sub-from-some-module); 14:38
camelia rakudo-moar 26617f: OUTPUT«Type check failed in binding $p; expected Any but got Mu␤ in sub f at /tmp/nU5nKlIU6T:1␤ in block <unit> at /tmp/nU5nKlIU6T:1␤␤»
gfldex that's better
dalek c: 91e1251 | (Steve Mynott)++ | doc/Language/faq.pod:
[FAQ] more Any feedback from IRC++
14:39
moritz I want to teach htmlify.p6 to include anything in X<..> in the search function 14:42
the question is: how should it appear in the search result list?
I thought maybe "Keyword: backtracking"
but even though from a search perspective it's a key word, it's not from a language perspective (it's not a Perl 6 key word) 14:43
in German I'd call it "Stichwort" :-) 14:45
timotimo pokes moritz' words 14:46
gfldex m: sub f(Any:U $p){my Any:D $v = $p};
camelia ( no output )
CurtisOvidPoe Has anyone had much success getting github.com/sergot/http-useragent to work? 14:47
Trying to log in to a Web site and navigate to restricted pages. Is there an easier way? (with docs?)
jdv79 it definitely used to work a bit better 14:48
lizmat afk for a few hours&
CurtisOvidPoe Right now, this always returns “Any”: try my $login = $ua.request( POST => $login_url, %formfields );
itz_stmuk I've had problems with most of the current HTTP modules not handling incorrect web page encoding 14:49
(apologies if this is fixed I've not looked in a while)
PerlJam moritz: perhaps "cross reference: backtracking" 14:51
moritz: or maybe just "reference: backtracking"
or something like that
chrisseaton hello - are any of the Perl 6 books (actual paper ones) any good? not sure if some of them were published a while ago and so don't apply any more 14:51
PerlJam chrisseaton: There are actual paper Perl 6 books?!? ;) 14:52
chrisseaton: Perl 6 and Parrot Essentials is the last paper P6 book that I recall and it's incredibly out-dated.
jdv79 there was one from Scott Walters a long time ago 14:53
i think
PerlJam yeah, but that was less about Perl 6 and more about doing P6y things in Perl 5
itz_stmuk there was a yellow Perl6 in Perl5 one
yes
PerlJam that's scrotties' book. "Perl 6 Now" 14:54
itz_stmuk s/Now/Then :)
gfldex chrisseaton: given that it takes halve a year between a book hitting the publisher and hitting the book shelf, I would not trust any of them.
PerlJam chrisseaton: There are lots of online resources for learning things about Perl 6. Is there a reason you want a dead-tree version? 14:55
chrisseaton PerlJam: I just wanted something finished, polished and coherent 14:56
I'm most interested in learning about idiomatic Perl 6 from scratch - I don't know Perl 5
PerlJam chrisseaton: Sorry, we're not there yet.
chrisseaton ok I'll try again next year
PerlJam chrisseaton: learning from scratch is available via #perl6 (several people here have done it)
flussence any printed book on Perl 6 right now will be about as useful and accurate as one on PHP6.
TimToady or look at rosettacode
pyrimidine PerlJam: how about learnxinyminutes.com/docs/perl6/ ? 14:57
as a start?
TimToady that's a good start for some people
itz_stmuk and jnthn's SPW slides 14:58
PerlJam there are lots of resources on perl6.org (learnxiny is there)
gfldex TimToady: while we are on the subject of rosettacode. I made quicksort work with current Rakudo. rosettacode.org/wiki/Sorting_algori...ort#Perl_6
TimToady: what i nether like nor understand is that `my constant @before := @rest.grep(* before $pivot);` doesnt work
TimToady constants are compile-time and forever 14:59
you can't rebind them
you're confusing constant with readonly perhaps 15:00
hoelzro o/ #perl6
FROGGS hi hoelzro
gfldex should my constant @before = ... work?
hoelzro o/ FROGGS
TimToady it should work *once* at compile time 15:00
and you don't want that really
why do you want to declare it unchangable when it is changable from call to call? 15:02
dalek p: 19e6c40 | (Pawel Murias)++ | src/vm/js/ (2 files):
[js] add console.trace when compiling a NYI thing to an expression
p: 9a64ab1 | (Pawel Murias)++ | src/vm/js/nqp-runtime/runtime.js:
[js] Fix syntax error.
TimToady but thanks for updating RC
one small suggestion, when you do that, put a {{works with|rakudo|2015-10-21}} or so, so other people know it's been worked on 15:03
gfldex your question made me understand what constant does, so I dont want to do that anymore. :)
TimToady :)
FROGGS still thinks that getting honoured by naming a C compiler flag after ones surname is very awesome... .oO( -Wall ) 15:04
TimToady needs all the honor he can get :) 15:05
FROGGS *g* 15:06
dalek c: 1eb2878 | (Steve Mynott)++ | doc/Language/faq.pod:
[FAQ] explain more about modules
15:09
[Coke] I have concerns about the new junction tests that are relying on .gist to check if something worked. 15:12
FROGGS would even eat the heart of a targ with TimToady if that would help...
[Coke] moritz: what's the difference between defined and .DEFINITE ?
moritz [Coke]: defined can be overridden (and Failure does it)
FROGGS [Coke]: the alternative is to check its boolification, which looses a lot of information 15:13
[Coke] moritz (.gist vs. .Str) I've disliked that since day one, but TimToady seemed pretty set on it.
pmurias .tell konobi I'm not really sure one I put the various compiled files in the package.json containing directory, how should the files be loaded 15:14
yoleaux pmurias: I'll pass your message to konobi.
[Coke] moritz: (search) doesn't need an annotation; need a landing page for the search results. it's complicated enough that making a dynamic site starts to make sense (rather than a precalculated static)
FROGGS I like gist/Str so much that some of my Perl 5 classes have a gist method I use for debugging
TimToady [Coke]: I decided some time ago that .gist and .perl should sort their output for unordered types, so those are fine for tests
FROGGS like, I can gist DateTime::Spans and DateTime::SpanSets (as graphs)
pmurias .tell should the user npm install -g nqp-js and the use Foo will be translated to 'require("nqp-js/Foo")'? 15:15
yoleaux pmurias: I'll pass your message to should.
FROGGS pmurias: you lost a right there
should hello 15:17
yoleaux 15:15Z <pmurias> should: the user npm install -g nqp-js and the use Foo will be translated to 'require("nqp-js/Foo")'?
FROGGS :P
pmurias .tell konobi should the user npm install -g nqp-js and the use Foo will be translated to 'require("nqp-js/Foo")'? 15:18
yoleaux pmurias: I'll pass your message to konobi.
n0tjack .tell n0tjack Talking to yourself makes you look crazy. 15:25
yoleaux n0tjack: Talking to yourself is the first sign of madness.
n0tjack should've seen that coming.
geekosaur heh 15:26
TimToady .tell TimToady: What kind of a name is TimToady:? 15:27
yoleaux TimToady: What kind of a name is "TimToady:"?!
jdv79 wow. never looked into it but HTTP::UserAgent is super unfleshed out. 15:28
itz_stmuk ever seen sausages being made? 15:29
jdv79 as in to be unusable for anything but the simplest of stuff
itz_stmuk software is sausages
jdv79 i prefer my sausages cooked
n0tjack .tell YourMom to call me 15:30
yoleaux n0tjack: I'll pass your message to YourMom.
n0tjack wow, backfire
RabidGravy jdv79, I'm not sure that's true, it's just not well documented 15:31
jdv79 CurtisOvidPoe: maybe use I::P5 and LWP for now:(
oh, can you provide an example of getting a html loging page and posting it back with creds? 15:32
RabidGravy sorry I don't understand what you mean
itz_stmuk Net::Curl uses nativecall and libcurl and I've had no issues
Net::Curl::Easy is easy
RabidGravy oh, login page 15:33
jdv79 yeah
n0tjack m: "Get an HTML login page and post it back with credentials".dwim;
camelia rakudo-moar 26617f: OUTPUT«Method 'dwim' not found for invocant of class 'Str'␤ in block <unit> at /tmp/aDFPFj9Fg9:1␤␤»
n0tjack aww
maybe in v. 6.1
RabidGravy well the posting back is easy, the "round trip" you seem to be wanting is a higher level something like WWW::Mechanise 15:36
not so much a missing feature of the useragent as a missing module that might use it
itz_stmuk most of the pure perl6 web modules fail on a significant number of poorly encoded web pages in the wild 15:37
jdv79 RabidGravy: huh? fetching a form and posting it are for a UA.
RabidGravy fetching a form, yep. posting a form, yep. 15:38
the bit in the middle, nope 15:39
jdv79 what bit is this?
RabidGravy the bit where it understands the content that is returned, parses it, determines what it should post to and with what parameters and occasions that post 15:40
which is what I take it you mean 15:41
ugexe jdv79: i guess under some situations it does still work. but if you look at this bit of code you can grep `$has_precomp` and `$has_source` when the argument names are actually kebobed. so for the highlighted bit of code it will actually loads whatever defaults CompUnit has instead of what the block of code implies github.com/rakudo/rakudo/blob/nom/...pm#L34-L60 15:42
yoleaux 14:31Z <jdv79> ugexe: now i'm curious - what did you mean here exacltly?: irclog.perlgeek.de/perl6/2015-10-19#i_11401252 & irclog.perlgeek.de/perl6/2015-10-19#i_11401292
ugexe RAKUDO_MODULE_DEBUG=1 perl6 -e 'require "/home/user/perl6/moar-nom/install/share/perl6/lib/Test.pm.moarvm";' # Failure loading precompiled code
RAKUDO_MODULE_DEBUG=1 perl6 -e 'require "/home/user/perl6/moar-nom/install/share/perl6/lib/Test.pm";' # yet this loads the precompiled code
jdv79 no, just connecting parts between the 2 reqs like url base and cookies, etc... 15:43
ua state or history maybe you'll call that
dalek c: 24ce248 | (Steve Mynott)++ | / (2 files):
[FAQ] return constraint
15:47
RabidGravy jdv79, if the cookies don't work then it's a bug and a failing test case would be welcome. As for the base url part, yes I've thought that too - making URI able to construct urls from bits would get it along there :)
jdv79 well, being about to do a get() and then a post() would be a start 15:49
i only looked for a bit but i didn't see how to do that easily 15:50
jdv79 RabidGravy: i did start a new URI 15:52
maybe after the other few things i want to do i may get back to that 15:53
but in the meantime Inline::Perl5++
RabidGravy there is a .get(), POST you just create an HTTP::Request just like you would in LWP::UserAgent and pass it to .request() 15:54
jdv79 yeah but post() would be nice. 15:58
RabidGravy slacker ;-) 16:00
cosimo hi folks 16:01
yoleaux 1 May 2015 00:17Z <raydiak> cosimo: github.com/cosimo/perl6-string-crc32/pull/5
pmurias cosimo: hi 16:02
cosimo sorry for jumping in like a total ignorant, but...
RabidGravy hey cosimo, thanks for getting back about those PRs :)
cosimo how do I `perl6 Makefile.PL ; make test' nowadays?
RabidGravy panda-test usually
cosimo RabidGravy: no problem, and sorry for taking so long 16:03
RabidGravy that's alright, I've had them for years on Term::ReadKey
cosimo every time I get back to p6, there's a new way to build and test and I never know how to 16:04
cosimo which says more about me, really :) 16:05
panda-test says 'Segmentation fault'. next step?
RabidGravy oops 16:07
have you built yourself a new rakudo recently?
cosimo just now 16:08
and I wiped everything in ~/.perl6
so clean slate, I tried looking for panda in github.com/perl6 but didn't find it immediately there 16:09
lol
perl6maven.com/how-to-install-perl6-modules -> 500 Internal Server Error 16:10
tadzik/panda is it?
moritz aye
perl6-m bootstrap.pl # in the panda dir
itz_stmuk cosimo: it runs under rakudo and is restarted regularly via cron :)
RabidGravy you may just want to do "rakudobrew buildpanda" (if it is indeed rakudobrew you use) 16:10
RabidGravy build-panda that is 16:11
cosimo itz_stmuk: in fact, it works now 16:12
itz_stmuk: thanks
RabidGravy: I do not use rakudobrew, I didn't know of its existence
cosimo seems panda is bootstrapping correctly now 16:13
moritz: what's perl6-m, and is it necessary to use it instead of perl6 ? 16:14
perl6 on moar?
PerlJam cosimo: yes
cosimo sorry all, it's noob-question time :)
TimToady we expect to have a lot more noobs descending on us in the near future, so you're good practice for us :) 16:15
cosimo I believe I am, yes :) 16:16
cosimo f.ex. why 'panda-test' but 'panda install' ? 16:17
tadzik panda-tools are quite obsolete 16:18
panda-test does only test, without dependency checking, building etc 16:19
I don't think anyone uses that
cosimo but panda itself doesn't have a 'test', does it?
oka_ hi
RabidGravy which is quite handy when you are working on a module
I definitely use panda-test quite a lot
cosimo tadzik: what should I use instead of panda-test then? 16:21
n0tjack m: say char(72);
camelia rakudo-moar 26617f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/jJJt8EgaeT␤Undeclared routine:␤ char used at line 1. Did you mean 'chars', 'chr'?␤␤»
n0tjack m: say chr(72);
camelia rakudo-moar 26617f: OUTPUT«H␤»
n0tjack m: say chr(2**32);
camelia rakudo-moar 26617f: OUTPUT«␀␤»
ilmari m: say chr(2**37); 16:22
camelia rakudo-moar 26617f: OUTPUT«␀␤»
RabidGravy I guess it's no different to "prove -e 'perl6 -Ilib'" 16:23
[Coke] cosimo: ar you trying to test a module you're developing?
cosimo [Coke]: indeed
[Coke] I used to use ufo for that; it made a makefile, then I'd make test. 16:24
cosimo [Coke]: yes, I used ufo too, a while back
then I understand ufo became obsolete
[Coke] but also: PERL6LIB=lib prove -v -e perl6 -r t 16:24
dalek c: 103019d | (Steve Mynott)++ | doc/Language/faq.pod:
compile time errors are SORRY
c: 4f7bb04 | (Steve Mynott)++ | doc/Language/faq.pod:
fix pod
[Coke] cosimo: I don't think it's obsolete.
itz_stmuk I like ufo 16:25
[Coke] If so, we need to get the word out. :)
PerlJam cosimo: it's "old" but not necessarily obsolete
cosimo prove works fine for me, really 16:27
but ok, it feels like a confused mess
cosimo please don't take it as an offense 16:28
so if I want to install, I'd use 'panda install'? because that gives me no output, and seems to do nothing at all 16:29
itz_stmuk add a dot on the end
cosimo itz_stmuk: I see... works now, thanks much! 16:30
RabidGravy cosimo++ # all the things are fixed now :) 16:33
cosimo RabidGravy: did you manage to run a clean 'make test' for Cache::Memcached ?
RabidGravy yeah, what you merged was working (of course it may have been overtaken by changes in rakudo) 16:34
cosimo RabidGravy: I see it runs cleanly if no memcached is running on :11211, so that's wonderful!
however, it fails miserably when an actual memcached is listening on :11211
but yeah, great stuff 16:35
RabidGravy oh let me check that, as it definitely was working
cosimo RabidGravy: This is perl6 version 2015.09-433-g26617f9 built on MoarVM version 2015.09-79-gee9fc2b 16:35
RabidGravy: need to run now 16:36
again, sorry for all the annoying questions and ignorance
got to start somewhere 16:37
dalek c: 24ac6f6 | (Steve Mynott)++ | doc/Language/faq.pod:
[FAQ] Inline::Perl5 added
16:38
cosimo will have to look at LWP::Simple soon 16:38
tadzik cosimo: what is your usecase?
for just running test on your stuff, ufo is still a good tool 16:39
itz_stmuk cosimo: I have a PR for proxy support for LWP::Simple
moritz [Coke]: do you happen to understand why, in perl6/doc htmlify, find-definitions only calls itself recursively it has found a valid definition? 16:40
cosimo itz_stmuk: just merged it 16:41
itz_stmuk thanks! 16:42
cosimo tadzik: my use case is that I expect a 'perl Makefile.PL ; make ; make test' kind of workflow
n0tjack m: say 'ABCDEFG'.comb[3,0,1].join(", "); 'ABCDEFG'.comb[3,0,-1].join(", "); # I know I can say *-1 _syntactically_, but how do I pass negative indices inside an input array used for slicing? 16:43
camelia rakudo-moar 26617f: OUTPUT«D, A, B␤Index out of range. Is: -1, should be in 0..Inf␤ in block <unit> at /tmp/fs0fIuT4u3:1␤␤Actually thrown at:␤ in block <unit> at /tmp/fs0fIuT4u3:1␤␤»
cosimo I'm confused by having to use different tools (panda, ufo, prove, ...)
ideally IMHO, the one tool to use should be shipped with the perl6 executable
PerlJam m: say 'ABCDEFG'.comb[3,0,*-1].join(", "); 16:44
camelia rakudo-moar 26617f: OUTPUT«D, A, G␤»
cosimo if that were a Makefile.PL, I would be totally fine with it
just in case it wasn't clear :)
gfldex .oO( rosettacode could do with a REPL )
PerlJam n0tjack: oh .... I wasn't quite grokking what you were asking. I get it now.
n0tjack PerlJam: I didn't phrase it very clearly 16:45
but I'm used to passing indices around as inputs
PerlJam n0tjack: I think the answer is ... you don't. Or perhaps pass @array.end - $num where you wanted a negative number
n0tjack and I won't always have the luxury of using syntactic tools in-place like *-1
TimToady m: my @indices = 3,0,*-1; say 'ABCDEFG'.comb[@indices].join(", "); 16:46
camelia rakudo-moar 26617f: OUTPUT«D, A, G␤»
skids m: my @a = 3, 0, *-1; say "ABCDEFG".comb[@a].join(", ");
camelia rakudo-moar 26617f: OUTPUT«D, A, G␤»
n0tjack PerlJam: Sure, I could calc it, but I'd like some semantic token I could offer my callers to say "the last one", "the penultimate one", etc, without them having to know or ask the length of the specific array
PerlJam n0tjack: what TimToady++ said 16:47
flussence [Coke]: "PERL6LIB=lib prove -v -e perl6 -r t" can be abbreviated "prove -e perl6" if you have a META6.json present, and IIRC the "-e perl6" won't even be necessary soon
TimToady and skids++, a moment later :)
itz_stmuk hmm there really should be OS X Radudo Star binaries with the Windows ones
n0tjack TimToady: Ok, that's an approach but .. ew.
TimToady it's not syntactic
itz_stmuk does anyone know a tool to package up .dmg or one of those mac install bundles? 16:47
PerlJam n0tjack: um ... why is t hat "ew" exactly? 16:48
cosimo LWP::Simple passes all tests now
n0tjack For example sub mutton-slicer(Int @slice) { 'ABCDEFG'.comb[@slice];}; my Int @a = 1,2,*-1; say mutton-slicer(@a);
m: sub mutton-slicer(Int @slice) { 'ABCDEFG'.comb[@slice];}; my Int @a = 1,2,*-1; say mutton-slicer(@a);
camelia rakudo-moar 26617f: OUTPUT«Type check failed in assignment to @a; expected Int but got WhateverCode␤ in block <unit> at /tmp/qq2yK8VxzU:1␤␤»
n0tjack Breaks MDM
n0tjack Breaks the conceptual model, too 16:49
MMD
moritz m: say Pod::Heading.^mro
camelia rakudo-moar 26617f: OUTPUT«((Pod::Heading) (Pod::Block) (Any) (Mu))␤»
PerlJam do you really *need* that constraint?
n0tjack PerlJam: In my limited experience with p6, yes 16:49
geekosaur is working with mac stuff in another context *right now*, but not sure any handy-dandy tools
andreoss m: say Nil == 0 16:50
camelia rakudo-moar 26617f: OUTPUT«Use of Nil in numeric context in block <unit> at /tmp/qRZ_27iKGY:1␤True␤»
n0tjack PerlJam: I intend to make great (ab)use of the type system
andreoss how to suppress such warning?
or make it fatal
n0tjack One of p6's attractions to me is the cohesive integration of Perl's DWIMminess with a useful type system
I'm going to MMD the heck out of stuff 16:51
flussence m: use fatal; say Nil == 0;
camelia rakudo-moar 26617f: OUTPUT«Use of Nil in numeric context in block <unit> at /tmp/CksUirdPzq:1␤True␤»
PerlJam n0tjack: have you played with Haskell much?
n0tjack PerlJam: I have. I would not characterize it as DWIMmy, or whippuppity
flussence
.oO( that doesn't look fatal to me )
[Coke] moritz: no, find-definitions is evil & hairy and I haven't deconstructed it yet. 16:52
n0tjack PerlJam: Also, I'm leery of a language which relies so heavily on a core concept all its users struggle to explain to non-initiates
gfldex m: use fatal; say Nil == 1; say 'alive';
camelia rakudo-moar 26617f: OUTPUT«Use of Nil in numeric context in block <unit> at /tmp/JFl3shJ8Rq:1␤False␤alive␤»
[Coke] flussence: perl 5's prove reads META6.json !?
PerlJam n0tjack: are you talking about Perl 6 or Haskell there? ;-)
flussence [Coke]: the -e perl6 part does, it gets its lib paths from there 16:53
n0tjack PerlJam: What core concepts does p6 rely on that you couldn't explain to a non-Perl programmer in a few sentences?
TimToady m: sub mutton-slicer(Int @slice) { 'ABCDEFG'.comb[@slice % *];}; my Int @a = 1,2,-1; say mutton-slicer(@a);
n0tjack For example, junctions are novel but not arcane
camelia rakudo-moar 26617f: OUTPUT«D␤»
[Coke] why would that work locally?
n0tjack TimToady++
You da man.
TimToady S09 even speculates a modular index declaration, though it's NYI 16:54
flussence m: sub mutton-slicer(Int @slice) { 'ABCDEFG'.comb[@slice »%» *];}; my Int @a = 1,2,-1; say mutton-slicer(@a);
camelia rakudo-moar 26617f: OUTPUT«Cannot call Real(Whatever: ); none of these signatures match:␤ (Mu:U \v: *%_)␤ in sub mutton-slicer at /tmp/6vY3dm71uO:1␤ in block <unit> at /tmp/6vY3dm71uO:1␤␤»
TimToady m: sub mutton-slicer(Int @slice) { 'ABCDEFG'.comb[@slice X% *];}; my Int @a = 1,2,-1; say mutton-slicer(@a); 16:55
camelia rakudo-moar 26617f: OUTPUT«Cannot call Real(Whatever: ); none of these signatures match:␤ (Mu:U \v: *%_)␤ in sub mutton-slicer at /tmp/gin2vF5zDD:1␤ in block <unit> at /tmp/gin2vF5zDD:1␤␤»
n0tjack TimToady: I'd support an initiative to rename NYI to "nonce error", if only to ruffle the Brits ;)
TimToady m: sub mutton-slicer(Int @slice) { 'ABCDEFG'.comb[@slice »%» *];}; my Int @a = 1,2,-1; say mutton-slicer(@a); 16:56
camelia rakudo-moar 26617f: OUTPUT«Cannot call Real(Whatever: ); none of these signatures match:␤ (Mu:U \v: *%_)␤ in sub mutton-slicer at /tmp/58XBp7gAgJ:1␤ in block <unit> at /tmp/58XBp7gAgJ:1␤␤»
[Sno] I'm currently trying cross-compile rakudo-star and run into a few pitfalls
TimToady hmm
flussence looks like it shoulda worked...
[Sno] since cross-compiling has some host-tools and a target sysroot, that should kind-of distinguished ... 16:57
TimToady m: say (42 X+ *)(1)
camelia rakudo-moar 26617f: OUTPUT«Cannot find method 'CALL-ME'␤ in block <unit> at /tmp/cP_tQ8Fh97:1␤␤»
TimToady looks like * isn't transitive through metaops yet
and @slice % * is obviously incorrect 16:58
skids nOtjack: the problem of course is that you may protect yourself from non-Int values, but you don't protect yourself from accidental negative values, which I think was one of the reasons for *-1 learned from experience with P5 bugs.
n0tjack skids: IME, -1 is much more often useful and intended than an error
[Coke] [Sno]: can you nopaste the problem? 16:59
n0tjack skids: In those rare cases where I think the risk outweighs the benefits, I'd just do a subset > 0
[Sno] [Coke]: sure
n0tjack uh, >=0
[Sno] [Coke]: there're several ones, one nopaste for overview or dedicated?
n0tjack m: say ((1,2,3,4,5) X+ *.elems)((1,2,3)) 17:00
camelia rakudo-moar 26617f: OUTPUT«Cannot find method 'CALL-ME'␤ in block <unit> at /tmp/DT_O3SCIFV:1␤␤»
n0tjack boo
TimToady it's just a bug
PerlJam n0tjack: you would rather have to write the guard yourself than have Perl 6 provide it?
n0tjack PerlJam: I want Perl6 to install default guards for risks I think are common
PerlJam: I don't think "accidental" negative indices are common
TimToady toroidal arrays are cool, but they're not gonna be the default 17:01
n0tjack PerlJam: To the contrary, I think they're incredibly useful and should be better advertised
n0tjack TimToady: Boy, to get what I want then, I'd need some kind of programming language which lets me change its syntax on the fly.... 17:01
[Sno] nopaste.linux-dev.org/?784156 17:02
PerlJam use toroidal-arrays; # All's fair if you predeclare! :)
n0tjack PerlJam: Clearly that name isn't punny enough.
I refuse to use a module that doesn't employ some kind of terrible pun 17:03
TimToady
.oO(These aren't the toroids you're looking for...)
PerlJam n0tjack: you are going to write some *interesting* software in Perl 6. I can already tell.
TimToady maybe we should reserve a MONKEY pragma just for n0tjack++ 17:04
[Sno] [Coke]: nopaste.linux-dev.org/?784167 and nopaste.linux-dev.org/?784156 are the major ones for now ;) 17:05
I'm happy to provide a fix, but want to discuss the _how_ with Perl6 people before ;)
RabidGravy cosimo, there was some bit-rot since I last updated that PR, will be sending a further update shortly 17:06
TimToady MONKEY-JAR, for J, APL, and R
TimToady and once you stick your hand into it, you're stuck 17:07
PerlJam sounds about right :) 17:08
n0tjack hahah 17:09
[Sno] who's the person to talk about wrt. toolchain? 17:10
skids m: my @a = 3, 0, * div 2; say "ABCDEFG".comb[@a].join(", "); # also you lose things like this without allowing closures, FWIW.
camelia rakudo-moar 26617f: OUTPUT«D, A, D␤»
n0tjack .u 決心 17:11
yoleaux No characters found
n0tjack Whatever that says, it's the theme for our global sales kickoff this year
it's some kinda platitude
ah, determination; resolve 17:12
pink_mist [Sno]: at a guess it would be jdv79
[Sno] jdv79: any opinions adding --sysroot and --sdkroot options to nqp/rakudo Configure.pl and support them right then? 17:14
pink_mist: thanks
RabidGravy cosimo, there you go all worky again 17:15
itz_stmuk [Sno]: you can pass through options to moar like this 17:16
rakudobrew build moar --configure-opts=--moar-option=--cc=clang36
itz_stmuk not sure if that helps 17:16
[Sno] itz_stmuk: doesn't ;)
has nothing to do with option-passing
itz_stmuk you probably have to hack stuff up then :P 17:17
[Sno] but thanks
sure, but I want to hack it in an accepted way, not against the people currently contributing
itz_stmuk I still suspect you can pass your flags in 17:18
[Sno] itz_stmuk: no way, it has nothing to do with flags for moar or nqp 17:19
TimToady literally, 決心 is "decisive heart"
[Sno] it has to do with invalid and/or incomplete directories being used
PerlJam [Sno]: we're kind of an ask-forgiveness bunch, so you may just want to hack it and see what happens from there. 17:20
n0tjack TimToady: Does it have any compound meaning, like an idiom?
TimToady yes, determination, resolution 17:21
[Sno] look, when you have an sqk-root in ~/workdir/tmp/sysroots/x86_64-linux and Configure looks in /usr/bin instead of ~/workdir/tmp/sysroots/x86_64-linux/usr/bin - it's gonna fail to succeed
itz_stmuk oh so you need to add path prefixes?
[Sno] itz_stmuk: it's not a prefix 17:22
[Sno] because the prefix is /usr - the sysroot for target file system and sdk file system are local 17:22
itz_stmuk is a prefix in a general sense I didn't mean --prefix 17:23
[Sno] itz_stmuk: it's a chroot in general sense
itz_stmuk well stick some chroot(1) in the scripts
[Sno] itz_stmuk: chroot is 80's :P - in 2010 toolchains support sysroot 17:24
itz_stmuk you mentioned chroots! 17:25
anyway
[Sno] itz_stmuk: I tried to explain the difference to you ;) 17:26
PerlJam: gave the answer ;)
n0tjack m: say chr [-] map &ord, '心♥'.comb; # Apparently "heart without heart" in Unicode results in "deep thoughts" in Chinese 17:26
camelia rakudo-moar 26617f: OUTPUT«㥞␤»
itz_stmuk well you aren't very good at explaining and arguing on IRC isn't going to help you :) 17:27
n0tjack m: say chr [-] ords '心♥'; 17:28
camelia rakudo-moar 26617f: OUTPUT«㥞␤»
n0tjack oh, that's nicer.
dalek c/keywords-in-search: 7533a7a | moritz++ | htmlify.p6:
First shot at including keywords (X<..> references) in search results
17:29
jdv79 oh this is cool. a form tag has no type according to HTML::Parser::XML 17:30
jdv79 do we have another html parser? 17:30
n0tjack jdv79: Sure! HTML::Parser::XML.new.clone ;) 17:31
jdv79 i meant tag
thanks
n0tjack I keed, I keed
flussence I was thinking of maybe doing one using nativecall and Netsurf's html5 parser lib...
flussence no idea how usable that's meant to be outside its home project, though. 17:32
FROGGS o/ 17:33
dalek c: 393a8f7 | (Steve Mynott)++ | doc/Language/faq.pod:
[FAQadd a general section
17:37
RabidGravy fix all the things 17:40
moritz hack.p6c.org:3000/index.html if you search for "has" (without the quote), you now get some hits 17:46
dalek c: 7533a7a | moritz++ | htmlify.p6:
First shot at including keywords (X<..> references) in search results
17:51
c: 4858558 | moritz++ | htmlify.p6:
Merge branch 'keywords-in-search'
itz_stmuk uses American English spelling for consistancy :( 17:52
[Coke] What is the sort order of search results? 17:53
Seems like "reference" should be at the bottom.
moritz: has shows up 2x at that url. 17:54
both pointing to the same doc.
(but with different text in the search dropdown)
searching for, e.g. "col" should probably show column before meta object protocol 17:55
[Coke] searching for _ vs. - highlights that we are not presenting a unified front. 17:55
jdv79 what someone working on libxml2 binding? 17:56
that has an html parser
[Coke] hack.p6c.org:3000/routine/configure...cking.html has an ACCEPTS link that redirect loops. 17:59
itz_stmuk I think looping with running doc locally with mojo is due to missing apache config from the target system 18:00
doc.perl6.org//routine/configure_type_checking ACCEPTS is 404 18:01
[Coke] ok. docs.perl6.org/routine/configure_ty...cking.html has a link to ACCEPTS which is a 404.
itz_stmuk I've also seen looping which was OK live 18:02
itz_stmuk I've seen other 404s too .. maybe running a spider against live would be useful .. or parsing the web logs if available 18:03
n0tjack oh hey cool, List.classify! 18:08
You guys have all my favorite toys.
nine Guess we just like to play
n0tjack m: (^25).classify({["flat","low","med","high"][$_ % 4]}) 18:10
camelia ( no output )
n0tjack m: say (^25).classify({["flat","low","med","high"][$_ % 4]})
camelia rakudo-moar 26617f: OUTPUT«flat => [0 4 8 12 16 20 24], high => [3 7 11 15 19 23], low => [1 5 9 13 17 21], med => [2 6 10 14 18 22]␤»
n0tjack heh, so cool
RabidGravy oh, I see 18:13
jdv79 FROGGS: was it you with libxml2?
FROGGS jdv79: it was
n0tjack oh, I guess I should get used to the fact that I can say <flat low med high> instead of having to type ["flat","low 18:14
etc. Even nicer.
jdv79 FROGGS: is that a reality? just wondering if that would be a decent xml and html parser. HTML::Parser::XML and XML seem unfinished. 18:15
FROGGS jdv79: it can parse xml/html, but accessing the parsed tree is not finished I think... 18:16
jdv79 oh neat 18:17
FROGGS jdv79: I guess I need a sample case to guide the development
jdv79: the test suite I've ported from Perl 5 is kinda icky, so it is not much fun to follow it
jdv79 parse an html form out of a page?
is html5 xml anymore though? 18:18
FROGGS hmmm
and the access the name and type attributes?
and then*
itz_stmuk I found HTML::Parser::XML OK if a little rough around the edges 18:19
I actually liked the XML parser API
jdv79 its slow and the query recurse option seems broken 18:22
itz_stmuk slow? a pure perl 6 xml parser! surely not! :) 18:23
jdv79 seems libxml2 only handles html4 so far
itz_stmuk is there actually any documentation for Nativecall at all apart from advent? 18:25
FROGGS itz_stmuk: doc.perl6.org/language/nativecall 18:26
itz_stmuk ah thanks!
I forgot it was core
FROGGS hardcore, even :o)
[Coke] nativecall supports C++, no? 18:28
FROGGS it does 18:29
[Coke] probably need a mention of that on the doc page. 18:30
FROGGS and examples... yeah :/ 18:31
dalek kudo/nom: c6326d4 | lizmat++ | src/core/Pair.pm:
Make Pair.new(key,value) about 4x as fast
18:37
jdv79 FROGGS: yup. name,type,value i guess.
FROGGS jdv79: working on it...
jdv79 no rush. thanks! 18:38
FROGGS :o) 18:39
dalek ecs: 009e614 | (Nova Patch)++ | S15-unicode.pod:
typo: BFC → NFC
18:40
dalek kudo/nom: 3087de7 | lizmat++ | src/core/ (2 files):
Eradicate internal RWPAIR sub now Pair.new is fast
18:50
dalek c: 7d3a59c | (Steve Mynott)++ | doc/Language/faq.pod:
[FAQ] 5to6- entry
18:55
c: 9fc750c | (Steve Mynott)++ | doc/Language/faq.pod:
[FAQ] linenoise and data structure dumping
c: 989bd03 | (Steve Mynott)++ | doc/Language/faq.pod:
tweaking
c: 3a74c72 | (Steve Mynott)++ | doc/Language/faq.pod:
[FAQ] nativecall
c: c4557d2 | (Steve Mynott)++ | htmlify.p6:
Merge branch 'master' of github.com:perl6/doc
[Coke] Why do we need to warn people about captchas? 18:57
also "Captcha"
dalek c: 2e8d389 | coke++ | doc/Language/faq.pod:
Use more generic link to S99
18:59
kudo/nom: a594769 | lizmat++ | src/core/Set.pm:
Use faster Pair creation for Sets
19:01
FROGGS lizmat: are you about to drop the named param candidate of Pair.new? 19:03
lizmat FROGGS: no
just no using it when we don't need to 19:04
FROGGS lizmat: is there a reason to not drop it?
lizmat the named variant is needed for signature unpacking afaik
FROGGS ahh
lizmat hmmm
that doesn't make sense
in any case, the named parameter interface follows the standard .new interface for public attributes 19:05
FROGGS hmm, yeah 19:06
lizmat the named interface, however, is about 100x slower than the positiional interface 19:07
RabidGravy ouch 19:07
lizmat probably because it doesn't get optimised atm 19:08
itz_stmuk github.com/rakudo/rakudo/pull/557 19:10
*bump* :)
dalek kudo/nom: 8b4c2ab | (Steve Mynott)++ | src/core/Rat.pm:
Fix RT #126391: [BUG] Bad "divide by 0" error message
19:11
kudo/nom: 2717139 | lizmat++ | src/core/Rat.pm:
Merge pull request #557 from stmuk/nom

Fix RT #126391: [BUG] Bad "divide by 0" error message
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=126391
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=126391
itz_stmuk ty
FROGGS itz_stmuk: if lines in source files a describe worthy, why dont describe them? your comment there kinda and kinda not does that
itz_stmuk FROGGS: I'll put more details in the RT ticket and also add a test 19:12
FROGGS better would be a "# we do X here so that Y, otherwise it would Z"
itz_stmuk probably tomorrow now
FROGGS itz_stmuk++
[Coke] are there any perf consequences on the 557 PR? 19:18
lizmat itz_stmuk: ^^^ ??? 19:20
:)
tadzik cosimo: then ufo is still the way to go 19:21
n0tjack m: say (<a b c d>.[* % 4]).perl; 19:24
camelia rakudo-moar a59476: OUTPUT«"a"␤»
nine [Coke]: it certainly doesn't help performance 19:30
nine [Coke]: but then, you wouldn't expect stellar performance from rationals anyway 19:31
n0tjack is gonna use project euler to learn about building a reliable test suite 19:42
n0tjack what is permitted following = to "name" a comment? 19:49
moritz n0tjack: context?
n0tjack =begin what am I allowed to put here \n blah blah blah blah \n blah \n =end that also has to go here
PerlJam n0tjack: I'm sure S26 can tell you :) 19:50
moritz n0tjack: an identifier
n0tjack moritz: thanks
PerlJam: I'm still learning to navigate the synopses
PerlJam n0tjack: keep in mind that some renders will do different things with different blocks based on your identifier 19:51
PerlJam that did not come out as coherent as it was in my head 19:51
:)
n0tjack is there any benefit to using HEREDOCS over comments for commenting? 19:52
ShimmerFairy n0tjack: after =begin it has to either be one of the standard names, or a custom typename that's in mixed-case (at least one uppercase and one lowercase letter). all lowercase and ALL UPPERCASE names either exist or are reserved
RabidGravy story of my life
n0tjack ShimmerFairy: Sounds like I really should read S26 ....
[Coke] HEREDOCS are parsed as code.
PerlJam ShimmerFairy++ way better 19:52
ShimmerFairy n0tjack: also, you need a newline after a =begin or =for block to start the content, since after the name you can put configuration options
n0tjack configurable comments, I love it 19:53
PerlJam POD is not exactly comments though
n0tjack been a while since I used POD or anythign like it. I never really wrote public code, even in my p5 days
ShimmerFairy n0tjack: Pod isn't really referred to as "heredocs", that's a separate thing. And if you want Pod-style comments, I recommend the 'comment' block --- '=begin comment ... =end comment', '=for comment', or '=comment'
n0tjack no, I meant actual HEREDOCS 19:54
ShimmerFairy oh :)
n0tjack I'm trying to learn to organize and structure p6 code appropriately, using Project Euler as my MacGuffin 19:55
ShimmerFairy m: say q:to/END_OF_HEREDOC/;␤The funny symbol there is used␤to simulate newlines for camelia␤This is a heredoc␤END_OF_HEREDOC␤say 42;
camelia rakudo-moar 271713: OUTPUT«The funny symbol there is used␤to simulate newlines for camelia␤This is a heredoc␤␤42␤»
n0tjack so in each script which implements a problem, I'm gonna want a comment which notes the problem number, URL, problem description
PerlJam maybe just use #`{} style comments rather than pod 19:56
n0tjack I'm also gonna learn use TEST; etc.
n0tjack PerlJam: Does that scale to making a .pm6? 19:56
ShimmerFairy n0tjack: ^^^ that q:to// above is a heredoc, a way of writing multiline strings in a more natural way. Pod stuff has nothing to do with that kind of stuff :)
n0tjack Ultimately I'm trying to learn to be a "real" p6 programmer, not just a private hacker
ShimmerFairy: I know, I used HEREDOCS already for my first p6 project (for sub USAGE()) 19:57
ShimmerFairy: I was wondering aloud if their enhanced flexibility has any advantages over POD for actual code documentaiton
PerlJam n0tjack: depends on what you want to do with the "comments" If you're going to extract them as documentation, you should use pod. If they are really and tryuly just commentary about the code, regular comments would be fine (IMHO) 19:58
s/tryuly/truly/ # odd typo
ShimmerFairy n0tjack: for documenting your code, Pod is the way to go :) You can also use #|[...] before or #=[...] after things to add Pod strings to declarations (called "Declarator Blocks" in S26, fyi)
n0tjack ShimmerFairy: thanks! 19:59
PerlJam: Well, I'm gonna throw away all this project euler code, i'm just using it to learn all the features surrounding actual programming
ShimmerFairy n0tjack: I think my confusion stemmed from the fact that 'heredocs' aren't really a commenting mechanism, so wondering if they work for that is a bit pointless :)
n0tjack ShimmerFairy: Anything is a commenting mechanism if you try hard enough :) 20:00
m: say 0xHiImAgreatComment;
camelia rakudo-moar 271713: OUTPUT«5===SORRY!5=== Error while compiling /tmp/B2WeKVuzDm␤Confused␤at /tmp/B2WeKVuzDm:1␤------> 3say 07⏏5xHiImAgreatComment;␤»
ShimmerFairy Well, true, but the point is that it's not meant to be one :P
ShimmerFairy m: say :36<Hi_I_am_a_great_comment> 20:00
camelia rakudo-moar 271713: OUTPUT«5018001041631299629722577337␤»
n0tjack heh
I like that p6 enforces appropriate hex digits in base-16 constants. J doesn't. 20:01
Once you introduce a different radix for a number, any digit is fair game
we can say 2blololololololol (2b to us is 0b for you) 20:02
ShimmerFairy Huh, I was just wondering if you could still get a 'Confused' error message, apparently it's not even that hard :P
lizmat m: fail "Confused" 20:03
camelia ( no output )
lizmat harder than I thought :-)
n0tjack m: confuzzled;
camelia rakudo-moar 271713: OUTPUT«5===SORRY!5=== Error while compiling /tmp/myscUjTU7q␤Undeclared routine:␤ confuzzled used at line 1␤␤»
moritz ShimmerFairy: cd rakudo/t/spec/; git grep Confused 20:04
ShimmerFairy moritz: to be more specific, my wondering was "rakudo's grammar does a good job of detecting specific kinds of parse fails at the source, I wonder if you can still hit rakudo's [equivalent of] / [$ || <.panic_here>]/" :) 20:05
dalek kudo/nom: 9fbd04d | lizmat++ | src/core/Rakudo/Internals.pm:
Add internal methods KEY_COLON_VALUE and TRIM
20:25
kudo/nom: 009400e | lizmat++ | src/core/Supply.pm:
Supply.throttle control message is now key:value

Rather than using a Pair (which is awkward to use in an .emit anyway, because you need extra parens to not make it a named parameter), we now use a string of the form "key:value". This should *also* make it much easier to use Supply.throttle as a means of controlling supply processing across multiple machines.
dalek ast/curli: c36ab6d | (Stefan Seifert)++ | S11-compunit/compunit-repository.t:
Test if $*REPO is a CompUnit::Repository
20:28
kudo/curli: 2e9dd10 | (Stefan Seifert)++ | src/core/Process.pm:
Set up a $*REPO
lizmat nine++
lizmat ran into a few issues while demoing yesterday at the NR.pm 20:29
lizmat that I would like to see fixed before tomorrow's release :-) 20:29
flussence if anyone around is going to be hacking on HTTP::UserAgent any time soon, I found this a while back that might come in useful: github.com/kevinburke/hamms 20:34
RabidGravy flussence, I'm hacking on it right now 20:36
lizmat m: class A does Supply {}; dd A 20:37
camelia rakudo-moar 271713: OUTPUT«A␤»
flussence does that seem like it's useful at all? :)
RabidGravy it would be useful, however I don't think making python a dependency would be an entirely popular move 20:38
flussence yeah, I can't expect it to be bundled with the module itself... 20:39
nine How can I create an our scoped constant in a package? Like our constant Foo::Bar::baz
grondilu doesn't exactly that work? 20:40
moritz m: package Foo:::Bar { our constant baz = 42 }; say Foo::Bar::baz
camelia rakudo-moar 271713: OUTPUT«===SORRY!===␤Name Foo:::Bar ends with '::' and cannot be used as a package name␤»
grondilu m: package A { our constant B = pi };
camelia ( no output )
moritz m: package Foo::Bar { our constant baz = 42 }; say Foo::Bar::baz
camelia rakudo-moar 271713: OUTPUT«42␤»
moritz m: our constant Foo::Bar::baz = 42 ; say Foo::Bar::baz 20:41
camelia rakudo-moar 271713: OUTPUT«5===SORRY!5=== Error while compiling /tmp/hkDX42vFKE␤Missing initializer on constant declaration␤at /tmp/hkDX42vFKE:1␤------> 3our constant Foo:7⏏5:Bar::baz = 42 ; say Foo::Bar::baz␤»
nine moritz: thanks! 20:42
nine m: role Foo::Bar { our constant Baz := 1; } 20:44
camelia rakudo-moar 271713: OUTPUT«5===SORRY!5=== Error while compiling /tmp/nOc6Cx5dXl␤Cannot declare our-scoped constant inside of a role␤(the scope inside of a role is generic, so there is no unambiguous␤package to install the symbol in)␤at /tmp/nOc6Cx5dXl:1␤------> 3role …»
nine Ok, how can I create an our scoped constant CompUnit::PrecompilationRepository::None when CompUnit::PrecompilationRepository is a role? 20:47
moritz you don't 20:49
lizmat similarly: how do you augment Supply ? 20:50
you don't
PerlJam how do I ... 20:52
you don't
lizmat hehe 20:52
RabidGravy don't do anything, it's so much easier
mrf Hi. Is there any way to get a string to output its hex values that I have missed 20:53
RabidGravy no disappointment, no bad comments, no complaints ;-)
nine I just did BEGIN CompUnit::PrecompilationRepository::<None> := CompUnit::PrecompilationRepository;
PerlJam mrf: please elaborate? 20:54
lizmat nine: that smells eh.... yucky ?
moritz m: my $str = 'FF'; say :16($str)
camelia rakudo-moar 009400: OUTPUT«255␤»
nine lizmat: I all up for better ideas :)
lizmat I guess we'll have to wait for jnthn to return :-) (wow, I couldn't tab his name even) 20:55
RabidGravy m: say "Foo".encode.list # mrf
camelia rakudo-moar 009400: OUTPUT«[70 111 111]␤»
RabidGravy or some variant thereof 20:55
moritz m: say "möp".ords>>.base(16) 20:56
camelia rakudo-moar 009400: OUTPUT«(6D F6 70)␤»
mrf moritz: perfect
lizmat jacoby o/ 20:57
jacoby Hey. I tried to reimplement some toy code in Perl 6. Behavior is bad enough, I must believe I did something wrong. 20:58
jacoby gist.github.com/jacoby/d8a061733af16158c531 20:58
dalek kudo/curli: b693ab1 | (Stefan Seifert)++ | / (5 files):
Make $*REPO.need(CompUnit::DependencySpecification.new(:short-name<lib>)) do something
20:59
lizmat m: sub aa { for @_ { .say } }; aa 42 21:21
camelia rakudo-moar 009400: OUTPUT«42␤»
lizmat m: sub aa { if @_ { for @_ { .say } } }; aa 42
camelia ( no output )
lizmat m: sub aa { if @_ { say @_ } }; aa 42 21:22
camelia rakudo-moar 009400: OUTPUT«[]␤»
lizmat seems all wrong to me ?
looks like an "if @_" eats @_ ? 21:24
grondilu m: { @_ && { .say for @_ } }(42) 21:27
camelia ( no output )
grondilu m: { @_ && "ok" }(42) 21:28
camelia ( no output )
grondilu m: say { @_ && "ok" }(42)
camelia rakudo-moar 009400: OUTPUT«ok␤»
PerlJam m: sub foo { if @_ { say "hi: @_[]" } }; foo 42;
camelia rakudo-moar 009400: OUTPUT«hi: ␤»
grondilu m: say { @_ && @_ }(42) 21:28
camelia rakudo-moar 009400: OUTPUT«[42]␤»
PerlJam m: sub foo { say @_.WHAT }; foo 42; 21:29
camelia rakudo-moar 009400: OUTPUT«(Array)␤»
grondilu m: { @_ && { .say for @_ }() }(42) 21:30
camelia ( no output )
grondilu m: { @_ && { .say for @_ }(@_) }(42)
camelia rakudo-moar 009400: OUTPUT«42␤»
grondilu stops pretending he has an idea of what's going on there
PerlJam m: sub foo { say @_; if @_ { say @_ } }; foo 42; 21:32
camelia rakudo-moar 009400: OUTPUT«[42]␤[]␤»
PerlJam I think it's some kind of iterator problem.
dalek kudo/nom: c85c7c6 | lizmat++ | src/core/Any.pm:
Make dd a little more useful for natives

If you specify dd $a, and $a is a native int or str, then you only get to see the value *without* the name. This is annoying while debugging. To make this easier, you can now specify natives as a named parameter.
   my int $a = 42; dd :$a; # Int a = 42
and by the magic of the :$var notation, we can now see the name.
21:33
PerlJam m: sub foo { say @_; if @_ { say @_; }; say @_ }; foo 42; 21:38
camelia rakudo-moar 009400: OUTPUT«[42]␤[]␤[42]␤»
PerlJam or ... maybe @_ is getting bound to the if's block rather than the subs block 21:38
flussence m: say 1,2 X+ (1 X+ 1) 21:40
camelia rakudo-moar 009400: OUTPUT«===SORRY!===␤Cannot invoke this object (REPR: Uninstantiable)␤»
RabidGravy flussence, fancy porting that hamms thingy to P6? 21:59
kmel m: say 'hello 6ers'
camelia rakudo-moar c85c7c: OUTPUT«hello 6ers␤»
RabidGravy lots of people will love you for it ;-) 22:00
mrf m: for 1..5, 6 {.say} 22:01
camelia rakudo-moar c85c7c: OUTPUT«1..5␤6␤»
flussence oh jeez, that's a tall order for the likes of me. I'll give it a shot but no promises :) 22:02
kmel anyone here responsible for perl6.org?
mrf ^ hwo do I make that actually print the numbers 1 to 6
tadzik quite a few of us, yeah :) 22:02
what's up?
flussence m: say 1..5 .list
camelia rakudo-moar c85c7c: OUTPUT«1..1␤»
flussence er
m: say 1..5 .flat
camelia rakudo-moar c85c7c: OUTPUT«Seq objects are not valid endpoints for Ranges␤ in block <unit> at /tmp/TxImchmBwR:1␤␤»
kmel hi tadzik 22:03
flussence m: say @(1..5)
camelia rakudo-moar c85c7c: OUTPUT«(1 2 3 4 5)␤»
PerlJam m: for flat 1..5, 6 {.say}
camelia rakudo-moar c85c7c: OUTPUT«1␤2␤3␤4␤5␤6␤»
tadzik hi kmel
kmel the link at the bottom of the page 'Modules' links to 'Whatever' 22:04
just thought i'd report it
RabidGravy flussence, well you could just start it and get people to contribute stuff as they need it 22:05
RabidGravy long shopping list of server weird shit to mock here 22:05
RabidGravy :) 22:06
mrf PerlJam++ Thank you. 22:07
kmel let me rephrase it: on the bottom of perl6.org the link called 'Modules' links to perl6.org/whatever 22:08
flussence
.oO( then again, I've got a lot of travel time with relatively crappy connectivity next week, so I might get something going... )
mrf Non flattening seems to be the biggest gotcha I have met coming from perl5 22:10
lizmat PerlJam grondilu submitted #126423 re if @_ eating @_ 22:13
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=126423
RabidGravy there are differences in the flattening yes
AlexDaniel m: say 1...-01; 22:21
camelia rakudo-moar c85c7c: OUTPUT«Potential difficulties:␤ Leading 0 does not indicate octal in Perl 6.␤ Please use 0o1 if you mean that.␤ at /tmp/Z3p9JglD7Q:1␤ ------> 3say 1...-017⏏5;␤(1 0 -1)␤»
AlexDaniel m: say 1...8...3; 22:23
camelia rakudo-moar c85c7c: OUTPUT«(1 2 3 4 5 6 7 8 7 6 5 4 3)␤»
AlexDaniel that's interesting
RabidGravy also buildbot, something that people would use instead of builbot would be good 22:30
lizmat m: my $l = gather { take-rw my $ = 1 }; $l.AT-POS(0) = 42 # submitted RT #126424 for this one 22:42
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=126424
camelia rakudo-moar c85c7c: OUTPUT«Cannot modify an immutable Int␤ in block <unit> at /tmp/6g7mQ7GWfn:1␤␤»
lizmat good night, #perl6!
RabidGravy I didn't even know take-rw was a thing 22:50
leont Given a list of scalars, and a list of lists of scalars, how do I merge one element from the left with all the elements from one entry from the right in an idiomatic way? 23:07
The best I have so far is (@left Z @right).map( -> @ [$left, @right] { ($left, |@right) })' 23:08
leont .map({ $_[0], |@$_[1] }) is shorter, but looks awful 23:10
(for the second half)
Ha! @left Z,| @right 23:11
RabidGravy the first looks fine, bearing in mind at this time of night I can barely see the sigils ;-)
leont No wait, that transposes the wrong way around :-o
m: my @left = 1, 2, 3; my @right = (4, 5, 6), [7, 8, 9], [10, 11, 12]; .say for (@left Z,| @right) 23:13
camelia rakudo-moar c85c7c: OUTPUT«(1 4 7 10)␤(2 5 8 11)␤(3 6 9 12)␤»
leont I don't understand why it's doing that though :-s 23:15
ShimmerFairy m: my @left = 1, 2, 3; my @right = (4, 5, 6), [7, 8, 9], [10, 11, 12]; .say for (@left Z, |@right) 23:17
camelia rakudo-moar c85c7c: OUTPUT«(1 4 7 10)␤(2 5 8 11)␤(3 6 9 12)␤»
ShimmerFairy leont: note that the | applies to @right, and it's not part of the metaop :) 23:18
leont Ah, yeah that makes more sense 23:19
leont Best so far: (@left Z, @right).map({ .map(|*) }) 23:48
ShimmerFairy Grammar::Debugger's tests fail with Cannot call ACCEPTS(Regex: Mu); none of these signatures match: for me now 23:53