»ö« 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.
timotimo m: sub foo { my @a = 1,2,3; my @b = <a b c>; return @a, @b; }; my (@a, @b) := foo; dd $a; dd $b 00:00
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '$a' is not declared. Did you mean '@a'?
at <tmp>:1
------> 3eturn @a, @b; }; my (@a, @b) := foo; dd 7⏏5$a; dd $b
timotimo m: sub foo { my @a = 1,2,3; my @b = <a b c>; return @a, @b; }; my (@a, @b) := foo; dd @a; dd @b
camelia Array @a = [1, 2, 3]
Array @b = ["a", "b", "c"]
timotimo like this?
AlexDaniel mscha: ↑ 00:01
mscha That'll do. Thans, @AlexDaniel, @timotimo
AlexDaniel timotimo: yes. Any other way?
I was expecting something like my $ (@a, @b) to work but meh
timotimo i'm completely worn out by today 00:02
MasterDuke timotimo: tomorrow when you're rested if you backlog #perl6-dev i have some questions there about weird nqp behavior 00:03
timotimo well, tomorrow we'll be moving more stuff
so ... potentially no rest
AlexDaniel
.oO( if timotimo is worn out, do we buy a new one or attempt to repair what we have? )
tbrowder ref pod unpacking: never mind, i think i have the answer... 00:04
00:11 zengargoyle joined
zengargoyle good day everybody 00:12
00:16 bjz joined 00:17 bjz_ left
zengargoyle is there anything yet that exposes a CUR in a human navigatable way ala `perldoc -l` or `perldoc -m` or just browsing the filesystem? 00:22
i'm thinking lika a special purpose shell or a FUSE filesystem type of thing that hides all of the hash stuff and provides a familiar human readable presentation layer... 00:24
MasterDuke zengargoyle: something other than the existing data dumping modules? 00:25
zengargoyle more like in Perl5 when i see an error i can easily-ish locate and inspect the code that caused that error because everything is a file somewhere with a grok-able name. 00:29
00:29 AlexDaniel left
zengargoyle but Perl6 modules are like a git repo hidden under obscure hash values that have no obvious followability. 00:30
modulo acgually downloading the module source repository and going from there... 00:31
00:31 skids left 00:32 mcmillhj_ left 00:33 mcmillhj left
TreyHarris Is there somewhere I learn about CUR other than by osmosis from its random references in the code and on chat here? I got it's CompUnit::Repository, and it used to be synonymous with CURI, CompUnit::Repository::Install, but no longer is because mumble and it's also somehow related to unicode b/c of mumble mumble and zef mi6 toolchain rakudo mumble... is that about right? 00:33
:-)
s/I learn/I can learn/
(I imagine if I had lurked on #perl6-dev I'd probably have a better idea, yeah?) 00:34
00:35 mcmillhj joined
TreyHarris I find this ironic since right now I'm trying to fill in holes in the docs' glossary, should there be a CUR entry? 00:35
00:36 mcmillhj_ joined
MasterDuke TreyHarris: i would say yes, but i myself don't know much about CURs either 00:36
zengargoyle TreyHarris: ditto, :) i sorta want to know if it's stable enough to start poking around. i think of it sorta like git where everything is a hash of some sort and the interesting stuff is inside a file that's named on the filesystem by the hash.
or an archive where the filenames are turned into hashes (to avoid utf8 problems). 00:37
MasterDuke zengargoyle: do any of the zef commands do something like what you want? 00:38
TreyHarris zengargoyle: I don't even know what the referent is of the words you're using. CUR is like a git-ish or filesystem-ish CPAN? 00:39
00:39 Cabanossi left
zengargoyle MasterDuke: not *really* sure. know zef can list installed things, but doubt it can do `perldoc -m` type stuff to show you the actual source of the module. 00:40
00:40 mcmillhj_ left, mcmillhj left
MasterDuke `zef look <module>` is kind of what you want 00:41
what about `zef locate`? 00:42
00:42 Cabanossi joined
zengargoyle ah, another minor gripe ATM is `zef help` prefixes everything wit the full path to zef which is quite long on my system and makes things unreadable. :P 00:43
00:44 Actualeyes joined
MasterDuke zengargoyle: this gist.github.com/MasterDuke17/ec6fe...688eeb57a1 looks to me like what you want 00:44
zengargoyle i really want the ease of just doing `ls` on a location and seeing everything, doing `less` some file and having it work... -ish 00:45
MasterDuke: i'll check it out. would not be terribly surprised if it's allready been done and i missed it. 00:46
TreyHarris zengargoyle: github.com/moritz/perl6-all-modules ? 00:47
MasterDuke zengargoyle: i too find "installed" perl6 modules somewhat convoluted to work with. so i pretty much just clone any i need to a known directory and -I them as needed 00:48
zengargoyle TreyHarris: yeah, there's a bit of difference between knowing the module and downloading the source and starting there vs just looking at what you actually have on your machine at the moment.
TreyHarris I mean, that's just an amalgamation of all the modules into a single repo, but it will definitely let you do everything you can do with git or a filesystem, because... it's a git checkout on a filesystem :-)
zengargoyle lol
00:50 mscha left
zengargoyle my problem with -I ATM is that it forces a sort of re-somthing-ing the chain of repositories. i've run into this in my preferred method of installing stuff... 00:51
00:51 mcmillhj_ joined, mcmillhj joined
zengargoyle building on one system and rsync to another... a different -I / $PERL6LIB causes a pause while things are re-jiggered... 00:52
because it's a hashed chain of things...
00:56 mcmillhj_ left, mcmillhj left
b2gills .tell haxmeister If you want to see Perl 6 features misused have a look at my code golf entries codegolf.stackexchange.com/users/1...ab=answers 00:58
yoleaux b2gills: I'll pass your message to haxmeister.
zengargoyle and all of the above is true, i just want a `perl6reposh` sort of command that exposes things in an easy manner, and wonder if it's allready been done or if CUR is stable enough to try and do it. 00:59
MasterDuke zengargoyle: i don't know of anything like that already done 01:00
and nine is probably the best person to ask about CUR stability 01:01
zengargoyle like 'export' a module that you have installed so you can tweak it in ./lib vs the whole shebang of actual source hacking.
the OMG quick fix or maybe comments beat documentation of just looking under .../lib/perl5 and being able to figure out what's going bonkers before going full i'mma gonna fix this from source... 01:04
and submit patches.. :P
and get a commit bit....
or fork.... 01:05
...
01:05 Guest81488 left 01:07 mcmillhj joined 01:09 Ven joined, Ven is now known as Guest89037 01:12 mcmillhj left 01:16 mcmillhj joined 01:17 Guest89037 left 01:18 cyphase left 01:21 mcmillhj left 01:23 cyphase joined 01:31 mcmillhj joined 01:32 bjz left 01:36 mcmillhj left 01:41 Cabanossi left 01:42 Cabanossi joined 01:45 ilbot3 left 01:47 ilbot3 joined, ChanServ sets mode: +v ilbot3 01:58 labster left 02:06 noganex_ joined 02:07 skids joined 02:09 noganex left 02:11 mcmillhj joined, mcmillhj_ joined, bjz joined 02:16 mcmillhj_ left, mcmillhj left 02:23 curt_ left, astj joined 02:28 astj left, mcmillhj joined 02:33 mcmillhj left 02:54 Cabanossi left 02:57 Cabanossi joined 03:05 raiph left 03:14 aborazmeh joined, aborazmeh left, aborazmeh joined 03:21 zapwai left 03:23 Cabanossi left 03:25 Cabanossi joined 03:28 bjz left 03:33 BenGoldberg joined 03:41 geekosaur left 03:43 geekosaur joined 03:56 bjz joined 03:58 Alikzus_ joined 04:06 bjz left 04:09 Cabanossi left, khw left 04:11 Cabanossi joined, bjz joined, bjz left 04:52 aborazmeh left
ugexe github.com/ugexe/Perl6-CompUnit--R...itory--Lib 04:59
unlike perl5 however we can have multiple versions installed, so the "just put it in a lib folder!" scheme starts to break down 05:01
05:02 aborazmeh joined, aborazmeh left, aborazmeh joined
ugexe and the export thing is a cool idea but that also involves additional complexity because that would load it with a different CUR as well as in a different order 05:04
actually you can probably do this export thing now doing something like my $dist = $cur-installation.resolve( CompUnit::Repository::DependencySpecification.new(:short-name("My::Module")).distribution; CompUnit::Repository::Staging(:prefix("./export-dir")).install($dist); 05:08
# CUR.resolve to get at the installed distribution, and CUR::Staging.install($that), then -Iinst#$that to use it 05:09
05:20 raschipi joined 05:25 raschipi left 05:27 aborazmeh left 05:28 movl left 05:29 movl joined 05:35 CIAvash joined 06:05 diego_k left, wamba joined 06:32 pmurias joined 06:49 rindolf joined 06:54 setty1 joined 06:58 wamba left 07:05 mcmillhj_ joined, mcmillhj joined 07:07 nadim joined 07:10 mcmillhj_ left, mcmillhj left 07:13 parv joined 07:17 skids left 07:18 skids joined 07:31 xiaomiao left 07:37 xiaomiao joined 07:40 Cabanossi left 07:41 Cabanossi joined
nadim Good morning P6 \o/ 07:42
pmurias \o/ 07:47
yoleaux 19 May 2017 13:51Z <Zoffix> pmurias: I see the commits[^1] that look to be about removing too liberal str->num coersions, but this code still coerses them without error. Do we need to do more work to make this stuff fail to coerce on RakudoMoar? `m: my num $x = my str $ = '6 cute'; my num $y = my str $ = '!'; dd [$x, $y ];` [1] github.com/perl6/nqp/compare/2017....2-gc60df1e
rindolf nadim: good morning 07:51
nadim rindolf: good morning
rindolf nadim: sup? 07:52
nadim waiting for people to wake up to ask about "expected Any but got Perl6::Metamodel::ContainerDescriptor (?)" 07:53
rindolf nadim: ah
08:00 domidumont joined 08:04 domidumont left 08:05 domidumont joined 08:15 wamba joined 08:16 nadim left, nadim joined
nine .tell tbrowder Staging is not exactly internal-use either. It's for the people who create packages for Linux distributions, i.e. not really Perl 6 people, but not exactly your ordinary end user either. 08:17
yoleaux nine: I'll pass your message to tbrowder.
nine .tell zengargoyle this may be useful to you niner.name/talks/A%20look%20behind%...0Perl%206/ 08:31
yoleaux nine: I'll pass your message to zengargoyle.
nine .tell zengargoyle also this: gist.github.com/niner/06792102587a79940294 08:34
yoleaux nine: I'll pass your message to zengargoyle.
nine .tell TreyHarris this may be useful to you niner.name/talks/A%20look%20behind%...0Perl%206/
yoleaux nine: I'll pass your message to TreyHarris.
nine nadim: nice coincidence: the talk I liked to ^^^ contains "a little homework exercise: write a CompUnit::Repository that hides an installed module like you would want in a test file to check if everything works if an optional dependency is missing." 08:38
08:50 domidumont left 08:54 Zoffix joined
Zoffix zengargoyle: you're using rakudobrew, right? If you use proper Perl 6, then you won't have those long paths in help in scripts.... Or use zef --help instead 08:55
nadim nine++
08:58 labster joined 08:59 skids left 09:00 Actualeyes left
zengargoyle Zoffix: hah, ok, `zef help` and `zef --help` do different things :) 09:01
yoleaux 08:31Z <nine> zengargoyle: this may be useful to you niner.name/talks/A%20look%20behind%...0Perl%206/
08:34Z <nine> zengargoyle: also this: gist.github.com/niner/06792102587a79940294
Zoffix zengargoyle: yeah, one is a zef command the other just triggers standard Perl 6 USAGE message and on rakudobrew it has giant lines for script path 09:03
09:09 Zoffix left
zengargoyle heh, --help isn't listed in --help 09:11
lizmat it *is* listed in "zef info" at the end 09:13
09:15 CIAvash left, Actualeyes joined 09:17 pmurias left
zengargoyle /opt/rakudobrew/bin/../moar-nom/install/share/perl6/site/bin/zef [-h|--help] -- yeah triggers the same $0 thak makes my eyes gloss over. :) 09:22
nine zengargoyle: just get rid of rakudobrew :)
09:24 bjz joined
zengargoyle LTA `zef info 2>&1 | perl -pe 's/^.*?(?=zef)//'` -- guess i could make a shell function. 09:26
wouldn't ditching rakudobrew just make it /usr/bin/zef or something?
guess it's a toss-up between showing the short vs what you typed vs the actual full thing. 09:29
09:34 pminten joined 09:36 bjz left, margeas joined 09:39 bjz joined 09:42 movl left, cpage joined, movl joined 09:43 TEttinger left
nine zengargoyle: it'd just show "zef" 09:47
zef [--force] fetch '[<identities> ...]' -- Download specific distributions 09:48
I'm not sure how exactly rakudobrew screws that up
09:50 bjz left
nine Oh, now I seem to remember that rakudobrew creates its own wrapper scripts for installed scripts. This way the installed script doesn't know what the user typed on the command line 09:55
Geth doc: 1e676de151 | (Zoffix Znet)++ | doc/Language/modules-core.pod6
Put module names in C<> blocks
09:56
doc: f099d4b9cb | (Zoffix Znet)++ | 3 files
Make xtest pass
09:58 darutoko joined
zengargoyle nine: yeah, i sorta prefer the basename approach of throwing everything but the last bit of the path away and assuming you can figure out what's going on if you put your mind to it. 10:07
you either know the shortest bit, or you know the bit you typed. 10:08
10:16 bjz joined 10:20 bjz left 10:23 cdc left 10:26 Ven joined, Ven is now known as Guest38231
Geth doc: c7a2d7739b | (Zoffix Znet)++ | doc/Type/IO/Spec/Win32.pod6
Fix incorrect output in example
10:27
10:28 bjz joined 10:29 pminten left 10:31 labster left
nadim What is operator Z=> ? is it a build dynamically from Z and => ? 10:35
Geth doc: 2e25c8262a | (Zoffix Znet)++ | 3 files
[io grant] Document IO::Spec::*.join

