Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2015-06-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:08 sirdancealot left #perl6
00:20 laouji joined #perl6
00:21 Mouq doc's htmlify.pl seems to be broken on perl6 version 2015.05-114-g5afe889 built on MoarVM version 2015.05-43-gdb72ab9
00:23 Mouq Ah, perhasp only without Inline::Python. It currently dies with "const_iX NYI", but I suspect it'll work after installing I::P
00:27 Mouq Hm. Nope
00:33 vendethiel joined #perl6
00:39 laouji joined #perl6
00:42 timotimo huh? did you rebuild stuff?
00:43 * grondilu just added '^arm' in Configure.pl to see if JIT would work on his Raspberry Pi
00:43 timotimo we shouldn't be emitting const_i8, const_i16 or const_i32 ops at all
00:43 timotimo except maybe we do?
00:45 timotimo didn't see anything of that sort
00:46 timotimo they are not even mapped on rakudo or nqp
00:47 laouji joined #perl6
00:47 timotimo Mouq, the only way i could explain that would be a stale bytecode file or something .. ?!
00:49 ugexe you might want to double check that regex. i made a pr before which corrected a similar regex meant for rpi which should have been ^earm
00:54 colomon ah crap, updating rakudo broke one of my $work scripts
00:56 timotimo dang!
00:56 timotimo can you tell us what went wrong?
00:57 timotimo did you hit a fresh deprecation?
01:00 timotimo i hope you noticed it through a harmless action, or a test suite
01:00 timotimo and not by breaking something
01:08 timotimo aaaah. much better.
01:13 * grondilu got a segfault.  So no JIT for my Pi
01:13 BenGoldberg joined #perl6
01:17 timotimo we can't jit arm in moarvm anyway
01:23 timotimo of course you can try to run x86_64 bytecode on your Pi ;)
01:26 grondilu that would not halt and catch fire, would it?  :)
01:26 timotimo dunno
01:26 timotimo SIGBUS or something? :)
01:30 dalek rakudo/nom: 166d04a | timotimo++ | src/Perl6/Optimizer.nqp:
01:30 dalek rakudo/nom: can optimize METAOP_ASSIGN even for attributes
01:30 dalek rakudo/nom:
01:30 dalek rakudo/nom: before this, we only "inlined" (manually) METAOP_ASSIGN
01:30 dalek rakudo/nom: if the target of the assignment is a $-sigil'd variable.
01:30 dalek rakudo/nom:
01:30 dalek rakudo/nom: now we also allow the target to be a callmethod - on anything,
01:30 dalek rakudo/nom: really. hopefully this is right. it doesn't break any spec
01:30 dalek rakudo/nom: tests, at least.
01:30 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/166d04aab7
01:31 dalek nqp: fb4892f | Coke++ | ports/macports/ (2 files):
01:31 dalek nqp: Add sample nqp port
01:31 dalek nqp: review: https://github.com/perl6/nqp/commit/fb4892f6d7
01:31 [Coke] ^^ work in progress. Don't yet have a port created, so we can't do updates post release. Also, need to add nqp-jvm
01:34 timotimo used to be:
01:34 timotimo 19.76user 0.03system 0:19.81elapsed 99%CPU (0avgtext+0avgdata 85432maxresident)k
01:34 timotimo 14.79user 0.01system 0:14.81elapsed 99%CPU (0avgtext+0avgdata 80348maxresident)k
01:34 timotimo ^- is now
01:35 dayangkun joined #perl6
01:38 timotimo 36.76user 0.02system 0:36.80elapsed 99%CPU (0avgtext+0avgdata 96836maxresident)k
01:38 timotimo ^- in the very beginning
01:39 Mouq timotimo: An edge case:
01:39 Mouq m: my class Foo { method bar is rw { (state $b)++; $b } }; my $f = Foo.new; Foo.bar += 15; say Foo.bar
01:39 camelia rakudo-moar c2a57e: OUTPUT«17␤»
01:39 Mouq Local, 18
01:40 Mouq Dunno how stupid that case is, but just noting it changes the behavior slightly
01:40 timotimo hold on, i'll investigate
01:40 timotimo basically we used to evaluate Foo.bar twice?
01:40 Mouq Other way around
01:41 timotimo we used to evaluate it three times?
01:41 Mouq haha
01:41 timotimo so we're actually doing better now, because of the optimizer
01:42 Mouq It used to be evaluate Foo.bar, then do += on the resulatant container. Now it's optimized to Foo.bar = Foo.bar + 15
01:42 Mouq *resultant
01:45 timotimo ah
01:45 dalek nqp: 7a19c01 | Coke++ | ports/macports/Portfile:
01:45 dalek nqp: Add support for nqp-jvm subport
01:45 dalek nqp: review: https://github.com/perl6/nqp/commit/7a19c01175
01:45 Mouq camelia is old
01:45 timotimo ah, "local" is your local machine that has the patch
01:45 timotimo i thought you kept the old one
01:45 [Coke] Which fails during config time here since I don't have java 7 installed.
01:45 Mouq sorry for being unclear
01:45 timotimo it's all right
01:45 [Coke] will test that at work tomorrow and hopefully get it into the port system.
01:45 timotimo but i'm going to drive me and my guests home and have a sleep
01:45 timotimo are you QAST::able?
01:45 Mouq me?
01:45 timotimo if you could QAST::Op( :op('bind'), QAST::Var.new( :name($some_qast_node.unique('metaop_assign_thingie')), :decl<local> ), $the_qast_of_the_thing_to_bind_to )
01:45 timotimo er, hold on
01:45 vendethiel joined #perl6
01:45 timotimo :decl(var), :scope('local')
01:45 timotimo and use that as the value to change, but then without the :decl
01:45 timotimo that would be fantastic :)
01:45 timotimo bbl or bbiab or bbtomorrow
01:45 Mouq I'll try to look into it. o/ timotimo
01:51 timotimo thank you! :)
01:51 timotimo --target=ast and --target=optimize are your friend
01:51 timotimo o/
02:18 llfourn joined #perl6
02:29 vendethiel joined #perl6
02:35 rmgk_ joined #perl6
02:36 noganex_ joined #perl6
02:40 mr_ron joined #perl6
02:41 mr_ron m: my class Foo { my $b; method bar is rw { $b++ } }; my $f = Foo.new; Foo.bar += 15
02:41 camelia rakudo-moar c2a57e: OUTPUT«Cannot modify an immutable Int␤  in block <unit> at /tmp/HRYSrmrUVM:1␤␤»
02:41 mr_ron not the best coding idea but LTA response
02:42 mr_ron left #perl6
02:43 hoelzro I was thinking about a similiar issue just yesterday
02:43 hoelzro m: sub foo(Str $in) { $in .= substr(0, 3) }; foo('baz')
02:43 camelia rakudo-moar c2a57e: OUTPUT«Cannot modify an immutable Str␤  in block <unit> at /tmp/iE1ejxi3kn:1␤␤»
02:43 hoelzro I was wondering if Rakudo should recommend 'is copy'
03:17 raydiak .tell FROGGS weird thing...'say EVAL "(:a(1):b(2))"' gives 'a => 1 b => 2' as expected, but the same with $*RESTRICTED set only gives 'a => 1'
03:17 yoleaux raydiak: I'll pass your message to FROGGS.
03:54 skids Maybe MAIN should "assume a separate argument" for things like "-k foo" iff they are defined as e.g. "Str:D :$k".  Practically any script emulating legacy commandline syntax won't be able to use MAIN otherwise.
03:56 skids or maybe a trait.
04:00 jdv79 skids: huh?
04:01 skids currently MAIN won't parse commandline arguments that are one-dash followed by a value as named parameters.
04:01 skids (sub MAIN I mean)
04:01 jdv79 ah
04:37 diana_olhovik_ joined #perl6
04:39 rurban joined #perl6
04:45 |Tux| joined #perl6
04:52 quester joined #perl6
05:04 flaviusb joined #perl6
05:17 grondilu joined #perl6
05:21 kaare__ joined #perl6
05:31 dalek roast: 8319ef6 | moritz++ | S02-names/is_default.t:
05:31 dalek roast: RT# 125324: "is default" should distribute over a list of variables
05:31 dalek roast: review: https://github.com/perl6/roast/commit/8319ef60ed
05:34 jack_rabbit joined #perl6
05:37 moritz should "is default" work on attributes too?
05:45 domidumont joined #perl6
05:51 domidumont joined #perl6
05:52 jack_rabbit joined #perl6
05:56 llfourn joined #perl6
05:58 FROGGS joined #perl6
06:05 diana_olhovik joined #perl6
06:07 FROGGS good morning
06:07 yoleaux 03:18Z <raydiak> FROGGS: weird thing...'say EVAL "(:a(1):b(2))"' gives 'a => 1 b => 2' as expected, but the same with $*RESTRICTED set only gives 'a => 1'
06:08 FROGGS raydiak: WAT
06:08 raydiak that's what I thought, even double-checked to make sure I was using the right rakudo both times...
06:11 raydiak https://gist.github.com/raydiak/46b0727fddfd3c0b659e
06:12 RabidGravy joined #perl6
06:13 FROGGS that does not make sense
06:13 raydiak yeah I looked at your moar commit, I totally don't get it either if it makes you feel any better :)
06:13 FROGGS raydiak: what about this: MVM_UNSAFE_DISABLE=1 perl6 -e 'say EVAL "(:a(1):b(2))"'
06:14 raydiak Unhandled exception: Operation 'stat' is not allowed in a restricted environment
06:14 FROGGS hmmm, what does it try to stat?
06:15 FROGGS raydiak: are you on darwin?
06:15 raydiak it's in load_setting in ModuleLoader
06:15 raydiak nope linux
06:15 FROGGS ohh, it... yeah
06:16 FROGGS I see it here too
06:16 raydiak pickes the env var up early enough to refuse to load core?
06:16 raydiak *picks
06:17 FROGGS probably yes
06:17 FROGGS btw, your first example from the gist segfautls here :S
06:17 FROGGS MVM_string_ascii_decode (tc=tc@entry=0x603730, result_type=0x0, ascii=ascii@entry=0x7ffff5caffc8 "rakudo_scalar", bytes=13) at src/strings/ascii.c:6
06:17 FROGGS 6    MVMString *result = (MVMString *)REPR(result_type)->allocate(tc, STABLE(result_type));
06:18 raydiak wow
06:18 FROGGS so the rakudo scalar result type is NULL
06:18 FROGGS raydiak: did you recompile nqp and rakudo?
06:19 raydiak oh probably important to note I merged nom into the branch after I noticed this, seeing if it'd fix/change anything but it didn't
06:19 raydiak yes recmopiled all
06:19 raydiak recompiled
06:19 FROGGS hmmm
06:19 FROGGS maybe the moarvm branch needs changes from master
06:19 raydiak by hand because rakudobrew was being fussy or I don't know how to use the triple command :)
06:21 raydiak erm, right, not merged nom, but merged moarvm/master into moarvm/restricted
06:22 FROGGS yeah, realised that just a second ago
06:24 raydiak haven't tried spectesting it
06:25 raydiak wonder if something is silently failing under restriction, deep in the bowels of who-knows-what
06:25 jdv79 moritz: interesting idea.  is there a way now, without "is default", to get back the to an attr's default value?
06:26 domidumont joined #perl6
06:30 espadrine joined #perl6
06:32 xinming_ joined #perl6
06:34 vendethiel joined #perl6
06:38 FROGGS raydiak: that's also my suspicion
06:38 raydiak FROGGS: sanity test is clean, spectest is clean up to S06 so far
06:40 raydiak though, I guess it won't be triggered by any of the tests
06:40 FROGGS $ perl6 -e 'my $*RESTRICTED; say EVAL "(:a(1):b(2))"'
06:40 FROGGS getenvhash is unsafe
06:40 FROGGS a => 1
06:40 FROGGS found it
06:40 raydiak \o/
06:40 raydiak nice catch
06:40 FROGGS fprintf debugging ftw
06:41 FROGGS I just put "fprintf(stderr, "%s is unsafe\n", info->name); \" in MoarVM/src/interp.c at line 36
06:41 FROGGS now this one works:
06:41 FROGGS $ perl6 -e 'my $*RESTRICTED; say EVAL "(:a(1):b(2))"'
06:41 FROGGS a => 1 b => 2
06:42 raydiak ah ha, cool
06:42 FROGGS would be nice to not need that op though
06:44 raydiak are env var checks common in the code though?  dunno how we'd handle that if they're scattered all over
06:45 FROGGS there is not much that uses ENV at all... and none of them should be hit in our test case here
06:45 raydiak also, shouldn't it like...break loudly when it hits one of those instead of silently doing something weird?
06:45 FROGGS ohh, found it
06:45 FROGGS rakudo/src/Perl6/Actions.nqp:4825:        if nqp::getenvhash<COLONPAIR> eq 'trace' { say($/.dump) }
06:46 _mg_ joined #perl6
06:46 moritz jdv79: not that I'm aware of
06:49 raydiak FROGGS: maybe it'd be better for some of the ops to do something besides throw an exception...like return an empty env hash
06:53 llfourn joined #perl6
06:53 Ven joined #perl6
07:07 Ven joined #perl6
07:11 uncleyear joined #perl6
07:14 Foxcool joined #perl6
07:19 dolmen joined #perl6
07:20 mr-foobar joined #perl6
07:21 _mg_ joined #perl6
07:21 raydiak \o g'night FROGGS, #perl6
07:23 jack_rabbit joined #perl6
07:24 Ven o/ #perl6!
07:29 salva joined #perl6
07:31 jnthn morning o/
07:35 uncleyear joined #perl6
07:41 llfourn joined #perl6
07:46 _mg_ joined #perl6
07:50 FROGGS raydiak: yeah... we need to discuss that I think
07:50 FROGGS morning Ven and jnthn
07:53 labster joined #perl6
07:57 FROGGS m: use nqp; my $v is default(42) = 21; say $v; say nqp::getattr($v,$v.VAR.WHAT.^mixin_base,'$!descriptor').default # jdv79: we potentially can make it available
07:57 camelia rakudo-moar c2a57e: OUTPUT«21␤42␤»
08:06 g4 joined #perl6
08:12 darutoko joined #perl6
08:14 liztormato joined #perl6
08:14 * liztormato waves from AMS
08:15 liztormato left #perl6
08:23 jnthn Yays, my 120 mbit/s internets are installed :)
08:26 nwc10 could you even get that in Sweden?
08:26 nwc10 are you trying to make everyone outside of South Korea and Japan jealous?
08:26 nwc10 (and obviously the appropriate part of Prague)
08:27 jnthn Somewhere in Sweden probably, where I was I don't think so :)
08:27 kaare__ joined #perl6
08:28 jnthn Had something like 40 in Sweden.
08:28 jnthn And paid twice as much for it as I'm paying for the 120 here in Prague :)
08:29 nwc10 and we thought that you were only moving because of the beer
08:29 nwc10 what speed is your beer connection?
08:30 nwc10 or is that still sneakernet?
08:30 jnthn Sneakernet, but the latency is way lower :)
08:32 jnthn There's a small bar with a 4-table outdoor terrace right outside of my building, which serves beer and, among over things, čevapčiči. :)
08:34 FROGGS jnthn: and you wife is from .cz? is that right?
08:34 FROGGS your*
08:34 moritz jnthn: are you moving to Prague permanently?
08:34 moritz erm, wait, Prague was nwc10
08:35 FROGGS moritz: he did... he's the first employee of the edument++ .cz office IIRC
08:35 moritz cool
08:36 moritz but, but, but, "Czech Republic" doesn't match /^S/
08:36 * moritz confused
08:36 fhelmberger joined #perl6
08:36 jnthn FROGGS: No, .ua
08:36 jnthn moritz: Yes :)
08:37 jnthn I...suspect *some* language manages the spelling enough to match /^S/ :)
08:37 quester left #perl6
08:37 FROGGS that was what I was thinking :o)
08:38 jnthn Hm...but none of the ones listed on Wikipedia
08:38 jnthn http://en.wikipedia.org/wiki/Name_of_the_Czech_Republic#Other_languages
08:39 rindolf joined #perl6
08:39 nwc10 I like čevapčiči
08:42 jnthn .tell lizmat I get a failure on Windows in 55-use-trace.t; I thought it may just be line endings, but it looks like some weird path mangling issue... https://gist.github.com/jnthn/2b4565199f93e5f52cdd
08:42 yoleaux jnthn: I'll pass your message to lizmat.
08:48 Ven joined #perl6
08:49 Akagi201 joined #perl6
08:51 uncleyear joined #perl6
08:52 bbkr_ perl6 -e 'loop { $_ ~~ /.+/ }' # returns two different warnings randomly: "Use of uninitialized value of type Any in string context  in block  at -e:1" or "Use of uninitialized value of type Any in string context  in method Str at /home/ppabian/.rakudobrew/moar-2015.05/install/share/perl6/runtime/CORE.setting.moarvm:1"
08:52 bbkr_ is one of them GC related? quite weird behavior
08:56 domidumont joined #perl6
08:56 jnthn Looks odd indeed
08:57 jnthn Please RT it
08:58 espadrine joined #perl6
09:00 bbkr_ done
09:02 jnthn Thanks!
09:05 flaviusb joined #perl6
09:07 RabidGravy is anyone that anyone knows of working on an XPath thing? I'm having a yak-a-day period
09:07 Ven joined #perl6
09:12 cognominal joined #perl6
09:14 bbkr_ how to properly free CPointer class in NativeCall? I have following code: https://gist.github.com/bbkr/4930c5bb9abaa2211756 and it never reaches DEMOLISH sub, just eats up all machine memory
09:21 uncleyear joined #perl6
09:22 bbkr_ s/DEMOLISH/DESTROY/ #moose habits
09:30 FROGGS RabidGravy: started to make bindings to libxml2...
09:31 laouji_ joined #perl6
09:34 cognominal m: say Cool.^methods>>.WHAT
09:34 camelia rakudo-moar c2a57e: OUTPUT«(Parcel)␤»
09:34 cognominal weird
09:48 telex joined #perl6
09:49 RabidGravy FROGGS, yeah I've seen ;-) I may just work up an XPath expression grammar on the side
09:50 vendethiel joined #perl6
09:54 uncleyear joined #perl6
10:00 amurf joined #perl6
10:12 cschwenz joined #perl6
10:14 mr-foobar joined #perl6
10:22 AlexDaniel joined #perl6
10:32 rurban joined #perl6
10:33 Mouq .tell timotimo BTW, https://gist.github.com/Mouq/815d79940dd964711e90 is my solution, but maybe you can make it more DRY?
10:33 yoleaux Mouq: I'll pass your message to timotimo.
10:34 meis joined #perl6
10:41 uncleyear joined #perl6
10:42 larion joined #perl6
10:43 andreoss joined #perl6
10:45 andreoss is .sort(:by<key>) the same as .sort(*key)?
10:46 andreoss *.key
10:49 dalek roast: 5f50466 | jnthn++ | S15-nfg/many-combiners.t:
10:49 dalek roast: Add tests to cover RT #125248.
10:49 dalek roast: review: https://github.com/perl6/roast/commit/5f50466c8b
10:50 synbot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=125248
11:05 dakkar joined #perl6
11:07 ssqq joined #perl6
11:09 domidumont joined #perl6
11:14 smls_ joined #perl6
11:17 smls_ andreoss: I don't think .sort supports the :by adverb at all
11:21 mr-fooba_ joined #perl6
11:30 uncleyear joined #perl6
11:31 ssqq How to get all token name of grammar?
11:32 moritz ssqq: tokens are just methods, so the typical introspection facilities (.^methods at all) apply
11:35 ssqq p6: grammar G { token id { id } }; import G; say G.^methods
11:35 camelia rakudo-moar c2a57e: OUTPUT«Method 'gist' not found for invocant of class 'NQPRoutine'␤  in block <unit> at /tmp/tmpfile:1␤␤»
11:36 moritz p6: grammar G { token id { id } }; import G; say G.^methods>>.name
11:36 camelia rakudo-moar c2a57e: OUTPUT«id parse parsefile subparse FAILGOAL upper CAPHASH CALL_SUBRULE !reduce_with_match !protoregex DYNQUANT_LIMITS !fresh_highexpect !DYNQUANT_LIMITS orig !cursor_start !protoregex_nfa !protoregex_table MATCH_SAVE RECURSE !cursor_more !cursor_pass !clear_highw…»
11:37 _mg_ joined #perl6
11:39 ssqq moritz: thank you,
11:42 cognominal joined #perl6
11:49 amurf joined #perl6
11:50 ssqq joined #perl6
11:53 diana_olhovik joined #perl6
11:53 andreoss m: my @x = -1,2,-3,4,-5; say @x.sort(:by<abs>);
11:53 camelia rakudo-moar c2a57e: OUTPUT«-5 -3 -1 2 4␤»
11:53 andreoss m: my @x = -1,2,-3,4,-5; say @x.sort(*.abs);
11:53 camelia rakudo-moar c2a57e: OUTPUT«-1 2 -3 4 -5␤»
11:54 andreoss m: my @x = -1,2,-3,4,-5; say @x.sort(:xyz<abc>);
11:54 camelia rakudo-moar c2a57e: OUTPUT«-5 -3 -1 2 4␤»
11:54 ssqq When I use REPL, how to reset ENV just like `p6:` in IRC?
11:58 timotimo you mean "have all variables and everything cleared out"?
11:58 yoleaux 10:33Z <Mouq> timotimo: BTW, https://gist.github.com/Mouq/815d79940dd964711e90 is my solution, but maybe you can make it more DRY?
11:58 andreoss ssqq: --setting=RESTRICTED
11:59 moritz ssqq: start a new REPL :-)
11:59 moritz ssqq: camelia doesn't use the REPL feature; it write a temp file and runs it
11:59 uncleyear joined #perl6
12:00 andreoss m: say %*ENV
12:00 camelia rakudo-moar c2a57e: OUTPUT«HOME => /home/camelia, LANG => POSIX, LC_CTYPE => en_US.UTF-8, LOGNAME => camelia, MANPATH => /home/camelia/perl5/perlbrew/perls/perl-5.20.1/man:, PATH => /home/camelia/perl5/perlbrew/bin:/home/camelia/perl5/perlbrew/perls/perl-5.20.1/bin:/usr/local/sbin:/…»
12:02 andreoss --setting option is undocumented
12:22 mr-foobar joined #perl6
12:27 ssqq timotimo: yes, then would not have 'redeclaration error'.
12:27 uncleyear joined #perl6
12:27 cognominal m: '' ~~ / <?before foo-bar> /
12:27 camelia rakudo-moar c2a57e: OUTPUT«5===SORRY!5===␤Unrecognized regex metacharacter - (must be quoted to match literally)␤at /tmp/VVJxoE4xOL:1␤------> 3'' ~~ / <?before foo7⏏5-bar> /␤Unable to parse expression in metachar:sym<assert>; couldn't find final '>' ␤at /tmp/VVJx…»
12:27 ssqq andreoss: p6 --setting=RESTRICTED
12:28 cognominal m: '' ~~ / <?before <foo-ba>r> /
12:28 camelia rakudo-moar c2a57e: OUTPUT«Method 'foo-ba' not found for invocant of class 'Cursor'␤  in block <unit> at /tmp/qK9GGQvzTu:1␤␤»
12:29 cognominal better :)
12:29 timotimo > my $foo = 10
12:29 timotimo 10
12:29 timotimo > my $foo = 20
12:29 timotimo 20
12:29 timotimo no redeclaration error here :S
12:30 Ven joined #perl6
12:31 ssqq_ joined #perl6
12:32 smls_ Why don't we have lazy Scalar's? :P
12:33 smls_ this:
12:33 smls_ has $!attr = lazy do-some-calculation;
12:33 smls_ would look nicer than this:
12:33 smls_ has $!attr; method attr { $!attr //= do-some-calculation }
12:33 moritz because methods make it much more explicit when its being accessed
12:34 moritz scalars are evaluated on every type check, for example
12:34 moritz but there's a   has $!attr will lazy do-some-calculation;
12:34 smls_ there is?
12:34 moritz possibly with parens around the calculation
12:35 smls_ When it's just done for performance reasons (don't do the calculation when the result is never accessed), I don't think it needs to be explicit
12:35 yqt joined #perl6
12:35 moritz seems "will lazy" was backed out of core
12:37 timotimo yes, to be put into a module
12:46 beastd joined #perl6
12:47 uncleyear joined #perl6
12:50 hoelzro o/ #perl6
12:52 uncleyear joined #perl6
12:53 zakharyas joined #perl6
12:54 timotimo o/ hoelzro
12:54 timotimo hashtag-hoelzro
12:54 hoelzro ahoy timotimo
12:54 ssqq joined #perl6
13:10 smls_ Hm, has  signal(SIGINT).tap({ })  stopped working?
13:12 bjz joined #perl6
13:12 jnthn works for me
13:13 * smls_ re-rakudobrews
13:13 * jnthn just tried it :)
13:13 jnthn I am on a not-yet-updated-to MoarVM
13:16 uncleyear joined #perl6
13:18 molaf joined #perl6
13:21 smls_ ➜  perl6 -e 'signal(SIGINT).tap({ say "SIGINT" }); prompt(":");'
13:21 smls_ :^C
13:21 smls_
13:21 smls_ jnthn: ^^ still no luck after 'rakudobrew triple nom master master'
13:22 jnthn smls_: Very odd...I try exactly that example and it works here
13:22 jnthn On Windows, fwiw.
13:23 smls_ Linux here
13:24 AlexDaniel m: my $test; my $test
13:24 camelia rakudo-moar c2a57e: OUTPUT«Potential difficulties:␤    Redeclaration of symbol $test␤    at /tmp/W51V_BtMB5:1␤    ------> 3my $test; my $test7⏏5<EOL>␤»
13:24 AlexDaniel is it possible to make it tell the line number of the first declaration? Should I report that?
13:28 RabidGravy joined #perl6
13:35 geekosaur it did, sort of? ":1" suffix
13:35 _itz I think https://rt.perl.org/Ticket/Display.html?id=123728 can be closed as done (?)
13:35 geekosaur LTA perhaps though
13:36 AlexDaniel geekosaur: that's not the first declaration
13:37 geekosaur hm, right
13:38 AlexDaniel not that it is very critical, but still. I will report it then
13:40 AlexDaniel m: my $foo = 'a'; my $bar = 'a'; say min(+$foo, +$bar);
13:40 camelia rakudo-moar c2a57e: OUTPUT«Inf␤»
13:40 AlexDaniel why Inf?
13:41 arnsholt m: say +"a"
13:41 camelia rakudo-moar c2a57e: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '⏏a' (indicated by ⏏)␤  in block <unit> at /tmp/o8dIqJU3sY:1␤␤»
13:41 geekosaur that seems like it should report the conversion errors, at the very least
13:41 arnsholt Yeah, that's odd
13:42 arnsholt m: my $a = 'a'; say +$a; # What about this?
13:42 camelia rakudo-moar c2a57e: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '⏏a' (indicated by ⏏)␤  in block <unit> at /tmp/Xf7CaqKsIj:1␤␤»
13:42 AlexDaniel m: say min(+'a', +'a');
13:42 camelia rakudo-moar c2a57e: OUTPUT«Inf␤»
13:42 AlexDaniel how short
13:42 AlexDaniel :)
13:42 geekosaur yug
13:42 AlexDaniel ok, gonna report that as well
13:43 arnsholt sub foo($x) { say $x }; foo(+'a'); # ?
13:43 arnsholt m: sub foo($x) { say $x }; foo(+'a'); # ?
13:43 camelia rakudo-moar c2a57e: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '⏏a' (indicated by ⏏)␤  in block <unit> at /tmp/H8jBr_LI7i:1␤␤»
13:47 fhelmberger joined #perl6
13:51 uncleyear joined #perl6
13:51 gfldex joined #perl6
13:52 AlexDaniel done
13:55 AlexDaniel m: say +"\b";
13:55 camelia rakudo-moar c2a57e: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '⏏' (indicated by ⏏)␤  in block <unit> at /tmp/9Ce8_YOvw3:1␤␤»
13:56 smls_ m: Supply.interval(1).tap({ say $_ }); sleep 3
13:56 camelia rakudo-moar c2a57e: OUTPUT«0␤1␤2␤3␤»
13:56 smls_ ^^ jnthn: This produces no output for me either, locally
13:57 AlexDaniel that's kinda funny, on some terminals it removes ⏏ character
13:58 AlexDaniel so you see in '' (indicated by ⏏), yeah, indicated by, but you can't see it :)
14:00 AlexDaniel and I'm thinking, is it a bug?
14:00 moritz if the terminal eats it, it's a bug in the terminal
14:01 AlexDaniel what do you mean by "eats it"
14:01 AlexDaniel interprets it?
14:01 moritz removes it
14:01 AlexDaniel why?
14:01 moritz doesn't show it
14:01 moritz because it's supposed to show it :-)
14:01 AlexDaniel moritz: well, if you were a terminal, how would you print \b?
14:02 moritz AlexDaniel: what's ⏏ got to do with \b ?
14:02 AlexDaniel well, \b is a backspace if I get it right, so it moves back by one character
14:03 moritz oh, now I understand
14:03 AlexDaniel then prints more stuff on top of what existed
14:03 moritz you mean that rakudo should escape the \b in the error message?
14:03 AlexDaniel I feel like perl6 should actually print '\b'
14:03 AlexDaniel yeah
14:03 moritz yes, that's reasonable
14:03 AlexDaniel okay, gonna report that
14:04 AlexDaniel let's see what else can I find today :D
14:25 masak afternoon, #perl6
14:27 PerlJam masak: good morning from Texas  :)
14:29 rurban joined #perl6
14:29 timotimo i've just learnt there will be gulasch every day at the GPN
14:30 nwc10 timotimo: that presumably is a good thing. As it justifies the G
14:30 timotimo definitely
14:30 timotimo during the last years there was only gulasch on a single day
14:32 masak what a planning mishap
14:35 PerlJam Isn't "nacht" singular?  Seems like they only promised one "day"
14:38 uncleyear joined #perl6
14:42 timotimo haha
14:42 timotimo well, the initial gpn was just a single night
14:42 timotimo it also didn't have ~500 attendees
14:48 smls joined #perl6
14:52 smls_ joined #perl6
14:56 zostay m: class { method postcircumfix:<( )>($test) { } }.^can('postcircumfix:<( )>').perl.say;
14:56 camelia rakudo-moar c2a57e: OUTPUT«(method postcircumfix:<( )> (<anon> $: Any $test, *%_) { #`(Method|55958080) ... },)␤»
14:56 zostay m: class { method postcircumfix:<( )>($test) { } }.^can('postcircumfix:<()>').perl.say;
14:56 camelia rakudo-moar c2a57e: OUTPUT«()␤»
14:56 zostay m: class { method postcircumfix:<()>($test) { } }.^can('postcircumfix:<()>').perl.say;
14:56 camelia rakudo-moar c2a57e: OUTPUT«(method postcircumfix:<()> (<anon> $: Any $test, *%_) { #`(Method|56497088) ... },)␤»
14:56 zostay m: class { method postcircumfix:<()>($test) { } }.^can('postcircumfix:<( )>').perl.say;
14:56 camelia rakudo-moar c2a57e: OUTPUT«()␤»
14:56 zostay that feels like a bug to me
14:57 Ven m: say <()>.perl; say <( )>.perl; # zostay
14:57 camelia rakudo-moar c2a57e: OUTPUT«"()"␤("(", ")")␤»
14:59 hanekomu joined #perl6
14:59 zostay m: class { method postcircumfix:<(  )>($test) { } }.^can('postcircumfix:<( )>').perl.say;
14:59 camelia rakudo-moar c2a57e: OUTPUT«(method postcircumfix:<( )> (<anon> $: Any $test, *%_) { #`(Method|47934080) ... },)␤»
14:59 ugexe anyone know if a pure p6 gzip/deflate would likely be too slow to be useful for a useragent?
14:59 zostay i see
14:59 zostay nm
14:59 smls Also, I think classes are supposed to implement  method CALL-ME  instead of implementing  method postcircumfix:<( )>  directy.
15:00 masak zostay: probably there should at least be a warning at parse time for creating a method postcircumfix:<()>
15:00 masak warning or even error
15:01 smls m: sub postcircumfix:<()> { }
15:01 camelia rakudo-moar c2a57e: OUTPUT«5===SORRY!5=== Error while compiling /tmp/6aye1DAq2o␤Not enough symbols provided for categorical of type postcircumfix; needs 2␤at /tmp/6aye1DAq2o:1␤------> 3sub postcircumfix:<()>7⏏5 { }␤»
15:01 zostay why is CALL-ME preferred?
15:02 Ven zostay: because operators are defined as subs, usually
15:02 Ven (the reasoning is that we can statically dispatch those. it has drawbacks, though)
15:02 smls I guess because there are other ways to invoke something than literally writing () parens after it
15:04 smls and CALL-ME would make them work for your class like it does for buil-in callables
15:04 zostay that makes sense, documentation for CALL-ME, AT-POS, ASSIGN-KEY, etc. is conspicuously absent from docs.perl6.org and design.perl6.org
15:05 smls yeah
15:05 zostay the old lowercase versions on S99, i think
15:06 smls I kind of figured out how to use the ones for postcircumfix:<{ }> by looking at the Rakudo source code
15:06 smls https://github.com/smls/undef/blob/master/scripts/term-livehash.p6  <-- used them here
15:06 smls haven't played with the ones for [ ] and ( ) yet.
15:07 zostay yeah, most of what i've learned of perl6 has come from reading rakudo source... the docs are still too lean to depend on
15:07 zostay or reading roast tests
15:08 zostay which are sort of part of the docs
15:11 cognominal joined #perl6
15:23 ugexe i really like how the design docs link to approriate roast files
15:24 mr-foobar joined #perl6
15:24 moritz m: for <a b c>.kv -> $k, $v { say "$k: $v" }
15:24 camelia rakudo-moar c2a57e: OUTPUT«0: a␤1: b␤2: c␤»
15:25 ugexe i also like golang's online docs where, method name headers for example, link to the source
15:27 amurf joined #perl6
15:27 smls_ joined #perl6
15:28 masak I must say I found https://github.com/github/linguist/issues/2149 an interesting read
15:28 masak especially the p5ers who go "but p5 is so much more common, y u do this?"
15:29 uncleyear joined #perl6
15:29 masak (which is true, but not really adressing the actual problem of distinguishing well between Perl 5 and Perl 6 code.)
15:29 dalek doc: 73e57a9 | moritz++ | lib/ (2 files):
15:29 dalek doc: Describe postcircumfix:<[ ]> in much greater detail
15:29 dalek doc: review: https://github.com/perl6/doc/commit/73e57a9b57
15:29 smls__ joined #perl6
15:31 AlexDaniel m: my $x = "abc"; given $x { when 5 { say 'a' }; when "abc" { say 'b' }; when Bool { say 'c' }; }
15:31 camelia rakudo-moar c2a57e: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '⏏abc' (indicated by ⏏)␤  in block <unit> at /tmp/8oO28ZVK1r:1␤␤»
15:31 AlexDaniel what's wrong here? Is it a bug or I am doing it wrong?
15:31 dalek perl6-examples: 49eeb3a | andreoss++ | lib/Pod/Htmlify.pm6:
15:31 dalek perl6-examples: Explicit alphanumeric sorting of files and categories
15:31 dalek perl6-examples: review: https://github.com/perl6/perl6-examples/commit/49eeb3a424
15:31 AlexDaniel because I took that example from https://en.wikibooks.org/wiki/Perl_6_Programming/Control_Structures#Given_.2F_When
15:31 AlexDaniel if it is supposed to throw an error then somebody has to fix that example, I guess?
15:32 moritz AlexDaniel: you're checking 'abc' and 5 for numeric equality, which tries to coerce 'abc' to a number, which fails
15:32 moritz yes
15:32 moritz should be   when '5' I guess
15:32 andreoss joined #perl6
15:34 ugexe alternatively you can do an additional check
15:34 ugexe m: my $x = "abc"; given $x { when Int { when 5 { say 'a' }; };  when "abc" { say 'b' }; when Bool { say 'c' }; }
15:34 camelia rakudo-moar c2a57e: OUTPUT«b␤»
15:35 masak _sri++ for contributing that github issues link, and for contributing to the general p5er dissatisfaction that "Perl 6 ruins Perl 5 stats"
15:36 masak I understand that a Bayesian filter might have a hard time distinguishing the two, but it doesn't sound like an unsolvable problem to me. just a generally interesting one.
15:37 andreoss m: my $x = 1; say $x.^methods.sort;
15:37 camelia rakudo-moar c2a57e: OUTPUT«Code object coerced to string (please use .gist or .perl to do that)  in any p6sort at src/vm/moar/Perl6/Ops.nqp:349␤Code object coerced to string (please use .gist or .perl to do that)  in any p6sort at src/vm/moar/Perl6/Ops.nqp:349␤Code object coerce…»
15:38 AlexDaniel ugexe: I edited it using your solution
15:38 andreoss it segfaults
15:38 grondilu m: say (^1000).pick.polymod(2 xx *);
15:38 camelia rakudo-moar c2a57e: OUTPUT«0 1 0 1 0 0 0 1 0 1␤»
15:39 grondilu m: say .polymod(2 xx *) for ^100;
15:39 camelia rakudo-moar c2a57e: OUTPUT«␤1␤0 1␤1 1␤0 0 1␤1 0 1␤0 1 1␤1 1 1␤0 0 0 1␤1 0 0 1␤0 1 0 1␤1 1 0 1␤0 0 1 1␤1 0 1 1␤0 1 1 1␤1 1 1 1␤0 0 0 0 1␤1 0 0 0 1␤0 1 0 0 1␤1 1 0 0 1␤0 0 1 0 1␤1 0 1 0 1␤0 1 1 0 1␤1 1 1 0 1␤0 0 0 1 1␤1 0 0 1 1␤0 1 0…»
15:39 grondilu I have much weirder locally
15:41 skids joined #perl6
15:41 grondilu https://gist.github.com/grondilu/d33f57b8820cc5fd4562
15:41 domidumont joined #perl6
15:43 andreoss m: my @x = Method.new for 1..3; say @x.perl;
15:43 camelia rakudo-moar c2a57e: OUTPUT«(signal SEGV)»
15:43 andreoss m: my $x = Method.new; say $x.perl;
15:43 camelia rakudo-moar c2a57e: OUTPUT«(signal SEGV)»
15:43 ugexe i ran that locally and do not get the same result as your gist either
15:43 andreoss m: Method.new.perl.say
15:43 camelia rakudo-moar c2a57e: OUTPUT«(signal SEGV)»
15:44 andreoss m: Method.new
15:44 camelia rakudo-moar c2a57e: ( no output )
15:54 AlexDaniel m: say ^10; say 0..10
15:54 camelia rakudo-moar c2a57e: OUTPUT«0..^10␤0..10␤»
15:54 AlexDaniel what's the difference?
15:55 PerlJam m: .say for 0..^10;
15:55 camelia rakudo-moar c2a57e: OUTPUT«0␤1␤2␤3␤4␤5␤6␤7␤8␤9␤»
15:55 PerlJam m: .say for 0..10;
15:55 camelia rakudo-moar c2a57e: OUTPUT«0␤1␤2␤3␤4␤5␤6␤7␤8␤9␤10␤»
15:55 AlexDaniel oh
15:56 AlexDaniel right
15:56 AlexDaniel ok
15:56 uncleyear joined #perl6
15:58 AlexDaniel yay, smileys
15:58 AlexDaniel m: .say for (6^..^9)
15:58 camelia rakudo-moar c2a57e: OUTPUT«7␤8␤»
16:00 AlexDaniel what about ranges that are in the backward order? like
16:00 AlexDaniel m: .say for 10..1
16:00 camelia rakudo-moar c2a57e: ( no output )
16:00 AlexDaniel not even a warning
16:01 AlexDaniel hm, that's probably OK
16:01 AlexDaniel m: .say for Inf..1
16:01 camelia rakudo-moar c2a57e: OUTPUT«(signal XFSZ)-9223372036854775808␤-9223372036854775808␤-9223372036854775808␤-9223372036854775808␤-9223372036854775808␤-9223372036854775808␤-9223372036854775808␤-9223372036854775808␤-9223372036854775808␤-9223372036854775808␤-922337203685…»
16:02 AlexDaniel what is this?
16:02 timotimo range is strictly a minimum and maximum thing
16:02 AlexDaniel okay, why does it hang on Inf..1 ?
16:03 timotimo sequence still exists for backwards and more complex things
16:03 andreoss m: say Inf after (Inf-1)
16:03 camelia rakudo-moar c2a57e: OUTPUT«False␤»
16:04 andreoss m: say (Inf - 1).succ
16:04 camelia rakudo-moar c2a57e: OUTPUT«Inf␤»
16:04 timotimo it seems it uses the smallest integer it can find as the start point
16:04 AlexDaniel timotimo: bug?
16:04 timotimo dunno
16:04 AlexDaniel this one is also interesting: .say for -Inf..1
16:04 AlexDaniel it prints Inf a couple of times and then starts printing -9223372036854775808
16:04 timotimo ranges starting at negative inf are mostly useful for matching I imagine
16:05 andreoss shouldn't it go like Inf, Inf - 1 , Inf -2 ... 1?
16:05 AlexDaniel andreoss: well, if 5..1 does not go 5 4 3 2 1 then no, it shouldn't
16:05 timotimo oh wait
16:05 timotimo I misread your first code
16:05 andreoss m: .say for 5...1
16:05 camelia rakudo-moar c2a57e: OUTPUT«5␤4␤3␤2␤1␤»
16:05 andreoss m: .say for Inf...1
16:06 AlexDaniel it works fine with three dots
16:06 camelia rakudo-moar c2a57e: OUTPUT«(timeout)Inf␤Inf␤Inf␤Inf␤Inf␤Inf␤Inf␤Inf␤Inf␤Inf␤Inf␤Inf␤Inf␤Inf␤Inf␤Inf␤Inf␤Inf␤Inf␤Inf␤Inf␤Inf␤Inf␤Inf␤Inf␤Inf␤Inf␤Inf␤Inf␤Inf␤Inf␤Inf␤Inf␤Inf␤Inf␤Inf␤Inf␤Inf␤Inf␤Inf␤Inf␤I…»
16:06 timotimo ... is smart
16:07 timotimo it uses succ in this case
16:07 timotimo i wonder what exactly .. did
16:08 AlexDaniel frankly speaking I don't know the difference, I'm just poking rakudo with a knife and look what happens
16:08 andreoss m: .say for -5..1
16:08 camelia rakudo-moar c2a57e: OUTPUT«-5␤-4␤-3␤-2␤-1␤0␤1␤»
16:08 AlexDaniel timotimo: -Inf..1 is even more interesting
16:09 AlexDaniel does not make any sense at all to me
16:09 AlexDaniel why would -Inf become -9223372036854775808 at some point...
16:09 AlexDaniel NaN..1 works exactly the same way
16:11 AlexDaniel whatever this is, I'm going to report it, it does not feel right
16:15 AlexDaniel it prints -9223372036854775808 exactly 1024 times :)
16:15 andreoss m: use nqp; say nqp::p6box_n(Inf)
16:15 andreoss
16:15 camelia rakudo-moar c2a57e: OUTPUT«Inf␤»
16:16 smls joined #perl6
16:16 smls m: say ((1, 2), (3, 4))>>.join.perl
16:16 camelia rakudo-moar c2a57e: OUTPUT«("1", "2", "3", "4")␤»
16:16 smls ^^ Are hypers *supposed* to flatten?
16:17 ugexe m: say Parcel.new.max
16:17 camelia rakudo-moar c2a57e: OUTPUT«-Inf␤»
16:17 uncleyea1 joined #perl6
16:18 AlexDaniel Hahahaha!
16:19 AlexDaniel This one actually counts up! .say for NaN..NaN
16:19 AlexDaniel m: .say for NaN..NaN
16:19 camelia rakudo-moar c2a57e: OUTPUT«(signal XFSZ)NaN␤NaN␤NaN␤NaN␤NaN␤NaN␤NaN␤NaN␤NaN␤NaN␤NaN␤NaN␤NaN␤NaN␤NaN␤NaN␤NaN␤NaN␤NaN␤NaN␤NaN␤NaN␤NaN␤NaN␤NaN␤NaN␤NaN␤NaN␤NaN␤NaN␤NaN␤NaN␤NaN␤NaN␤NaN␤NaN␤NaN␤NaN␤NaN␤NaN␤NaN…»
16:19 colomon smls: hypers are supposed to keep the same structure as the original
16:19 AlexDaniel ah no, first it prints 1024 NaNs
16:20 andreoss m: use nqp; say nqp::sub_n(Inf, 1e0);
16:20 camelia rakudo-moar c2a57e: OUTPUT«Inf␤»
16:20 colomon m: say ((1, 2), (3, 4))>>++
16:20 camelia rakudo-moar c2a57e: OUTPUT«Cannot assign to an immutable value␤  in block <unit> at /tmp/GXPlY9dxkQ:1␤␤»
16:20 colomon m: say ((1, 2), (3, 4))>>.succ
16:20 camelia rakudo-moar c2a57e: OUTPUT«2 3 4 5␤»
16:20 colomon m: say ((1, 2), (3, 4))>>.succ.perl
16:20 camelia rakudo-moar c2a57e: OUTPUT«(2, 3, 4, 5)␤»
16:27 andreoss AlexDaniel: you might want to look at Range.pm
16:27 uncleyear joined #perl6
16:27 Ven AlexDaniel: Batman!
16:27 Ven m: say NaN..NaN ~ ' batman`
16:27 camelia rakudo-moar c2a57e: OUTPUT«5===SORRY!5=== Error while compiling /tmp/voXocMsJon␤Unable to parse expression in single quotes; couldn't find final "'" ␤at /tmp/voXocMsJon:1␤------> 3say NaN..NaN ~ ' batman`7⏏5<EOL>␤    expecting any of:␤        single quotes␤    …»
16:27 AlexDaniel Ven: not batman, just -9223372036854775808
16:27 Ven m: say NaN..NaN ~ ' batman'
16:27 camelia rakudo-moar c2a57e: OUTPUT«Earlier failures:␤ Cannot convert string to number: trailing characters after number in 'NaN⏏ batman' (indicated by ⏏)␤  in block <unit> at /tmp/PiNKtOIfwo:1␤␤Final error:␤ Cannot call Real(Failure: ); none of these signatures match:␤    (M…»
16:28 andreoss i did, and it seems to try using int if possible when reifies
16:30 AlexDaniel andreoss: well, somehow I don't think that I am ready for this
16:30 andreoss me neither
16:33 andreoss but -9223372036854775808 comes from coercing to native integer for sure
16:33 AlexDaniel umm
16:33 AlexDaniel m: .say for Inf..0
16:33 AlexDaniel .say for Inf..0.1
16:34 AlexDaniel m: .say for Inf..0.1
16:34 camelia rakudo-moar c2a57e: OUTPUT«(signal XFSZ)-9223372036854775808␤-9223372036854775808␤-9223372036854775808␤-9223372036854775808␤-9223372036854775808␤-9223372036854775808␤-9223372036854775808␤-9223372036854775808␤-9223372036854775808␤-9223372036854775808␤-922337203685…»
16:34 camelia rakudo-moar c2a57e: OUTPUT«(signal XFSZ)-9223372036854775808␤-9223372036854775807␤-9223372036854775806␤-9223372036854775805␤-9223372036854775804␤-9223372036854775803␤-9223372036854775802␤-9223372036854775801␤-9223372036854775800␤-9223372036854775799␤-922337203685…»
16:34 andreoss m: my int $x = 2 ** 63; say $x;
16:34 camelia rakudo-moar c2a57e: OUTPUT«-9223372036854775808␤»
16:36 uncleyear joined #perl6
16:43 AlexDaniel m: .say for 1...NaN;
16:43 camelia rakudo-moar c2a57e: OUTPUT«(timeout)1␤0␤-1␤-2␤-3␤-4␤-5␤-6␤-7␤-8␤-9␤-10␤-11␤-12␤-13␤-14␤-15␤-16␤-17␤-18␤-19␤-20␤-21␤-22␤-23␤-24␤-25␤-26␤-27␤-28␤-29␤-30␤-31␤-32␤-33␤-34␤-35␤-36␤-37␤-38␤-39␤-40␤-41␤-4…»
16:43 AlexDaniel why?
16:44 tony-o_ m: .say for NaN...1;
16:44 AlexDaniel Nanananananana
16:44 camelia rakudo-moar c2a57e: OUTPUT«(timeout)NaN␤NaN␤NaN␤NaN␤NaN␤NaN␤NaN␤NaN␤NaN␤NaN␤NaN␤NaN␤NaN␤NaN␤NaN␤NaN␤NaN␤NaN␤NaN␤NaN␤NaN␤NaN␤NaN␤NaN␤NaN␤NaN␤NaN␤NaN␤NaN␤NaN␤NaN␤NaN␤NaN␤NaN␤NaN␤NaN␤NaN␤NaN␤NaN␤NaN␤NaN␤N…»
16:45 tony-o_ m: say 'batman'
16:45 camelia rakudo-moar c2a57e: OUTPUT«batman␤»
16:45 tony-o_ perl6 bot game is tight
16:45 AlexDaniel tony-o_: what kinda bothers me is that it is not an infinite list
16:46 AlexDaniel so if you attempt to do something like my @a = NaN...1;
16:46 AlexDaniel it will just get stuck on it eating your memory
16:46 tony-o_ isn't that a lazy list?
16:46 andreoss left #perl6
16:46 AlexDaniel I mean, yes, it should be lazy
16:46 AlexDaniel but it isn't
16:46 AlexDaniel m: my @a = NaN...1;
16:47 tony-o_ oh, it's not
16:47 AlexDaniel my @a = 1...NaN;
16:47 AlexDaniel m: my @a = 1...NaN;
16:47 camelia rakudo-moar c2a57e: OUTPUT«(timeout)»
16:47 camelia rakudo-moar c2a57e: OUTPUT«(timeout)»
16:49 HuStmpHrrr joined #perl6
16:50 HuStmpHrrr hi guys, any recent benchmark on rakudo?
16:51 AlexDaniel HuStmpHrrr: you mean that perlbench thing?
16:52 HuStmpHrrr i mean the performance report type of thing on current rakudo implementation
16:53 [Coke] say uses .gist which doesn't print out infinite lists.
16:53 [Coke] you'll get only the gist of it, not the whole thing.
16:54 [Coke] m: say (Inf...1)[20000]
16:54 camelia rakudo-moar c2a57e: OUTPUT«Inf␤»
16:54 [Coke] m: say (Inf...1)[Inf]
16:54 camelia rakudo-moar c2a57e: OUTPUT«Cannot coerce Inf or NaN to an Int␤  in block <unit> at /tmp/96GKDBZIjW:1␤␤»
16:55 AlexDaniel [Coke]: how is this relevant? The problem is that NaN...1 is not a lazy list
16:55 AlexDaniel oh wow, an error
16:58 AlexDaniel Inf...1 is not lazy as well
17:07 uncleyear joined #perl6
17:10 [Coke] Someone was complaining that they only got X elements from the list.
17:11 [Coke] m: my $a = NaN...1;
17:11 camelia rakudo-moar c2a57e: OUTPUT«(timeout)»
17:12 [Coke] m: my $a := NaN...1;
17:12 camelia rakudo-moar c2a57e: OUTPUT«(timeout)»
17:12 [Coke] Yup, those should die asap, IMO.
17:15 liztormato joined #perl6
17:15 PerlJam die?  Or produce an infinite list of NaN?
17:15 * liztormato waves from 38000 feet
17:17 * PerlJam waves back from approximately 20 feet
17:17 geekosaur arguably NaN should not participate in ranges
17:17 PerlJam those are sequences, not ranges
17:17 AlexDaniel geekosaur: what about Inf...1 ?
17:17 geekosaur was trying to compose a "that's a harder question"
17:18 Ven liztormato: that's pretty high :)
17:18 geekosaur I think Inf has to not be part of a range or sequence as well, since there isn't really a meaningful *range*
17:18 Ven m: class Feet{has $.val}; say (^10000).map(Feet.new(val => *)).map(&say)
17:18 camelia rakudo-moar c2a57e: OUTPUT«Method 'count' not found for invocant of class 'Feet'␤  in block <unit> at /tmp/SxGh2KwUf5:1␤␤»
17:19 Ven ( guess it should be Foot.
17:19 liztormato Ven: courtesy of Delta
17:20 yqt joined #perl6
17:21 liztormato Only 1:15 hour to go and I'm bored :-)
17:21 timotimo super expensive and slow WiFi?
17:22 liztormato 4$ per hour
17:23 liztormato Figured I'd be online for the last hour
17:23 uncleyear joined #perl6
17:26 AlexDaniel OH COME ON
17:26 AlexDaniel m: my @a = 1...Inf
17:26 camelia rakudo-moar c2a57e: ( no output )
17:26 AlexDaniel cool, rightL
17:26 AlexDaniel ?
17:27 AlexDaniel m: my @a = 1...-Inf
17:27 AlexDaniel boom.
17:27 camelia rakudo-moar c2a57e: OUTPUT«(timeout)»
17:27 PerlJam AlexDaniel: I don't see how that differs substantially from Inf...1
17:28 PerlJam I mean if one behaves badly, I'd expect the other to do so as well.
17:28 liztormato m: my @a := -Inf ... 1
17:28 liztormato Hmmmmm...
17:28 camelia rakudo-moar c2a57e: OUTPUT«(timeout)»
17:29 AlexDaniel liztormato: https://rt.perl.org/Public/Bug/Display.html?id=125337
17:30 AlexDaniel liztormato: there is a small list of non-lazy stuff
17:30 PerlJam AlexDaniel: liz did binding though, not assignment.  Do you mean she should add to the ticket?
17:31 AlexDaniel PerlJam: actually, I've not noticed it
17:31 AlexDaniel and felt like "oh, I already tested that"
17:31 AlexDaniel sorry
17:31 PerlJam (I'mguessing that the GLR will take care of that particular wart though)
17:31 liztormato Yeah, please add to the ticket
17:31 AlexDaniel ok
17:32 liztormato Thanks!
17:35 liztormato joined #perl6
17:35 liztormato moritz: will lazy was removed before 2015.05 came out
17:38 liztormato joined #perl6
17:43 uncleyear joined #perl6
17:43 diana_olhovik joined #perl6
17:45 liztormato joined #perl6
17:46 liztormato Seems like the satellite is wonky
17:47 PerlJam liztormato: how can you be bored with the excitement of potential network difficulty at any second?  :)
17:47 _mg_ joined #perl6
17:47 liztormato :-). Yeah. DevOps heaven here ;-)
17:48 fhelmberger joined #perl6
17:54 espadrine joined #perl6
17:59 uncleyear joined #perl6
18:04 telex joined #perl6
18:08 liztormato joined #perl6
18:09 uncleyear joined #perl6
18:25 _mg_ joined #perl6
18:28 uncleyear joined #perl6
18:31 hoelzro does panda cause a segfault on Windows when installing one of its own dependencies (ex. panda install JSON::Tiny)?
18:31 hoelzro I fixed that for *nix last night, but I'm not sure how one would approach a fix for Windows, if it's broken at all
18:32 jnthn hoelzro: Didn't last I tried it, but that was some days ago
18:32 hoelzro jnthn: it's been doing it on Linux for about a week, I think
18:32 hoelzro according to others I've asked, anyway =)
18:32 hoelzro my Win32 fu is very weak
18:34 hoelzro interestingly enough, libuv allows other processes to delete files that uv_fs_open opens
18:34 hoelzro but I don't know if the reference counting POSIX semantics happen in this case on Win32
18:35 uncleyear joined #perl6
18:36 dalek nqp: 6da0dea | jnthn++ | tools/build/MOAR_REVISION:
18:36 dalek nqp: Bump MOAR_REVISION for event loop fixes.
18:36 dalek nqp: review: https://github.com/perl6/nqp/commit/6da0dead91
18:36 liztormato joined #perl6
18:36 * liztormato waves from SLC
18:36 liztormato left #perl6
18:37 dalek rakudo/nom: 129a909 | jnthn++ | tools/build/NQP_REVISION:
18:37 dalek rakudo/nom: Get MoarVM with eventloop, normalization fixes.
18:37 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/129a909cc3
18:37 dalek rakudo/nom: 97b27a5 | jnthn++ | t/spectest.data:
18:37 dalek rakudo/nom: Run S15-nfg/many-combiners.t.
18:37 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/97b27a514d
18:37 skids I never got a segv with panda yesterday.  It is, however, currently doing something that results in a "cannot invoke null object" when it tries to strip pod out of Sum.
18:38 _mg_ joined #perl6
18:39 hoelzro skids: I see the same issue with Linenoise
18:39 cognominal skiids: got the same message when trying to install Linenoise
18:39 hoelzro that's been happening over the last few days
18:40 jnthn hoelzro: Panda passes tests and installs for me (on Win)
18:40 hoelzro jnthn: that should work fine; try "panda install JSON::Tiny" with a freshly bootstrapped panda
18:40 hoelzro that triggered the segfault for me
18:41 hoelzro or sometimes it was a bytecode decoding freak out
18:42 skids I got the bytecode thing yesterday while trying to run doc/htmify.pm on Linux.
18:43 hoelzro that's odd
18:43 hoelzro then again, I don't fully understand how this just started happening recently
18:45 jnthn hoelzro: No SEGV but I see things like this:
18:45 jnthn WARNING: unhandled Failure detected in DESTROY:
18:45 jnthn Failed to copy 'C:\consulting\perl6\panda\.panda-work\1433529896_2\blib\lib\Panda\Ecosystem.pm.moarvm' to 'C:\consulting\MoarVM\install/share/perl6/site/lib\Panda\Ecosystem.pm.moarvm': Failed to copy file: unknown error
18:45 hoelzro eesh
18:46 jnthn When I install JSON::Tiny it then does something involving reverse deps?
18:46 jnthn And so goes re-installing Panda itself
18:46 hoelzro yeah, that's the part that would break for me
18:46 jnthn We mmap the bytecode file
18:46 domidumont joined #perl6
18:47 hoelzro right, that's why it was segfaulting on *nix
18:47 jnthn I *think* you can't go overwriting a file you're currently got mmap'd on Windows.
18:47 jnthn How did you fix it on *nix?
18:47 skids Yeah same problem with a build made just before those last two commits -- same bytecode problem as https://gist.github.com/skids/7ba5cc3b031e69abcf83 ?
18:47 hoelzro the MapFileView docs say the behavior is undefined =(
18:47 hoelzro jnthn: unlink before the copy
18:47 jnthn Don't think that's going to work out on Windows...
18:48 hoelzro open files are sort of reference counted on *nix, so you can delete a mmap'd file
18:48 hoelzro no, I don't think so =(
18:48 hoelzro I've been thinking about it all morning
18:49 hoelzro while eating lunch, I was thinking of instead creating entirely new files in the comp unit repo, and atomically updating the database to point to the new versions
18:49 hoelzro but that would then require some clean up of old files later =(
18:49 * hoelzro .oO( are we still using a JSONy database to resolve unit locations? )
18:49 jnthn No, we us the serialization stuff for it now
18:50 jnthn At least, I'm pretty sure that landed
18:50 hoelzro oh, ok
18:50 hoelzro jnthn: but it's still some sort of DB, right?
18:51 jnthn Right
18:51 hoelzro ok, so we could go with that approach
18:53 uncleyear joined #perl6
18:53 hoelzro this article is interesting: http://www.catch22.net/tuts/self-deleting-executables
19:00 FROGGS joined #perl6
19:03 FROGGS o/
19:05 hoelzro o/ FROGGS
19:05 FROGGS hi hoelzro :o)
19:05 bin_005 joined #perl6
19:06 Sqirrel joined #perl6
19:07 uncleyear joined #perl6
19:07 [Coke] so, when installing nqp (moarvm) or nqp-jvm, we end up with no nqp, but an nqp-m or nqp-j - any suggestions on how to decide what ends up getting the coveted "nqp" executable, or if we should encourage using the vm specific name?
19:11 [Coke] also, you can't tell macports to depend on particular versions of other macports. might end up with some upgrade pain there at some point.
19:14 jnthn [Coke]: Not sure this helps with macports much, but iirc the approach source builds take is that the one you mention first in the backends list is the one that gets the short alias
19:15 [Coke] the wierd thing is that that file doesn't seem to get installed.
19:15 [Coke] *weird*
19:16 [Coke] the config is specified by me in the portfile. pretty sure the defaults for building are "make" and "make install"
19:16 [Coke] it's not even in /opt/local/bin/nqp without exec bits, just not there.
19:17 [Coke] I would be mostly ok with "last installed wins"
19:17 [Coke] (and with ports, if you want both, you install them both. there isn't a nqp-moar&jvm port)
19:23 FROGGS hmmmm, my first thought was that the nqp-* binaries suffice
19:23 geekosaur the macports method is that you have a port foo_select which installs a template selection configuration; each port that can apply to that selection installs a selection data file, and then port select is used to select which selection configuration is used
19:24 [Coke] ah.
19:25 [Coke] I can probably make that work.
19:25 geekosaur so for example nqp_select defines the nqp select group; nqp-jvm installs nqp-j and an nqp select data file pointing nqp to nqp-j; user uses port select to specify which if any of those gets to be nqp
19:26 rurban joined #perl6
19:26 geekosaur see for example what the db* ports do (e.g. db46, db48; db_select)
19:27 uncleyear joined #perl6
19:35 bin_005 joined #perl6
19:41 kaare__ joined #perl6
19:47 uncleyear joined #perl6
20:01 smls_ joined #perl6
20:01 uncleyear joined #perl6
20:01 FROGGS $ perl6 -Ilib -e 'use IO::Pipe; my $p = pipe("wc", :in, :out); $p.in.say: "hello world\nabc"; say $p.in.close; say $p.out.slurp-rest'
20:01 FROGGS Proc::Status.new(exitcode => 0, pid => Any, signal => 0)
20:01 FROGGS 2       3      16
20:02 FROGGS what'ya think, api wise?
20:02 FROGGS I think I like it
20:02 jnthn Is there a .err too?
20:02 FROGGS but I'm prejudiced
20:02 FROGGS jnthn: there is
20:03 jnthn Is there a :err-out to make :err and :out be bound to the same thing? :)
20:04 FROGGS $ perl6 -Ilib -e 'use IO::Pipe; my $p = pipe("dang", :in, :out, :err); $p.in.say: "hello world\nabc"; say $p.in.close; say $p.out.slurp-rest; say $p.err.slurp-rest'
20:04 FROGGS Proc::Status.new(exitcode => 127, pid => Any, signal => 0)
20:04 FROGGS /bin/sh: 1: dang: not found
20:04 kaare_ joined #perl6
20:04 FROGGS jnthn: no, since I dunno how to do that with libuv
20:04 FROGGS hmmm, there seems to be a race condition...
20:04 FROGGS the last thing I posted sometimes print nothing
20:05 hoelzro I would prefer the module to not be called IO::Pipe, or the sub not to be called pipe
20:06 hoelzro at first glance, I would expect the module just to deal in pipes, not necessarily in spawning processes
20:06 hoelzro </2c>
20:06 mephinet joined #perl6
20:07 FROGGS umm, wat?
20:07 FROGGS that's the code btw: https://gist.github.com/FROGGS/257e55328027c3be0652
20:07 FROGGS hoelzro: IO::Pipe wont be a module, but the class that pipe() returns
20:08 hoelzro but is that object really a pipe? it's more like a subprocess that has pipes attached to it, isn't it?
20:08 hoelzro maybe I'm being overly pedantic
20:08 FROGGS yes, you are right
20:08 FROGGS but pipe is such a nice four letter word :S
20:09 hoelzro proc is a nice four letter word too!
20:09 hoelzro but that might confuse Rubyists?
20:09 hoelzro ugh
20:10 hoelzro naming things is hard
20:10 FROGGS yes, but proc does not tell that you can read from it or write to it
20:10 hoelzro true
20:10 hoelzro well, other than the naming, I like the interface
20:10 FROGGS so it should line in with open(), shell() and run()
20:10 FROGGS \o/
20:10 hoelzro run-pipe?
20:11 FROGGS too long
20:11 hoelzro there's no select() interface for reading from both out and err yet, is there?
20:11 FROGGS I don't know what you mean tbh
20:12 hoelzro FROGGS: wrt. select()?
20:12 FROGGS aye
20:12 hoelzro it's important to be able to check both out and err for activity, or at least poll them individually
20:13 hoelzro otherwise, you could create a run-pipe (for lack of a better name) construction that deadlocks
20:13 FROGGS btw, the current pipe() code could replace run() and shell() maybe..., in a way that when pipe() inherits the filehandles it acts like run/shell anyway
20:13 hoelzro true
20:13 hoelzro that's nice
20:13 FROGGS hoelzro: why should it deadlock?
20:13 hoelzro I like having a flexible process execution mechanism =)
20:13 FROGGS can you try to make that happen?
20:14 hoelzro yeah
20:14 hoelzro hang on
20:14 FROGGS you need the openpipe3 branches though
20:14 hoelzro ok
20:14 FROGGS and... I'm tired ó.ò
20:15 hoelzro is Configure.pl in openpipe3 smart enough to build a MoarVM/NQP with openpipe3?
20:15 FROGGS hoelzro: no
20:15 hoelzro =(
20:15 hoelzro don't stay up on my account; I can create a deadlocking example and you'll see it tomorrow
20:15 jnthn You can --gen-nqp=openpipe3 --gen-moar=openpipe3 iirc
20:16 hoelzro I'll try that
20:17 FROGGS ahh, that's true
20:18 FROGGS gnight
20:18 jnthn 'night, FROGGS++
20:20 hoelzro night FROGGS
20:20 uncleyear joined #perl6
20:20 kst joined #perl6
20:22 kst joined #perl6
20:25 kst joined #perl6
20:27 hoelzro ok, I did not get it to segfault
20:27 hoelzro er, deadlock
20:27 hoelzro and that's because I forgot libuv schedules work to be done rather than doing it right away!
20:28 hoelzro the idea was that if the parent is blocking on $p.out, and the child writes enough to $*ERR to fill the pipe, that should cause a deadlock.
20:35 [particle] joined #perl6
20:35 jnthn The may progress report I didn't get to: https://6guts.wordpress.com/2015/06/05/that-week-concurrency-fixes-control-exceptions-and-more/
20:35 jnthn *May
20:40 isacloud joined #perl6
20:40 fernando___ joined #perl6
20:44 [Coke] m: my @a; say length @a;
20:44 camelia rakudo-moar c2a57e: OUTPUT«5===SORRY!5=== Error while compiling /tmp/GJbh7pTMw2␤Undeclared routine:␤    length used at line 1. Did you mean 'elems', 'chars', 'graphs', 'codes'?␤␤»
20:44 [Coke] ^^ graphs is gone, yes?
20:44 uncleyear joined #perl6
20:45 preyalone joined #perl6
20:48 llfourn joined #perl6
20:48 jnthn [Coke]: yes
20:52 [Coke] m: say "stuff".codes;
20:52 camelia rakudo-moar c2a57e: OUTPUT«5␤»
20:53 [Coke] fixing...
20:55 [Coke] Looks like no tests depend on that particular wording.
21:04 [Coke] ok. I changed src/core/Exception. rebuilt. it's still giving the same old error message.
21:05 jnthn Odd
21:06 jnthn Time for sleep here...'night
21:06 [Coke] mmm. that text doesn't appear anywhere in src now.
21:12 bin_005 joined #perl6
21:16 kurahaupo joined #perl6
21:36 Sqirrel joined #perl6
21:37 lizmat joined #perl6
21:45 uncleyear joined #perl6
21:49 fhelmberger joined #perl6
21:55 Sqirrel joined #perl6
22:04 AlexDaniel m: take 'foo'
22:04 camelia rakudo-moar c2a57e: OUTPUT«take without gather␤␤»
22:04 AlexDaniel "take without gather"? And that's it?
22:04 AlexDaniel no line number, no nothing?
22:09 FROGGS joined #perl6
22:12 lizmat even with --ll-exception, the trace is weird  :-)
22:12 yoleaux 4 Jun 2015 23:01Z <Mouq> lizmat: So is #125312 (start 41 + 2) closable?
22:12 synbot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=125312
22:12 yoleaux 08:42Z <jnthn> lizmat: I get a failure on Windows in 55-use-trace.t; I thought it may just be line endings, but it looks like some weird path mangling issue... https://gist.github.com/jnthn/2b4565199f93e5f52cdd
22:13 lizmat .tell Mouq  #125312 can be closed
22:13 synbot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=125312
22:13 yoleaux lizmat: I'll pass your message to Mouq.
22:13 AlexDaniel lizmat: yea I created an issue already
22:14 lizmat AlexDaniel: I just saw it come in
22:15 AlexDaniel m: my @a = gather { take; }; say @a[0];
22:15 camelia rakudo-moar c2a57e: OUTPUT«(Any)␤»
22:16 AlexDaniel Any? Interesting
22:16 AlexDaniel (Mu) on my machine
22:16 ShimmerFairy joined #perl6
22:17 spintronic joined #perl6
22:17 AlexDaniel what's the point of take; without arguments anyway?
22:17 lizmat m: take 42'
22:17 camelia rakudo-moar c2a57e: OUTPUT«5===SORRY!5=== Error while compiling /tmp/2bY5urW2G3␤Two terms in a row␤at /tmp/2bY5urW2G3:1␤------> 3take 427⏏5'␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        statement end␤        statement …»
22:17 lizmat m: take 42
22:17 camelia rakudo-moar c2a57e: OUTPUT«take without gather␤␤»
22:18 AlexDaniel maybe it should produce an error when your run take; without args?
22:19 spintronic m: await do for 1 .. 100 { start { rand.sleep }}
22:19 camelia rakudo-moar c2a57e: OUTPUT«Memory allocation failed; could not allocate 656 bytes␤»
22:20 spintronic m: for 1 .. 100 { start { rand.sleep } }
22:20 camelia rakudo-moar c2a57e: OUTPUT«Memory allocation failed; could not allocate 656 bytes␤»
22:20 spintronic m: for 1 .. 100 { rand.sleep }
22:20 camelia rakudo-moar c2a57e: OUTPUT«(timeout)»
22:21 spintronic m: await do for 1 .. 4 { start { rand.sleep }}
22:21 camelia rakudo-moar c2a57e: OUTPUT«Saw 1 occurrence of deprecated code.␤================================================================================␤Method sleep (from Real) seen at:␤  /tmp/MUJhF1K9iT, line 1␤Deprecated since v2015.2, will be removed with release v2015.9!␤Plea…»
22:22 spintronic what are the maximum number of threads that can be started under Moar?
22:24 AlexDaniel and I'm actually thinking about all of the other functions out there, why do we allow to run them without any args?
22:24 AlexDaniel m: say min;
22:24 camelia rakudo-moar c2a57e: OUTPUT«Inf␤»
22:24 AlexDaniel great, Inf
22:25 AlexDaniel and if you wonder what max would return
22:25 AlexDaniel m: say max;
22:25 camelia rakudo-moar c2a57e: OUTPUT«-Inf␤»
22:26 AlexDaniel sure it makes sense internally, but why should it throw all of this internall stuff right into my face? :)
22:28 dalek rakudo/nom: 3b5c4a8 | lizmat++ | src/core/control.pm:
22:28 dalek rakudo/nom: Die on bare take/take-rw, AlexDaniel++
22:28 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/3b5c4a8f25
22:29 AlexDaniel lizmat: that was quick
22:29 lizmat it was easy  :-)
22:30 AlexDaniel lizmat: what about this min/max thing?
22:31 lizmat that is a bit trickier, by the looks of it
22:32 AlexDaniel m: my $x = min; #`{ some code here, but then we start calculating $x value } $x = min($x, 5); $x = min($x, 8); say $x
22:32 camelia rakudo-moar c2a57e: OUTPUT«5␤»
22:33 AlexDaniel so if you plan to have some variable that will be the min value of something, then you can set it to min() without thinking at all
22:34 lizmat m: multi a(*@a) { }; multi a(*@a,:$by!) { }; a
22:34 camelia rakudo-moar c2a57e: OUTPUT«Ambiguous call to 'a'; these signatures all match:␤:(*@a)␤:(*@a, Any :by($by)!)␤  in block <unit> at /tmp/zMH8POVKA0:1␤␤»
22:34 AlexDaniel but somehow I don't think that this kind of hacky bug-riding will be popular
22:34 lizmat that's what's stopping us to use a true MMD for min/max
22:35 bin_005 joined #perl6
22:36 FROGGS joined #perl6
22:36 lizmat I feel that this is a bug, but I have been wrong about MMD before, so I would like to hear what jnthn thinks about it first
22:36 lizmat AlexDaniel: I cannot just die on no params, as that is used internally
22:37 AlexDaniel I'll just submit a bug report then
22:37 AlexDaniel otherwise we will just forget, I think
22:37 AlexDaniel m: say 1/-Inf;
22:37 camelia rakudo-moar c2a57e: OUTPUT«-0␤»
22:38 AlexDaniel oh, that negative zero thing is not fixed?
22:39 lizmat shouldn't that be NaN ?
22:39 AlexDaniel why?
22:39 AlexDaniel mathematically it is 0
22:40 lizmat m: say 1/0
22:40 camelia rakudo-moar c2a57e: OUTPUT«Divide by zero␤  in block <unit> at /tmp/Zjs8vNyV_4:1␤␤»
22:41 lizmat AlexDaniel: don't think so
22:41 lizmat I mean, if 1/Inf == 0
22:41 lizmat then 2/Inf would also == 0
22:41 lizmat then Inf/Inf would also be 0
22:42 AlexDaniel no, Inf/Inf is not defined
22:42 lizmat but N/N is defined as 1
22:44 AlexDaniel lizmat: that thing https://en.wikipedia.org/wiki/Indeterminate_form
22:45 AlexDaniel surprisingly 0/0 is an error and not NaN
22:46 AlexDaniel m: say 0**0
22:46 camelia rakudo-moar c2a57e: OUTPUT«1␤»
22:46 AlexDaniel but should be NaN as well, huh
22:47 vendethiel joined #perl6
22:47 AlexDaniel or should it
22:47 AlexDaniel I'm confused now
22:51 jercos 0/0 should obviously return a Whatever :p
22:52 timotimo AlexDaniel: i think it's very good that min() and max() return their neutral element
22:52 jercos while other cases of x/0 being an Inf with the same sign as x is quite reasonable for most cases imo >.>
22:52 * lizmat has had a long day already, so is not thinking too clearly perhaps
22:52 jercos Of course, if you ask your friendly local JavaScript implementation what 1/-0 and 1/0 are... the answers are different :)
22:54 jercos (But no, 0/0 should totally be NaN in any case)
22:54 AlexDaniel timotimo: how is that useful?
22:55 AlexDaniel and why?
22:56 timotimo it gives you a sensible value that you can combine with other calls to min()
22:56 timotimo also, we have metaops that rely on operators telling their neutral element
22:56 timotimo m: say &infix:<+>()
22:56 camelia rakudo-moar c2a57e: OUTPUT«0␤»
22:57 timotimo m: say &infix:<*>()
22:57 camelia rakudo-moar c2a57e: OUTPUT«1␤»
22:57 timotimo m: say &infix:</>()
22:57 camelia rakudo-moar c2a57e: OUTPUT«No zero-arg meaning for infix:</>␤  in block <unit> at /tmp/OPLUvc6jqU:1␤␤»
22:57 dalek rakudo/nom: 501bad2 | lizmat++ | src/core/Any.pm:
22:57 dalek rakudo/nom: Make bare min/max/minmax fail
22:57 dalek rakudo/nom:
22:57 dalek rakudo/nom: Please note that min/max/minmax(my @) still returns Identity
22:57 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/501bad2cb5
22:57 AlexDaniel hm...
22:58 lizmat no spectest breakage with this
22:58 timotimo though if you write it "just like that", not so helpful
22:58 lizmat please revert if not applicable  :-)
22:58 lizmat running errands&
23:02 timotimo i'll build it and check it out
23:12 uncleyear joined #perl6
23:12 timotimo hm. that "without parameters doesn't make sense" warning is hard to suppress
23:13 timotimo like, it's hard to get the zero-arg meaning without going indirect
23:32 Sqirrel joined #perl6
23:34 hoelzro m: https://gist.github.com/hoelzro/01e63a89c104b2b50a7c
23:34 camelia rakudo-moar c2a57e: OUTPUT«gist not found»
23:34 hoelzro m: https://gist.githubusercontent.com/hoelzro/01e63a89c104b2b50a7c/raw/36841ef5bf20e950f903a5a3168f7d422f10c84f/wait-zero-failure.p6
23:34 camelia rakudo-moar c2a57e: OUTPUT«5===SORRY!5=== Error while compiling /tmp/POaEorRvIT␤Confused␤at /tmp/POaEorRvIT:1␤------> 3https:7⏏5//gist.githubusercontent.com/hoelzro/01e␤    expecting any of:␤        colon pair␤»
23:34 hoelzro hmm
23:34 hoelzro oh, it's trying to parse the URL =P
23:35 raydiak that breaks every few months when something changes on github :P
23:36 raydiak (also, github seems to find a way to break our entire ecosystem about once every year or two)
23:41 raydiak also...3-inch screws do not play well with pneumatic tires
23:41 hoelzro o_O
23:41 hoelzro bad luck?
23:42 hoelzro camelia: help
23:42 camelia hoelzro: Usage: <(std|prof-m|rakudo-moar|star-j|pugs|nqp-js|rakudo-jvm|p5-to-p6|debug-cat|nqp-jvm|nqp-parrot|star-m|nqp-moarvm|niecza|sm|rnP|nqp-q|Prn|r-jvm|star|sj|rn|nqp-j|p56|rakudo|nr|perl6|P|j|m|nqp|nom|Pnr|r-m|nPr|r|n|rPn|nrP|nqp-m|rm|p6|nqp-p|r-j|rj|nqp-mvm)(?^::\s) $perl6_program>
23:42 hoelzro camelia: source
23:42 raydiak aye...our irclog contains a nearly-complete history of my troubles with this particular vehicle, so I didn't want to leave today's fun out :)
23:43 hoelzro raydiak: you know, some people just keep a logbook in the glove compartment =)
23:45 raydiak true true.  but it's not intentional...or at least it didn't start out that way, it started with me whining, and somehow feels like I should keep the ball rolling on this epic saga now that I'm aware that I've started it :)
23:47 raydiak we all have our little traditions...I guess telling brilliant people across the world when my car breaks has emerged as one of mine
23:49 llfourn joined #perl6
23:51 nebuchadnezzar joined #perl6
23:53 geekosaur well trained by twitter? >.>
23:53 hoelzro hahah
23:55 hoelzro m: sleep 60
23:55 camelia rakudo-moar c2a57e: OUTPUT«(timeout)»
23:56 hoelzro camelia doesn't run on hack.p6.org, does she?
23:59 timotimo iirc nine hosts her
23:59 timotimo you can whois her to find out for sure

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

Perl 6 | Reference Documentation | Rakudo