Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2015-01-12

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:04 denis_boyun joined #perl6
00:28 b2gills .tell boski: just ask... someone will reply, even when not immediately ( we even have ways of telling you later, like this for example )
00:28 yoleaux b2gills: What kind of a name is "boski:"?!
00:29 b2gills .tell broski: just ask... someone will reply, even when not immediately ( we even have ways of telling you later, like this for example )
00:29 yoleaux b2gills: What kind of a name is "broski:"?!
00:30 b2gills ( first time trying to use it )
00:30 b2gills .tell broski just ask... someone will reply, even when not immediately ( we even have ways of telling you later, like this for example )
00:30 yoleaux b2gills: I'll pass your message to broski.
00:38 colomon joined #perl6
00:44 kurahaupo joined #perl6
01:00 broski joined #perl6
01:08 broski which vm is better, moar or parrot?
01:08 yoleaux 00:30Z <b2gills> broski: just ask... someone will reply, even when not immediately ( we even have ways of telling you later, like this for example )
01:11 yeahnoob joined #perl6
01:18 skids broski: moarvm is currently more performant for perl6 purposes.
01:19 BenGoldberg There are still some parts of the spec which parrot does more correctly, though.
01:19 BenGoldberg (IIRC)
01:19 kurahaupo joined #perl6
01:21 colomon BenGoldberg: that's probably true, but there are also areas of the spec which Moar does more correctly.  It's not just speed vs. correctness.
01:27 broski ok
01:46 davido_ joined #perl6
01:53 adu joined #perl6
02:14 skids r: (1, :f, :g).perl.say; (:f :g).perl.say; (1, :f :g).perl.say
02:14 camelia rakudo-parrot 04ce88: OUTPUT«WARNINGS:␤Useless use of "," in expression "1, :f :g" in sink context (line 1)␤(1, "f" => Bool::True, "g" => Bool::True)␤duplicate named argument in call␤  in block <unit> at /tmp/tmpfile:1␤␤»
02:14 camelia ..rakudo-moar 04ce88: OUTPUT«(1, "f" => Bool::True, "g" => Bool::True)␤("f" => Bool::True, "g" => Bool::True)␤(1, "f" => Bool::True)␤»
02:18 adu joined #perl6
02:21 Rounin joined #perl6
02:23 rmgk_ joined #perl6
02:24 kurahaupo joined #perl6
02:39 japhb .botsnack
02:39 yoleaux 11 Jan 2015 10:30Z <timotimo> japhb: now the log is filled with lines of Run command exited with exit status 1: install/bin/perl6 --optimize=3 /home/timo/oldhome/timo/perl6/bench/perl6/rc-forest-fire 16 16 inf
02:39 yoleaux :D
02:40 japhb 'inf' ...?
02:40 * japhb wonders WTH that is about
02:47 adu so if I want to slurpify params
02:48 adu *@args or @*args?
02:49 adu ah, *@theRest
02:49 adu I love TFM
02:51 adu expected 'Positional[Any]' but got 'Array'
02:51 adu I thought Arrays were positional
02:52 adu expected 'Positional[Any]' but got 'List'
03:00 colomon m: say Array ~~ Positional
03:00 camelia rakudo-moar 04ce88: OUTPUT«True␤»
03:01 colomon m: say Array ~~ List
03:01 camelia rakudo-moar 04ce88: OUTPUT«True␤»
03:02 kurahaupo joined #perl6
03:02 japhb adu: Show the broken code.
03:03 japhb .tell timotimo  I cannot recreate the rc-forest-fire problem you are seeing, with either rakudo-moar/nom or rakudo-jvm/nom.
03:03 yoleaux japhb: I'll pass your message to timotimo.
03:04 skids m: say so Array ~~ Positional[Any]; say so Array ~~ Positional;
03:04 camelia rakudo-moar 04ce88: OUTPUT«False␤True␤»
03:04 adu japhb: https://github.com/andydude/p6-c-parser/blob/cast-version-2/lib/CAST/Op.pm6#L62
03:06 skids You sure the error isn't when assigning to @.children?
03:07 adu skids: I'm trying to make a "simple" AST that is a little more complicated that multiple "has"s
03:08 adu skids: it's a different error now
03:09 adu how it says "Cannot look up attributes in a type object"
03:09 adu when I do my $x = CAST::Op.new(CAST::Op::OpKind::predec, 1, 2, 3)
03:11 skids Hrm aren't bracketless class definitions only allowed on first line?
03:12 vendethiel joined #perl6
03:12 adu skids: no, they're only allowed if they are the whole file
03:20 adu I think maybe I need a better understanding of roles
03:26 davido_ joined #perl6
03:26 JimmyZ adu: maybe ([$operator, *@operands]) ?
03:29 cognominal joined #perl6
03:29 noganex_ joined #perl6
03:35 adu JimmyZ: in the definition of new?
03:35 adu do I have to call bless?
03:36 adu do I have to call BUILD, BUILDALL, BUILDPLAN somewhere?
03:38 skids Oh, yeah, of course... you should be calling bless as the return value of the block.
03:38 skids e.g. bless(*,:children(@operators) :op($operator))
03:40 IllvilJa joined #perl6
03:41 adu what does bless do?
03:41 adu is Perl6 new() like Python __init__ or __new__?
03:42 skids does all the BUILD stuff I think.  I think it's been refactored since I last read that part of the spec.
03:42 JimmyZ self.bress(:op($operator), :children(@operands));
03:42 JimmyZ *bless
03:43 geekosaur new calls BUILDALL calls BUILD, which is what you normally define instead of new
03:44 JimmyZ adu:  try  change to above
03:44 adu so is BUILD like Python __init__?
03:44 skids Don't you need the "*" in the call to bless to pass other nameds from subclasses?
03:44 skids I don't know any python so...
03:44 adu skids: I don't know, I've never done oop in Perl5 or Perl6, so this is all new to me
03:45 skids As far as I know, overloading new is primarily for changing the signature and preprocessing arguments to the constructor,
03:46 JimmyZ adu: https://github.com/japhb/perl6-bench/blob/master/perl6/point_class_add1 #here has a BUILD , it doesn't need BUILD by deafult , but here have because rakudo optimization sucks.
03:46 adu so python's default T.__new__() is defined as: self = object.__new__(T); self.__init__(), so any object construction must be done in __new__, and any property assignment usually happens in __init__
03:46 vendethiel joined #perl6
03:46 JimmyZ since it's a benchamrk
03:46 JimmyZ *mark
03:46 adu ah, so BUILD is __init__ and new is __new__
03:46 adu that makes sense
03:47 JimmyZ BUILD is building attr value.
03:48 JimmyZ you don't need it normally if rakudo's optimization is good enough.
03:48 adu I'm thinking of just going without BUILD and new and just using the default impls
03:49 JimmyZ yeah
03:49 skids No it's more like new is a wrapper around bless which is about like python's __new__
03:50 adu bcuz I like the whole Op.new(:$op, :@children)
03:50 adu I wish you could do that in other languages
03:50 JimmyZ rakudo doesn't have pos args of new, you need declarse it yourself
03:50 adu yeah, but I like the keyword args
03:51 adu because that's the same as Op.new(op => $op, children => @children)
03:51 JimmyZ yes
04:06 kaare__ joined #perl6
04:13 vendethiel joined #perl6
04:32 kaleem joined #perl6
04:46 vendethiel joined #perl6
05:03 tony-o yea it still segfaults
05:03 tony-o oops
05:15 vendethiel joined #perl6
05:37 dayangkun joined #perl6
05:38 vendethiel joined #perl6
06:15 Rounin joined #perl6
06:21 moritz \o
06:33 flussence joined #perl6
06:49 denis_boyun_ joined #perl6
06:55 Ugator joined #perl6
06:56 kaleem joined #perl6
07:02 JimmyZ morning #perl6
07:04 lsm-desktop joined #perl6
07:06 sirdancealot joined #perl6
07:11 Psyche^ joined #perl6
07:14 adu hi moritz JimmyZ
07:18 yeahnoob joined #perl6
07:19 sergot morning o/
07:19 yeahnoob joined #perl6
07:19 yeahnoob joined #perl6
07:20 yeahnoob joined #perl6
07:21 yeahnoob joined #perl6
07:22 yeahnoob joined #perl6
07:28 jluis joined #perl6
07:44 andreoss joined #perl6
07:45 andreoss m: multi foo([]) {"empty"}; my @x = 1..*; say foo(@x);
07:45 camelia rakudo-moar 04ce88: OUTPUT«empty␤»
07:47 [Tux] joined #perl6
07:47 virtualsue joined #perl6
07:48 andreoss left #perl6
07:52 yeahnoob joined #perl6
07:53 [Sno] joined #perl6
08:00 rurban joined #perl6
08:01 FROGGS joined #perl6
08:04 rindolf joined #perl6
08:07 zakharyas joined #perl6
08:08 zhanggong joined #perl6
08:08 denis_boyun___ joined #perl6
08:08 zhanggong joined #perl6
08:09 zhanggong joined #perl6
08:11 yeahnoob joined #perl6
08:12 yeahnoob joined #perl6
08:13 yeahnoob joined #perl6
08:13 anaeem1_ joined #perl6
08:14 yeahnoob joined #perl6
08:23 [Tux] joined #perl6
08:24 anaeem1__ joined #perl6
08:31 darutoko joined #perl6
08:39 andreoss joined #perl6
09:00 salv0 joined #perl6
09:14 abraxxa joined #perl6
09:20 uniejo joined #perl6
09:20 telex joined #perl6
09:20 pecastro joined #perl6
09:24 dakkar joined #perl6
09:35 rurban joined #perl6
09:46 kjs_ joined #perl6
09:50 mvuets joined #perl6
09:52 kjs_ joined #perl6
09:58 IllvilJa left #perl6
10:18 TuxCM joined #perl6
10:18 lizmat good *, #perl6!
10:19 JimmyZ good *
10:20 jnthn o/
10:20 yoleaux 11 Jan 2015 17:25Z <lizmat> jnthn: looks like nqp::mkdir on moar doesn't fail if the actual mkdir fails, it does on parrot and jvm
10:20 yoleaux 11 Jan 2015 17:46Z <lizmat> jnthn: or perhaps I'm not understanding fail() correctly  :-(
10:20 JimmyZ \o
10:21 lizmat JimmyZ jnthn \o
10:23 dj_goku joined #perl6
10:23 dj_goku joined #perl6
10:25 bjz joined #perl6
10:32 anaeem1 joined #perl6
10:41 dalek rakudo/newio: 5e000da | lizmat++ | src/core/IO/Socket.pm:
10:41 dalek rakudo/newio: First steps of making IO::Socket a class
10:41 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/5e000dab38
10:41 dalek rakudo/newio: ccf03bf | lizmat++ | src/core/IO/Socket/INET.pm:
10:41 dalek rakudo/newio: Disable IO::Socket::INET during re-imagining
10:41 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/ccf03bf9e1
10:41 dalek rakudo/newio: dafbcd7 | lizmat++ | src/core/PIO.pm:
10:41 dalek rakudo/newio: Add PIO.send/poll
10:41 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/dafbcd757b
10:44 lizmat jnthn: in PIO constants such as PF_LOCAL, what does the PF stand for ?
10:45 moritz the 'F' stands for 'Family', I think
10:46 lizmat ok, so PIO Family
10:46 jnthn lizmat: Dunno, but perhaps Protocol Family?
10:46 lizmat ah... ok  :-)
10:46 jnthn http://swoolley.org/man.cgi/7/unix
10:46 moritz C code uses the same constants
10:47 jnthn http://www.gnu.org/software/libc/manual/html_node/Address-Formats.html also
10:55 dalek rakudo/newio: 70f9ad5 | lizmat++ | src/core/PIO.pm:
10:55 dalek rakudo/newio: Create ProtocolFamily/SocketType/ProtocolType enums
10:55 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/70f9ad5a8d
10:59 sqirrel joined #perl6
10:59 dalek roast/newio: ae17707 | lizmat++ | S02-types/WHICH.t:
10:59 dalek roast/newio: Add some more classes
10:59 dalek roast/newio: review: https://github.com/perl6/roast/commit/ae177073e2
10:59 masak good noon, #perl6
11:01 virtualsue joined #perl6
11:10 jluis joined #perl6
11:14 andreoss joined #perl6
11:24 moritz \o masak
11:26 donaldh joined #perl6
11:27 Ugator joined #perl6
11:27 uniejo joined #perl6
11:32 timotimo .tell japhb i assume the perl5 part of perl6-bench is increasing the number of steps for the benchmark to do by 2x until it hits inf and then doesn't want to stop for some reason?
11:32 yoleaux 03:03Z <japhb> timotimo: I cannot recreate the rc-forest-fire problem you are seeing, with either rakudo-moar/nom or rakudo-jvm/nom.
11:32 yoleaux timotimo: I'll pass your message to japhb.
11:33 cognominal joined #perl6
11:37 timotimo .tell perl6 .new() isn't like __init__ or __new__, it's like python's .frob or .blubber or .yoink; also, new calls bless calls BUILDALL calls BUILD unlike what geekosaur said, and skids wrongly wrote bless(*, ...), but the * as first argument is wrong nowadays
11:37 yoleaux timotimo: I'll pass your message to perl6.
11:38 timotimo damn
11:38 timotimo .tell adu perl6 .new() isn't like __init__ or __new__, it's like python's .frob or .blubber or .yoink; also, new calls bless calls BUILDALL calls BUILD unlike what geekosaur said, and skids wrongly wrote bless(*, ...), but the * as first argument is wrong nowadays
11:38 yoleaux timotimo: I'll pass your message to adu.
11:43 colomon joined #perl6
11:44 FROGGS .frob or .blubber or .yoink ??
11:44 moritz .tell adu see http://perlgeek.de/blog-en/perl-6/object-construction-and-initialization.html and http://doc.perl6.org/language/classtut#Constructors
11:44 yoleaux moritz: I'll pass your message to adu.
11:45 timotimo FROGGS: well, or any other method name you invent
11:45 FROGGS timotimo: but these names are typical conventions?
11:48 moritz no
11:48 moritz just an indication that it's not special
11:48 uniejo joined #perl6
11:51 timotimo correct, because __init__ is what gets called - eventually - when you do something like MyClass()
11:52 timotimo also, in python you have to explicitly call super's __init__, in perl6 the BUILDALL calls all BUILD subroutines for you
12:00 dalek rakudo/newio: d4357b4 | lizmat++ | src/core/PIO.pm:
12:00 dalek rakudo/newio: Streamline PIO.get/getc a bit
12:00 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/d4357b464a
12:00 * timotimo leaves again
12:14 uniejo joined #perl6
12:24 diegok joined #perl6
12:38 lizmat m: say List.end
12:38 camelia rakudo-moar 04ce88: OUTPUT«Memory allocation failed; could not allocate 163840 bytes␤»
12:38 lizmat something wrong there  :-)
12:38 vendethiel hahahaha
12:38 vendethiel missing a self:D?
12:39 lizmat yeah, probably, looking at the code now
12:41 dalek rakudo/nom: 27c2d5a | lizmat++ | src/core/EnumMap.pm:
12:41 dalek rakudo/nom: Make EnumMap.Bool/elems 5% faster
12:41 dalek rakudo/nom:
12:41 dalek rakudo/nom: This therefore also applies to Hash.Bool/elems
12:41 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/27c2d5a6e4
12:41 dalek rakudo/nom: 6a3fc31 | lizmat++ | src/core/Any.pm:
12:41 dalek rakudo/nom: Fix Any.end/elems
12:41 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/6a3fc316b1
12:42 nwc10 lizmat: do you have any benchmark numbers yet for how awesome the awesomeness is?
12:43 lizmat apart from locally run one-liners, no
12:44 moritz codegen question
12:44 moritz for
12:44 moritz nqp::p6bool(nqp::defined($!storage) && nqp::elems($!storage));
12:44 moritz does that box the return value from nqp::defined($!storage) into an Int?
12:44 moritz (because && wants a Perl 6 value)?
12:45 moritz or is it smart enough to avoid that?
12:45 FROGGS is that perl6 code or nqp code?
12:45 lizmat I thought && was smart enough not to box ?
12:45 moritz FROGGS: Perl 6 code
12:46 FROGGS then it should not make sense to p6bool the result of an expression that uses &&
12:46 FROGGS err, I'm wrong
12:46 FROGGS nvm
12:46 moritz any sequence of boxing + boolification (where the boxing is only used for the boolification) could be optimized
12:46 moritz if it boxes right now
12:46 lizmat moritz: indeed
12:46 sqirrel joined #perl6
12:47 moritz and if it boxes right now, nqp::p6bool(nqp::defined($!storage)) && nqp::p6bool(nqp::elems($!storage));  should be even faster
12:47 moritz because p6bool doesn't allocate
12:47 sunnavy joined #perl6
12:48 * lizmat checks
12:48 moritz (unless we have boxed Ints for 0 and 1 cached, which would probably be a really good idea)
12:48 moritz (but also requires some care with 'does' not messing up the boxed thing)
12:51 petercommand joined #perl6
12:52 leont joined #perl6
12:55 kaleem joined #perl6
12:58 jnthn moritz: && compiles into a QAST::Op if node.
12:58 lizmat indeed, moritz: your approach is slower
12:58 lizmat not much (like 2% or so)
13:00 lizmat jnthn: to verify: in  nqp::p6bool(nqp::defined($!storage) && nqp::elems($!storage));   the && will not box, right ?
13:04 jnthn lizmat: Hopefully not. :)
13:04 jnthn lizmat: And if it does then we should improve code-gen so it doesn't
13:05 lizmat how can I check?
13:05 moritz agreed
13:05 jnthn You'd have to disassemble the generated bytecode
13:05 * lizmat is not looking forward to that
13:05 rurban joined #perl6
13:05 lizmat do we have tools for that ?
13:05 jnthn moar --dump
13:05 jnthn And the .moarvm file
13:06 timotimo lizmat: it may very well be asier to cause spesh to become interested in the function you'd like to see and use the spesh log
13:06 timotimo get it interested by making it hot
13:07 lizmat well, it all seems very interesting, but I think I'll keep it to looking at simple benchmarks for now and see what is faster
13:07 lizmat because in the end, that's what we're after
13:07 * lizmat tries not to get distracted too much
13:07 lizmat .oO( and is having a hard time not getting distracted )
13:08 jnthn Looks, squirrel!
13:08 jnthn *Look
13:08 lizmat what? where?  :-)
13:08 donaldh jnthn: could you give me your thoughs on this gist https://gist.github.com/donaldh/91a212b38725642131be
13:09 timotimo donaldh: what the hell is :feature = 'broken' supposed to be :)
13:09 timotimo m: say (:feature = "broken").perl
13:09 camelia rakudo-moar 04ce88: OUTPUT«Cannot modify an immutable Pair␤  in block <unit> at /tmp/wDMBTo6AJ3:1␤␤»
13:10 timotimo m: say(:feature = "broken").perl
13:10 camelia rakudo-moar 04ce88: OUTPUT«Cannot modify an immutable Pair␤  in block <unit> at /tmp/LvmR443s6Y:1␤␤»
13:10 donaldh a golfed test case
13:10 jnthn donaldh: First of, really good find.
13:10 jnthn *off
13:10 timotimo it's kinda weird that that even parses :)
13:10 moritz timotimo: why? colonpairs are not special
13:11 jnthn timotimo: It's just term infix term :)
13:11 donaldh jnthn: it took me a while, getting misled by unrelated but obvious looking stuff.
13:11 lizmat std: say (:feature = "broken").perl
13:11 camelia std f9b7f55: OUTPUT«ok 00:00 138m␤»
13:11 moritz donaldh: ah, it dies before throwing X::NYI
13:11 moritz even before calling X::NYI.new
13:11 timotimo inside an argument list, though?
13:11 yakudza joined #perl6
13:11 timotimo well, i suppose
13:11 timotimo an assignment is a term, too
13:11 moritz argument lists aren't (so) special
13:11 jnthn Right, the point really being that it's named args that are causing the issue.
13:12 donaldh oh, ignore the colonpair stuff.
13:12 jnthn I suspect a plain X::NYI.new().throw also doesn't serialize a Match
13:12 moritz donaldh: well, it makes your code equivalent to sub f() {
13:12 donaldh Yeah, it's the fatarrow, but only in certain situations.
13:12 moritz die "something";
13:12 moritz }
13:12 lizmat m: say Any.keys.perl; say Hash.keys.perl  # the latter feels wrong in view of the former
13:12 camelia rakudo-moar 04ce88: OUTPUT«().list␤Nil␤»
13:12 moritz lizmat: agreed
13:13 jnthn donaldh: I don't have a good feel for which is the right fix immediately; I'll think about it (though I slept badly last night and seem to have a cold, so I may not get to anything sensible today :))
13:14 donaldh Sanitizing QAST nodes in the annotations will be problematic because I noticed data structure cycles.
13:14 donaldh I'm happy to implement 1 or 2. It really depends on what the desired semantics of shallow_clone should be.
13:15 donaldh Oh, and 2 exposes a method from QAST::Node in nqp to add_inlining_info_if_possible in rakudo
13:15 sirdancealot joined #perl6
13:18 jnthn 2 feels rightest at first thought; annotations are typically used during the Actions, and inlining info is used by the optimizer, and annotations are not meant to have an effect on the compilation process really.
13:18 dalek ecosystem: 6e40b4d | (Marcel Timmerman)++ | META.list:
13:18 dalek ecosystem: Transfer of two modules
13:18 dalek ecosystem:
13:18 dalek ecosystem: Update proposal because of transfer of two modules from bbkr to MARTIMM
13:18 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/6e40b4d888
13:18 dalek ecosystem: 8f56999 | FROGGS++ | META.list:
13:18 dalek ecosystem: Merge pull request #38 from MARTIMM/patch-1
13:18 dalek ecosystem:
13:18 dalek ecosystem: Transfer of two modules
13:18 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/8f56999fe5
13:22 FROGGS ohh.... semver.org <3
13:24 * arnsholt installs a Ubuntu 32-bit VM
13:24 FROGGS arnsholt++
13:25 arnsholt One nice thing about VMs is that reading from CD is a lot faster when the CD is actually just file IO from an SSD =D
13:26 nine I have not installed an OS from optical media in a decade...
13:26 yoleaux 10 Jan 2015 15:24Z <ab6tract> nine: yes what? was that in response to a pragma which would choke/complain about overlapping signature constraints at compile time?
13:29 moritz FROGGS: fwiw I've generally given people with pull requests to repos in the 'perl6' org pull a commit bit in the 'perl6' team
13:29 moritz FROGGS: since you are in the 'owners' team too, you could also do that :-)
13:29 FROGGS ahh, I tend to forget that :P
13:29 moritz no harm done
13:29 FROGGS will do that next time hopefully :o)
13:31 lizmat moritz: one could also argue that Any.keys.perl should be Nil
13:31 arnsholt nine: True. It's faster than USB too though =)
13:31 moritz arnsholt: aye
13:33 raiph joined #perl6
13:36 masak m: multi foo([]) { "Empty" }; my @x = 1...*; say foo(@x) # RT #123581
13:36 synopsebot Link: https://rt.perl.org/rt3//Public/Bug/Display.html?id=123581
13:36 camelia rakudo-moar 6a3fc3: OUTPUT«Empty␤»
13:36 masak m: sub foo([]) { "Empty" }; my @x = 1...*; say foo(@x)
13:36 camelia rakudo-moar 6a3fc3: OUTPUT«Empty␤»
13:37 masak m: sub foo([]) { "Empty" }; my @x = 1..*; say foo(@x)
13:37 camelia rakudo-moar 6a3fc3: OUTPUT«Empty␤»
13:37 masak that's... an excellent find. I'm a tiny bit envious :>
13:37 masak (Andrei Osipov)++
13:38 xfix joined #perl6
13:42 donaldh I've had brighter days. What's the bug?
13:42 zoosha joined #perl6
13:45 FROGGS donaldh: the bug title is: "Infinite lists match [] signature"
13:45 kjs_ joined #perl6
13:45 masak "yours truly" -- but the post isn't signed from what I can see... -- https://p6weekly.wordpress.com/2015/01/05/2015-01-get-ready-to-party/
13:45 donaldh ah yes. What should match [ ] ?
13:46 masak donaldh: an empty Positional.
13:46 masak list, array, etc
13:47 jnthn m: (1..*).Capture.perl.say
13:47 camelia rakudo-moar 6a3fc3: OUTPUT«Capture.new(hash => {"excludes-max" => Bool::False, "excludes-min" => Bool::False, "min" => 1, "max" => Inf})␤»
13:47 jnthn ah
13:47 jnthn m: (my @a = 1..*).Capture.perl.say
13:47 camelia rakudo-moar 6a3fc3: OUTPUT«Capture.new()␤»
13:47 jnthn That's a golf.
13:47 masak o.O
13:47 * masak adds that to the ticket
13:47 jnthn I think the conservative thing to do is to refuse to coerce an infinite thing to a Capture.
13:47 masak +1
13:48 jnthn That let's us revisit/liberalize in the future
13:48 jnthn But I don't want to have to deal with it this side of 6.0.0 'cus it goes deeper than it first looks...
13:50 lizmat masak: hmmm.... I expected it to say "liztormato" somewhere automagically
13:51 lizmat masak: it actually does, way at the bottom, next to the date
13:51 FROGGS true
13:51 masak lizmat: you don't need to change anything, but... I notice that 007 didn't make the cut...
13:52 lizmat I'll mention it this week  :-)
13:52 masak lizmat: I guess it's up to me/us now to make it significant for Perl 6. that's definitely the idea anyway.
13:52 colomon moritz++
13:53 lizmat masak: tbh, I'm not sure of 007's significance for Perl 6, but I am aware of *your* significance  :-)
13:53 masak from http://masak.github.io/007/ : "It has been designed with the purpose of exploring ASTs, macros, the compiler-runtime barrier, and program structure introspection."
13:54 masak all of which are essentially part of the macro grant/work.
13:59 lizmat m: set(1, 2) «+» set(3, 4)   # why is this supposed to be illegal ?
13:59 camelia rakudo-moar 6a3fc3: OUTPUT«Type check failed in binding; expected 'Positional' but got 'Any'␤  in any bind_error at src/vm/moar/Perl6/Ops.nqp:224␤  in sub hyper at src/gen/m-CORE.setting:20210␤  in block  at src/gen/m-CORE.setting:20060␤  in block <unit> at /tmp/NUpL8519b3:1…»
13:59 lizmat the error is wrong, but the test has a simple dies_ok()
14:00 masak lizmat: it would seem to me that doing hyper there would imply an ordering, which sets don't have.
14:00 pmurias_ joined #perl6
14:00 lizmat ah, duh  :-)
14:02 lizmat m: ("a" «~« set(<pple bbot rmadillo>).perl.say  # should this be a Set as well ?
14:02 camelia rakudo-moar 6a3fc3: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/Mj8RGzhSmtâ�¤Unable to parse expression in parenthesized expression; couldn't find final ')' â�¤at /tmp/Mj8RGzhSmt:1â�¤------> [32mrl.say  # should this be a Set as well ?[33mâ��[31m<EOL>[0mâ�¤ …»
14:02 lizmat m: ("a" «~« set(<pple bbot rmadillo>)).perl.say  # should this be a Set as well ?
14:02 camelia rakudo-moar 6a3fc3: OUTPUT«("pple" => "aTrue", "bbot" => "aTrue", "rmadillo" => "aTrue").hash␤»
14:02 lizmat woah
14:02 moritz uhm
14:03 moritz I thought sets were item-like?
14:03 lizmat yeah, ok, TODO test
14:03 moritz and thus hypers shouldn't enter them
14:03 masak moritz: that bothered me as well.
14:03 masak moritz: but I guess the same argument could be made for []
14:03 lizmat ok, I guess I just opened another can of worms  :-(
14:03 masak m: say ("a" <<~<< [<apple bbot rmadillo>]).perl
14:03 camelia rakudo-moar 6a3fc3: OUTPUT«("aapple", "abbot", "armadillo").list␤»
14:04 masak m: say ("a" <<~<< [<pple bbot rmadillo>]).perl
14:04 camelia rakudo-moar 6a3fc3: OUTPUT«("apple", "abbot", "armadillo").list␤»
14:04 masak moritz: [] is item-like, and yet, the above works.
14:04 moritz ah, right
14:05 masak but it's a bit of a slippery slope, what lizmat wants to make work
14:06 masak like `"a" <<~<< $set` has a well-defined semantics
14:06 masak but `("a", "b") <<~<< $set` doesn't
14:06 lizmat I'll keep that for another day
14:13 Ovid joined #perl6
14:20 xinming joined #perl6
14:21 * leont is still looking for a roommate for FOSDEM, anyone else looking for one?
14:21 leont woolfy: Schedule? ;-)
14:22 nwc10 leont: was leonerd? I have no idea
14:22 woolfy leont: El_Che and I are working on that right now.
14:22 leont Cool
14:30 colomon moritz++
14:30 moritz colomon++ # fixing author listing on http://smoke.perl6.org/report
14:43 Gruber joined #perl6
14:43 [Coke] what order are the modules in on http://smoke.perl6.org/report ?
14:43 PerlJam Um, I have a question about http://smoke.perl6.org/report ...  What does "Tests fail" really mean?  I noticed that my little Questhub thingy was showing "Passes all tests" until Jan 11, where it showed as "Tests fail".   Which tests are these that are failing as that repo has no tests.
14:44 Alina-malina joined #perl6
14:44 adu joined #perl6
14:45 nyuszika7h joined #perl6
14:47 cognominal joined #perl6
14:49 haroldwu_ joined #perl6
14:54 dalek rakudo/nom: 49a0bf5 | lizmat++ | src/core/EnumMap.pm:
14:54 dalek rakudo/nom: Remove unneeded "as Str" specification
14:54 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/49a0bf5af7
14:54 dalek rakudo/nom: b55db85 | lizmat++ | src/core/ (11 files):
14:54 dalek rakudo/nom: Make .keys/kv/values/pairs/invert multi methods
14:54 dalek rakudo/nom:
14:54 dalek rakudo/nom: This will also make all of these methods return an empty list on a type object.
14:54 dalek rakudo/nom: Should we decide that these methods should return Nil on type objects, this can
14:54 dalek rakudo/nom: now be easily achieved by changing the U: candidates in Any.pm
14:54 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/b55db853ad
14:59 spider-mario joined #perl6
14:59 Alina-malina joined #perl6
14:59 Alina-malina joined #perl6
15:03 skids joined #perl6
15:05 Sqirrel joined #perl6
15:16 telex joined #perl6
15:17 * [Coke] pings masak w/ https://github.com/masak/ufo/pull/21
15:20 masak [Coke]: applied. thanks.
15:21 adu joined #perl6
15:26 leont My code is broken by rakudo update
15:27 leont Seems the namespace issue I hit when precompiling is now also affecting non-compiled code. Guess I need to clean up my code.
15:27 lizmat leont: can you gist the error?
15:28 leont «Could not find symbol '&Proc'», I'm nesting namespaces in ways I apparently shouldn't
15:31 leont vendethiel told me that much in Salzburg after looking at it, but I never got around to doing it
15:31 leont Guess I have no choice now
15:32 mephinet joined #perl6
15:34 lizmat leont: could be a new bug, so a golfed gist would be appreciated
15:34 leont ok, will look at it
15:37 leont False alarm, was working on an unclean checkout apparently. Sorry for the noise.
15:38 lizmat *phew*  :-)
15:39 * vendethiel doesn't remember :P
15:39 dalek rakudo/nom: af6200a | lizmat++ | src/core/ (10 files):
15:39 dalek rakudo/nom: Make all .at_key multi method with signature
15:39 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/af6200a97d
15:40 leont Async IO still seems the same issues it had 2 months ago though
15:40 leont Should look at openpipe, but I don't see it documented anywhere
15:42 andreoss joined #perl6
15:42 leont Getting the impression it's a nqp-only thing
15:42 sqirrel_ joined #perl6
15:43 andreoss m: my @x; @x[0] = 1; say @x[0] == @x[0][0];
15:43 camelia rakudo-moar b55db8: OUTPUT«True␤»
15:43 andreoss why?
15:43 FROGGS m: say 1 == 1[0]
15:43 camelia rakudo-moar b55db8: OUTPUT«True␤»
15:43 leont Guess I'll have to do with qx and friends…
15:44 * [Coke] will be near detroit a few days this month if anyone is near there.
15:44 andreoss m: my @x; @x[0][0][0] = 3; say @x[0][0][0] == @x[0];
15:44 camelia rakudo-moar b55db8: OUTPUT«False␤»
15:44 geekosaur akron is only conceptually near detroit >.>
15:44 andreoss m: my @x; @x[0] = 3; say @x[0][0][0] == @x[0];
15:44 camelia rakudo-moar b55db8: OUTPUT«True␤»
15:48 uniejo joined #perl6
15:53 FROGGS [0] on an object is always itself, unless it implements [...] differently...
15:53 lizmat fwiw, I can see andreoss's point
15:53 FROGGS m: say 1.list == 1 # see also
15:53 camelia rakudo-moar b55db8: OUTPUT«True␤»
15:54 lizmat m: my $a; $a[0] = 3; say $a
15:54 camelia rakudo-moar b55db8: OUTPUT«3␤»
15:54 FROGGS m: say 42.elems # also
15:54 camelia rakudo-moar b55db8: OUTPUT«1␤»
15:55 andreoss omg. why such thing was done?
15:55 vendethiel you need $a == $a[0] for autovivification
15:55 andreoss who needs indexing on scalars?
15:55 vendethiel it's so that you can treat any scalar as a list
15:55 FROGGS the three shown weirdnesses ([0], .list and .elems) are there to make it easy to iterate recursively of lists that contain items somewhere deeper
15:56 FROGGS so you can always call .list, and don't have to check if it actually is a list when iterating over it
16:00 osfameron k
16:00 osfameron bah, mischan
16:00 ugexe m: my @x;  @x[0][0][0] = 3; say @x.perl; my @y; @y[0] = 3; say @y.perl
16:00 camelia rakudo-moar b55db8: OUTPUT«Array.new([[3]])␤Array.new(3)␤»
16:03 petercommand joined #perl6
16:03 petercommand joined #perl6
16:04 kaleem joined #perl6
16:08 andreoss m: sub foo(\n,\m) {return if (m <= 0) && (n >= 0);}
16:08 camelia rakudo-moar b55db8: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Unrecognized regex metacharacter = (must be quoted to match literally)â�¤at /tmp/ytTvy0wfmf:1â�¤------> [32msub foo(\n,\m) {return if (m <[33mâ��[31m= 0) && (n >= 0);}[0mâ�¤Unrecognized regex metacharacter   (must be qu…»
16:08 molaf joined #perl6
16:08 andreoss m: sub foo(\n,\z) {return if (z <= 0) && (n >= 0);}
16:08 camelia rakudo-moar b55db8: ( no output )
16:10 andreoss left #perl6
16:12 anaeem1 joined #perl6
16:12 dalek rakudo/nom: e320eb4 | lizmat++ | src/core/ (7 files):
16:12 dalek rakudo/nom: Make .exists_key a multi and some opts
16:12 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/e320eb4e72
16:13 jluis joined #perl6
16:16 leont My code segfaults moar when I precompile -_-
16:16 mr-foobar joined #perl6
16:16 * colomon is pretty much always near Detroit in the #perl6 sense, though in practice it's 2 hours drive away in the opposite direction as Akron.
16:18 lizmat leont: are you precompiling with CompUnit.new(..).precomp ?
16:19 leont Probably not, I'm doing something I copied from panda a few months ago
16:19 leont E.g. «perl6 -Ilib --target=mbc --output=lib/TAP/Entry.pm6.moarvm lib/TAP/Entry.pm6»
16:20 lizmat could you try:
16:20 lizmat perl6 -Ilib -e 'CompUnit.new('lib/TAP/Entry.pm6').precomp'
16:20 lizmat perl6 -Ilib -e 'CompUnit.new("lib/TAP/Entry.pm6").precomp'
16:21 gfldex joined #perl6
16:22 leont Same result
16:23 lizmat is it on github?
16:24 leont yes, https://github.com/Leont/tap-harness6
16:25 rurban joined #perl6
16:26 lizmat leont: compiles with me on OS X without problem  :-(
16:28 leont It compiles ok here, but it doesn't run (I was ambiguous before)
16:28 lizmat ok, do you have a one liner that I can run myself?
16:30 japhb .botsnack
16:30 yoleaux 11:32Z <timotimo> japhb: i assume the perl5 part of perl6-bench is increasing the number of steps for the benchmark to do by 2x until it hits inf and then doesn't want to stop for some reason?
16:30 yoleaux :D
16:30 leont perl6 -Iblib/lib bin/prove6 t/generator.t
16:31 leont (assuming precompiled libs are in blib/lib)
16:31 japhb timotimo: The problem is that, well ... that shouldn't happen with any test that does real work.  Which indicates the test itself is failing, but somehow in a way that does not trigger the stress-test cutoff (in which it notices a test always failing at a given SCALE and stops trying).
16:33 leont t/{source-file,string}.t also segfault, t/generator{,-more}.t don't. Haven't figured out yet why.
16:35 japhb Ah, I see the issue.  Two brainos.
16:35 lizmat leont: trying to compile Harness gives me "No such method 'resolve' for invocant of type 'Parameter'"
16:36 lizmat investigating
16:37 lizmat hmmm...seems Result needs to be compiled first, so this was an LTA error
16:40 dalek perl6-bench: 7dbbb69 | (Geoffrey Broadwell)++ | timeall:
16:40 dalek perl6-bench: No point in having max_failures >= runs; it would never trigger.
16:40 dalek perl6-bench: review: https://github.com/japhb/perl6-bench/commit/7dbbb693a4
16:40 japhb .tell timotimo Try 7dbbb69 .  :-)
16:40 yoleaux japhb: I'll pass your message to timotimo.
16:40 lizmat now getting No STable at index 10
16:41 * lizmat hopes jnthn will be able to make sense of this
16:43 mvuets joined #perl6
16:47 lizmat m: class A { multi method a(int $a) { say "int" }; multi method a($a) { say "other" } }; A.new.a(1)   # why is this dispatching to Any ???
16:47 camelia rakudo-moar af6200: OUTPUT«other␤»
16:48 arnsholt m: 1.WHAT.say
16:48 camelia rakudo-moar af6200: OUTPUT«(Int)␤»
16:48 lizmat m: say int.^mro   # but but
16:48 camelia rakudo-moar af6200: OUTPUT«(int) (Int) (Cool) (Any) (Mu)␤»
16:48 arnsholt IIRC int extends int, so that's why
16:48 lizmat ah, ok
16:49 * lizmat got it topsy tury again
16:49 arnsholt Yeah, this is the kind of stuff that's easy to get askew when it's so obvious what should happen
16:51 tony-o m: say 1 ~~ int
16:51 camelia rakudo-moar af6200: OUTPUT«False␤»
16:51 lizmat apparently, there is a whole set of candidates in array_slice that will never get called
16:51 lizmat because they have "int" in the signature
16:54 gcole joined #perl6
16:54 japhb lizmat: That doesn't mean you can't call with int.  Checking ...
16:55 kaleem joined #perl6
16:56 japhb m: multi foo(Int $i) { say "Int" }; multi foo(int $i) { say "int" }; my int $a = 1; foo($a);
16:56 camelia rakudo-moar af6200: OUTPUT«int␤»
16:56 japhb There you go.
16:56 lizmat m: multi foo(Int $i) { say "Int" }; multi foo(int $i) { say "int" }; my int $a = 1; foo(1);
16:56 camelia rakudo-moar af6200: OUTPUT«Int␤»
16:57 lizmat feels to me that should dispatch to "int"
16:57 japhb The fact that a constant integer is always interpreted as Int and not int is a different issue, but yeah, seems like you'd want the (presumably) optimized variant.
16:57 lizmat m: multi foo(Int $i) { say "Int" }; multi foo($i) { say "int" }; my int $a = 1; foo($a);
16:57 camelia rakudo-moar af6200: OUTPUT«Int␤»
16:57 lizmat m: multi foo($i) { say "Int" }; multi foo(int $i) { say "int" }; my int $a = 1; foo($a);
16:57 camelia rakudo-moar af6200: OUTPUT«int␤»
16:58 lizmat hmmm....
16:58 arnsholt That'd require all kinds of shenanigans in the compiler though
16:58 arnsholt How do you know if a 1 is int or Int?
16:58 japhb arnsholt: static optimization
16:58 lizmat well, I sorta expected that to optimize
16:58 lizmat yes
16:59 jnthn Note we have to be REALLY careful about literals dispatching to native candidates
16:59 lizmat for integers as well ?
16:59 arnsholt Oh, goody. I was about to ask you for a second opinion, jnthn =)
17:00 jnthn integer literals, yes
17:00 japhb m: multi foo(Int $i) { say "Int" }; multi foo(int $i) { say "int" }; foo(my int $ = 1);
17:00 camelia rakudo-moar af6200: OUTPUT«int␤»
17:01 japhb ^^ workaround
17:01 japhb Kinda hokey though
17:01 jnthn The rule basically is that you should have at least one parameter declared as a native.
17:01 jnthn japhb: In real code you're probably not doing it with literals :P
17:02 jnthn We had bugs in the past involving the optimzier too eagerly picking native int candidates, and then getting data loss when Int woulda got the right answer.
17:02 japhb When you say "at least one parameter declared as native", I'm not sure what you mean (because I'm not sure if 1. you meant "argument", or 2. I'm horribly confused)
17:03 lizmat but the upshot of this is, that @a[1] is *not* taking the "int" candidate in array_slice
17:03 jnthn japhb: In src/Perl6/Optimizer.pm, search for allomorph
17:04 lizmat so I'm wondering whether it would make sense to create separate Int candidates, or make the current int -> Int candidates
17:04 jnthn And read the code around that area. It's not that much, but it's a more precise description than I'm likely to come up with today :)
17:04 leont lizmat: yeah, in my Makefile I have them ordered
17:05 jnthn lizmat: Well, the typical Perl 6 user will likely not be using native types, to the degree that helps...
17:05 jnthn And if they are, they'll probably be using native arrays in with them.
17:06 [Sno] joined #perl6
17:07 skids .oO(I know I'm not typical but 95% of what I want to do involves interfacing with native types, mostly packet fields)
17:07 lizmat m: my @a; @a["foo"]
17:07 camelia rakudo-moar af6200: OUTPUT«Cannot call 'Real'; none of these signatures match:␤:(Mu:U \v: *%_)␤  in method Real at src/gen/m-CORE.setting:4152␤  in sub infix:<<> at src/gen/m-CORE.setting:4663␤  in sub postcircumfix:<[ ]> at src/gen/m-CORE.setting:2768␤  in block <unit> at…»
17:07 lizmat m: my @a; @a["foo".Int]    # better error
17:07 camelia rakudo-moar af6200: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '⏏foo' (indicated by ⏏)␤  in method Int at src/gen/m-CORE.setting:13937␤  in method Int at src/gen/m-CORE.setting:6229␤  in block <unit> at /tmp/vBuhFTR6JS:1…»
17:09 japhb I wonder if we should s/indicated by/starting at/ to increase the awesome
17:11 japhb jnthn: If I'm reading that code right, you can only dispatch a literal integer to an int multi if it only has one argument, or if it has two and one of them is typed as int.  No more than two parameters can usefully be used for a native-typed variant.
17:15 jnthn japhb: Sounds like it may want generalizing in the future, but yeah, that would be good enough for all of the various native int built-in operators.
17:21 jdv79 ugexe: around?
17:21 ugexe yeah
17:22 jdv79 what "uri commit" are you refering to in https://github.com/sergot/http-useragent/issues/38?
17:23 ugexe 'quickfix: use URI;'
17:23 jdv79 thanks
17:28 gtodd skids: that seems fairly typically atypical
17:29 gtodd ++ packets and internetty thingies
17:30 ingy joined #perl6
17:31 ugexe i get those 'no such method resolve' errors when i precompile modules out of order. for whatever reason you can often precompile a module before precompiling its dependency (but not always)
17:31 jnthn It's meant to explicitly disallow it :/
17:37 kaare__ joined #perl6
17:40 rmgk_ joined #perl6
17:41 CurtisOvidPoe Is there a declarative way to say “this object attribute is required”, or must I write a BUILD submethod?
17:42 TimToady has $.foo = !!! '$.foo is required';
17:42 TimToady or die
17:42 TimToady has $.foo = die '$.foo is required';
17:42 CurtisOvidPoe Thank you!
17:43 TimToady someone might have attempted a trait to add that
17:43 arnsholt Oh, neat!
17:43 arnsholt Didn't know !!! took an argument
17:43 TimToady or we'll probably get some sugar with macros eventually
17:43 TimToady it's not like it saves keystrokes over 'die'
17:44 TimToady but perhaps it reads better
17:44 TimToady being more "stubby"
17:44 * jnthn is sure he's written that trait at least twice to show folks how to do it...
17:45 TimToady obviously you didn't do it right the first time... :P
17:45 lizmat well, if people ask for it so often, maybe it needs to be in core  ?
17:45 TimToady it's kind of on the edge
17:46 TimToady so probably worth a 'use'
17:47 jnthn It's not like there's one obvious way to do it either, I guess...
17:48 lizmat well, that goes for "is cached" as well, and we put that in code
17:48 lizmat *core
17:49 TimToady m: class Foo { has $.foo is rw = ... '$.foo is required' }; my $f = Foo.new; $f.foo = 42; say $f.foo
17:49 camelia rakudo-moar e320eb: OUTPUT«$.foo is required␤  in method <anon> at src/gen/m-CORE.setting:13945␤  in any find_method_fallback at src/gen/m-Metamodel.nqp:2737␤  in any find_method at src/gen/m-Metamodel.nqp:988␤  in block <unit> at /tmp/qFwAMd2M6u:1␤␤»
17:49 TimToady maybe lazily-loaded traits?
17:50 TimToady if most programs won't use a trait, maybe loading the bodies can be deferred, just leave the name there as an autoload stub
17:50 dalek nqp/parrot-rpa: f6d965a | rurban++ | / (7 files):
17:50 dalek nqp/parrot-rpa: Replace unneeded QRPA with ResizablePMCArray
17:50 dalek nqp/parrot-rpa: review: https://github.com/perl6/nqp/commit/f6d965a79c
17:50 dalek nqp/parrot-rpa: 796c3be | rurban++ | tools/build/Makefile-Parrot.in:
17:50 dalek nqp/parrot-rpa: Makefile-Parrot: simplify ops2c rule, no chdir needed
17:51 dalek joined #perl6
17:51 * TimToady remembers making p5 rather faster by putting slow stuff out into utf8_heavy
17:52 arnsholt Is nqp/Configure.pl's --with-moar option somehow not working?
17:52 TimToady another consideration is that traits are mostly used at compile time, and could probably be thrown away instead of serialized, if any run-time use would just reload
17:54 TimToady so autoloading traits might debloat both setting and precomps
17:56 vendethiel autoloading, as in "you use X::Y::Z, let me look in @*INC for them"?
17:57 dalek rakudo/nom: 25956c3 | lizmat++ | src/core/array_slice.pm:
17:57 dalek rakudo/nom: @a[1] uses Int candidate, @a["foo"] better error
17:57 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/25956c30a7
17:57 TimToady vendethiel: more like, I already know which one I *would* pull in, if asked for
17:58 TimToady one of those spots where we try to separate identity from operational defs
17:58 TimToady any such trait coming from the standard library should have a fixed identity already
17:59 TimToady and @*INC should have very little to do with it
17:59 TimToady @*INC is really supposed to be only for developers, not for users
17:59 vendethiel right, implementation detail
18:00 * TimToady realizes he's fighting a great deal of culture here
18:00 TimToady well, except insofar as it's the *wrong* implementation :P
18:00 lizmat TimToady: could you elaborate on that?
18:00 TimToady if it doesn't nail down the identity, it's wrong
18:01 TimToady that's what S11 is mostly trying to say
18:01 vendethiel lizmat++ # weekly
18:01 lizmat vendethiel: thanks for the nudge  :-)
18:01 TimToady if the *user* can change the identity of things in the standard libarary, you have no security
18:02 TimToady and for some reason people are worrying a bit more about security these days
18:03 TimToady so if PERL6LIB can change which standard library you're loading, you have a lovely 0-day exploit
18:06 TimToady this is why I keep harping about identity and immutability in the standard library
18:06 geekosaur only if yu can inappropriately inject envars, which is itself a lovely 0day
18:06 geekosaur if I am at a command line, it's a faster version of me downloading and installing my own perl6
18:07 TimToady well, root priviledge escalation, for setuid stuff
18:07 geekosaur your standard library does not execute with elevated privileges, after all
18:07 geekosaur true, root wants to scrub envars... but PERL6LIB is kinda the least of what I'd worry about there
18:08 TimToady but more to the point, the standard library is kind of part of the language definition, and allowing it to be mutable is accidental genericity at the top of your Perl 6 program, which is verbotten
18:08 TimToady you can't maintain a language if the user's are running a different language than you think they are
18:09 TimToady s/"'"//
18:09 TimToady er, :2nd
18:09 go|dfish joined #perl6
18:10 TimToady same reason we've always rejected .perlrc files from the very beginning of the development of Perl
18:10 vendethiel perlrc as in "perl config"?
18:10 TimToady yeah
18:11 vendethiel what would that configure, though, even if it existed?
18:11 TimToady anything an explicit 'use' could
18:11 vendethiel stuff like old $) $] variables?
18:11 vendethiel alright.
18:11 huf isnt there some .pl file you can drop somewhere in @INC?
18:11 TimToady but implicitly
18:11 huf one that can load whatever it wants
18:12 TimToady if you say "use MyStupidModule;" then you've declared that you want your brain to melt and run out your nose, and that's fine because it's explicitly declared
18:12 vendethiel i'm not sure why you consider taht that an exploit
18:13 TimToady writing in a different language than you think you are means you can have breakage of invariants you thought you could rely on for security
18:14 kjs_ joined #perl6
18:14 TimToady maybe it's not an exploit without a little help, but there are lot of folks out there who are willing to help with that... :/
18:15 vendethiel alright.
18:15 mvuets joined #perl6
18:16 lizmat huf: you can create your own CompUnitRepo object and put that in @*INC
18:16 TimToady it's the moral equivalent of persuading someone to put "use TrustMe;" at the front of their script without checking it out
18:20 jluis_ joined #perl6
18:21 Sqirrel joined #perl6
18:25 adu joined #perl6
18:38 * arnsholt crosses fingers
18:38 arnsholt I wonder if Rakudo/Moar will build in a VM with a gig of memory
18:39 jdv79 i did it with 1.5 last week
18:40 arnsholt Ah, cool. Might work then
18:40 arnsholt And it's 32-bit, so pointers are a bit smaller
18:40 dalek rakudo-star-daily: a8a8795 | coke++ | log/ (10 files):
18:40 dalek rakudo-star-daily: today (automated commit)
18:40 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/a8a87954ab
18:40 dalek rakudo-star-daily: ae543c8 | coke++ | log/ (9 files):
18:40 dalek rakudo-star-daily: today (automated commit)
18:40 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/ae543c810e
18:40 dalek perl6-roast-data: 06b2c7a | coke++ | / (5 files):
18:40 dalek perl6-roast-data: today (automated commit)
18:40 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/06b2c7aaf9
18:40 dalek perl6-roast-data: 4b4be1d | coke++ | / (5 files):
18:40 dalek perl6-roast-data: today (automated commit)
18:40 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/4b4be1d8fd
18:44 bsk176 joined #perl6
18:44 jnthn arnsholt: Actually, pointers are 32 bits smaller... :P
18:46 [Coke] Testing modules/Grammar-Profiler-Simple with /home/coke/sandbox/rakudo-star-daily/star-jvm/rakudo-star-daily/install/bin/perl6-j...
18:46 [Coke] java.lang.StringIndexOutOfBoundsException: String index out of range: -3
18:47 [Coke] looks like lots oof jvm module failures today.
18:47 [Coke] *of
18:47 [Coke] (on R*)
18:47 moritz [Coke]: I'd guess this is somebody trying to Match.to from a failed match object for string indexing
18:47 zakharyas joined #perl6
18:48 [Coke] why woudl it fail only on JVM & not moar, then?
18:48 davido_ joined #perl6
18:48 moritz no idea
18:50 TimToady P6 should never see a failed Match object, since Nil or () is supposed to be returned for match failure
18:50 moritz oh right
18:50 moritz things changed
18:51 [Coke] these modules have jvm-only failures: Grammar-Profiler-Simple, uri, perl6-lwp-simple, json, Bailador, Template-Mojo
18:52 berekuk joined #perl6
18:53 anaeem1_ joined #perl6
18:53 nwc10 arnsholt: of course it will. Did you mean "a gig and no swap" ? :-)
18:54 TimToady perhaps "before the heat death of the universe" was implied
18:55 nwc10 or even "before Perl 6 is released"
18:55 TimToady a slightly lower bar
18:55 nwc10 (which will be much sooner. I hope. In that, I'm not assuming that the heat death is any time soon)
18:55 nwc10 :-)
18:56 TimToady or higher, depending on how you measure
18:56 nwc10 Last time I tried, the Raspberry Pi finished within a bounded amount of time
18:56 nwc10 (I forget if it was 8 hours or 24.)
18:56 TimToady "many"
18:57 nwc10 but not so many that the spec moved.
18:58 TimToady either Galileo or Einstein might have opinions on that
18:59 TimToady G wrt movement, and E wrt simultaneity...
18:59 * [Coke] tenses.
18:59 TimToady I'm sure someone has a physick for that
18:59 gtodd Economic Policy Wonks say: with the pace of innovation accelerating ....
19:00 gtodd " chances are that by 2016 raspberry pi key fobs with perl6 preinstalled will be on amazon ..."
19:00 TimToady and on E-Bay a couple days later
19:00 gtodd hehe
19:03 jercos AM33x isn't really destined for keyfob use imo... neat concept though.
19:09 gtodd that never stopped an   Economic Policy Wonk :)
19:10 virtualsue joined #perl6
19:10 FROGGS joined #perl6
19:10 anaeem1_ joined #perl6
19:11 jercos then again, they might put the raspi name on a different device too...
19:11 jercos just look at all the random chips are are "arduino" now :)
19:13 gcole joined #perl6
19:13 arnsholt nwc10: To be honest, I haven't a clue if it has swap or not
19:13 arnsholt I didn't look to closely, just installed a plain Ubuntu server in a Virtualbox =)
19:14 arnsholt Anyways, it built and passed make test
19:15 jdv79 impressive
19:15 arnsholt (Incidentally, that use of "build" is likely idiosyncratic to developer communities and weird to others)
19:16 * lizmat has started on the p6w, but is going to have dinner first
19:17 araujo joined #perl6
19:17 araujo joined #perl6
19:29 moritz what's p6w?
19:30 PerlJam perl 6 weekly
19:30 hobbs https://p6weekly.wordpress.com/
19:35 * colomon has been forgetting to read that...
19:40 timotimo colomon: i haven't posted for a few weeks now :)
19:40 yoleaux 16:40Z <japhb> timotimo: Try 7dbbb69 .  :-)
19:41 timotimo lizmat was kind enough to hop in while i'm distracted with life stuff
19:42 moritz is there a semantic difference between  sub f(Int) { } and sub f(Int $) { } ?
19:42 moritz (imagine a non-empty body, if necessary)
19:43 moritz (and maybe with another type constraint)
19:43 kill joined #perl6
19:43 sqirrel_ joined #perl6
19:43 amkrankruleuen joined #perl6
19:44 moritz I'm reviewing https://github.com/rakudo/rakudo/pull/302 and try to find out whether it makes sense
19:45 moritz m: class A { method x(*@a) { say 1 for @a } }; class B is A { method x(Any) { nextsame } }; B.x((42, 23))
19:45 camelia rakudo-moar 25956c: OUTPUT«1␤1␤»
19:45 moritz m: class A { method x(*@a) { say 1 for @a } }; class B is A { method x(Any $) { nextsame } }; B.x((42, 23))
19:45 camelia rakudo-moar 25956c: OUTPUT«1␤1␤»
19:46 psch m: sub foo ($) { }; &foo.signature.say; sub bar(:$) { }; &bar.signature.say # moritz
19:46 camelia rakudo-moar 25956c: OUTPUT«:(Any)␤:(Any :($))␤»
19:46 psch 302 removes that inconsistency
19:46 psch *PR
19:46 psch also hi #perl6 \o
19:48 moritz m: sub f(:($)) { }; say &f.signature.perl
19:48 camelia rakudo-moar 25956c: OUTPUT«:(Any :($) (Any))␤»
19:49 * moritz didn't even know :($) was allowed
19:49 dylanwh joined #perl6
19:49 colomon "<=> on lists should distribute to elements" WAT?!?!!!
19:50 moritz colomon: that's basically lexicograph sorting
19:50 moritz erm, ordering
19:50 moritz ($a, $b, $c) <=> ($d, $e, $f) becomes ($a <=> $d) || ($b <=> $d) || ($c <=> $f)
19:50 colomon sure
19:51 colomon but doesn't doing that violate standard p6 procedure on operators very badly?
19:51 moritz you mean because <=> should force numeric context?
19:51 colomon yes
19:51 moritz hm, good point
19:52 colomon was infix:<leg> also changed?
19:52 moritz psch: your example doesn't seem to be changed by the pull request
19:53 moritz psch: I merged it locally, and I still get :(Any $) \n :(Any :($)) \n
19:53 psch moritz: recheck with camelia, currently the anon positional just gets ":(Any)"
19:54 moritz oh
19:54 moritz hm
19:54 moritz I'm not sure it's a win though
19:54 moritz the point of anonymous positional parameters is that the names don't matter
19:54 moritz but I guess it doesn't hurt either
19:55 geekosaur joined #perl6
19:55 moritz m: sub f(@) { }; say &f.signature.perl
19:55 camelia rakudo-moar 25956c: OUTPUT«:(@)␤»
19:55 dalek rakudo/nom: 1c097d4 | peschwa++ | src/core/Parameter.pm:
19:55 dalek rakudo/nom: Return bare $-sigil for anonymous parameters.
19:55 dalek rakudo/nom:
19:55 dalek rakudo/nom: Parameter.perl previously didn't return a $-sigil for
19:55 dalek rakudo/nom: anonymous positional parameters without post-constraints.
19:55 dalek rakudo/nom: This patch fixes that.
19:55 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/1c097d4d5b
19:55 dalek rakudo/nom: 107a5c2 | moritz++ | src/core/Parameter.pm:
19:55 dalek rakudo/nom: Merge branch 'more-param-perl' of github.com:peschwa/rakudo into nom
19:55 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/107a5c2285
19:55 moritz psch++
19:56 psch the anon array was gonna be my next example.  i agree that names don't matter but leaving out the sigil seems weird if it's only the scalar case
19:56 psch and leaving them out for all is asking for confusion i guess
19:56 psch m: sub f($ where * > 1) { }; &f.signature.say
19:56 camelia rakudo-moar 25956c: OUTPUT«:(Any $ where { ... })␤»
19:56 psch that's another inconsistency, with post-constraint the $ is back again
19:57 psch ...but i guess the points been made :)
19:57 psch moritz++
19:58 moritz timotimo: you have several open rakudo pull requests
19:58 moritz timotimo: what's up with them? do they need discussion?
19:58 moritz timotimo: if not, you can merge or close yourself :-)
19:59 kjs_ joined #perl6
20:01 timotimo oh, i do?
20:01 timotimo how many years old? :)
20:02 moritz timotimo: 1.5
20:08 woolfy joined #perl6
20:08 timotimo threw out two
20:08 timotimo that makes it a bit better
20:10 * [Coke] gets a sql error on a 100 line query with no line number. arglebargle.
20:11 [Coke] (sorry, 250 line)
20:11 timotimo wow
20:12 * masak has been happily writing Perl 6/DBIish/sqlite3 for the past few days
20:12 jnthn urgh
20:12 silug joined #perl6
20:13 arnsholt masak++ # Actual Perl 6 code!
20:13 masak I expect to involve HTML output before long.
20:13 masak hoping to blog about it, too.
20:15 arnsholt Even more awesomer!
20:15 masak arnsholt: did you see the timings I posted yesterday? https://gist.github.com/masak/0714a0d412f2ab4e5f12 -- that was fun.
20:16 masak got the script down from 38k requests and 48 minutes to 78 requests and 3.5 minutes.
20:17 jnthn m: class class {}; say class.new.perl
20:17 camelia rakudo-moar 25956c: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/11nWiHJu_Bâ�¤Unable to parse class definitionâ�¤at /tmp/11nWiHJu_B:1â�¤------> [32mclass class {}; say class[33mâ��[31m.new.perl[0mâ�¤    expecting any of:â�¤        generic roleâ�¤Â»
20:17 jnthn std: class class {}; say class.new.perl
20:17 camelia std f9b7f55: OUTPUT«ok 00:01 137m␤»
20:17 arnsholt masak: With request being DB queries?
20:17 masak arnsholt: yes, right. insert statements, in this case.
20:17 arnsholt Neat!
20:18 arnsholt This november++ you're hacking on, or something else?
20:18 masak something else -- but I bet I'll be able to use this knowledge a bit for November, too.
20:18 bjz joined #perl6
20:18 masak or November++, or whatever. December.
20:19 arnsholt I almost called it december, but decided not to in case it was too internal to my own logic =D
20:19 masak no, the thought has occurred to me.
20:19 arnsholt Very cool at any rate! All of the upboats for large(r?)-scale Perl 6 things
20:25 fwilson joined #perl6
20:27 bcode joined #perl6
20:28 jnthn TimToady: In http://design.perl6.org/S12.html#Invocants it says:
20:28 jnthn Note that the self function is not context sensitive and thus always returns the current object as a single item even in list context.
20:28 jnthn However, we've more generally in the language concluded that sigilless things do *not* tend to imply any additional context.
20:28 clkao joined #perl6
20:29 jnthn Thus why |$c became |c
20:29 moritz also 'self' is not a function
20:29 jnthn So this bit of spec feels rather fossil-ish to me. Not to mention I've no idea how to implement it.
20:29 jnthn moritz: Very true also. It's just a normal lexical
20:29 yogan joined #perl6
20:29 jnthn Which makes it even stranger. :)
20:29 moritz let's just say it's a term
20:29 jnthn *nod*
20:30 moritz which is implementation-independent
20:30 lsm-desktop joined #perl6
20:30 jnthn Right.
20:30 moritz so, what would be a saner way?
20:31 moritz self is just the invocant, without any additional (de)containerization
20:31 flussence joined #perl6
20:31 jnthn Something like that
20:31 jnthn Or
20:31 jnthn "The C<self> term refers to the invocant as it was received, without any item or list context being enforced on it."
20:31 dylanwh joined #perl6
20:31 moritz +1
20:31 TimToady I'm fine with just assuming it was declared \self
20:32 [Tux] joined #perl6
20:32 masak that sounds very sane.
20:32 jnthn TimToady: That's also a nice way to define it. And maps pretty much exactly to how it's implemented.
20:32 jnthn OK, I'll tweak S12 and then https://rt.perl.org/Ticket/Display.html?id=111914 can go away
20:33 woolfy joined #perl6
20:33 moritz ++jnthn
20:33 integral joined #perl6
20:33 integral joined #perl6
20:34 mephinet joined #perl6
20:35 timotimo does our http client lib do redirections properly yet?
20:36 vike joined #perl6
20:36 kjs_ joined #perl6
20:40 dalek specs: 8284cda | jnthn++ | S12-objects.pod:
20:40 dalek specs: Correct spec of context aspects of the self term.
20:40 dalek specs: review: https://github.com/perl6/specs/commit/8284cdae1f
20:40 cognominal joined #perl6
20:44 dalek roast: 0ffea18 | jnthn++ | S12-methods/instance.t:
20:44 dalek roast: Test for self not enforcing item context.
20:44 dalek roast: review: https://github.com/perl6/roast/commit/0ffea18183
20:49 masak timotimo: TIAS?
20:49 moritz huh, lots of r-m spectest failures for me :(
20:49 moritz with moar and nqp master
20:52 jnthn I get S02-types/array.t, S02-types/set.t, and S06-signature/types.t having failures since my last run a couple of days ago.
20:53 timotimo joined #perl6
20:55 moritz m: say Metamodel::ClassHOW
20:55 camelia rakudo-moar 107a5c: OUTPUT«(Perl6::Metamodel::ClassHOW)␤»
20:56 timotimo i flew off the server :(
20:57 moritz m: so so Int.HOW ~~ Metamodel::ClassHOW
20:57 camelia rakudo-moar 107a5c: ( no output )
20:57 moritz m: say so Int.HOW ~~ Metamodel::ClassHOW
20:57 camelia rakudo-moar 107a5c: OUTPUT«True␤»
20:58 jnthn std: class class {}; say class.new.perl
20:58 camelia std f9b7f55: OUTPUT«ok 00:01 137m␤»
20:58 moritz m: say Int.^methods(:all).pick.name
20:58 camelia rakudo-moar 107a5c: OUTPUT«hash␤»
20:58 moritz m: say Int.^methods(:all).pick.name
20:58 camelia rakudo-moar 107a5c: OUTPUT«sin␤»
20:58 jnthn TimToady: I can't work out why STD mangaes to parse the "class.new.perl"
20:59 jnthn TimToady: I just added keyspace to Rakudo's grammar, and then tweaked our package_declarators to call that after the sym
20:59 kjs_ joined #perl6
20:59 jnthn TimToady: However, now it explodes with "Whitespace required after keyword"
21:01 timotimo what is keyspace?
21:02 telex joined #perl6
21:02 timotimo hmm. i don't expect rakudo's grammar would benefit from this optimization at all, but i've been pondering - for a bit now, actually - how to implement "after a fixed length beginning, this regex has a constant string, so we can just go boyer-moore for the literal and skip back a bit"
21:02 jnthn A token in STD
21:02 jnthn std: /$^ /
21:02 camelia std f9b7f55: OUTPUT«ok 00:00 136m␤»
21:02 jnthn std: /$. /
21:02 camelia std f9b7f55: OUTPUT«[31m===[0mSORRY![31m===[0m�Unsupported use of $. variable; in Perl 6 please use the filehandle's .line method at /tmp/HLmaPIZ9px line 1:�------> [32m/$.[33m�[31m /[0m�Parse failed�FAILED 00:00 136m�»
21:03 bjz joined #perl6
21:03 moritz m: class A { }; A.^add_fallback(-> $, $ { 1 }, -> $, $ { sub (|) { say 42 }); A.blerg
21:03 camelia rakudo-moar 107a5c: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/E5fQW2jq0Fâ�¤Unable to parse expression in block; couldn't find final '}' â�¤at /tmp/E5fQW2jq0F:1â�¤------> [32m$, $ { 1 }, -> $, $ { sub (|) { say 42 }[33mâ��[31m); A.blerg[0mâ�¤    expecting a…»
21:03 jnthn Oddly, STD now accepts the first one, reported in https://rt.perl.org/Ticket/Display.html?id=77558, but still rejcects the latter in https://rt.perl.org/Ticket/Display.html?id=77550 :)
21:03 moritz m: class A { }; A.^add_fallback(-> $, $ { 1 }, -> $, $ { sub (|) { say 42 }}); A.blerg
21:03 camelia rakudo-moar 107a5c: OUTPUT«42␤»
21:03 jnthn moritz: Please use method FALLBACK these days ;)
21:04 moritz jnthn: I know
21:04 jnthn (Unless you've a good reason not to, in which case pop the .^add_fallback in a BEGIN block)
21:04 moritz jnthn: I'm documenting the meta model :-)
21:04 jnthn Ah, OK :)
21:04 jnthn m: $.
21:04 camelia rakudo-moar 107a5c: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/BNGqKHOCZR�Missing semicolon.�at /tmp/BNGqKHOCZR:1�------> [32m$.[33m�[31m<EOL>[0m�»
21:04 jnthn std: $.
21:04 camelia std f9b7f55: OUTPUT«[31m===[0mSORRY![31m===[0m�Unsupported use of $. variable; in Perl 6 please use the filehandle's .line method at /tmp/59FIRAS8qy line 1:�------> [32m$.[33m�[31m<EOL>[0m�Parse failed�FAILED 00:00 134m�»
21:06 timotimo i was thinking once the optimizer figures out the fixed length prefix of a regex ends in a literal, it could insert a node that's ignored by the NFA and by declarativity considerations and just creates a little "scan loop" so to speak that lands in the code at the very beginning of the regex (but after the initial scan node)
21:06 dalek rakudo-star-daily: 568a130 | coke++ | log/ (9 files):
21:06 dalek rakudo-star-daily: today (automated commit)
21:06 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/568a13056e
21:06 timotimo it'd just have to store the literal string and the known length of regex before it
21:08 timotimo but i have *no* idea about backtracking and stuff
21:08 timotimo and how to properly handle the position register in this case
21:09 lizmat p6w preview: https://p6weekly.wordpress.com/?p=299&amp;preview=true&amp;preview_id=299
21:09 anaeem1 joined #perl6
21:10 timotimo colomon added an infix:%lt;%> candidate to fix this
21:11 timotimo damn you, html :)
21:12 timotimo lizmat: i recommend you write that the stuff psch worked on is only ("only") for the JVM native interop thingie
21:12 TimToady jnthn: STD's keyspace is inside <?before> so includes \s in LTM, so it will always be one longer than <ident> matches
21:12 lizmat timotimo: fixed
21:13 TimToady and it won't match if tied
21:13 lizmat re psch , it states that it is for the JVM backend, no?
21:13 timotimo well, the JVM backend can be a great many things
21:13 jnthn TimToady: So I need <?before <.keyspace>> ?
21:13 * colomon has no idea what timotimo is talking about.  was that infix:<%> ?
21:13 timotimo what he's done is just for use ...:from<Java>
21:13 jnthn lizmat: I get page not found trying to access that...
21:14 timotimo colomon: correct
21:14 TimToady keyspace should contain the ?before
21:14 timotimo lizmat: are you using the shitty new compose post page?
21:14 timotimo or the old one?
21:14 lizmat timotimo: I think the new one
21:14 lizmat which I actually quite like  :-)
21:14 timotimo because in the old one, there's a "request feedback" button below the text input and there you can "get a link without sending an email"
21:14 timotimo that should work for everyone
21:15 timotimo i don't like it at all because it lacks this button
21:15 lizmat ah, ok
21:15 bbkr joined #perl6
21:15 timotimo which i've been relying on quite heavily during my p6weekly workflow
21:15 moritz it also seems impossible to remove the 'uncategorized' category with the new interface, at least after the post is already published
21:16 jnthn TimToady: STD has it as:
21:16 bbkr hi. how can I weaken reference?
21:16 jnthn token keyspace { <!before '('> [ <?before <[ \s \# ]> > || <.panic: "Whitespace required after keyword"> ] }
21:16 lizmat new link for preview of p6w: https://p6weekly.wordpress.com/?p=299&amp;shareadraft=54b439914854d
21:16 jnthn I copied it exactly as that.
21:16 TimToady then something must be committing to a shorter LTM before that
21:16 jnthn bbkr: You can't, but since GC is based on reachability, not ref-counting, then you don't need to for cyclic data structures...
21:17 TimToady in STD we call it directly after <sym>
21:17 safinaskar joined #perl6
21:17 safinaskar hi
21:17 bbkr jnthn: wow, awesome! thanks
21:17 safinaskar perl6 has "grammar" feature
21:17 safinaskar what is it? is it part of language? of std lib? or what?
21:17 jnthn TimToady: Yeah, I put those calls in directly after <sym> and it actually hit the panic...
21:18 dalek doc: cd28fdf | moritz++ | lib/Type/Metamodel/ClassHOW.pod:
21:18 dalek doc: start to document ClassHOW
21:18 dalek doc: review: https://github.com/perl6/doc/commit/cd28fdfcfd
21:18 jnthn safinaskar: Part of the language
21:18 safinaskar jnthn: is there something like this in perl5?
21:19 jnthn safinaskar: Well, Perl has always been good at making regexes a fairly first class part of the langauge. Perl 6 just takes this several steps further, providing full grammars.
21:19 jnthn So more interesting parsing tasks can be handled in a neat way.
21:20 moritz safinaskar: newer versions of Perl 5 have the ability to define named regexes within a regex
21:20 moritz safinaskar: but it doesn't integrate well with OOP in perl 5
21:20 moritz and thus reuse is still tricky
21:21 moritz and then there are modules, of course
21:21 jnthn std: $_ = 'oh 2!'; s[\d+] += 40; .say
21:21 camelia std f9b7f55: OUTPUT«ok 00:01 139m␤»
21:23 safinaskar jnthn: moritz: thanks
21:23 safinaskar left #perl6
21:24 KCL_ joined #perl6
21:24 b2gills safinaskar: Grammars are basically Object classes with regular expressions (rules/tokens/regexes) as methods
21:25 lizmat Perl6 Weekly live: https://p6weekly.wordpress.com/2015/01/12/2015-02-the-beginning-of-the-party-has-been-delayed/
21:26 moritz lizmat++
21:29 woolfy lizmat++
21:39 jnthn lizmat++ # nice post
21:39 6A4AA15F9 joined #perl6
21:41 donaldh joined #perl6
21:42 pyrimidine I suppose the closest thing to Grammars in p5 is Marpa
21:45 broski joined #perl6
21:45 broski Hi!
21:45 broski I have a qeustion
21:45 broski can you use hyphens for variable names too?
21:45 timotimo yep
21:45 broski @an-array
21:45 broski $an-array
21:45 timotimo m: my @an-array = 1, 2, 3; say @an-array;
21:45 camelia rakudo-moar 107a5c: OUTPUT«1 2 3␤»
21:45 broski sub i-know-this-works {}
21:45 broski NICE!!!
21:46 broski that's great, I always wondered that because to me hyphens are quicker to type than underscores
21:47 broski i've been reading the documentation, I really like the implementation and I really dig how the @ and % are kept unlike Perl 5 where %hash => $hash{'ref'}
21:47 b2gills I'm fairly sure one of the quick ways to spot Perl6 vs Perl5 code, is by its use of hyphens in identifiers
21:48 uniejo joined #perl6
21:48 b2gills I like that @hash{'a','b'} isn't a thing in Perl6
21:49 timotimo but you can still write it exactly like that if you want
21:50 b2gills I meant the @
21:50 jnthn Note that %hash<a b> is a neater way to write %hash{'a', 'b'} :)
21:50 timotimo oh
21:50 timotimo good point
21:50 b2gills I was typing the Perl5 code
21:50 timotimo "sigil invariance"
22:02 leont joined #perl6
22:02 jdv79 pyrimidine: maybe closer would be Regexp::Grammars?  depends on your criteria i guess.
22:02 dalek rakudo/nom: d3d2ebb | lizmat++ | src/core/operators.pm:
22:02 dalek rakudo/nom: Add IS-NAN-OR-INF helper sub
22:02 dalek rakudo/nom:
22:02 dalek rakudo/nom: This is backend dependent atm, so concentrate backend dependendness
22:02 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/d3d2ebb345
22:02 dalek rakudo/nom: e4ff687 | lizmat++ | src/RESTRICTED.setting:
22:02 dalek rakudo/nom: Make restricted settings a bit more strict
22:02 dalek rakudo/nom:
22:02 dalek rakudo/nom: - alphabetically ordered like items, for better perusing
22:02 dalek rakudo/nom: - added some existing/new internal helper subs
22:02 dalek rakudo/nom: - added (new) roles, preventing people from writing their own classes for access
22:02 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/e4ff6874d1
22:04 jnthn lizmat: Isn't there an nqp:: op for nan or inf?
22:04 lizmat yes, but that only works directly on parrot
22:04 lizmat in moar/jvm you must first check if it's a Num
22:04 jnthn Just go with the maor/jvm version of it everywhere
22:05 jnthn I can't believe it reliably works out on Parrot without the type check in every case.
22:05 lizmat ok, will do that then  :-)
22:05 timotimo a non-num is very, very unlikely to be nan or inf :P
22:05 timotimo so ... seems legit :)
22:06 lizmat m: nqp::isnanorinf(Str)
22:06 camelia rakudo-moar 107a5c: OUTPUT«Cannot unbox a type object␤  in block <unit> at /tmp/6Qj7QWcc06:1␤␤»
22:06 dalek rakudo/nom: d7338dc | jnthn++ | src/Perl6/Grammar.nqp:
22:06 dalek rakudo/nom: Bring a couple of special vars in line with STD.
22:06 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/d7338dcf3d
22:06 dalek rakudo/nom: 495bc53 | jnthn++ | src/Perl6/ (2 files):
22:06 dalek rakudo/nom: Implement s[...] op= foo.
22:06 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/495bc53bbe
22:06 lizmat m: nqp::isnanorinf("foo")
22:06 camelia rakudo-moar 107a5c: OUTPUT«This type cannot unbox to a native number␤  in block <unit> at /tmp/moS5DuzxYC:1␤␤»
22:06 dalek roast: 35714a7 | jnthn++ | S05-substitution/subst.t:
22:06 dalek roast: Correct and un-fudge s[...] op= foo tests.
22:06 dalek roast: review: https://github.com/perl6/roast/commit/35714a7f42
22:06 timotimo jnthn: sweet :)
22:06 lizmat that gives very LTA error messages
22:06 jnthn lizmat: uh, what's LTA about it?
22:07 jnthn It's an nqp:: op and you broke its usage contract.
22:07 jnthn And it told you why.
22:07 lizmat it;s usually hidden somewhere
22:07 El_Che lizmat: you b'stard: "The beginning of the Party has been delayed!" :)
22:08 El_Che a catchy open title
22:08 lizmat :-)
22:08 jnthn Yes, but if you end up hitting the op without giving it something valid, it's a failure to guard using it properly, imo.
22:08 lizmat jnthn: the name is "isnanofinf"  , there is nothing about a contract there
22:08 lizmat not in the name
22:08 lizmat "foo" is neither NaN or Inf either
22:09 hobbs now is the time for all good men to come to the aid of the party
22:09 timotimo only men?
22:09 jnthn lizmat: *All* of the nqp:: ops on native types behave in an unbox-y way, not a coercy way.
22:09 jnthn That's just the level of abstraction they're at.
22:09 hobbs in the generic sense :)
22:10 hobbs (in case you're not familiar: http://www.straightdope.com/columns/read/259/who-originated-now-is-the-time-for-all-good-men)
22:10 lizmat jnthn: it may be clear to *you* it requires a Num, but it wasn't to me
22:10 lizmat and apparently, in parrot's case either  :)
22:10 lizmat but, no worries, I get the point  :-)
22:12 El_Che lizmat: I wonder what an up-to-date version of this talk would sound like: https://archive.fosdem.org/2013/schedule/event/perls_diaspora_perl5_moe_rakudo_niecza_perlito/
22:12 jnthn Yes, the Parrot code-gen, partly due to how Parrot works, is a bit mroe sloppy in that sense. It turned out to be a great place for performance/semantic bugs to hide...
22:13 lizmat shorter, as there are at least 2 casualties in that list
22:13 jnthn timotimo: It's one more feature down, and an RT too :)
22:13 dalek rakudo/nom: 8ceebf5 | lizmat++ | src/core/operators.pm:
22:13 dalek rakudo/nom: Revert "Add IS-NAN-OR-INF helper sub"
22:13 dalek rakudo/nom:
22:13 dalek rakudo/nom: Turns out we don't need it after all.  Just use:
22:13 dalek rakudo/nom:   nqp::istype(val,Num) && nqp::isnanorinf(val)
22:13 dalek rakudo/nom: That should give better performance
22:13 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/8ceebf5286
22:15 jnthn The RT queue is huge, so I'm going to try and pick off some easy-medium tickets now and then, when I've got bits of time when I'm not concentrated enough to work on the bigger, harder, things.
22:16 jnthn m: my $x; $x [R/]= 1
22:16 timotimo goon on ya :)
22:16 camelia rakudo-moar 107a5c: OUTPUT«===SORRY!===␤Unknown QAST node type NQPMu␤»
22:16 timotimo i'm glad
22:18 broski joined #perl6
22:32 sirdancealot joined #perl6
22:36 dalek rakudo/nom: 0a99f9f | jnthn++ | src/Perl6/Actions.nqp:
22:36 dalek rakudo/nom: Fix exception handlers in main program body.
22:36 dalek rakudo/nom:
22:36 dalek rakudo/nom: These would previously fail to actually catch the exception. Resolves
22:36 dalek rakudo/nom: RT#116056.
22:36 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/0a99f9f6f0
22:36 synopsebot Link: https://rt.perl.org/rt3//Public/Bug/Display.html?id=116056
22:37 dalek roast: 93081cd | jnthn++ | S04-exception-handlers/top-level.t:
22:37 dalek roast: Add test for program-level handlers.
22:37 dalek roast:
22:37 dalek roast: In its own test file rather than catch.t, so as not to cause trouble
22:37 dalek roast: debugging issues with catch.t tests.
22:37 dalek roast: review: https://github.com/perl6/roast/commit/93081cd5bf
22:37 dalek rakudo/nom: 6ba20d0 | jnthn++ | t/spectest.data:
22:37 dalek rakudo/nom: Run S04-exception-handlers/top-level.t.
22:37 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/6ba20d012f
22:41 jnthn m: sub foo(Int $x is copy) { $x = 5; } f(1);
22:41 camelia rakudo-moar 495bc5: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/I_Qyq5bjdWâ�¤Two terms in a rowâ�¤at /tmp/I_Qyq5bjdW:1â�¤------> [32msub foo(Int $x is copy) { $x = 5; } [33mâ��[31mf(1);[0mâ�¤    expecting any of:â�¤        infix stopperâ�¤        infix or me…»
22:42 jnthn m: sub foo(Int $x is copy) { $x = 5; }; f(1);
22:42 camelia rakudo-moar 495bc5: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/F64H7KK0E0â�¤Undeclared routine:â�¤    f used at line 1â�¤â�¤Â»
22:42 jnthn m: sub foo(Int $x is copy) { $x = 5; }; foo(1);
22:42 camelia rakudo-moar 495bc5: OUTPUT«Cannot assign to an immutable value␤  in block <unit> at /tmp/7Jxz1nmjRL:1␤␤»
22:43 Mso150 joined #perl6
22:43 jnthn m: sub foo(Int $x is copy) { $x = 5; my $omg-prevent-inline; }; foo(1);
22:43 camelia rakudo-moar 495bc5: ( no output )
22:43 dalek roast: d0f0a18 | lizmat++ | S06-signature/types.t:
22:43 dalek roast: Fix changed gist
22:43 dalek roast: review: https://github.com/perl6/roast/commit/d0f0a18f5e
22:43 Vlavv joined #perl6
22:44 tony-o that isn't intended behavior?
22:44 lizmat tony-o: not if "is copy" si specified
22:44 lizmat *is
22:45 jnthn tony-o: It looks like the static inlining stuff doesn't account for "is copy", and so messes up the program
22:45 jnthn sub foo(Int $x is copy) { $x = 5; }; foo(1); # works fine with --optimize=0
22:45 tony-o i saw it happen a few days ago too and thought that it was changed that way intentionally
22:47 dalek rakudo/nom: 72228a6 | lizmat++ | src/core/Buf.pm:
22:47 dalek rakudo/nom: Streamline Buf.at_pos + add error for Inf/NaN
22:47 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/72228a64b3
22:47 dalek rakudo/nom: e56d60d | lizmat++ | src/core/Capture.pm:
22:47 dalek rakudo/nom: Streamline Capture.at_pos + error for Inf/NaN
22:47 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/e56d60d7ee
22:51 jnthn Getting a little tired to fix that one today, so think I'll leave it for tomorrow. :)
22:51 * lizmat feels likewise  :-)
23:00 dalek rakudo/nom: 0506869 | lizmat++ | src/core/Array.pm:
23:00 dalek rakudo/nom: Lose VM dependent code for nqp::isnanorinf
23:00 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/0506869d79
23:00 lizmat and with that, I say "good night, #perl6"
23:01 japhb o/ lizmat
23:03 Mso150 joined #perl6
23:08 * jnthn wanders off to relax/rest also :)
23:08 jnthn See y'all tomorrow o/
23:18 Mso150 joined #perl6
23:28 cognominal joined #perl6
23:34 Mso150 joined #perl6
23:34 adu joined #perl6
23:51 jack_rabbit joined #perl6
23:52 masak 'night, jnthn

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

Perl 6 | Reference Documentation | Rakudo