XXX TODO: I'm not exactly sure *why* we have .join along with .catpath and in what usecases join's *slightly* different behaviour is useful
10:36
nadim reading this: perl6advent.wordpress.com/2010/12/...operators/
jnthn Yes, Zop is a meta-operator
10:36 pmurias joined
jnthn m: say (1,2,3) Z+ (4,5,6) 10:37
camelia (5 7 9)
nadim do they get dynamically created? eg: i have define operator -me-, can I do Z-me- ?
m: say (1,2,3) Z=> (1,1,1) 10:39
camelia (1 => 1 2 => 1 3 => 1)
jnthn Yes
m: sub infix:<adek>($a, $b) { $a.uc ~ $b.lc }; say <a B c d> Zadek <f G h I> 10:41
camelia (Af Bg Ch Di)
nadim what does my \c = some_code ; return? eg: what does my \c do? I understand undecorted variables but not the \ before the undecorated variable 10:44
jnthn m: my \c = 42; say c 10:45
camelia 42
jnthn It's the syntax to declares a name c bound to, in this case, 42
nadim whats the differenc with my c := 42 ? 10:46
jnthn The latter isn't valid syntax :)
nadim lol! ok
10:46 Guest38231 left
jnthn The \ is required on the declaration because a name parsed after my/our etc. is parsed as a type 10:47
So my c $x parses fine if there's a type c, for example
10:48 diegok joined
jnthn And Perl 6 parsing really ain't in to lookahead 10:48
nadim got it
10:48 Ven_ joined
jnthn That and it catches mistakes like my Int = 42; 10:48
10:48 Zoffix joined
jnthn Where people forget to type the variable 10:48
10:48 Ven_ left
jnthn Also note that 10:49
m: my $x = 42; $x++; say 4x
camelia 5===SORRY!5=== Error while compiling <tmp>
Confused
at <tmp>:1
------> 3my $x = 42; $x++; say 47⏏5x
jnthn m: my $x = 42; $x++; say 4x
camelia 5===SORRY!5=== Error while compiling <tmp>
Confused
at <tmp>:1
------> 3my $x = 42; $x++; say 47⏏5x
jnthn argh
m: my $x = 42; $x++; say $x
camelia 43
jnthn m: my \x = 42; x++; say x
camelia Cannot resolve caller postfix:<++>(Int); the following candidates
match the type but require mutable arguments:
(Mu:D $a is rw)
(Int:D $a is rw)

