Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2017-05-21

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:00 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 rakudo-moar d28540: OUTPUT: «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␤»
00:00 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 rakudo-moar d28540: OUTPUT: «Array @a = [1, 2, 3]␤Array @b = ["a", "b", "c"]␤»
00:00 timotimo like this?
00:01 AlexDaniel mscha: ↑
00:01 mscha That'll do.  Thans, @AlexDaniel, @timotimo
00:01 AlexDaniel timotimo: yes. Any other way?
00:01 AlexDaniel I was expecting something like my $ (@a, @b) to work but meh
00:02 timotimo i'm completely worn out by today
00:03 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
00:03 timotimo so ... potentially no rest
00:03 AlexDaniel .oO( if timotimo is worn out, do we buy a new one or attempt to repair what we have? )
00:04 tbrowder ref pod unpacking: never mind, i think i have the answer...
00:11 zengargoyle joined #perl6
00:12 zengargoyle good day everybody
00:16 bjz joined #perl6
00:22 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:24 zengargoyle 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:25 MasterDuke zengargoyle: something other than the existing data dumping modules?
00:28 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:30 zengargoyle but Perl6 modules are like a git repo hidden under obscure hash values that have no obvious followability.
00:31 zengargoyle modulo acgually downloading the module source repository and going from there...
00:33 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 TreyHarris :-)
00:33 TreyHarris s/I learn/I can learn/
00:34 TreyHarris (I imagine if I had lurked on #perl6-dev I'd probably have a better idea, yeah?)
00:35 mcmillhj joined #perl6
00:35 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:36 mcmillhj_ joined #perl6
00:36 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.
00:37 zengargoyle or an archive where the filenames are turned into hashes (to avoid utf8 problems).
00:38 MasterDuke zengargoyle: do any of the zef commands do something like what you want?
00:39 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:40 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:41 MasterDuke `zef look <module>` is kind of what you want
00:42 MasterDuke what about `zef locate`?
00:42 Cabanossi joined #perl6
00:43 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:44 Actualeyes joined #perl6
00:44 MasterDuke zengargoyle: this https://gist.github.com/MasterDuke17/ec6fe7ca81e3919a3754c0688eeb57a1 looks to me like what you want
00:45 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:46 zengargoyle 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: https://github.com/moritz/perl6-all-modules ?
00:48 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.
00:48 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 :-)
00:48 zengargoyle lol
00:51 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 mcmillhj_ joined #perl6
00:51 mcmillhj joined #perl6
00:52 zengargoyle building on one system and rsync to another...  a different -I / $PERL6LIB causes a pause while things are re-jiggered...
00:52 zengargoyle because it's a hashed chain of things...
00:58 b2gills .tell haxmeister If you want to see Perl 6 features misused have a look at my code golf entries https://codegolf.stackexchange.com/users/1147/b2gills?tab=answers
00:58 yoleaux b2gills: I'll pass your message to haxmeister.
00:59 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.
01:00 MasterDuke zengargoyle: i don't know of anything like that already done
01:01 MasterDuke 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.
01:04 zengargoyle 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 zengargoyle and submit patches.. :P
01:04 zengargoyle and get a commit bit....
01:05 zengargoyle or fork....
01:05 zengargoyle ...
01:07 mcmillhj joined #perl6
01:09 Ven joined #perl6
01:16 mcmillhj joined #perl6
01:23 cyphase joined #perl6
01:31 mcmillhj joined #perl6
01:46 Cabanossi joined #perl6
01:47 ilbot3 joined #perl6
01:47 Topic for #perl6 is now »ö« Welcome to Perl 6! | https://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:,  or /msg camelia p6: ... | irclog: http://irc.perl6.org or http://colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
02:06 noganex_ joined #perl6
02:07 skids joined #perl6
02:11 mcmillhj joined #perl6
02:11 mcmillhj_ joined #perl6
02:11 bjz joined #perl6
02:23 astj joined #perl6
02:28 mcmillhj joined #perl6
02:57 Cabanossi joined #perl6
03:14 aborazmeh joined #perl6
03:14 aborazmeh joined #perl6
03:25 Cabanossi joined #perl6
03:33 BenGoldberg joined #perl6
03:43 geekosaur joined #perl6
03:56 bjz joined #perl6
03:58 Alikzus_ joined #perl6
04:11 Cabanossi joined #perl6
04:11 bjz joined #perl6
04:59 ugexe https://github.com/ugexe/Perl6-CompUnit--Repository--Lib
05:01 ugexe unlike perl5 however we can have multiple versions installed, so the "just put it in a lib folder!" scheme starts to break down
05:02 aborazmeh joined #perl6
05:02 aborazmeh joined #perl6
05:04 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:08 ugexe 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:09 ugexe # CUR.resolve to get at the installed distribution, and CUR::Staging.install($that), then -Iinst#$that to use it
05:20 raschipi joined #perl6
05:29 movl joined #perl6
05:35 CIAvash joined #perl6
06:05 wamba joined #perl6
06:32 pmurias joined #perl6
06:49 rindolf joined #perl6
06:54 setty1 joined #perl6
07:05 mcmillhj_ joined #perl6
07:05 mcmillhj joined #perl6
07:07 nadim joined #perl6
07:13 parv joined #perl6
07:18 skids joined #perl6
07:37 xiaomiao joined #perl6
07:41 Cabanossi joined #perl6
07:42 nadim Good morning P6 \o/
07:47 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] https://github.com/perl6/nqp/compare/2017.04-48-g745c61d...2017.04-72-gc60df1e
07:51 rindolf nadim: good morning
07:51 nadim rindolf: good morning
07:52 rindolf nadim: sup?
07:53 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 #perl6
08:05 domidumont joined #perl6
08:15 wamba joined #perl6
08:16 nadim joined #perl6
08:17 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.
08:31 nine .tell zengargoyle this may be useful to you http://niner.name/talks/A%20look%20behind%20the%20curtains%20-%20module%20loading%20in%20Perl%206/
08:31 yoleaux nine: I'll pass your message to zengargoyle.
08:34 nine .tell zengargoyle also this: https://gist.github.com/niner/06792102587a79940294
08:34 yoleaux nine: I'll pass your message to zengargoyle.
08:34 nine .tell TreyHarris this may be useful to you http://niner.name/talks/A%20look%20behind%20the%20curtains%20-%20module%20loading%20in%20Perl%206/
08:34 yoleaux nine: I'll pass your message to TreyHarris.
08:38 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:54 Zoffix joined #perl6
08:55 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 #perl6
09:01 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 http://niner.name/talks/A%20look%20behind%20the%20curtains%20-%20module%20loading%20in%20Perl%206/
09:01 yoleaux 08:34Z <nine> zengargoyle: also this: https://gist.github.com/niner/06792102587a79940294
09:03 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:09 Zoffix left #perl6
09:11 zengargoyle heh, --help isn't listed in --help
09:13 lizmat it *is* listed in "zef info" at the end
09:15 Actualeyes joined #perl6
09:22 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 #perl6
09:26 zengargoyle LTA `zef info 2>&1 | perl -pe 's/^.*?(?=zef)//'`  -- guess i could make a shell function.
09:26 zengargoyle wouldn't ditching rakudobrew just make it /usr/bin/zef or something?
09:29 zengargoyle guess it's a toss-up between showing the short vs what you typed vs the actual full thing.
09:34 pminten joined #perl6
09:36 margeas joined #perl6
09:39 bjz joined #perl6
09:42 cpage joined #perl6
09:42 movl joined #perl6
09:47 nine zengargoyle: it'd just show "zef"
09:48 nine zef [--force] fetch '[<identities> ...]' -- Download specific distributions
09:48 nine I'm not sure how exactly rakudobrew screws that up
09:55 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:56 Geth ¦ doc: 1e676de151 | (Zoffix Znet)++ | doc/Language/modules-core.pod6
09:56 Geth ¦ doc: Put module names in C<> blocks
09:56 Geth ¦ doc: review: https://github.com/perl6/doc/commit/1e676de151
09:56 Geth ¦ doc: f099d4b9cb | (Zoffix Znet)++ | 3 files
09:56 Geth ¦ doc: Make xtest pass
09:56 Geth ¦ doc: review: https://github.com/perl6/doc/commit/f099d4b9cb
09:58 darutoko joined #perl6
10:07 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:08 zengargoyle you either know the shortest bit, or you know the bit you typed.
10:16 bjz joined #perl6
10:26 Ven joined #perl6
10:27 Geth ¦ doc: c7a2d7739b | (Zoffix Znet)++ | doc/Type/IO/Spec/Win32.pod6
10:27 Geth ¦ doc: Fix incorrect output in example
10:27 Geth ¦ doc: review: https://github.com/perl6/doc/commit/c7a2d7739b
10:28 bjz joined #perl6
10:35 nadim What is operator Z=> ? is it a build dynamically from Z and => ?
10:36 Geth ¦ doc: 2e25c8262a | (Zoffix Znet)++ | 3 files
10:36 Geth ¦ doc: [io grant] Document IO::Spec::*.join
10:36 Geth ¦ doc:
10:36 Geth ¦ doc: XXX TODO: I'm not exactly sure *why* we have .join along with .catpath and
10:36 Geth ¦ doc: in what usecases join's *slightly* different behaviour is useful
10:36 Geth ¦ doc: review: https://github.com/perl6/doc/commit/2e25c8262a
10:36 * nadim reading this: https://perl6advent.wordpress.com/2010/12/06/the-x-and-z-metaoperators/
10:36 jnthn Yes, Zop is a meta-operator
10:36 pmurias joined #perl6
10:36 jnthn m: say (1,2,3) Z+ (4,5,6)
10:37 camelia rakudo-moar e6192c: OUTPUT: «(5 7 9)␤»
10:37 nadim do they get dynamically created? eg: i have define operator -me-, can I do Z-me- ?
10:39 nadim m: say (1,2,3) Z=> (1,1,1)
10:39 camelia rakudo-moar e6192c: OUTPUT: «(1 => 1 2 => 1 3 => 1)␤»
10:39 jnthn Yes
10:41 jnthn m: sub infix:<adek>($a, $b) { $a.uc ~ $b.lc }; say <a B c d> Zadek <f G h I>
10:41 camelia rakudo-moar e6192c: OUTPUT: «(Af Bg Ch Di)␤»
10:44 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:45 jnthn m: my \c = 42; say c
10:45 camelia rakudo-moar e6192c: OUTPUT: «42␤»
10:45 jnthn It's the syntax to declares a name c bound to, in this case, 42
10:46 nadim whats the differenc with my c  := 42 ?
10:46 jnthn The latter isn't valid syntax :)
10:46 nadim lol! ok
10:47 jnthn The \ is required on the declaration because a name parsed after my/our etc. is parsed as a type
10:47 jnthn So my c $x parses fine if there's a type c, for example
10:48 diegok joined #perl6
10:48 jnthn And Perl 6 parsing really ain't in to lookahead
10:48 nadim got it
10:48 Ven_ joined #perl6
10:48 jnthn That and it catches mistakes like my Int = 42;
10:48 Zoffix joined #perl6
10:48 jnthn Where people forget to type the variable
10:49 jnthn Also note that
10:49 jnthn m: my $x = 42; $x++; say 4x
10:49 camelia rakudo-moar e6192c: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Confused␤at <tmp>:1␤------> 3my $x = 42; $x++; say 47⏏5x␤»
10:49 jnthn m: my $x = 42; $x++; say 4x
10:49 camelia rakudo-moar e6192c: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Confused␤at <tmp>:1␤------> 3my $x = 42; $x++; say 47⏏5x␤»
10:49 jnthn argh
10:49 jnthn m: my $x = 42; $x++; say $x
10:49 camelia rakudo-moar e6192c: OUTPUT: «43␤»
10:49 jnthn m: my \x = 42; x++; say x
10:49 camelia rakudo-moar e6192c: OUTPUT: «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 …»
10:49 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..
10:49 jnthn It's not a variable, it's just a name binding
10:49 araraloren $x is a container, \x not
10:51 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)  https://nopaste.linux-dev.org/?1124639
10:52 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. :)
10:52 nadim Is there something more one can say about Seq than $.iter = Nil.Str and $!list = Nil.Str ?
10:53 nadim it would be better to say nothing than that
10:54 nadim 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
10:55 jnthn 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?
10:56 jnthn If you're using .^attributes on basic built-in types, you're going to run across guts things.
10:57 jnthn 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
10:57 nadim P6 type system
10:58 jnthn There's various heuristics you might use. .HOW.^name eq 'NQPClassHOW' or similar is probably pretty reliable
10:58 jnthn For Rakudo at least
10:59 jnthn 'cus it'll net all of the objects that have implementation outside of CORE.setting
10:59 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
11:00 nadim I handle Mu already but it is good to know about jumctions. I haven't tested dumping of Junctions yet.
11:01 nadim jnthn: what about Seq, is there a way to say something interesting about them?
11:03 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:04 jnthn Which may be a little surprising for a debugging tool
11:05 jnthn Oh, or it may break working code downstream of the dumping
11:05 jnthn 'cus the .cache steals the iterator
11:05 jnthn So other things that would normally take it then can not do so
11:06 jnthn 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:07 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)
11:08 jnthn .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
11:08 nadim indeed it is, but it looks nicer, much nicer
11:09 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:10 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
11:10 camelia rakudo-moar e6192c: OUTPUT: «(1, 2, 3, 4, 5, 6, 7, 8).Seq␤»
11:10 Zoffix m: dd 1...*
11:10 camelia rakudo-moar e6192c: OUTPUT: «(1, 2, 3, 4, 5, 6, 7, 8, 9, 10... lazy list)␤»
11:10 * Zoffix is happy with that
11:10 jnthn I suspect doing something like .perl does is a decent default
11:10 jnthn With a way to switch the expansion off
11:11 jnthn A somewhat similar situation exists with Supply fwiw
11:11 Zoffix It actually throws
11:11 Zoffix m: (1...*).perl
11:11 camelia rakudo-moar 18dd07: OUTPUT: «Cannot .elems a lazy list␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
11:11 jnthn Oh...
11:11 jnthn That's a bit LTA
11:11 jnthn But there's not much A we can do
11:12 espadrine joined #perl6
11:12 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 nadim and a role to not touch the Seq altogether
11:13 lizmat m: dd 1...*
11:13 camelia rakudo-moar 18dd07: OUTPUT: «(1, 2, 3, 4, 5, 6, 7, 8, 9, 10... lazy list)␤»
11:13 lizmat indeed
11:13 lizmat :-)
11:13 margeas joined #perl6
11:14 nadim m: dd (1..*)[*-1]
11:14 camelia rakudo-moar 18dd07: OUTPUT: «Cannot coerce Inf to an Int␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
11:14 jnthn For Supply I suspect trying to tap it to get values is a bad idea.
11:15 nadim probably very bad, except if you want to see what's in there
11:16 nadim hmm, can't one empty the supply and re-inject the data?
11:16 nadim it's probably still a bad idea
11:16 jnthn Yeah, supplies often have resources sat up the top end, or are tapping into a live stream otherwise
11:17 jnthn 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
11:17 jnthn No
11:18 jnthn I mean, the concept doesn't really exist
11:18 nadim not even a snapshot?
11:18 jnthn In that things aren't really "in" a Supply
11:18 nadim hmm, yes that makes it impossible
11:19 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.
11:19 jnthn :)
11:19 nadim what does dd say about supplies?
11:20 nadim I ask as I have no code using a supply at hand
11:20 jnthn m: dd supply { emit 42 }
11:20 camelia rakudo-moar 18dd07: OUTPUT: «Supply.new␤»
11:20 jnthn Nothing much :)
11:20 nadim m: 1..*.gist
11:20 camelia rakudo-moar 18dd07: OUTPUT: «WARNINGS for <tmp>:␤Useless use of ".." in expression "1..*.gist" in sink context (line 1)␤»
11:20 jnthn precedence
11:20 jnthn m: say (1..*).gist
11:20 camelia rakudo-moar 18dd07: OUTPUT: «1..Inf␤»
11:21 jnthn .. makes a Range object, unlike ...
11:21 nadim m: (1..8).gist
11:21 camelia rakudo-moar 18dd07: ( no output )
11:21 nadim m: dd (1..8).gist
11:21 camelia rakudo-moar 18dd07: OUTPUT: «"1..8"␤»
11:23 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 rakudo-moar 18dd07: OUTPUT: «===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…»
11:24 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 :)
11:25 nadim nine: any classy wrapper coming out soon?
11:25 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 #perl6
11:27 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.
11:28 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: https://github.com/niner/Inline-Perl5/blob/master/lib/Inline/Perl5.pm6#L607
11:28 jnthn But yeah, that's a cute solution :)
11:29 Zoffix nine: hm, It hought I tried that already
11:30 Zoffix Ahaha
11:30 Zoffix nine++
11:30 Zoffix I did try it, but I had it in a BEGIN block :)
11:30 nine Zoffix: sooo close :)
11:31 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 nadim P6++
11:33 nine I often don't bother looking at the docs because the error messages will tell me what I should have done anyway :)
11:40 AndyDee joined #perl6
11:42 Dee22 joined #perl6
11:43 araraloren Rakudo's error message sometimes are unfriendly.
11:44 Dee22 joined #perl6
11:44 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 AndyDee joined #perl6
11:48 Dee22 joined #perl6
11:48 Zoffix araraloren: like which?
11:52 araraloren Such as anonymous class in a method.
11:54 araraloren Sometimes
11:54 Zoffix What kind of an error is that?
11:54 Zoffix m: class { method x{ my class {} } } }.x
11:54 camelia rakudo-moar 10e9c8: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Unexpected closing bracket␤at <tmp>:1␤------> 3class { method x{ my class {} } } 7⏏5}.x␤»
11:54 Zoffix m: class { method x{ my class {} } }.x
11:54 camelia rakudo-moar 10e9c8: ( no output )
11:54 Zoffix no error
11:55 araraloren No, I mean error message not friendly .
11:55 Zoffix because it mentions <anon|34211324312> ?
11:56 Cabanossi joined #perl6
11:56 araraloren Such as a class like https://github.com/araraloren/perl6-terminal-table/blob/master/lib/Terminal/Table/Generator.pm6#L893
11:57 Zoffix But it's not anonomous?
11:57 gdonald joined #perl6
11:58 araraloren just pull down
11:58 araraloren Line 903
11:58 nadim in met corner
11:58 araraloren Wait me make a smaple for it.
11:59 Zoffix araraloren: that's not an error though. You said some errors were unfriendly. Which errors?
12:00 eater m: for $("help", "pls", "no") -> $v { say $v.perl }
12:00 camelia rakudo-moar 10e9c8: OUTPUT: «$("help", "pls", "no")␤»
12:00 eater ehh
12:00 eater is this supposed to happen?
12:00 lizmat yes, because you itemized the list
12:01 lizmat m: for "help", "pls", "no" -> $v { say $v.perl }
12:01 camelia rakudo-moar 10e9c8: OUTPUT: «"help"␤"pls"␤"no"␤»
12:01 lizmat look ma, no parens!  :-)
12:01 eater :')
12:01 Zoffix m: for |$("help", "pls", "no") -> $v { say $v.perl } # or if it's coming from some var, slip it
12:01 camelia rakudo-moar 10e9c8: OUTPUT: «"help"␤"pls"␤"no"␤»
12:02 Zoffix m: for @$("help", "pls", "no") -> $v { say $v.perl } # look mah, no slip! :)
12:02 camelia rakudo-moar 10e9c8: OUTPUT: «"help"␤"pls"␤"no"␤»
12:02 nadim araraloren: Data::Dump::Tree would display it as https://nopaste.linux-dev.org/?1124642, how would you like it to look like?
12:02 Zoffix araraloren: well, report errors that suck. There's a chance they can be improved.
12:02 Zoffix left #perl6
12:05 araraloren Sorry, I forgot how to reappear that error message. Just forget about it. I'll show guys next time it appear. :)
12:12 araraloren Ah, :) There are things that you can't ask for
12:16 tbrowder hi #perl6, question, please:  why does .WHAT on a pod object not show the Pod::?
12:17 lizmat m: class A { class B { say ::?CLASS } }
12:17 camelia rakudo-moar 10e9c8: OUTPUT: «(B)␤»
12:17 lizmat tbrowder: because of ^^^ perhaps ?
12:17 lizmat m: class A { class B { say ::?CLASS.WHAT } }
12:17 camelia rakudo-moar 10e9c8: OUTPUT: «(B)␤»
12:17 lizmat m: class A { class B {  } }; dd A::B   # outside
12:17 camelia rakudo-moar 10e9c8: OUTPUT: «A::B␤»
12:18 bjz joined #perl6
12:18 tbrowder it's the base class according to the docs
12:19 tbrowder can you use meta info to show the complete class parentage?
12:20 lizmat you should be able to from the lower class:
12:21 lizmat in Rakudo atm, parent classes do not which children they have, only children know which parents they have
12:21 lizmat *know
12:21 lizmat unless that changed recently, jnthn ?
12:23 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 #perl6
12:27 tbrowder is there any programmatic way to determine if an object is a pod type of any kind?
12:28 tbrowder then its specific type could be determined from lnowledge of the sub types
12:30 tbrowder 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:31 bjz_ joined #perl6
12:32 tbrowder or multi subs/methods
12:32 araraloren You mean `$=` variable ?
12:32 tbrowder yeah, that magic thing
12:33 tbrowder an array of pod named blocks
12:36 tbrowder is there any clean way to extract it from a file except via an EVAL as used in various Pod* modules?
12:37 lizmat Perhaps Perl6::Parser ?
12:37 araraloren Em, it's an array
12:38 lizmat https://github.com/drforr/perl6-Perl6-Parser  # tbrowder
12:38 araraloren .WHAT.say for @$=pod
12:39 tbrowder yeah, that attempts to read line-by-line and form the pod chunks that way, but i haven't tried it yet
12:40 tbrowder oh, no, drforr's, i haven't in a good while, thanks!
12:56 Cabanossi joined #perl6
13:16 domidumont joined #perl6
13:17 bjz joined #perl6
13:37 KDr2 joined #perl6
13:53 gdonald joined #perl6
14:00 smls joined #perl6
14:00 smls Hi
14:01 smls Did something like the once-specced  %hash{||@path}  ever get implemented, for specifying a multi-dimensional subscript dynamically?
14:01 bjz joined #perl6
14:01 Geth ¦ doc: 3dea97dd6d | (Jan-Olof Hendig)++ | doc/Type/Baggy.pod6
14:01 Geth ¦ doc: Updated a few incorrect signatures and examples
14:01 Geth ¦ doc: review: https://github.com/perl6/doc/commit/3dea97dd6d
14:02 zapwai joined #perl6
14:04 obfusk joined #perl6
14:04 Geth ¦ ecosystem: f306d2ca74 | (Zoffix Znet)++ (committed using GitHub Web editor) | META.list
14:04 Geth ¦ ecosystem: Add `Benchy` to ecosystem
14:04 Geth ¦ ecosystem:
14:04 Geth ¦ ecosystem: "Benchmark some code"
14:04 Geth ¦ ecosystem: See: https://github.com/zoffixznet/perl6-Benchy
14:04 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/commit/f306d2ca74
14:06 smls For now I'm using:  reduce({ $^a{$^b} }, %hash, |@path)
14:06 smls ...but that's not as nice.
14:06 zakharyas joined #perl6
14:07 araraloren smls, I don't think there has a implementation you wanted.
14:08 Geth ¦ ecosystem: c62c599278 | (Stefan Seifert)++ | META.list
14:08 Geth ¦ ecosystem: Add CompUnit::Repository::Mask to the ecosystem
14:08 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/commit/c62c599278
14:09 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++
14:11 nadim is there a way to wrap prove?
14:12 araraloren Method/sub dont' know they are wrapped.
14:13 nadim prove is an executable
14:13 araraloren Em ? executable ?
14:13 araraloren Oh, IDK that
14:15 nine nadim: what for?
14:19 xtreak joined #perl6
14:20 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 nadim prove has a -M option
14:20 nadim which could be used to mask the a prove t/* run
14:21 lizmat nadim: there's something like PROVE_OPTIONS I learned the other day
14:22 * nadim is digging in the man page
14:24 nadim mmmnja!  not in the man page
14:25 nadim lizmat: where did you see that?
14:26 lizmat https://irclog.perlgeek.de/perl6-dev/2017-05-20#i_14612132
14:26 lizmat and https://irclog.perlgeek.de/perl6-dev/2017-05-20#i_14612179
14:28 geekosaur was just added
14:28 nadim I though we were using P5 prove ... mmm maybe I am the only one doing that
14:28 geekosaur [20 18:38:23] <Geth> ¦ nqp: af678371e2 | MasterDuke17++ | tools/build/Makefile-common.in
14:28 geekosaur [20 18:38:23] <Geth> ¦ nqp: Add PROVE_OPTIONS variable
14:28 geekosaur although that's nqp so ...
14:29 lizmat hmmnm... maybe I've misunderstood the meaning of PROVE_OPTIONS
14:29 geekosaur we *were* using p5 prove
14:29 nadim maybe I explained badly
14:29 nadim when did we stop using p5 prove and why?
14:30 nadim and what replaced it?
14:30 Geth ¦ doc: bef040f601 | (Jan-Olof Hendig)++ | doc/Type/Setty.pod6
14:30 Geth ¦ doc: Added docs for pickpairs
14:30 Geth ¦ doc: review: https://github.com/perl6/doc/commit/bef040f601
14:33 geekosaur because a p6 one was written, tested, and dogfooded
14:34 curt_ joined #perl6
14:38 khw joined #perl6
14:39 Zoffix joined #perl6
14:40 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:41 Zoffix nadim: perhaps you want to use `if` module and conditionally load a module in your tests?
14:41 Zoffix buggable: eco if
14:41 buggable Zoffix, if 'conditionally use packages': https://github.com/FROGGS/p6-if 35 other matching results: https://modules.perl6.org/#q=if
14:44 Zoffix m: sub ok ($) { say "no module" }; for ^2 { $++ and (require Test <&ok>); ok 42 }
14:44 camelia rakudo-moar e3695b: OUTPUT: «Cannot invoke this object (REPR: Uninstantiable; Callable)␤  in block <unit> at <tmp> line 1␤␤»
14:44 Zoffix boo
14:49 Zoffix m: require Test; import Test; ok 42
14:49 camelia rakudo-moar e3695b: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Undeclared routine:␤    ok used at line 1␤␤»
14:49 * Zoffix wonders why that doesn't work
14:50 Zoffix left #perl6
14:51 movl joined #perl6
14:52 cygx joined #perl6
14:53 cygx m: require Test <&ok>; ok 42
14:53 camelia rakudo-moar e3695b: OUTPUT: «ok 1 - ␤»
14:53 cygx m: need Test; import Test; ok 42
14:53 camelia rakudo-moar e3695b: OUTPUT: «ok 1 - ␤»
14:56 cognominal joined #perl6
15:11 Sound joined #perl6
15:12 ufobat joined #perl6
15:14 BenGoldberg joined #perl6
15:18 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.  https://docs.perl6.org/type/Seq
15:23 nadim can someone please give a pice of code that creat an infinite Seq?
15:24 nadim I mean a lazy Seq since I believe that lazy means it can be infinite too
15:26 cygx m: say (1...*).is-lazy
15:26 camelia rakudo-moar e3695b: OUTPUT: «True␤»
15:26 cygx nadim: ^
15:26 AlexDaniel joined #perl6
15:27 nadim say (1...*).^name
15:27 evalable6 nadim, rakudo-moar e3695b164: OUTPUT: «Seq»
15:27 cpage_ joined #perl6
15:27 nadim ah! three dots
15:31 kaare__ joined #perl6
15:32 pilne joined #perl6
15:37 pminten joined #perl6
15:44 eater did a pugs perl6 wikipedia page exist?
15:48 araraloren why looking for that page..
15:56 Cabanossi joined #perl6
15:59 Ven joined #perl6
16:01 jmerelo joined #perl6
16:02 jmerelo Hi
16:02 jmerelo Is there some way to re-export symbols that have been imported in a module?
16:03 jmerelo 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
16:03 Geth ¦ doc: Fix typo
16:03 Geth ¦ doc: review: https://github.com/perl6/doc/commit/929b82f42a
16:04 jmerelo if I `use Bar;` then Foo::baz is available as ::{'$bar'}
16:05 jmerelo Some way to just use it as $baz? Maybe redefining operator :: within Bar?
16:09 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: https://github.com/zoffixznet/perl6-IRC-Client/commit/4f3d80a0d05d02658dec32ec079d94261ea48d08  but I've just tried this and it works fine, as doing using a try + block +_ require: https://twitter.com/zoffix/status/866322013912170496
16:11 bobv joined #perl6
16:14 Geth ¦ ecosystem: 790706ff78 | (Zoffix Znet)++ (committed using GitHub Web editor) | META.list
16:14 Geth ¦ ecosystem: Fix typoed URL
16:14 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/commit/790706ff78
16:15 jmerelo @nine as in? Can you give me an example?
16:16 jmerelo @yoleaux that would work for a single sub, right? What if I need to massively export all symbols?
16:21 pecastro joined #perl6
16:24 patrickz joined #perl6
16:26 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:32 ilmari patrickz: which gcc version?
16:32 zakharyas joined #perl6
16:33 ilmari older versions default to -std=gnu90, try gnu99 or gnu11
16:33 ilmari gnuXX is cXX with gnu extensions
16:35 kurahaupo joined #perl6
16:37 patrickz rakudobrew build moar 2017.05 --configure-opts="-std=gnu99"
16:37 patrickz is that how I do it?
16:38 pecastro joined #perl6
16:39 cygx patrickz: moarvm seems to pass its CFLAGS to the dyncall build, which is a problem as it sets -Werror=declaration-after-statement
16:40 cygx 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:45 vimal2012 joined #perl6
16:46 vimal2012 left #perl6
16:47 Ven joined #perl6
16:47 cono joined #perl6
16:48 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:52 b2gills cono: You could start by discussing it here.
16:56 pecastro joined #perl6
16:57 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 cono I made something like this: https://gist.github.com/cono/d828120249a08ddf08b71f632d1ec7b5
16:57 cono the only thing I really don't like is "creating additional op code".
16:58 cono suggestions welcome
16:59 cono % perl6 -e 'my $l = IO::Socket::INET.new(:listen, :localhost<localhost>, :localport(0)); $l.localport.say' => 35373
17:03 skids joined #perl6
17:07 Ven_ joined #perl6
17:09 patrickz I didn't get it to compile. So I just fixed the code...
17:11 cono patrickz: what do you mean?
17:12 patrickz sorry, was refering to a previous conversation. I had a compile time problem...
17:12 cono ah, k :)
17:14 andrzejku joined #perl6
17:15 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:19 Geth ¦ doc: 5742222856 | (Zoffix Znet)++ | doc/Type/IO/Handle.pod6
17:19 Geth ¦ doc: Remove dot in method name in heading
17:19 Geth ¦ doc: review: https://github.com/perl6/doc/commit/5742222856
17:19 Geth ¦ doc: 49e58bd60e | (Zoffix Znet)++ | doc/Type/IO/Handle.pod6
17:19 Geth ¦ doc: [io grant] Document IO::Handle.lines
17:19 Geth ¦ doc:
17:19 Geth ¦ doc: - Include &lines
17:19 Geth ¦ doc: - Clarify behaviour vis-a-vis laziness
17:19 Geth ¦ doc: - Document :$close
17:19 Geth ¦ doc: - Remove bad practices from example
17:19 Geth ¦ doc: review: https://github.com/perl6/doc/commit/49e58bd60e
17:19 Geth ¦ doc: 4ba026ab54 | (Zoffix Znet)++ | doc/Type/IO/Handle.pod6
17:19 Geth ¦ doc: Make $*ARGFILES a link
17:19 Geth ¦ doc: review: https://github.com/perl6/doc/commit/4ba026ab54
17:20 Geth ¦ doc: 23524764cb | (Zoffix Znet)++ | doc/Type/IO/Handle.pod6
17:20 Geth ¦ doc: Rename arg in examples to better indicate its purpose
17:20 Geth ¦ doc: review: https://github.com/perl6/doc/commit/23524764cb
17:23 Zoffix joined #perl6
17:24 Ven_ joined #perl6
17:25 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 Cabanossi joined #perl6
17:26 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:33 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 http://niner.name/talks/A%20look%20behind%20the%20curtains%20-%20module%20loading%20in%20Perl%206/
17:33 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;
17:33 camelia rakudo-moar 494659: OUTPUT: «IntStr|3␤IntStr|3␤True␤False␤»
17:33 Geth ¦ doc: 216710889d | (Jan-Olof Hendig)++ | doc/Type/Proc/Async.pod6
17:33 Geth ¦ doc: Fixed broken link
17:33 Geth ¦ doc: review: https://github.com/perl6/doc/commit/216710889d
17:36 TreyHarris the WHICH and ACCEPTS behavior for allomorphs seems ill-defined.
17:37 Zoffix TreyHarris: there are `===` candidates for allomorphs. The .WHICH should be different too, so it's a bug they aren't
17:37 Ven_ joined #perl6
17:37 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.
17:38 Zoffix s: &infix:<===>, (<42>, IntStr.new: 42, 'meow'
17:38 Zoffix s: &infix:<===>, (<42>, IntStr.new: 42, 'meow')
17:38 Zoffix ah, right no bot.
17:38 Zoffix https://github.com/rakudo/rakudo/blob/494659a/src/core/allomorphs.pm#L106
17:40 TreyHarris Zoffix: in general, $x === $y iff $x.WHICH === $y.WHICH ===, then, should be correct?
17:40 Zoffix I think so
17:40 TreyHarris er, s/===,/,=
17:41 TreyHarris k.
17:41 Zoffix dogbert11: is that some sort of special syntax in docs for links in the same doc?
17:41 TreyHarris specs certainly sounded like ACCEPTS implies WHICH implies ====, but whether the implicature was bidirectional was not explicit
17:42 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:43 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
17:44 Zoffix that's outdated
17:44 Zoffix well, it's the same thing as on design.perl6.org
17:44 * Zoffix points to the message at the top of the site
17:44 TreyHarris ah. is Perl 6 an "empirical language" as Damian called it again now?
17:45 TreyHarris s/called it/called Perl 5/
17:45 TreyHarris (meaning, "there is no source of truth as to what Perl is outside of running it to see")
17:45 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)
17:45 awwaiid TreyHarris: Roast! That's the official source of truth
17:46 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
17:46 Zoffix And the commit I made in perl6/specs are to the v6.d.pod language that has some of the 6d proposals
17:46 Zoffix huggable: v6.d
17:46 huggable Zoffix, Proposed changes for Perl 6 v6.d: https://github.com/perl6/specs/blob/master/v6d.pod
17:48 Zoffix and no, unlike Perl 5, what Rakudo does does not define Perl 6
17:48 Zoffix m: dd 42
17:48 camelia rakudo-moar 494659: OUTPUT: «42␤»
17:48 Zoffix ^ there's no &dd in Perl 6 language
17:48 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:50 Zoffix yeah, some tests are rather poor. Here's the approximate coverage of Rakudo by master roast: https://perl6.WTF
17:50 Zoffix (approximate because our coverage tool is still experimental and isn't 100% accurate)
17:51 * TreyHarris nods
17:53 Voldenet m: dd :if</dev/sda> :of</mnt/backup/img1> :bs<8M>
17:53 camelia rakudo-moar 494659: OUTPUT: «block <unit>␤»
17:53 Zoffix heh
17:53 TreyHarris Wait... do ACCEPTS, WHICH, and === _ever_ disagree, even in the case of containers and anonymous constructors of mutables?
17:54 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 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?
17:55 TreyHarris that's what I mean
17:56 setty1 joined #perl6
17:56 Zoffix Ah, yeah, .ACCEPTS definitely not in the same category
17:56 domidumont joined #perl6
17:57 Zoffix m: for NaN, { dd [ .ACCEPTS($_), .WHICH === .WHICH, $_ === $_ ] }
17:57 camelia rakudo-moar 494659: OUTPUT: «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, $_ …»
17:57 Zoffix m: for NaN, 42 { dd [ .ACCEPTS($_), .WHICH === .WHICH, $_ === $_ ] }
17:57 camelia rakudo-moar 494659: OUTPUT: «[Bool::True, Bool::True, Bool::True]␤[Bool::True, Bool::True, Bool::True]␤»
17:57 Zoffix m: for NaN, 42 { say [ .ACCEPTS($_), .WHICH === .WHICH, $_ === $_ ] }
17:57 camelia rakudo-moar 494659: OUTPUT: «[True True True]␤[True True True]␤»
17:57 * Zoffix thinks harder
17:58 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, $_ === $_ ] }
17:58 camelia rakudo-moar 494659: OUTPUT: «[False True True]␤[True True True]␤»
17:58 TreyHarris Except for the allomorphs
17:58 Zoffix There we go
17:58 TreyHarris ahh
17:58 Zoffix That's for *the same* object. There are many more cases for different args
18:00 Zoffix m: quietly { for (*.so xx 2), (/a/, /a/) -> $ ($a, $b) { say [ $a.ACCEPTS($b), $a.WHICH === $b.WHICH, $a === $b ] } }
18:00 camelia rakudo-moar 494659: OUTPUT: «[True False False]␤[(Any) False False]␤»
18:02 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 rakudo-moar 494659: OUTPUT: «[{ ... } False False]␤[(Any) False False]␤[True False False]␤[True True True]␤»
18:02 Zoffix looks like === is busted on Sets
18:02 Zoffix m: dd [1] === [1]
18:02 camelia rakudo-moar 494659: OUTPUT: «Bool::False␤»
18:02 Zoffix m: dd [1].Set === [1].Set
18:02 camelia rakudo-moar 494659: OUTPUT: «Bool::True␤»
18:03 Voldenet uh, isn't identity operator just checking identity?
18:03 Voldenet [1].Set is probably not [1].Set
18:03 Zoffix m: say [1].Set.WHERE === [1].Set.WHERE
18:03 camelia rakudo-moar 494659: OUTPUT: «False␤»
18:03 Zoffix Different objects
18:04 Voldenet isn't smart match preferred for that?
18:04 Voldenet m: say [1].Set == [1].Set
18:04 camelia rakudo-moar 494659: OUTPUT: «True␤»
18:04 Voldenet m: say [1].Set ~~ [1].Set
18:04 camelia rakudo-moar 494659: OUTPUT: «True␤»
18:04 Voldenet I think it works fine.
18:04 Zoffix I think the discussion we're having is exactly about that: smartmatch is not the same as ===
18:05 Voldenet imho === should just check if the address matches for objects, if I wanted a more expensive check, I'd use it
18:06 Zoffix heh
18:06 Zoffix left #perl6
18:09 Voldenet Were you ever so wrong, that the person you were talking to left?
18:22 Geth ¦ doc: 0a9b9353ac | (Zoffix Znet)++ | doc/Type/IO/Handle.pod6
18:22 Geth ¦ doc: Fix typo in heading
18:22 Geth ¦ doc: review: https://github.com/perl6/doc/commit/0a9b9353ac
18:23 Geth ¦ doc: 17448207b4 | (Zoffix Znet)++ | doc/Type/IO/Path.pod6
18:23 Geth ¦ doc: [io grant] Document IO::Path.lines
18:23 Geth ¦ doc: review: https://github.com/perl6/doc/commit/17448207b4
18:30 Geth ¦ doc: f3f70a0167 | (Zoffix Znet)++ | doc/Type/IO/Path.pod6
18:30 Geth ¦ doc: [io grant] Document IO::Path.words
18:30 Geth ¦ doc: review: https://github.com/perl6/doc/commit/f3f70a0167
18:30 Geth ¦ doc: 96eada863f | (Zoffix Znet)++ | doc/Type/IO/Path.pod6
18:30 Geth ¦ doc: Improve note about reifying returned Seq for IO::Path.lines
18:30 Geth ¦ doc: review: https://github.com/perl6/doc/commit/96eada863f
18:32 webart k so I had my silly example of using feeds (==>) that took 20 seconds
18:33 webart that was on an older version of perl6 ... pulled, recompiled and it now takes 5 seconds
18:33 webart but it is still silly :-D
18:46 webart also several silly naïve benchmarks are now trivially slower than perl5 rub python .... e.g. http://www.perlmonks.org/?node_id=1099617
18:49 TreyHarris ZofBot: Sorry, I didn't mean to just disappear; my husband needed my help with something around the house
18:49 TreyHarris er.... Zoffix. he's gone now too.
18:50 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:51 moritz \o
18:51 Geth ¦ doc: 509f0e8960 | (Zoffix Znet)++ | doc/Type/IO.pod6
18:51 Geth ¦ doc: [io grant] Fix incorrect suggested routine
18:51 Geth ¦ doc: review: https://github.com/perl6/doc/commit/509f0e8960
18:52 setty1 joined #perl6
18:54 silug joined #perl6
18:56 webart hmm I think it would be neat if perl6 had a way save "workspaces" like R does ... objects history data etc
18:56 webart for use with the console
18:56 * webart checks ecosystem
18:59 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:05 webart cool
19:10 Voldenet webart: calm down with the performance problems, perl6 is around 20 years younger than perl5
19:10 Voldenet perl6 will be as good in a few years or so
19:12 mst webart: 6.c was declared at the point at which rakudo was "working and optimisable" not *optimised*
19:12 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
19:13 webart errm bad math well it went from 120 seconds to 1 second :-)
19:13 Voldenet so... I guess it's quite good :P
19:13 webart I was thinking in "marketing math"
19:14 Voldenet I'm sure perl6 will be actually faster than perl5
19:15 ccntrq joined #perl6
19:15 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 ;-)
19:16 AlexDaniel webart: by the way, there's this thing: http://tux.nl/Talks/CSV6/speed4.html
19:17 AlexDaniel which isn't a super accurate representation of the perl6 performance, but still :)
19:17 webart AlexDaniel: more accurate than my "12000% faster !"
19:22 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 Voldenet that'd be a great marketing method ;)
19:24 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 TreyHarris Not with sleeps, obviously. :-)
19:24 Voldenet still, the improvements in speed are most impressive, it's 55x times faster :o
19:24 Voldenet between the first and the last chart point
19:26 Cabanossi joined #perl6
19:26 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 TreyHarris So you can significantly speed up anything by sticking it all on one line with semicolons
19:27 Voldenet Actually, putting sleep between lines in embedded systems might help their stability, but probably not 1s sleeps
19:28 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:29 TreyHarris Voldenet: true. devices where Lua's controlling robotics or relays for instance.
19:30 Voldenet well, it's still better than perl5's madness of interpreting floats as 0
19:30 Voldenet sleep(0.01); # so we don't update screen too hard
19:30 TreyHarris Voldenet: which madness is that?
19:32 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:35 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 TreyHarris who  gave self-ranking under 9 to actually reel off every singly falsy value.
19:36 TreyHarris Perl 6 makes this question no longer even very interesting to anyone over, say, a 3 or 4?
19:37 Voldenet Perl 5 is a lot less complex than perl 6 though
19:37 TreyHarris Voldenet: waterbed complexity.
19:39 TreyHarris 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:41 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
19:42 TreyHarris 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:44 Voldenet Stuff like perl6's type system certainly gives one an ability to document it properly
19:45 Voldenet so the 'unusual casting/comparison behaviours' can become less unusual
19:46 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 TreyHarris s/type/type constraint/
19:48 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:50 Voldenet actually, it would help a lot if there wasn't 'Str:D' at all
19:50 Voldenet Str is explicit enough, Str:U is an explicit "nulls are okay" sign
19:51 Geth ¦ yaml-pm6: 6c6c88e25c | (Nick Logan)++ (committed using GitHub Web editor) | .travis.yml
19:51 Geth ¦ yaml-pm6: Update .travis.yml
19:51 Geth ¦ yaml-pm6: review: https://github.com/perl6-community-modules/yaml-pm6/commit/6c6c88e25c
19:51 Voldenet ...except Str:U does not allow defined strings :)
19:51 labster joined #perl6
19:51 labster1 joined #perl6
19:52 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
19:52 Voldenet and writing 'Type:D' by default everywhere isn't really very tidy
19:53 Geth ¦ doc: 0901ff29d9 | (Jan-Olof Hendig)++ | doc/Language/concurrency.pod6
19:53 Geth ¦ doc: Fix another typo
19:53 Geth ¦ doc: review: https://github.com/perl6/doc/commit/0901ff29d9
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
19:54 TreyHarris I see the argument, but I think that train has left the station, though
19:54 Voldenet > https://github.com/rakudo/rakudo/blob/6bb1b5b409819411479d5b506eb15bef912cf30c/src/core/Instant.pm
19:54 * ilmari has been doing scala lately, and likes Option[Foo] for optional things
19:54 Voldenet usage of Instant:D is a lot higher
19:54 Voldenet than usage of Instant
19:55 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 :)
19:56 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:57 ilmari the disadvantage is that you have to write code to get inside the Option, but .map and for comprehensions make that easy
19:58 TreyHarris yeah, looks like any Ctrl-f search across, roughly, a \b breaks. "multi" returns stuff, "multi m" nothing
19:58 TreyHarris that's pretty annoying.
19:58 Voldenet It works on firefox, though. :)
19:58 Geth ¦ Inline-Perl5: 9519c34307 | (Nick Logan)++ (committed using GitHub Web editor) | .travis.yml
19:58 Geth ¦ Inline-Perl5: travis s/panda/zef/ + osx testing
19:58 Geth ¦ Inline-Perl5: review: https://github.com/niner/Inline-Perl5/commit/9519c34307
19:58 Geth ¦ Inline-Perl5: 2d4c22fb30 | (Nick Logan)++ (committed using GitHub Web editor) | .travis.yml
19:58 Geth ¦ Inline-Perl5: Determine oldest version later
19:58 Geth ¦ Inline-Perl5:
19:58 Geth ¦ Inline-Perl5: Would require tagging zef at the right commit, as HEAD will install but fails handling dependencies due to a change in `Version`
19:58 Geth ¦ Inline-Perl5: review: https://github.com/niner/Inline-Perl5/commit/2d4c22fb30
19:58 Geth ¦ Inline-Perl5: 7bad806e2a | niner++ (committed using GitHub Web editor) | .travis.yml
19:58 Geth ¦ Inline-Perl5: Merge pull request #96 from ugexe/patch-1
19:58 Geth ¦ Inline-Perl5:
19:58 Geth ¦ Inline-Perl5: travis s/panda/zef/ + osx testing
19:59 Geth ¦ Inline-Perl5: review: https://github.com/niner/Inline-Perl5/commit/7bad806e2a
20:01 aindilis joined #perl6
20:01 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:03 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: https://itunes.apple.com/us/app/blink-shell-mosh-ssh-terminal/id1156707581 or https://github.com/blinksh/blink
20:03 webart hmm could perl6 ever run on a lua runtime ?
20:04 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?
20:04 TreyHarris nine: how would _you_ know? :-P
20:05 webart wait ... let's have a runtime for runtimes !
20:06 webart 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.
20:07 TreyHarris nine: I was joking, I know who you are and have known several pumpkings ;-)
20:07 movl joined #perl6
20:07 nadim TreyHarris: haven't tried and I don't want an out of bound exception if I ask for more
20:08 TreyHarris nadim: you don't get an exception in that case, you get Nil
20:08 TreyHarris m: say (1..3); say (1..3)[1]; say (1..3)[5];
20:08 camelia rakudo-moar 494659: OUTPUT: «1..3␤2␤Nil␤»
20:09 webart since poly means "many" in greek maybe parrot was some kind of oblique reference to "poly-runtime"
20:10 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 abruanese joined #perl6
20:12 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:13 skids m: (^2).map({$_}).head(3).say
20:13 camelia rakudo-moar 494659: OUTPUT: «(0 1)␤»
20:13 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 #perl6
20:15 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:16 skids m: <fee fie foo fum>.map({$_}).head(3).say;  # happy? :-)
20:16 camelia rakudo-moar 494659: OUTPUT: «(fee fie foo)␤»
20:18 TreyHarris skids: heh, just warning of a potential gotcha I've seen in camelia examples. didn't mean it as criticism.
20:20 TreyHarris it's more of an issue when people do key-value stuff with sequences
20:24 TreyHarris 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:25 webart is there a generic way to calculate roots in perl6 ?   some what other than cube root like:   8000**(1/3)
20:26 Cabanossi joined #perl6
20:27 TreyHarris webart: https://docs.perl6.org/type/Numeric.html#method_roots
20:27 skids m: 24.roots(3).say
20:27 Voldenet m: n8000.roots(3)
20:27 camelia rakudo-moar 494659: OUTPUT: «(2.88449914061482+0i -1.44224957030741+2.49804953296681i -1.44224957030741-2.49804953296681i)␤»
20:27 camelia rakudo-moar 494659: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Undeclared routine:␤    n8000 used at line 1␤␤»
20:27 skids jinx
20:27 Voldenet welp, pretty much what I wanted, lol
20:28 Voldenet m: say 8000**(1/3); # somewhat more sane result
20:28 camelia rakudo-moar 494659: OUTPUT: «20␤»
20:28 Voldenet the results returned are less complex
20:30 TreyHarris m: 25.roots(2)
20:30 camelia rakudo-moar 494659: ( no output )
20:30 TreyHarris m: say 25.roots(2)
20:30 camelia rakudo-moar 494659: OUTPUT: «(5+0i -5+6.12323399573677e-16i)␤»
20:30 BenGoldberg m: say (-1).roots:2
20:30 camelia rakudo-moar 494659: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Confused␤at <tmp>:1␤------> 3say (-1).roots:7⏏2␤    expecting any of:␤        colon pair␤»
20:30 TreyHarris too bad the latter result is so ugly
20:30 BenGoldberg m: say (-1).roots(2)
20:30 camelia rakudo-moar 494659: OUTPUT: «(6.12323399573677e-17+1i -1.83697019872103e-16-1i)␤»
20:31 TreyHarris or both resuls in that case....
20:31 BenGoldberg m: say (-1).roots(3)
20:31 camelia rakudo-moar 494659: OUTPUT: «(0.5+0.866025403784439i -1+1.22464679914735e-16i 0.5-0.866025403784439i)␤»
20:31 BenGoldberg m: say (-1).roots(4)
20:31 camelia rakudo-moar 494659: OUTPUT: «(0.707106781186548+0.707106781186547i -0.707106781186547+0.707106781186548i -0.707106781186548-0.707106781186547i 0.707106781186547-0.707106781186548i)␤»
20:31 BenGoldberg m: say (1).roots(3)
20:31 camelia rakudo-moar 494659: OUTPUT: «(1+0i -0.5+0.866025403784439i -0.5-0.866025403784438i)␤»
20:32 rmallah joined #perl6
20:33 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 rakudo-moar 494659: OUTPUT: «Type check failed in assignment to $x; expected Complex but got Num (NaN)␤  in block <unit> at <tmp> line 1␤␤»
20:35 webart TreyHarris: roots!  I was trying root rts  ....
20:35 webart sorry thanks
20:36 skids TreyHarris: I think the multis on return type might go to the language design level.  see "wantarray"
20:37 TreyHarris webart: given your last few questions, I'd suggest cloning perl6/docs and using a searcher like ack or ag
20:37 TreyHarris skids: oh, I know the pitfalls there.
20:38 TreyHarris I was just talking about them here an hour or two ago
20:39 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 :)
20:39 Voldenet ^ yeah, it sounds sane
20:41 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 rakudo-moar 494659: OUTPUT: «NaN+0i␤»
20:42 skids (...and Complex(Complex|Num))
20:42 skids Though "Numeric" works in this case.
20:44 espadrine joined #perl6
20:45 TreyHarris webart: what, this isn't good enough for you?
20:45 TreyHarris m: say 24.roots(3).grep(!*.im).map(*.re)
20:45 camelia rakudo-moar 494659: OUTPUT: «(2.88449914061482)␤»
20:45 TreyHarris ;-)
20:46 webart hehe
20:47 webart **(1/3) is good :)
20:47 webart m: 24**(1/3)
20:47 camelia rakudo-moar 494659: OUTPUT: «WARNINGS for <tmp>:␤Useless use of "**" in expression "24**(1/3)" in sink context (line 1)␤»
20:47 webart haha
20:47 webart m: say 24**(1/3)
20:47 camelia rakudo-moar 494659: OUTPUT: «2.88449914061482␤»
20:50 Ben_Goldberg joined #perl6
20:50 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:51 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 webart etc.
20:53 webart I still like Devel::REPL/re.pl  mst++  well volunteered :-D
20:58 TEttinger joined #perl6
21:02 labster left #perl6
21:02 labster joined #perl6
21:04 bjz joined #perl6
21:14 labster joined #perl6
21:21 trnh joined #perl6
21:27 kriti joined #perl6
21:29 pilne I'm following the information at http://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:31 ChoHag joined #perl6
21:34 BenGoldberg joined #perl6
21:40 dct joined #perl6
21:42 timotimo ah, yeah
21:42 timotimo Task::Star got thrown out
21:43 timotimo it wasn't being kept up to date
21:43 timotimo pilne: no worries, you'll just have to install modules you want by hand with zef :)
21:43 timotimo and we should really change that site
21:45 pilne thank you, is there a list of those suggested modules? (:
22:07 timotimo https://github.com/rakudo/star/tree/master/modules - rakudo star comes with these
22:07 timotimo http://modules.perl6.org/ - you can find almost all our modules here
22:08 timotimo we've just recently made a good step towards getting perl6 modules onto cpan
22:08 dogbert17_ joined #perl6
22:10 movl joined #perl6
22:12 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:16 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
22:17 timotimo in what ways is it not malleable?
22:19 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 nadim neurons
22:22 timotimo i don't think that's how people usually understand a language being "malleable"
22:23 nadim enlighten me
22:23 timotimo "you can change it so it fits your use case beter"
22:25 timotimo i don't think i actually understand how you meant that comment
22:26 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:27 pilne or make it easy for me to "create" something that isn't there, within the language itself (metaprogramming usually).
22:28 timotimo that's how i understood it
22:30 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:31 timotimo there's this idea of "baby perl" out there
22:31 timotimo like "you can start off writing perl with very simple idioms and having only learned a small part of the whole"
22:32 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:33 pilne (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:43 rmallah joined #perl6
22:46 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 samcv what do people think would be a sane way to do it?
22:46 samcv =begin code :lang<perl6> # like this?
22:46 samcv or some other way?
22:46 samcv don't really care how as long as other people agree to the syntax of it
23:07 samcv timotimo, thoughts?
23:07 samcv putting a PR together for the POD6 markdown renderer
23:22 movl joined #perl6
23:28 Voldenet you can mostly write in perl6 like you would in perl5
23:28 Voldenet mostly arrays, hashes and some simple subs
23:29 Voldenet :)
23:35 samcv well i added support to the markdown renderer. if you do: =begin code :lang<perl6> using pod
23:35 samcv https://github.com/softmoth/perl6-pod-to-markdown/pull/9
23:36 samcv still waiting on my other PR that adds nested bullet points as well though :\
23:44 rmallah joined #perl6
23:56 Cabanossi joined #perl6

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo