Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2017-11-01

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 buggable 🎺🎺🎺 It's time for the monthly Accidental /win Lottery 😍😍😍 We have 2 ballots submitted by 2 users! DRUM ROLL PLEASE!...
00:00 buggable And the winning number is 4! Congratulations to AlexDaniel-! You win a can of WD40!
00:00 knight__ in other words: if I 'use something' I cannot add method to something, but if I use require I can add methots/var - class variables.
00:00 knight__ ?
00:03 wander joined #perl6
00:04 Geth ¦ doc/master: 4 commits pushed by (Alex Chen)++
00:04 Geth ¦ doc/master: 0fcc648cab | Rewrite the document of Longest Alternation: C<|>
00:04 Geth ¦ doc/master: bc84b2c64e | Update regexes.pod6
00:04 Geth ¦ doc/master: 7e878dd4c6 | Update regexes.pod6
00:04 Geth ¦ doc/master: 71b822c8a5 | Merge pull request #1640 from perl6/W4anD0eR96-patch-1
00:04 Geth ¦ doc/master: review: https://github.com/perl6/doc/compare/a10c20d447...71b822c8a5
00:04 raschipi There are multiple ways to find names of things. The first is the lexical pad. When you use my, you're adding the name there.
00:05 raschipi Each scope has it's own, and the compiler can look up a name in multiple of them.
00:05 mcmillhj joined #perl6
00:05 knight__ I understand, you have symbol table at some scope
00:05 knight__ scope may be block, sub, class, whatever
00:06 raschipi The second one is package lookup, when you call something with a package name Package::Corp::variable, for example.
00:06 knight__ but, can I add some vars/function to "use something" module?
00:06 callyalater left #perl6
00:06 raschipi The packages are a lot like hashes, they're called stashes in P6.
00:07 raschipi What 'use' does is to take package names and install the names into the pad
00:07 raschipi what will be installed is defined by what you're using
00:07 raschipi The third way to find a name is through method resolution
00:08 knight__ raschipi: Only names, not every symbol which I defined for exporting?
00:08 knight__ or name of module is index to scope of module?
00:08 raschipi Yes, everything that was setup to export.
00:09 raschipi Don't know anything else other than names, though.
00:09 raschipi For exporting a name and a reference is setup.
00:11 raschipi Feel free to ask anything I didn't make clear.
00:11 knight__ raschipi: Does Module have own scope?
00:11 raschipi or name of module is index to scope of module? No, it's impossible to name a scope outside of it.
00:11 knight__ I mean
00:12 knight__ you have own symbol table for every module
00:12 raschipi Yes, each module has it's own scope and it's impossible to get to it unless it sends references.
00:12 timotimo there's the package scope where things declared "our" go
00:12 timotimo you can reach that
00:13 knight__ Yep, and my module's symbol table for "use"
00:13 raschipi Perl6 will automatically take the references from the EXPORT sub and is export trait and install in the local scope. You can't get to it otherwise.
00:13 knight__ can I change it?
00:13 raschipi Yes, anything created with 'our' will be installed in both the pad and the package stash. You can get those things through the stash.
00:14 raschipi change what?
00:14 knight__ the symbol table
00:14 knight__ I will show you on python
00:14 knight__ w8
00:17 mcmillhj joined #perl6
00:17 knight__ https://pastebin.com/dmirnwWq
00:18 knight__ So, I made class
00:18 knight__ with a class variable
00:18 knight__ and I dynamically added "b" variable
00:18 knight__ It can be done via __dict__
00:18 knight__ Also I can add dynamically method
00:19 raschipi For classes, that is bread and butter, very easy
00:19 raschipi Or do you want to do it to packages? That is done through a Stash https://docs.perl6.org/type/Stash
00:19 geekosaur methods can be added at runtime via the MOP
00:20 knight__ And I think, that In case of perl6 require, I can add dynamically method/var because it is in runtime
00:20 knight__ and not compiled
00:20 raschipi A Stash is a hash you can write to, like any other Hash.
00:21 timotimo knight__: symbols from "require" and methods in classes are entirely different
00:21 raschipi What is difficult, although some are working on it, is to change the lexical pad because it's set up at compile time.
00:22 raschipi but you didn't ask for that.
00:23 knight__ raschipi: can I use Stash on "use module"?
00:24 knight__ can I change the state of compiled part?
00:24 knight__ I still dont get what is the real purpose of require.
00:24 raschipi Some are asking for a way to change the compile part at compile time, but it's not implemented yet.
00:25 knight__ raschipi: so Stash you can use only on objects which are "included via require"?
00:25 raschipi You can require something and then get to it with it's full name. Then you can set up alises for what you want to have short names.
00:25 timotimo m: say Str.WHO.^name
00:25 camelia rakudo-moar 697e4ecff: OUTPUT: «Stash␤»
00:25 timotimo a Stash is installed on every class, for example
00:25 timotimo most of them are empty, though
00:26 timotimo m: say Bool.WHO.perl
00:26 camelia rakudo-moar 697e4ecff: OUTPUT: «{:!False, :True}␤»
00:26 timotimo enums have stashes with contents
00:26 BenGoldberg joined #perl6
00:26 knight__ Ok, so only "required" objects can I stash?
00:26 knight__ Ok, so only "required" objects can I Stash?
00:27 timotimo that question doesn't make sense to me
00:27 knight__ timotimo: can I use Stash - change method for example Int?
00:28 knight__ not Inheritance, dynamic...
00:28 raschipi not for methods, you need the MOP for that.
00:30 knight__ Ok, I am reading MOP docs
00:30 knight__ but I must go to bed, see ya, and thank you.
00:30 knight__ I am only want to know diffrences from "formal way".
00:31 timotimo stash is not how methods are looked up
00:32 timotimo also, i think Stash is immutable
00:32 geekosaur perl 6 is not python, methods don't live in a package symbol table
00:33 geekosaur perl 6 is also not javascript, foo["x"] (or perl 6 equivalent foo{"x"}) is not the same as foo.x
00:33 geekosaur every language does this differently; trying to carry things like that over to a different language won't work
00:33 knight__ You are right, but I am trying to understand how it works in Perl.
00:34 knight__ But I have not found some docs about it.
00:34 knight__ ok, I must go!
00:34 knight__ GN!
00:34 knight__ And thank you
00:35 geekosaur https://docs.perl6.org/language/objects#Meta-Object_Programming_and_Introspection
00:35 geekosaur which links to a couple of docs
00:36 knight__ thanks
00:36 knight__ gN!
00:38 timotimo should probably also tell them that perls 5 and 6 differ greatly in this respect
00:39 aborazmeh joined #perl6
00:39 aborazmeh joined #perl6
00:47 Morfent joined #perl6
00:51 raschipi Perl6 is the only language that I know where every type of resolution uses a different method for it. All others I know reuse some for different things.
00:55 leah2 joined #perl6
00:55 Geth ¦ doc: c125a14a27 | (Alex Chen)++ (committed using GitHub Web editor) | doc/Language/grammars.pod6
00:55 Geth ¦ doc: Fix link
00:55 Geth ¦ doc: review: https://github.com/perl6/doc/commit/c125a14a27
00:55 synopsebot Link: https://doc.perl6.org/language/grammars
00:57 llfourn_ joined #perl6
00:59 Geth ¦ doc: 7c39640b42 | (Alex Chen)++ (committed using GitHub Web editor) | doc/Language/regexes.pod6
00:59 Geth ¦ doc: Fix link
00:59 Geth ¦ doc: review: https://github.com/perl6/doc/commit/7c39640b42
00:59 synopsebot Link: https://doc.perl6.org/language/regexes
01:06 mson joined #perl6
01:16 mcmillhj joined #perl6
01:20 Geth ¦ doc: 1506fe00f2 | (Alex Chen)++ (committed using GitHub Web editor) | doc/Language/regexes.pod6
01:20 Geth ¦ doc: Update regexes.pod6
01:20 Geth ¦ doc:
01:20 Geth ¦ doc: Note that wildcard C<.> now match "\n".
01:20 Geth ¦ doc: Rewrite comments in regexes to make it practical
01:20 synopsebot Link: https://doc.perl6.org/language/regexes
01:20 Geth ¦ doc: review: https://github.com/perl6/doc/commit/1506fe00f2
01:27 mcmillhj joined #perl6
01:30 cdg joined #perl6
01:41 mcmillhj joined #perl6
01:58 Herby_ joined #perl6
01:58 Herby_ o/
02:00 cdg joined #perl6
02:01 wander joined #perl6
02:14 mcmillhj joined #perl6
02:15 Cabanossi joined #perl6
02:26 COMBORICO Does ?/ have a name?
02:29 raschipi Never saw that
02:29 COMBORICO It is under regex.
02:30 COMBORICO say ~$/ if "abcdef" ~~ / bc.e /;
02:30 evalable6 COMBORICO, rakudo-moar 697e4ecff: OUTPUT: «bcde»
02:30 bitrauser_ joined #perl6
02:31 raschipi RIght, $/, not ?/
02:31 raschipi it's the match variable
02:31 COMBORICO Oops! Getting sleepy . . .
02:33 COMBORICO Match variable! Okay, thanks.  How is it different than topical variable ($_)
02:33 wander I've seen "Greedy matching can be explicitly requested with the ! modifier"
02:33 wander m: say 'fooobar' ~~ /fo**:{1..3}obar/;
02:33 camelia rakudo-moar 697e4ecff: OUTPUT: «Nil␤»
02:33 wander m: say 'fooobar' ~~ /fo**:?{1..3}obar/;
02:33 camelia rakudo-moar 697e4ecff: OUTPUT: «「fooobar」␤»
02:33 wander m: say 'fooobar' ~~ /fo**:!{1..3}obar/;
02:33 camelia rakudo-moar 697e4ecff: OUTPUT: «「fooobar」␤»
02:33 geekosaur $_ is the target of things. $/ is the result of things (specifically, matches)
02:34 COMBORICO Hmm! I like that summary.
02:34 wander I think `/fo**:{1..3}obar/` equals to `/fo**:!{1..3}obar/`
02:34 COMBORICO I'll credit your name in my textbook.
02:34 wander but oops, they don't.
02:35 geekosaur wander, ! tells ** to match as much as it can. : tells it not to allow backtracking after it commits to a match. they do interact but they're very different things
02:38 wander I don't replace ":" with "!"
02:39 wander since ":?" works well, and it said "!" is the explicit way to enable greedy matching, seems ":" should be as ":!"
02:54 wander Having tried to add "!" at other position, but no one works.
02:54 wander If "!" is the explicit way to enable greed, and `/fo**:{1..3}obar/` using greedy, there is a way to explicitly request greedy with "!" in the regex
02:56 ilbot3 joined #perl6
02:56 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:56 Todd Hi All!   Do we have a "slurp" (to eat noisely) only it write the whole thing instead of reading the whole thing?  I have tried "slop", "upchuck".  I have a string with everything I want it in that I want to write to disk.  https://www.freethesaurus.com/slurp is not help.  Google give me tons of perl5 hits.
02:58 Todd Wait.  Just found it: http://rosettacode.org/wiki/Write_entire_file#Perl_6     It is `spurt`
03:07 mcmillhj joined #perl6
03:10 wander Todd, https://docs.perl6.org/language/io#Writing_to_files
03:11 colomon more broadly, https://docs.perl6.org/type/IO::Path
03:11 * colomon had it open to look up .modified
03:12 wander colomon, there is sometimes message leading with "*", such as "* colomon had it open to look up .modified", how do you do that?
03:13 geekosaur /me
03:13 * colomon typed “/me” first (I think)
03:13 wander thank you
03:13 colomon it’s instictive at this point, and my client hides it once I type it.  :)
03:13 TEttinger Todd: spit is somewhat customary in lisps as the counterpart to slurp
03:14 TEttinger spurt rhymes so that makes sense somewhat
03:21 mcmillhj joined #perl6
03:21 Todd I was looking for something with a sence of humor.  Whoever came up with slurp (which I adore) had a sense of humor!  :-)
03:30 noganex_ joined #perl6
03:33 mcmillhj joined #perl6
03:38 TEttinger slurp I think goes way back to before perl,  though I'm not sure
03:45 Cabanossi joined #perl6
03:45 mcmillhj joined #perl6
03:53 cdg joined #perl6
03:57 mempko joined #perl6
03:59 mcmillhj joined #perl6
04:13 aindilis joined #perl6
04:13 TimToady joined #perl6
04:22 wamba joined #perl6
04:39 piojo1 I noticed something weird when making a class indexable: accessing elements via the class (not instance) as C{$key} is mis-parsed as a closure. C<x> works, and C<<$key>> even works
04:39 piojo1 m: class C { method m() handles <EXISTS-KEY AT-KEY DELETE-KEY ASSIGN-KEY BIND-KEY> { state %; } }; C<foo> = 42;
04:39 camelia rakudo-moar 697e4ecff: ( no output )
04:39 piojo1 m: class C { method m() handles <EXISTS-KEY AT-KEY DELETE-KEY ASSIGN-KEY BIND-KEY> { state %; } }; C{'foo'} = 42;
04:39 camelia rakudo-moar 697e4ecff: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Autovivifying object closures not yet implemented. Sorry.␤at <tmp>:1␤------> 3N-KEY BIND-KEY> { state %; } }; C{'foo'}7⏏5 = 42;␤»
04:42 piojo1 Is this a bug?
04:44 Cabanossi joined #perl6
04:51 piojo1 Oh, and being more explicit with "." to clarify that it's a method call solves the problem:
04:51 piojo1 m: class C { method m() handles <EXISTS-KEY AT-KEY DELETE-KEY ASSIGN-KEY BIND-KEY> { state %; } }; C.{'foo'} = 42;
04:51 camelia rakudo-moar 697e4ecff: ( no output )
04:52 mcmillhj joined #perl6
04:55 wander joined #perl6
05:06 mcmillhj joined #perl6
05:31 mcmillhj joined #perl6
05:35 Todd Hi All,  I have a mystery.  Two computers with Rakudo 2017.08.1.  This command gives me two separate results:my $CurlTmpFile = $?FILE.IO ~ ".tmp";
05:35 Todd computer 1: /home/linuxutil/CurlUtils.pm6 (CurlUtils).tmp
05:36 Todd computer 2: /home/linuxutil/CurlUtils.pm6.tmp
05:36 Todd I am stumped.  I need the results of computer 2
05:36 ugexe use $*PROGRAM instead of $?FILE
05:39 Todd testing
05:41 Todd ./CurlUtilsTest.pl6.tmp
05:41 Todd I need the path too
05:42 Todd and not pl6.  I need pm6
05:44 Todd I need the name of the module, not the calling program
05:51 Todd I whacked it with
05:51 Todd my $CurlTmpFile = $?FILE.IO ~ ".tmp";    my $CurlTmpFile ~~ s/" "\(.*?\)//;
05:52 Todd and just removed the extra "my"
05:58 Actualeyes joined #perl6
05:59 Cabanossi joined #perl6
06:04 mcmillhj joined #perl6
06:31 CacoS joined #perl6
06:32 wander .ask moritz why `say 'fooobar' ~~ /fo**:{1..3}obar/;` results differently with `say 'fooobar' ~~ /fo**:!{1..3}obar/;`
06:32 yoleaux wander: I'll pass your message to moritz.
06:36 mcmillhj joined #perl6
06:36 mempko joined #perl6
06:45 Todd Hi All,  I am trying to replace leading spaces with another character.  How would I modify the following to only replace leading spaces (I do not want them trimmed)?
06:45 Todd $ perl6 -e 'my $x="  abc d  e"; $x ~~ s:global/" "/x/; say $x;'     xxabcxdxxe
06:47 piojo1 m: my $x = '  ab c d '; $x ~~ s/ ^' '+ //; say $x.perl;
06:47 camelia rakudo-moar 581edd58e: OUTPUT: «"ab c d "␤»
06:47 piojo1 Todd: don't use :global unless you want the substitution to repeat
06:48 Todd testing
06:50 Todd Rats, it subs all the leading spaces with a single character.
06:50 Todd $ perl6 -e 'my $x="  abc d  e"; $x ~~ s/^" "+ /x/; say $x;'
06:50 Todd xabc d  e
06:51 Todd This is my eventual goal:
06:51 Todd perl6 -e 'my $x="  abc d  e"; $x ~~ s/^" "+ /&nbsp;/; say $x;'
06:52 wander perl6 -e 'my $x="  abc  \n   d  \n  e "; $x ~~ s:g/^^" "+ /&nbsp;/; say $x;'
06:53 wander if multi-line
06:53 mcmillhj joined #perl6
06:53 napo1eon joined #perl6
06:54 piojo1 Todd: by the way, that $?FILE bug is a result of this: https://rt.perl.org/Public/Bug/Display.html?id=128442
06:55 piojo1 Todd: as wander said, ^^ and $$ are for matching the start/end of a line. ^ and $ match the start/end of the whole input.
06:55 Todd not multiline.  "^^" still replaces all the spaces with a single character.
06:57 piojo1 oh, I see the problem now. I suggest using code to count the number of spaces you matched
06:58 Todd Thanks for the bug url.  Mean I's not losing my mind.  Well, any more than I already ...
06:58 piojo1 I'll give an example in a moment...
06:58 Todd I am try to split the string into and array and reassenbling it.  What a pain!
06:59 piojo1 no need. you can put the spaces in a match group (one match per space), then count the number of matches
06:59 piojo1 when you have that, add back the nbsp;:
06:59 piojo1 m: say 'nbsp' x 3
06:59 camelia rakudo-moar 581edd58e: OUTPUT: «nbspnbspnbsp␤»
07:01 Todd did you say you had an example?
07:01 piojo1 removing some crap from it...
07:02 TEttinger m: my $x="  abc  \n   d  \n  e "; $x ~~ s:g/^^" " /&nbsp;/; say $x;
07:02 camelia rakudo-moar 581edd58e: OUTPUT: «&nbsp; abc  ␤&nbsp;  d  ␤&nbsp; e ␤»
07:02 piojo1 m: my $x="  abc d  e"; $x ~~ s/^ (' ')* /{ say "matched $0.elems() spaces"; "&nbsp;" x $0.elems; }/; say $x;
07:02 camelia rakudo-moar 581edd58e: OUTPUT: «matched 2 spaces␤&nbsp;&nbsp;abc d  e␤»
07:03 rindolf joined #perl6
07:03 piojo1 TEttinger: I think the issue is to replace more than one leading space, not to do a per-line change
07:03 TEttinger I'm not totally sure what the question is here, what I pasted was an attempt to only remove the initial leading space
07:03 wander_ joined #perl6
07:03 TEttinger that's what I gathered from <Todd> Rats, it subs all the leading spaces with a single character.
07:04 piojo1 Todd: my example is printing both $x and debugging output, but you can ignore the debugging output. It should replace $x as needed
07:04 Todd I want to change each space into `&nbsp;`
07:04 Todd testing
07:04 TEttinger err
07:04 TEttinger each leading space, or every space?
07:06 TEttinger and I don't know quite what leading means here, if it's the first space on a line or the first space in a string or the first section of spaces before a non-space char
07:06 wander_ m: my $x="  abc  \n   d  \n  e "; $x ~~ s:g/^^(" ")+ /{"&nbsp;"x$/[0].elems}/; say $x;
07:06 camelia rakudo-moar 581edd58e: OUTPUT: «&nbsp;&nbsp;abc  ␤&nbsp;&nbsp;&nbsp;d  ␤&nbsp;&nbsp;e ␤»
07:06 wander_ Todd, ^^
07:07 Todd $ perl6 -e 'my $x="  abc  d   e "; $x ~~ s:g/^^(" ")+ /{"&nbsp;"x$/[0].elems}/; say $x;'
07:07 Todd &nbsp;&nbsp;abc  d   e
07:08 Todd perfect!  Thank you!  How in the world did you figure that out?!
07:08 AlexDaniel joined #perl6
07:08 mcmillhj joined #perl6
07:08 wander_ you need more information of the match, so do a capture
07:09 wander_ and to get the exact match
07:11 Todd Yo guys have created a monster!
07:11 Todd &nbsp;&nbsp;Used Dev Size : 1855871108 (1769.90 GiB 1900.41 GB)<br>
07:13 Todd This stuff is working so well, I am about to giggle.
07:21 rindolf joined #perl6
07:25 piojo1 Todd: perl6 regexes are complicated, but awesome. But I recently discovered a lot of the perl6 grammar power exists in perl5, but you had to use weird syntax and modifiers to make it work
07:25 piojo1 The power has been brough forward, so it's a first class part of the language.
07:29 Todd My first YUGE programming efforts were about 30 years ago with Pascal and Modula2.  Now I do a lot of Sys admin work and I write myself a lot of stuff.  I use to do it in bash and batch.  What a pain in the neck.  So I moved to Perl.  I hvae been programming Perl5 for a while when moved to Perl 6.  I adore Perl 6.  (The subs in p5 drives me nuts [@_]).  I am not doing any new code in p5.  Transitioning from Modula2 to Perl gave me a migr
07:30 Todd top down, for which I am very grateful.  Some p5 guys are crabby about p6.  I don't get it.  Soon as I got a load of p6, I dropped P5 like a hot potato.
07:33 mcmillhj joined #perl6
07:45 mcmillhj joined #perl6
07:52 Todd Is "slurp" support to create a file if it does not exist?
07:53 wander joined #perl6
07:53 AlexDaniel no
07:53 Todd rats!
07:53 Todd Thank you!
07:57 mcmillhj joined #perl6
07:57 AlexDaniel m: dd Rat xx 10
07:57 camelia rakudo-moar de92e3401: OUTPUT: «(Rat, Rat, Rat, Rat, Rat, Rat, Rat, Rat, Rat, Rat).Seq␤»
07:57 Util joined #perl6
08:04 Todd :-)
08:11 wamba joined #perl6
08:14 Cabanossi joined #perl6
08:17 setty1 joined #perl6
08:21 mtj_ joined #perl6
08:24 wander m: sub f { "hello" }; say &f.CALL-ME();
08:24 camelia rakudo-moar de92e3401: OUTPUT: «No such method 'CALL-ME' for invocant of type 'Sub'␤  in block <unit> at <tmp> line 1␤␤»
08:24 wander ^^ surprised
08:29 mcmillhj joined #perl6
08:29 AlexDaniel squashable6: next
08:29 squashable6 AlexDaniel, ⚠🍕 Next SQUASHathon in 2 days and ≈1 hour (2017-11-04 UTC-12⌁UTC+14). See https://github.com/rakudo/rakudo/wiki/Monthly-Bug-Squash-Day
08:30 releasable6 joined #perl6
08:40 jonas1 joined #perl6
08:40 mcmillhj joined #perl6
08:44 Cabanossi joined #perl6
08:51 parv joined #perl6
08:51 mcmillhj joined #perl6
08:52 zakharyas joined #perl6
08:52 sproctor joined #perl6
08:53 ivans joined #perl6
08:57 sproctor joined #perl6
09:01 Todd Bye Bye.  Thank you all so much.  You guys heped me complete an over a month long progject.
09:03 mcmillhj joined #perl6
09:07 Piotr_ joined #perl6
09:13 moritz good morning
09:13 yoleaux 06:32Z <wander> moritz: why `say 'fooobar' ~~ /fo**:{1..3}obar/;` results differently with `say 'fooobar' ~~ /fo**:!{1..3}obar/;`
09:14 moritz why wouldn't it? it's not the same regex :)
09:16 moritz with : you disable backtracking, so the first part matches all o's, causing the "obar" to fail
09:16 moritz with ! you re-enable it, so the quantifier can give up the extra o again
09:16 moritz :! seems kinda non-sensical
09:18 TheGrimFandango joined #perl6
09:19 espadrine joined #perl6
09:20 TheGrimFandango joined #perl6
09:27 moritz huh
09:27 moritz Invalid json? File: /root/.zef/store/Grammar-ErrorReporting-0.2.tar.gz/Grammar-Error-Reporting-0.2/.gitignore
09:27 TheGrimFandango joined #perl6
09:27 moritz I never expected my .gitignore to be valid json...
09:27 Ven joined #perl6
09:29 TheGrimFandango joined #perl6
09:30 robertle joined #perl6
09:31 TheGrimFandango joined #perl6
09:33 TheGrimFandango joined #perl6
09:35 TheGrimFandango joined #perl6
09:37 TheGrimFandango joined #perl6
09:39 notostraca joined #perl6
09:40 knight__ joined #perl6
09:45 TheGrimFandango joined #perl6
09:46 knight__ hello, what does WARNING: unhandled Failure detected in DESTROY. mean?
09:47 TheGrimFandango joined #perl6
09:47 moritz it means that something failed in a destructor
09:48 moritz and since the destructor is called from the garbage collector, there is no caller which could receive an exception
09:49 TheGrimFandango joined #perl6
09:51 TheGrimFandango joined #perl6
09:53 sproctor @moritz is .gitignore not the first line in your .gitignore?
09:53 sproctor (Also looking forward to the Grammars book :) )
09:53 TheGrimFandango joined #perl6
09:53 knight__ I am lost with this require, when I use last perl6  Rakudo version 2017.09-489-g6ad06fad9
09:54 knight__ somehow it works
09:54 knight__ but
09:54 knight__ when I use  2016.12 built on MoarVM version 2016.12
09:54 knight__ nope
09:55 TheGrimFandango joined #perl6
09:57 TheGrimFandango joined #perl6
09:58 knight__ Can someone look to my code https://bitbucket.org/najt/perl_project/commits/branch/Test_require ? I do not know what shall I do...
09:58 knight__ ?
09:59 Cabanossi joined #perl6
09:59 TheGrimFandango joined #perl6
10:02 DrForr When someone else installs your module the build process should pick up dependencies, I wouldn't really go to that much trouble to catch errors.
10:03 DrForr (also, "omg" doesn't really help me understand what your problem is...)
10:03 knight__ Yep, but my task is something like: When I have not installed depends, you program should work for case ./program -h -> should shows the help message.
10:04 knight__ /usr/bin/perl6 main.p6 --buy-sell='buy' --currency=CZK --date="2015-10-09"
10:04 knight__ ===SORRY!=== Error while compiling /home/a/Skola/PJS2/projekt/perl/main.p6
10:04 knight__ Undeclared names: MBANK used at line 65 NBP used at line 64 NBPref used at line 63
10:04 knight__ /usr/bin/perl6 --version
10:04 knight__ This is Rakudo version 2016.12 built
10:07 DrForr lib/MBANK.pm6 and class MBANK::MBANK don't quite work together.
10:09 moritz sproctor: the .gitignore file is under version control, so it doesn't list itself
10:10 sproctor Oh. See I generally don't put mine in the repo. Different strokes I guess.
10:10 DrForr Convention would be to create lib/MBANK/MBANK.pm6 in your case, then the require() call would be looking for the correct file.
10:10 moritz sproctor: if you don't put it under version control, you can place it in .git/config/exclude
10:11 DrForr Also just a personal question - --currency=CZK - do you by chance hail from Czechia? If so, ahoj from Prague :)
10:12 knight__ :-D Cau, ale som zo Slovenska
10:13 nine knight__: replace "require" by "use" and don't try to handle dependency errors. If the default error message for an unsatisfied dependency can be improved, please let us know, so we can fix it for everyone.
10:14 knight__ nine: I cannot, because this is my TASK by my professor. If some "perl" develop can send him mail about it.
10:14 knight__ :-)
10:15 DrForr Okay, now I'm *really* curious :) An actual programming class using Perl 6. I've got a retrospective meeting right now, but I'm *really* curious about this school, where it is, how we can help...
10:16 knight__ He teaches Perl5, but I want Perl6.
10:16 knight__ and :-X
10:21 moritz knight__: maybe show us how you use the module that you import?
10:21 aborazmeh joined #perl6
10:21 aborazmeh joined #perl6
10:22 wander joined #perl6
10:23 TheGrimFandango joined #perl6
10:24 knight__ moritz: In module I have a class, I am calling class and making instance of it
10:24 knight__ https://bitbucket.org/najt/perl_project/src/b05203a9837a83a8ca37a6a62bd0f4231b1277c4/main.p6?at=master&amp;fileviewer=file-view-default
10:25 knight__ "use module" version ^
10:25 TheGrimFandango joined #perl6
10:25 El_Che knight: a reason you use that specific version? I see debian 9 an ubuntu 17.04 have it
10:26 knight__ moritz: I make @ with instances of bank
10:26 astj joined #perl6
10:26 astj joined #perl6
10:26 knight__ and calls methods in map
10:26 knight__ So, I am changing online inner state of Objects
10:27 knight__ s/online/only
10:27 knight__ El_Che: do you mean This is Rakudo version 2016.12 ?
10:27 knight__ It is from Debian repo
10:28 knight__ Description:Debian GNU/Linux 9.2 (stretch)
10:28 Aaronepower joined #perl6
10:28 knight__ I have compiled new version from repo via rakudobrew
10:28 El_Che In case you're using newer feature, I have debian packages available
10:28 knight__ This is Rakudo version 2017.09-489-g6ad06fad9
10:28 El_Che https://github.com/nxadm/rakudo-pkg
10:29 knight__ require version works, but
10:29 knight__ I have problem with destructor DESTROY something...
10:29 moritz knight__: I think at this point, the easiest way to catch the error is to do something like
10:29 TheGrimFandango joined #perl6
10:29 knight__ what I mentioned, when I joined here
10:29 moritz BEGIN { try { require module1; require module2; .. } # handle errors here }
10:30 moritz and then do the regular "use" calls below that
10:30 knight__ but It will not solve one thing
10:30 knight__ if someone call ./program -h
10:30 knight__ and you have not dependencies
10:30 knight__ it will crash
10:30 knight__ or it will not work
10:30 knight__ am I right?
10:31 moritz right
10:31 moritz ok, let my try to eplain some more background
10:31 TheGrimFandango joined #perl6
10:31 moritz in Perl 5, the compiler looks for symbols such as class names in the symbol table
10:32 moritz Perl 6 tends to look in lexical scopes more
10:32 moritz but, lexical scopes are immutable at run time
10:32 moritz so, in Perl 5, when you do a "require Foo" followed by Foo->import(), thins Just Work[tm]
10:32 moritz that is, you get all the symbols that a "use Foo;" would import
10:33 moritz it can't work that way in Perl 6
10:33 moritz if you do a require Foo; in Perl 6
10:33 moritz then *only* the symbol Foo is available in the caller's scope
10:33 moritz because that's the only symbol that the compiler knows about at compile time
10:34 moritz so now you have two options
10:34 moritz specify all the symbols that you need as literals in the call to require
10:34 moritz or, work from the one symbol you have
10:35 moritz if for example Foo exports a subroutine bar, you can do a  require Foo <&bar>;
10:35 TheGrimFandango joined #perl6
10:36 moritz or if use'ing MBANK makes MBANK::MBANK available, you might have to access it explicitly through the symbol table
10:36 moritz require MBANK;
10:36 moritz MBANK.WHO<MBANK>.new
10:36 moritz instead of MBANK::BANK.new
10:37 steeznson joined #perl6
10:37 pmurias bartolin: https://github.com/rakudo/rakudo/issues/1225
10:37 TheGrimFandango joined #perl6
10:39 knight__ moritz: Thank you!
10:40 nine moritz, knight__: why not just move all the relevant (module using) code into a module and have the main script be something like: if check-requirements() { load-main-module(); } else { print-nice-help-text(); }?
10:41 nine Then you can still use "use" and all the automatic symbol loading in the main module _and_ have your error message if requirements are missing
10:41 knight__ nine: because it is another task, I mast make modules :-)
10:41 knight__ must*
10:42 knight__ och
10:42 knight__ sorry
10:42 knight__ I mean different
10:42 moritz nine: I think the idea is to offer reduced functionality when some modules are not available
10:44 nine moritz: and my idea is to split the functionality of the program into parts that are only loaded when their respective requirements are met. My example code split the program into the parts "do-something-useful and print-helpdesk" but it can be split in other ways, too.
10:46 notbenh joined #perl6
10:47 wander joined #perl6
10:50 nine Did I actually write "print-helpdesk"? I meant "print-helpmessage" of course :)
10:50 wander moritz, so can I say, in ":!", "!" override ":"? does it imply we can only have one modifier on quantifier?
10:51 TheGrimFandango joined #perl6
10:53 moritz nine: a 3D printer could print a literal help desk :-)
10:53 TheGrimFandango joined #perl6
10:53 moritz wander: yes, and I think so
10:54 moritz :! is like "give me less! No, more!" :-)
10:56 raschipi joined #perl6
10:57 knight__ moritz: One question, what If I use require in in my module e.g MBANK?
10:57 knight__ I mean installed via CPAN
10:57 knight__ some modules
10:57 knight__ So, in module MBANK I use require HTTP::Tinyish;
10:58 wander thank you
10:59 moritz knight__: the same rules apply inside modules
10:59 bdmatatu joined #perl6
11:02 moritz afk
11:04 wander I am looking for the implementation of hyper operator "»". Anyone knows its location? Maybe rakudo/rakudo/src/...
11:07 margeas joined #perl6
11:08 jnthn wander: It'll be in at least 3 places: Grammar.nqp for the parsing, Actions.nqp for code-gen, and the code-gen largely just emits calls to some functions in CORE.setting probably in metaops.pm
11:09 wander thanks
11:10 literal joined #perl6
11:10 avar joined #perl6
11:10 avar joined #perl6
11:14 wander I've seen them.
11:29 Cabanossi joined #perl6
11:35 TheGrimFandango joined #perl6
11:37 TheGrimFandango joined #perl6
11:56 leah2 joined #perl6
12:03 TheGrimFandango joined #perl6
12:05 TheGrimFandango joined #perl6
12:07 TheGrimFandango joined #perl6
12:07 Geth ¦ doc: 79adcdef4f | (Alex Chen)++ (committed using GitHub Web editor) | doc/Language/regexes.pod6
12:07 Geth ¦ doc: Improve example of quantifier's modifier
12:07 Geth ¦ doc:
12:07 Geth ¦ doc: `:?` is non-sensical
12:07 Geth ¦ doc: review: https://github.com/perl6/doc/commit/79adcdef4f
12:07 synopsebot Link: https://doc.perl6.org/language/regexes
12:08 Ven joined #perl6
12:09 darutoko joined #perl6
12:09 TheGrimFandango joined #perl6
12:12 bdmatatu joined #perl6
12:13 TheGrimFandango joined #perl6
12:15 mson joined #perl6
12:15 TheGrimFandango joined #perl6
12:17 wander m: say [1,2,3]>>( &sin );
12:17 camelia rakudo-moar 6389cea9f: OUTPUT: «Too many positionals passed; expected 1 argument but got 2␤  in block <unit> at <tmp> line 1␤␤»
12:17 wander m: say [1,2,3]>>.( &sin );
12:17 camelia rakudo-moar 6389cea9f: OUTPUT: «No such method 'CALL-ME' for invocant of type 'Int'␤  in block <unit> at <tmp> line 1␤␤»
12:17 wander m: say [1,2,3]>>.&sin;
12:17 camelia rakudo-moar 6389cea9f: OUTPUT: «[0.841470984807897 0.909297426825682 0.141120008059867]␤»
12:19 wander what are the details about "Too many positionals passed; expected 1 argument but got 2"
12:22 wamba joined #perl6
12:27 TheGrimFandango joined #perl6
12:28 raschipi m: sub joinsay { @_>>.gist.join('---').put }; [1,2,3]>>( &joinsay )
12:28 camelia rakudo-moar 6389cea9f: OUTPUT: «1---sub joinsay (*@_) { #`(Sub|62261368) ... }␤2---sub joinsay (*@_) { #`(Sub|62261368) ... }␤3---sub joinsay (*@_) { #`(Sub|62261368) ... }␤»
12:29 Cabanossi joined #perl6
12:29 raschipi Why is it adding a reference as the second argument I don't know.
12:29 Exodist joined #perl6
12:29 TheGrimFandango joined #perl6
12:30 raschipi m: sub joinsay { @_>>.gist.join('---').put }; say [&sin,&cos,&tan]>>.( &joinsay )
12:30 camelia rakudo-moar 6389cea9f: OUTPUT: «Cannot resolve caller sin(Sub); none of these signatures match:␤    (Numeric \x)␤    (Cool \x)␤    (num $x --> num)␤  in block <unit> at <tmp> line 1␤␤»
12:33 raschipi m: sub joinsay { @_>>.gist.join('---').put }; say [1,2,3]>>.( &joinsay )
12:33 camelia rakudo-moar 6389cea9f: OUTPUT: «No such method 'CALL-ME' for invocant of type 'Int'␤  in block <unit> at <tmp> line 1␤␤»
12:34 raschipi m: say [&sin,&cos,&tan]>>.( 3 )
12:34 camelia rakudo-moar 6389cea9f: OUTPUT: «[0.141120008059867 -0.989992496600445 -0.142546543074278]␤»
12:37 wander joined #perl6
12:43 TheGrimFandango joined #perl6
12:45 TheGrimFandango joined #perl6
12:46 Ven_ joined #perl6
12:46 wander maybe in this case, >> works like https://github.com/rakudo/rakudo/blob/6389cea9f23c7fc2efb76c50a09331ac05d14c72/src/core/metaops.pm#L487-L493
12:47 wander but I cannot trace then, see no how deepmap/nodemap work
12:48 wander that might be the reason why adding function reference exists
12:53 zakharyas joined #perl6
12:59 mcmillhj joined #perl6
13:02 raschipi deepmap and nodemap are in Any
13:03 wander but not in detail
13:05 cdg joined #perl6
13:10 cdg_ joined #perl6
13:11 raschipi https://codesearch.debian.net/search?q=package%3Arakudo++nodemap I can see an implementation in src/core/metaops.pm line 658
13:13 Khisanth joined #perl6
13:14 Cabanossi joined #perl6
13:14 kyan joined #perl6
13:15 wander seen
13:27 ilmari joined #perl6
13:35 wander m: sub see-what-pass { dd @_; }; [1,2,3]>>( &see-what-pass );
13:35 camelia rakudo-moar b386963a3: OUTPUT: «[1, sub see-what-pass (*@_) { #`(Sub|60245232) ... }]␤[2, sub see-what-pass (*@_) { #`(Sub|60245232) ... }]␤[3, sub see-what-pass (*@_) { #`(Sub|60245232) ... }]␤»
13:37 darkmorph joined #perl6
13:37 wander m: sub postfix:<!> { dd @_; }; [1,2,3]>>!;
13:37 camelia rakudo-moar b386963a3: OUTPUT: «[1]␤[2]␤[3]␤»
13:41 wander how to test a sub trait, that is, &func.is-nodal(True/False) or something
13:44 perlpilot m: sub foo is nodal {};  say &foo.nodal
13:44 camelia rakudo-moar b386963a3: OUTPUT: «True␤»
13:44 perlpilot m: sub foo {};  say &foo.nodal;  # for completeness  :)
13:44 camelia rakudo-moar b386963a3: OUTPUT: «No such method 'nodal' for invocant of type 'Sub'␤  in block <unit> at <tmp> line 1␤␤»
13:45 perlpilot oh, that's interesting
13:45 raschipi m: sub foo {};  say &foo.?nodal;
13:45 camelia rakudo-moar b386963a3: OUTPUT: «Nil␤»
13:45 perlpilot yeah, do that :)
13:48 japanoise joined #perl6
13:49 japanoise Hi, I'm doing an article on programming languages. I'm interested in if anyone knows of a big killer-app written in p6. Something that would make it essential to have a p6 environment installed. In the spirit of this article: http://prog21.dadgum.com/35.html
13:51 tyil does perl 6 itself count? ;)
13:51 japanoise no
13:51 tyil :(
13:51 japanoise self-hosting is a requirement to be a respectable language, not an interesting project
13:51 wamba joined #perl6
13:52 raschipi Perl6 isn't self-hosted either...
13:52 perlpilot japanoise: there are no big anything written in Perl 6 yet that I'm aware of.
13:52 raschipi yet
13:52 Altreus get on with it then
13:52 japanoise hmmm, dang, thanks for the help perlpilot and raschipi. I'll lurk in case someone else knows of one
13:53 telex joined #perl6
13:56 raschipi Well, not public software anyway.There is someone who runs a radio on Perl6, but they won't release it. I don't even see why a language should have any focus on public software to be considered interesting.
13:56 timotimo Cro has the potential to be pretty killer
14:02 Mrofnet joined #perl6
14:03 DrForr japanoise: No need to sit around waiting, go out there and do the big thing! :)
14:04 tyil most things that need a big project already have one, no need to duplicate an existing big project just so we can say its doable in perl 6 I think
14:05 Juerd https://stackoverflow.blog/2017/10/31/disliked-programming-languages/  # painful
14:05 jnthn Successful big projects don't usually just appear out of nowhere. They tend to grow out of small projects. :)
14:06 mspo yeah who are all of these people explicitly hating on perl?
14:08 Juerd mspo: I like to think they're all beginning programmers who feel intimidated by its power, but I fear it's a rather widespread hate.
14:08 tpoikela joined #perl6
14:08 Juerd Explicit Perl hate has been going on for several years now, at least in the European hackerspaces and hacker congresses that I've visited.
14:10 jdv79 why is forking a bad idea in rakudo?  i believe i remember someone said that the other day.
14:10 ugexe because it’s multi threaded
14:11 wander perlpilot, thank you
14:12 DrForr Juerd: I've seen it in person as well at Open Source Days.
14:13 tpoikela anyone had issues with 'perl6 -c' being stuck on lengthy grammar file?
14:14 jnthn jdv79: Because the forked child will be missing all but one of its threads, and so will usually deadlock in short order (like, the next time it tries to GC and wants to sync the threads up).
14:14 DrForr tpoikela: I've had issues but not with the -c file, and not in a while.
14:14 DrForr s/file/flag/
14:16 Juerd DrForr: I almost cried when thousands of attendees cheered at this slide https://pbs.twimg.com/media/CXby58QU0AEoYGD.jpg
14:16 tpoikela If I introduce a syntax error, it's flagged correctly. Once I correct the syntax, 'perl -c' does not finish in ~5 mins
14:17 Juerd ^ from 32c3 presentation "The Perl Jam 2" by Netanel Rubin, full talk at https://media.ccc.de/v/32c3-7130-the_perl_jam_2
14:17 Juerd Beware, it's a rather hateful presentation.
14:17 DrForr I'm not surprised.
14:17 aindilis joined #perl6
14:18 Juerd But, it was one of the most popular talks of that congress and I think it's wise if the Perl community (or communities?) stopped ignoring this...
14:18 Juerd It's also the primary reason why I think Perl 6 has a much better chance of survival with a different name.
14:19 DrForr Oh, it's *that* speech. Arse acts as if 15-year-old barely-perl4 code is modern Perl.
14:19 El_Che Juerd: we learnt to ignore trolls
14:20 El_Che (while I agree about the naming, for other reasons)
14:22 sjn Juerd: I actually talked about those talks at GPW in Nüremberg last year. Even there, a lot of people weren't aware about that presentation
14:22 jdv79 jnthn: that seems odd but ok.  i thought there was a way to fork off and retain all threads.
14:23 raschipi jdv79: There's no such thing.
14:24 jdv79 oh, i guess its just a solaris thing
14:24 Juerd sjn: Good illustration of the divide between the Perl community and the larger software hacking community.
14:25 jdv79 i never tried it but i vaguely remember somthing about it.  but ok.  just curious.
14:26 Juerd If Perl 6 (and 5, for that matter) is to be a success outside our echo chamber, I think these trolls should be addressed instead of ignored, but that doesn't seem to be a popular opinion.
14:27 raschipi In Solaris you'll have to use their interfaces exclusively to get that feature. I think there's not much interest in a non-portable runtime.
14:28 troys joined #perl6
14:28 sjn Juerd: I'd love to hear your opinions on my talk, btw. :) https://www.youtube.com/watch?v=tpOZCTBvs70
14:29 Cabanossi joined #perl6
14:30 DrForr Well, I know I didn't get much traction at Open Source Days or DevDays Vilnius - Copenhagen was only worth meeting friends really, and if Vilnius weren't paid for I wouldn't have gone.
14:32 Juerd sjn: I will watch it and let you know later
14:37 AlexDaniel joined #perl6
14:37 AlexDaniel .u 🕷
14:38 yoleaux No characters found
14:38 AlexDaniel u: 🕷
14:38 unicodable6 AlexDaniel, U+1F577 SPIDER [So] (🕷)
14:41 Ven joined #perl6
14:45 TheGrimFandango joined #perl6
14:46 mempko joined #perl6
14:47 TheGrimFandango joined #perl6
14:48 zakharyas joined #perl6
14:53 cgfbee joined #perl6
14:53 M-Illandan joined #perl6
14:53 ugexe Juerd: i think some rather address the trolls with implementation than superficial issues like name (where changing it will not result in less trolls, only different ones)
14:54 mack[m] joined #perl6
14:54 [Coke] When I talk with other developers, I usually include "yes, the name is definitely confusing, but try the actual language, it's amazing."
14:55 mspo "types are cool but sigils are not"
14:56 mspo "symbols are hard to understand but whitespace is easy to see"
14:59 mspo "I don't know what CGI is"
14:59 mspo ;)
15:01 DrForr Hey, we just had someone here this morning saying that they were learning programming with Perl 6.
15:04 Juerd ugexe: I personally know several people who don't want to even try the implementation because it's Perl, and they don't want to be a Perl programmer because Perl is dead, sucks, etc.
15:05 jdv79 that's harsh
15:05 Juerd ugexe: It may be superficial, but its effect has worried me for a decade and continues to do so.
15:05 ugexe and yet we also have recent interviews with people like Garu who have stated people are showing up to Perl meetings because of Perl 6. Which is what i've personally always idealized
15:05 Juerd ugexe: And during that decade I've only seen confirmation of the effects.
15:06 mspo there are stigmas for groups
15:06 mspo they're never going away.  You're either on-trend or not.
15:07 Juerd In any case, StackOverflow presents us with the clear statistic that among their users, Perl seems to be the most disliked programming language
15:08 lizmat well, it's the most in something then, as Zoffix tweeted  :-)
15:08 timotimo i read the article a bit
15:08 Juerd That's not trolling, and there may be statistical biases (positive interpretation: at least everybody knows Perl exists).
15:08 timotimo there's also the possibility that people who used to work with X will put X in their "disliked technologies" box if they simply "moved on"
15:09 AlexDaniel I thought it simply means that people don't want to deal with it
15:09 wander m: my $neighbors = ((-1, 0), (0, -1), (0, 1), (1, 0)); my $p = (2, 3); say $neighbors »»+«» ($p, *);
15:09 camelia rakudo-moar 237762472: OUTPUT: «((1 3) (2 2) (2 4) (3 3))␤»
15:09 AlexDaniel squashable6: next
15:09 squashable6 AlexDaniel, ⚠🍕 Next SQUASHathon in 1 day and ≈18 hours (2017-11-04 UTC-12⌁UTC+14). See https://github.com/rakudo/rakudo/wiki/Monthly-Bug-Squash-Day
15:09 mspo I didn't realize there were enough perl jobs left to distriminate so actively
15:09 mspo but it's a damning post nevertheless
15:10 wander interesting, how does, in the world, chaining hyper work
15:10 mspo I'm positive very few of those people have ever worked with perl but oh well
15:10 wander m: my $neighbors = ((-1, 0), (0, -1), (0, 1), (1, 0)); my $p = (2, 3); say $neighbors »»+«» ($p);
15:10 camelia rakudo-moar 237762472: OUTPUT: «((1 2) (3 2) (2 3) (4 3))␤»
15:11 DrForr You could easily turn it around and say "I don't want admin work, and Perl keeps showing up for those, so adding 'perl' to the Dislike column filters out admin work." Probably too long to be viable.
15:12 timotimo haha
15:12 Juerd DrForr: Sure, spin it any way you feel comfortable with...
15:12 DrForr Shrug.
15:13 AlexDaniel m: my $neighbors = ((-1, 0), (0, -1), (0, 1), (1, 0)); my $p = (2, 3); say $neighbors »»»»»+»»»»» ($p, *);
15:13 camelia rakudo-moar 237762472: OUTPUT: «((1 3) (2 2) (2 4) (3 3))␤»
15:13 AlexDaniel cool
15:14 Juerd AlexDaniel: Whoa, that line would need a 12 line comment block to explain what it does :)
15:17 [Coke] isn't that the same as »+» ?
15:17 DrForr It's now made it to The Register - https://t.co/4txaClU0jS
15:18 lizmat "Take from this what you may: it's perhaps worth noting that The Register proudly runs on Perl."
15:19 mspo the fact that ruby has fallen so quickly is just a show how weird this survey is
15:19 timotimo on the register survey perl is barely ahead of VB and Java
15:20 tyil >people who've never used perl and hear other people who've never used perl talk negatively on perl, say perl is bad
15:20 tyil nothing new to me
15:21 pmurias joined #perl6
15:22 AlexDaniel DrForr: and on that page in the survey people hate perl as much as they hate Java and Visual Basic
15:22 wander [Coke], it's the same, but `say $neighbors »»+«» ($p);` means?
15:22 timotimo java is doing very well, though, in total
15:24 tyil DrForr: would've been nice if they'd show some cleaner code in the article tbh
15:28 callyalater joined #perl6
15:29 DrForr tyil: People that write clean code are inside the echo chamber, most others see Matt's Script Archive-level code.
15:29 pmurias Juerd: on the positive side that means Perl is 80% liked?
15:29 lizmat japh's and obfuscated Perl code contests didn't help either  :-(
15:30 ugexe visual basic has 80% dislike but is in a different table
15:33 mspo it's not like most python code rolling around is any good :)
15:34 wander .ask AlexDaniel can you please explain how `$neighbors »»+«» ($p, *)` executes?
15:34 yoleaux wander: I'll pass your message to AlexDaniel.
15:36 raschipi joined #perl6
15:38 AlexDaniel wander: actually I don't know. Seems like * is not needed and it works if you pass ($p,)
15:38 yoleaux 15:34Z <wander> AlexDaniel: can you please explain how `$neighbors »»+«» ($p, *)` executes?
15:39 AlexDaniel wander: and also the inner »« make no difference, at least in this case
15:39 [Coke] I'm not sure what we can do to help people like our language other than make a great language. we're not going to get that far away from the name, so anyone who hates perl can still hate us even if the front door has a piece of paper taped over the word perl.
15:39 tyil [Coke]: just create nice projects and show the power of perl I guess
15:40 AlexDaniel we can actually have a usable alternative name if we stop the internal naysaying
15:41 wander Grammar is quite powerful in my recent tasks :)
15:41 [Coke] AlexDaniel: Sure, just give us a name that we can all agree on.
15:41 AlexDaniel 6lang
15:41 raschipi can't start with a digit
15:41 AlexDaniel it can.
15:41 [Coke] I would prefer not.
15:41 raschipi TIMTOWDY said no digits
15:42 raschipi starting with digits makes it an invalid identifier
15:42 AlexDaniel who said that it has to be a valid identifier
15:42 tyil not in perl 6
15:42 tyil :'D
15:42 tyil or does it
15:42 AlexDaniel and that you cannot use sixlang where it really has to
15:43 wander slang, XD
15:43 lizmat "Perl Reinvented"  # how's that for a name  :-)
15:43 tyil lizmat: sounds like perl++
15:43 tyil but then we have the bad connotations of perl AND c++
15:43 raschipi Larry Wall said it has to be a valid identifier
15:43 wander lol
15:43 sjoshi joined #perl6
15:43 [Coke] I still don't agree with the premise that calling it something other than Perl 6 is actually going to be beneficial on the whole. You're certainly not going to win over anyone who already hates it just because it's *called* Perl. It's still a perl, even if you call it something else.
15:43 AlexDaniel it doesn't have to be a valid identifier. I said that.
15:43 raschipi that means you're wrong
15:43 AlexDaniel /o\
15:44 lizmat "Same Old Wine In A Brand New Bottle"  # naysayers argument
15:44 tyil I think we could better spend our time working on projects showing the cool perl 6 stuff
15:44 tyil instead of debating what to call it
15:44 [Coke] lizmat: right.
15:44 lizmat agree
15:44 AlexDaniel [Coke]: I have these conversations all the time. “What did you use to do that?” “Perl 6” “Huh, *perl*…”
15:44 [Coke] I get that on the surface it seems like it'll help, but I remain unconvinced.
15:45 AlexDaniel give me something that has no “perl” in it and it will solve the confusion
15:45 tyil japanoise was looking for a cool perl 6 project, but we don't have any, instead we're here arguing how to call it
15:45 tyil instead of making that project
15:45 [Coke] AlexDaniel: Sure, me too. And I then have a conversation about it.
15:45 raschipi besides, no one can even convince the others, how are they going to convince TimToady who still prefers Perl6?
15:45 AlexDaniel [Coke]: I'd much rather not have a conversation about a goddamn name and how we got here
15:46 AlexDaniel raschipi: TimToady seems to be fine with the idea of having alternative marketable name
15:46 AlexDaniel raschipi: or at least that's how I understood it.
15:46 [Coke] I only see those conversations getting more involved once there's a name change.
15:46 raschipi Well, to have an effect we would have to hide Perl6.
15:46 tyil do we?
15:46 AlexDaniel we don't.
15:47 tyil or do we just need to show how awesome it is?
15:47 tyil and then reveal the name?
15:47 pmurias AlexDaniel: are you having those conversations while talking with real people or on reddit etc.?
15:47 AlexDaniel pmurias: real life
15:47 tyil if you can show something cool, and make people ask "what lang is that", and you can say its perl 6, people will have no issues with it
15:47 TheGrimFandango joined #perl6
15:48 DrForr Then to misquote a T-shirt, "F*ck up some code."
15:48 perlpilot tyil: it would be neat if someone did presentations like that (with a name reveal at the end) at varioius conferences.
15:49 perlpilot *various
15:49 tyil perlpilot: if I were any good at presenting and perl I'd consider it
15:49 TheGrimFandango joined #perl6
15:49 AlexDaniel fwiw https://6lang.org
15:49 eliasr joined #perl6
15:50 domidumont joined #perl6
15:51 tyil now we have 3 different domains all pointing to the same resource
15:51 mr-foobar joined #perl6
15:51 tyil that'll confuse more than solve the issue I think
15:51 AlexDaniel what's the third?
15:51 tyil didnt rakudo get its own domain as well for it?
15:52 AlexDaniel rakudo is a compiler, 6lang is a language
15:52 kyan joined #perl6
15:52 tyil except some use Rakudo to refer to the language as well now
15:52 AlexDaniel hopefully not
15:52 lizmat I think we need to rephrase Godwin's law: "As an on-line discussion grows longer, the probability of a comparison involving the naming of Perl 6 approaches 1.
15:52 tyil this entire naming debate only fractures the community further and makes things more confusing for possible new perlers
15:52 lizmat "
15:53 AlexDaniel but I'm saying that there we have it, a domain name that's already ours, with a name that's unique enough to be googlable, short and rememberable to be marketable, etc. etc.
15:53 tyil and one that still not everyone agrees with
15:53 AlexDaniel and then I see this nonsense about it not being a valid identifier. Out of all issues, is it really worth considering?
15:53 TheGrimFandango joined #perl6
15:53 pmurias one could argue that Rakudo actually implements the Rakudo language not Perl 6 as roast which is supposed to be the spec has loads of fudges (sometimes even for things that are contradictory/don't make sense)
15:54 tyil all I want is for people to stop arguing about the name tbh
15:54 tyil and just make something cool
15:54 [Coke] I could care less about the identifier. Don't particularly care for it.
15:54 [Coke] tyil: well, this is the wrong project for that. :)
15:54 tyil :(
15:54 [Coke] we've been arguing about it for 17 years already.
15:55 [Coke] (out for lunch, later!)
15:55 tyil then its a good time to stop :)
15:55 TheGrimFandango joined #perl6
15:55 AlexDaniel yeah, we now finally switched to “master”, there's a usable issue tracker for those who can't work with RT, maybe it's time to actually do something about the name
15:56 perlpilot AlexDaniel: like ... leave it alone?  :>
15:56 AlexDaniel perlpilot: that doesn't solve the every day problem I have
15:56 AlexDaniel which is “perl 6” being confused with perl (5)
15:57 tyil AlexDaniel: I understand your problem, I am facing it at almost every meetup myself, but if we can just show something cool we made and then reveal its perl 6, that'd work a lot better than starting to talk about it and all the cool stuff you could do with it, but nobody does
15:57 domidumont joined #perl6
15:57 AlexDaniel I do something cool with perl 6 all the time, people still remember that I've done it with “perl”
15:58 AlexDaniel and I don't have 10 minutes every time to explain why it's “6”
15:58 tyil write it down on a card and hand it out :p
15:59 jdv79 are the differences tween package, module, and class doc'd?
15:59 COMBORICO joined #perl6
15:59 jdv79 i can't find it on the docs site
16:00 AlexDaniel fwiw I was against any other name for a long time, until I started facing this damn issue on regular basis
16:00 AlexDaniel so for everyone who is against alternative names – go and talk to people about perl 6 and see how it works out.
16:00 tyil I was in favor of changing the name for a while, but then I realized there's other issues around
16:00 cdg joined #perl6
16:00 tyil I know people will look weird when you mention "perl" and they ignore the number you say after it
16:01 tyil but as japanoise pointed out perfectly today, there's nothing good around to show the cool tricks you can pull off with perl 6 yet
16:01 TheGrimFandango joined #perl6
16:02 tyil and I think having something like that would do much more good to the entire naming debacle than constantly trying to change the name
16:02 wander tyil, NQP is a cool project
16:03 TheGrimFandango joined #perl6
16:03 wander today I introduce it to my friends, especially it describes grammar using Grammar in Grammar.nqp and Actions.nqp
16:05 DrForr Grammars are what I usually tout as well in talks.
16:05 cdg_ joined #perl6
16:06 wander maybe not something, people say, "practical", but it is awesome
16:06 timotimo tyil isn't very useful for people though
16:06 perlpilot In the (very few) production things I've done with Perl 6, grammars are the reason I used Perl 6
16:07 timotimo rpython is also a pretty amazing project, but apart from the pypy devs it's not useful (topaz is kind of dead? was it hiphop that used rpython or was it another one?)
16:07 tyil timotimo: ?
16:07 tyil I'm not useful? :(
16:07 TheGrimFandango joined #perl6
16:08 lizmat tyil: pretty sure timotimo either forgot a colon or tabbed wrong
16:08 timotimo lol
16:08 timotimo wat
16:08 timotimo im eant nqp
16:08 tyil I'm still hurt
16:08 timotimo no, tyil, you're perfect
16:08 lizmat huggable hug tyil
16:08 lizmat hmmm...
16:08 timotimo .hug tyil
16:08 * huggable hugs tyil
16:08 lizmat ah
16:08 tyil \o/
16:08 mcmillhj joined #perl6
16:09 pmurias technically NQP isn't written in Perl 6
16:09 TheGrimFandango joined #perl6
16:09 timotimo IMO moarvm is also a cool project, but it's not of much use to anybody outside the perl6 community
16:09 tyil I thought perl 6 was written in perl 6
16:09 perlpilot tyil: it is ... sorta
16:09 moritz tyil: the high-level bits are
16:09 COMBORICO1611 joined #perl6
16:10 perlpilot tyil: also, NQP is a subset of Perl 6 with a few extra constraints and it's own bit of weirdness.
16:10 tyil Ive used nqp once to get some performance gain
16:10 tyil but it didnt make the code prettier :p
16:11 timotimo that's just low-level ops you're putting into perl6 code, though
16:11 timotimo at least i assume that's what you did
16:11 tyil I did it on advice of my gf
16:11 timotimo nqp:: isn't an entirely accurate name for those ops
16:11 tyil she's better at perl than me
16:12 timotimo it's true, when you use nqp:: ops directly you save on a lot of overhead from mediocre code-gen
16:12 timotimo that's also why JSON::Fast uses so many nqp:: ops
16:12 * AlexDaniel is reminded of https://github.com/MasterDuke17/Text-Diff-Sift4/commit/524f98cdc95c3dc0d982c0ce0782406c61e4a772
16:12 timotimo but almost all nqp::blah ops map directly to a moarvm opcode rather than a sub written in "actual" nqp
16:12 tyil timotimo: c-could you merge te PR to sort the keys when using to-json
16:13 timotimo oh
16:13 timotimo i totally forgot about that :o
16:13 COMBORICO1611 For regex character class proper use of + quantifer, should it be /   \d/+   / or /   \d+   /
16:13 timotimo it's \d+
16:14 tyil :>
16:14 COMBORICO1611 Naughty Rosenfield, a typo.
16:14 perlpilot COMBORICO1611: why would you think it's the first one?
16:14 COMBORICO1611 A typo in a beginner's book.
16:14 wander oops
16:14 tyil thats a pretty big typo :(
16:14 wander I thought it's my fault just now
16:15 wander since recently I update regex doc some times
16:16 CcS_ joined #perl6
16:16 COMBORICO1611 Thanks for the help on that typo.  Back to the book.
16:17 TheGrimFandango joined #perl6
16:17 wander cro may be a practical project. someone introduced it to me a few days ago
16:18 raschipi it's in beta, otherwise it would count
16:19 TheGrimFandango joined #perl6
16:19 wander yes
16:21 moritz \o
16:21 TheGrimFandango joined #perl6
16:21 jdv79 what's the currying syntax again?
16:22 rindolf joined #perl6
16:22 moritz you mean * + 5 ?
16:22 jdv79 partial func application
16:22 timotimo .assuming
16:22 jdv79 ah
16:23 khw joined #perl6
16:23 TheGrimFandango joined #perl6
16:23 jdv79 thanks!
16:23 timotimo sure
16:23 jdv79 i thought it started with a but that was all i had
16:24 timotimo looking for methods on Code or so might have been a useful hint
16:24 timotimo m: say Code.^methods
16:24 camelia rakudo-moar 87e872020: OUTPUT: «(<anon> <anon> <anon> <anon> <anon> <anon> arity count signature prec outer static_id file line of returns Capture ACCEPTS Str new perl BUILDALL)␤»
16:24 timotimo m: say Code.^methods>>.name
16:24 moritz m: say Routine.^methods
16:24 camelia rakudo-moar 87e872020: OUTPUT: «(<anon> <anon> <anon> <anon> <anon> <anon> arity count signature prec outer static_id file line of returns Capture ACCEPTS Str new perl BUILDALL)␤»
16:24 camelia rakudo-moar 87e872020: OUTPUT: «(<anon> <anon> <anon> <anon> <anon> <anon> <anon> <anon> <anon> <anon> <anon> <anon> <anon> <anon> <anon> <anon> onlystar candidates cando multi soft wrap unwrap yada package leave perl BUILDALL fire_if_phasers add_phaser has-phaser phasers WHY set_wh…»
16:24 timotimo ok, not on Code, then?
16:25 timotimo Block has it
16:25 setty1 joined #perl6
16:25 timotimo m: say Block.^methods
16:25 camelia rakudo-moar 87e872020: OUTPUT: «(<anon> <anon> of returns add_phaser fire_if_phasers fire_phasers has-phasers has-phaser phasers assuming WHY set_why pos perl BUILDALL <anon> line <anon> prec perl <anon> file of ACCEPTS <anon> <anon> count signature Str <anon> arity returns Capture …»
16:25 timotimo m: say Block.^methods.sort
16:25 camelia rakudo-moar 87e872020: OUTPUT: «Method object coerced to string (please use .gist or .perl to do that)␤  in block <unit> at <tmp> line 1␤Method object coerced to string (please use .gist or .perl to do that)␤  in block <unit> at <tmp> line 1␤Method object coerced to string (…»
16:25 timotimo haha
16:25 timotimo m: say Block.^methods.sort(*.name)
16:25 camelia rakudo-moar 87e872020: OUTPUT: «(<anon> <anon> <anon> <anon> <anon> <anon> <anon> <anon> ACCEPTS BUILDALL BUILDALL Capture Str WHY add_phaser arity assuming count file fire_if_phasers fire_phasers has-phaser has-phasers line new of of outer perl perl phasers pos prec returns returns…»
16:25 timotimo not helping :P
16:25 raschipi What are all those anonymous methods?
16:27 timotimo m: (.file, .line).say for Block.^methods
16:27 camelia rakudo-moar 87e872020: OUTPUT: «No such method 'file' for invocant of type 'ForeignCode'␤  in block <unit> at <tmp> line 1␤␤»
16:27 timotimo oh, hmm
16:27 timotimo m: (try (.file, .line).say) for Block.^methods
16:27 camelia rakudo-moar 87e872020: ( no output )
16:28 timotimo that's not how, them?
16:30 raschipi (.?file, .?line).say for Block.^methods
16:30 raschipi m: (.?file, .?line).say for Block.^methods
16:30 camelia rakudo-moar 87e872020: OUTPUT: «(Nil Nil)␤(Nil Nil)␤(SETTING::src/core/Block.pm 6)␤(SETTING::src/core/Block.pm 7)␤(SETTING::src/core/Block.pm 9)␤(SETTING::src/core/Block.pm 29)␤(SETTING::src/core/Block.pm 40)␤(SETTING::src/core/Block.pm 47)␤(SETTING::src/core/Block.p…»
16:30 CcS__ joined #perl6
16:31 COMBORICO1611 Is the following a typo for regex character-class:     /   (<[\d.-]>+)   /
16:32 wander m:  /   (<[\d.-]>+)   /
16:32 camelia rakudo-moar 21efe96ff: ( no output )
16:32 wander m: / \d/+/
16:32 camelia rakudo-moar 21efe96ff: OUTPUT: «5===SORRY!5===␤Regex not terminated.␤at <tmp>:1␤------> 3/ \d/+/7⏏5<EOL>␤Regex not terminated.␤at <tmp>:1␤------> 3/ \d/+/7⏏5<EOL>␤Unable to parse regex; couldn't find final '/'␤at <tmp>:1␤------> 3/ \d/+/7⏏5<EOL…»
16:32 wander seems not
16:32 wander m: say "42..--12" ~~  /   (<[\d.-]>+)   /
16:32 camelia rakudo-moar 21efe96ff: OUTPUT: «「42..--12」␤ 0 => 「42..--12」␤»
16:32 COMBORICO Does it look normal?
16:33 wander ^^ that is it
16:33 Ven joined #perl6
16:33 COMBORICO Thanks!
16:34 wander yes, maybe you can look up on regexes doc
16:34 wander as for this
16:34 wander https://docs.perl6.org/language/regexes#Enumerated_character_classes_and_ranges
16:34 COMBORICO Back to book.
16:39 ugexe AlexDaniel: I have talked to people are about Perl 6 all the time. And it wouldn't surprise me if some of them have finally started implementing some Perl 6 in production for CLI tools (their idea)
16:39 TheGrimFandango joined #perl6
16:40 AlexDaniel ugexe: did it include a 5-minute lecture to deconfuse perl5 and perl 6?
16:40 ugexe no
16:40 jdv79 This type (NQPMu) does not support associative operations
16:40 AlexDaniel so how did they know that perl5 and perl 6 are different languages?
16:41 Bucciarati joined #perl6
16:41 TheGrimFandango joined #perl6
16:41 ugexe i didn't ask, same as I wouldnt ask why someone knows the difference between C and C++
16:42 AlexDaniel when they were talking about it, did they say “perl” or “perl 6”? :)
16:42 ugexe perl 6
16:42 wander p6, in my situation
16:43 raschipi This confusion looks like people confusing C and C++ or Java and Javascript, it's immaterial.
16:43 ugexe one of the biggest gripes, camelia, went away at my last gig when they saw the plushie even
16:43 Aaronepower joined #perl6
16:44 wander jdv79, what is the code causes this exception?
16:44 Cabanossi joined #perl6
16:44 AlexDaniel ugexe: not sure how this is possible. Let me know if you figure it out
16:45 ugexe figure what out?
16:45 jdv79 got that when i tried to .assuming() a sub
16:45 jdv79 but i can't golf it; again
16:45 AlexDaniel how you can possible approach someone with some programming experience, talk to them about perl 6 and not have perl 6 confused with perl5
16:46 AlexDaniel y
16:46 ugexe AlexDaniel: ive worked with senior developers for awhile now
16:46 ugexe as in: im not talking to people with little to no programming experience
16:46 AlexDaniel and?
16:46 wander I've face that exception few days ago :)
16:46 ugexe and i dont know what your point is
16:47 timotimo tyil: added tests and docs to :sorted-keys and uploaded to cpan
16:47 raschipi Just tell them: "it's like java and javascript, two different languages", done.
16:47 AlexDaniel it's like if we created a new language called “python 4” and then you come up to a random senior developer and talk to him how cool “python 4” language is, and he never confuses it with the real python language. I don't get it.
16:47 timotimo JavaSixpt
16:48 AlexDaniel java and javascript are different languages, that's easy. Perl 5 and Perl 6 are different languages? That's a bit harder.
16:48 ugexe these aren't random senior developers
16:48 tyil timotimo: awesome, thanks!
16:48 AlexDaniel so they already knew about perl 6? OK cool.
16:48 raschipi "Perl 5 and Perl 6 are different languages?" You mean they aren't or that it's difficult to explain?
16:49 AlexDaniel raschipi: it's difficult to explain.
16:49 ugexe im responding to and countering all the things you keep attempting to make sound improbable
16:49 lizmat "Perl Reboot"
16:49 lizmat seems to be popular in the film business nowadays
16:51 AlexDaniel ugexe: it's not about things being probable or improbable. We have a problem and I'd love to have a solution for it. But if you never experienced problems with “perl 6” as a name then I'd say that it is improbable, yes
16:51 TheGrimFandango joined #perl6
16:51 ugexe "so for everyone who is against alternative names – go and talk to people about perl 6 and see how it works out."
16:51 AlexDaniel yeah
16:51 ugexe you are saying things like this. i respond, and you do not like the response
16:52 mcmillhj_ joined #perl6
16:52 AlexDaniel well why not, I like it.
16:52 ugexe because you are framing the situation
16:53 TheGrimFandango joined #perl6
16:53 AlexDaniel I was trying to understand how come you not noticed the issue, and I didn't really understand what happened there (and if the issue was there in these particular cases)
16:53 * AlexDaniel shrugs
16:54 AlexDaniel so you talked to people about “perl 6” and it was fine. OK I guess?
16:55 ugexe there you go again
16:56 buggable New CPAN upload: JSON-Fast-0.9.6.tar.gz by TIMOTIMO https://cpan.metacpan.org/authors/id/T/TI/TIMOTIMO/Perl6/JSON-Fast-0.9.6.tar.gz
16:57 lizmat "Perl 6 skates to where the puck is going to be, not where it has been"
16:59 TheGrimFandango joined #perl6
16:59 jdv79 i don't get it.  ll-exception says its coming from Block.pm line 200 which is an eval
16:59 jdv79 i think i'll not use assuming() then for now
17:01 TheGrimFandango joined #perl6
17:01 domidumont joined #perl6
17:06 COMBORICO1611 I just want to confirm I am following the statement properly:     say    "foobar"    ~~    /   foo  <?before  bar>   /;      This reads in English as, "Say 'foo' if 'foobar' smart-matches the character-class, which instructs 'foo' must be before 'bar."  Is this correct?
17:06 Zoffix joined #perl6
17:06 Zoffix jdv79: what's the code that produces the error?
17:07 jdv79 i can't golf it.  it seems to be something about the context.
17:08 zakharyas joined #perl6
17:08 Zoffix COMBORICO1611: s/character-class/regex/; and it'd be right
17:08 jdv79 i can golf it in situ which is weird but the enclosing context is - i hhave no idea
17:08 Zoffix COMBORICO1611: character class is one of the elements of regex that matches a class of characters, e.g.: <[abc]>
17:09 COMBORICO1611 What is s/character...?
17:09 Zoffix COMBORICO1611: s/foo/bar/ in programmers' speak means "replace 'foo' with 'bar'"
17:10 Zoffix COMBORICO1611: it comes from there being a substitution operator in awk(?)/perl/rakudo
17:10 COMBORICO1611 Mmm, I don't think this intention is to replace, but to produce a  string if there is a match.
17:10 Zoffix m: my $stuff = "character-class meows"; $x ~~ s/"character-class"/foos/; say $x
17:10 camelia rakudo-moar 21efe96ff: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Variable '$x' is not declared␤at <tmp>:1␤------> 3my $stuff = "character-class meows"; 7⏏5$x ~~ s/"character-class"/foos/; say $x␤»
17:10 Zoffix m: my $stuff = "character-class meows"; $x ~~ s/"character-class"/foos/; say $stuff
17:10 camelia rakudo-moar 21efe96ff: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Variable '$x' is not declared␤at <tmp>:1␤------> 3my $stuff = "character-class meows"; 7⏏5$x ~~ s/"character-class"/foos/; say $st␤»
17:10 raschipi it's from sed originally
17:10 Zoffix m: my $stuff = "character-class meows"; $stuff ~~ s/"character-class"/foos/; say $stuff
17:10 camelia rakudo-moar 21efe96ff: OUTPUT: «foos meows␤»
17:11 COMBORICO1611 I believe you are referring to a different operation.  The title of the section in the book where the example comes from is Look-around Assertions
17:11 Zoffix COMBORICO1611: it's just a colloquialism. What I meant is your description is correct, other than what you called a "character class" is called a "regex"
17:11 COMBORICO1611 OH.
17:12 Zoffix Unless I'm misunderstanding what you said :)
17:12 releasable6 joined #perl6
17:13 COMBORICO1611 How about if I say, " . . . if 'foobar' smart-matches the character-class of Regex, which instructs . . . "?
17:13 mspo u: 🐳
17:13 unicodable6 mspo, U+1F433 SPOUTING WHALE [So] (🐳)
17:16 eater joined #perl6
17:17 callyalater A perl by any other name would code as sweet.
17:19 TheGrimFandango joined #perl6
17:19 COMBORICO Heh
17:20 SCHAPiE joined #perl6
17:21 TheGrimFandango joined #perl6
17:21 El_Che lo
17:22 APic Yo
17:23 domidumont joined #perl6
17:23 TheGrimFandango joined #perl6
17:25 Zoffix Anyway. Stopped by to comment on the naming discussion that I missed: the community fracturing that was mentioned can be avoided if people on each side of the issue don't merely ignore what the other side is saying. It's perfectly probably that one person will have only positive experiences from using "Perl 6" name, while another experiences only negative. The proposition of the naming debate is this: "A new
17:25 Zoffix name will solve some of the challenges having 'Perl' in the name presents, such as reaching an audience who would love the language, but don't even reach the point of trying Rakudo Perl 6 because they think it's THE "perl" some of their mates were slagging off at some conf they attended". There exist both people who think the name change won't accomplish that goal and those who think "Perl 6" carries benefit.
17:25 Zoffix So we're NOT CHANGING the name. We're introducing an ALIAS to the name. So the group that likes or benefits from "Perl 6" name can continue using it, while the group that wants to prove the given proposition as true can go ahead and do so. Lastly, the subject of what the alias itself should be: I've seen dozens and dozens of proposals with dozens and dozens of Yay and Nay votes for them. It's highly unlikely
17:25 Zoffix any particular name would have a concensus giving the naming issue itself is contentious, so we'll collect some of the prominent suggestions and present them to TimToady during 6.d release for him to pick or invent one of his own and that will be the alias. This might not be the ideal outcome the proposition-proving side might be looking for, but since it's them who have to prove something, they will have to
17:25 Zoffix compromise and work with what's given to them. So to summarize: the focus of the current issue is creating a name *ALIAS* not a new name; people who don't like the idea; can continue to use the "Perl 6" name; our Dictator will dictate during 6.d release what the alias name should be.
17:25 TheGrimFandango joined #perl6
17:27 TheGrimFandango joined #perl6
17:27 Zoffix s/perfectly probably/perfectly probable/; s/concensus giving the/concensus given the/; s/idea; can/idea can/;
17:27 Zoffix :)
17:28 Piotr_ joined #perl6
17:29 COMBORICO As a complete beginner to Pro with a week under my belt, but adequately aware of the Perl6 name issue, I totally agree with your position.
17:29 COMBORICO Pro is Perl.
17:29 TheGrimFandango joined #perl6
17:29 Zoffix \o/
17:30 COMBORICO I like the article that guy wrote that promoted the name Rakudo.
17:31 COMBORICO If you're bored, out of curiosity what are some of the other aliases that have come up?
17:31 TheGrimFandango joined #perl6
17:33 TheGrimFandango joined #perl6
17:35 Zoffix COMBORICO: this article? https://rakudo.party/post/The-Hot-New-Language-Named-Rakudo
17:35 TheGrimFandango joined #perl6
17:36 Zoffix COMBORICO: from memory, the ones that came up: P6, psix, Perl++, Rakudo, Camelia, 6lang, Gloria
17:36 COMBORICO1611 Zoffix, yes.  awk
17:36 Zoffix Yeah, that guy re-kindled the naming debate with that article :)
17:36 El_Che wow
17:37 El_Che huge backlog
17:37 COMBORICO1611 Thumbs down: P6 (really bad), psix (really bad), I actually thought to myself Perl++ but decided against for confusion of a melting of Perl and C++,
17:37 TheGrimFandango joined #perl6
17:37 COMBORICO1611 I only like Rakduo in that list.
17:37 * Zoffix leaves to do $urgent-things
17:37 Zoffix \o
17:37 Zoffix left #perl6
17:38 geekosaur get ++y in a different way: e.g. beryl?
17:38 El_Che COMBORICO1611: Perl++ does Perl 5 a huge disservice
17:39 El_Che one of the reasons to change is that both languages benefit
17:39 COMBORICO I'm a beginner so i don't know. I like Rakudo. AWK
17:39 COMBORICO I agree. Awk
17:39 COMBORICO Lol i mean afk
17:39 COMBORICO (beginner)
17:43 * wander go to bed
17:43 mikey joined #perl6
17:44 Cabanossi joined #perl6
17:45 mikey joined #perl6
17:49 wamba joined #perl6
18:04 wamba joined #perl6
18:10 TheGrimFandango joined #perl6
18:10 COMBORICO joined #perl6
18:14 Cabanossi joined #perl6
18:15 Ven joined #perl6
18:18 cdg joined #perl6
18:22 cdg_ joined #perl6
18:31 cdg joined #perl6
18:38 kyan joined #perl6
18:47 COMBORICO joined #perl6
18:50 COMBORICO Wander, haha.
19:10 mcmillhj joined #perl6
19:24 Ven joined #perl6
19:28 cpage__ joined #perl6
19:28 Cabanossi joined #perl6
19:35 COMBORICO I'm reading this book here, and it says, " toad assertions are useful to specify conditions that cannot easily be expressed as regexes".  Aren't code assertions apart of regex system, or am i missing something?
19:36 COMBORICO Toad = code.
19:36 moritz well, they embed regular code in regex code
19:37 COMBORICO On a side note, here's what's wrong with P6 Alias for Pearl 6. People are going to ask what does P6 stand for, and then you'll say pearl 6. So I argue that P6 is not a true alias.
19:37 raschipi regex is overloaded here, it's both the whole Perl6 construct and the rules system they use.
19:37 moritz more precise would have been "cannot easily be expressed by declarative regex elements"
19:37 moritz but that is *really* nitpicking
19:38 raschipi Pearl is another language.
19:38 COMBORICO To me, his statement makes it sound as if code assertions are separate system from regular expressions.
19:38 COMBORICO Perl, using voice recognition
19:38 El_Che COMBORICO: it is an abrevation
19:39 COMBORICO P6 or regex (both, i know).
19:39 COMBORICO Thanks moritz, I'll add your verbage to my notes.
19:46 callyalater left #perl6
19:47 DickClarke joined #perl6
19:47 COMBORICO m: say "Matched $/" if "A12B34D50" ~~ / (\D) <?{ say ~$0}> \d\d$ /;
19:47 camelia rakudo-moar 5e7dfe52f: OUTPUT: «A␤B␤D␤Matched D50␤»
19:48 timotimo COMBORICO: please note that the regex optimizer might one day decide to start matching this at the D rather than at the A
19:49 timotimo because it knows the width of the match must be 3 and it's supposed to be anchored at the end of the line
19:49 timotimo end of string*
20:00 raschipi In other words, can't rely on the internal works of the regex engine.
20:02 cdg joined #perl6
20:03 cdg_ joined #perl6
20:06 timotimo of course the optimization might bail out if there's a code assertion in play
20:06 COMBORICO Hmm. Interesting.
20:07 timotimo but since <?{ }> cannot move the match around, and is always zero-width, i wouldn't say it should
20:07 timotimo if you want side effects, you can put a bare { } block and that should always execute
20:21 raschipi But it would execute always the same way?
20:24 COMBORICO What is the $0 variable called in regex?  Capture Variable?
20:25 eugene_barsky joined #perl6
20:25 eugene_barsky Hi
20:25 yoleaux 30 Oct 2017 21:57Z <raiph> eugene_barsky: er, hi. (better late than never...) :)  In answer to your SO, aiui, almost anything that makes #perl6 a great place to experience P6 is on topic.
20:25 COMBORICO I understand it's special because it does not need to be declared.
20:26 COMBORICO Hey, Eugene.
20:26 eugene_barsky I've just forgotten to put .slurp before .words and strangely it works:
20:26 eugene_barsky my @words = $file_all.IO.words;
20:26 eugene_barsky Is it normal? :)
20:27 eugene_barsky noticed it after debugging the whole program. :)
20:27 raschipi words will read the file word at a time
20:28 raschipi to avoid putting it all in memory, to deal with large files
20:28 eugene_barsky Is it slower than reading the whole file with slurp and then .words?
20:28 raschipi COMBORICO: $0 is the first positional in the capture
20:28 AlexDaniel squashable6: next
20:28 squashable6 AlexDaniel, ⚠🍕 Next SQUASHathon in 1 day and ≈13 hours (2017-11-04 UTC-12⌁UTC+14). See https://github.com/rakudo/rakudo/wiki/Monthly-Bug-Squash-Day
20:29 Cabanossi joined #perl6
20:29 raschipi I'm going, g'night everyone.
20:29 COMBORICO Wait
20:30 cdg joined #perl6
20:31 geekosaur eugene_barsky, probably a little slower since it['s avoiding loading the whole file into memory. classic time/space tradeoff
20:31 geekosaur https://docs.perl6.org/type/IO::Path#method_words btw
20:31 eugene_barsky geekosaur: thanks, I couldn't find it in the docs!
20:32 eugene_barsky geekosaur: I was looking here https://docs.perl6.org/language/io
20:35 geekosaur yes, that page is a tutorial and doesn't go into detail. the trick here is that .IO is a coercer to an IO::Path object
20:37 geekosaur which is why the page directs you look at the IO role and IO::Path and IO::Handle classes for the real story
20:38 eugene_barsky geekosaur: and of course I missed these redirections :)
20:38 geekosaur right at the top
20:39 eugene_barsky Yes, now I see them. That was silly of me, but I was in a hurry. :)
20:42 eugene_barsky If I have to print a long-long line, how to split it in two lines in the program and not get a newline?
20:42 eugene_barsky say "my very long line my very long line my very long line my very lomy very long line ng line my very long line my very long line my very long line ";
20:42 evalable6 eugene_barsky, rakudo-moar 5e7dfe52f: OUTPUT: «my very long line my very long line my very long line my very lomy very long line ng line my very long line my very long line my very long line »
20:46 geekosaur \ + newline
20:46 geekosaur xxx\
20:46 geekosaur yyy
20:46 geekosaur oh, hm, no
20:46 geekosaur :(
20:46 eugene_barsky It seems I tried that (coming from bash) :)
20:54 evalable6 joined #perl6
21:06 mson joined #perl6
21:09 mempko joined #perl6
21:14 COMBORICO Question: / (a || b)+ / # matches aaaa or bbbb, but not abab, right?
21:15 geekosaur m: say so "abab" ~~ /(a || b)+/
21:15 camelia rakudo-moar 3b4f0c6ce: OUTPUT: «True␤»
21:18 COMBORICO Thanks!
21:21 COMBORICO m: my $str = 'number 42'; say "The number is $0" if $str ~~ / number \s+  (\d+) /;
21:21 camelia rakudo-moar 3b4f0c6ce: OUTPUT: «The number is 42␤»
21:21 El_Che sjn: I saw your talk
21:23 COMBORICO m: say if "abab" ~~ / (a || b)+ /;
21:23 camelia rakudo-moar 3b4f0c6ce: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Unsupported use of bare "say"; in Perl 6 please use .say if you meant to call it as a method on $_, or use an explicit invocant or argument, or use &say to refer to the function as a noun␤at <tmp>:1…»
21:24 COMBORICO The only thing I don't like about this Android IRC program is that you can't copy text.
21:28 eugene_barsky COMBORICO: / (a || b)+ / will match any line with a or b (e.g. addd), because + can mean one letter a or b and the regex has no anchors.
21:29 El_Che Native call is still causing non deterministic fails on the native call tests: https://gist.github.com/nxadm/cd7559b6611f2a921eca34265f546e82#file-non-deterministic-failed-test-L2936 . I thought AlexDaniel told me it was supposed to be fixed (Rakudo 2017.10)
21:30 COMBORICO m: my $str = 'number 42'; say "The number is $/" if  $str ~~ / number \s+ (\d+) /;
21:30 camelia rakudo-moar 3b4f0c6ce: OUTPUT: «The number is number 42␤»
21:30 El_Che (maybe it was someone else)
21:30 COMBORICO Thanks!
21:44 Cabanossi joined #perl6
21:44 niceperl joined #perl6
21:49 Ven joined #perl6
21:55 tbrowder n:
21:55 tbrowder nqp: say
21:55 camelia nqp-moarvm: ( no output )
21:56 tbrowder nqp: sub ch(){}; c();
21:56 camelia nqp-moarvm: OUTPUT: «Cannot invoke this object (REPR: Null; VMNull)␤   at <tmp>:1  (<ephemeral file>:<mainline>)␤ from gen/moar/stage2/NQPHLL.nqp:1542  (/home/camelia/rakudo-m-inst-1/share/nqp/lib/NQPHLL.moarvm:eval)␤ from gen/moar/stage2/NQPHLL.nqp:1779  (/home/camelia/rakudo…»
21:57 tbrowder lizmat: hi
21:57 lizmat tbrowder o/
21:58 tbrowder that looks like an LTA response to me, what do you think?
21:59 geekosaur arguably once you're in nqp-land LTA is no longer a consideration
21:59 geekosaur unless you'd really like to slow down the higher levels
21:59 lizmat tbrowder: yes, in NQP, error messaging has not been a priority
22:01 colomon joined #perl6
22:02 tbrowder argh! i’ve been blindly searching for the cause of a msg like that and FINALLY figured out i had misspelled the name of a sub. s
22:03 tbrowder somethink like “unknown object” would have clued me in faster for sure. shoulf
22:03 masak nqp: c()
22:03 camelia nqp-moarvm: OUTPUT: «Cannot invoke this object (REPR: Null; VMNull)␤   at <tmp>:1  (<ephemeral file>:<mainline>)␤ from gen/moar/stage2/NQPHLL.nqp:1542  (/home/camelia/rakudo-m-inst-1/share/nqp/lib/NQPHLL.moarvm:eval)␤ from gen/moar/stage2/NQPHLL.nqp:1779  (/home/camelia/rakudo…»
22:03 masak tbrowder: golfed it for you :)
22:03 colomon joined #perl6
22:03 tbrowder should i file a bug report?
22:03 tbrowder thnk
22:04 tbrowder thnx, masak
22:04 masak pzh
22:04 lizmat masak o/
22:04 lizmat any thoughts on the Telemetry work ?
22:04 masak as geekosaur and lizmat point out, nqp is not very user-facing
22:05 masak lizmat: haven't been following closely, sorry
22:05 lizmat no pb
22:05 masak lizmat: I can take a look later, hopefully
22:05 tbrowder true, but the school of hards knocks gets tiring for
22:06 tbrowder anyhoo, i’ll file the issue
22:07 BloomingAzaleas joined #perl6
22:08 BloomingAzaleas FYI - http://smoke.perl6.org/report page throwing Error 500 @ 6:08PM EDT US
22:10 BloomingAzaleas left #perl6
22:12 AlexDaniel hm
22:12 mcmillhj joined #perl6
22:12 AlexDaniel was that automated?
22:13 Thrush joined #perl6
22:15 Thrush I have a question about the Perl6 REPL (interactive mode).  In python and ruby's REPL I can use "_" to get the last value.  I notice that "_" doesn't do the same in Perl6's REPL.  Is there a way to get the value evaluated value in Perl6's REPL?
22:24 Thrush In Perl6's REPL, is there a special variable to access the last output value?  (I'm looking for something similar to '_' in Python's and Ruby's REPL.)
22:26 AlexDaniel Thrush: I don't think you can do it right now, but here's a relevant discussion: https://github.com/perl6/user-experience/issues/2#issuecomment-243891189
22:28 mcmillhj joined #perl6
22:30 imcsk8 joined #perl6
22:30 Merfont joined #perl6
22:34 Thrush Thanks, AlexDaniel.
22:34 Morfent joined #perl6
22:35 mcmillhj joined #perl6
22:44 Cabanossi joined #perl6
22:51 mcmillhj joined #perl6
23:07 mcmillhj joined #perl6
23:15 mson joined #perl6
23:15 knight__ joined #perl6
23:23 mcmillhj joined #perl6
23:39 mcmillhj joined #perl6
23:52 sergot joined #perl6

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

Perl 6 | Reference Documentation | Rakudo