The following do not match for other reasons:
(Bool:D $a is rw)
(Bool:U $a is …
Zoffix Is there a way to make a module `use`ing which would enable all the MONKEYs? Like if I typed `use MONKEY` along with `use MyModule`? I know you can export a sub for EVAL monkey, but I also need -GUTS and -TYPING monkeys..
jnthn It's not a variable, it's just a name binding
araraloren $x is a container, \x not
10:50 BenGoldberg left
nadim I am playing with Data::Dumper a bit, dumpinf of Seq is boring! I'd llike to change that a bit. I also get a weird error (were Z=> is involved) nopaste.linux-dev.org/?1124639 10:51
araraloren Zoffix, I wonder is there a way `import some module` by **use** a module too 10:52
jnthn Zoffix: Don't know of one; also I think the point is that it's easy to grep for code using them. :)
nadim Is there something more one can say about Seq than $.iter = Nil.Str and $!list = Nil.Str ?
it would be better to say nothing than that 10:53
I also think that Seq should be .cache when dumping or the user is going to be surprised when she can't use her data after a dump 10:54
jnthn Perl6::Metamodel::ContainerDescriptor is something that Scalar, Array, and Hash reference; it's where internal things like the variable name, rw-ness, and type constraint are stashed
And it falls outside of the Perl 6 type system 10:55
nadim jnthn: I suspected that , should I be able to access it altogether?
jnthn If you're using .^attributes on basic built-in types, you're going to run across guts things. 10:56
Anyway, I suspect somewhere you're passing it to something with a $e parameter that's untyped, which means it defaults to Any 10:57
nadim I am. it there a way to know which ones are part of the P& type system
P6 type system
jnthn There's various heuristics you might use. .HOW.^name eq 'NQPClassHOW' or similar is probably pretty reliable 10:58
For Rakudo at least
'cus it'll net all of the objects that have implementation outside of CORE.setting 10:59
10:59 parv left
jnthn Note though that there are ways to get errors like the one you showed *within* the Perl 6 type system, for example Mu and Junction 10:59
nadim I handle Mu already but it is good to know about jumctions. I haven't tested dumping of Junctions yet. 11:00
jnthn: what about Seq, is there a way to say something interesting about them? 11:01
jnthn A Seq is a thing with one-shot iteration, so evaluating the Seq - which may be infinite - will do the iteration. You could call .cache of course, but that can cause downstream code that would normally break to not break. 11:03
Which may be a little surprising for a debugging tool 11:04
Oh, or it may break working code downstream of the dumping 11:05
'cus the .cache steals the iterator
So other things that would normally take it then can not do so
So it's hard to both dump them and leave them untouched; the whole reason they exist is so we know we can throw things away. 11:06
nadim indeed Seq is a pain, may be infinite, .cache steals the iterator, attributes say nothing about it really. I'll check what .perl says. 11:07
jnthn (Previous list designs in Perl 6 had such horrors as for $file-handle-to-4-gb-file.lines() { } keeping them all around)
.perl is considered as a consumption 11:08
Zoffix BEGIN $*W.do_pragma(Match.new, 'MONKEY', 1, []); or $*LANG.set_pragma('MONKEY-TYPING', 1); do the trick... wonder how to get at either of those vars in the `use MyModule`'s scope
nadim indeed it is, but it looks nicer, much nicer
jnthn I guess if pepole are dumping they want to know what they've got 11:09
nadim jnthn: so, how would you like to display Seq? note that we can have multiple ways, just have to do a role.
11:09 margeas left
jnthn nadim: It really depends what I'm doing. I can think of situations where I'd want it to expand it, and times when I'd just want it to leave the data structure well alone and tell me the overall "shape" 11:10
Zoffix m: dd 1...8
camelia (1, 2, 3, 4, 5, 6, 7, 8).Seq
Zoffix m: dd 1...*
camelia (1, 2, 3, 4, 5, 6, 7, 8, 9, 10... lazy list)
Zoffix is happy with that
jnthn I suspect doing something like .perl does is a decent default
With a way to switch the expansion off
A somewhat similar situation exists with Supply fwiw 11:11
Zoffix It actually throws
m: (1...*).perl
camelia Cannot .elems a lazy list
in block <unit> at <tmp> line 1

Actually thrown at:
in block <unit> at <tmp> line 1
jnthn Oh...
That's a bit LTA
But there's not much A we can do
11:12 espadrine joined
nadim I'll iplement something like what dd does with a limit of how many to show if it is a lazy list 11:12
and a role to not touch the Seq altogether
lizmat m: dd 1...* 11:13
camelia (1, 2, 3, 4, 5, 6, 7, 8, 9, 10... lazy list)
lizmat indeed
:-)
11:13 margeas joined
nadim m: dd (1..*)[*-1] 11:14
camelia Cannot coerce Inf to an Int
in block <unit> at <tmp> line 1

