Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2015-07-10

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 [Coke] m: dir | say
00:00 camelia rakudo-moar 1b537b: OUTPUT«5===SORRY!5===␤Argument to "say" seems to be malformed␤at /tmp/1AH9y6GQg4:1␤------> 3dir | say7⏏5<EOL>␤Other potential difficulties:␤    Unsupported use of bare "say"; in Perl 6 please use .say if you meant $_, or use an explicit invoca…»
00:00 [Coke] m: dir | .say
00:00 camelia rakudo-moar 1b537b: OUTPUT«(Any)␤Unhandled exception: Failed to get the directory contents of '/home/camelia/True': chdir failed: Unknown system error␤   at <unknown>:1  (/home/camelia/rakudo-inst-2/share/perl6/runtime/CORE.setting.moarvm:throw:4294967295)␤ from src/gen/m-CORE…»
00:00 AlexDani` joined #perl6
00:00 psch m: dir | say()
00:00 camelia rakudo-moar 1b537b: OUTPUT«␤Unhandled exception: Failed to get the directory contents of '/home/camelia/True': chdir failed: Unknown system error␤   at <unknown>:1  (/home/camelia/rakudo-inst-2/share/perl6/runtime/CORE.setting.moarvm:throw:4294967295)␤ from src/gen/m-CORE.sett…»
00:01 psch m: dir() | say()
00:01 camelia rakudo-moar 1b537b: OUTPUT«␤»
00:01 psch m: say | say()
00:01 camelia rakudo-moar 1b537b: OUTPUT«␤True␤»
00:02 [Coke] r: my $x = 'ab'; say ('ab' ~~ / a | b | $x /).Str
00:02 camelia rakudo-{moar,jvm} 1b537b: OUTPUT«a␤»
00:02 psch m: say + | say()
00:02 camelia rakudo-moar 1b537b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/2dk_vm0u6_␤Variable '&prefix:<|>' is not declared␤at /tmp/2dk_vm0u6_:1␤------> 3say + 7⏏5| say()␤»
00:02 [Coke] r: constant $x = 'ab'; say ('ab' ~~ / a | b | $x /).Str
00:02 psch m: say +() | say()
00:02 camelia rakudo-{moar,jvm} 1b537b: OUTPUT«a␤»
00:02 camelia rakudo-moar 1b537b: OUTPUT«␤any(0, True)␤»
00:03 labster m: &infix:<|>.()
00:03 camelia rakudo-moar 1b537b: ( no output )
00:04 labster m: say &infix:<|>.()
00:04 camelia rakudo-moar 1b537b: OUTPUT«any()␤»
00:04 psch m: say [|]
00:04 camelia rakudo-moar 1b537b: OUTPUT«any()␤»
00:04 psch m: say &[|] [|], [|]
00:04 camelia rakudo-moar 1b537b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/QSEB6FQy98␤Preceding context expects a term, but found infix , instead␤at /tmp/QSEB6FQy98:1␤------> 3say &[|] [|],7⏏5 [|]␤»
00:04 psch m: say [&[|]] [|], [|]
00:04 camelia rakudo-moar 1b537b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/U76prd4Q3C␤Preceding context expects a term, but found infix , instead␤at /tmp/U76prd4Q3C:1␤------> 3say [&[|]] [|],7⏏5 [|]␤»
00:04 psch ehh, nevermind :)
00:06 pecastro joined #perl6
00:09 dalek roast: cfc0897 | coke++ | S05-metasyntax/longest-alternative.t:
00:09 dalek roast: Add tests for RT #113884
00:09 dalek roast: review: https://github.com/perl6/roast/commit/cfc08972df
00:10 Ben_Goldberg joined #perl6
00:10 psch implicit returns are broken on jvm :/
00:11 psch well, in one test file at least
00:11 psch r: sub f { sub g { 1 } }; my $a = f(); say $a()
00:11 camelia rakudo-jvm 1b537b: OUTPUT«java.lang.NullPointerException␤  in block <unit> at /tmp/tmpfile:1␤␤»
00:11 camelia ..rakudo-moar 1b537b: OUTPUT«1␤»
00:11 psch r: sub f { return sub g { 1 } }; my $a = f(); say $a()
00:11 camelia rakudo-{moar,jvm} 1b537b: OUTPUT«1␤»
00:12 psch actually, i guess it's the sub declaration as implicit return
00:13 psch and jdb backtraces really don't help hah
00:14 BenGoldberg joined #perl6
00:15 Ben_Goldberg joined #perl6
00:16 psch m: sub f { $_ }; my $a = f(1); say $a
00:16 camelia rakudo-moar 1b537b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Pek_L_ZtF5␤Calling f(int) will never work with declared signature ()␤at /tmp/Pek_L_ZtF5:1␤------> 3sub f { $_ }; my $a = 7⏏5f(1); say $a␤»
00:16 psch m: sub f { @_[0] }; my $a = f(1); say $a
00:16 camelia rakudo-moar 1b537b: OUTPUT«1␤»
00:16 psch m: sub f { @_[0] }; my $a = f(sub g { 1 }); say $a
00:16 camelia rakudo-moar 1b537b: OUTPUT«sub g () { #`(Sub|57502528) ... }␤»
00:16 psch m: sub f { @_[0] }; my $a = f(sub g { 1 }); say $a()
00:16 camelia rakudo-moar 1b537b: OUTPUT«1␤»
00:17 psch m: sub f { sub { @_[0] } }; my $a = f(1); say $a()
00:17 camelia rakudo-moar 1b537b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/3aglJckKZM␤Calling f(int) will never work with declared signature ()␤at /tmp/3aglJckKZM:1␤------> 3sub f { sub { @_[0] } }; my $a = 7⏏5f(1); say $a()␤»
00:17 psch m: sub f($a) { sub { $a } }; my $a = f(1); say $a()
00:17 camelia rakudo-moar 1b537b: OUTPUT«1␤»
00:18 psch m: sub f($a) { sub g { $a } }; my $b = f(1); say $b()
00:18 camelia rakudo-moar 1b537b: OUTPUT«1␤»
00:18 psch ok, i'm baffled
00:18 psch next test failure...
00:19 psch actually
00:19 psch habitual m:
00:19 psch j: sub f($a) { sub g { $a } }; my $b = f(1); say $b()
00:19 camelia rakudo-jvm 1b537b: OUTPUT«java.lang.NullPointerException␤  in block <unit> at /tmp/lPIFkZleLR:1␤␤»
00:19 psch j: sub f { sub { @_[0] } }; my $a = f(1); say $a()
00:19 camelia rakudo-jvm 1b537b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/FZ4wXMzTu7␤Calling f(int) will never work with declared signature ()␤at /tmp/FZ4wXMzTu7:1␤------> 3sub f { sub { @_[0] } }; my $a = 7⏏5f(1); say $a()␤»
00:20 psch j: sub f { @_[0] }; my $a = f(sub g { 1 }); say $a
00:20 camelia rakudo-jvm 1b537b: OUTPUT«sub g () { #`(Sub|1241353615) ... }␤»
00:20 psch j: sub f { @_[0] }; my $a = f(sub g { 1 }); say $a()
00:20 camelia rakudo-jvm 1b537b: OUTPUT«1␤»
00:20 psch j: sub f { @_[0]; { @_[0] } }; my $a = f(sub g { 1 }); say $a()
00:20 camelia rakudo-jvm 1b537b: OUTPUT«Method 'Any' not found for invocant of class 'Parcel'␤  in block <unit> at /tmp/58Qw6DAJL3:1␤␤»
00:20 psch j: sub f { @_[0]; anon sub { @_[0] } }; my $a = f(sub g { 1 }); say $a()
00:20 camelia rakudo-jvm 1b537b: OUTPUT«(Any)␤»
00:20 psch j: sub f($a) { anon sub { $a } }; my $a = f(sub g { 1 }); say $a()
00:20 camelia rakudo-jvm 1b537b: OUTPUT«java.lang.NullPointerException␤  in block <unit> at /tmp/WlK79q_M0Y:1␤␤»
00:22 psch m: my int $a is default(42);
00:22 camelia rakudo-moar 1b537b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/T29ipfnEQo␤Can't use trait 'is default' on a native.␤at /tmp/T29ipfnEQo:1␤------> 3my int $a is default(42)7⏏5;␤    expecting any of:␤        constraint␤»
00:22 psch j: my int $a is default(42);
00:22 camelia rakudo-jvm 1b537b: ( no output )
00:29 [Coke] m: my \\a = any set <1 2 3>; \n say 1 ~~ a
00:29 camelia rakudo-moar 1b537b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/SLdnZehN8u␤Malformed my␤at /tmp/SLdnZehN8u:1␤------> 3my7⏏5 \\a = any set <1 2 3>; \n say 1 ~~ a␤»
00:30 [Coke] m: my \a = any set <1 2 3>; ␤ say 1 ~~ a
00:30 camelia rakudo-moar 1b537b: OUTPUT«False␤»
00:30 [Coke] j: my \a = any set <1 2 3>; ␤ say 1 ~~ a
00:30 camelia rakudo-jvm 1b537b: OUTPUT«False␤»
00:31 skids m: my \a = any set <1 2 3>; a.perl.say
00:31 camelia rakudo-moar 1b537b: OUTPUT«any(set("1","3","2"))␤»
00:32 [Coke] does someone have a java verison built locally?
00:33 skids kinda maybe I'll check.
00:33 [Coke] just realized that RT# 115270 is talkinga bout the reply.
00:34 telex joined #perl6
00:35 psch seems to work here
00:35 psch https://gist.github.com/peschwa/11b1f3fd9921b4b7700a
00:36 psch i don't know if i would call "0" as return value of ~~ happy, though, but that's on moar and i don't have that built atm
00:36 skids Yeah here too.
00:39 psch $ echo -ne "start { while true { 1 } }\n" | ./perl6-j --ll-exception # that's a line that still does something wonky
00:39 psch i don't remember if there was an RT
00:39 psch r: start { while true { 1 } }\n
00:39 camelia rakudo-{moar,jvm} 1b537b: OUTPUT«5===SORRY!5===␤Function true needs parens to avoid gobbling block␤at /tmp/tmpfile:1␤------> 3start { while true { 1 }7⏏5 }\n␤Missing block (apparently taken by 'true')␤at /tmp/tmpfile:1␤------> 3start { while true { 1 } 7⏏5…»
00:39 psch ehh, spurious \n
00:39 psch well, the error is still the expected one
00:40 psch the echo line gives a NPE
00:40 psch utterly weird :P
00:44 labster m: say 2 > 1 ~~ ( More or Less )
00:44 camelia rakudo-moar 1b537b: OUTPUT«True␤»
00:46 labster m: say(i before e unless i after "c")
00:46 camelia rakudo-moar 1b537b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/RyLBJuDfPk␤Unable to parse expression in argument list; couldn't find final ')' ␤at /tmp/RyLBJuDfPk:1␤------> 3say(i before e unless 7⏏5i after "c")␤»
00:47 labster m: say i before e unless i after "c";
00:47 camelia rakudo-moar 1b537b: OUTPUT«True␤»
00:47 psch labster++
00:48 rindolf joined #perl6
01:03 vendethiel joined #perl6
01:06 rindolf joined #perl6
01:17 rmgk_ joined #perl6
01:19 atroxaper joined #perl6
01:30 tinyblak_ joined #perl6
01:37 b2gills .tell cognominal `say True.'!'()` calls a method by its name at runtime ( think `$a."$b"()` parens are required ). Currently to call  a prefix operator as a method: `say True.&prefix:<!>` ( any code reference would work `$b = &say; $a.$b` ) I think? S03 should be changed to match
01:37 yoleaux b2gills: I'll pass your message to cognominal.
01:39 b2gills TimToady: Is there a (good) reason that `$*OUT.'say': 5` doesn't parse?
01:39 b2gills m: $*OUT.'say': 5
01:39 camelia rakudo-moar 1b537b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/q9yB9rpbTT␤Quoted method name requires parenthesized arguments. If you meant to concatenate two strings, use '~'.␤at /tmp/q9yB9rpbTT:1␤------> 3$*OUT.'say'7⏏5: 5␤»
01:40 b2gills m: $*OUT.'say'( 5 )
01:40 camelia rakudo-moar 1b537b: OUTPUT«5␤»
01:46 aborazmeh joined #perl6
01:46 aborazmeh joined #perl6
01:52 colomon joined #perl6
01:52 vendethiel joined #perl6
01:54 khw joined #perl6
02:03 colomon joined #perl6
02:11 dayangkun joined #perl6
02:17 noganex joined #perl6
02:32 kanl is there a way to determin the type of a Range? .WHAT of bounds may be inconsistent.
02:34 kanl m: ( -Inf .. 1 ).bounds.map: *.WHAT.say
02:34 camelia rakudo-moar 1b537b: OUTPUT«(Whatever)␤Unhandled exception: Method 'count' not found for invocant of class 'Bool'␤   at <unknown>:1  (/home/camelia/rakudo-inst-2/share/nqp/lib/Perl6/BOOTSTRAP.moarvm::4294967295)␤ from src/gen/m-CORE.setting:10417  (/home/camelia/rakudo-inst-2/s…»
02:36 kanl m: ( -Inf .. 1 ).bounds.map: { $_.WHAT.say };
02:36 camelia rakudo-moar 1b537b: OUTPUT«(Num)␤(Int)␤»
02:36 kanl m: ( 'a' .. * ).bounds.map: { $_.WHAT.say };
02:36 camelia rakudo-moar 1b537b: OUTPUT«(Str)␤(Num)␤»
02:37 kanl m: ( 'a' .. 5 ).bounds.map: { $_.WHAT.say };
02:37 camelia rakudo-moar 1b537b: OUTPUT«(Str)␤(Int)␤»
02:47 kanl i suppose assuming .min.WHAT would be correct for most of the cases. and for the case of * being one of the bounds, just assume the .WHAT of another?
02:53 colomon joined #perl6
03:03 shinobi-cl joined #perl6
03:36 atroxaper joined #perl6
03:41 dustinm` joined #perl6
03:45 vendethiel joined #perl6
03:52 davido__ joined #perl6
03:59 [Sno] joined #perl6
04:23 ggoebel2 joined #perl6
04:25 vendethiel joined #perl6
04:56 vendethiel joined #perl6
05:07 kaare_ joined #perl6
05:13 rurban joined #perl6
05:43 nightfrog joined #perl6
05:45 vendethiel joined #perl6
05:47 gfldex joined #perl6
05:53 diana_olhovik joined #perl6
06:04 aborazmeh joined #perl6
06:04 aborazmeh joined #perl6
06:12 vendethiel joined #perl6
06:17 atroxaper joined #perl6
06:21 TimToady joined #perl6
06:23 TimToady b2gills: the reason that doesn't parse is because we have to be careful when interpolating into the end of a sentence in quotes that ends with a period: "The answer is $foo."
06:23 yoleaux 9 Jul 2015 23:43Z <[Coke]> TimToady: if we can get a ruling on RT#92742 - should enum <a b c>; c++ give c, a, or die?
06:24 rurban joined #perl6
06:25 b2gills Fair enough
06:25 TimToady m: enum <a b c>; say c.succ
06:25 camelia rakudo-moar 1b537b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/JM6GHLIco0␤Undeclared routine:␤    c used at line 1␤␤»
06:26 TimToady m: enum ABC <a b c>; say c.succ
06:26 camelia rakudo-moar 1b537b: OUTPUT«3␤»
06:26 TimToady m: enum ABC <a b c>; say b.succ
06:26 camelia rakudo-moar 1b537b: OUTPUT«2␤»
06:26 FROGGS joined #perl6
06:26 TimToady .tell [Coke] c++ is an error because c is a constant, but c.succ gives 3 because c is really just a name for an integer
06:26 yoleaux TimToady: I'll pass your message to [Coke].
06:28 rurban1 joined #perl6
06:31 b2gills m:  class C is Int {}; C.new(4).succ.^name
06:31 camelia rakudo-moar 1b537b: ( no output )
06:31 b2gills m:  class C is Int {}; say C.new(4).succ.^name
06:31 camelia rakudo-moar 1b537b: OUTPUT«Int␤»
06:35 RabidGravy joined #perl6
06:35 vendethiel joined #perl6
06:48 domidumont joined #perl6
06:53 domidumont joined #perl6
06:53 [Tux] test             50000    44.875    44.787
06:53 [Tux] test-t           50000    46.206    46.117
06:53 [Tux] on retry even worse
06:53 [Tux] test             50000    47.233    47.140
06:53 [Tux] test-t           50000    47.031    46.939
06:53 [Tux] the system is not busy
07:01 aborazmeh joined #perl6
07:01 aborazmeh joined #perl6
07:02 RabidGravy marning!
07:04 atroxaper joined #perl6
07:13 brrt joined #perl6
07:18 darutoko joined #perl6
07:21 leont joined #perl6
07:40 vendethiel joined #perl6
07:42 masak morning, o #perl6
07:46 masak Perl 6 day! \o/
07:49 masak m: class Year { has $.year; has Date $.start-date handles <is-leap-year> .= new(:$!year, :month(1), :day(1)); has Date $.end-date .= new(:$!year, :month(12), :day(31)) }; say .end-date and say .is-leap-year given Year.new(:year(2012))
07:49 camelia rakudo-moar 1b537b: OUTPUT«2012-12-31␤True␤»
07:49 masak Perl 6 is awesome...
07:56 nine masak: indeed it is
07:59 moritz m: class Year { has $.year; has Date $.start-date handles <is-leap-year> .= new(:$!year, :month(1), :day(1)); has Date $.end-date = self.start-date.later(:1year).earlier(:1day)
07:59 camelia rakudo-moar 1b537b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/VDRndcoU77␤Missing block␤at /tmp/VDRndcoU77:1␤------> 3.start-date.later(:1year).earlier(:1day)7⏏5<EOL>␤    expecting any of:␤        postfix␤        statement end␤        statement modifier…»
08:00 moritz m: class Year { has $.year; has Date $.start-date handles <is-leap-year> .= new(:$!year, :month(1), :day(1)); has Date $.end-date = self.start-date.later(:1year).earlier(:1day) }; say Year.new(year => 2015).end-date
08:00 camelia rakudo-moar 1b537b: OUTPUT«2015-12-31␤»
08:01 rindolf joined #perl6
08:06 vendethiel joined #perl6
08:10 masak m: class C { has $.x = $.y + 1; has $.y = $.x + 1 }; say 1; C.new; say 2
08:10 camelia rakudo-moar 1b537b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/VHor7xneh7␤Virtual call $.y may not be used on partially constructed objects␤at /tmp/VHor7xneh7:1␤------> 3class C { has $.x = $.y7⏏5 + 1; has $.y = $.x + 1 }; say 1; C.new;␤    expecting any of:…»
08:10 masak m: class C { has $.x = $!y + 1; has $.y = $!x + 1 }; say 1; C.new; say 2
08:10 camelia rakudo-moar 1b537b: OUTPUT«1␤Use of uninitialized value of type Any in numeric context  in method  at /tmp/70rhlVR3zt:1␤2␤»
08:10 masak oh, ok :)
08:12 zakharyas joined #perl6
08:17 masak every time I change a `say` to a `print`, I get a little bit uneasy, because I'm not always sure whether I'm also implicitly changing a .gist to .Str somewhere.
08:23 sivoais joined #perl6
08:26 * masak is once again reminded of the importance of finding the right method name
08:26 atroxaper joined #perl6
08:26 masak just used `.allot` in some code that lays things out on a page :)
08:27 masak not to be confused with http://hyperboleandahalf.blogspot.se/2010/04/alot-is-better-than-you-at-everything.html
08:34 DrForr Or .shallot.
08:35 brrt what is .allot
08:35 masak brrt: similar to 'allocate', but it felt a little bit more right when talking about making room for things on a canvas
08:36 brrt aha :-)
08:42 moritz .oO( allotace )
08:44 huf joined #perl6
08:54 atroxaper joined #perl6
08:54 brrt perl6 grammars are still dark voodoo magic to me ^^
08:55 masak brrt: it gets better.
08:55 brrt i hope
08:55 * masak enjoys the new constant + heredoc niceness for the first time in actual code
08:55 DrForr https://github.com/drforr/perl6-ANTLR4 # may offer some inspiration.
08:56 Woodi .oO( light voodoo magic ? )
08:56 Woodi hi #perl6 today :)
08:57 vendethiel joined #perl6
08:59 araujo joined #perl6
09:00 DrForr Oh, masak - Was reading http://strangelyconsistent.org/blog/counting-t4-configurations - There's a simple argument for exact cover. There are 38 hexes on the board. 38 isn't divisible by 3, so there there must be at least one length-2 piece. You can't remove a single length-3 piece because that leaves a length-1 piece, ergo they must be removed in pairs.
09:01 araujo joined #perl6
09:04 espadrine joined #perl6
09:08 DrForr Alternatively, 2x+3y=38 only has solutions for even values of y.
09:08 Woodi jnthn: arrays 10x10x10 bytes in 1000 bytes blob cannot be more perfecter :) but there is something like  https://en.wikipedia.org/wiki/Curse_of_dimensionality  - data in arrays with high number of dimensions are sparse. but things are similiar when just one index grows in 2D or 3D - blobs can be very empty. would be nice to have other representation of native arrays, linked list or something... then blobs cou
09:08 Woodi ld be converted to linked list or ...
09:08 Woodi ... even user could predeclare native array as specific representation.
09:09 Woodi but probably this is for post-6.0...
09:11 ab6tact joined #perl6
09:12 masak by the way, I have a resolution to make.
09:12 masak it's kind of a long-term one, with a horizon of 2020 or so.
09:12 ab6tact good *, #perl6
09:12 masak ab6tact: \o
09:12 ab6tact masak: seems I have arrived just in time for an exciting announcement :)
09:12 masak I want to focus some of my Perl 6 work on making gorgeous graphics.
09:13 masak like, I enjoyed making the graphics for http://strangelyconsistent.org/blog/youre-in-a-space-of-twisty-little-mazes-all-alike
09:13 masak but it's much to cumbersome to start from scratch every time, writing scripts to generate SVG and then saving them in the right format and uploading them.
09:14 ab6tact masak: I've had a distant goal of 'write a wrapper for Processing for perl6-j'
09:14 masak I would much prefer it if psyde (the static webpage thing I'm using) could handle making such diagrams inline in the Markdown
09:14 masak and at most I'd have to create a small plugin or something to handle mazes
09:14 ab6tact oo, that does sound helpful :)
09:14 masak so, anyway, that's my goal. now you know.
09:15 ab6tact m: Date.new(:1999year).prev.say
09:15 camelia rakudo-moar 1b537b: OUTPUT«Method 'prev' not found for invocant of class 'Date'␤  in block <unit> at /tmp/oHEZhEkSmF:1␤␤»
09:16 ab6tact masak: is that expected? It seems weird that Date would have that behavior (can't get .prev from the first of a year) and makes getting the date behavior in overlaps-with trickty
09:16 masak m: say Date.new(:year(1999))
09:16 camelia rakudo-moar 1b537b: OUTPUT«1999-01-01␤»
09:16 ab6tact m: Date.new(:1999year).succ.say
09:16 camelia rakudo-moar 1b537b: OUTPUT«1999-01-02␤»
09:16 masak ab6tact: could it be that .prev is simply missing on Date?
09:16 ab6tact m: Date.new(:1999year).succ.prev.say
09:16 camelia rakudo-moar 1b537b: OUTPUT«Method 'prev' not found for invocant of class 'Date'␤  in block <unit> at /tmp/cqBWiGWkUN:1␤␤»
09:16 ab6tact wha? that's weird!
09:17 ShimmerFairy m: Date.new(:1999year).pred.say
09:17 camelia rakudo-moar 1b537b: OUTPUT«1998-12-31␤»
09:17 ab6tact p6doc -f pre returns Range.prev :/
09:17 ab6tact *prev
09:17 ShimmerFairy Isn't it usually .pred ?
09:17 ab6tact ahgads
09:17 masak ah, there ya go :)
09:17 masak we oughta have Levenshtein for that... :)
09:17 ab6tact that'll fix. thanks ShimmerFairy
09:18 ab6tact masak: well, when I grow up I hope to write a 'use no-shortforms' schema, and banish all abbreviations to the compile time error bin ;)
09:19 ShimmerFairy pred/succ are shortforms?
09:19 ab6tact predecessor / successor
09:19 * masak .oO( previous / succious )
09:19 ShimmerFairy Do we really have those as methods though O_o ?
09:19 ab6tact maybe 'no-abbreviations' is a better name for the schema
09:20 masak 'no-abbrs'
09:20 masak :P
09:20 ab6tact jesus, s/schema/pragma/
09:20 ab6tact was up late last night :P
09:20 masak s/pragma/stigma/
09:20 masak s/stigma/zeugma/
09:20 masak ...what is this, Friday? :P
09:20 ab6tact hehe
09:20 * ShimmerFairy wonders if  use no-*  wouldn't be better written as  no *  :P
09:21 masak m: no zeugma;
09:21 camelia rakudo-moar 1b537b: OUTPUT«===SORRY!===␤Don't know how to 'no zeugma' just yet␤»
09:21 ab6tact :)
09:21 masak m: no everything;
09:21 camelia rakudo-moar 1b537b: OUTPUT«===SORRY!===␤Don't know how to 'no everything' just yet␤»
09:22 ab6tact but I imagined that to be a 'negatiing pragma' form.. the abbreviations are not brought in by 'use abbrevs;' ,so 'no abbrevs' would be weird
09:22 masak m: no your-mom;
09:22 camelia rakudo-moar 1b537b: OUTPUT«===SORRY!===␤Don't know how to 'no your-mom' just yet␤»
09:22 ab6tact m: Date.new('1999-01-02').prev
09:22 camelia rakudo-moar 1b537b: OUTPUT«Method 'prev' not found for invocant of class 'Date'␤  in block <unit> at /tmp/nnrLtlLXBE:1␤␤»
09:22 masak it's .pred
09:23 masak m: Date.new('1999-01-02').pred
09:23 camelia rakudo-moar 1b537b: ( no output )
09:23 masak m: say Date.new('1999-01-02').pred
09:23 camelia rakudo-moar 1b537b: OUTPUT«1999-01-01␤»
09:23 ab6tact that is so bizarre.. I guess the docs are wrong, because p6doc -f pre returns info about "method prev(Date:D:) return Date:D"
09:23 ShimmerFairy That'd be a typo then, I'd imagine.
09:23 masak ab6tact: ooh! plz to fix!
09:23 masak ++ab6tact
09:23 ab6tact ohhh... that's why I keep spelling 'prev' wrong.. DAMN YOU APPLE AUTOCOMPLETE
09:24 DrForr I'm just a girl who can't spell n.. n... DAMNIT.
09:25 ab6tact \o/
09:26 ab6tact overlaps-with now only needs special casing for the infinite forms
09:26 telex joined #perl6
09:26 ab6tact .tell kanl checking only one side of the bounds won't work for determining the "type" of the range
09:26 yoleaux ab6tact: I'll pass your message to kanl.
09:26 ab6tact I did something like
09:27 cognominal joined #perl6
09:27 ab6tact my @types = $range.bounds: .WHAT;
09:27 ab6tact and then did some grepping and some such
09:28 ab6tact .tell kanl checking only one side of the boundary _will_ work if !$range.infinite
09:28 yoleaux ab6tact: I'll pass your message to kanl.
09:34 amurf joined #perl6
09:35 virtualsue joined #perl6
09:36 dalek doc: 3bbbb81 | ab5tract++ | lib/Type/Date.pod:
09:36 dalek doc: It is .pred, not .prev
09:36 dalek doc: review: https://github.com/perl6/doc/commit/3bbbb81b75
09:36 bin_005 joined #perl6
09:36 masak ab6tact++
09:37 haroldwu joined #perl6
09:37 rindolf joined #perl6
09:42 teodozjan joined #perl6
09:43 teodozjan p6: Array[Str].new("ABCD") Z Array[Str].new("||")
09:43 camelia rakudo-moar 1b537b: ( no output )
09:44 dalek roast: d6fe98b | lizmat++ | S32-array/splice.t:
09:44 dalek roast: Add todo test for typecheck failure
09:44 dalek roast:
09:44 dalek roast: Somehow somewhere in the throw-like internals, we get a different
09:44 dalek roast: typecheck failure than the one we expect  :-(
09:44 dalek roast: review: https://github.com/perl6/roast/commit/d6fe98bb53
09:44 dalek doc: cf9ad41 | (Steve Mynott)++ | lib/Type/Proc.pod:
09:44 dalek doc: fix minor typos
09:44 dalek doc: review: https://github.com/perl6/doc/commit/cf9ad41054
09:48 teodozjan p6: (Array[Str].new("ABCD") Z Array[Str].new("||")).join(".").perl
09:48 camelia rakudo-moar 1b537b: ( no output )
09:48 teodozjan p6: say (Array[Str].new("ABCD") Z Array[Str].new("||")).join(".").perl
09:48 camelia rakudo-moar 1b537b: OUTPUT«"ABCD ||"␤»
09:53 RabidGravy supermarket!
09:54 itz__ beer section?
10:07 g4 joined #perl6
10:10 teodozjan joined #perl6
10:15 woolfy joined #perl6
10:15 woolfy left #perl6
10:16 masak m: class C { has $.x is required }; C.new
10:16 camelia rakudo-moar 1b537b: OUTPUT«The attribute '$!x' is required, but you did not provide a value for it.␤  in block <unit> at /tmp/ZgjCxliD7R:1␤␤»
10:17 masak by the way, why is that block called '<unit>'? could we call it something else, like '<mainline>'?
10:17 masak it feels odd to use '<unit>' when we haven't declared something with the `unit` keyword.
10:18 teodozjan hi, please someone review perl6/form pull requests i didn't know that one waits for 25days and uploaded similar solution to Paul
10:19 itz__ virtualsue: https://github.com/retupmoca/P6-UUID/
10:20 moritz teodozjan: fwiw you can push directly to perl6/form (and most other repos in the perl6/ org)
10:20 dalek rakudo/nom: ae32e12 | lizmat++ | src/core/List.pm:
10:20 dalek rakudo/nom: Add one more Int coercer, just in case
10:20 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/ae32e12b14
10:20 masak getting a review of one's PR might still be nice, though.
10:20 moritz aye
10:20 moritz just sayin'
10:20 masak *nod*
10:21 masak it's useful to know one has commit access :>
10:21 masak or push access, rather.
10:21 virtualsue itz__: thanks
10:22 teodozjan I ddin't know  that i can push but not merge :)
10:22 cschwenz joined #perl6
10:23 cschwenz o/ #perl6
10:23 masak cschwenz: \o
10:23 cschwenz Where would I report a warning being generated in Panda::Builder?
10:23 masak here :)
10:23 cschwenz Use of Nil in numeric context  in block  at lib/Panda/Builder.pm:125
10:24 cschwenz i'm seeing that a lot during a clean build of Task::Star
10:24 masak it's this one: https://github.com/tadzik/panda/blob/master/lib/Panda/Builder.pm#L125
10:24 teodozjan @masak could You please merge it for last time then?
10:25 masak ok.
10:25 masak done.
10:26 teodozjan thanks, now it will pass tests :-)
10:26 masak \o/
10:29 cdc Hello #perl
10:29 cdc *#perl6
10:29 masak \o
10:30 * masak .oO( nothing wrong with #perl... just ain't us ) :P
10:30 cdc m: Blob.new(0xff, 0xff).decode; CATCH { .WHAT.say }
10:30 camelia rakudo-moar 1b537b: OUTPUT«(X::AdHoc)␤Malformed UTF-8 at line 1 col 1␤  in block <unit> at /tmp/tn3MAgXTii:1␤␤»
10:30 cdc I was looking to get a X::Malformed::UTF-8 instead of X::AdHoc
10:30 cdc but it appears it comes from MoarVM
10:31 cdc and there's not a lot of typed exceptions emitted from MoarVM
10:31 cdc so, is this a good idea or not?
10:31 dalek rakudo/nom: fadca9d | lizmat++ | lib/Test.pm:
10:31 dalek rakudo/nom: Don't let the feedback on a failed test explode
10:31 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/fadca9dc5b
10:32 lizmat afk&
10:32 cdc (from MoarVM/src/strings/utf8.c)
10:38 cdc hum, never mind, I'll use "$str = try Blob.new(...).decode" instead.
10:39 cdc it's even better in my case since I don't really care why Blob.decode fails
10:44 itz__ cschwenz: are you on OS X?
10:44 cschwenz yep :-)
10:46 itz__ https://rt.perl.org/Ticket/Display.html?id=125516
10:48 cschwenz I also ran into MoarVM spinning its wheels when compiling SVG::Plot.  ^C and re-running resulted in SVG::Plot compiling and Task::Star eventually finishing successfully.
10:48 kanl gurus, how should i define/overload postcircumfix:<[]> ?
10:48 yoleaux 09:26Z <ab6tact> kanl: checking only one side of the bounds won't work for determining the "type" of the range
10:48 yoleaux 09:28Z <ab6tact> kanl: checking only one side of the boundary _will_ work if !$range.infinite
10:48 kanl m: class Node { has ( $.Str, @.list ); submethod BUILD( :$node ) { @!list = ( $!Str = $node ).comb: / \D+ | \d+ / } method postcircumfix:<[]>( *@i ) { @!list[@i] } }; my $a = Node.new( :node<abc000> ); say $a[0];
10:48 camelia rakudo-moar 1b537b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/ilehdBeM9I␤Strange text after block (missing semicolon or comma?)␤at /tmp/ilehdBeM9I:1␤------> 3 ( $!Str = $node ).comb: / \D+ | \d+ / }7⏏5 method postcircumfix:<[]>( *@i ) { @!li␤    expecting an…»
10:48 masak kanl: I think postcircumfix:<[]> is a sub these days.
10:49 kanl m: class Node { has ( $.Str, @.list ); submethod BUILD( :$node ) { @!list = ( $!Str = $node ).comb: / \D+ | \d+ / }; method postcircumfix:<[]>( *@i ) { @!list[@i] } }; my $a = Node.new( :node<abc000> ); say $a[0];
10:49 camelia rakudo-moar 1b537b: OUTPUT«Node.new(Str => "abc000", list => ["abc", "000"]<>)␤»
10:49 masak kanl: if I were you, I'd find some nice example in the spectest suite.
10:50 kanl oh. alright. do you happen to have a link handy? thanks~
10:52 masak looking now. I might be missing something, but there don't seem to be tests for this :/
10:52 masak I've found a few `method postcircumfix:<{ }>` ones.
10:54 xnrand joined #perl6
10:55 user3 joined #perl6
10:55 kanl that can help me monkeying after too, i suppose. what i don't understand with the example i posted is that the syntax seems ok ( compiler didn't complain ) but clearly not DWIM ..
10:56 masak kanl: try this instead: `Node does Positional`, and then define the method `AT-POS`
10:56 masak kanl: I think that's better than directly overloading .[]
10:56 user3 left #perl6
10:57 kanl masak: thanks, will give it a try
10:57 virtualsue_ joined #perl6
10:58 kanl that aside, would the thing i posted be indicating a bug, or just a NYI feature?
10:58 masak doesn't look wrong to me at first blush.
10:58 masak but these things are not NYI either.
10:58 jnthn If you implement the .AT-POS method, you get the various postcircumfix:<[ ]> forms "for free", as they all call your .AT-POS
10:58 yoleaux 9 Jul 2015 22:31Z <RabidGravy> jnthn: that it seems that the https://rt.perl.org/Ticket/Display.html?id=125408 has gone away at 2015.06-226-g01a60df built on MoarVM version 2015.06-88-g647df11
10:58 yoleaux 9 Jul 2015 22:56Z <TimToady> jnthn: "to implementing through implementing"?
10:58 yoleaux 9 Jul 2015 23:55Z <[Coke]> jnthn: I bet RT #107204 is closable with tests after your nfg work.
10:59 kanl jnthn: will do. thanks.
11:00 masak are we likely to get rid of Rakudo's Perl 5 dependencies before Christmas? (guessing "no".)
11:01 jnthn masak: As in, Configure.pl?
11:01 masak yes, mainly.
11:01 masak and for nqp too, I guess.
11:01 jnthn I'd say "no"
11:01 masak yeah, thought so.
11:01 masak maybe a reasonable goal for somewhat later, though?
11:02 jnthn If nothing else, because we should try to do things that will create the best experience for those trying out Perl 6
11:02 jnthn And I imagine we could spend the time that'd take on more worthy things.
11:02 jnthn Oh, eventually for sure.
11:02 Begi joined #perl6
11:04 Begi Hey ! How can I get the most important value of an @array ? Is there a special function ? Thanks
11:04 moritz Begi: what's the most important value?
11:04 masak haha
11:05 moritz "it's called .[]; you just have to feed it your definition of 'most important'"
11:05 * jnthn suspects a translate-o :)
11:05 masak Begi: largest? smallest? largest absolute value? funniest?
11:05 jnthn m: my @a = 1,5,3,10,7; say @a.max # if largest
11:05 camelia rakudo-moar fadca9: OUTPUT«10␤»
11:06 masak jnthn++ beat me to it
11:06 Begi Yes, largest
11:06 jnthn .tell TimToady fixed, thanks!
11:06 yoleaux jnthn: I'll pass your message to TimToady.
11:06 moritz m: sub importance($x) { abs($x - 5) }; say (1, 2, 4, 8, 10).max(&importance)
11:06 camelia rakudo-moar fadca9: OUTPUT«10␤»
11:07 moritz m: sub importance($x) { abs($x - 5) }; say (1, 2, 4, 8, 10).min(&importance)
11:07 camelia rakudo-moar fadca9: OUTPUT«4␤»
11:08 Begi It works, thanks ! Do this function is in the documentation ?
11:13 moritz http://doc.perl6.org/routine/max
11:13 moritz huh, only for Range
11:20 Begi I didn't found it...
11:24 gcole joined #perl6
11:35 dalek nqp: f847e7b | jnthn++ | src/vm/jvm/QAST/Compiler.nqp:
11:35 dalek nqp: Map multi-dim ops for JVM backend.
11:35 dalek nqp:
11:35 dalek nqp: None of them are yet implemented, but this is enough to get the test
11:35 dalek nqp: file to compile.
11:35 dalek nqp: review: https://github.com/perl6/nqp/commit/f847e7bd89
11:42 brrt joined #perl6
11:43 rurban joined #perl6
11:45 dalek nqp: 4b6c325 | jnthn++ | src/vm/jvm/runtime/org/perl6/nqp/sixmodel/SixModelObject.java:
11:45 dalek nqp: Extend JVM REPR API with multi-dim functions.
11:45 dalek nqp: review: https://github.com/perl6/nqp/commit/4b6c3251ee
11:49 masak I'm pretty happy with https://github.com/perl6/specs/commit/5f132abb41 -- jnthn++ -- especially the way it's based on actual usage.
11:50 colomon +1
11:50 jnthn :)
11:50 masak but (a) I have *never* set $_ manually and then done `when` stuff, so I'm pretty surprised about that usage :)
11:50 masak and (b) I have *never* nested `when`s, so I'm pretty surprised about that usage :)
11:50 masak (it does make sense, and I'll even consider (b) in the future)
11:50 jnthn masak: On (a), nor had I, and I'm not sure it's a pattern I'd use, but in a sense there's nothing wrong with it.
11:50 colomon Yeah, (b) seems like a great idea
11:50 jnthn And on (b), I think it can clean things up a good bit in some cases.
11:51 masak yeah.
11:51 masak I don't know of any other language that allows that.
11:51 DrForr m::2<_01>+1
11:51 DrForr m: :2<_01>+1
11:51 camelia rakudo-moar fadca9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Wverya0d6i␤Malformed radix number␤at /tmp/Wverya0d6i:1␤------> 3:2<7⏏5_01>+1␤    expecting any of:␤        number in radix notation␤»
11:51 abraxxa joined #perl6
11:51 DrForr ^^^ bug? Inasmuch as :2<0_1> is allowed. 0b_01 works in p5.
11:52 masak I think the rule is that _ must occur between digits.
11:52 masak m: say 100__000
11:52 camelia rakudo-moar fadca9: OUTPUT«5===SORRY!5===␤Only isolated underscores are allowed inside numbers␤at /tmp/EtvHVgMJ1w:1␤------> 3say 1007⏏5__000␤Confused␤at /tmp/EtvHVgMJ1w:1␤------> 3say 1007⏏5__000␤␤»
11:52 jnthn m: say _100_000 # interpreted as an identifier
11:52 camelia rakudo-moar fadca9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/HADQEGBoPT␤Undeclared name:␤    _100_000 used at line 1␤␤»
11:52 DrForr That's acceptable, I was wondering if it was an oversight.
11:52 masak yeah, I think parsing _01 in there would be inconsistent.
11:53 masak and there's no good use for that initial _ anyway
11:53 virtualsue joined #perl6
11:54 DrForr Agreed, there's no real use for it but they're allowed in p5.
11:54 DrForr m: :2<0_>
11:54 camelia rakudo-moar fadca9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Sr4RkyyTup␤Malformed radix number␤at /tmp/Sr4RkyyTup:1␤------> 3:2<0_7⏏5>␤    expecting any of:␤        number in radix notation␤»
11:54 DrForr Right.
11:54 masak t/spec/S17-lowlevel/lock.t failed test 7 and then aborted here during the spectest run.
11:55 masak not reproducible with `make t/spec/S17-lowlevel/lock.t` or `perl6 t/spec/S17-lowlevel/lock.t`
11:55 atroxaper joined #perl6
11:55 masak er, `t/spec/S17-lowlevel/lock.rakudo.moar`
11:55 abraxxa joined #perl6
11:56 FROGGS masak: that's a test file that usually gets skipped for releases fwiw
11:57 DrForr m: :3<0213>
11:57 camelia rakudo-moar fadca9: OUTPUT«===SORRY!===␤Invalid character '3' in number literal␤»
11:57 DrForr Nice.
11:57 DrForr Now for balanced ternary :)
11:58 kanl gurus, i'm experiencing some weirdness with eqv, and i can't quite golf it down. could someone please help me have a look at this code snipet? i'm at my wit's end with this :(
11:58 kanl https://gist.github.com/anonymous/571b2a3c97a6176a6ecf
11:59 kanl i even tried to print every element out, it's like staring straight at madness
12:00 kanl i'm fine with just using 'ne', but i still like to know why '!eqv' didn't work at expected..
12:01 kanl ^as
12:05 moritz kanl: eqv tests types as well (both from the container type and from the element types)
12:06 moritz kanl: so you should compare .^name from both sides too, if you want to know why eqv doesn't work
12:06 kanl ah, i see. so it's actually comparing Int Int and Str Str and getting True for both?
12:08 kanl err, not that. i see. container.
12:08 kanl moritz: thanks very much.
12:09 AlexDani` joined #perl6
12:10 brrt joined #perl6
12:11 kanl m: my @a = 'abc000'.comb: / \d+ | \D+ /; my @b = 'abc001'.comb: / \d+ | \D+ /; my @i = @a.keys.grep: { @a[$_] !eqv @b[$_] }; @i.say;
12:11 camelia rakudo-moar fadca9: OUTPUT«1␤»
12:11 kanl hmm. but shouldn't this golfed down form work the same way?
12:12 kanl this is behaving as expect.
12:12 kanl what had really made it different in the gist i posted though?
12:15 kanl now i'm really confused :/
12:16 kaare_ joined #perl6
12:19 timotimo o/
12:19 masak \o
12:21 masak kanl: your code in the gist is too complicated for me to understand and debug.
12:21 masak kanl: the fact that you golfed it down and *got rid of your problem* is an indication that it's too complicated for you to understand and debug, too :P
12:22 masak kanl: if you are unable to golf the problem down to something simpler, consider building your full solution out of simpler parts instead.
12:22 ShimmerFairy If you're using ne for string comparison, then you're looking for !eq , and not !eqv (since 'eq' is for string comparison like 'ne', 'eqv' is something different)
12:23 masak "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." -- Brian Kernighan
12:23 masak ShimmerFairy: that might be it.
12:23 masak ShimmerFairy++
12:24 kanl ShimmerFairy: well, there are chunks that are not Str, but Int, and i just thought eqv is a generic comparison that works for both Str and Int. but you're right, and like i said, i'd be fine with 'ne'. it has the same effect i wanted.
12:25 kanl it still doesn't explain the thing i just run in channel.
12:25 zakharyas1 joined #perl6
12:26 moritz what doesn't it explain?
12:26 masak it kinda does explain it.
12:26 * masak .oO( the burden of evidence that the bug reporter is not confused falls on the bug reporter )
12:26 moritz m: my @a = 'abc', '001'; my @b = 'abc', '000'; my @i = @a.keys.grep: { @a[$_] !eqv @b[$_] }; @i.say;
12:26 camelia rakudo-moar fadca9: OUTPUT«1␤»
12:27 ShimmerFairy Also, something like  / \d+ | \D+ /  would be more succinctly written as / .+ / , at least in the code sample you ran in the channel
12:27 moritz ShimmerFairy: no
12:27 ShimmerFairy ah, yeah, misunderstood the regex :)
12:27 moritz I don't see the problem in that snippet
12:27 moritz m: my @a = 'abc', '001'; my @b = 'abc', '000'; my @i = @a.keys.grep: { @a[$_] ne @b[$_] }; @i.say;
12:27 camelia rakudo-moar fadca9: OUTPUT«1␤»
12:27 moritz same result
12:27 masak you would've been right 'f't'were / [\d | \d]+ /
12:29 [Coke] TimToady: the original issue was that it int'd it at all; the request seems to be that given 'enum ABC <a b c>' that 'a++' should give 'b', not an int at all. if you disagree with that premise, then the current code is probably fine.
12:29 yoleaux 06:26Z <TimToady> [Coke]: c++ is an error because c is a constant, but c.succ gives 3 because c is really just a name for an integer
12:30 masak [Coke]: I disagree with that premise.
12:30 masak [Coke]: why would `a++` make sense if `a` is an enum?
12:31 masak m: True++
12:31 camelia rakudo-moar fadca9: OUTPUT«Cannot modify an immutable Bool␤  in block <unit> at /tmp/XlE16Z_7xd:1␤␤»
12:31 moritz a.pred, not a++
12:31 masak not in what [Coke] said above.
12:31 masak "...that 'a++' should give 'b'..."
12:31 moritz yes
12:31 ShimmerFairy a.succ you mean?
12:32 moritz erm, yes
12:32 moritz just a sign error :-)
12:32 dalek perl6-examples: 4123799 | paultcochrane++ | .travis.yml:
12:32 dalek perl6-examples: Use community-supported perl6 for Travis
12:32 dalek perl6-examples: review: https://github.com/perl6/perl6-examples/commit/4123799bed
12:32 ShimmerFairy m: say 42++
12:32 camelia rakudo-moar fadca9: OUTPUT«Cannot assign to an immutable value␤  in block <unit> at /tmp/USdw6Drs4h:1␤␤»
12:32 masak physicist :P
12:32 ShimmerFairy ^ that's why a++ shouldn't work
12:32 moritz masak: *bows*
12:32 masak ShimmerFairy: well, [Coke] (correctly) pointed out that it's *not* an Int, it's an enum.
12:33 moritz it's both, no?
12:33 ShimmerFairy masak: but why would you essentially do  a += 1  ?
12:33 moritz m: enum A <a b c>; say a ~~ Int
12:33 camelia rakudo-moar fadca9: OUTPUT«True␤»
12:33 moritz it's an Int.
12:33 moritz m: enum A <a b c>; say a.succ
12:33 camelia rakudo-moar fadca9: OUTPUT«1␤»
12:33 FROGGS m: enum A <a b c>; say a.succ; a
12:33 camelia rakudo-moar fadca9: OUTPUT«1␤»
12:33 FROGGS m: enum A <a b c>; say a.succ; say a
12:33 camelia rakudo-moar fadca9: OUTPUT«1␤a␤»
12:34 FROGGS m: enum A <a b c>; say a.succ; say +a
12:34 camelia rakudo-moar fadca9: OUTPUT«1␤0␤»
12:34 muraiki joined #perl6
12:34 FROGGS why would one try to modify the value of an enum?
12:34 FROGGS enums are pretty constant to me
12:34 ShimmerFairy precisely, if you mean a.succ then don't say a++ :P
12:34 * FROGGS nods
12:34 [Coke] masak,TimToady: original ticket is RT #92742
12:35 masak oh, aha.
12:35 masak https://rt.perl.org/Ticket/Display.html?id=92742
12:35 [Coke] the ticket is about .succ, not ++ - I took a shortcut.
12:35 masak and it has nothing to do with... right.
12:35 [Coke] which masak asked for. :P
12:35 masak it's not a shortcut that preserves semantics :)
12:36 [Coke] this is why I mentioned the ticket whenever I brought it up. :P
12:36 masak I'm sorry, I missed that.
12:36 kanl moritz: i see where the problem is now. it's { method AT-POS( *@i ) { @!list[@i] } }
12:37 kanl i'd changed it to AT-POS( $i ) { ... }
12:37 masak [Coke]: the ticket expects a string back. I don't anymore. I expect an enum back.
12:37 [Coke] down to 1,025 rakudo tickets.
12:37 [Coke] masak: I updated the subject to reflect that yesterday.
12:37 masak ah, sugoi.
12:37 ShimmerFairy masak: I think c.succ depends on what kind of mathematical model you want, whether you want it to loop (c.succ -> a), treat the bounds of the enum as though they were infinity or something (c.succ -> c), or something else/not-math-related (c.succ -> ERROR)
12:37 kanl moritz: so you're right. it's the container type, i.e. list being compared. thanks!
12:37 kanl moritz++
12:38 masak ShimmerFairy: it's spec that c.succ -> c
12:38 masak ShimmerFairy: if you want other semantics, define your own sub :)
12:38 ShimmerFairy ah, ok then :) I was unaware
12:38 [Coke] Please add a pointer to the design docs in the ticket to make me happy.
12:38 kanl thanks everybody for helping me debug!
12:39 [Coke] r: say "no hugmebot?"
12:39 camelia rakudo-{moar,jvm} fadca9: OUTPUT«no hugmebot?␤»
12:39 masak [Coke]: hum. I don't see any mention of .succ in S12...
12:39 masak but there's prior art :)
12:40 masak m: say False.pred; say True.succ
12:40 camelia rakudo-moar fadca9: OUTPUT«False␤True␤»
12:40 ShimmerFairy masak: Admittedly, the only number ring (if it's even the correct terminology) I know of off-hand is the one that makes 1/0 = ∞ , at the expense of nice everyday things (like 1 < 2)  :)
12:40 [Coke] m: say False.succ;
12:40 camelia rakudo-moar fadca9: OUTPUT«True␤»
12:40 masak ShimmerFairy: it's not the correct terminology :)
12:40 [Coke] m: say Bool.WHAT
12:40 camelia rakudo-moar fadca9: OUTPUT«(Bool)␤»
12:40 masak ShimmerFairy: you might be looking for a concept such as https://en.wikipedia.org/wiki/Cyclic_group
12:40 [Coke] m: say Bool ~~ Enum
12:40 camelia rakudo-moar fadca9: OUTPUT«False␤»
12:41 masak Enum is not what you think it is...
12:41 masak m: enum A <b c>; say A ~~ Enum
12:41 camelia rakudo-moar fadca9: OUTPUT«False␤»
12:41 masak m: enum A <b c>; say b ~~ Enum
12:41 camelia rakudo-moar fadca9: OUTPUT«False␤»
12:41 masak o.O
12:41 [Coke] m: say Bool ~~ enum
12:41 camelia rakudo-moar fadca9: OUTPUT«5===SORRY!5===␤Whitespace required after keyword 'enum'␤at /tmp/Ax08Hqkszk:1␤------> 3say Bool ~~ enum7⏏5<EOL>␤Undeclared routine:␤    enum used at line 1␤␤␤»
12:41 masak bloody Perl 6.
12:41 masak what the heck is Enum, then?
12:41 masak m: enum A <b c>; say b.WHAT
12:41 camelia rakudo-moar fadca9: OUTPUT«(A)␤»
12:41 [Coke] Anyway, I probably enough info to try to make the ticket work. Thanks TimToady, masak.
12:42 [Coke] m: say Enum.WHAT
12:42 camelia rakudo-moar fadca9: OUTPUT«(Enum)␤»
12:42 masak no, thank *you* :)
12:42 [Coke] ^^ :)
12:42 masak TimToady: one of us should spec .pred and .succ on enums.
12:42 breinbaas joined #perl6
12:43 ShimmerFairy masak: I *believe* this is what I was thinking of, though it's been a while since I read up on the weird variations on real numbers :)    https://en.wikipedia.org/wiki/Real_projective_line
12:43 masak oh, you were thinking of that one. yeah, that's more towards the direction of topology.
12:44 DrForr As long as it forms an algebraic field :)
12:45 masak yeah, that's what I thought ShimmerFairy was talking about :)
12:46 ShimmerFairy I used "ring" in the sense that it looks like one in the graphic :P
12:46 masak heh.
12:46 vendethiel joined #perl6
12:46 uncleyear joined #perl6
12:47 masak ShimmerFairy: in algebra, a ring is something with addition and multiplication, plus some simple laws that regulate those.
12:48 ShimmerFairy Yeah, I've seen that ring has a specific mathematical meaning before, so I had a sneaking suspicion I wasn't using it in the formally correct sense :)
12:48 DrForr You are correct, sir :)
12:52 jnthn .oO( algebreic topology taught me that two rings would make a donut, but the last thing I tried with two rings ended up with me married :P )
12:52 RabidGravy joined #perl6
12:52 moritz jnthn: were your wedding rings edible, at least? :-)
12:55 timotimo or perhaps eligible for trade-in at a Dunkin' Donuts?
12:56 jnthn moritz: I just tried, and wife gave me a funny look :P
12:57 masak jnthn: oh, in the sense of direct product, yes.
12:57 masak jnthn: but please call them "circles" :)
12:58 RabidGravy warm
12:58 jnthn But "if you liked it shoulda put a circle on it" breaks meter... :P
12:58 masak :P
12:59 masak the product space of two circles is a torus. you could think of the two original circles as helping to form the "inner tube" and the "hole in the middle", respectively.
12:59 RabidGravy adjustable by changing to other words though
12:59 RabidGravy two
13:03 espadrine_ joined #perl6
13:09 vendethiel joined #perl6
13:09 lucasb joined #perl6
13:11 muraiki jnthn++  # two rings joke
13:12 amurf joined #perl6
13:12 hoelzro good morning, #perl6
13:12 masak hoelzro! \o/
13:12 vendethiel o/ #perl6, \o hoelzro
13:13 masak vendethiel! \o/
13:13 hoelzro greetings masak, vendethiel
13:19 [Coke] gah, someone opened a ticket! it's going in the wrong direction!
13:19 FROGGS /o\
13:23 nwc10 [Coke]++ # fighting to reduce the ticket mountain
13:24 [Coke] jnthn++ and bartolin++ get all the credit these days.
13:25 [Coke] can someone give me a oneliner to see if a string is valid utf8?
13:26 moritz in Perl 6?
13:27 moritz try $buffer.decode('UTF-8'); say not $!
13:27 moritz if something is inside a Str, it's already been decoded, so not much point in checking
13:27 masak oh, say it ain't $!
13:29 [Coke] so, echo "possibly invalid" | perl6 -pe ".say" should squawk?
13:30 masak oh, this is a ticket, isn't it?
13:30 masak was this Zefram's ticket?
13:30 moritz [Coke]: yes
13:32 hoelzro [Coke]: sorry, that was me =/
13:32 hoelzro at least it's related to another ticket =P
13:38 cdc [Coke]:  echo $'\xff\xff' | perl6 -e '.say'
13:38 cdc (Any)
13:38 cdc however:
13:38 timotimo you need to .get.say or something
13:38 cdc m: Blob.new(\xff\xff).decode
13:38 camelia rakudo-moar fadca9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/p6a47tx7qA␤Unable to parse expression in argument list; couldn't find final ')' ␤at /tmp/p6a47tx7qA:1␤------> 3Blob.new(\xff\7⏏5xff).decode␤»
13:38 timotimo er
13:39 vytas joined #perl6
13:39 moritz m: Blob.new(0xff, 0xff).decode
13:39 camelia rakudo-moar fadca9: OUTPUT«Malformed UTF-8 at line 1 col 1␤  in block <unit> at /tmp/dOU8uRmg4a:1␤␤»
13:39 cdc m: Blob.new(0xff, 0xff).decode
13:39 camelia rakudo-moar fadca9: OUTPUT«Malformed UTF-8 at line 1 col 1␤  in block <unit> at /tmp/w2oNp0XuzF:1␤␤»
13:39 timotimo i meant perl6 -e 'get.say'
13:39 cdc moritz: you were faster :)
13:39 moritz cdc: I've been probably doing Perl 6 a bit longer than you did, too :-)
13:39 hoelzro I don't think Regex.gist/Regex.perl has any tests in roast; should it?
13:40 cdc moritz: for sure! :)
13:40 moritz hoelzro: the problem with both is that they have lots of variability in their output
13:40 cdc timotimo: $ echo $'\xff\xff'  | perl6 -e get.say
13:40 cdc Malformed UTF-8
13:40 hoelzro moritz: true
13:41 hoelzro I'm just thinking of doing RT #125383 real quick, and am wondering if I should add tests
13:42 kanl m: my $m = 0 but False; say ?$m; $m += 1; say ?$m; +$m += 1;
13:42 camelia rakudo-moar fadca9: OUTPUT«False␤True␤Cannot modify an immutable Int␤  in block <unit> at /tmp/lj_miRI_Hf:1␤␤»
13:43 FROGGS kanl: +$m results in a constant
13:44 FROGGS I mean, there is no container you can assign to
13:44 kanl oh. i.c but does += get applied to both 0 and False?
13:44 vytas joined #perl6
13:44 FROGGS I dunno
13:45 kanl it appears so.
13:46 kanl just want to know if it's the expected behavior
13:47 dalek rakudo/nom: bd0401b | hoelzro++ | src/Perl6/Actions.nqp:
13:47 dalek rakudo/nom: Include (regex|token|rule) if present in Regex.perl
13:47 dalek rakudo/nom:
13:47 dalek rakudo/nom: Fixes RT #125383
13:47 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/bd0401b22a
13:50 vytas joined #perl6
13:51 masak m: my $m = 0 but False; say $m.Bool
13:51 camelia rakudo-moar fadca9: OUTPUT«False␤»
13:51 moritz kanl: looks fne to me
13:51 moritz *fine
13:51 masak m: my $m = 0 but False; $m++; say $m.Bool
13:51 camelia rakudo-moar fadca9: OUTPUT«True␤»
13:51 masak m: my $m = -1 but False; $m++; say $m.Bool
13:51 camelia rakudo-moar fadca9: OUTPUT«False␤»
13:51 masak seems $m simply loses its `but`-ness.
13:52 masak just a normal Int after incrementing it.
13:52 kanl thanks for the clarification
13:54 masak m: class C { has $.x = 42; submethod BUILD {} }; say C.new.x
13:54 camelia rakudo-moar fadca9: OUTPUT«42␤»
13:55 masak oh, so attributes keep their default values, even in the presence of a submethod BUILD?
13:55 masak m: class C { has $.x = 42; submethod BUILD(:$.x) {} }; say C.new.x
13:55 camelia rakudo-moar fadca9: OUTPUT«Cannot find method 'STORE'␤  in submethod BUILD at /tmp/M2zHHBCwKr:1␤  in block <unit> at /tmp/M2zHHBCwKr:1␤␤»
13:56 masak m: class C { has $.x = 42; submethod BUILD(:$!x) {} }; say C.new.x
13:56 camelia rakudo-moar fadca9: OUTPUT«(Any)␤»
13:56 masak m: class C { has $.x = 42; submethod BUILD(:$!x = 5) {} }; say C.new.x
13:56 camelia rakudo-moar fadca9: OUTPUT«5␤»
13:56 masak m: class C { has $.x = 42; submethod BUILD(:$!x = 5) { $.x } }; say C.new.x
13:56 camelia rakudo-moar fadca9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/zQ0mW0_cGX␤Virtual call $.x may not be used on partially constructed objects␤at /tmp/zQ0mW0_cGX:1␤------> 3.x = 42; submethod BUILD(:$!x = 5) { $.x7⏏5 } }; say C.new.x␤    expecting any of:␤    …»
13:56 masak that "Virtual call" error message should probably happen for :$.x as well...
13:56 * masak submits rakudobug
13:57 vendethiel masak: for :$.x? you have :$!x
13:57 masak further up.
13:57 hoelzro timotimo: do you approve of my fix for https://rt.perl.org/Ticket/Display.html?id=125383?
13:59 espadrine_ joined #perl6
14:00 timotimo oh RT, come on! "Could not load ticket 125383?" %)
14:01 timotimo yeah, i do approve :)
14:02 hoelzro \o/
14:05 dalek rakudo/nom: 26bc4d5 | hoelzro++ | src/Perl6/Actions.nqp:
14:05 dalek rakudo/nom: Trim trailing whitespace from Regex source
14:05 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/26bc4d574b
14:07 masak m: class C { has $.x; has $.y = 42; submethod BUILD(:$!x) {} }; (.say for .x, .y) given C.new(:x(5))
14:07 camelia rakudo-moar fadca9: OUTPUT«5␤42␤»
14:07 masak \o/
14:08 skids joined #perl6
14:15 lucasb m: do { say 1 } if True
14:15 camelia rakudo-moar fadca9: OUTPUT«1␤»
14:15 lucasb m: do { say 1 } given True
14:15 camelia rakudo-moar fadca9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/fCJpGZs8zM␤Unsupported use of do...given; in Perl 6 please use repeat...while or repeat...until␤at /tmp/fCJpGZs8zM:1␤------> 3do { say 1 } given True7⏏5<EOL>␤»
14:16 lucasb I do see anything wrong if 'do {} given' or 'do {} for', but the error message tells me to use repeat for both cases
14:16 lucasb *with
14:17 lucasb *I don't see anything wrong with
14:18 masak it's because it considers `given` to be a loop.
14:18 masak I agree with you, that error message shouldn't trigger on do..given
14:18 masak lucasb: feel free to submit a rakudobug.
14:19 lucasb masak: ok, thanks. what's your opinion on 'do {} for ...' ?
14:22 diana_olhovik joined #perl6
14:27 pullphinger joined #perl6
14:29 Ven joined #perl6
14:40 lucasb "for @a { s/a/b/ }" works ok, but when I do "for $fh.lines { s/a/b/ }", I get "Cannot assign to an immutable value". It works if I add 'is copy', but not with 'is rw'.
14:40 VinceDee joined #perl6
14:41 timotimo right, the value you get passed from lines can't accept changes because of what the underlying storage is
14:42 virtualsue joined #perl6
14:42 lucasb timotimo: so, .lines return literal strings that are not stored in a container, right? ok, thanks.
14:43 timotimo at least that's my assumption
14:44 dalek nqp: 9a94d3e | jnthn++ | src/vm/jvm/QAST/Compiler.nqp:
14:44 dalek nqp: Add missing :tc argument.
14:44 dalek nqp: review: https://github.com/perl6/nqp/commit/9a94d3ea9d
14:44 dalek nqp: c1b189a | jnthn++ | src/vm/jvm/runtime/org/perl6/nqp/sixmodel/reprs/VMArrayInstance (11 files):
14:44 dalek nqp: Implement dimensions/set_dimensions in VMArray.
14:44 dalek nqp: review: https://github.com/perl6/nqp/commit/c1b189a600
14:44 dalek nqp: 79a13b0 | jnthn++ | src/vm/jvm/runtime/org/perl6/nqp/runtime/Ops.java:
14:44 dalek nqp: Implement [num|set|<?>]dimensions ops on JVM.
14:44 dalek nqp: review: https://github.com/perl6/nqp/commit/79a13b07c3
14:44 jnthn Yes, timotimo++ is correct.
14:45 timotimo BBIAB
14:45 jnthn Well, that's 14/188 tests...
14:45 timotimo if it's an S-shaped curve again, that's promising :)
14:48 b2gills `do { say 1 } given True` doesn't make sense to me unless you mean `{ say 1 }() given True`
14:51 khw joined #perl6
14:51 khw_ joined #perl6
14:51 cschwenz joined #perl6
14:52 b2gills ... or you want to change it to parse like `my $a = ({ say 1} given True);` instead of `(my $a = { say 1 }) given True`
14:53 b2gills m: sub f { { say 1 } given True }; say f
14:53 camelia rakudo-moar 26bc4d: OUTPUT«1␤True␤»
14:54 lucasb I used 'do {}' because I was playing with writing a 'for' statement modifier, followed by a 'given' statement modifier
14:55 cschwenz When testing, is there a version of is-approx() for which I can specify the tolerance?  (So, for example, if I wanted to verify a timing is within a microsecond [1e-6] of what I expect.)
14:55 lucasb I think I like chained/cascading statement modifiers, but I understand they are not supported
14:55 cschwenz Or do I have to roll my own?
14:55 dalek rakudo/nom: 4bdbe83 | lizmat++ | src/core/List.pm:
14:55 dalek rakudo/nom: Some cosmetics for easier testing
14:55 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/4bdbe83ff5
14:55 dalek rakudo/nom: 406aae9 | lizmat++ | src/core/native_array.pm:
14:55 dalek rakudo/nom: Give array[int|num].splice same as List.splice
14:55 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/406aae9a49
14:57 dalek roast: c3d8169 | lizmat++ | S32-array/splice.t:
14:57 dalek roast: Added support for array[int|num].splice testing
14:57 dalek roast:
14:57 dalek roast: Alas, there's still a lot of breakage, so still work in progress
14:57 dalek roast: review: https://github.com/perl6/roast/commit/c3d8169769
15:00 khw joined #perl6
15:02 lizmat afk again&
15:11 FROGGS joined #perl6
15:13 ugexe cschwenz: multi sub is-approx(Numeric $got, Numeric $expected, Numeric $tol, $desc = '') is export {
15:13 cschwenz ah, thanks ugexe!  :-)
15:14 ugexe there is a 5 argument version as well that takes these in place of Numeric $tol:
15:14 ugexe Numeric :$rel_tol = 1e-6, Numeric :$abs_tol = 0
15:15 dalek nqp: 2b4221c | jnthn++ | src/vm/jvm/runtime/org/perl6/nqp/sixmodel/SixModelObject.java:
15:15 dalek nqp: Multi-dim REPR API correctoins.
15:15 dalek nqp: review: https://github.com/perl6/nqp/commit/2b4221c13f
15:15 dalek nqp: ef20fbf | jnthn++ | src/vm/jvm/runtime/org/perl6/nqp/runtime/Ops.java:
15:15 dalek nqp: Implement generic multi-dim read/write ops.
15:15 dalek nqp: review: https://github.com/perl6/nqp/commit/ef20fbf1bc
15:15 dalek nqp: 404e842 | jnthn++ | src/vm/jvm/runtime/org/perl6/nqp/sixmodel/reprs/VMArrayInstanceBase.java:
15:15 dalek nqp: Implement multi-dim access funcs in VMArray.
15:15 dalek nqp: review: https://github.com/perl6/nqp/commit/404e84224e
15:16 jnthn *groan*
15:16 cognominal joined #perl6
15:16 jnthn Of all the words to typo...
15:25 muraiki haha
15:26 ugexe better revert
15:27 virtualsue joined #perl6
15:30 nys joined #perl6
15:34 spider-mario joined #perl6
15:34 cschwenz left #perl6
15:38 dalek nqp: a21ba08 | jnthn++ | src/vm/jvm/runtime/org/perl6/nqp/sixmodel/ (3 files):
15:38 dalek nqp: Stub in MultiDimArray REPR on JVM.
15:38 dalek nqp: review: https://github.com/perl6/nqp/commit/a21ba08043
15:44 itz__ is there any way of introspecting Int to show Int.DEFINITE?
15:48 TimToady m: say Int.DEFINITE
15:48 yoleaux 11:06Z <jnthn> TimToady: fixed, thanks!
15:48 camelia rakudo-moar 406aae: OUTPUT«False␤»
15:48 aborazmeh joined #perl6
15:48 aborazmeh joined #perl6
15:49 itz__ I was thing of something like Int.^methods displaying DEFINITE
15:49 itz__ errr s/thing/thinking
15:51 PerlJam itz__: since DEFINITE is macroish, probably not.
15:52 lucasb m: $_ = 'a1'; s/(\d+)/<$0>/; .say
15:52 camelia rakudo-moar 406aae: OUTPUT«a<1>␤»
15:52 lucasb m: my @a = <a1 b2 c3>; for @a { s/(\d+)/<$0>/ }; say @a
15:52 camelia rakudo-moar 406aae: OUTPUT«Use of Nil in string context  in code  at /tmp/dZX6Wl36PP:1␤a<> b<1> c<2>␤»
15:52 lucasb ^^ I think this is related to the bug mentioned a few days ago about the example in S05 "s:g[\$ <( \d+ )>] *= 2" not working with 'perl -pe'
15:52 lucasb In a for loop, it seems like $/ is only updated in the next iteration. Any confirm my interpretation?
15:52 lucasb *anyone
15:58 virtualsue joined #perl6
15:58 ShimmerFairy joined #perl6
16:07 * moritz confirms
16:08 Begi joined #perl6
16:10 Begi Hey ! I'm still trying to improve my Perl6. I've code a converter °C -> °F & °F -> °C. Can you take a look at it and tell me what can I improve ? Thansk for advance !
16:10 [Coke] url?
16:10 Begi The code is here : https://github.com/Emeric54/perl6/blob/master/convertisseur.p6
16:10 [Coke] while 1 -> loop
16:11 Begi Oh yes, I always forget :/
16:11 hoelzro sub mode1/mode2 could easily be a multi
16:13 dalek nqp: 032f577 | jnthn++ | src/vm/jvm/runtime/org/perl6/nqp/sixmodel/reprs/MultiDimArray (2 files):
16:13 dalek nqp: Fill out MultiDimArray base class.
16:13 dalek nqp:
16:13 dalek nqp: Has the storage-type-independent bits.
16:13 dalek nqp: review: https://github.com/perl6/nqp/commit/032f577b42
16:13 Begi homzro  : a multi sub ?
16:14 jnthn multi sub mode('1') { ... }; multi sub mode('2') { ... }
16:15 jnthn But even putting that aside, then:
16:15 jnthn if $mode eq '1' { ... } elsif $mode eq '2' { ... } else { ... } would be prettier with given/when
16:16 jnthn given $mode { when '1' { ... } when '2' { ... } default { ... } }
16:18 itz__ and just allow temps to be entered as 23C or 70F rather than using a numerical mode
16:18 jnthn That'd also be nice :)
16:18 Begi Good idea :) I'll try to correct that, thanks :)
16:19 TEttinger joined #perl6
16:21 Begi In fact, what are the adavantages of given?
16:21 uncleyea1 joined #perl6
16:22 jnthn Begi: The most immediate one is avoiding mentioning the $mode variable multiple times
16:22 jnthn Begi: And when you get things to a single use, you can sometimes eliminate them
16:23 jnthn e.g. given selectMode() { when '1' { ...} ... }
16:25 petercommand joined #perl6
16:28 Begi Ok, thanks. I'll try to use it more often :) I hop it's better now : https://github.com/Emeric54/perl6/blob/master/convertisseur.p6
16:28 telex joined #perl6
16:29 domidumont joined #perl6
16:29 Begi If it's correct now, I'll try to do like itz said
16:36 [Coke] the say should be in a default {} block.
16:36 [Coke] otherwise I'd expect it to say that after anything but 3 was picked.
16:39 Begi Coke : Where should I place the say ?
16:39 [Coke] given $mode { when '1' { ... } when '2' { ... } default { PUT SAY HERE } }
16:39 virtualsue_ joined #perl6
16:39 [Coke] it's the default - it's what you get when none of the when blocks match.
16:40 [Coke] where's the GLR these days?
16:40 Begi you answered my question :) Thnaks for all !
16:41 [Coke] Begi: ~~
16:45 [Coke] Are the macros we have going to be left in for Christmas?
16:45 [Coke] Or are they going to be removed and come back later(/better/stronger/whatever)
16:46 [Coke] (we don't really have a way to tag something as a macro-related ticket. thinking of adding [MACRO] to all of them in RT for easier sorting.
17:00 xinming joined #perl6
17:24 virtualsue joined #perl6
17:37 vendethiel joined #perl6
17:47 tinyblak joined #perl6
17:48 virtualsue_ joined #perl6
17:48 diana_olhovik joined #perl6
17:54 Alina-malina joined #perl6
17:57 diana_olhovik joined #perl6
18:03 vendethiel joined #perl6
18:14 masak [Coke]: I have no horse in the race of whether macros should be left in.
18:15 masak [Coke]: I think they see little use in the ecosystem, but nevertheless use. so I'd be inclined to leave them in unless I hear a strong argument against.
18:15 masak (one of jnthn's modules uses them, for example)
18:16 masak [Coke]: feel free to add [MACRO] to all such RT tickets. I think the union of the searches for 'macro' and 'quasi' will find everything macro-related in RT.
18:16 moritz masak: https://news.ycombinator.com/item?id=9864824 your maze blog post from February is on the hn front page
18:16 masak huh :)
18:18 masak grr, gotta find and fix that string-handling bug.
18:18 masak I meant to look at that today... but I got distracted by a really successful greenfield Perl 6 thing.
18:28 brrt joined #perl6
18:36 virtualsue joined #perl6
18:42 brrt left #perl6
18:45 b2gills .tell Begi This is how I might have started: `loop {␤prompt('> ') ~~ /^ \h* $<d> = ['-'?\d+] \h* $<s> = <[CF]> \h* $/;␤given $<s> {␤when 'C' { say "$<d> °C = { $<d>  * (9/5) + 32 } °F" }␤when 'F' {  say "$<d> °F = { ($<d> - 32) * (5/9) } °C" }␤default { last }␤}␤}␤` ( What you have is perfectly fine as well )
18:45 yoleaux b2gills: I'll pass your message to Begi.
18:49 [Tux] joined #perl6
18:50 domidumont joined #perl6
19:00 [TuxCM] joined #perl6
19:11 virtualsue joined #perl6
19:42 ugexe freebsd recently (9th or 10th) started failing the last test of t/spec/S17-supply/start.t on MoarVM only (expected: [1, 1] got: [1, 1])
19:42 ugexe https://gist.github.com/ugexe/6464a5d63b1ecf9a1dd0
19:45 masak quick poll: has anyone ever had to deal with processing instructions inside of their XML, HTML, or SGML? ('deal with' means either parse them, add them, or manipulate them in the document.)
19:48 hobbs masak: occasionally. <?xml-stylesheet?> :)
19:48 masak oh, ok. yeah, that's the example Wikipedia had, too.
19:49 [TuxCM] masak, I used xslt for that
19:49 [TuxCM] and later also LibXML
19:49 masak [TuxCM]: ...to parse PIs?
19:49 [TuxCM] then I guess I misunderstood
19:50 [TuxCM] adding/deleting/changing attributes/namespaces/subsections
19:50 masak ah, yes. sounds like the non-PI parts of XML :)
19:51 [TuxCM] fwiw speed is really bad today: 45/44
19:51 masak I can't recall ever seeing a processing instruction in the wild. I hadn't heard of the <?xml-stylesheet?> one until today.
19:57 vendethiel joined #perl6
20:00 bin_005 joined #perl6
20:01 MueThoS76 joined #perl6
20:02 MueThoS76 left #perl6
20:04 bartolin ugexe: I run daily spectests on freebsd (10.1) and don't see failures in S17-supply/start.t
20:05 dalek rakudo/nom: 5f7ce71 | lizmat++ | src/core/native_array.pm:
20:05 dalek rakudo/nom: Don't bother type checking, the guts will do it
20:05 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/5f7ce715f7
20:06 lizmat S17-supply/start.t is a flapper for me, it flaps more or fewer times depending on the build  :-(
20:06 lizmat aka, an unrelated change can make it flap more or fewer times
20:07 geekosaur yep. I've seen it flap on OS X and Linux as well
20:08 bin_005_v joined #perl6
20:09 bartolin hmm. I don't run tests parallel, maybe that's the reaseon for clean tests of that file
20:21 ugexe i ran the test by itself and continue to get the same result
20:22 ugexe in windows/linux using moar and jvm (or freebsd jvm) i cant get it to fail
20:24 jnthn It's only a gut feeling and I've no basis for this at all, but it seems the OSX memory and threading libraries are somehow good at showing up issues more often than they show up on other platforms.
20:26 bartolin could the c compiler used explain the different behaviour (ugexe++ gets failures on freebsd, I do not)?
20:27 kaare_ joined #perl6
20:28 dalek roast: e26327b | usev6++ | S06-signature/type-capture.t:
20:28 dalek roast: Add test for RT #114724
20:28 dalek roast: review: https://github.com/perl6/roast/commit/e26327b1b1
20:29 geekosaur hm, actually, come to think of it I don;'t think I'd seen that test flap on OS X. (not actually on OS X at the moment, and recent builds have all been Linux)
20:30 geekosaur SO X and fbsd use the same compiler (assuming recent fbsd). threading is fairly different though
20:32 vendethiel joined #perl6
20:36 jnthn sleep time &
20:47 lizmat good night, jnthn
20:49 dalek rakudo/nom: 97ebe47 | lizmat++ | src/core/ (5 files):
20:49 dalek rakudo/nom: No word parcels for descriptive texts, skids++
20:49 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/97ebe4764f
20:55 dha joined #perl6
20:57 lizmat .tell skids Looks like https://github.com/rakudo/rakudo/blob/nom/src/core/Block.pm#L307 will never be reached
20:57 yoleaux lizmat: I'll pass your message to skids.
21:05 bartolin ugexe: I stand corrected: I was able to get a failure with S17-supply/start.t on freebsd (build from 24 hours ago)
21:05 [Coke] %ENV{$key} = nqp::p6box_s(nqp::iterval($envelem)); # causes things to die if env vars contain invalid UTF8.
21:05 bartolin it failed with "expected: [1, 1] got: [1]"
21:05 [Coke] RT #125420
21:06 [Coke] ^^ Should env be a hash of bytes instead of strings?
21:06 vendethiel joined #perl6
21:07 bin_005_v joined #perl6
21:09 ohb joined #perl6
21:11 masak [Coke]: that sounds both like a solution and like an unfortunate solution at the same time... :/
21:11 masak [Coke]: when thinking about it, I find I would prefer some seemingly impossible "best of both worlds" solution.
21:12 geekosaur envars are bytestrings on POSIX
21:12 masak something like, if it's utf8-decodable, I will get a Str, no fuss. if it isn't, I can still get it as a Buf or something.
21:13 masak in particular, the program should not fail just because %*ENV contains something not utf8-decodable.
21:13 * masak names this tendency "utf8 chauvinism"
21:14 [Coke] doable if we try to create a string, catch an exception, and then fallback to a blob.
21:14 [Coke] m: say Int < 0;
21:14 camelia rakudo-moar 5f7ce7: OUTPUT«Invocant requires a 'Int' instance, but a type object was passed.  Did you forget a .new?␤  in block <unit> at /tmp/FxDY0SnX9r:1␤␤»
21:14 masak yes, but...
21:14 [Coke] m: say "cat" gt Str;
21:14 camelia rakudo-moar 5f7ce7: OUTPUT«Use of uninitialized value of type Str in string context  in block <unit> at /tmp/2imsHVEvga:1␤True␤»
21:14 hobbs making it always bytes is a pain, but less of a source of bugs
21:14 masak ...anytime we create such a mixed %*ENV hash, it becomes much harder to program against.
21:15 masak at the very least, people will assume it's always Str all over the place.
21:15 masak maybe this actually merits its own Str|Buf-like type, something that puts people through the motions of always checking.
21:15 * masak .oO( the solution to typing-related problems: more types! )
21:16 [Coke] m: use Test; throws-like '"cat" gt Str', X::AdHoc
21:16 camelia rakudo-moar 5f7ce7: OUTPUT«    1..2␤Use of uninitialized value of type Str in string context  in block <unit> at EVAL_0:1␤    not ok 1 - '"cat" gt Str' died␤    ␤# Failed test ''"cat" gt Str' died'␤# at /tmp/aE2piWwcKE line 1␤    ok 2 - # SKIP Code did not die, can not c…»
21:16 [Coke] m: use Test; throws-like '1 > Int', X::AdHoc
21:16 camelia rakudo-moar 5f7ce7: OUTPUT«    1..2␤    ok 1 - '1 > Int' died␤    ok 2 - right exception type (X::AdHoc)␤ok 1 - did we throws-like X::AdHoc?␤»
21:16 [Coke] ^^ That seems inconsistent.
21:16 masak this is a problem with filenames/paths as well.
21:17 masak [Coke]: you have to put the expected-failing code in a block.
21:17 masak [Coke]: likely you are getting an X::AdHoc in the second case for the wrong reasons.
21:18 [Coke] S03-operators/misc.t ends with several tests where it is not a block.
21:18 [Coke] I had just copied that.
21:18 masak hm, maybe there's a string version... :/
21:18 masak what's the advantage of having it as strings, I wonder... maybe if a parsefail is expected.
21:19 [Coke] m: use Test; throws-like {1 > Int}, X::AdHoc
21:19 camelia rakudo-moar 5f7ce7: OUTPUT«    1..2␤    ok 1 - code dies␤    ok 2 - right exception type (X::AdHoc)␤ok 1 - did we throws-like X::AdHoc?␤»
21:19 [Coke] m: use Test; throws-like {Str gt "cat"}, X::AdHoc
21:19 camelia rakudo-moar 5f7ce7: OUTPUT«    1..2␤Use of uninitialized value of type Str in string context  in block  at /tmp/d5GIbA40QU:1␤    not ok 1 - code dies␤    ␤# Failed test 'code dies'␤# at /tmp/d5GIbA40QU line 1␤    ok 2 - # SKIP Code did not die, can not check exception␤…»
21:19 [Coke] ^^ same
21:20 masak ok.
21:20 masak I agree that it's inconsistent.
21:20 dalek roast: 99a57ae | coke++ | S03-operators/misc.t:
21:20 dalek roast: Add tests for RT#93978
21:20 dalek roast: review: https://github.com/perl6/roast/commit/99a57ae764
21:20 masak I don't know of a good reason why it should be inconsistent.
21:20 [Coke] ^^ that ticket.
21:29 lizmat m: "cat" gt Str
21:29 camelia rakudo-moar 97ebe4: OUTPUT«Use of uninitialized value of type Str in string context  in block <unit> at /tmp/RFf59fcpgW:1␤»
21:30 lizmat I don't see anything inconsistent ?
21:30 [Coke] Perhaps it's failing instead of throwing.
21:30 [Coke] lizmat: the test function thinks it's different.
21:30 [Coke] m: "cat" gt Str; 2+3;
21:30 camelia rakudo-moar 97ebe4: OUTPUT«WARNINGS:␤Useless use of "gt" in expression "\"cat\" gt Str" in sink context (line 1)␤Use of uninitialized value of type Str in string context  in block <unit> at /tmp/3h9mXb6tWI:1␤»
21:32 lizmat but but: "cat" gt Str only warns ??
21:32 lizmat it does not die
21:33 lizmat hence the throws-like fails ?
21:34 dha So. in the p5->p6 project, I've done perlvar, perlfunc, and perlop.
21:35 dha Any suggestions what I should make the next thing? Assuming I should just run away screaming, of course.
21:37 masak well, first off, dha++
21:38 dha s/should/shouldn't/
21:38 * dha bows
21:38 [Coke] dha++, of course.
21:39 masak dha: "should" seems oddly apt, too :P
21:40 dha Well, yes. :-)
21:40 Hor|zon joined #perl6
21:42 vendethiel joined #perl6
21:43 masak dha: here are the ones I think would be interesting to see a translation of: perlrun, perllol, perlre*, perlootut
21:43 dha I was thinking of looking at perlsyn, but since things like while and for loops are not solidly documented for p6... ugh.
21:43 masak "solidly documented"? at least those things are quite stable at this point.
21:43 masak and you can always ask here.
21:43 dha True.
21:44 masak in a way, Perl 6 syntax is in a better position than Perl 5 syntax, because STD.pm6 is more readable than toke.c
21:48 masak m: class C { has $.x is required; submethod BUILD(:$!x) {} }; say C.new.x
21:48 camelia rakudo-moar 97ebe4: OUTPUT«(Any)␤»
21:48 dha I imagine that's true, but in reality, the concept of "you can just look at the source code!" isn't actually useful for most people trying to program stuff.
21:49 masak is this... expected behavior? does the :$!x in a BUILD parameter trump the 'is required' trait of the attribute?
21:50 masak dha: I meant that it might be useful for people trying to port perlsyn.
21:50 dha *nod*
21:56 atroxaper joined #perl6
21:56 RabidGravy I also think there should be some equivalent to perlipc but it's so different I don't think a straight port is a good idea
22:03 RabidGravy but hey I can do MP3 encoding now, not quite sure that it's fast enough to do it "live" but I'll test tomorrow
22:07 dalek roast: 5e2ad04 | lizmat++ | S32-array/splice.t:
22:07 dalek roast: Some more splice testing, still in progress
22:07 dalek roast: review: https://github.com/perl6/roast/commit/5e2ad04eb8
22:07 dalek roast: 29a3ff9 | lizmat++ | S0 (2 files):
22:07 dalek roast: Merge branch 'master' of https://github.com/perl6/roast
22:07 dalek roast: review: https://github.com/perl6/roast/commit/29a3ff9673
22:09 lizmat and with that I wish #perl6 good night!
22:11 masak 'night, lizmat
22:20 cognominal not sure how to use run to create a pipe.
22:20 yoleaux 01:37Z <b2gills> cognominal: `say True.'!'()` calls a method by its name at runtime ( think `$a."$b"()` parens are required ). Currently to call  a prefix operator as a method: `say True.&prefix:<!>` ( any code reference would work `$b = &say; $a.$b` ) I think? S03 should be changed to match
22:20 cognominal how would I do a   ls|    with a run?
22:22 cognominal m: say True.'!'()
22:22 camelia rakudo-moar 97ebe4: OUTPUT«Method '!' not found for invocant of class 'Bool'␤  in block <unit> at /tmp/R_mwsQfd6n:1␤␤»
22:22 lucasb m: .say for run('ls', :out).out.lines[^5]
22:22 camelia rakudo-moar 97ebe4: OUTPUT«run is disallowed in restricted setting␤  in sub restricted at src/RESTRICTED.setting:1␤  in sub run at src/RESTRICTED.setting:14␤  in block <unit> at /tmp/UaAmhc2Y5k:1␤␤»
22:22 lucasb oops
22:22 cognominal m: say True.&prefix:<!>
22:22 camelia rakudo-moar 97ebe4: OUTPUT«False␤»
22:22 cognominal m: say True.&prefix:<!>()
22:22 camelia rakudo-moar 97ebe4: OUTPUT«False␤»
22:23 lucasb cognominal: that's how I think it could be
22:23 lucasb ^^
22:23 cognominal thx lucasb
22:24 cognominal runs fine
22:48 masak 'night, #perl6
22:51 raiph joined #perl6
22:53 skids joined #perl6
22:56 Exodist joined #perl6
22:57 dj_goku joined #perl6
22:57 dj_goku joined #perl6
22:59 muraiki joined #perl6
23:01 skids o/
23:01 yoleaux 20:57Z <lizmat> skids: Looks like https://github.com/rakudo/rakudo/blob/nom/src/core/Block.pm#L307 will never be reached
23:02 skids .tell lizmat proceed resumes matching when clauses.  Also that code is temporary and we'll just throw those once .assuming has burned it wrt ecosystem falout.
23:02 yoleaux skids: I'll pass your message to lizmat.
23:10 vendethiel joined #perl6
23:18 tony-o m: say 5.^infix:<+>(5);
23:18 camelia rakudo-moar 97ebe4: OUTPUT«Method 'infix:<+>' not found for invocant of class 'Perl6::Metamodel::ClassHOW'␤  in block <unit> at /tmp/GbhOhkGEXi:1␤␤»
23:18 tony-o m: say 5.&infix:<+>(5);
23:18 camelia rakudo-moar 97ebe4: OUTPUT«10␤»
23:18 tony-o m: say 5.&infix:<+>(5,6,7);
23:18 camelia rakudo-moar 97ebe4: OUTPUT«Too many positionals passed; expected 0 to 2 arguments but got 4␤  in block <unit> at /tmp/cLybWXozUp:1␤␤»
23:29 Hor|zon joined #perl6
23:29 skids That reminded me... does anyone keep a dogpile of ecosystem+any other per6 code they find, such that it can all be grepped?  I'd be interested to know where .assuming is already bein used.
23:36 telex joined #perl6
23:39 geekosaur joined #perl6
23:44 atroxaper joined #perl6
23:45 leont joined #perl6
23:47 AlexDani` joined #perl6
23:47 TEttinger joined #perl6
23:48 AlexDaniel m: loop (my $i = 0; $i <= 5; $i++;) { say }
23:48 camelia rakudo-moar 97ebe4: OUTPUT«5===SORRY!5=== Error while compiling /tmp/YgalfVZJ4f␤Missing block␤at /tmp/YgalfVZJ4f:1␤------> 3loop (my $i = 0; $i <= 5; $i++7⏏5;) { say }␤»
23:49 AlexDaniel m: loop (my $i = 0; $i <= 5; $i++ {;) { say }
23:49 camelia rakudo-moar 97ebe4: OUTPUT«5===SORRY!5=== Error while compiling /tmp/8DFY0Mjfta␤Unexpected block in infix position (missing statement control word before the expression?)␤at /tmp/8DFY0Mjfta:1␤------> 3loop (my $i = 0; $i <= 5; $i++7⏏5 {;) { say }␤    expecting any …»
23:49 AlexDaniel sure the code is wrong, but what does this error message mean
23:49 AlexDaniel "missing block", then I give it a block and it says "unexpected block"
23:50 skids In the second one, it is ike you said:
23:50 skids m: my $i; $i++ { }
23:50 camelia rakudo-moar 97ebe4: OUTPUT«5===SORRY!5=== Error while compiling /tmp/somNcZTmOb␤Unexpected block in infix position (missing statement control word before the expression?)␤at /tmp/somNcZTmOb:1␤------> 3my $i; $i++7⏏5 { }␤    expecting any of:␤        infix␤     …»
23:50 TimToady std: loop (my $i = 0; $i <= 5; $i++;) { say }
23:50 camelia std 28329a7: OUTPUT«5===SORRY!5===␤Malformed loop spec at /tmp/7S0kI3Pi34 line 1:␤------> 3loop (my $i = 0; $i <= 5; $i++7⏏5;) { say }␤    expecting any of:␤   POST␤   postfix␤        postfix_prefix_meta_operator␤Parse failed␤FAILED 00:00 137m␤»
23:50 TimToady I like STD's message better
23:51 AlexDaniel TimToady: now that's an error message!
23:51 AlexDaniel skids: ok, but if it wants a block, what is the right way to make it eat it?
23:51 AlexDaniel I mean, sure it does not make sense, but if the compiler asks for it...
23:52 TimToady it doesn't really want a block there
23:52 TimToady it's just loosing track of its immediate goal and reporting on the outer goal
23:52 TimToady *losing
23:53 AlexDaniel well, since the message could be better I think I will report it. Although it is not a big issue at all
23:53 TimToady probably LHF for someone
23:54 AlexDaniel should I mark it as lhf?
23:54 TimToady sure
23:54 AlexDaniel great
23:55 vendethiel joined #perl6
23:56 AlexDaniel it is the only place in the world where I could come with a tiny issue like this and people will take it seriously :)
23:56 AlexDaniel so great.
23:57 TimToady just means we're neglecting all the important things :)

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

Perl 6 | Reference Documentation | Rakudo