Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-03-05

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 Actualeyes joined #perl6
00:12 jack_rabbit joined #perl6
00:44 cdg joined #perl6
00:51 wamba joined #perl6
01:05 sortiz m: use NativeCall; my role Foo is array_type(Pointer) { }; my CArray[Pointer] $a; say $a but Foo; # So far so good
01:05 camelia rakudo-moar 2c552d: OUTPUT«(Pointer]+{Foo})␤»
01:05 sortiz m:  use NativeCall; my role Foo is array_type(Pointer) { }; my CArray[Pointer] $a .= new(Pointer.new); say $a but Foo; # What type change!?
01:05 camelia rakudo-moar 2c552d: OUTPUT«This REPR cannot change type␤  in any mixin at gen/moar/m-Metamodel.nqp line 1300␤  in block <unit> at /tmp/EENyCZWnrr line 1␤␤»
01:15 BenGoldberg joined #perl6
01:38 vbnmpol joined #perl6
01:42 labster joined #perl6
02:01 molaf_ joined #perl6
02:20 partly_ joined #perl6
02:32 themonkeybob11 joined #perl6
02:40 [particle] joined #perl6
02:41 [particle]1 joined #perl6
02:47 ilbot3 joined #perl6
02:47 Topic for #perl6 is now »ö« Welcome to Perl 6! | https://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:,  or /msg camelia p6: ... | irclog: http://irc.perl6.org or http://colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
02:56 labster joined #perl6
02:59 molaf__ joined #perl6
03:35 Ben_Goldberg joined #perl6
03:37 Ben_Goldberg joined #perl6
03:49 noganex_ joined #perl6
03:52 idiosyncrat_ joined #perl6
04:01 kaare__ joined #perl6
04:22 wamba joined #perl6
04:38 llfourn m: role R { submethod Bool { True } }; class A does R {  }; say A || "lose" # Bug I think it works if it's changed to a method in the role
04:38 camelia rakudo-moar 2c552d: OUTPUT«lose␤»
04:43 vendethiel joined #perl6
04:43 llfourn m: class A { submethod Bool { True } }; say A || "lose" # better golfing
04:43 camelia rakudo-moar 2c552d: OUTPUT«lose␤»
04:43 mspo joined #perl6
04:50 SmokeMachine____ How can I create multi method with ^add_method?
04:50 llfourn SmokeMachine____: .^add_multi_method
04:50 skids class A { submethod Bool { 42.say } }; say so A; role B { submethod Bool { 43.say } }; say so B; role C { method Bool { 44.say } }; say so C;
04:50 llfourn SmokeMachine____: be sure to .^compse again after doing that if the class has already been composed
04:50 SmokeMachine____ Thanks!
04:50 skids m: class A { submethod Bool { 42.say } }; say so A; role B { submethod Bool { 43.say } }; say so B; role C { method Bool { 44.say } }; say so C;
04:50 camelia rakudo-moar 2c552d: OUTPUT«42␤True␤False␤False␤»
04:51 llfourn skids: so seems to work (for classes)
04:52 llfourn it's implicit boolean context via || etc that doesn't
04:53 llfourn m: class A { submethod Bool { True } }; say A.^find_method("Bool",:no_fallback(1)).(A)
04:53 camelia rakudo-moar 2c552d: OUTPUT«True␤»
04:54 llfourn I think the problem is in Metamodel::Mixins
04:54 llfourn It only checks method_table not submethod table
04:54 llfourn nqp::existskey($new_type.HOW.method_table($new_type), 'Bool') ?? 0 !!
04:55 llfourn self.get_boolification_mode($obj));
04:55 llfourn it should just use find_method I think
04:56 * skids too tired to chase that through Grammar/Actions.  Should probably head to bed.
04:57 llfourn skids: go to bed :D but it's https://github.com/rakudo/rakudo/blob/nom/src/Perl6/Metamodel/Mixins.nqp#L87
04:58 llfourn (I think)
04:58 llfourn although It's not a mixin there so maybe not
04:58 llfourn but I expect it's the same mistake somewhere else
04:58 skids m: use nqp; class A { submethod Bool { True } }; nqp::say(nqp::existskey(A.^method_table, "Bool"))
04:58 camelia rakudo-moar 2c552d: OUTPUT«0␤»
04:59 skids m: use nqp; class A { submethod Bool { True } }; nqp::say(nqp::existskey(A.^submethod_table, "Bool"))
04:59 camelia rakudo-moar 2c552d: OUTPUT«1␤»
04:59 llfourn precisely
04:59 skids yeah that sounds likely.
05:00 llfourn I will RT it and see if I can make a patch
05:43 Cabanossi joined #perl6
06:01 salva joined #perl6
06:22 TEttinger joined #perl6
07:12 sno joined #perl6
07:16 azawawi joined #perl6
07:17 azawawi good morning #perl6
07:17 azawawi sortiz: ping
07:18 sortiz azawawi, hi.
07:21 azawawi sortiz: as requested, https://github.com/azawawi/perl6-memoize/blob/master/t/01-load.t#L53 :)
07:21 azawawi https://github.com/azawawi/perl6-memoize/blob/master/lib/Memoize.pm6#L120  # documentation
07:22 azawawi sortiz: if you can review the implementation and let me know if it working as expected, that would be great :)
07:22 azawawi sortiz: s/if it/if it is/
07:26 sortiz azawawi, great! I'll review it later and I will give feedback.
07:27 xinming_ joined #perl6
07:29 azawawi sortiz: cool... keep them coming :)
07:29 * azawawi goes back to fixing perl6/doc issues
07:37 kurahaupo joined #perl6
07:38 cpage_ joined #perl6
07:50 domidumont joined #perl6
07:55 domidumont joined #perl6
08:11 darutoko joined #perl6
08:12 cpage_ joined #perl6
08:23 [TuxCM] joined #perl6
08:24 musiKk_ joined #perl6
08:29 FreezerburnV joined #perl6
08:31 CIAvash joined #perl6
08:38 rindolf joined #perl6
08:40 tmch joined #perl6
08:44 labster joined #perl6
08:47 lizmat joined #perl6
08:51 lizmat good *, #perl6!
08:53 lizmat after committing last night, I had this nagging feeling that the amount of times faster for Buf.^pun was wrong
08:53 lizmat and indeed it was, not 300x but only 17x  :-(
08:53 nine "only" 17x
08:55 moritz lizmat: the good thing is, only have to speed it up another 17x to make it to total 300x :-)
08:55 lizmat yeah, but I'm afraid I will have to leave that up to jnthn
08:56 [Tux] joined #perl6
08:57 lizmat [Tux]: back from skiing in one piece, I hope?
08:57 lizmat breakfast&
08:58 [Tux] Yes :)
08:58 azawawi enjoy :)
08:58 [Tux] already building
08:58 [Tux] still no CRNL or UTF8-C8 news?
08:59 firstdayonthejob joined #perl6
09:04 RabidGravy joined #perl6
09:04 RabidGravy Rarr!
09:04 [Tux] test            23.474
09:04 [Tux] test-t          12.174
09:04 [Tux] csv-parser      51.549
09:15 azawawi joined #perl6
09:19 FROGGS joined #perl6
09:22 masak m: say 17 * 17
09:22 camelia rakudo-moar 2c552d: OUTPUT«289␤»
09:23 masak m: say sqrt(300)
09:23 camelia rakudo-moar 2c552d: OUTPUT«17.3205080756888␤»
09:24 FROGGS morning
09:26 RabidGravy good morning my podling buddies
09:29 azawawi =begin morning
09:34 jjido joined #perl6
09:37 spider-mario joined #perl6
09:37 moritz \o
09:37 moritz azawawi: I think I've fixed the layout issues on https://deploybook.com/. Thanks again for your feedback
09:38 azawawi moritz: confirmed... they're now perfect :) moritz++
09:39 azawawi should tests `use lib 'lib'` or `prove -v -e perl6 -Ilib` should be the normal procedure?
09:40 integral joined #perl6
09:40 integral joined #perl6
09:42 moritz azawawi: the latter
09:42 moritz though I often include a "use lib 'lib';" in the test anyway, for convenience
09:44 moritz why does each use of !important in CSS feels like I've lost a small battle?
09:45 FROGGS this also catches testing against an installed dist rather then testing against the modified stuff in lib/
09:45 TreyHarris joined #perl6
09:45 partly_ There is no way to say perl6 it shouldn't use ansi terminal colors for output, or is there?
09:45 moritz also, I shouldn't procrastinate by tweaking the website. Instead I should *finally* finish my slides for GPW2016
09:45 moritz partly_: there's an environment variable, iirc
09:46 moritz partly_: RAKUDO_ERROR_COLOR=0
09:46 FROGGS no, I think RAKUDO_ERROR_COLOR= is needed
09:46 FROGGS since "0" is trueish
09:47 * moritz sighs
09:47 FROGGS (we should handle "0" correctly though)
09:47 partly_ Yes it's RAKUDO_ERROR_COLOR=
09:48 partly_ May be perl6 -h should mention it?
09:48 FROGGS +1
09:49 partly_ like this → To modify the display of colors unset the RAKUDO_ERROR_COLOR
09:49 moritz unsetting doesn't help
09:49 moritz you need to *set* it
09:49 moritz to an empty string
09:49 partly_ set to nothing?
09:50 partly_ To disable ansi colors in the error ouput set RAKUDO_ERROR_COLOR
09:50 FROGGS and it might also mention that colors are disabled on windows by default, and need to be turned on
09:50 partly_ my issue is that I would ask myself set to what?
09:50 FROGGS yeah
09:50 FROGGS we should make RAKUDO_ERROR_COLOR=0 work
09:51 FROGGS m: say <0>
09:51 camelia rakudo-moar 2c552d: OUTPUT«0␤»
09:51 FROGGS m: say <0>.WHAT
09:51 camelia rakudo-moar 2c552d: OUTPUT«(IntStr)␤»
09:52 FROGGS m: say <0>.BOOL
09:52 camelia rakudo-moar 2c552d: OUTPUT«Method 'BOOL' not found for invocant of class 'IntStr'␤  in block <unit> at /tmp/GXHiq6mRAw line 1␤␤»
09:52 FROGGS m: say <0>.Bool
09:52 camelia rakudo-moar 2c552d: OUTPUT«False␤»
09:52 FROGGS m: say var('0').Bool
09:52 camelia rakudo-moar 2c552d: OUTPUT«5===SORRY!5=== Error while compiling /tmp/DbmARUgSAY␤Undeclared routine:␤    var used at line 1. Did you mean 'VAR', 'val'?␤␤»
09:52 FROGGS m: say VAR('0').Bool
09:52 camelia rakudo-moar 2c552d: OUTPUT«True␤»
09:52 FROGGS m: say VAR('0').WHAT
09:52 camelia rakudo-moar 2c552d: OUTPUT«(Str)␤»
09:53 FROGGS moritz: IMO we should treat this env var as IntStr also
09:54 FROGGS because it is as unqualified as an argument to the program
09:54 partly_ m: my $f // True ?? "asd" !! "Bar; say $f
09:54 camelia rakudo-moar 2c552d: OUTPUT«5===SORRY!5=== Error while compiling /tmp/ib91CEPCu8␤Unable to parse expression in double quotes; couldn't find final '"' ␤at /tmp/ib91CEPCu8:1␤------> 3my $f // True ?? "asd" !! "Bar; say $f7⏏5<EOL>␤    expecting any of:␤        postfi…»
09:54 partly_ m: my $f // True ?? "asd" !! "Bar"; say $f
09:54 camelia rakudo-moar 2c552d: OUTPUT«(Any)␤»
09:55 FROGGS partly_: nothing assigns to $f
09:55 FROGGS m: my $f //= True ?? "asd" !! "Bar"; say $f
09:55 camelia rakudo-moar 2c552d: OUTPUT«asd␤»
09:56 partly_ I'm trying to undestand src/core/Rakudo/Internals.pm:671
09:56 partly_ It says %*ENV<RAKUDO_ERROR_COLOR> // !self.IS-WIN ?? (ansicolors) !! ("", "",..);
09:57 FROGGS and the result of the expression is returned from this method
09:57 partly_ The operators doc says // is defined-or operator
09:57 FROGGS aye
09:57 partly_ but There is only one  // instead of say Any // 0 // 42;
09:57 FROGGS m: my $f; say $f // True ?? 'foo' !! 'bar'
09:57 camelia rakudo-moar 2c552d: OUTPUT«foo␤»
09:58 FROGGS it is like
09:58 FROGGS m: my $f; say ($f // True) ?? 'foo' !! 'bar'
09:58 camelia rakudo-moar 2c552d: OUTPUT«foo␤»
09:58 FROGGS end even more:
09:58 FROGGS m: my $f; say ($f // True).Bool ?? 'foo' !! 'bar'
09:58 camelia rakudo-moar 2c552d: OUTPUT«foo␤»
09:58 FROGGS see?
09:59 partly_ m: my $f; say ($f // True)
09:59 camelia rakudo-moar 2c552d: OUTPUT«True␤»
09:59 partly_ m: my $f; say ($f // False)
09:59 camelia rakudo-moar 2c552d: OUTPUT«False␤»
09:59 partly_ m: my $f = ""; say ($f // True)
09:59 camelia rakudo-moar 2c552d: OUTPUT«␤»
10:00 partly_ ok, i think I undestand the // part
10:01 partly_ If i set RAKUDO_ERROR_COLOR=, then %*ENV<RAKUDO_ERROR_COLOR>.defined == False?
10:01 FROGGS no
10:01 FROGGS defined is true
10:02 FROGGS so it does not consider is-win as port of the condition of the ternary
10:02 FROGGS so it calls .Bool on the (defined) env var only
10:02 FROGGS which then returns False
10:02 espadrine joined #perl6
10:02 FROGGS m: say val('0')
10:02 camelia rakudo-moar 2c552d: OUTPUT«0␤»
10:02 FROGGS m: say val('0').Bool
10:02 camelia rakudo-moar 2c552d: OUTPUT«False␤»
10:03 FROGGS aha!
10:03 FROGGS that's what I'd need
10:04 FROGGS testing a patch...
10:05 azawawi tadzik: ping
10:05 AlexDaniel joined #perl6
10:05 partly_ m: say ("0" // True) ?? say "foo" !! say "bar";
10:05 camelia rakudo-moar 2c552d: OUTPUT«foo␤True␤»
10:05 AlexDaniel m: say ?+‘0’
10:05 camelia rakudo-moar 2c552d: OUTPUT«False␤»
10:06 partly_ m: say ("" // True) ?? say "foo" !! say "bar";
10:06 camelia rakudo-moar 2c552d: OUTPUT«bar␤True␤»
10:06 RabidGravy right, that's a fairly worky MP3 frame parser done.  If someone could just do the same with Vorbis, AAC, WebM and Opus that would be lovely. kthx
10:06 FROGGS RabidGravy: *g*
10:06 FROGGS $ FOO=0 perl6 -e 'say so %*ENV<FOO>'
10:06 FROGGS False
10:06 FROGGS /o/
10:07 FROGGS and that's the path in src/core/Env.pm:
10:07 FROGGS -        %ENV{$key} = nqp::p6box_s(nqp::iterval($envelem));
10:07 FROGGS +        %ENV{$key} = val(nqp::p6box_s(nqp::iterval($envelem)));
10:08 nine win 1
10:08 * masak manually teleports nine to window 1
10:09 nine thanks :)
10:11 partly_ Ahh now i get it "0".Bool == True, but 0.Bool == False. val Converts Str to Int and all is fine,
10:11 partly_ Took me some time, because i got distracted by _so_ :)
10:11 FROGGS cal converts the something in "0" into an IntStr, which is both a string and an int
10:12 partly_ FROGGS: thanks for the explanation.
10:13 partly_ btw val is missing from the docs. The search does not find it and it's missing in the list
10:13 FROGGS ewww :o(
10:14 FROGGS so much to do and so little time :o(
10:17 Actualeyes joined #perl6
10:17 vendethiel joined #perl6
10:20 Actualeyes joined #perl6
10:20 partly_ m: my \x=23; say 5 x 5;
10:20 camelia rakudo-moar 2c552d: OUTPUT«55555␤»
10:21 partly_ m: my \x=23; say x
10:21 camelia rakudo-moar 2c552d: OUTPUT«23␤»
10:21 virtualsue joined #perl6
10:23 partly_ m: my \x=23; sub x() { return 42 }; say x;
10:23 camelia rakudo-moar 2c552d: OUTPUT«23␤»
10:23 masak partly_: the parser knows if it's expecting a term (your \x) or an operator (infix:<x>), and there's no ambiguity
10:23 partly_ m: my \x=23; sub x() { return 42 }; say x();
10:23 camelia rakudo-moar 2c552d: OUTPUT«42␤»
10:24 masak oh, and in the latter case, term shadows the usual meaning of `x` for `&x()`
10:24 masak (but don't do that -- keep your terms and subs separate, that's better) :)
10:24 partly_ masak: yeah of course.
10:27 masak m: sub foo { "OH HAI" }; enum A <b foo c>; say foo; say foo()
10:27 camelia rakudo-moar 2c552d: OUTPUT«foo␤OH HAI␤»
10:28 partly_ Hmm i can imagine that the abuse of sigilless variables can bring you in deep trouuble where not obvious things happen.
10:28 masak frankly I don't see the big deal with sigilless variables
10:29 masak maybe I just like sigils ;)
10:30 kurahaupo joined #perl6
10:35 FROGGS and I miss nicely interpolating variables in languages that either have no sigils or dont make use of sigils
10:37 vendethiel to each their own :)
10:37 vendethiel hi, #perl6.
10:40 masak hi, vendethiel
10:42 FROGGS vendethiel: it is just a missed opportunity, is all :o)
10:43 FROGGS that reminds me of a PHP 7 talk
10:43 lizmat commuting&
10:43 FROGGS where the devs had two ways to implement something
10:44 FROGGS the audience wanted b) the more strickt way, but they did it the a) way which was more lax but potentially error prone
10:44 FROGGS strict*
10:45 FROGGS (sorry for my Germish accent)
10:46 ely-se joined #perl6
10:48 xiaomiao FROGGS: why not both ;)
10:49 FROGGS xiaomiao: nah, in my opinion the default (perhaps only) way should lead the dev away from easy mistakes
10:49 FROGGS you cant provide every feature in two or more ways
10:50 mst right. I am really quite pleased that ES6 'class' keyword enforces 'use strict' within its body even if you didn't specify
10:50 FROGGS aye
10:50 FROGGS that's like the standard nowadays
10:50 xiaomiao FROGGS: well, I would appreciate gcc devs using -Werror ;)
10:51 mst yes, but I like that even if you don't know you should be doing that
10:51 mst using the new shiny syntax gives you it anyway
10:53 kurahaupo joined #perl6
10:55 azawawi anyone online with commit rights on https://github.com/tadzik/Shell-Command?
10:56 FROGGS I dont have a commit bit there sadly
10:56 ely-se joined #perl6
10:56 azawawi https://github.com/azawawi/Shell-Command  # :)
10:57 masak hm, in the Chrome Console the use of `class` seems to be illegal unless you're already under "use strict"
10:57 mst oh, maybe I misunderstood what I read and suck
10:57 masak no, I heard the same thing
10:57 masak just observing what happens in practice
10:57 masak might be a difference between spec and implementation ;)
10:58 mst sure. or we could both suck similarly. this tends to happen to programmers who know each other, usually at the least opportune moment :D
10:58 vendethiel xiaomiao: no, never use -Werror
10:58 vendethiel it's a bad idea.
10:59 xiaomiao vendethiel: if your code spews hundreds of warnings during compilation ... that's a bad smell
10:59 vendethiel your code will randomly stop compiling when you update GCC. And sometimes they add warning for spurious things. Like in GCC 6, the indentation warning.
10:59 xiaomiao especially if your code does that when self-compiling :)
10:59 vendethiel Sure; it shouldn't spew so many errors (you can limit the number of errors anyway), but -Werror without specifying explicitly which warnings should come off as errors is a bad idea.
10:59 xiaomiao gcc should compile gcc without thousands of warnings
10:59 mst the indentation warning sounds really quite handy
10:59 mst certainly I would be happy to opt in to it
11:00 FROGGS xiaomiao: adding -Werror for authors is okay, not so much for users which run a different/untested compiler
11:00 azawawi https://atom.io/packages/python-debugger  # going to work on something like this soon for atom-perl6-editor-tools :)
11:00 vendethiel it does - but with -Werror, it means your code won't compile anymore
11:00 mst FROGGS: yes, and xiaomiao was saying the gcc devs should add -Werror for themselves when compiling gcc
11:00 mst why is everybody assuming the stupidest possible interpretation of his statement? :(
11:00 FROGGS okay, then I agree :o)
11:00 xiaomiao :D
11:00 * mst makes a giant sign saying PRINCIPLE OF CHARITY and nailguns it to the channel ceiling
11:01 FROGGS uhh, with such force
11:01 mst when all you have is a nailgun, every problem looks like a messiah
11:01 azawawi :)
11:01 _nadim Morning
11:02 _nadim anyone knows why Stash doesn't have elemes as the doc states?
11:02 virtualsue_ joined #perl6
11:02 FROGGS _nadim: can you demonstrate what you are missing?
11:04 _nadim Hmm, actually it si an MVMContext that is missing it but it is "caught " as a Stash in thecode.
11:06 masak hey, uh, what's with this new giant sign in the ceiling?
11:06 Skarsnik joined #perl6
11:13 azawawi https://github.com/tadzik/Shell-Command/pull/10
11:14 azawawi .tell tadzik please enable Travis CI / App
11:14 yoleaux azawawi: I'll pass your message to tadzik.
11:14 azawawi .tell tadzik please enable Travis CI / AppVeyor support. See https://github.com/tadzik/Shell-Command/pull/10
11:14 yoleaux azawawi: I'll pass your message to tadzik.
11:14 azawawi pressed enter too soon :)
11:14 musiKk_ joined #perl6
11:17 mst masak: I think about 98% of perl6's niceness can be summed up by 'apply the principle of charity everywhere as hard as possible'
11:17 mst I mean, #perl6's niceness
11:19 RabidGravy it's a struggle every day believe me
11:19 azawawi https://github.com/perl6/doc/issues/411#issuecomment-192623251  # please review
11:19 RabidGravy ;-)
11:20 azawawi mst: and the nailgun? :)
11:20 mst RabidGravy: if I didn't think I'd've needed reminding too, I'd've nailgunned it to FROGGS instead of the ceiling :D
11:20 RabidGravy :)
11:21 mst azawawi: wait, you think I need a *reason* to nailgun something to a flat surface?
11:21 mst clearly I'm not talking in here enough
11:21 edehont joined #perl6
11:21 RabidGravy well staple gun maybe
11:21 azawawi mst: the words nice and nailgun caught my attention :)
11:22 mst (1) I said #perl6 was nice (2) I'm the one with the nailgun (3) that's why the sign is for me too :D
11:24 * RabidGravy wonders if he should stick this bitfield stuff in a separate module and release it
11:24 mst azawawi: http://trout.me.uk/quotes.txt - search for 'staffment'
11:33 azawawi RabidGravy: yeah a staple gun :)
11:35 azawawi mst: That's the problem with some words. One gets distracted by them and the discussion goes elsewhere :)
11:45 azawawi what color theme represents Perl 6? Perl had a blue theme to it in all of its books. Ruby has red.
11:45 wamba joined #perl6
11:46 mst in order to match camelia it needs to be something playful, fun, and possible to make cute, while also annoying a bunch of people in the process
11:46 mst I suggest a nice pastel yellow
11:46 azawawi https://raw.githubusercontent.com/DanBrooker/file-icons/master/file-icons.png
11:46 RabidGravy pinkish
11:48 sjn azawawi: O'Reilly's color themes aren't really that important anymore imo... I don't think we should leave it to them to pick a "theme" like you mentioned
11:49 * sjn wishes TPF would some serious work around that topic for once. :-(
11:52 azawawi camelia logo dominant colors are (black, blue, ...)  http://pasteboard.co/22nSW4As.png
11:52 rindolf joined #perl6
11:56 sjn azawawi: I'd pick the yellow one, if I only get to choose one. Then again, my aesthetic sense isn't that good :-P
11:56 mst azawawi: I was mostly being silly, mind
11:57 mst sjn: if somebody would convince them to actually give mdk a marketing budget to go with his position (rather than approve-everything-one-at-a-time-possibly) that might actually be doable :)
11:57 * sjn thinks yellow is good because of... The King in Yellow? :)
11:57 * mst was mostly joking about pastel yellow
11:58 sjn mst: yeah, that stuff needs monies and leadership will
11:58 sjn "will to lead"
12:02 AlexDaniel m: say [2, 5, 3].shape
12:02 camelia rakudo-moar 2c552d: OUTPUT«(*)␤»
12:02 AlexDaniel m: say [2, [5, 4], 3].shape
12:02 camelia rakudo-moar 2c552d: OUTPUT«(*)␤»
12:03 AlexDaniel am I the only one who finds “whatever” to be a strange answer to that question? :)
12:04 kjs_ joined #perl6
12:04 Skarsnik look a weird defautlk
12:04 AlexDaniel m: my @a[-99;-10]; say @a.shape' # geez…
12:04 camelia rakudo-moar 2c552d: OUTPUT«5===SORRY!5=== Error while compiling /tmp/xl0yQhfoI1␤Two terms in a row␤at /tmp/xl0yQhfoI1:1␤------> 3my @a[-99;-10]; say @a.shape7⏏5' # geez…␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        sta…»
12:05 azawawi or this color for Perl 6 icons  http://tinyurl.com/hd2k4d8  :)
12:05 Skarsnik this yellow is nice
12:05 AlexDaniel oh great, it seems like it was fixed :)
12:05 moritz m: my @a[-99;-10]; say @a.shape;
12:05 camelia rakudo-moar 2c552d: OUTPUT«(-99 -10)␤»
12:05 AlexDaniel ah…
12:05 AlexDaniel there was a quote…
12:06 AlexDaniel m: my @a[-20]
12:06 camelia rakudo-moar 2c552d: OUTPUT«Memory allocation failed; could not allocate 18446744073709551456 bytes␤»
12:07 travis-ci joined #perl6
12:07 travis-ci Doc build passed. Eric de Hont 'Added an entry for method shape'
12:07 travis-ci https://travis-ci.org/perl6/doc/builds/113878669 https://github.com/perl6/doc/commit/283a8536435c
12:07 travis-ci left #perl6
12:08 AlexDaniel ok I've already reported that: https://rt.perl.org/Ticket/Display.html?id=126800
12:13 ish_ joined #perl6
12:35 kjs_ joined #perl6
12:46 kid51 joined #perl6
12:51 kurahaupo joined #perl6
12:56 test123 joined #perl6
13:07 test123 joined #perl6
13:15 awwaiid joined #perl6
13:28 awwaiid joined #perl6
13:30 jjido_ joined #perl6
13:37 partly_ The perl 6 compiler errors are very hard to parse with vim errorformat
13:37 partly_ also sometimes the file name and line number are given and some times not
13:38 partly_ sometimes the file name is repeated with and without line number and some times just ones the file name, but multiple line numbers
13:38 edehont joined #perl6
13:40 awwaiid joined #perl6
13:40 partly_ Look how different they all are https://gist.github.com/kalkin/cf84f21f8f50e9f962fd
13:42 domidumont joined #perl6
13:42 * kaare__ looks at the color question and wonders.
13:42 kaare__ I thought Perl 6 was the rainbow of programming
13:43 llfourn partly_: are those Errors after SORRY! really not appearing on a new line?
13:44 partly_ llfourn: i thought this is the default? Only the missing module message (first one) has no message after SORRY
13:45 llfourn partly_: I feel your pain (a bit), we probably need to do a better job making Exceptions consistent
13:45 llfourn they are defined here https://github.com/rakudo/rakudo/blob/nom/src/core/Exception.pm ( in case you are not aware )
13:46 llfourn I'd say PRs for more consistent error messages are more likely to be enthuastically accepted than other things because they don't affect versioning
13:46 llfourn or at least IMO they don't :P
13:46 partly_ llfourn: well the issue is that from the human point of view, they are completly okay. But an IDE would preffer to have something different to parse
13:47 llfourn partly_: Right. But I'd say for example, sometimes errors appearing on a new line after SORRY! and sometimes not is something that could be fixed
13:47 partly_ In the linked gist the second example is a perfect example of a human readable error. For a compiler you normally would repeat the file name
13:48 partly_ llfourn: I will have a look at that
13:48 partly_ or in general at the Exception.pm
13:48 partly_ now need to get groceries :)
13:48 llfourn I agree with you that making them consistent so that they can be parsed with the line no and file being in the same place each time would make sense
13:51 Psyche^_ joined #perl6
14:00 telex joined #perl6
14:00 kjs_ joined #perl6
14:17 Ven joined #perl6
14:18 RabidGravy joined #perl6
14:19 RabidGravy RARR!
14:23 RabidGravy m: sprintf "%08b", +^(0b00011000)
14:23 camelia rakudo-moar 2c552d: ( no output )
14:23 RabidGravy m: printf "%08b", +^(0b00011000)
14:23 camelia rakudo-moar 2c552d: OUTPUT«00-11001»
14:23 RabidGravy that's entirely not what I expected
14:24 RabidGravy I think there may be two bugs there
14:25 AlexDaniel RabidGravy: beauty :)
14:25 masak I agree that looks very wrong
14:26 masak just out of curiosity, though -- what did you expect?
14:26 RabidGravy well, I'd hoped that it would be "11100111"
14:27 RabidGravy but for any reading of "two's complement" that's not right and the printf is broken given the bogus result
14:28 masak m: say +^0b00011000
14:28 camelia rakudo-moar 2c552d: OUTPUT«-25␤»
14:28 masak m: say 0b11000
14:28 camelia rakudo-moar 2c552d: OUTPUT«24␤»
14:29 masak m: say 0b11111111 - 0b11000
14:29 camelia rakudo-moar 2c552d: OUTPUT«231␤»
14:32 jjido_ joined #perl6
14:33 skids joined #perl6
14:35 AlexDaniel partly_: it was decided that error messages should be human-readable in the first place
14:35 AlexDaniel partly_: and the whole machine-readable part was left behind as non important…
14:36 AlexDaniel IMO it is a huge problem
14:38 SmokeMachine____ does any one know why is it giving P6opaque error on the second attribute? https://www.irccloud.com/pastebin/19SqhrnQ/
14:38 _nadim Is it possible to give a junction in  a given/when?
14:38 AlexDaniel maybe a more general solution would be to have some kind of a special mode that will wrap error messages in some special characters or something
14:41 AlexDaniel partly_: I think that bug reports like “I'm trying to parse *this* but it is nearly impossible” will be taken care of, eventually. Or feel free to fix that stuff yourself :)
14:42 jnthn AlexDaniel: More likely, just serialize the exception object (.perl or so) and spit that out. That's part of the reason for them being objects in the first place, so machines can process them.
14:43 AlexDaniel jnthn: right
14:43 RabidGravy indeed
14:43 jnthn Maybe some environment variable can be set to request that.
14:43 jnthn Then no need to go parsing stuff out of text at all. :)
14:43 AlexDaniel that's even better
14:43 llfourn SmokeMachine____: try not calling .^compose on the clazz, it's going to be composed anyway at the end.
14:44 psch help, hack is dying (again)
14:44 psch "load average: 805.83, 798.81, 781.14"
14:44 psch moritz, FROGGS?
14:44 llfourn SmokeMachine____: though that might not be the problem lets start there :)
14:44 AlexDaniel m: given 10 { when 5|10 { say ‘hallo’ } }
14:44 camelia rakudo-moar 2c552d: OUTPUT«hallo␤»
14:44 AlexDaniel m: given 100 { when 5|10 { say ‘hallo’ } }
14:44 camelia rakudo-moar 2c552d: ( no output )
14:44 AlexDaniel _nadim: why not?
14:45 jnthn llfourn: It's likely to be the problem. You can't add attributes to a class after it's been composed.
14:45 AlexDaniel _nadim: or you mean other way round?
14:45 jnthn But a trait shouldn't be doing the composition.
14:45 moritz psch: killall?
14:45 SmokeMachine____ llfourn: that worked like a charm!
14:45 RabidGravy so my best bet for inverting a bit pattern is actually XOR it with "all the bits"
14:45 llfourn me++
14:45 RabidGravy llfourn++
14:45 SmokeMachine____ llfourn: thanks!
14:45 psch moritz: my user has irssi and ~9 vim buffers running
14:46 psch well, and two screen sessions
14:46 RabidGravy m: say sprintf "%08b", 0b11111111 +^ 0b00011000
14:46 camelia rakudo-moar 2c552d: OUTPUT«11100111␤»
14:46 psch (and a hanging perl6-j and ps now too...)
14:46 SmokeMachine____ llfourn: any idea why that was working?
14:46 SmokeMachine____ llfourn: *any idea why that was happening?
14:46 llfourn SmokeMachine____: read what jnthn++ said :)
14:47 FROGGS ewww
14:47 psch moritz: i did see collectd in ps, but i guess we're beyond "can become workable without soft reset" again :S
14:47 _nadim AlexDaniel: because I want to make sure. In my simple tst it works, as I expected it to, but in another piece of code it doesn't. I need to look at where my error is more carefuly I guess.
14:47 SmokeMachine____ thank you all!
14:47 psch ...well, not that collectd is really related there
14:47 llfourn SmokeMachine____: you are composing the class after adding the first attribute so when you try and add the attribute the next time and compose it goofs
14:47 AlexDaniel m: given 10|15 { when 10 { say ‘hallo’ } }
14:47 camelia rakudo-moar 2c552d: OUTPUT«hallo␤»
14:47 AlexDaniel m: given 10|15 { when 15 { say ‘hallo’ } }
14:47 camelia rakudo-moar 2c552d: OUTPUT«hallo␤»
14:48 AlexDaniel m: given 10|15 { when 25 { say ‘hallo’ } }
14:48 camelia rakudo-moar 2c552d: ( no output )
14:48 AlexDaniel _nadim: ↑ it works
14:48 SmokeMachine____ llfourn: yes, makes sense!
14:48 skids m: my $c = -> { once 42.say; my $d = 1.rand; sleep $d; $d.say; once say "43 $d"; }; start { $c() }; $c(); sleep 1;
14:48 camelia rakudo-moar 2c552d: OUTPUT«42␤0.452358791016134␤0.775707954734534␤43 0.775707954734534␤»
14:48 llfourn SmokeMachine____: the class will be composed anyway when the compiler gets to its closing '}'
14:48 * skids wonders if once is threadsafe.
14:48 jnthn skids: no, nor is state
14:48 jnthn Well, "because state isn't" more like
14:49 skids By design or NYI?
14:49 jnthn By design
14:49 jnthn You can explicitly clone the closure to get a fresh state var per thread
14:50 skids But you can't ever rely on one state among ultiple threads not double-hitting, right?
14:51 SmokeMachine____ thanks!
14:51 jnthn skids: No, you can't rely on that.
14:51 skids OK, I think that deserves doccing. Thanks.
14:52 musiKk_ joined #perl6
14:54 pmurias joined #perl6
14:55 _nadim AlexDaniel: Not in the piece of code I have in front of me. I'll do some scaffolding to check everything, again.
14:55 pmurias do we want to allow setting open(nl => "", ...) to read things in paragraph mode?
14:56 pmurias like setting $/ = "" does in Perl 5?
14:56 pmurias there is an open issue for that: https://github.com/MoarVM/MoarVM/issues/193
14:58 AlexDaniel _nadim: well, golf it down and we will have a look :)
14:58 masak pmurias: good question
14:58 themonkeybob11 joined #perl6
14:58 masak pmurias: I guess it depends whether we consider it a hack or an admirable DWIM that "" does that ;)
15:02 moritz ok, I'll force-reboot hack
15:02 dalek joined #perl6
15:03 synopsebot6 joined #perl6
15:03 themonke1bob11 joined #perl6
15:12 pmurias joined #perl6
15:12 pmurias .tell it's not DWIM to me as I wouldn't ever expect that without looking it up
15:12 yoleaux pmurias: What kind of a name is "it's"?!
15:12 pmurias .tell masak it's not DWIM to me as I wouldn't ever expect that without looking it up
15:12 yoleaux pmurias: I'll pass your message to masak.
15:13 psch joined #perl6
15:13 pmurias .tell masak it seems to be something inherited from awk
15:13 yoleaux pmurias: I'll pass your message to masak.
15:14 sjoshi joined #perl6
15:15 _nadim well, there's not much to gold down. In simple examples it works, in my code it doesn't. http://nopaste.linux-dev.org/?975775. that code doesn't work but when the lines that are comment out are part of the code it works
15:15 _nadim and you can see that the commented lines are what the junction should match.
15:15 dalek doc: 162598a | skids++ | doc/Language/ (2 files):
15:15 dalek doc: Doc per-clone behavior of state/once and mention not threadsafe
15:15 dalek doc: review: https://github.com/perl6/doc/commit/162598a291
15:16 RabidGravy skids++
15:17 psch m: sub f { (<A B C>) }; given 'A' { when any(f()) { .say } }
15:17 camelia rakudo-moar 2c552d: OUTPUT«A␤»
15:18 psch m: class C { method m { (<A B C>) }; method foo { given 'A' { when any($.m()) { .say } } } }; C.foo
15:18 camelia rakudo-moar 2c552d: ( no output )
15:18 psch m: class C { method m { (<A B C>) }; method foo { given 'A' { when any(self.m()) { .say } } } }; C.foo
15:18 camelia rakudo-moar 2c552d: OUTPUT«A␤»
15:19 psch _nadim: seems like the $ shorthand for self doesn't work right there
15:20 _nadim psch:  you are right
15:20 psch m: class C { method m { (<A B C>) }; method foo { given Any { when any(self.m()) { .say } } } }; C.foo
15:20 camelia rakudo-moar 2c552d: ( no output )
15:20 parseirc14467 joined #perl6
15:20 psch m: class C { method m { (<A B C>) }; method foo { given Mu { when any(self.m()) { .say } } } }; C.foo
15:20 camelia rakudo-moar 2c552d: ( no output )
15:20 psch err
15:20 psch ...what did i even want to figure out with that
15:21 _nadim that it would not match ;)
15:22 psch m: class C { method m { (<A B C>) }; method foo { say any($.m()); say any(self.m()) } }; C.foo # something like this, maybe...
15:22 camelia rakudo-moar 2c552d: OUTPUT«any((A B C))␤any(A, B, C)␤»
15:22 psch seems like $. instead of self. adds an item context there
15:23 psch m: class C { method f { 1 }; method foo { say $.f.perl; say self.f.perl }; C.foo
15:23 camelia rakudo-moar 2c552d: OUTPUT«5===SORRY!5=== Error while compiling /tmp/l4gZ4yly1E␤Missing block␤at /tmp/l4gZ4yly1E:1␤------> 3{ say $.f.perl; say self.f.perl }; C.foo7⏏5<EOL>␤    expecting any of:␤        statement end␤        statement modifier␤        stateme…»
15:23 psch m: class C { method f { 1 }; method foo { say $.f.perl; say self.f.perl } }; C.foo
15:23 camelia rakudo-moar 2c552d: OUTPUT«1␤1␤»
15:23 psch m: class C { method f { (1) }; method foo { say $.f.perl; say self.f.perl } }; C.foo
15:23 camelia rakudo-moar 2c552d: OUTPUT«1␤1␤»
15:23 psch m: say &any.signature.perl
15:23 camelia rakudo-moar 2c552d: OUTPUT«:(+ is raw)␤»
15:24 skids m: class C { method f { (1,) }; method foo { say $.f.perl; say self.f.perl } }; C.foo
15:24 camelia rakudo-moar 2c552d: OUTPUT«$(1,)␤(1,)␤»
15:24 psch i do remember that there's supposed to be a difference between $.m() and self.m(), but i have no idea if that's the right difference :)
15:24 parseirc28296 joined #perl6
15:25 psch moritz: thanks for the hack reboot, before i forget :)
15:26 _nadim psch:  any idea where that could be documented?
15:26 awwaiid joined #perl6
15:27 _nadim or anyone else who knows?
15:27 _nadim because if it is not it is a bug
15:27 masak joined #perl6
15:28 CIAvash joined #perl6
15:29 _nadim Dmping a CallFrme was a joyous trip, beween the internals sipping out, this and Mu, the God of nothing, I amstarting to wonder if I am not a bit masochist.
15:31 skids _nadim: it is specced at least: "$.foo(1,2,3);       # calls self.foo under $ context"
15:32 _nadim and how would, in this case, $ context differ from self context?
15:32 skids By itemization
15:33 psch m: say any((1,2)).perl; say any(1,2).perl
15:33 camelia rakudo-moar 2c552d: OUTPUT«any(1, 2)␤any(1, 2)␤»
15:33 psch m: say any($(1,2)).perl; say any(1,2).perl #
15:33 camelia rakudo-moar 2c552d: OUTPUT«any($(1, 2))␤any(1, 2)␤»
15:33 skids that's single arg rule.
15:35 jjido_ joined #perl6
15:35 _nadim I'll burn that somewhere in my brains
15:48 Ben_Goldberg joined #perl6
15:50 partly_ AlexDaniel: i will see what i can do
15:54 awwaiid joined #perl6
16:00 cpage_ joined #perl6
16:01 jjido joined #perl6
16:07 [Coke] joined #perl6
16:07 * [Coke] wonders if he will ever get irssi to come back "as was" post reboot.
16:08 lizmat joined #perl6
16:09 [Coke] half the freenode windows show up but then aren't connected to a channel.
16:10 araujo_ joined #perl6
16:10 nine adding the netwos and servers with auto and then /save went a long way for me in that regard
16:12 awwaiid joined #perl6
16:15 _nadim has anything happened to the ecosystem? like moved to another repository.
16:16 moritz nope
16:18 _nadim thanks
16:22 rindolf joined #perl6
16:23 lizmat joined #perl6
16:27 partly_ when running perl6 -c is it possible to have more than one Exception at a time? (I differentiate between exceptions and errors, because Undeclared routine is _one_ exception, but it can contain _multiple_ errors)
16:27 kjs_ joined #perl6
16:27 partly_ All will the compiler barf at the first exception?
16:27 partly_ s/All/Or/g
16:28 Skarsnik not sure, compile time is already rather complex
16:29 partly_ And some times it will printout the same exception twice o_O
16:30 psch well, -c is "stop after stage parse"
16:30 partly_ m: sub foo($b) is export { bar() }
16:30 camelia rakudo-moar 2c552d: OUTPUT«5===SORRY!5=== Error while compiling /tmp/JHU0IonMC9␤Undeclared routine:␤    bar used at line 1. Did you mean 'VAR', 'bag'?␤␤»
16:30 psch which btw includes *running* BEGIN blocks
16:31 psch i think "only the first exception" falls straight out of one-pass-parsing, though
16:31 psch similar to how Eclipse won't complain about missing identifiers in a string with a missing end delimiter - because that means the rest of the file is the string and the only error that can be found is "missing end delimiter for literal string"
16:32 psch or somesuch
16:32 musiKk_ joined #perl6
16:32 [Coke] (same exeption twice) that was a precomp bug which is, I believe fixed.
16:32 partly_ Intersting, if i have an Undeclared routine called in a module and run perl6 -c lib/My/Module.pm, the exception is printed once, if i run perl -c t/01-basic.t which uses My::Module, the exception is printed twice
16:34 Ven joined #perl6
16:34 [Coke] partly_: what version of rakudo are you running?
16:34 partly_ This is Rakudo version 2015.12-242-g8bd7ee6 built on MoarVM version 2016.01
16:34 nowan_ joined #perl6
16:34 partly_ ok it's to old
16:39 partly_ [Coke]: thanks for the hint, now it's gone
16:39 nowan joined #perl6
16:41 lizmat joined #perl6
16:48 ugexe seems like a precomp related error. most perl6 code should work on that rakudo if it works on the current
16:48 dalek rakudo/nom: 0ad8b36 | lizmat++ | src/core/Rakudo/Internals.pm:
16:48 dalek rakudo/nom: Make RAKUDO_ERROR_COLOR=0 work as expected
16:48 dalek rakudo/nom:
16:48 dalek rakudo/nom: This was I guess one of the last places we forgot to change when the
16:48 dalek rakudo/nom: string "0" because True rather than False.
16:49 dalek rakudo/nom:
16:49 dalek rakudo/nom: Also create Rakudo::Internals.NUMERIC-ENV-KEY(\key) helper method.
16:49 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/0ad8b36f3f
16:50 lizmat joined #perl6
16:50 lizmat s/because/became
16:51 dalek ecosystem: c49fb36 | (Nadim Khemir)++ | META.list:
16:51 dalek ecosystem: Update Data::Dump::Tree to v1.0.1
16:51 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/c49fb36487
16:51 dalek ecosystem: 060e7f1 | (Fritz Zaucker)++ | META.list:
16:51 dalek ecosystem: Merge pull request #164 from nkh/master
16:51 dalek ecosystem:
16:51 dalek ecosystem: Update Data::Dump::Tree to v1.0.1
16:51 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/060e7f1153
16:54 khw joined #perl6
16:55 buharin joined #perl6
16:55 buharin hi
16:56 El_Che joined #perl6
16:59 RabidGravy m: my $a = (((1 +< 2) - 1) +< (8 - (2 + 0))); my $b = ((2^8) - 1) +^ $a; say sprintf "%08b", $b
16:59 camelia rakudo-moar 2c552d: OUTPUT«P6opaque: get_boxed_ref could not unbox for the representation '20'␤␤»
16:59 psch m: my $a = (((1 +< 2) - 1) +< (8 - (2 + 0))); my $b = ((2^8) - 1) +^ $a; say $b
16:59 camelia rakudo-moar 2c552d: OUTPUT«one(193, 199)␤»
16:59 RabidGravy another unexpected result in the family of bitwise stuff
16:59 psch m: say sprintf one(1,2)
16:59 camelia rakudo-moar 2c552d: OUTPUT«one(1, 2)␤»
16:59 psch RabidGravy++
16:59 psch that's amazing
17:00 moritz RabidGravy: is that a weird mesage for an overflow?
17:00 RabidGravy don't think so
17:00 psch oh
17:00 psch 2^8
17:01 psch was that supposed to be one(2,8)
17:01 RabidGravy m: say 0b00111111
17:01 camelia rakudo-moar 2c552d: OUTPUT«63␤»
17:01 psch or 2**8?
17:01 psch m: my $a = (((1 +< 2) - 1) +< (8 - (2 + 0))); my $b = ((2**8) - 1) +^ $a; say $b
17:01 camelia rakudo-moar 2c552d: OUTPUT«63␤»
17:01 psch m: my $a = (2^8) - 1; say sprintf "%08b", $a
17:01 camelia rakudo-moar 2c552d: OUTPUT«P6opaque: get_boxed_ref could not unbox for the representation '20'␤␤»
17:02 RabidGravy m: my $a = (2^8) - 1; say sprintf "%016b", $a
17:02 camelia rakudo-moar 2c552d: OUTPUT«P6opaque: get_boxed_ref could not unbox for the representation '20'␤␤»
17:02 psch m: sprintf "%08b", (1|1) - 1
17:02 camelia rakudo-moar 2c552d: OUTPUT«P6opaque: get_boxed_ref could not unbox for the representation '20'␤␤»
17:02 psch m: sprintf "%08b", (1|1)
17:02 camelia rakudo-moar 2c552d: OUTPUT«P6opaque: get_boxed_ref could not unbox for the representation '20'␤␤»
17:03 psch yeah, Junctions into sprintf
17:03 lizmat joined #perl6
17:03 psch i'd guess because the sprintf handler is in NQP or something
17:03 RabidGravy but there shouldn't be a junction there
17:03 psch RabidGravy: 2^8 is one(2, 8)
17:03 psch m: say 2^8
17:03 camelia rakudo-moar 2c552d: OUTPUT«one(2, 8)␤»
17:04 RabidGravy but there isn't in my code?
17:04 psch "my $b = ((2^8) - 1)4~
17:04 psch well, it's what appears here vOv
17:05 psch well, the 4~ was supposed to be a "
17:05 psch http://irclog.perlgeek.de/perl6/2016-03-05#i_12142632 logs agree :S
17:06 RabidGravy what the actual ..... ?
17:06 timotimo hmm
17:06 lizmat m: printf "%d",one()  # shortest golf so far
17:06 camelia rakudo-moar 2c552d: OUTPUT«P6opaque: get_boxed_ref could not unbox for the representation '20'␤␤»
17:06 RabidGravy it's 2 <asterisk> <asterisk> 8 as what I typed
17:06 psch m: printf "%d",1|1
17:06 camelia rakudo-moar 2c552d: OUTPUT«P6opaque: get_boxed_ref could not unbox for the representation '20'␤␤»
17:06 psch RabidGravy: spooky irc client..?
17:07 RabidGravy no, it's doing it in vim too
17:08 RabidGravy okay I'm going stupid
17:08 RabidGravy never mind
17:11 dalek rakudo-star-daily: a7620be | coke++ | log/ (9 files):
17:11 dalek rakudo-star-daily: today (automated commit)
17:11 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/a7620be1b0
17:11 dalek rakudo-star-daily: 5620aa5 | coke++ | log/ (8 files):
17:11 dalek rakudo-star-daily: today (automated commit)
17:11 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/5620aa5128
17:11 jjido joined #perl6
17:12 psch yeah, probably something about how it's handed over to NQP
17:12 psch r-j throws an NPE for < printf $fmt, $junc >
17:13 wamba joined #perl6
17:13 timotimo o/
17:13 partly_ The print_exception() in src/core/Exception.pm is pretty complicated. Why are some exceptions printed via their gist, while others are handled differently?
17:14 partly_ And how do the VERBATIM-EXCEPTION fit in?
17:14 timotimo probably --ll-exception
17:15 idyllei joined #perl6
17:16 partly_ ok ic
17:16 themonkeybob11 joined #perl6
17:16 psch m: sub f($, *@a) { .WHAT.say for @a }; f(1, 1|1)
17:16 camelia rakudo-moar 2c552d: OUTPUT«(Junction)␤»
17:17 psch i think that's behind the printf error
17:17 AlexDaniel what is one?
17:17 psch i'm pretty sure that shouldn't be a Junction anymore
17:17 AlexDaniel ah
17:17 AlexDaniel I see
17:17 timotimo interesting, so maybe auto-currying doesn't work with slurpy arguments properly?
17:17 psch m: sub f(@a) { .WHAT.say for @a }; f 1|1
17:17 camelia rakudo-moar 2c552d: OUTPUT«Type check failed in binding @a; expected Positional but got Int (1)␤  in sub f at /tmp/0tw79ep9oQ line 1␤  in sub f at /tmp/0tw79ep9oQ line 1␤  in block <unit> at /tmp/0tw79ep9oQ line 1␤␤»
17:17 psch m: sub f(*@a) { .WHAT.say for @a }; f 1|1
17:17 camelia rakudo-moar 2c552d: OUTPUT«(Junction)␤»
17:18 psch timotimo: i guess there's a missing junc_or_fail somewhere..?
17:18 timotimo no, it just seems like it properly binds
17:18 psch oh, right, junc_or_fail is after type checks...
17:18 timotimo m: sub F(*@a) { .WHAT.say for @a }; F Mu, Mu
17:18 camelia rakudo-moar 2c552d: OUTPUT«(Mu)␤(Mu)␤»
17:19 psch slurpies are too accepting /o\
17:19 timotimo ^- if this succeeds, junctions will never be auto-threaded
17:19 psch yeah, but even slurpies should auto type to Any, shouldn't they
17:19 psch m: sub F(Any *@a) { .WHAT.say for @a }; F Mu, Mu
17:19 camelia rakudo-moar 2c552d: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Iv7RwGcpvT␤Slurpy positional parameters with type constraints are not supported␤at /tmp/Iv7RwGcpvT:1␤------> 3sub F(Any *@a7⏏5) { .WHAT.say for @a }; F Mu, Mu␤    expecting any of:␤        const…»
17:20 psch hrm
17:20 awwaiid joined #perl6
17:20 timotimo i suppose it's because it really just slurps up everything. it could also have lazy lists passed to it
17:20 timotimo so type-checking isn't something we can guarantee we always do
17:23 RabidGravy really it's just a nicer error message required
17:23 lizmat joined #perl6
17:24 SCHAAP137 joined #perl6
17:28 lizmat_ joined #perl6
17:28 psch RabidGravy: i don't know if it's *just* that
17:28 psch RabidGravy: i mean, for the sprintf case i'M inclined to agree - i don't know how sprintf with a Junction should work otherwise
17:28 psch but the general case means either using Junctions or using slurpies
17:29 psch and then you might overlook that you're using a module that uses slurpies but decide to use Junctions yourself...
17:30 psch hrm
17:30 azawawi joined #perl6
17:30 psch actually, i guess all of that is fine if you don't end up somewhere that Junctions don't work
17:30 azawawi AlexDaniel: ping
17:30 psch m: print (1|1)
17:30 camelia rakudo-moar 0ad8b3: OUTPUT«any(1, 1)»
17:30 azawawi AlexDaniel: close(open(close(open))) :)
17:31 psch m: say 1 + (1|1)
17:31 camelia rakudo-moar 0ad8b3: OUTPUT«any(2, 2)␤»
17:32 psch ...there's probably a lot of discussion about this somewhere in the clog :)
17:32 psch RabidGravy: fwiw, would 'Junction passed to &sprintf - please don't do that' or similar have helped you right then?
17:34 RabidGravy yeah, I'd actually copied some (working) code from one place to another and somehow changed the ** to a ^ without even noticing
17:34 RabidGravy I mean I should have noticed that I was getting an unexpected junction in the result but then I got more confused with the debugging output I put in
17:36 psch m: printf "%d", 1..*
17:36 camelia rakudo-moar 0ad8b3: OUTPUT«Cannot .elems a lazy list␤  in block <unit> at /tmp/ZsnKMLfX2R line 1␤␤Actually thrown at:␤  in block <unit> at /tmp/ZsnKMLfX2R line 1␤␤»
17:36 psch ...i think i don't like our current &printf :/
17:36 AlexDaniel azawawi: mmm?
17:37 psch well, maybe i can get that better... gonna make a few notes now and look into it over the next few days
17:37 virtualsue joined #perl6
17:40 dalek doc: 6f0c118 | lizmat++ | doc/Language/5to6-perlvar.pod:
17:40 dalek doc: Make 5to6 docs for @INC/%INC slightly better
17:40 dalek doc: review: https://github.com/perl6/doc/commit/6f0c1182e3
17:42 AlexDaniel azawawi: what does this close/open thing mean? :)
17:44 Util joined #perl6
17:45 lizmat joined #perl6
17:45 lizmat getting too far away from the coast&
17:53 TreyHarris is "chmod $mode, $file or die ..." still the preferred idiom for subs like that that return a falsey on failure?
17:55 psch m: say so []
17:55 camelia rakudo-moar 0ad8b3: OUTPUT«False␤»
17:55 psch TreyHarris: if you're using exactly one file for chmod i'd say yes
17:56 psch TreyHarris: chmod has a slurpy though, so if you use it for more than one file i'd compare the argument to the return value and complain then
17:56 TreyHarris psch: of course. otherwise it would have to be a more complex return anyway and I'd probably be better off creating IO::Path's and looping through them, then I'll get an exception on any that are problems
17:56 psch something like < my @files = get_files(); my @chmodded_files = chmod $mode, @files; die unless @files eqv @chmodded_files > or so
17:56 psch note i'm not sure eqv does exactly what i mean there :)
17:57 TreyHarris *nod* I think making path objects and using the method that throws is easier
17:58 RabidGravy visually it sometimes helps to do "if .... {  } else { die ... }" in a larger subroutine
17:58 psch in any case, those two approaches should work for any CORE sub that doesn't throw itself on failure
17:58 cdg joined #perl6
17:58 RabidGravy it also makes it easier to add some recovery or cleanup later
17:59 cdg joined #perl6
18:00 RabidGravy the "die" is after all "control flow" albeit leaving through the window rather than the front door
18:01 psch "die" feels more like "leaving through all walls in any direction, no matter how deep inside the building" :D
18:01 azawawi 38 days current github contribution steak https://github.com/azawawi/ :)
18:01 azawawi s/steak/streak/ :)
18:01 RabidGravy Mmmmm contribution steak
18:02 azawawi i was like contribution steak is better :)
18:02 RabidGravy I once reached 104 then went on holiday
18:03 azawawi RabidGravy: then im going to break the 104 barrier :)
18:04 RabidGravy that's healthy competition
18:05 azawawi and going to change to nick to SteakGravy :)
18:07 * psch has 7 days longest streak
18:07 psch it was an accident
18:10 Ben_Goldberg joined #perl6
18:12 azawawi btw it changes with time, so you cant prove it... :(
18:12 vendethiel- joined #perl6
18:12 azawawi so eventually your streak will be over
18:12 Ben_Goldberg joined #perl6
18:13 ugexe you can just set your clock back to the day you missed and send a commit
18:13 RabidGravy I'm also looking for competition on the ecosystem front, there are only 3 people who have released more than half of the number
18:13 RabidGravy okay some of mine are utter bilge but better out than in as they say
18:14 themonkeybob11 joined #perl6
18:14 jjido joined #perl6
18:14 azawawi RabidGravy: i hate the current travis ci/appyveyor support... we're basically wasting time testing rakudo all time lol
18:15 azawawi RabidGravy: basically it is rakudobrew build moar && prove -v -e perl6 -Ilib
18:15 edehont joined #perl6
18:17 azawawi ugexe: maintaining contribution streaks can sometimes mean delaying commits also :)
18:19 azawawi sub foo is delayable { }; foo()  # prints "I will do it later. I promise" :)
18:20 mykhailyk left #perl6
18:21 psch m: use nqp; sub trait_mod:<is>(Routine $r, :$delayable!) { $r.add_phaser('ENTER', -> { say "i'll do it later, promise"; exit }) }; sub foo is delayable { }; foo()
18:22 camelia rakudo-moar 0ad8b3: OUTPUT«i'll do it later, promise␤»
18:22 psch err, that 'use nqp' is actually superfluous vOv
18:22 psch ...also, that trait probably should be called something like 'delayed_indefinitely', actually
18:23 psch m: use nqp; sub trait_mod:<is>(Routine $r, :$delayable!) { $r.add_phaser('ENTER', -> { say "i'll do it later, promise"; exit }) }; sub foo is delayable { }; foo(); say "alive"
18:23 camelia rakudo-moar 0ad8b3: OUTPUT«i'll do it later, promise␤»
18:24 azawawi psch: :)
18:24 azawawi psch++
18:29 AlexDaniel azawawi: open close open close?
18:29 azawawi AlexDaniel: :)
18:29 AlexDaniel azawawi: I didn't get it :)
18:30 BenGoldberg_ joined #perl6
18:30 azawawi AlexDaniel: the ticket ...
18:31 AlexDaniel azawawi: ah right. Want me to reopen it again?
18:31 AlexDaniel :)
18:31 azawawi https://github.com/perl6/doc/issues/407 :)
18:32 AlexDaniel azawawi: at first I thought that close(open(…)) was some kind of a golfed down perl 6 code that is supposed to compile :D
18:33 azawawi AlexDaniel: sorry for not being clear about but http://doc.perl6.org/language/5to6-perlfunc contains little documentation. And skids told me earlier that /routine/printf will look bad
18:33 azawawi AlexDaniel: in the sense that it is not really Perl6ish
18:34 azawawi AlexDaniel: my understanding is 5to6-perlfunc are for backward compatibility
18:34 AlexDaniel azawawi: then why do we have http://doc.perl6.org/routine/sprintf ?
18:34 azawawi now that i dont understand :)
18:35 AlexDaniel or even http://doc.perl6.org/routine/abs
18:35 azawawi ok will do it :)
18:35 * azawawi delays plans for Perl 6 debugger to fix it :)
18:36 AlexDaniel I've always felt that 5to6 document is for Perl 5 programmers. That is, if you don't know Perl 5 then you should never have to open it
18:36 BenGoldberg m: sub trait_mod:<is>(Routine $r, :$doomed!) { die "doomed" }; sub foo is doomed { say 'alive' };
18:36 BenGoldberg m: sub trait_mod:<is>(Routine $r, :$doomed!) { die "doomed" }; sub foo is doomed { say 'alive' }; foo();
18:36 camelia rakudo-moar 0ad8b3: OUTPUT«5===SORRY!5=== Error while compiling /tmp/E0FSE6ZVFE␤doomed␤at /tmp/E0FSE6ZVFE:1␤»
18:36 camelia rakudo-moar 0ad8b3: OUTPUT«5===SORRY!5=== Error while compiling /tmp/h4v1SYSQD0␤doomed␤at /tmp/h4v1SYSQD0:1␤»
18:37 sevvie joined #perl6
18:37 BenGoldberg abs is needed, since people will, at some point, be trying to optimize by using 'int32' instead of 'Int', and of course you can't call methods on native integers.
18:39 azawawi BenGoldberg: :)
18:40 AlexDaniel azawawi: and I think that indexing 5to6 page is a great temp solution … until we actually document everything
18:42 AlexDaniel azawawi: but I've seen enough “wtf is Perl 5 I don't want to know it to know Perl 6” complaints that I'm pretty sure that 5to6 page is not something we should rely on
18:47 azawawi AlexDaniel: i see
18:47 azawawi AlexDaniel: what do you think of this UI for a Perl 6 debugger https://atom.io/packages/python-debugger ?
18:48 azawawi AlexDaniel: that guy convert swift-debugger to python-debugger and now im going to convert python-debugger into perl6-debugger :)
18:48 Ben_Goldberg joined #perl6
18:49 azawawi AlexDaniel: s/convert swift/converted swift/
18:49 TreyHarris :m my $p = "test".IO; $p.spurt("test");
18:49 azawawi m: my $p = "test".IO; $p.spurt("test");
18:49 camelia rakudo-moar 0ad8b3: ( no output )
18:50 TreyHarris azawawi: oops. thanks.
18:50 azawawi TreyHarris: np
18:50 TreyHarris m: my $p = "test".IO; $p.spurt("test"); $p.spurt("test2", :createonly);
18:50 camelia rakudo-moar 0ad8b3: OUTPUT«Failed to open file /home/camelia/test: file already exists␤  in any  at /home/camelia/rakudo-m-inst-1/share/perl6/runtime/CORE.setting.moarvm line 1␤  in block <unit> at /tmp/bt8w0hlZ5T line 1␤␤Actually thrown at:␤  in any  at gen/moar/m-Metamod…»
18:50 TreyHarris what's the easies way to see what exception type that was?
18:50 jdv79 any reason why hashes aren't mentinoed on https://doc.perl6.org/language/containers?
18:52 azawawi AlexDaniel: but we need to give it a separate namespace (e.g. 5to6func/printf ) ; otherwise we're going to get conflicts
18:52 TreyHarris m: my $p = "test".IO; $p.spurt("test"); try { $p.spurt("test2", :createonly); CATCH { default { say .perl } } }
18:52 camelia rakudo-moar 0ad8b3: OUTPUT«X::AdHoc.new(payload => "Failed to open file /home/camelia/test: file already exists")␤»
18:52 TreyHarris interesting; why's that AdHoc?
18:52 azawawi TreyHarris: http://doc.perl6.org/type/X::AdHoc
18:53 ugexe m: try { CATCH { default { say $_.perl; }; die "xxx"; };
18:53 camelia rakudo-moar 0ad8b3: OUTPUT«5===SORRY!5=== Error while compiling /tmp/mbN6Z9HDHJ␤Missing block␤at /tmp/mbN6Z9HDHJ:1␤------> 3 default { say $_.perl; }; die "xxx"; };7⏏5<EOL>␤»
18:53 RabidGravy okay you maths and/or CS graduates, is there a more succinct way of expressing :
18:53 ugexe m: try { CATCH { default { say $_.perl; }; }; die "xxx"; };
18:53 camelia rakudo-moar 0ad8b3: OUTPUT«X::AdHoc.new(payload => "xxx")␤»
18:53 RabidGravy m: sub min-size($f) { for 8,16,32,64,128 -> $pow { if $f < (2**$pow) - 1 { return $pow } }}; say min-size(98); say min-size(8903)
18:53 camelia rakudo-moar 0ad8b3: OUTPUT«8␤16␤»
18:54 TreyHarris azawawi: no, I understand that a die throws an X::AdHoc, but why doesn't spurt throw an X::IO:: of some sort?
18:54 RabidGravy because no-one got around to it yet
18:54 TreyHarris ok
18:55 RabidGravy possibly there are tests that check the exception type that need to be changed, or something
18:57 Skarsnik hm, another crash with h::ua, but no openssl output this time
18:58 araujo_ joined #perl6
19:00 araujo_ joined #perl6
19:00 idiosyncrat_ joined #perl6
19:00 Skarsnik I don't get why I get another output after the crash x) https://gist.github.com/Skarsnik/33f2bc8f34ea0da022d9
19:01 BenGoldberg joined #perl6
19:01 salva joined #perl6
19:02 araujo_ joined #perl6
19:04 RabidGravy Skarsnik, it's getting nothing back from the recv when getting the "header chunk"
19:05 RabidGravy it could be made to crap out noisier and earlier
19:08 RabidGravy *but* there does need to be an easily repeatable test case to determine where best to catch this
19:09 RabidGravy so instrumenting back up the line from the "multi method new(Blob $header-chunk)" backwards with the actual content of the Blob would be useful
19:10 Skarsnik This should probably throw correctly on empty content https://github.com/sergot/http-useragent/blob/master/lib/HTTP/UserAgent.pm6#L246
19:11 RabidGravy yes it should, that's why seeing exactly what's in the $header-chunk at that point is the only way to get to the bottom of it
19:11 RabidGravy there could be "unexpected garbage" in there for instance
19:11 Skarsnik well it does nothing to check if this get nothing
19:12 Skarsnik or does the $conn object should be responsible to throw?
19:12 sjoshi joined #perl6
19:12 kurahaupo joined #perl6
19:13 RabidGravy right, it should and if there is *nothing*  in the $header-chunk it should have already crapped out, that's why seeing what's in there would be very useful
19:14 jdv79 has anyone looked into what isn't documented yet in the setting?
19:14 jdv79 i think there's a script for nqp to report that - is thare one for src/core?
19:15 RabidGravy if it's completely empty then a) we should throw an exception before we get that far and b) someone should look to fixing the unhandled condition in OpenSSL that lets it get like that
19:15 jjido joined #perl6
19:17 RabidGravy if there is *something* in there then we need to know what to determine whether we need to try harder to get a complete header, fix up the constructor for HTTP::Response to find the bits or just throw an exception in a more controlled manner
19:17 RabidGravy I do agree that it shouldn't be failing on passing unacceptable stuff to its own constructor
19:19 Skarsnik what give the size of $t ?
19:19 Skarsnik .chars ?
19:19 yoleaux ?
19:20 moritz jdv79: iirc there's a tool in perl6/doc repo, but it's mostly useless (doesn't deal well with multis)
19:20 Skarsnik I mean, what is common with Str and Buf to get the size?
19:20 timotimo Buf has .elems, Str has .chars, .codes, ...
19:20 RabidGravy yeah
19:20 timotimo that's by design
19:21 timotimo you're not supposed to think of a Str as a list of little things, except if by thins you mean graphemes
19:21 Skarsnik Yes, but in this case it's annoying to not have a common method
19:22 azawawi good night everyone
19:22 RabidGravy why?
19:22 * azawawi &
19:22 Skarsnik then you have to test if it's a Str or not x)
19:22 RabidGravy test what?
19:22 Skarsnik well it should be a Buf in this case
19:23 moritz what's the use case?
19:23 moritz I mean, you can't simply treat Bufs and Strs the same anyway
19:23 jdv79 moritz: ok
19:23 Skarsnik I remember when adding the debug stuff on UA I had to know if it's a Buf or a Str to display the size
19:23 RabidGravy Skarsnik, in the loop in H::UA.get-response it *must* be a Blob
19:23 Skarsnik it's elems?
19:24 Skarsnik I mean there is no .bytes?
19:24 RabidGravy I don't want the elems, I want the actual whole content when it fails
19:25 sevvie disco.
19:25 RabidGravy if it's empty then it's interesting, if it has stuff in it then the content is interesting
19:25 RabidGravy the number of bytes is not interesting in this case (unless it is zero)
19:25 timotimo i think we also offer .bytes, which multiplies .count with the size of an individual element
19:26 abaugher joined #perl6
19:27 Skarsnik what are the possible encoding with decode?
19:29 Skarsnik I added say "GET-RESPONSE {$t.elems}: ###" ~ $t.decode("ascii") ~ "###";
19:29 Skarsnik let's see if it crash again x)
19:31 ugexe i'd probably just MONKEY-TYPING/augment or .wrap() IO::Socket::INET.print/recv to get a full log
19:33 RabidGravy I'd say almost certainly the first recv isn't returning anything
19:34 RabidGravy but I'm not precluding a bunch of garbage
19:34 Skarsnik it's ssl in this case (discord stuff is https)
19:34 AlexDaniel .tell azawawi well, I don't use Atom so I can't tell. It's also very hard for me to imagine switching to atom after all emacs/vim experience I had. So I am not the right person to answer this question ;)
19:34 yoleaux AlexDaniel: I'll pass your message to azawawi.
19:34 ugexe so IO::Socket::SSL then
19:36 kjs_ joined #perl6
19:36 RabidGravy infact it's easier than wrap, I think the $conn is given a role to ensure a consistent interface, could just implement recv in the role and callsame the real one, get the output and log it
19:42 yary joined #perl6
19:42 yary Hi... what does the "constant" mean in "my $a='aaaa';my constant $b=$a; say $b" and why is $b undefined (Any)?
19:47 sevvie $a is set at runtime, whereas $b is is set at compile time. Because $a is undefined at compile time, $b is being assigned that undefined value. (I think. I'm a little high.)
19:47 yary thanks, that's about what I figured out from experimenting too
19:48 yary perl6: my $a; BEGIN { $a='aaaa' } my constant $b=$a; say $b
19:49 camelia rakudo-moar 0ad8b3: OUTPUT«5===SORRY!5=== Error while compiling /tmp/tmpfile␤Strange text after block (missing semicolon or comma?)␤at /tmp/tmpfile:1␤------> 3my $a; BEGIN { $a='aaaa' }7⏏5 my constant $b=$a; say $b␤    expecting any of:␤        infix␤        in…»
19:49 camelia ..rakudo-jvm f99bdb: OUTPUT«cannot connect to eval server: Connection refused␤»
19:49 timotimo SDL2-raw's repository now has a cute little particle system demo
19:50 virtualsue joined #perl6
19:50 wamba p6: say " There".match( /^^ \s* There/ )
19:50 camelia rakudo-moar 0ad8b3: OUTPUT«「 There」␤»
19:51 TreyHarris how can I suppress the backtrace for end-user-facing thrown exceptions? I've tried perl5-style die(.message, "\n"), but a newline doesn't do it.
19:51 wamba say " There".match( /^^ <?after \s*> There/ )
19:51 wamba p6: say " There".match( /^^ <?after \s*> There/ )
19:52 camelia rakudo-moar 0ad8b3: OUTPUT«Nil␤»
19:53 cdg_ joined #perl6
19:57 sevvie p6: die X::IO::DoesNotExist.new(:path("foo/bar"), :trying("zombie copy")); CATCH { when X::IO { say "expecting a backtrace?" } }
19:57 camelia rakudo-moar 0ad8b3: OUTPUT«expecting a backtrace?␤»
19:57 sevvie TreyHarris, ^^
19:57 zakharyas joined #perl6
19:57 RabidGravy or just
19:58 sevvie TreyHarris, that's from doc.perl6.org/language/exceptions
19:58 RabidGravy CATCH { default { say $_.message; exit }}
19:58 RabidGravy at the outest scope
20:01 sevvie RabidGravy++ # saving me typing
20:05 mayweed joined #perl6
20:07 wamba p6: say " There".match( / <?after ^^ \s*> There/ )
20:07 camelia rakudo-moar 0ad8b3: OUTPUT«Nil␤»
20:14 musiKk_ joined #perl6
20:21 kurahaupo joined #perl6
20:29 lsm-desktop joined #perl6
20:30 AlexDaniel m: say ‘x’.match( / <?after ^> x/ )
20:30 camelia rakudo-moar 0ad8b3: OUTPUT«Nil␤»
20:31 kurahaupo joined #perl6
20:32 AlexDaniel wamba: hmm, so is it a bug?
20:35 jack_rabbit joined #perl6
20:39 FROGGS m: say ‘x’.match( / <?before ^> x/ )
20:39 camelia rakudo-moar 0ad8b3: OUTPUT«「x」␤»
20:39 RabidGravy gets me every time that one ;-)
20:40 FROGGS well, I dunno if it is correct or not
20:40 Hotkeys weird
20:40 RabidGravy I think that is the documented behaviout
20:41 RabidGravy m: say ‘x’.match( / <?after $> x/ )
20:41 camelia rakudo-moar 0ad8b3: OUTPUT«「x」␤»
20:41 RabidGravy jeez that's really slow poor server
20:42 labster joined #perl6
21:01 themonkeybob11 joined #perl6
21:03 kurahaupo joined #perl6
21:04 pyrimidi_ joined #perl6
21:10 Laurent_R joined #perl6
21:15 cdg joined #perl6
21:17 zpmorgan joined #perl6
21:34 * moritz just tried his GPW talk for the first time. 45 Minutes (it's a 40 min slot)
21:35 moritz so with a few more attempts, and speaking faster due to stage fever, it'll end up as 32 minutes or so in the end :-)
21:36 kjs_ joined #perl6
21:36 jjido joined #perl6
21:36 timotimo not bad!
21:36 timotimo so you'll be able to answer some questions, too
21:37 maybekoo2 joined #perl6
21:38 jdv79 maybe next nyc p6 meeting some peeps from here could pop into the other irc chan we use.
21:38 jdv79 hackathon on magnet
21:39 labster joined #perl6
21:44 dalek ecosystem: d93b46f | RabidGravy++ | META.list:
21:44 dalek ecosystem: Add Util::Bitfield
21:44 dalek ecosystem:
21:44 dalek ecosystem: See https://github.com/jonathanstowe/Util-Bitfield
21:44 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/d93b46fb02
21:45 RabidGravy gotta keep the tempo up
21:45 RabidGravy also thas me 40th module, maybe I should just stop
21:45 moritz why stop?
21:47 Hotkeys ^^^
21:47 RabidGravy It's a never ending tesseract of a rabbithole, that ^ was because of the MP3 frame parser which I started because of the Streaming server which I started because I couldn't test Audio::Libshout properly ;-)
21:47 Hotkeys I still havevn;t done anything past 1 module
21:50 * AlexDaniel sits quietly in the corner with 0 modules
21:53 Skarsnik lol RabidGravy
22:01 Laurent_R Hi, all. I have been watching discussions here from time to time, but never intervened actively. So, my first intervention, with a question. I hope this is the right place for my question. Trying infinite recursion in Perl 5, with a subroutine like: sub recurse { recurse();}, I get the "100 levels deep in subroutine calls!" message. Just tried the same in Perl 6, and BANG! Anyone has an idea...
22:01 Laurent_R ...why I did not get any "infinite recursion" message?
22:02 Skarsnik Probably because it's not checked x)
22:05 RabidGravy Perl6 prefers "well don't do that then" rather than stopping you from doing it
22:07 idiosyncrat_ joined #perl6
22:07 Laurent_R OK, fair enough, thanks.
22:12 pdcawley joined #perl6
22:22 timotimo Laurent_R: we don't have a recursion limit. you'll just end up allocating too many frames and your heap will flow over
22:22 timotimo dinner time \o/
22:26 timotimo Laurent_R: in a few months' time we'll let you run that exact code forever without running out of memory, i think
22:26 AlexDaniel timotimo: like? Any plans for TCO?
22:26 timotimo trace jit might give us this for free
22:26 Skarsnik damn this perl6 script kill my vm by filling the ram x)
22:27 timotimo or at least at very low cost
22:27 Laurent_R Well, thank you, it seems that I actually ran out of memory. But anyway, I thought that the Perl 5 message was a good protection against a silly mistake. You can remove the limit with a no strict recursion pragma (or whatever it is exactly), I wished we had a similar protection in Perl 6. Anyway, I know now I have to be more careful in Perl 6.
22:28 timotimo mhm
22:28 timotimo we could implement a frame depth counter
22:29 RabidGravy well you could do it yourself right now couldn't you?
22:29 timotimo yeah, but only for frames you have control over
22:30 AlexDaniel Laurent_R: honestly I don't see how it protects you from something. More like it makes your script die when you have a plenty of memory left.
22:31 timotimo well, i'd be for making the recursion limit like 5k or so
22:31 Laurent_R AlexDaniel: yeah, you're right. Still, it protects against killing the session.
22:32 AlexDaniel if you are afraid of trying to allocate too much memory then I'll tell you a secret: there are many other ways to do that
22:32 lucs Can I tell panda to "install the code that is found in my cloned repo of a module that I modified for some reason"?
22:33 lucs And if not, how do I install that modified code?
22:33 Skarsnik panda install . ?
22:33 lucs Oh, that simple, eh, trying...
22:33 kid51 joined #perl6
22:33 lucs Skarsnik: Yep, looking good, thanks.
22:34 AlexDaniel 5k limit is pretty fair, actually
22:35 Skarsnik damn nobody write something to interact with twitter
22:35 Laurent_R AlexDaniel: also it is better in my view to have my program aborting with a proper diagnostic of the problem than just silently dying silently.
22:35 timotimo i don't think it actually dies silently
22:36 timotimo i think it says "malloc failed" or something
22:36 AlexDaniel m: sub recurse() { recurse if $++ < 5000 }; recurse; say now - BEGIN now
22:36 camelia rakudo-moar 0ad8b3: OUTPUT«2.05444032␤»
22:36 AlexDaniel m: sub recurse() { recurse if $++ < 5000 }; recurse; say now - BEGIN now
22:36 timotimo don't forget, invocation is currently way too expensive
22:36 timotimo and will be improved in the future
22:36 camelia rakudo-moar 0ad8b3: OUTPUT«2.0354796␤»
22:36 AlexDaniel star: sub recurse() { recurse if $++ < 5000 }; recurse; say now - BEGIN now
22:36 RabidGravy m: sub foo() {  if Backtrace.new.elems > 25 { die "You screwed up"}; foo() }; foo()
22:37 RabidGravy Oops, I broke it
22:37 AlexDaniel no, I guess it was mep
22:37 camelia star-m 2015.09: OUTPUT«1.73563714␤»
22:37 camelia rakudo-moar 0ad8b3: OUTPUT«You screwed up␤  in sub foo at /tmp/vosg4k9Gpj line 1␤  in sub foo at /tmp/vosg4k9Gpj line 1␤  in sub foo at /tmp/vosg4k9Gpj line 1␤  in sub foo at /tmp/vosg4k9Gpj line 1␤  in sub foo at /tmp/vosg4k9Gpj line 1␤  in sub foo at /tmp/vosg4k9Gpj li…»
22:37 AlexDaniel me*
22:37 AlexDaniel m: say ‘hello’
22:37 camelia rakudo-moar 0ad8b3: OUTPUT«hello␤»
22:37 AlexDaniel can anybody help camelia? There's something wrong with her
22:38 AlexDaniel she is very slow today
22:39 spider-mario joined #perl6
22:39 RabidGravy it's the weather, phase of the moon, cosmic rays or something
22:39 frew joined #perl6
22:39 rjbs joined #perl6
22:40 simcop2387 joined #perl6
22:41 geekosaur joined #perl6
22:42 AlexDaniel timotimo: actually, 5k is probably too low. On my machine there is no problem with 100k recursion depth, or so it seems.
22:42 zostay joined #perl6
22:43 timotimo mhm
22:43 timotimo well, just saying 100 is way too low
22:43 perigrin joined #perl6
22:44 Laurent_R Agreed, 100 is really too low.
22:45 Ven joined #perl6
22:49 partly_ m: say "FoB\n".substr(0, *-1);
22:49 camelia rakudo-moar 0ad8b3: OUTPUT«FoB␤»
22:50 timotimo m: say "FoB\n".chomp.perl
22:50 camelia rakudo-moar 0ad8b3: OUTPUT«"FoB"␤»
22:51 timotimo m: say "FoB".chop.perl; say "FoB".chomp.perl # interesting difference, btw
22:51 camelia rakudo-moar 0ad8b3: OUTPUT«"Fo"␤"FoB"␤»
22:51 timotimo chop chops anything, chomp chops only newlines
22:52 partly_ thanks!
22:55 AlexDaniel m: say chop ∞ # cool, I didn't know about chop
22:55 camelia rakudo-moar 0ad8b3: OUTPUT«In␤»
22:55 RabidGravy right, time for bed here.  toodles.
22:59 TEttinger joined #perl6
23:02 kurahaupo joined #perl6
23:12 bjz joined #perl6
23:13 kjs_ joined #perl6
23:36 BenGoldberg joined #perl6
23:41 cognominal joined #perl6
23:47 Hotkeys I would like this syntax
23:47 Hotkeys m: sub circumfix:<⌊ ⌋> ($a) {floor($a)}; say ⌊3.4⌋
23:47 Hotkeys or not
23:47 * Hotkeys slaps camelia
23:47 camelia rakudo-moar 0ad8b3: OUTPUT«(timeout)»
23:48 Hotkeys weird
23:48 * [Coke] sees bdf is a little salty on stack overflow
23:49 timotimo hm?
23:49 Hotkeys why did that take so long on camelia
23:49 Hotkeys is it the unicode
23:49 timotimo ah, brian
23:50 sjn m: sub circumfix:<⌊ ⌋> ($a) {floor($a)}; say ⌊3.4⌋
23:50 camelia rakudo-moar 0ad8b3: OUTPUT«(timeout)»
23:51 sjn yeah, weird
23:51 virtualsue joined #perl6
23:51 sjn works fine for me with my local install
23:56 timotimo [Coke]: i can't put my finger on it, but his posts on SO kind of make me angry
23:56 timotimo what's wrong with me?
23:56 timotimo well, i've been having a bad day, so that might be it
23:57 BenGoldberg std: sub circumfix:<⌊ ⌋> ($a) {floor($a)}; say ⌊3.4⌋
23:57 camelia std : OUTPUT«No such file or directory»
23:57 BenGoldberg std: say 'alive'
23:57 camelia std : OUTPUT«No such file or directory»
23:57 camelia std : OUTPUT«(timeout)cat: /home/camelia/std/snap/revision: No such file or directory␤#perl6 <BenGoldberg> std: say 'alive'␤»
23:58 BenGoldberg ?
23:58 timotimo STD isn't alive at the moment
23:58 timotimo like, at all.

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

Perl 6 | Reference Documentation | Rakudo