Actually thrown at:
in block <unit> at <tmp> line 1
jnthn For Supply I suspect trying to tap it to get values is a bad idea.
nadim probably very bad, except if you want to see what's in there 11:15
hmm, can't one empty the supply and re-inject the data? 11:16
it's probably still a bad idea
jnthn Yeah, supplies often have resources sat up the top end, or are tapping into a live stream otherwise
So tapping a supply will often do stuff like start a timer, starting reading data, opening a socket, etc. :) 11:17
nadim is it possible to know how many things are in the supply? that may be enough
jnthn No
I mean, the concept doesn't really exist 11:18
nadim not even a snapshot?
jnthn In that things aren't really "in" a Supply
nadim hmm, yes that makes it impossible
jnthn If you have the data already, then why'd you be using an async stream anyway? :) 11:19
nadim jnthn: I added a ticket to handle supplies in a dump, when i get to it, and to using supplies myself, I'll get back to you.
jnthn :)
nadim what does dd say about supplies?
I ask as I have no code using a supply at hand 11:20
jnthn m: dd supply { emit 42 }
camelia Supply.new
jnthn Nothing much :)
nadim m: 1..*.gist
camelia WARNINGS for <tmp>:
Useless use of ".." in expression "1..*.gist" in sink context (line 1)
jnthn precedence
m: say (1..*).gist
camelia 1..Inf
jnthn .. makes a Range object, unlike ... 11:21
nadim m: (1..8).gist
camelia ( no output )
nadim m: dd (1..8).gist
camelia "1..8"
nine m: BEGIN CompUnit::RepositoryRegistry.use-repository(class :: does CompUnit::Repository { method id() { "hider" }; method need($spec) { if $spec.from eq "Perl6" and $spec.short-name eq "Test" or not self.next-repo { X::CompUnit::UnsatisfiedDependency.new(:specification($spec)).throw }; self.next-repo.need($spec) }; method loaded() { List } }.new()); use Test; 11:23
camelia ===SORRY!===
Could not find Test at line 1 in:
<anon|55405120><36413024>
/home/camelia/.perl6
/home/camelia/rakudo-m-inst-2/share/perl6/site
/home/camelia/rakudo-m-inst-2/share/perl6/vendor
/home/camelia/rakudo-m-inst-2/sh…
nine nadim: ^^^ 11:24
nadim nine: sooo simple to find out! ;) 11:25
nine jnthn: I wonder why you didn't suggest this ^^^ as this possibility was an important factor in your design :)
nadim nine: any classy wrapper coming out soon?
Zoffix nine: do you think it's possible to make `use SomeModule` do `use MONKEY-TYPING` in the scope that did the use? BEGIN $*LANG.set_pragma('MONKEY-TYPING', 1); enables it for current scope, but I want it in the code that `used` my module
11:25 AlexDaniel joined
nine nadim: replace the hard coded "Test" by an attribute of this class, give the class a proper name and push it to CPAN :) 11:27
nadim nine: nice try.
jnthn nine: I almost forgot I did the original design for some of that stuff. ;-) 11:28
nine Zoffix: if you're desparate, you could do it like Inline::Perl5: github.com/niner/Inline-Perl5/blob...5.pm6#L607
jnthn But yeah, that's a cute solution :)
Zoffix nine: hm, It hought I tried that already 11:29
Ahaha 11:30
nine++
I did try it, but I had it in a BEGIN block :)
nine Zoffix: sooo close :)
nadim oh what an excellently helpful error message! Cannot use Bool as Matcher with '.grep'. Did you mean to use $_ inside a block? 11:31
P6++
nine I often don't bother looking at the docs because the error messages will tell me what I should have done anyway :) 11:33
11:40 AndyDee left, AndyDee joined 11:42 AndyDee left, Dee22 joined
araraloren Rakudo's error message sometimes are unfriendly. 11:43
11:44 Dee22 left, Dee22 joined
tbrowder nine: got yr msg, see docs for current wording and i'll make any changes you want 11:44
yoleaux 08:17Z <nine> tbrowder: Staging is not exactly internal-use either. It's for the people who create packages for Linux distributions, i.e. not really Perl 6 people, but not exactly your ordinary end user either.
11:46 Dee22 left, AndyDee joined 11:48 AndyDee left, Dee22 joined
Zoffix araraloren: like which? 11:48
araraloren Such as anonymous class in a method. 11:52
11:53 Cabanossi left
araraloren Sometimes 11:54
Zoffix What kind of an error is that?
m: class { method x{ my class {} } } }.x
camelia 5===SORRY!5=== Error while compiling <tmp>
Unexpected closing bracket
at <tmp>:1
------> 3class { method x{ my class {} } } 7⏏5}.x
Zoffix m: class { method x{ my class {} } }.x
camelia ( no output )
Zoffix no error
araraloren No, I mean error message not friendly . 11:55
Zoffix because it mentions <anon|34211324312> ?
11:56 Cabanossi joined
araraloren Such as a class like github.com/araraloren/perl6-termin...r.pm6#L893 11:56
Zoffix But it's not anonomous? 11:57
11:57 gdonald joined
araraloren just pull down 11:58
Line 903
nadim in met corner
araraloren Wait me make a smaple for it.
Zoffix araraloren: that's not an error though. You said some errors were unfriendly. Which errors? 11:59
11:59 cognominal left
eater m: for $("help", "pls", "no") -> $v { say $v.perl } 12:00
camelia $("help", "pls", "no")
eater ehh
is this supposed to happen?
lizmat yes, because you itemized the list
m: for "help", "pls", "no" -> $v { say $v.perl } 12:01
camelia "help"
"pls"
"no"
lizmat look ma, no parens! :-)
eater :')
Zoffix m: for |$("help", "pls", "no") -> $v { say $v.perl } # or if it's coming from some var, slip it
camelia "help"
"pls"
"no"
Zoffix m: for @$("help", "pls", "no") -> $v { say $v.perl } # look mah, no slip! :) 12:02
camelia "help"
"pls"
"no"
nadim araraloren: Data::Dump::Tree would display it as nopaste.linux-dev.org/?1124642, how would you like it to look like?
Zoffix araraloren: well, report errors that suck. There's a chance they can be improved.
12:02 Zoffix left
araraloren Sorry, I forgot how to reappear that error message. Just forget about it. I'll show guys next time it appear. :) 12:05
Ah, :) There are things that you can't ask for 12:12
tbrowder hi #perl6, question, please: why does .WHAT on a pod object not show the Pod::? 12:16
lizmat m: class A { class B { say ::?CLASS } } 12:17
camelia (B)
lizmat tbrowder: because of ^^^ perhaps ?
m: class A { class B { say ::?CLASS.WHAT } }
camelia (B)
12:17 bjz left
lizmat m: class A { class B { } }; dd A::B # outside 12:17
camelia A::B
12:18 bjz joined
tbrowder it's the base class according to the docs 12:18
can you use meta info to show the complete class parentage? 12:19
lizmat you should be able to from the lower class: 12:20
in Rakudo atm, parent classes do not which children they have, only children know which parents they have 12:21
*know
unless that changed recently, jnthn ?
tbrowder note that Pod is not a class, so shouldn't the Pod::Block name show the Pod part? 12:23
jnthn No, parents don't know their children; it would cause quite some trouble with being able to GC temporary/anonymous subclasses
12:24 eliasr joined
tbrowder is there any programmatic way to determine if an object is a pod type of any kind? 12:27
then its specific type could be determined from lnowledge of the sub types 12:28
hm, looking at Pod::To::Text i think i see the answer, a bit of given when code...indirectly getting at the actual type 12:30
12:31 bjz_ joined
tbrowder or multi subs/methods 12:32
araraloren You mean `$=` variable ?
tbrowder yeah, that magic thing
12:33 bjz left
tbrowder an array of pod named blocks 12:33
is there any clean way to extract it from a file except via an EVAL as used in various Pod* modules? 12:36
lizmat Perhaps Perl6::Parser ? 12:37
araraloren Em, it's an array
lizmat github.com/drforr/perl6-Perl6-Parser # tbrowder 12:38
araraloren .WHAT.say for @$=pod
tbrowder yeah, that attempts to read line-by-line and form the pod chunks that way, but i haven't tried it yet 12:39
oh, no, drforr's, i haven't in a good while, thanks! 12:40
12:54 Cabanossi left 12:56 Cabanossi joined, gdonald left 13:16 domidumont joined 13:17 bjz_ left 13:18 bjz joined 13:37 KDr2 joined 13:40 kaare__ left 13:53 gdonald joined 13:55 bjz left 14:00 smls joined
smls Hi 14:00
Did something like the once-specced %hash{||@path} ever get implemented, for specifying a multi-dimensional subscript dynamically? 14:01
14:01 bjz joined
Geth doc: 3dea97dd6d | (Jan-Olof Hendig)++ | doc/Type/Baggy.pod6
Updated a few incorrect signatures and examples
14:01
14:02 zapwai joined 14:03 obfusk_ left 14:04 obfusk joined
Geth ecosystem: f306d2ca74 | (Zoffix Znet)++ (committed using GitHub Web editor) | META.list
Add `Benchy` to ecosystem

  "Benchmark some code"
See: github.com/zoffixznet/perl6-Benchy
14:04
smls For now I'm using: reduce({ $^a{$^b} }, %hash, |@path) 14:06
...but that's not as nice.
14:06 zakharyas joined
araraloren smls, I don't think there has a implementation you wanted. 14:07
Geth ecosystem: c62c599278 | (Stefan Seifert)++ | META.list
Add CompUnit::Repository::Mask to the ecosystem
14:08
nine nadim: zef install CompUnit::Repository::Mask && perl6 -e 'use CompUnit::Repository::Mask :mask-module; BEGIN mask-module("Test"); use Test; # fails' 14:09
nadim nine++
is there a way to wrap prove? 14:11
araraloren Method/sub dont' know they are wrapped. 14:12
nadim prove is an executable 14:13
araraloren Em ? executable ?
Oh, IDK that
nine nadim: what for? 14:15
14:19 xtreak joined
nadim The above works fine when planning test that should work without an installed module. Sometimes one finds an error and wants to knwo if the module is the reason, if you have 15 test files, changing them back and forth is not much fun. 14:20
prove has a -M option
which could be used to mask the a prove t/* run
lizmat nadim: there's something like PROVE_OPTIONS I learned the other day 14:21
nadim is digging in the man page 14:22
14:22 domidumont left
nadim mmmnja! not in the man page 14:24
lizmat: where did you see that? 14:25
lizmat irclog.perlgeek.de/perl6-dev/2017-...i_14612132 14:26
and irclog.perlgeek.de/perl6-dev/2017-...i_14612179
14:26 AlexDaniel left
geekosaur was just added 14:28
nadim I though we were using P5 prove ... mmm maybe I am the only one doing that
geekosaur [20 18:38:23] <Geth> ¦ nqp: af678371e2 | MasterDuke17++ | tools/build/Makefile-common.in
[20 18:38:23] <Geth> ¦ nqp: Add PROVE_OPTIONS variable
although that's nqp so ...
lizmat hmmnm... maybe I've misunderstood the meaning of PROVE_OPTIONS 14:29
geekosaur we *were* using p5 prove
nadim maybe I explained badly
when did we stop using p5 prove and why?
and what replaced it? 14:30
Geth doc: bef040f601 | (Jan-Olof Hendig)++ | doc/Type/Setty.pod6
Added docs for pickpairs
14:31 bjz left
geekosaur because a p6 one was written, tested, and dogfooded 14:33
14:34 curt_ joined 14:38 khw joined 14:39 Zoffix joined, xtreak left
Zoffix nadim: a while back. Basically if you have TAP::Harness installed, zef will use it and it semi-accidentally was included in the last few releases of Rakudo 14:40
nadim: perhaps you want to use `if` module and conditionally load a module in your tests? 14:41
buggable: eco if
buggable Zoffix, if 'conditionally use packages': github.com/FROGGS/p6-if 35 other matching results: modules.perl6.org/#q=if
Zoffix m: sub ok ($) { say "no module" }; for ^2 { $++ and (require Test <&ok>); ok 42 } 14:44
camelia Cannot invoke this object (REPR: Uninstantiable; Callable)
in block <unit> at <tmp> line 1
Zoffix boo
m: require Test; import Test; ok 42 14:49
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
ok used at line 1
Zoffix wonders why that doesn't work
14:50 movl left 14:51 Zoffix left, movl joined 14:52 cygx joined
cygx m: require Test <&ok>; ok 42 14:53
camelia ok 1 -
cygx m: need Test; import Test; ok 42
camelia ok 1 -
14:56 cognominal joined 14:58 smls left 15:11 Sound joined 15:12 ufobat joined 15:14 BenGoldberg joined
nadim In the docs for Seq, The parageaph starting with "Caution: No program should ever assume a Seq may only be iterated once ..." is particularely brutish. docs.perl6.org/type/Seq 15:18
can someone please give a pice of code that creat an infinite Seq? 15:23
I mean a lazy Seq since I believe that lazy means it can be infinite too 15:24
15:25 cpage_ left
cygx m: say (1...*).is-lazy 15:26
camelia True
cygx nadim: ^
15:26 AlexDaniel joined
nadim say (1...*).^name 15:27
evalable6 Seq
15:27 cpage_ joined, zakharyas left
nadim ah! three dots 15:27
15:31 kaare__ joined 15:32 pilne joined 15:37 pminten joined
eater did a pugs perl6 wikipedia page exist? 15:44
araraloren why looking for that page.. 15:48
15:50 araraloren left 15:54 Cabanossi left 15:56 Cabanossi joined 15:59 Ven joined, Ven is now known as Guest30747 16:01 jmerelo joined
jmerelo Hi 16:02
Is there some way to re-export symbols that have been imported in a module?
So I have something like unit module Bar is export; use Foo :ALL; 16:03
Geth doc: 929b82f42a | (Jan-Olof Hendig)++ | doc/Type/Setty.pod6
Fix typo
jmerelo if I `use Bar;` then Foo::baz is available as ::{'$bar'} 16:04
Some way to just use it as $baz? Maybe redefining operator :: within Bar? 16:05
nine Sounds like you'd just need an EXPORT sub 16:09
yoleaux 15:58Z <Zoffix> nine: there used to be an issue with precomp + require in mainline. Is that fixed now or am I just lucky? Here's an old commit fixing the issue: github.com/zoffixznet/perl6-IRC-Cl...261ea48d08 but I've just tried this and it works fine, as doing using a try + block +_ require: twitter.com/zoffix/status/866322013912170496
16:11 bobv joined
Geth ecosystem: 790706ff78 | (Zoffix Znet)++ (committed using GitHub Web editor) | META.list
Fix typoed URL
16:14
jmerelo @nine as in? Can you give me an example? 16:15
@yoleaux that would work for a single sub, right? What if I need to massively export all symbols? 16:16
16:19 pecastro left 16:22 pecastro joined, pminten left 16:24 patrickz joined
patrickz Hey! I'm currently trying to compile rakudo on a raspberrypi3. I'm getting a compile time error in dyncall (ISO C90 forbids mixed declarations and code). I think I remember it's possible to just not compile dyncall and use ffi instead. Can I do that? 16:26
16:31 pecastro left
ilmari patrickz: which gcc version? 16:32
16:32 zakharyas joined, Guest30747 left
ilmari older versions default to -std=gnu90, try gnu99 or gnu11 16:33
gnuXX is cXX with gnu extensions
16:35 kurahaupo joined
patrickz rakudobrew build moar 2017.05 --configure-opts="-std=gnu99" 16:37
is that how I do it?
16:38 pecastro joined, kurahaupo_ left
cygx patrickz: moarvm seems to pass its CFLAGS to the dyncall build, which is a problem as it sets -Werror=declaration-after-statement 16:39
not sure how this is supposed to work, but you could try locating you moarvm's Makefile and remove that part from CFLAGS and build manually 16:40
16:42 bobv left 16:44 pecastro left 16:45 vimal2012 joined 16:46 vimal2012 left 16:47 Ven joined, cono joined, Ven is now known as Guest69624
cono Hello all. Guys if I want to propose something but it requires changes to nqp+moar+rakudo, how it usually handled? Should I start with single merge-request to rakudo? 16:48
b2gills cono: You could start by discussing it here. 16:52
16:56 pecastro joined
cono I'm trying to optimize S32-io/IO-Socket-INET.t. There is better way to find un-used port. You can actually bind on port 0 and after that get it by getsockname call 16:57
I made something like this: gist.github.com/cono/d828120249a08...632d1ec7b5
the only thing I really don't like is "creating additional op code". 16:58
suggestions welcome
% perl6 -e 'my $l = IO::Socket::INET.new(:listen, :localhost<localhost>, :localport(0)); $l.localport.say' => 35373 16:59
17:03 skids joined, Guest69624 left 17:07 Ven_ joined
patrickz I didn't get it to compile. So I just fixed the code... 17:09
cono patrickz: what do you mean? 17:11
patrickz sorry, was refering to a previous conversation. I had a compile time problem... 17:12
cono ah, k :)
17:13 zakharyas left 17:15 andrzejku joined
nadim It's possible to create a Seq with from-loop but is it possible to know that it was created by from-loop? 17:15
17:19 Ven_ left
Geth doc: 5742222856 | (Zoffix Znet)++ | doc/Type/IO/Handle.pod6
Remove dot in method name in heading
17:19
doc: 49e58bd60e | (Zoffix Znet)++ | doc/Type/IO/Handle.pod6
[io grant] Document IO::Handle.lines

  - Include &lines
  - Clarify behaviour vis-a-vis laziness
  - Document :$close
  - Remove bad practices from example
doc: 4ba026ab54 | (Zoffix Znet)++ | doc/Type/IO/Handle.pod6
Make $*ARGFILES a link
doc: 23524764cb | (Zoffix Znet)++ | doc/Type/IO/Handle.pod6
Rename arg in examples to better indicate its purpose
17:20
17:23 Zoffix joined 17:24 Ven_ joined, Cabanossi left
Zoffix cono: there's #perl6-dev channel for Perl 6 core dev (also #moarvm for MoarVM). Though right now it's a weekend and all... You could PR your changes or try to catch people active... My comments on it: it's a bit too surprising to set localport attribute to 0 yet it end up being 35373 (or whatever) when I go to fetch it again 17:25
17:25 Cabanossi joined
Zoffix And you also made the port `rw` just to make your change. What does it mean for that attribute to be `rw`? Will the sock change to another port? 17:26
17:27 cygx left
TreyHarris This confuses me; depending on how you read specs, rakudo's behavior is either wrong (and it should be saying False twice) or it's legal, but also legal for other implementations to optimize in a way that could return True twice here (or maybe even any of cross([True, False], [True, False])), I think: 17:33
yoleaux 08:34Z <nine> TreyHarris: this may be useful to you niner.name/talks/A%20look%20behind%...0Perl%206/
TreyHarris m: my $e = IntStr.new(3, "three"); my $f = IntStr.new(3, "trois"); say $e.WHICH; say $f.WHICH; say so $e.WHICH === $f.WHICH; say so $e === $f;
camelia IntStr|3
IntStr|3
True
False
Geth doc: 216710889d | (Jan-Olof Hendig)++ | doc/Type/Proc/Async.pod6
Fixed broken link
17:34 Ven_ left 17:35 andrzejku left
TreyHarris the WHICH and ACCEPTS behavior for allomorphs seems ill-defined. 17:36
Zoffix TreyHarris: there are `===` candidates for allomorphs. The .WHICH should be different too, so it's a bug they aren't 17:37
17:37 Ven_ joined
Zoffix (we'll eventually rework the ObjAt system to avoid many issues we currently have with them) 17:37
TreyHarris Zoffix: that makes me feel better; False False is how I read the specs.
Zoffix s: &infix:<===>, (<42>, IntStr.new: 42, 'meow' 17:38
s: &infix:<===>, (<42>, IntStr.new: 42, 'meow')
ah, right no bot.
github.com/rakudo/rakudo/blob/4946...hs.pm#L106
TreyHarris Zoffix: in general, $x === $y iff $x.WHICH === $y.WHICH ===, then, should be correct? 17:40
Zoffix I think so
TreyHarris er, s/===,/,=
k. 17:41
Zoffix dogbert11: is that some sort of special syntax in docs for links in the same doc?
TreyHarris specs certainly sounded like ACCEPTS implies WHICH implies ====, but whether the implicature was bidirectional was not explicit
Zoffix TreyHarris: "specs" is what? design.perl6.org? Note that they're historical, archived documents and don't really represent implemented reality in some areas. 17:42
17:42 Ven_ left
TreyHarris Zoffix: I mean the contents of the perl6/specs repo, which seem to be getting updated... you made a commit just this week 17:44
Zoffix ah
that's outdated
well, it's the same thing as on design.perl6.org
Zoffix points to the message at the top of the site
TreyHarris ah. is Perl 6 an "empirical language" as Damian called it again now?
s/called it/called Perl 5/ 17:45
(meaning, "there is no source of truth as to what Perl is outside of running it to see")
Zoffix TreyHarris: no, it's just a futile and wasted effort to keep those specs up to date, so the real specs are perl6/roast test (the computer version) and perl6/docs (the human version)
awwaiid TreyHarris: Roast! That's the official source of truth
dogbert17 Zoffix: I believe so 17:46
Zoffix Or more specifically, the 6.c-errata branch of perl6/roast, with master being tests still to be vetted when 6.d language is released
And the commit I made in perl6/specs are to the v6.d.pod language that has some of the 6d proposals
huggable: v6.d
huggable Zoffix, Proposed changes for Perl 6 v6.d: github.com/perl6/specs/blob/master/v6d.pod
Zoffix and no, unlike Perl 5, what Rakudo does does not define Perl 6 17:48
m: dd 42
camelia 42
Zoffix ^ there's no &dd in Perl 6 language
TreyHarris Zoffix: ahh, got it. looks like the implicatures between those three (ACCEPTS, WHICH, ===) in roast aren't fully tested out in both directions. But in general, immutable types should have a 1:1:1 relationship, mutable types... uh... 1:NaN:1 I guess? :-) 17:49
Zoffix yeah, some tests are rather poor. Here's the approximate coverage of Rakudo by master roast: perl6.WTF 17:50
(approximate because our coverage tool is still experimental and isn't 100% accurate)
TreyHarris nods 17:51
Voldenet m: dd :if</dev/sda> :of</mnt/backup/img1> :bs<8M> 17:53
camelia block <unit>
Zoffix heh
TreyHarris Wait... do ACCEPTS, WHICH, and === _ever_ disagree, even in the case of containers and anonymous constructors of mutables?
17:53 ChoHag left
Zoffix ACCEPTS called with what? 17:54
TreyHarris er, I should have been saying " .WHICH === .WHICH" every time above I've mentioned WHICH above.
17:55 setty1 left
Zoffix and .ACCEPTS? :) 17:55
TreyHarris so <mumble>.ACCEPTS(<mumble2) vs. so <mumble>.WHICH === <mumble2>.WHICH vs. so <mumble> === <mumble2>, for any valid mumbles and mumbles2?
that's what I mean
17:56 setty1 joined
Zoffix Ah, yeah, .ACCEPTS definitely not in the same category 17:56
17:56 domidumont joined
Zoffix m: for NaN, { dd [ .ACCEPTS($_), .WHICH === .WHICH, $_ === $_ ] } 17:57
camelia 5===SORRY!5===
Expression needs parens to avoid gobbling block
at <tmp>:1
------> 3TS($_), .WHICH === .WHICH, $_ === $_ ] }7⏏5<EOL>
Missing block (apparently claimed by expression)
at <tmp>:1
------> 3TS($_), .WHICH === .WHICH, $_ …
Zoffix m: for NaN, 42 { dd [ .ACCEPTS($_), .WHICH === .WHICH, $_ === $_ ] }
camelia [Bool::True, Bool::True, Bool::True]
[Bool::True, Bool::True, Bool::True]
Zoffix m: for NaN, 42 { say [ .ACCEPTS($_), .WHICH === .WHICH, $_ === $_ ] }
camelia [True True True]
[True True True]
Zoffix thinks harder
TreyHarris I can't find a case where they disagree without explicitly overriding ACCEPTS so it does so. 17:58
Zoffix m: for :!foo, 42 { say [ .ACCEPTS($_), .WHICH === .WHICH, $_ === $_ ] }
camelia [False True True]
[True True True]
TreyHarris Except for the allomorphs
Zoffix There we go
TreyHarris ahh
Zoffix That's for *the same* object. There are many more cases for different args
m: quietly { for (*.so xx 2), (/a/, /a/) -> $ ($a, $b) { say [ $a.ACCEPTS($b), $a.WHICH === $b.WHICH, $a === $b ] } } 18:01
camelia [True False False]
[(Any) False False]
Zoffix m: quietly { for (*.self, *.self), (/a/, /a/), ([1], [1]), ((1).Set, (1).Set) -> $ ($a, $b) { say [ $a.ACCEPTS($b), $a.WHICH === $b.WHICH, $a === $b ] } } 18:02
camelia [{ ... } False False]
[(Any) False False]
[True False False]
[True True True]
Zoffix looks like === is busted on Sets
m: dd [1] === [1]
camelia Bool::False
Zoffix m: dd [1].Set === [1].Set
camelia Bool::True
Voldenet uh, isn't identity operator just checking identity? 18:03
[1].Set is probably not [1].Set
Zoffix m: say [1].Set.WHERE === [1].Set.WHERE
camelia False
Zoffix Different objects
Voldenet isn't smart match preferred for that? 18:04
m: say [1].Set == [1].Set
camelia True
Voldenet m: say [1].Set ~~ [1].Set
camelia True
Voldenet I think it works fine.
18:04 movl left
Zoffix I think the discussion we're having is exactly about that: smartmatch is not the same as === 18:04
Voldenet imho === should just check if the address matches for objects, if I wanted a more expensive check, I'd use it 18:05
Zoffix heh 18:06
18:06 Zoffix left 18:08 jmerelo left
Voldenet Were you ever so wrong, that the person you were talking to left? 18:09
Geth doc: 0a9b9353ac | (Zoffix Znet)++ | doc/Type/IO/Handle.pod6
Fix typo in heading
18:22
doc: 17448207b4 | (Zoffix Znet)++ | doc/Type/IO/Path.pod6
[io grant] Document IO::Path.lines
18:23
doc: f3f70a0167 | (Zoffix Znet)++ | doc/Type/IO/Path.pod6
[io grant] Document IO::Path.words
18:30
doc: 96eada863f | (Zoffix Znet)++ | doc/Type/IO/Path.pod6
Improve note about reifying returned Seq for IO::Path.lines
webart k so I had my silly example of using feeds (==>) that took 20 seconds 18:32
that was on an older version of perl6 ... pulled, recompiled and it now takes 5 seconds 18:33
but it is still silly :-D
also several silly naïve benchmarks are now trivially slower than perl5 rub python .... e.g. www.perlmonks.org/?node_id=1099617 18:46
TreyHarris ZofBot: Sorry, I didn't mean to just disappear; my husband needed my help with something around the house 18:49
er.... Zoffix. he's gone now too.
18:50 setty1 left
webart on my machine with a log file that used to take 2 minutes to process in perl6 and 0.02 seconds for perl5 :-D ... it now only takes 1 second for perl6 .. wheee 18:50
moritz \o 18:51
Geth doc: 509f0e8960 | (Zoffix Znet)++ | doc/Type/IO.pod6
[io grant] Fix incorrect suggested routine
18:52 setty1 joined 18:54 silug joined
webart hmm I think it would be neat if perl6 had a way save "workspaces" like R does ... objects history data etc 18:56
for use with the console
webart checks ecosystem
TreyHarris webart: I can't find it now, but someone was working on a CLI shell based on Perl 6 with the idea of letting you define shell constructs, completions, etc. using grammars and I recall there being something about saving interactive state... maybe someone here will remember what I'm talking about 19:00
webart cool 19:05
19:09 pochi left
Voldenet webart: calm down with the performance problems, perl6 is around 20 years younger than perl5 19:10
perl6 will be as good in a few years or so
mst webart: 6.c was declared at the point at which rakudo was "working and optimisable" not *optimised* 19:12
19:12 ccntrq left
Voldenet I'm sure JIT will be improved at some point 19:12
webart I am calm ... I just got a 12000% speed increase in perl6
errm bad math well it went from 120 seconds to 1 second :-) 19:13
19:13 patrickz left
Voldenet so... I guess it's quite good :P 19:13
webart I was thinking in "marketing math"
Voldenet I'm sure perl6 will be actually faster than perl5 19:14
19:15 ccntrq joined
AlexDaniel webart: well, we're moving in the right direction, so there's not much to complain about I think :) 19:15
webart Voldenet: it will be as good and it will run everywhere on super duper jvm or $NEWCOOLNESS which will be even faster ;-)
AlexDaniel webart: by the way, there's this thing: tux.nl/Talks/CSV6/speed4.html 19:16
which isn't a super accurate representation of the perl6 performance, but still :) 19:17
19:17 darutoko left
webart AlexDaniel: more accurate than my "12000% faster !" 19:17
Voldenet creating perl6 runtimes howto: 1. make it incredibly slow (just add sleep(10) after each line) 2. after 2 months remove sleeps 3. brag about 40000% improvements 19:22
that'd be a great marketing method ;)
TreyHarris Damian Conway has done in-company dev training with that in mind... "Here's the obvious readable way that your boss will accept if he's the kind that watches the code commits, and here's the better way you keep in your pocket for when he asks for optimization" 19:24
Not with sleeps, obviously. :-)
Voldenet still, the improvements in speed are most impressive, it's 55x times faster :o
between the first and the last chart point
19:25 Cabanossi left, curt_ left 19:26 Cabanossi joined
TreyHarris A lot of Lua runtimes in embeded systems actually put sleep(1) between every two lines of code so that... trying to think of a polite term here... their "core users"... can "watch" their scripts run 19:26
So you can significantly speed up anything by sticking it all on one line with semicolons
19:26 j75 left 19:27 mr-fooba_ left, domidumont left
Voldenet Actually, putting sleep between lines in embedded systems might help their stability, but probably not 1s sleeps 19:27
TreyHarris (sometimes they make the intraline argument to sleep configurable, but sleep in Lua doesn't accept 0, so the best you can do is whatever the smallest tick float it will accept, which varies by implementation) 19:28
Voldenet: true. devices where Lua's controlling robotics or relays for instance. 19:29
Voldenet well, it's still better than perl5's madness of interpreting floats as 0 19:30
sleep(0.01); # so we don't update screen too hard
TreyHarris Voldenet: which madness is that?
Voldenet well, i guess it's okay once the programmer knows what's the default behaviour of perl5 19:32
TreyHarris so maybe someone else can answer what _would_ have been my next question to Zoffix: the ultimate _purpose_ of ACCEPTS _is_ "express smartmatching DWIMminess in an explicit way", yes?
19:33 aindilis left
TreyHarris When I gave Perl coding interviews I'd ask candidates to rate themselves on a scale of 1 (why are we having this interview?) to 10 (you are Larry Wall or a pumpking), and then I'd ask them what ALL the falsy values in Perl 5 were--their ability to answer the second compared with their self-ranking usually gave me a very good idea of how cofident they were with how much of Perl they knew. I didn't expect anyone 19:35
who gave self-ranking under 9 to actually reel off every singly falsy value.
Perl 6 makes this question no longer even very interesting to anyone over, say, a 3 or 4? 19:36
Voldenet Perl 5 is a lot less complex than perl 6 though 19:37
TreyHarris Voldenet: waterbed complexity.
Google used the 0-10 self-ranking this way in an online application, and when I gave my Perl a 9, I automatically got slotted into a phone-screen with Orwant before I could continue the interview process. Apparently I was the first candidate who gave a Perl >8 self-ranking to get a strong hire result :-) 19:39
Voldenet well, the easier the language is to understand, the more complex it is to write something in it 19:41
TreyHarris Voldenet: the language and type/MOP complexity is a bit of a PITA, but it pays off so dramatically in making DWIMmy behavior achievable without lots of fiddling like in P5
If you wanted to use wantarray() correctly for all possible cases, for instance, you needed like seven or eight different branches. Madness compared to multis. 19:42
Voldenet Stuff like perl6's type system certainly gives one an ability to document it properly 19:44
so the 'unusual casting/comparison behaviours' can become less unusual 19:45
TreyHarris yes. and the :D :U type dichotomy is just so, so useful and I haven't seen it in any other language (unless you consider pattern matching languages where null is a valid pattern) 19:46
s/type/type constraint/
Voldenet it's a lot harder to make a mistake that way, in C#7 null is a valid pattern, but it's hardly useful 19:48
19:48 ufobat left
Voldenet actually, it would help a lot if there wasn't 'Str:D' at all 19:50
Str is explicit enough, Str:U is an explicit "nulls are okay" sign
Geth yaml-pm6: 6c6c88e25c | (Nick Logan)++ (committed using GitHub Web editor) | .travis.yml
Update .travis.yml
19:51
Voldenet ...except Str:U does not allow defined strings :)
19:51 labster joined, labster1 joined
TreyHarris Voldenet: oh? I've generally been writing multis with Str:D and Str (or Str:D and Str:U), so I thought of it the other way round 19:52
Voldenet in my opinion it'd be more useful to just use Str when I expect an instance - it takes a possibility to make a silly mistake somewhere
and writing 'Type:D' by default everywhere isn't really very tidy
Geth doc: 0901ff29d9 | (Jan-Olof Hendig)++ | doc/Language/concurrency.pod6
Fix another typo
19:53
TreyHarris so you'd prefer an adverb that said "undefs are also acceptable" and have default type consraints include the current notion of :D
I see the argument, but I think that train has left the station, though 19:54
Voldenet > github.com/rakudo/rakudo/blob/6bb1...Instant.pm
ilmari has been doing scala lately, and likes Option[Foo] for optional things
Voldenet usage of Instant:D is a lot higher
than usage of Instant
ilmari then you can't forget to handle the "undef" case 19:55
Voldenet indeed, because by writing Instant:YesIAllowEmpties you are pretty much saying that you'd handle nulls :)
TreyHarris weird... when I do ctrl-F in Chrome on that Instant.pm page from github, and search for "Instant:D", I get no results even though I can see them. Something with the syntax highlighting? 19:56
ilmari the disadvantage is that you have to write code to get inside the Option, but .map and for comprehensions make that easy 19:57
TreyHarris yeah, looks like any Ctrl-f search across, roughly, a \b breaks. "multi" returns stuff, "multi m" nothing 19:58
that's pretty annoying.
Voldenet It works on firefox, though. :)
Geth Inline-Perl5: 9519c34307 | (Nick Logan)++ (committed using GitHub Web editor) | .travis.yml
travis s/panda/zef/ + osx testing
Inline-Perl5: 2d4c22fb30 | (Nick Logan)++ (committed using GitHub Web editor) | .travis.yml
Determine oldest version later

Would require tagging zef at the right commit, as HEAD will install but fails handling dependencies due to a change in `Version`
Inline-Perl5: 7bad806e2a | niner++ (committed using GitHub Web editor) | .travis.yml
Merge pull request #96 from ugexe/patch-1

travis s/panda/zef/ + osx testing
20:01 aindilis joined
TreyHarris Voldenet: nope, Firefox does the same for me; must be an iOS thing. (I'm on my iPad Pro with a h/w keyboard, moshed in to the Linux virtual on the machine my husband's currently using) 20:01
Voldenet Huh, that's very uncommon. 20:02
nadim hmm, how do I get elements from a seq without assign it to an array? I want to get the n first elements (or less if it containst less than n). 20:03
TreyHarris Blink is a lovely iOS SSH/mosh terminal emulator: itunes.apple.com/us/app/blink-shel...1156707581 or github.com/blinksh/blink
webart hmm could perl6 ever run on a lua runtime ?
nine TreyHarris: the pumpking doesn't necessarily know all about perl ;) 20:04
TreyHarris nadim: surround it in parens and subscript as usual doesn't work?
nine: how would _you_ know? :-P
webart wait ... let's have a runtime for runtimes ! 20:05
instead of parrot it could be called "poly" 20:06
nine TreyHarris: I know several. And from their deference to certain other individuals with regards to deep knowledge lets me assume that they are not _the_ most knowledgable ones. Though of course they know a LOT.
TreyHarris nine: I was joking, I know who you are and have known several pumpkings ;-) 20:07
20:07 movl joined
nadim TreyHarris: haven't tried and I don't want an out of bound exception if I ask for more 20:07
TreyHarris nadim: you don't get an exception in that case, you get Nil 20:08
m: say (1..3); say (1..3)[1]; say (1..3)[5];
camelia 1..3
2
Nil
webart since poly means "many" in greek maybe parrot was some kind of oblique reference to "poly-runtime" 20:09
nadim hmm, I'd rather know the length if it is not lazy. Nil is all fine till someone wants to put Nils in a Seq and Nil is a valid element in that context 20:10
20:10 abruanese joined 20:11 espadrine left
TreyHarris nadim: what are you asking for, then? you seem to be asking for array behavior without constructing an array, to which the question is, why not construct an array? 20:12
skids m: (^2).map({$_}).head(3).say 20:13
camelia (0 1)
yoleaux 18 May 2017 02:04Z <MasterDuke> skids: i have been playing around with making MoarVM's uint support a little better, but it's not really my strong suit. feel free to jump in and help out!
20:15 Ben_Goldberg joined
TreyHarris skids: I prefer using 1..$n to ^$n in these sorts of examples just because then the subscripts aren't the same as the values, just so you know you aren't falsely getting the answer you expect for different reasons 20:15
20:15 BenGoldberg left, Ben_Goldberg is now known as BenGoldberg
skids m: <fee fie foo fum>.map({$_}).head(3).say; # happy? :-) 20:16
camelia (fee fie foo)
TreyHarris skids: heh, just warning of a potential gotcha I've seen in camelia examples. didn't mean it as criticism. 20:18
it's more of an issue when people do key-value stuff with sequences 20:20
is there a way to incrementally build docs for local viewing? It's painful to make a small change and have to wait minutes for even 'perl6 htmlify.p6 --no-highlight' to complete 20:24
20:24 Cabanossi left
webart is there a generic way to calculate roots in perl6 ? some what other than cube root like: 8000**(1/3) 20:25
20:26 Cabanossi joined
TreyHarris webart: docs.perl6.org/type/Numeric.html#method_roots 20:27
skids m: 24.roots(3).say
Voldenet m: n8000.roots(3)
camelia (2.88449914061482+0i -1.44224957030741+2.49804953296681i -1.44224957030741-2.49804953296681i)
5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
n8000 used at line 1
skids jinx
Voldenet welp, pretty much what I wanted, lol
m: say 8000**(1/3); # somewhat more sane result 20:28
camelia 20
Voldenet the results returned are less complex
TreyHarris m: 25.roots(2) 20:30
camelia ( no output )
TreyHarris m: say 25.roots(2)
camelia (5+0i -5+6.12323399573677e-16i)
BenGoldberg m: say (-1).roots:2
camelia 5===SORRY!5=== Error while compiling <tmp>
Confused
at <tmp>:1
------> 3say (-1).roots:7⏏052
expecting any of:
colon pair
TreyHarris too bad the latter result is so ugly
BenGoldberg m: say (-1).roots(2)
camelia (6.12323399573677e-17+1i -1.83697019872103e-16-1i)
TreyHarris or both resuls in that case.... 20:31
BenGoldberg m: say (-1).roots(3)
camelia (0.5+0.866025403784439i -1+1.22464679914735e-16i 0.5-0.866025403784439i)
BenGoldberg m: say (-1).roots(4)
camelia (0.707106781186548+0.707106781186547i -0.707106781186547+0.707106781186548i -0.707106781186548-0.707106781186547i 0.707106781186547-0.707106781186548i)
BenGoldberg m: say (1).roots(3)
camelia (1+0i -0.5+0.866025403784439i -0.5-0.866025403784438i)
20:32 rmallah joined
TreyHarris m: my Complex $x = (-1).sqrt # is this solveable in the language if not in rakudo? multis on return type will never be possible, will they? 20:33
camelia Type check failed in assignment to $x; expected Complex but got Num (NaN)
in block <unit> at <tmp> line 1
webart TreyHarris: roots! I was trying root rts .... 20:35
sorry thanks
skids TreyHarris: I think the multis on return type might go to the language design level. see "wantarray" 20:36
TreyHarris webart: given your last few questions, I'd suggest cloning perl6/docs and using a searcher like ack or ag 20:37
skids: oh, I know the pitfalls there.
I was just talking about them here an hour or two ago 20:38
Voldenet TreyHarris: sqrt could return a Seq of Complex numbers but getting a bunch of complex numbers aren't most usually DWIM case :) 20:39
webart since everywhere else I'd write $num ** (1/3) ... maybe I'll just use that :)
Voldenet ^ yeah, it sounds sane
skids m: sub foo (Complex(Num) $x) { $x }; foo((-1).sqrt).say; # eventually you should be able to "my Complex(Num) $x" I think. 20:41
camelia NaN+0i
skids (...and Complex(Complex|Num)) 20:42
Though "Numeric" works in this case.
20:44 espadrine joined
TreyHarris webart: what, this isn't good enough for you? 20:45
m: say 24.roots(3).grep(!*.im).map(*.re)
camelia (2.88449914061482)
TreyHarris ;-)
webart hehe 20:46
**(1/3) is good :) 20:47
m: 24**(1/3)
camelia WARNINGS for <tmp>:
Useless use of "**" in expression "24**(1/3)" in sink context (line 1)
webart haha
m: say 24**(1/3)
camelia 2.88449914061482
20:50 Ben_Goldberg joined, BenGoldberg left
webart if say you're teaching basic calculation commands for math/arithmetic to a kid (and tricking them into learning how to program) ... you can use python ruby(irb) or perl5 (re.pl) or perl6 20:50
20:50 Ben_Goldberg is now known as BenGoldberg
webart for kids who like math ... first just use the program as a command-line calculator then add lists arrays and control structures 20:51
etc.
20:52 BenGoldberg left
webart I still like Devel::REPL/re.pl mst++ well volunteered :-D 20:53
20:58 TEttinger joined 21:00 labster1 left 21:02 labster left, robertle left, labster joined, setty1 left 21:04 bjz joined 21:14 labster left, labster joined 21:21 trnh joined 21:27 kriti joined 21:28 kriti left
pilne I'm following the information at rakudo.org/how-to-get-rakudo about installing with rakudobrew, and I'm getting "no candidates found matching identiy: Task::Star" when I get to that part, any ideas? 21:29
21:31 ChoHag joined 21:34 BenGoldberg joined 21:40 dct joined
timotimo ah, yeah 21:42
Task::Star got thrown out 21:43
it wasn't being kept up to date
pilne: no worries, you'll just have to install modules you want by hand with zef :)
and we should really change that site
21:44 rmallah left
pilne thank you, is there a list of those suggested modules? (: 21:45
21:51 bjz left
timotimo github.com/rakudo/star/tree/master/modules - rakudo star comes with these 22:07
modules.perl6.org/ - you can find almost all our modules here
we've just recently made a good step towards getting perl6 modules onto cpan 22:08
22:08 dogbert17_ joined 22:09 movl left 22:10 movl joined 22:11 dogbert11 left
pilne as a dabbler in languagues, who never seems to be able to be happy in one place, perl6 seems to be the best combination of modern and malleable (but not completely insane). 22:13
timotimo yeah, it's pretty cool 22:16
nadim it's not insane, it is not malleable, it's tough but really modern, challenging, fun
timotimo in what ways is it not malleable? 22:17
22:18 dct left
nadim before you get to handle P6 in a malleable way many years will pass. it doesn't do what one wants, it lets one do what one wants. the "malleability" comes at a cost, malleable demands neuronnes sacrifice. 22:19
neurons
timotimo i don't think that's how people usually understand a language being "malleable" 22:22
nadim enlighten me 22:23
timotimo "you can change it so it fits your use case beter"
22:23 rindolf left
timotimo i don't think i actually understand how you meant that comment 22:25
pilne when i refer to malleable, i refer to being easy to make mesh with whatever outside system(s) i have to work with 22:26
or make it easy for me to "create" something that isn't there, within the language itself (metaprogramming usually). 22:27
timotimo that's how i understood it 22:28
pilne will it take me a long while to be able to think natively in perl6, probably, but from what i'm reading in the spec and snippets, i feel like the learning curve will be presented in a much nicer way than many other languages i've dabbled in, and it is more of a "learn the hard stuff as you need it" not "learn this hard stuff and the rest will be easy". 22:30
22:31 Sound left
timotimo there's this idea of "baby perl" out there 22:31
like "you can start off writing perl with very simple idioms and having only learned a small part of the whole"
pilne yeah, my "baby perl" looks like the disfigured chernobyl baby of python and scheme... with some haskell genes spliced in for added horrors 22:32
(for perl5), but perl6 just seems to be a more natural fit for both how I think, and my mental checkboxes of "modern" features (most notably multicore), that as a hobbyist programmer, I see no complications that can arise from diving in (: 22:33
22:34 wamba left 22:38 eliasr left 22:39 BenGoldberg left 22:43 trnh left, rmallah joined 22:45 nadim left, rmallah left
samcv so for pod `=begin code` blocks and converting to markdown. And I want it to be syntax highlighted on being converted to markdown 22:46
what do people think would be a sane way to do it?
=begin code :lang<perl6> # like this?
or some other way?
don't really care how as long as other people agree to the syntax of it
23:03 pmurias left
samcv timotimo, thoughts? 23:07
putting a PR together for the POD6 markdown renderer
23:21 movl left 23:22 movl joined 23:28 espadrine left
Voldenet you can mostly write in perl6 like you would in perl5 23:28
mostly arrays, hashes and some simple subs
:) 23:29
23:35 margeas left
samcv well i added support to the markdown renderer. if you do: =begin code :lang<perl6> using pod 23:35
github.com/softmoth/perl6-pod-to-m...own/pull/9
still waiting on my other PR that adds nested bullet points as well though :\ 23:36
23:44 rmallah joined 23:46 rmallah left 23:53 Cabanossi left 23:56 Cabanossi joined