Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2015-03-10

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:09 davido__ joined #perl6
00:11 skids joined #perl6
00:15 vendethiel joined #perl6
00:21 tinyblak joined #perl6
00:32 spider-mario joined #perl6
00:33 spider-mario_ joined #perl6
00:40 Ben_Goldberg joined #perl6
00:42 atweiden joined #perl6
00:56 dayangkun joined #perl6
00:58 spider-mario joined #perl6
01:04 vendethiel joined #perl6
01:12 laouji joined #perl6
01:13 bolangi joined #perl6
01:22 zacts joined #perl6
01:34 spider-mario joined #perl6
01:35 Mouq RT #120506 and RT #121804 are both closable if anyone wants to pick them up (jnthn++ for fixing these)
01:35 synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=120506
01:35 Mouq #121804
01:35 synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=121804
01:35 Mouq *with/if tests exist, that is
01:50 spider-mario joined #perl6
02:13 japhb [Tux]: What is producing the "Bug summary" in http://tux.nl/Files/20150309084206.png ?
02:22 chenryn joined #perl6
02:46 ilbot3 joined #perl6
02:46 Topic for #perl6 is now »ö« Welcome to Perl 6! | http://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: http://irc.perl6.org | UTF-8 is our friend! | feather will shut down permanently on 2015-03-31
02:51 vendethiel joined #perl6
03:08 kaleem joined #perl6
03:17 yeahnoob joined #perl6
03:25 noganex joined #perl6
03:28 raiph joined #perl6
03:31 colomon joined #perl6
03:41 yeahnoob_ joined #perl6
03:52 yeahnoob__ joined #perl6
04:04 dalek roast: 5f5f5fb | Mouq++ | S09-typed-arrays/arrays.t:
04:04 dalek roast: Add tests for #120506
04:04 dalek roast: review: https://github.com/perl6/roast/commit/5f5f5fbb26
04:04 dalek roast: df6e66b | Mouq++ | S09-typed-arrays/arrays.t:
04:04 dalek roast: Add test for RT #121804
04:04 synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=120506
04:04 synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=121804
04:04 dalek roast: review: https://github.com/perl6/roast/commit/df6e66b70c
04:48 laouji joined #perl6
04:51 aborazmeh joined #perl6
04:51 aborazmeh joined #perl6
04:56 itz joined #perl6
05:09 chenryn joined #perl6
05:32 yeahnoob joined #perl6
05:41 aborazmeh joined #perl6
05:41 aborazmeh joined #perl6
05:58 mr-foobar joined #perl6
06:00 yeahnoob joined #perl6
06:03 diana_olhovik_ joined #perl6
06:12 tinyblak joined #perl6
06:24 tinyblak joined #perl6
07:04 rhr joined #perl6
07:06 diana_olhovik_ joined #perl6
07:09 xinming joined #perl6
07:09 prime joined #perl6
07:10 [Tux] japhb, http://www.xs4all.nl/~hmbrand/bugs.pl
07:10 [Tux] good morning btw
07:11 [Tux] nine_, I'll have a look at I::P5's IO
07:11 fhelmberger joined #perl6
07:17 xinming joined #perl6
07:19 rindolf joined #perl6
07:19 ggoebel joined #perl6
07:22 [Tux] No such method 'getline' for invocant of type 'IO::Handle'
07:25 nine_ [Tux]: I just replied to your comment
07:26 salva joined #perl6
07:26 [Tux] the getline is from Text::CSV_XS BTW, not the one from perl itself
07:27 [Tux] but there will be fun inside, as Text::CSV_XS' getline will invoke perl's IO getline from XS
07:28 [Tux] and I now also realize that I have to set no-chomp in perl6
07:30 fhelmberger joined #perl6
07:33 darutoko joined #perl6
07:34 breinbaas joined #perl6
07:34 nine_ |Tux|: I guess, if we can make it work for Text::CSV_XS, we already cover most use cases :)
07:34 [Tux] likely :)
07:36 rurban joined #perl6
07:36 fhelmberger joined #perl6
07:43 laouji joined #perl6
07:44 Rounin joined #perl6
07:46 Ven joined #perl6
07:49 sergot morning #perl6
07:52 Ven joined #perl6
07:54 fhelmberger joined #perl6
07:54 FROGGS joined #perl6
07:58 fhelmberger joined #perl6
07:58 rhr joined #perl6
07:59 moritz \o sergot, *
07:59 espadrine_ joined #perl6
08:00 Ven joined #perl6
08:01 fhelmberger joined #perl6
08:06 fhelmberger joined #perl6
08:07 raydiak o/
08:07 fhelmberger joined #perl6
08:11 Ven joined #perl6
08:11 zakharyas joined #perl6
08:11 fhelmberger joined #perl6
08:14 wicope joined #perl6
08:15 fhelmberger joined #perl6
08:18 FROGGS o/
08:18 fhelmberger joined #perl6
08:18 raydiak moritz: would it be possible to install lua 5.1 or jit on whichever server instance runs the smoker and cpandatesters?
08:19 raydiak g'morning FROGGS
08:19 FROGGS raydiak: cpandatesters happens at user boxes
08:20 FROGGS I mean, the reports are generated by users
08:20 raydiak ah, I see
08:21 moritz raydiak: I've installed lua 5.1 on hack, where colomon++ runs the smoke tests (iirc)
08:21 FROGGS correct
08:21 raydiak thank you kindly
08:21 moritz raydiak: or should I install luajit?
08:21 FROGGS raydiak: what modules will these packages aid?
08:21 moritz lua5.1 - Simple, extensible, embeddable programming language
08:21 moritz luajit - Just in time compiler for Lua programming language version 5.1
08:22 fhelmberger joined #perl6
08:22 raydiak FROGGS: Inline::Lua
08:22 raydiak moritz: probably 5.1 will be more common for users if I had to guess
08:22 raydiak it'll autodetect
08:25 raydiak jit is checked for first, since it's insane fast and completely compatible, more or less
08:25 FROGGS $ tail -n1 dev/nqp/install/languages/perl6/site/p​anda/reports.2015.2.250.gd.2.a.17.d.1
08:25 FROGGS Inline::Luaraydiak*TrueTruemoar
08:25 moritz :-)
08:25 FROGGS (after: sudo apt-get install lua5.1)
08:26 FROGGS the "True True" means that build passed and tests passed
08:26 moritz \o/
08:26 FROGGS on my box :o9
08:26 FROGGS :o)
08:27 raydiak yeah I saw a report of yours in there...the green stood out against all the red :)
08:30 raydiak almost forgot the FROGGS++
08:30 masak good morning, #perl6
08:30 raydiak \o masak
08:32 FROGGS *g*
08:32 FROGGS morning masak
08:33 yakudza joined #perl6
08:33 chenryn joined #perl6
08:35 [Sno] joined #perl6
08:36 telex joined #perl6
08:39 smls joined #perl6
08:40 ab5tract good morning all :)
08:40 FROGGS hi ab5tract
08:40 Ven hi!
08:40 yoleaux 9 Mar 2015 19:00Z <eli-se> Ven: I don't like it. :(
08:41 Ven well, too bad
08:41 donaldh joined #perl6
08:41 ab5tract okay, so i am _only_ just beginning to feel like i grok Whatever
08:41 nwc10 good UGT, *
08:42 ab5tract hi nwc10 :)
08:42 ab5tract so for some reason i had an expectation that
08:43 ab5tract m: my $x = 4; $y = "5ive"; my @can_round = ($x,$y).map: *.round;
08:43 camelia rakudo-moar e39570: OUTPUT«5===SORRY!5=== Error while compiling /tmp/kf6HRhYoPr␤Variable '$y' is not declared␤at /tmp/kf6HRhYoPr:1␤------> 3my $x = 4; $y7⏏5 = "5ive"; my @can_round = ($x,$y).map: ␤    expecting any of:␤        postfix␤»
08:43 ab5tract i was expecting that to behave as a grep for some reason
08:43 moritz well, use grep if you want grep :-)
08:43 FROGGS o/ Ven, nwc10
08:44 ab5tract ie, returning all the rounded values that _can_ round
08:44 ab5tract moritz: unfortunately grep isn't doing what i would expect either in this case :)
08:44 ab5tract m: my $x = 4; $y = "5ive"; my @can_round = ($x,$y).grep: *.round;
08:44 camelia rakudo-moar e39570: OUTPUT«5===SORRY!5=== Error while compiling /tmp/TdmjTHHaGq␤Variable '$y' is not declared␤at /tmp/TdmjTHHaGq:1␤------> 3my $x = 4; $y7⏏5 = "5ive"; my @can_round = ($x,$y).grep:␤    expecting any of:␤        postfix␤»
08:44 FROGGS m: my $x = 4; $y = "5ive"; my @can_round = ($x,$y).map: *.?round;
08:44 camelia rakudo-moar e39570: OUTPUT«5===SORRY!5=== Error while compiling /tmp/bDdu63lLLa␤Variable '$y' is not declared␤at /tmp/bDdu63lLLa:1␤------> 3my $x = 4; $y7⏏5 = "5ive"; my @can_round = ($x,$y).map: ␤    expecting any of:␤        postfix␤»
08:44 lizmat good *, #perl6!
08:44 moritz ab5tract: what do you *want* to do?
08:44 FROGGS m: my $x = 4; my $y = "5ive"; my @can_round = ($x,$y).map: *.?round;
08:44 camelia rakudo-moar e39570: OUTPUT«Cannot convert string to number: trailing characters after number in '5i⏏ve' (indicated by ⏏)␤  in method <anon> at src/gen/m-CORE.setting:15245␤  in any find_method_fallback at src/gen/m-Metamodel.nqp:2904␤  in any find_method at src/gen/m-Metam…»
08:44 ab5tract moritz: no this is not so much about my wants. it is about my expectations
08:44 FROGGS ohh, that one
08:44 laouji joined #perl6
08:44 FROGGS morning lizmat
08:44 ab5tract m: my $x = 4; $y = "5ive"; my @can_round = ($x,$y).grep: * ~~ Numeric && *.round;
08:45 camelia rakudo-moar e39570: OUTPUT«5===SORRY!5=== Error while compiling /tmp/8vYr6mszoc␤Variable '$y' is not declared␤at /tmp/8vYr6mszoc:1␤------> 3my $x = 4; $y7⏏5 = "5ive"; my @can_round = ($x,$y).grep:␤    expecting any of:␤        postfix␤»
08:45 FROGGS ab5tract: declare $y
08:45 FROGGS m: my $x = 4; my $y = "5ive"; my @can_round = ($x,$y).map: try *.round;
08:45 camelia rakudo-moar e39570: OUTPUT«Cannot convert string to number: trailing characters after number in '5i⏏ve' (indicated by ⏏)␤  in method <anon> at src/gen/m-CORE.setting:15245␤  in any find_method_fallback at src/gen/m-Metamodel.nqp:2904␤  in any find_method at src/gen/m-Metam…»
08:45 FROGGS gah
08:45 ab5tract m: my $x = 4; my $y = "5ive"; my @can_round = ($x,$y).grep: * ~~ Numeric && *.round;
08:45 camelia rakudo-moar e39570: ( no output )
08:45 lizmat m: <a b>.Bag.BIND-KEY("a", my $b)    # where does this error come from ???
08:45 camelia rakudo-moar e39570: OUTPUT«Unhandled exception: postcircumfix:<{ }> binding not defined for type Bag␤   at <unknown>:1  (/home/camelia/rakudo-inst-1/languages/perl6/r​untime/CORE.setting.moarvm:throw:4294967295)␤ from src/gen/m-CORE.setting:15249  (/home/camelia/rakudo-inst-1/lan…»
08:45 ab5tract right, okay. please don't take this as a criticism or even a WAT
08:46 ab5tract just saying out loud that i thought that * had slightly more magical properties than it does
08:46 ab5tract m: my $x = 4; my $y = "5ive"; my @can_round = ($x,$y).grep: *.round; @can_round.say;
08:46 camelia rakudo-moar e39570: OUTPUT«Cannot convert string to number: trailing characters after number in '5i⏏ve' (indicated by ⏏)␤  in method <anon> at src/gen/m-CORE.setting:15245␤  in any find_method_fallback at src/gen/m-Metamodel.nqp:2904␤  in any find_method at src/gen/m-Metam…»
08:47 ab5tract that's an intentionally tortured string value in $y
08:47 ab5tract m: my $x = 4; my $y = "give"; my @can_round = ($x,$y).grep: *.round; @can_round.say;
08:47 camelia rakudo-moar e39570: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '⏏give' (indicated by ⏏)␤  in method <anon> at src/gen/m-CORE.setting:15245␤  in any find_method_fallback at src/gen/m-Metamodel.nqp:2904␤  in any find_method …»
08:47 FROGGS lizmat: what is in your src/gen/m-CORE.setting:15249 ?
08:47 FROGGS ab5tract: you can also try in /privmsg with camelia
08:47 lizmat FROGGS: method sink() is hidden_from_backtrace {
08:48 lizmat (in class Failure)
08:48 FROGGS ahh
08:48 FROGGS gimme a sec
08:48 lizmat from there it goes deep into nqp land
08:48 laouji joined #perl6
08:49 ab5tract FROGGS: in these cases i was trying to point something out, but fair point.
08:49 FROGGS ab5tract: at some noise level nobody will listen anymore :o)
08:49 lizmat the reason I'm asking is that I added BIND-KEY methods for Set/Bag/Mix(Hash), but they're not getting called
08:49 FROGGS hmmm
08:50 moritz m: say (4, 'not a number').grep: { try $_ == .round }
08:50 camelia rakudo-moar e39570: OUTPUT«4␤»
08:50 lizmat if this is intentional, then I'll remove the BIND-KEY methods
08:50 lizmat if not, then why aren't they being called?
08:50 ab5tract moritz: very nicely demonstrated, thank you
08:51 FROGGS lizmat:     # alas, we cannot bind
08:51 FROGGS multi method BIND-KEY(Baggy:D: \k) is hidden_from_backtrace {
08:51 FROGGS fail X::Bind.new(target => self.^name);
08:51 ab5tract but partly my struggle here is that i am back to not really grokking the main advantages of * over $_
08:52 lizmat FROGGS: but that method is not getting called, I get an X::AdHoc exception
08:52 moritz ab5tract: it's just a short way to write some common things
08:52 lizmat m: my $f = <a b>.Bag.BIND-KEY("a", my $b); say $f.exception.WHAT
08:52 camelia rakudo-moar e39570: OUTPUT«(X::AdHoc)␤»
08:52 raydiak src/core/Any L577 ?
08:53 raydiak fail "postcircumfix:<\{ \}> binding not defined for type {self.WHAT.perl}";
08:53 lizmat hmmm....
08:53 lizmat how did I miss that?
08:53 raydiak did you escape it when you grepped? the  { } I mean
08:53 * lizmat gets another cuppa
08:54 ab5tract moritz: so the main advantage is `@l.map: *.upgrade` vs `@l.map: { $_.upgrade }`, along with the `1,2, * + *, ... *` stuff
08:54 ab5tract (and along with other things, obviously)
08:55 lizmat FROGGS raydiak : thanks for the sanity check, I'll take it from here again
08:55 raydiak yw lizmat++
08:55 yeahnoob_ joined #perl6
08:57 Akagi201 joined #perl6
08:57 virtualsue joined #perl6
09:03 virtualsue_ joined #perl6
09:05 raydiak good night #perl6
09:05 FROGGS gnight raydiak
09:06 lizmat gnigh raydiak
09:08 dalek rakudo/nom: de37ea2 | lizmat++ | src/core/ (3 files):
09:08 dalek rakudo/nom: Get BIND-KEY signatures right, FROGGS++ raydiak++
09:08 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/de37ea264e
09:10 dalek rakudo/nom: e572fca | lizmat++ | t/01-sanity/22-KEY.t:
09:10 dalek rakudo/nom: Unfudge BIND-KEY tests
09:10 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/e572fcaa46
09:12 smls m: say Str(Int:D)
09:12 camelia rakudo-moar e39570: OUTPUT«(Str(Int))␤»
09:12 smls ^^ So typespecs are allowed anywhere in term position?
09:12 smls Not just in signatures?
09:12 dalek rakudo/nom: 1fa2c20 | lizmat++ | t/01-sanity/22-KEY.t:
09:12 dalek rakudo/nom: Fix comments
09:12 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/1fa2c20cd2
09:13 masak another potential advantage of 007 that hasn't been highlighted so far: we can make silly mistakes and put crazy features in it, and we'll learn important lessons without impacting Perl 6 macros/slangs in a negative way.
09:13 moritz smls: yes, coercion types are first-class
09:13 masak (the custom-ops branch is coming along fine, albeit slowly, btw)
09:14 smls moritz: Is the :D ignored, or just not handled by .gist ?
09:15 moritz smls: ignored atm
09:15 abraxxa joined #perl6
09:16 smls m: say Str( Int )
09:16 camelia rakudo-moar e39570: OUTPUT«(Str(Int))␤»
09:16 smls Hm should spaces really be allowed there?
09:16 ab5tract smls: inside of the parens?
09:16 smls if the whole thing acts like a single "typename" token
09:16 ab5tract i would hope so
09:16 smls yeah
09:16 ab5tract ah
09:17 smls spaces just make it look like a function call
09:17 ab5tract indeed
09:18 laouji_ joined #perl6
09:19 cschwenz joined #perl6
09:20 cschwenz left #perl6
09:22 smls Especially since LTM seems to be all that distinguishes it from a function call
09:22 smls So it really is a "token" conceptually, and should be space free
09:23 smls (Seeing how TimToady just forbid spaces inside operators...)
09:26 dakkar joined #perl6
09:27 vike joined #perl6
09:29 lizmat afk for a few hours&
09:29 kjs_ joined #perl6
09:37 dalek nqp: a918d58 | donaldh++ | t/nqp/59-nqpop.t:
09:37 dalek nqp: Fix typo in rindex test case.
09:37 dalek nqp: review: https://github.com/perl6/nqp/commit/a918d585b2
09:48 laouji joined #perl6
09:52 espadrine_ joined #perl6
09:59 fhelmberger joined #perl6
10:13 FROGGS jnthn: the 'is rw' on native types does not involve strings, right?
10:14 dalek rakudo/nom: f83c813 | FROGGS++ | t/04-nativecall/14-rw-attrs. (2 files):
10:14 dalek rakudo/nom: add tests for 'is rw'-attrs in CStructs
10:14 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/f83c8134a4
10:20 [Sno] joined #perl6
10:25 FROGGS jnthn++ # 'is rw' in CStructs is damn awesome and lets me delete a lot of lines :o)
10:30 Ugator joined #perl6
10:33 laouji joined #perl6
10:33 xinming joined #perl6
10:35 colomon joined #perl6
10:40 donaldh FROGGS++ # 'is rw' is indeed awesome for NativeCall
10:43 FROGGS why do I get karma?
10:43 FROGGS it lets me rewrite a CStruct like this: https://gist.github.com/FR​OGGS/2148e2b9f241e106963a
10:43 FROGGS top = old, bottom = new
10:43 * donaldh originally prototyped using 'is rw' for out params. The current pattern is CArray[OpaquePointer] is clumsy by comparison.
10:44 FROGGS ohh, I am talking about attributes here
10:44 donaldh Yep, I realise that. More pervasive use of 'is rw' would be awesome.
10:45 FROGGS 'is rw' on parameters is still in the native-ref branch I think
10:46 FROGGS though, Pointer[int32] should also be a better solution to CArray[OpaquePointer]...
10:46 FROGGS but that means you have to wrap your value explicitly
10:48 donaldh Well SQLite3 passes back a void* in e.g. sqlite3_open(Str $filename, CArray[OpaquePointer] $handle)
10:48 donaldh sqlite3_open(Str $filename, OpaquePointer $handle is rw) # would be nicer
10:50 Ven joined #perl6
10:50 FROGGS true
10:50 FROGGS but you can use the type Pointer instead
10:51 laouji_ joined #perl6
10:51 donaldh What's the difference between the two?
10:52 FROGGS they are identical... but OpaquePointer will be deprecated soon
10:52 donaldh ah, okay
10:52 FROGGS we needed a short name because Pointer can now be typed, like CArray
10:52 FROGGS so you can even write Pointer[void] if you want to be verbose
10:53 FROGGS or Pointer[MyStruct], if you want to be able to call $ptr.deref
10:54 ribasushi joined #perl6
10:55 donaldh nice
10:59 arnsholt There's no point to Pointer[void], is there?
10:59 arnsholt That's just an OpaquePointer
11:00 larion joined #perl6
11:01 arnsholt Oh, but if you deprecate OpaquePointer entirely, I guess there is =)
11:06 nwc10 where's our drive-by travis bot for the main Rakudo tests?
11:06 nwc10 t/01-sanity/22-KEY.t fails :-(
11:06 vendethiel joined #perl6
11:06 kaleem joined #perl6
11:11 masak nwc10: on which platform?
11:16 masak reproduced here, on Moar.
11:17 masak throws_like { $mh.BIND-KEY("a",$a) }, X::Bind,:target<MixHash>,"\$mh.BIND-KEY"; # the failing test
11:18 masak m: my $a = 42.5; my $mh = <a b b c c c>.BagHash; $mh.BIND-KEY("a",$a)
11:18 camelia rakudo-moar f83c81: OUTPUT«Unhandled exception: Cannot bind to BagHash␤   at <unknown>:1  (/home/camelia/rakudo-inst-1/languages/perl6/r​untime/CORE.setting.moarvm:throw:4294967295)␤ from src/gen/m-CORE.setting:15249  (/home/camelia/rakudo-inst-1/lan​guages/perl6/runtime/CORE.sett…»
11:18 masak m: my $a = 42.5; my $mh = <a b b c c c>.MixHash; $mh.BIND-KEY("a",$a)
11:18 camelia rakudo-moar f83c81: OUTPUT«Unhandled exception: Cannot bind to MixHash␤   at <unknown>:1  (/home/camelia/rakudo-inst-1/languages/perl6/r​untime/CORE.setting.moarvm:throw:4294967295)␤ from src/gen/m-CORE.setting:15249  (/home/camelia/rakudo-inst-1/lan​guages/perl6/runtime/CORE.sett…»
11:18 masak m: my $a = 42.5; my $mh = <a b b c c c>.MixHash; try $mh.BIND-KEY("a",$a); say $/.^name
11:18 camelia rakudo-moar f83c81: OUTPUT«Cannot bind to MixHash␤  in block <unit> at /tmp/e9Sw0r42Xb:1␤␤»
11:19 nwc10 failed for me on x86_64 linux and PPC linux
11:19 masak m: my $a = 42.5; my $mh = <a b b c c c>.MixHash; try $mh.BIND-KEY("a",$a); say $!.^name
11:19 camelia rakudo-moar f83c81: OUTPUT«Cannot bind to MixHash␤  in block <unit> at /tmp/IFjGfulfou:1␤␤»
11:19 nwc10 but the former is more interesting.
11:19 dalek rakudo/nom: dcd7ee0 | (Carl Masak)++ | t/01-sanity/22-KEY.t:
11:19 dalek rakudo/nom: fix copy+paste-o
11:19 dalek rakudo/nom:
11:19 dalek rakudo/nom: Unbusts a failing test.
11:19 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/dcd7ee01f1
11:20 masak I didn't research it all the way down, but looking at the code it's pretty clear to me that was the problem.
11:20 nwc10 masak++ fixed
11:26 bartolin donaldh: would you mind if I close those RT tickets you fixed recently? looks like you didn't get the right to close tickets yet?
11:27 masak today's autopun spotting: https://twitter.com/_youhadone​job/status/574320771574689792
11:27 laouji joined #perl6
11:32 donaldh bartolin:  please go ahead
11:32 xinming joined #perl6
11:33 bartolin donaldh++ for fixing those JVM issues
11:33 dalek doc: e721247 | moritz++ | lib/Language/objects.pod:
11:33 dalek doc: Example for submethod BUILD
11:33 dalek doc: review: https://github.com/perl6/doc/commit/e721247251
11:34 Ugator nwc10: you know your way around in aix-systems?
11:34 yoleaux 7 Mar 2015 19:37Z <nwc10> Ugator: I have built it on IBM hardware, yes, but the machine is running Fedora (ie Linux)
11:34 yoleaux 7 Mar 2015 19:39Z <nwc10> Ugator: I have tried building it on AIX. IIRC one or two of the dependecy libraries are a pain (not libuv). I don't think that dyncall supports AIX. IIRC libffi does - unless you know PPC assembler, I'd guess that the route of least resistance is actually to abstract the dynamic call stuff to be able to use dyncall or libffi. I think that would get us most of HP/UX too.
11:34 yoleaux 7 Mar 2015 19:40Z <nwc10> Ugator: also, IIRC, the MoarVM build system annoyingly picks the GNU make specific Makefile, instead of the most generic "embedding" makefile
11:34 Ugator ah :-) thanks @yoleaux
11:34 Ugator and nwc ;)
11:34 nwc10 Ugator: no better than any other big iron Unix
11:37 Ugator so you had no luck on aix yet?
11:37 Ugator I dont really understand what you said there :D
11:39 lizmat masak++ indeed, sorry for the pasto
11:40 masak no sweat.
11:40 kaleem joined #perl6
11:45 nwc10 Ugator: "no luck" might not be an accurate phrase
11:45 nwc10 I tried. I figured out roughly what needs to be done. It's possible, but not trivial.
11:46 dalek roast: b9c0463 | usev6++ | S32-exceptions/misc.t:
11:46 dalek roast: Unfudge test for RT #121935
11:46 dalek roast: review: https://github.com/perl6/roast/commit/b9c046368d
11:46 synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=121935
11:46 cschwenz joined #perl6
11:48 Ugator nwc: okay, thanks :) I hope someday someone can help you
11:50 lizmat FROGGS: t/04-nativecall/14-rw-attrs.t (Wstat: 512 Tests: 16 Failed: 2)
11:50 lizmat Failed tests:  14, 16
11:57 dalek rakudo/nom: dc6756e | lizmat++ | src/core/ (3 files):
11:57 dalek rakudo/nom: More generally fix disallowed binding fail
11:57 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/dc6756e7cc
12:04 tinyblak joined #perl6
12:12 chenryn joined #perl6
12:16 dalek rakudo/nom: 0c5a0fa | lizmat++ | src/core/Baggy.pm:
12:16 dalek rakudo/nom: Remove superfluous ASSIGN-KEY candidate
12:16 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/0c5a0fabfe
12:20 TimToady eating lunch in LHR
12:21 chenryn joined #perl6
12:22 vendethiel joined #perl6
12:24 * lizmat sends an EU welcome
12:24 lizmat (while it's still possible to do so when at LHR ;-)
12:25 TimToady name service seems to suck, but fortunately my irssi server is numeric IP address :)
12:28 FROGGS lizmat: can I get a detailed gist?
12:29 lizmat https://gist.github.com/li​zmat/62d85c9f5a5d9910346d
12:30 FROGGS ahh very interesting
12:30 nwc10 TimToady: you mean they haven't grafittied 8.8.8.8 there yet?
12:30 tadzik FROGGS: http://i.imgur.com/fNEy5Wd.gif
12:31 FROGGS *g*
12:31 cschwenz joined #perl6
12:31 dalek rakudo/nom: 5d1eb39 | lizmat++ | src/core/Nil.pm:
12:31 dalek rakudo/nom: Bring Nil.BIND-KEY(...) in line
12:31 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/5d1eb39a13
12:33 FROGGS lizmat: duh, I made a stupid mistake
12:35 dalek rakudo/nom: f8002f3 | FROGGS++ | t/04-nativecall/14-rw-attrs.c:
12:35 dalek rakudo/nom: fix copy+pasto, lizmat++
12:35 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/f8002f3e7b
12:37 lizmat tests clean now, FROGGS++
12:39 dalek roast: 62ca417 | usev6++ | S14-roles/basic.t:
12:39 dalek roast: Add test for RT #123002
12:39 dalek roast: review: https://github.com/perl6/roast/commit/62ca417fa2
12:39 synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=123002
12:44 FROGGS awesome
12:45 FROGGS bartolin++ # for pervasive awesomeness
12:46 moritz indeed, bartolin++
12:46 Ven http://puu.sh/guo9P/cabb324b9a.png and this is why you want your arrays to be first class :D
12:46 FROGGS hehe
12:47 psch o.o
12:47 moritz tell me this isn't true
12:47 psch but... varargs...?
12:47 FROGGS that's sooo stupid
12:47 Ven psch: varargs? with arrays?
12:47 psch sure
12:47 Ven psch: mind showing me? :)
12:47 * psch prepares to pull his foot out of his mouth
12:49 masak I'm pretty sure that code is from before Java had varargs.
12:49 coffee` joined #perl6
12:50 Ven masak: it might be, yes, but even then -- java arrays are goddamn awful
12:50 * moritz learned a bit java 1.4
12:50 masak Ven: no argument there.
12:50 psch Ven: https://gist.github.com/pe​schwa/18a71ad844937594ec12
12:50 psch i do also agree
12:50 masak Ven: a lot of those decisions seem to be based on misguided tradeoffs for performance.
12:50 psch especially native arrays vs reference arrays
12:51 masak Ven: or tradeoffs that made sense in the 90s, but not so much anymore.
12:51 chenryn joined #perl6
12:53 virtualsue joined #perl6
12:53 Ven masak: right ;-). so many languages were created in the 90s without that kind of crazy tradeoffs, though!
12:53 Ven you might argue they sacrificed speed at time time...
12:53 Ven that* time
12:53 masak Smalltalk comes to mind.
12:57 psch Ven: so how far did i miss the point, ooc?
12:57 psch assuming it's not just "the code is older than varargs"
12:58 Ven psch: that sounds about right :-)
12:58 Ven psch: the code is *really* old
12:59 Ven masak: smalltalk is really interesting, though :P
13:00 masak Ven: it is. it's one of the philosophically pure/considered ones, like Lisp or Forth.
13:00 Ven masak: not really
13:00 Ven Self would be, in this case.
13:00 masak I stand by my point.
13:00 masak Ven: have you read http://worrydream.com/EarlyHistoryOfSmalltalk/ ?
13:01 masak (Self is interesting too, though. all on its own)
13:02 Ven masak: I'll read it
13:02 masak warning: big read.
13:02 masak but worth it.
13:02 Ven masak: I've read alan kay say that self was more "philophisically pure" than smalltalk from his pov
13:02 masak ok.
13:02 Ven oh, then I might not have the time right now
13:02 * Ven goes back to his php and java...
13:03 vendethiel joined #perl6
13:04 abraxxa poor Ven!
13:04 * masak .oO( is Ven working on PHP and vendethiel on Java, or the other way around? )
13:04 Ven masak: considering how much vendethiel is disconnecting, he might not be working a lot.... ;)
13:04 masak :)
13:05 Ven .oO( I wonder how much fun is my computer having, without me, at home ... )
13:05 dalek ecosystem: 63636bb | (Andrew Egeler)++ | META.list:
13:05 dalek ecosystem: Add Auth::SAML2
13:05 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/63636bba4a
13:05 masak abraxxa: on the serious side, as much as I prefer Perl, working on PHP or Java could still be OK depending on the project, the code, and the organization.
13:05 Ven masak: it wouldn't be for me, tbh ;-)
13:05 Ven It's just that - heh - school!
13:07 coffee` joined #perl6
13:13 * TimToady -> gate
13:13 masak m: class TimToady {}; my @gate; TimToady ==> @gate; say @gate
13:13 camelia rakudo-moar f8002f: OUTPUT«(TimToady)␤»
13:13 masak \o/
13:14 masak the (TimToady) is in the @gate! :D
13:17 Ven .oO( the bloody TIMTOWDIGate )
13:17 DrForr Bucharest then over here to Cluj, I think?
13:18 * masak has no cluj
13:20 bowtie joined #perl6
13:22 lizmat DrForr: I was under the impression that TimToady was going to stay for a few days in Bucharest, either on the way in or on the way out
13:22 lizmat jnthn FROGGS moritz: what is the reason for having an ASSIGN-KEY, *and* an AT-KEY is rw ?
13:23 lizmat is that because not all assignments to {} are going through ASSIGN-KEY ?
13:23 FROGGS I have no idea
13:24 * lizmat neither
13:24 moritz lizmat: I know that at_key rw was before we had assign_key
13:24 FROGGS my guess would be that at_key was not rw at some point...
13:24 FROGGS ohh, heh
13:24 moritz and was obviously necessary
13:24 DrForr Yeah, Gloria was arranging for him to go to Bucharest, then he got to talking with Amalia/Liana and added Cluj to his itinerary.
13:25 moritz no idea if it's still necessary
13:25 brrt joined #perl6
13:26 moritz lizmat: maybe for autovivification (*handwave*)
13:26 * moritz doesn't actually know how autoviv works
13:26 lizmat $!whence
13:26 moritz that's just an attribute
13:27 lizmat with a closure to be executed if set
13:29 lizmat m: my %h; my $b := %h<a>; say %h.perl; $b = 23; say %h.perl
13:29 camelia rakudo-moar f8002f: OUTPUT«().hash␤("a" => 23).hash␤»
13:29 ihabhussein joined #perl6
13:29 lizmat m: my $h; my $b := $h<a>; say $h.perl; $b = 23; say $h.perl  # works with Any values as well
13:29 camelia rakudo-moar f8002f: OUTPUT«Any␤{"a" => 23}␤»
13:30 lizmat that one is handled by:
13:30 lizmat multi method AT-KEY(Any:U \SELF: $key) is rw {
13:30 lizmat nqp::bindattr(my $v, Scalar, '$!whence',
13:30 lizmat -> { SELF.defined || (SELF = Hash.new);
13:30 lizmat SELF.BIND-KEY($key, $v) });
13:30 lizmat $v
13:30 lizmat }
13:30 lizmat note that it won't create the Hash until it is actually being assigned
13:31 lizmat the container to which an assignment is done, has a $!whence that is executed prior to doing the assignment
13:31 lizmat </autoviv lecture>
13:32 moritz so Scalar ahs the $!whence attribute
13:32 moritz not the hash
13:32 lizmat yup, and in this case it will create the hash if it doesn't exist yet
13:33 lizmat m: my $h; my $b := $h<a>; $h = 42; say $h.perl; $b = 23; say $h.perl # a spanner in the works
13:33 camelia rakudo-moar f8002f: OUTPUT«42␤42␤»
13:34 lizmat I think that should die, and not silently not do the assignment
13:35 moritz nastiness
13:37 lizmat yup
13:37 raiph joined #perl6
13:37 lizmat anyways, it feels that either ASSIGN-KEY should go, or AT-KEY should no longer be "is rw"
13:38 lizmat which would allow for some AT-KEY opts
13:40 dalek rakudo-star-daily: 544da94 | coke++ | log/ (9 files):
13:40 dalek rakudo-star-daily: today (automated commit)
13:40 dalek rakudo-star-daily: review: https://github.com/coke/rakudo​-star-daily/commit/544da946e5
13:40 dalek perl6-roast-data: b578440 | coke++ | / (9 files):
13:40 dalek perl6-roast-data: today (automated commit)
13:40 dalek perl6-roast-data: review: https://github.com/coke/perl6​-roast-data/commit/b578440ec7
13:42 [Coke] donaldh: what's your rt id?
13:42 yoleaux 9 Mar 2015 21:47Z <donaldh> [Coke]: There's a bunch of JVM tickets that could be closed but I don't have permissions
13:44 vendethiel joined #perl6
13:49 kaleem joined #perl6
13:51 [Coke] jvm still dying. (my bisect was questionable, need to rerun it.)
13:51 [Coke] moar and moar-jit now failing differently, but it's all in S17, so it might just be flappiness: -1 that those tests seem very sensitive to load.
13:53 nwc10 worked on "my" machine
13:54 [Coke] jvm? I'm getting 284 failures on hack.
13:54 psch nqp master/HEAD looks better, but still has a few spots that aren't working
13:54 nwc10 er, sorry, not clear, MoarVM
13:55 psch lizmat++ fixes most of that yesterday iirc
13:55 psch *fixed
13:55 nwc10 very not clear
13:55 psch to be clear: rakudo-j build against nqp HEAD has only a few spectest failures
13:55 [Coke] https://gist.github.com/coke/6818867903c2c6ae3116 shows the first test failure.
13:56 psch one of which is a SIGSEGV in S02-types/native.t, which i'm trying to get behind right now
13:56 [Coke] if there's a fix in nqp that wasn't required by rakudo, I'm not going to see it.
13:56 [Coke] and this is as of b8a4665
13:56 psch [Coke]: that one apparently used to compile but doesn't anymore - i'd skip instead of todo, because it's NYI anyway, but it's still some kind of regression i guess
13:57 * lizmat off to Amsterdam to see TheDamian: https://nluug.nl/events/20150310conway/index.html
13:57 [Coke] psch: ok, that's 1 out of 284. :(
13:57 [Coke] er, :)
13:58 psch [Coke]: i suppose we could bump NQP version.  iirc there was a bunch of TODOs passed and 3 or 4 test files that still had varying degrees of failures
13:58 psch i think jnthn++ wanted to look at what's behind the passing TODOs - something like 10 files or so, with about 25 tests passing in total?
14:00 [Coke] currently 48 test files failing. So that seems like an improvement.
14:00 psch so, yeah, i'd say have a look at spectest-j with nqp master/HEAD and then someone should decide if that's a better spot to be in than what we have with roast right now
14:00 psch [Coke]: the one you gisted stays failing, in any case
14:01 psch i remember that :)
14:08 xfix joined #perl6
14:09 MadcapJake joined #perl6
14:09 petercommand joined #perl6
14:10 petercommand joined #perl6
14:13 muraiki joined #perl6
14:30 donaldh [Coke]: my rt id is donaldh
14:31 donaldh bartolin++ has beaten me to closing JVM tickets.
14:32 cschwenz joined #perl6
14:34 cschwenz p6: say 3;
14:34 camelia rakudo-moar f8002f: OUTPUT«3␤»
14:35 |Tux| Can I overload object equality?
14:35 yoleaux 9 Mar 2015 20:49Z <nine_> |Tux|: I seem to remember you expressing interest in passing file handles to P5 code. https://github.com/niner/Inl​ine-Perl5/commit/c840b8d1bd may be of interest to you.
14:35 donaldh TimToady did bump NQP_REVISION to 2015.02-84-g27bc873
14:36 |Tux| class C { has Int $.i; has Str $.s; } ; my $c = C.new; $c == 1 and "OK NUM".say; $c eq "foo" and "OK Str".say;
14:36 |Tux| where eq matches against $.s and == matches against $.i
14:36 |Tux| (extremely simplified example)
14:37 moritz |Tux|: == will call method Num or Numeric, eq will call method Str
14:37 moritz m: class C { has Int $.i; has Str $.s; method Str() { $!s }}; say C.new(i => 5, s => 'flurb') eq 'flurb'
14:37 camelia rakudo-moar f8002f: OUTPUT«True␤»
14:37 |Tux| then I don't like what Text is_deeply does, as my class already has those methods
14:38 moritz is_deeply does structural comparison with eqv
14:38 moritz if that's not what you want, don't use is_deeply
14:38 moritz is() uses string comparison
14:38 * psch thought of infix:<===> when reading "object equality"
14:38 |Tux| is there an is_deeply that does == and eq?
14:38 moritz psch: me too, but thankfully |Tux| provided enough context :-)
14:38 psch and here i was hacking together an example that overwrites WHICH... :)
14:38 moritz |Tux|: if it did eq and/or ==, it wouldn't be deeply anymore
14:39 |Tux| so I have two options: 1. create an un-objected version of @c or 2. write my own is_deeply for this test
14:39 |Tux| (I did 1. already for now)
14:40 FROGGS m: class C { has Int $.i; has Str $.s; method Numeric { $.i // NaN }; method Str { $.s } } ; my $c = C.new( :i(1), :s<foo> ); $c == 1 and "OK NUM".say; $c eq "foo" and "OK Str".say;
14:40 camelia rakudo-moar f8002f: OUTPUT«OK NUM␤OK Str␤»
14:41 FROGGS |Tux|: why don't you use is()?
14:41 * |Tux| assumes class C cannot overload eqv :)
14:41 smls moritz: Why (other than historical reasons) does `is` use string comparison?
14:41 smls `eqv` would seem more appropriate in the context of Perl 6 imo
14:41 |Tux| because I have a liis of lists and expanding that to is won't work?
14:42 |Tux| does «is([[1,2],[3,4]],[[1,2],[3,4]],"text");» go deep?
14:43 |Tux| smls, is() now also knows about object type and undefinedness
14:44 moritz smls: because eqv is quite strict in its comparison
14:44 moritz smls: so much so that a list/array/parcel confusion often causes it not to pass, with no good explanation
14:45 smls Well, it could be made to print a good explanation... :P
14:46 moritz how?
14:46 FROGGS got Parcel but expected Array?
14:46 FROGGS I mean, it can print that when the type differs
14:46 moritz then it doesn't use eqv anymore
14:46 moritz eqv can be amended by user-supplied multis
14:47 moritz and doesn't have a channel for passing back any information besides a Bool
14:47 FROGGS ahh#
14:47 FROGGS -#
14:48 |Tux| oh wow, is() goes deep.
14:48 |Tux| assumption--
14:48 |Tux| I - having perl5 in mind - assumed it only allowed scalars
14:48 |Tux| </headdesk>
14:48 moritz it doesn't go deep, it simply stringifies
14:48 moritz m: say ~[1, 2]
14:48 camelia rakudo-moar f8002f: OUTPUT«1 2␤»
14:49 chenryn joined #perl6
14:50 smls if $a eqv $b {  #`[print "test passed" message] } else { #`[look at inputs to check for type differences etc; print "test not passed" message with useful info on what was different] }
14:50 FROGGS m: use Test; is '1 2', [1, 2], 'huh'
14:50 camelia rakudo-moar f8002f: OUTPUT«ok 1 - huh␤»
14:50 smls ^^ moritz
14:50 |Tux| m: my@a=[1,2];@a.push([@a,@a]);say ~@a
14:50 camelia rakudo-moar f8002f: OUTPUT«1 2 1 2 1 2␤»
14:50 moritz smls: not huh. Works as designed.
14:50 FROGGS gorram, use whitespace, it's there
14:51 |Tux| in my case I want is() nor is_deeply()
14:51 FROGGS moritz: are you talking to me? :o)
14:52 moritz FROGGS: erm, yes
14:53 FROGGS moritz: it is slightly surprising at a first glance, but of course makes sense
14:53 bjz joined #perl6
14:53 moritz it's not more surprising than eq returning True for those things
14:53 |Tux| a class cannot overload eqv, right?
14:54 moritz |Tux|: you can export an infix:<eqv>(YourClass $a, YourClass $b)
14:54 moritz a multi, that is
14:54 FROGGS |Tux|: you can add extra (more specific) candidates to all operators
14:54 |Tux| hmm, interesting
14:55 FROGGS the question is: does that make sense or do you want to just make your tests look shiny
14:55 FROGGS if it is just for these tests, the declare that extra op candidate in your test script
14:55 FROGGS then*
14:56 rmgk_ joined #perl6
14:57 |Tux| pondering. I don't know yet
14:57 * |Tux| finished implementing filters in CSV
14:57 |Tux| $csv.callbacks ("filter", &Filter);
14:58 |Tux| in which the filter function is to return true (accept record) or false (reject record)
14:59 |Tux| callbacks/hooks are easy in perl6 (compared to XS)
14:59 |Tux| next is to do rfc7111 and study about lazy lists
15:00 |Tux| col=1,4-7,19-* => (1,4..7,19..Inf)  should be safe in pelr6 :)
15:00 |Tux| and I can use that with any
15:02 njmurphy joined #perl6
15:02 gfldex joined #perl6
15:03 |Tux| is the current index available for @c in «for @c -> $c { ... }» ?
15:04 hoelzro |Tux|: I think there's a method that gives you that
15:04 PerlJam |Tux|: for @c.kv -> $i, $c { ... }
15:04 FROGGS right
15:05 hoelzro ah, thanks PerlJam
15:05 |Tux| also in «my @new = @c.grep($idx == any @range);
15:05 |Tux| »?
15:05 [Coke] donaldh++ is now a bugadmin. whee.
15:06 PerlJam |Tux|: you want the indexes in grep too?   there's currently grep-index  (though I hope it goes away for a more general mechanism)
15:06 * |Tux| looks up grep-index …
15:08 PerlJam oh, wait, maybe grep-index doesn't do what you want.
15:08 |Tux| looks like infinite loop (won't try m:) - my@range=(1,4..7,19..Inf);my@c=(^10).grep-index(any @range);
15:09 FROGGS m: my @a = <a b c d e f g h>; say @a.kv.pairup.grep(*.value eq 'd')
15:09 camelia rakudo-moar f8002f: OUTPUT«3 => d␤»
15:09 FROGGS PerlJam: that is more general
15:09 PerlJam yeah
15:09 raiph joined #perl6
15:09 FROGGS m: my @a = <a b c d e f g h>; say @a.kv.pairup.grep(*.value eq any <a d f>)
15:09 camelia rakudo-moar f8002f: OUTPUT«0 => a 3 => d 5 => f␤»
15:09 FROGGS m: my @a = <a b c d e f g h>; say @a.kv.pairup.grep(*.value eq any <a d f>)».key
15:09 camelia rakudo-moar f8002f: OUTPUT«0 3 5␤»
15:10 kaleem joined #perl6
15:10 PerlJam |Tux|: dont you just want a slice?
15:10 FROGGS m: say 1,4..7
15:10 camelia rakudo-moar f8002f: OUTPUT«14..7␤»
15:11 FROGGS m: say my @a = 1,4..7
15:11 camelia rakudo-moar f8002f: OUTPUT«1 4 5 6 7␤»
15:11 |Tux| no, @range might spec well outside of what I get from
15:11 FROGGS m: my @range := 1,4..7,19..Inf; my @c = (^10).grep-index(any @range);
15:12 camelia rakudo-moar f8002f: OUTPUT«(timeout)»
15:12 FROGGS hmmm
15:12 Ven joined #perl6
15:12 |Tux| m: my@range=(1,4..7,19..Inf);my@c=(^10).kv.pairup.grep({*.key == any @range})».key.perl.say;
15:12 camelia rakudo-moar f8002f: OUTPUT«(0, 1, 2, 3, 4, 5, 6, 7, 8, 9)␤»
15:12 FROGGS m: my @range := 1,4..7,19..Inf; my @c = @range.grep-index(any ^10);
15:12 moritz it tries to flatten the range
15:13 |Tux| I would have expected 1,4,5,6,7
15:13 * FROGGS goes back to work
15:13 camelia rakudo-moar f8002f: OUTPUT«(timeout)»
15:14 PerlJam m: my @range = (1,4..7,19..Inf); my @c = (^10)[@range]; say @c;
15:14 camelia rakudo-moar f8002f: OUTPUT«1 4 5 6 7␤»
15:14 |Tux| as said, I need more study-time on this
15:14 |Tux| PerlJam++
15:14 |Tux| WOW!
15:14 * |Tux| prepares to go to Damien in Amsterdam
15:15 Ven ha! :(
15:26 spider-mario joined #perl6
15:27 zoosha joined #perl6
15:42 mr-foobar joined #perl6
15:45 larion joined #perl6
15:48 b2gills FROGGS: instead of .kv.pairup just call .pairs
15:50 FROGGS ahh, makes sense
16:00 Ven m: sub trait_mod:<is>(&c, :$curried!) { my $arity = &c.arity; &c.wrap(-> |args { args.list.elems == $arity ?? callsame() !! &c.assuming(|args); }); }; sub foo($a, $b) is curried { say $a + $b; }; foo(3, 4); my $c = foo(5); $c(6);
16:00 camelia rakudo-moar f8002f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/CqAnyz9U98␤Calling 'foo' will never work with argument types (int)␤    Expected: :(Any $a, Any $b)␤at /tmp/CqAnyz9U98:1␤------> 3ed { say $a + $b; }; foo(3, 4); my $c = 7⏏5foo(5); $c(6);␤»
16:00 Ven if an "is" wraps a sub, then it probably shouldnt get checked :)
16:02 * masak can't decide who is right, Ven or Rakudo
16:02 masak probably Ven.
16:02 * masak submits rakudobug
16:02 Ven :D
16:02 masak Ven: it is seldom this close. congratulations.
16:02 Ven thanks, I guess
16:02 * psch agrees
16:03 psch m: sub trait_mod:<is>(&c, :$curried!) { my $arity = &c.arity; &c.wrap(-> |args { args.list.elems == $arity ?? callsame() !! &c.assuming(|args); }); }; my &foo = sub ($a, $b) is curried { say $a + $b; }; foo(3)(4) # seeing as this works
16:03 camelia rakudo-moar f8002f: OUTPUT«7␤»
16:03 PerlJam psch++
16:03 psch but then we can't rebind a normal sub declaration either
16:04 psch which i think was justified with "it would break optimisation"
16:07 psch having the distinction makes "sub foo { }" somewhat magical over "my &foo = sub { }", which is surprising, and with the bit of jnthn++'s FOSDEM talk that i watched yesterday even seems wrong, because "sub foo { }" is supposed to be just a lexical declaration (unless there was more that i missed)
16:07 masak sometimes I imagine we could find all these bugs by making clever use of a script that suggested combining two random features of Perl 6, to see if they behaved as expected.
16:08 masak this one would be from "compile-time args checking AND sub traits"
16:10 osfameron hehe
16:10 masak (props to anyone who writes such a script, with a sufficiently complete list of features, and a .pick(2) somewhere at the end)
16:10 osfameron growing problems through parse tree combinations...
16:10 osfameron you could then use that + GA to evolve arbitrary programs based on a test suite :D
16:10 * osfameron hand-waves
16:10 PerlJam grammar-as-generator
16:10 masak oh, I wasn't even suggesting generating code for finding the bug. just generating ideas.
16:11 masak (I did have the growing-code idea, too, though. there was a time when just generating random garbage would have rooted out some rakudobugs.)
16:14 * masak looks at the RT queue and smiles at seeing some new names
16:17 masak m: constant k = k
16:17 camelia rakudo-moar f8002f: OUTPUT«===SORRY!===␤Cannot invoke this object (REPR: Null, cs = 0)␤»
16:17 * masak *evil grin*
16:19 masak m: constant paradox = paradox # shoulda done it like this
16:19 camelia rakudo-moar f8002f: OUTPUT«===SORRY!===␤Cannot invoke this object (REPR: Null, cs = 0)␤»
16:20 PerlJam or ...
16:20 PerlJam m: constant dox = dox; # :-)
16:20 camelia rakudo-moar f8002f: OUTPUT«===SORRY!===␤Cannot invoke this object (REPR: Null, cs = 0)␤»
16:20 masak m: constant TURTLES = TURTLES # all the way down!
16:20 camelia rakudo-moar f8002f: OUTPUT«===SORRY!===␤Cannot invoke this object (REPR: Null, cs = 0)␤»
16:23 masak meanwhile, LinkedIn is saying things like "Maybe it's time now to jump on the bandwagon."
16:24 hkatz joined #perl6
16:25 hkatz Hey there can anyone help me with a question about perl6? I just started.
16:25 masak hkatz: welcome! please ask :)
16:25 hkatz Woo an irc channel that's active!
16:25 masak \o/
16:25 hkatz ok so I have a grammar and some tokens
16:25 masak active and kind! :)
16:25 hkatz and I can access the match object token with the following:
16:25 hkatz $match<token>
16:25 hkatz let's say that I have a variable for which token I want to access
16:26 hkatz how do I toll p6 to interpolate $token?
16:26 hkatz such as: $match<$token>
16:26 hkatz ^^doesn't work obviously
16:26 masak $match{$token}
16:26 masak just like in Perl 5.
16:26 hkatz thank you
16:26 hkatz wait
16:26 hkatz no I tried that first, it didn't work
16:26 masak .<> is for constant strings
16:26 masak .{} is for expressions
16:26 masak both do keyed lookup.
16:26 PerlJam hkatz: maybe put all of your code/input/whatever on a paste site somewhere (like gist.github.com) ?
16:26 masak what PerlJam said.
16:27 masak we can help you better if we see your code.
16:27 Ven joined #perl6
16:27 PerlJam yeah, Perl is all about context
16:27 PerlJam :)
16:27 hkatz https://gist.github.com/hj​katz/e3b8f79dbcf23e16cd81
16:27 hkatz there you go
16:27 hkatz basically messing aronud with subsets, grammars, and main
16:27 hkatz showing it off to coworkers :P
16:28 masak :)
16:28 hkatz given input: "https://google.com" "hostname"
16:28 PerlJam hkatz: maybe you should look at $match.perl
16:28 hkatz I receive "(Any)"
16:28 hkatz it's also (Any)
16:28 Ven { $_ ~~ /^TOP$/ | /^byte$/ | /^ip$/ | /^schema$/ | /^hostname$/ | /^port$/ | /^path$/ }
16:28 Ven I'd probably write
16:28 masak was gonna point to that line :)
16:28 Ven where <TOP byte ip schema hostname port path>
16:28 masak Ven: `where any <...>`
16:28 hkatz oh I can do that? neato
16:29 Ven isn't smart-matching enough?
16:29 masak no.
16:29 masak used to be.
16:29 Ven oh
16:29 masak but then we learned it's a bad idea to do that.
16:29 masak Perl 5 didn't learn that :/
16:29 masak they got psychoticmatch instead
16:29 hkatz now main complains its not matching
16:30 hkatz nvm I typed it wrong
16:30 hkatz still has the incorrect output from $match thougm
16:30 hkatz though*
16:30 telex joined #perl6
16:30 masak hkatz:
16:30 masak $ perl6 -e 'subset Foo of Str where any <A B C>; sub MAIN(Foo $f) { say $f }' A
16:30 masak A
16:30 masak $ perl6 -e 'subset Foo of Str where any <A B C>; sub MAIN(Foo $f) { say $f }' D
16:30 masak (usage message)
16:31 masak hkatz: so, works here.
16:31 hkatz masak, that works
16:31 perl6_newbee joined #perl6
16:31 masak hkatz: forgot the `any`? :)
16:31 hkatz ya
16:31 masak yeah, don't listen to Ven :P
16:31 Ven :(
16:31 masak Ven: sorry.
16:31 * masak hugs Ven
16:31 Ven it's me!
16:31 hkatz ok, so $match.perl prints "Any"
16:31 * Ven hugs masak
16:31 hkatz and $match{$token} prints "(Any)"
16:31 masak hkatz: maybe it didn't match?
16:31 hkatz i would expect a regex output
16:31 PerlJam hkatz: anyhow ...   you're input doesn't match your grammar.  Your grammar requires a trailing '/' which you do not have.
16:32 masak PerlJam++
16:32 FROGGS hkatz: trailing... ehat PerlJam said
16:32 b2gills try "https://google.com/" "hostname"
16:32 hkatz oh bananas
16:32 hkatz this is what I get for copying a grammar from online
16:33 hkatz can I query $match to see if one exists?
16:33 donaldh say $match if $match
16:33 masak hkatz: you should probably `Grammar.parse(...) or die "didn't match"`
16:33 masak hkatz: fail fast! :)
16:33 hkatz lol thanks
16:34 masak hkatz: if you want to be fancy, you add parse error info to the grammar itself. but maybe overkill for this one.
16:34 hkatz lol a tad
16:34 FROGGS that makes it work btw:
16:34 FROGGS -        '/' <path>?
16:34 FROGGS +        ['/' <path>?]?
16:34 masak hkatz: the general pattern there is `rule foo { [ stuff to parse | { fail } ] }`
16:34 hkatz is there a graceful die built into p6? Like carp?
16:35 PerlJam masak: don't you mean || { fail } ?
16:35 masak FROGGS++ # speaking in diffs
16:35 masak PerlJam: oh! so I did.
16:35 masak PerlJam: though I'm not 100% convinced it matters, as long as the lhs has a non-empty declarative prefix.
16:35 PerlJam It matters conceptually then if nothing else :)
16:35 masak hkatz: no :/
16:36 masak hkatz: I would love for someone to write a Carp module for p6.
16:36 hkatz ah well, can't get everything I guess
16:36 masak PerlJam: indeed.
16:36 masak hkatz: it is possible to access the caller, and you get a stacktrace by default.
16:36 hkatz one last question
16:37 hkatz the MAIN sub creates a usage for you automatically
16:37 PerlJam hkatz: it won't be the last, I guarantee you  :)
16:37 hkatz can you tell it to show the types of the arguments?
16:37 hkatz or customize the message?
16:37 PerlJam hkatz: write your own USAGE if you want custom
16:38 masak or suggest reasons why the thing you wanted should be auto-generated by default ;)
16:38 PerlJam hkatz: in your case, if USAGE included the types, what would you like to see output?
16:38 hkatz I dunno seeing ./test.pl6 <NonEmptyString string> <UrlToken token> gives a bit more information to the user
16:39 hkatz especially if you name your types well
16:39 PerlJam Hmm.
16:40 hkatz that's ofcourse if internally p6 knows the types names (and not just gibberish)
16:40 * Ven wrote a blog post about that :-)
16:41 hkatz do you have a link?
16:41 PerlJam hkatz: I think you've got to balance what some people may want against what others may want.   So ... I don't want the types, how do I exclude them from the default USAGE if they've been included for me?
16:41 hkatz I dunno :P
16:41 hkatz is "with" a keyword?
16:42 PerlJam hkatz: if someone can come up with a good answer for that, then I think you could maybe get what you want.
16:42 hkatz sub MAIN( NonemptyString $string ) with Types {}
16:42 hkatz sub MAIN( NonemptyString $string ) with Types, Sigils {}
16:42 hkatz sub MAIN( NonemptyString $string ) with Types, Sigils, Etc... {}
16:42 FROGGS hkatz: if you really want to show off you can do that too:
16:42 FROGGS -subset UrlToken of NonEmptyString where { $_ ~~ /^TOP$/ | /^byte$/ | /^ip$/ | /^schema$/ | /^hostname$/ | /^port$/ | /^path$/ };
16:42 FROGGS +subset UrlToken of NonEmptyString where { URL.^can($_)[0].WHAT ~~ Regex };
16:42 FROGGS :P
16:42 hkatz then it could be extended to any sub
16:42 donaldh Usage: url.pl <url> <wanted-fragment>
16:42 Ven hkatz: https://perl6advent.wordpress.com/2​014/12/22/the-cool-subset-of-main/
16:43 hkatz ooh that's neat FROGGS
16:43 PerlJam hkatz: actually, that's a really good idea--"extended to any sub"  Why can't we have some "documentation" like that automatically generated for us?
16:43 hkatz well I've got to go, thanks all for your help!
16:43 hkatz &mysub.USAGE
16:43 hkatz ;)
16:44 hkatz we have other .WHAT,  .perl, and .chars
16:44 cschwenz joined #perl6
16:44 hkatz everything's an object
16:47 psch &MAIN.WHY already gets appended, maybe the param WHYs make sense too
16:48 psch although i gotta say that naming a param to MAIN $string is a bit lacking
17:05 pecastro joined #perl6
17:07 sqirrel joined #perl6
17:14 perl6_newbee Hi all.
17:15 diana_olhovik_ joined #perl6
17:15 PerlJam perl6_newbee: greetings
17:15 perl6_newbee :-)
17:15 kjs_ joined #perl6
17:15 psch o/ perl6_newbee
17:17 perl6_newbee ha I figured it out on my own :-)
17:17 Rounin joined #perl6
17:20 yqt joined #perl6
17:20 Ven \o
17:20 itz I don't see a schedule for the Dutch PW yet? but I imagine there will be much perl6 goodness?
17:21 perl6_newbee can anyone tell me why the Debugger::IO::COmandLine module is not in Rakudo by default? On Linux it is easy to installed but on Windows I have problem to get it running
17:21 perl6_newbee I think debugging is necessary and the module is installed anyway earlier or later
17:25 grondilu joined #perl6
17:26 grondilu Larry's 2015 FOSDEM talk is still not available, is it?
17:30 Ven joined #perl6
17:35 dalek perl6-examples: 0560aa1 | paultcochrane++ | categories/tutorial/ (5 files):
17:35 dalek perl6-examples: [tutorial] add title and author info
17:35 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/0560aa13d3
17:35 dalek perl6-examples: efeec43 | paultcochrane++ | categories/euler/prob005- (2 files):
17:35 dalek perl6-examples: Merge branch 'master' of github.com:perl6/perl6-examples
17:35 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/efeec43fc1
17:35 eli-se joined #perl6
17:36 eli-se hola
17:36 perl6_newbee hi
17:40 bartolin m: my int $x = Int
17:40 camelia rakudo-moar f8002f: OUTPUT«(signal SEGV)»
17:41 bartolin I've lost track in the last week or so -- is this a known problem?
17:42 bartolin m: sub foo(int $x) { $x }; foo(Int)  # this works, gave a segfault earlier; RT #123789
17:42 synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=123789
17:42 camelia rakudo-moar f8002f: OUTPUT«Cannot unbox a type object␤  in sub foo at /tmp/KopiBIClSU:1␤  in block <unit> at /tmp/KopiBIClSU:1␤␤»
17:43 Ven hi eli-se
17:44 eli-se hi Ven
17:44 Ven Wow, Pypy has a GIL.
17:46 eli-se inb4 Perl 6 implementations have GILs
17:46 molaf joined #perl6
17:47 Ven they don't... Or at least not that I know of :)
17:49 b2gills Python requires a GIL (afaik), a Perl 6 implementation could possibly be implemented using one ( I don't think any of them ever has had a GIL though )
17:50 Ven b2gills: Jython doesn't have a GIL
17:50 dalek perl6-examples: 2689d5c | (L. Grondin)++ | rosalind/cons-grondilu.pl:
17:50 dalek perl6-examples: minor change
17:50 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/2689d5c0e2
17:50 dalek perl6-examples: e03747e | (L. Grondin)++ | / (589 files):
17:50 dalek perl6-examples: Merge branch 'master' of github.com:perl6/perl6-examples
17:50 dalek perl6-examples:
17:50 dalek perl6-examples: Conflicts:
17:50 dalek perl6-examples: rosalind/cons-grondilu.pl
17:50 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/e03747e11d
17:51 eli-se the only reason Python has a GIL was because threading was an afterthought and the implementations and extensions used global variables before threads were introduced
17:51 eli-se you can perfectly implement Python without a GIL, especially since "spec" in Python means "speculation"
17:51 mohij joined #perl6
17:56 tinyblak joined #perl6
18:02 colomon joined #perl6
18:07 dalek roast: cae9192 | usev6++ | S06-signature/types.t:
18:07 dalek roast: Add test for RT #123789
18:07 dalek roast: review: https://github.com/perl6/roast/commit/cae9192292
18:07 synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=123789
18:08 kyclark joined #perl6
18:12 timotimo what the pypy devs have to say about "gil-less python" is very interesting
18:12 timotimo basically, there's two ways to make a python interpreter that behaves the way a python programmer expects it to:
18:13 timotimo have a GIL, or sprinkle the built-in types with fine-grained locks
18:13 timotimo well, there's the third way, which is building STM, which they are also doing
18:18 J-L_ joined #perl6
18:19 cognominal joined #perl6
18:19 J-L_ A quick question:  Is there a way to weaken a reference in Perl6 ?  Like Perl5's Scalar::Util::weaken() ?
18:19 timotimo what is making all these test reports show up as N/A with no compilation output and no test result output? http://testers.p6c.org/recent.html
18:20 J-L_ joined #perl6
18:21 timotimo .tell FROGGS it may be a good idea to split the OS columns on cpandatesters by architecture (and also sanitize "64" vs "x86_64"), so that the humongous amount of orange results from armv7l don't count into the "linux" stats
18:21 yoleaux timotimo: I'll pass your message to FROGGS.
18:21 J-L_ Whoops... I have two irc connection going on.  I'll exit from this, and continue as J-L.
18:21 timotimo J-L_: is that for allowing the target of a reference to be garbage collected if only that "weak" reference still exists?
18:22 J-L timotimo:  That's my intent, yes.
18:22 timotimo we don't have that at all currently
18:22 timotimo i have no clue if we'll end up having it in moar and/or jvm
18:23 J-L Something's strange here... I'm not seeing all the chatter.  I'm gonna leave and reconnect.
18:24 * TimToady and the Mrs in Budapest now
18:24 J-L joined #perl6
18:25 J-L The reason I'm asking about reference weakening is so that I can have a channel populated by a temporary thread, and when the main thread is done with that channel, it can undefine it, and that'll signal the temporary thread to end itself.  Maybe that's the wrong way to go about it?
18:26 grondilu proposal for a rewrite of base-repeating: https://gist.github.com/gro​ndilu/b44db2a1af91e736382a
18:26 kyclark playing with P6, what does the trailing “<“ mean?  say ">$read_id<";
18:27 kyclark i was just trying to decorate some output, but I’m obviously using some operator
18:28 timotimo J-L: when the main thread is done with the channel, why not .close it?
18:28 timotimo in general, weak references are useful when you don't have a clue when the thing is no longer needed
18:29 timotimo or when putting explicit management into the code would cause sprinkles of management to land all over the whole code base
18:29 timotimo if you've already got a single point where you can tell "yup, i'm done with this", you can also explicitly signal it properly
18:30 eli-se joined #perl6
18:30 colomon joined #perl6
18:31 TimToady kyclark: postfix <> is literal hash subscript; you can use ">{$read_id}<" to keep it from seeing the <
18:31 TimToady m: say %*ENV<HOME>
18:31 camelia rakudo-moar f8002f: OUTPUT«/home/camelia␤»
18:31 kyclark ok, thanks!
18:31 J-L If I .close a channel, can the temporary thread query it to know that it is closed?  Can't find that in the docs.
18:32 TimToady might be able to backwhack the < too
18:32 kyclark if I “ $f = IO::Path.new("test.fa”)” and then want to see all the object methods, what’s the easiest way?
18:32 TimToady but only inside quotes
18:32 TimToady m: say "%*ENV\<HOME>"
18:32 camelia rakudo-moar f8002f: OUTPUT«%*ENV<HOME>␤»
18:33 TimToady m: my $x = "stuff"; say "$x\<and nonsense>"
18:33 camelia rakudo-moar f8002f: OUTPUT«stuff<and nonsense>␤»
18:34 kyclark Looks like File.basename doesn’t take an arg of the suffix (list) to trim?
18:34 kyclark > $f.basename(".fa")
18:34 kyclark Too many positionals passed; expected 1 argument but got 2
18:35 eli-se joined #perl6
18:37 timotimo J-L: trying to receive data on a closed channel raises the X::Channel::ReceiveOnClosed exception
18:39 timotimo J-L: oh, and also you can ask .closed
18:39 timotimo which will give you a Promise
18:41 timotimo calling ".closed" will also cause the channel to peek at its queue to find if the "closed" message has already been sent, so you may get a result immediately
18:45 amaliapomian joined #perl6
18:48 J-L timotimo:  .closed returns a Promise.  Will that tell me if the channel is really closed?
18:48 J-L How do I use the REPL feature of perl6 on a script?  Kind of like "perl -de script.pl", but with Perl6.
18:50 dalek perl6-roast-data: 31418ff | coke++ | / (9 files):
18:50 dalek perl6-roast-data: today (automated commit)
18:50 dalek perl6-roast-data: review: https://github.com/coke/perl6​-roast-data/commit/31418ff858
18:50 timotimo J-L: the "closed" message is part of the queue, as in it's "in-band"
18:52 timotimo if you "can already know" the channel is closed, for example if you've already pulled the last value out of the queue on the receiver end before the sender end has .close'd the channel, the promise will fire immediately
18:52 timotimo otherwise you can check the promise for its status
18:52 [Coke] someone broke parrot-nqp
18:52 [Coke] +t/nqp/59-nqpop.t                    (Wstat: 0 Tests: 126 Failed: 6)
18:52 [Coke] +  Failed tests:  20-22, 32-34
18:53 [Coke] rakudo-jvm much improved, thanks.
18:53 colomon joined #perl6
18:53 timotimo evaluating the promise with "so" or "?" or "not" or "!" will check for broken/kept vs planned for you without blocking
18:54 madmuid joined #perl6
18:56 hoelzro http://doc.perl6.org/routine/se​tbagmix%23Set%2FBag%20Operators =/
18:56 timotimo http://doc.perl6.org/routine/ - haha!
18:57 hoelzro yikes
18:58 [Coke] parrot failures are all nqp::r?index related.
18:58 PerlJam J-L: re REPL on a script.  maybe you want perl6-debug?  (See https://perl6advent.wordpress.co​m/2012/12/05/a-perl-6-debugger/)
18:58 [Coke] https://github.com/perl6/nqp/issues/226
18:58 PerlJam assuming that still works
18:59 timotimo the debugger still works, but you install it differently
18:59 timotimo you get the Debugger::UI::CommandLine module from the ecosystem and run perl6-debug-m which will use that module to give you a user interface
19:00 PerlJam J-L: What timotimo said
19:02 J-L Okay, I couldn't install Debugger::UI::CommandLine because of 'git' not recognized on my system.
19:02 J-L I just wrote a sub in a file, and before I continue my script I'd like to try it out in the REPL interface.
19:02 FROGGS joined #perl6
19:03 J-L But if I type "perl6 script.pl" it just simply runs the script as if it were a script to run from start to finish.
19:03 PerlJam J-L: you can use/require files from within the REPL
19:03 J-L PerlJam:  Even use/require a *.p6 (non-module) file?
19:04 PerlJam J-L: require "filename"; # should work.
19:05 PerlJam since subs are lexical, you may have to do a little extra work to get at yours, but it shouldn't be too hard
19:05 timotimo just put "is export" at the sub and that should work, no?
19:05 PerlJam aye
19:07 PerlJam though, it may depend on if he's got a module declaration or not
19:07 timotimo i never tried, to be honest
19:07 PerlJam me either
19:07 PerlJam :)
19:08 timotimo usually i'll just write a quick multi sub MAIN("test") { ... } and put a bunch of things in there
19:08 timotimo but that doesn't necessarily compare to a repl
19:09 PerlJam I just did a little experiment and adding "is export" didn't seem to help, but if I declared the sub with our, I could call it from within the REPL as main::foo()
19:10 timotimo ah, good
19:11 timotimo yeah, "is export" requiring an actual module declaration makes a whole lot of sense
19:11 japhb Pretty please can someone with Java skills implement readlink in nqp-j/r-j?  Via IO::Path.resolve, this would make a deployment problem I have significantly easier.
19:11 J-L When I used PerlJam's suggestion of declaring the sub with "our", then I was able to call it with "main::foo()", just like he said.
19:14 tbrowder joined #perl6
19:16 yqt joined #perl6
19:16 timotimo (sadly our REPL tends to do some very funky things, especially when := is involved)
19:16 Mouq FROGGS: Mind testing and closing #109306 ?
19:16 synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=109306
19:19 tbrowder I have some minor doc corrections for <doc.perl6.org/language/5to6> but I haven't found the source on a public repo so I can make an edit or patch or pull request.  Link will be much appreciated.
19:20 [Coke] tbrowder: go to http://doc.perl6.org/ and look at the footer.
19:21 Mouq tbrowder: https://github.com/perl6/doc and specifically https://github.com/perl6/doc/bl​ob/master/lib/Language/5to6.pod (it says POD errors because it's in Pod6 not POD)
19:22 tbrowder_ joined #perl6
19:23 timotimo someone could perhaps spend a tiny bit of time reviewing http://faq.perl6.org/ for outdatedness and stuff; i'll be AFK for a bit now
19:24 timotimo like i seem to recall that inside a class, you can change other instances (of the same class)' private attributes? or something like that?
19:24 tbrowder_ [coke]: the problem is the instruction take one to the git repo for the web site but the doc I need is a link to a private site.
19:25 J-L Question:  How do I convert from an Int to a Str and vice-versa?  I can remove their "Int" and "Str" declarations, but if I don't, the compiler complains if I try to assign one to the other.
19:26 [Coke] I thought you wanted to edit https://github.com/perl6/doc/bl​ob/master/lib/Language/5to6.pod ?
19:26 timotimo tbrowder_: are you looking for this? https://github.com/moritz/perlgeek​.de/tree/master/other/perl-5-to-6
19:26 timotimo J-L: generally $the-thing.Int and $the-thing.Str
19:27 timotimo otherwise you can declare a parameter for a sub or method to be coercive like Str(Any) would coerce anything that's derived from the Any class into a Str
19:27 timotimo m: sub as-str(Str(Any) $foo) { say $foo; say $foo.WHAT }; as-str(1); as-str([1, 2, 3]);
19:27 camelia rakudo-moar f8002f: OUTPUT«1␤(Str)␤1 2 3␤(Str)␤»
19:28 timotimo m: sub as-str(Int(Any) $foo) { say $foo; say $foo.WHAT }; as-str("1"); as-str([1, 2, 3]);
19:28 camelia rakudo-moar f8002f: OUTPUT«1␤(Int)␤3␤(Int)␤»
19:30 timotimo damn, his irc session died ... hopefully through clicking the link which replaced the irc tab with the target?
19:30 timotimo their*
19:34 kjs_ joined #perl6
19:37 Akagi201 joined #perl6
19:38 kjs_ joined #perl6
19:38 J-L Thanks, timotimo.  That's something I never knew about.
19:44 colomon joined #perl6
19:45 avuserow japhb: how much Java skills would that take? I might know enough to be dangerous, err helpful here. Just wondering if you or someone else took a stab and got stuck somewhere, or if it's just not done
19:51 psch avuserow: adding a new nqp op needs an op mapping to a backendspecific implementation
19:52 psch avuserow: for jvm that means 1) add a "readlink" method to org.perl6.nqp.runtime.Ops and 2) add a core op mapping to QAST::Compiler
19:53 * psch isn't quite sure what's needed, besides File.isSymbolicLink()
19:53 avuserow presumably it needs Path.readSymbolicLink() or so
19:54 psch http://docs.oracle.com/javase/t​utorial/essential/io/links.html is as far as i researched by now
19:54 avuserow I didn't see any docs about exactly what nqp::readlink ought to do for the edge cases
19:54 psch avuserow: well, moar calls libuv's uv_fs_readlink, which allegedly does the same as readlink(2)
19:55 ugexe i dunno why, but every time my arm7 smoker hits 'Compress::Zlib::Raw' panda starts throwing uninitialized value warnings for every module and returns N/A (no build or test) for the remaining tests as it tries to (unsuccessfully) fetch the dependencies
19:55 psch (where "allegedly" means "the docs say" - i didn't check the source)
19:56 TimToady grondilu: compare the performance of 1/(2**48-1) with 1/(2**48+1)
19:56 avuserow psch: *nod*
19:56 TimToady grondilu: but yours does appear to be faster, whic his nice
19:59 b2gills m: (1/3).FatRat.base-repeating(10)
19:59 camelia rakudo-moar f8002f: ( no output )
19:59 b2gills m: say (1/3).FatRat.base-repeating(10)
19:59 camelia rakudo-moar f8002f: OUTPUT«0. ???␤»
20:01 itz_ joined #perl6
20:01 TimToady grondilu's works if you poke it into FatRat rather than Rat
20:10 dalek rakudo/nom: 418c1f3 | TimToady++ | src/core/Rational.pm:
20:10 dalek rakudo/nom: use grondilu's faster base-repeating
20:10 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/418c1f33a1
20:10 TimToady that should fix the FatRat issue as well
20:11 TimToady grondilu++
20:13 flussence is there a straightforward way of turning hex-encoded bytes (I have a qw{}-string that resembles the middle bit of `hexdump -C`) into a buf8?
20:13 dalek roast: d461bad | usev6++ | S32-exceptions/misc.t:
20:13 dalek roast: Unfudge passing tests for JVM
20:13 dalek roast: review: https://github.com/perl6/roast/commit/d461bad050
20:13 moritz flussence: maybe pack has something for that?
20:14 flussence m: say pack('H*', <0A 9F 57 2D>).perl
20:14 camelia rakudo-moar f8002f: OUTPUT«Cannot call 'Real'; none of these signatures match:␤:(Mu:U \v: *%_)␤  in method Real at src/gen/m-CORE.setting:4789␤  in sub infix:<%> at src/gen/m-CORE.setting:5272␤  in block  at src/gen/m-CORE.setting:6763␤  in sub pack at src/gen/m-CORE.setti…»
20:14 timotimo wouldn't that be unpack?
20:14 timotimo m: say :16($_) for <0A 9F 57 2D>;
20:14 camelia rakudo-moar f8002f: OUTPUT«10␤159␤87␤45␤»
20:14 timotimo ^- my approach
20:14 ugexe hmm if i install Compress::Zlib::Raw directly (not with panda smoke) it installs fine
20:15 flussence ah, that'll do. thanks timotimo++!
20:15 ugexe i think something about nativecall is conflicting with something in panda
20:17 danstoner joined #perl6
20:18 virtualsue joined #perl6
20:18 danstoner Where should I report issues with "panda" that come with rakudo star perl 6?
20:19 FROGGS danstoner: probably here: https://github.com/tadzik/panda/issues
20:19 yoleaux 18:21Z <timotimo> FROGGS: it may be a good idea to split the OS columns on cpandatesters by architecture (and also sanitize "64" vs "x86_64"), so that the humongous amount of orange results from armv7l don't count into the "linux" stats
20:19 ugexe the orange stats are not due to the architecture
20:19 danstoner On a "minimal" install Linux system, I was missing pre-requisites of "git" and "Test::Harness" (e.g. no "prove" command available)
20:19 FROGGS timotimo: hmmm, interesting idea
20:19 ugexe they are about the panda issue above
20:20 ugexe notice the orange results always occur right after Compress::Zlib::Raw and occur for the rest of its run, but the tests before are fine
20:20 FROGGS ugexe: are these the reports that do not have build or test output at all?
20:20 danstoner FROGGS: thanks
20:20 ugexe FROGGS: panda is getting borked installing Compress::Zlib::Raw. it just fetches the remaining modules but doesnt try to build or test them
20:21 FROGGS eww
20:21 FROGGS ugexe: can you analyse that? I did several smoke runs the last days and can not replicate your issue
20:21 ugexe all i can guess is withp6lib and %*ENV<PERL6LIB>
20:22 ugexe i tried, but the tests pass if i manually do them
20:22 ugexe https://gist.github.com/ugexe/bc48b691​10382192cfaf#file-gistfile1-txt-L8250
20:22 FROGGS well, you could dump that and run the smoker... (without submitting results)
20:22 ugexe clearly you want to check the $bone for defined, but still
20:23 ugexe dump that? <- you mean start a new smoke test?
20:23 ugexe there are already 2 datasets on testers.p6c.org that follow the same pattern
20:24 FROGGS dump the %*ENV<PERL6LIB> from inside panda, to see if it gets messed up
20:25 rurban joined #perl6
20:25 ab5tract m: "huh".?round # to revisit a topic from earlier, what is supposed to happen here?
20:25 camelia rakudo-moar f8002f: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '⏏huh' (indicated by ⏏)␤  in method <anon> at src/gen/m-CORE.setting:15246␤  in any find_method_fallback at src/gen/m-Metamodel.nqp:2904␤  in any find_method a…»
20:26 ab5tract it appears to be valid syntax, but it is unclear to me what the ? is doing (or not doing) there
20:26 psch ab5tract: looks to me like the right thing is happening.  .? means "call method if there is one"
20:27 kaare_ joined #perl6
20:27 psch m: class A { }; say A.new.?frabusel
20:27 camelia rakudo-moar f8002f: OUTPUT«Nil␤»
20:27 TimToady m: "3.1416".?round.say
20:27 camelia rakudo-moar f8002f: OUTPUT«3␤»
20:27 ab5tract ah, so Str has a round on itself, and this is what is unhappy.
20:27 psch Str has a round from Cool
20:27 moritz it comes form Cool
20:27 TimToady well, Cool does, I think
20:28 moritz as http://doc.perl6.org/type/Str should clearly indicate :-)
20:28 moritz it does not :(
20:29 moritz something is wrong with doc.perl6.org build
20:29 ugexe hmm just found a ghost smoking process from 4 days ago
20:30 FROGGS hmmmm
20:30 moritz oh
20:30 moritz it seems to only transport methods, not routines in general
20:32 * TimToady tries to decide if smoking a ghost would do it any harm...
20:33 fhelmberger joined #perl6
20:33 moritz sounds vaguely uncomfortable
20:33 ugexe as long as its not operating any heavy machinery
20:34 TimToady smoking preserves meat, but a ghost is about as far from meat as you can get...
20:35 FROGGS as far as tofu
20:35 madmuid joined #perl6
20:38 fhelmberger joined #perl6
20:39 * TimToady is obviously too jet-lagged to be a productive member of society now...
20:39 * TimToady ghosts off to bed &
20:42 vendethiel joined #perl6
20:42 gunod joined #perl6
20:45 gunod Is it possible to make object attributes lazy? how would that work?
20:46 FROGGS gunod: you want to initialize them at first access?
20:46 gunod exactly
20:46 psch m: class A { has $!shadow-attr; method attr { $!shadow-attr =// do { #`[ slow calculation ] 1 } };
20:46 camelia rakudo-moar 418c1f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/skitysrW8I␤Null regex not allowed␤at /tmp/skitysrW8I:1␤------> 3ow-attr; method attr { $!shadow-attr =//7⏏5 do { #`[ slow calculation ] 1 } };␤»
20:47 psch m: class A { has $!shadow-attr; method attr { $!shadow-attr //= do { #`[ slow calculation ] 1 } };
20:47 camelia rakudo-moar 418c1f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/WNjhReTLUs␤Unable to parse expression in block; couldn't find final '}' ␤at /tmp/WNjhReTLUs:1␤------> 3r //= do { #`[ slow calculation ] 1 } };7⏏5<EOL>␤»
20:47 psch m: class A { has $!shadow-attr; method attr { $!shadow-attr //= do { #`[ slow calculation ] 1 } } };
20:47 camelia rakudo-moar 418c1f: ( no output )
20:47 psch there
20:48 psch gunod: the Int method in core/StrDistance is another example
20:48 psch https://github.com/rakudo/rakudo/​blob/nom/src/core/StrDistance.pm
20:48 FROGGS either what psch++ showed or by binding a Proxy... but I think his solution is the sanest
20:48 gunod I see. not as nice as it works in Moose ;D
20:49 * psch looks how it works in Moose
20:50 ab5tract FROGGS: speaking of Proxy, I don't find much in the synopses and less on doc.perl6.org
20:50 psch gunod: well, you could shove the slow calculation inside the do block into a class-scoped sub
20:50 ab5tract some nice references in core, as usual, and tests
20:51 FROGGS then we have to write docs
20:51 psch gunod: but no, we don't have a hash for attribute attributes, although i think writing a trait for that should be pretty easy
20:51 ab5tract yes, that's the plan :)
20:51 FROGGS :o)
20:51 breinbaas joined #perl6
20:51 FROGGS I still have to finish the NativeCall docs...
20:52 ab5tract yeah, that's more important
20:52 ab5tract but if you are about to add C++ ...
20:52 FROGGS everything is important.... that is part of the problem
20:52 ab5tract then maybe it's better to wait on the docs until after that
20:52 flussence m: sub foo(&code) { 1 }␤my $bar = foo { 2; }␤$bar; # Is this error correct? Only started happening recently...
20:52 camelia rakudo-moar 418c1f: ( no output )
20:52 flussence guess it isn't...
20:52 * flussence updates again
20:53 FROGGS the C++ stuff has to land first, and the NativeCall will again be extended then
20:53 psch something like trait_mod:<is>(Attribute $attr, Block !:$lazy) { $attr.value //= $lazy() }
20:53 ab5tract that's a good point
20:53 PerlJam docs are more important if you want to get some of the earlier adopters actually using the features  :)
20:53 psch (not tested, i don't do much trait writing...)
20:53 FROGGS multi trait_mod:<is>(Attribute $attr, Block :$lazy!)
20:54 FROGGS what also is important for me is that bloody bug in nqp-j, which breaks URI and the modules that depend on it...
20:55 FROGGS I want to have that fixed until next release, but I already have spent too much time on it :o(
20:56 psch FROGGS++ right, the required-bang is postfix... :)
20:56 psch FROGGS: re that bug, i had a golfed testcase which started working in august last year, and i set it aside
20:58 psch FROGGS: https://gist.github.com/pe​schwa/e5aee72dcce9d4b60ec1 is the gist of the golf and http://irclog.perlgeek.de/​perl6/2014-08-22#i_9228612 is when it apparently worked
20:58 psch FROGGS: the issue was/is a broken outer chain iirc?
20:59 FROGGS psch: correct
20:59 psch bisecting over rakudo and nqp is inconvenient, but maybe that data point helps
21:00 psch i'm looking at the native-is-rw bug that nativeref brought to jvm currently
21:00 FROGGS hmmm
21:00 FROGGS my golf is a lot short happily :o)
21:00 FROGGS just about a few lines in three files
21:02 FROGGS but what I know so far is: when the <unit> where the our sub is declared in gets serialized, it serializes all contexts down to <unit>
21:02 FROGGS but this one has no link to <unit-outer>
21:02 FROGGS and then, when we deserialize and load the setting, we install the setting as the outer of the <unit-outer>
21:03 FROGGS but nothing has the <unit-outer> as its outer
21:03 psch i had a patch to fix the symptom by repeating the search for the right outer, but...
21:03 FROGGS so it is just about the bloody link between <unit> and <unit-outer>
21:03 FROGGS O.o
21:04 psch well, it was probably flawed in more than the obvious way :P
21:08 FROGGS okay, I think I can say the serializing is not the issue
21:09 FROGGS that*
21:19 bayprogrammer joined #perl6
21:27 masak 'night, #perl6
21:28 vendethiel night :-)
21:29 cognominal joined #perl6
21:36 tbrowder joined #perl6
21:38 raiph joined #perl6
21:44 dwarring joined #perl6
21:44 zoosha joined #perl6
21:45 * psch &
21:49 tbrowder timotimo:  thanks for the good link I was looking for (I  got kicked off twice earlier--bad irc client)
21:49 tbrowder [Coke]: thanks for the link for future use
21:53 dalek roast: 6c3d4d7 | (David Warring david.warring@gmail.com)++ | S02-literals/radix.t:
21:53 dalek roast: added fudged test for RT #123862 - negative radix
21:53 dalek roast: review: https://github.com/perl6/roast/commit/6c3d4d755a
21:53 synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=123862
21:56 dwarring ^ do I need special RT privileges to remove the 'testneeded' tag?
21:58 telex joined #perl6
22:00 FROGGS dwarring: quite possible
22:00 aborazmeh joined #perl6
22:00 aborazmeh joined #perl6
22:00 FROGGS I removed it though
22:01 * dwarring just as easy
22:03 Vlavv joined #perl6
22:05 espadrine_ joined #perl6
22:09 timotimo tbrowder: you know of the irclog?
22:10 kjs_ joined #perl6
22:16 larion joined #perl6
22:18 [Sno] joined #perl6
22:28 tbrowder yes, that's where I recovered the links you and [Coke] and Mouq gave me
22:31 kjs_ joined #perl6
22:31 timotimo OK
22:43 adu joined #perl6
22:46 avuserow japhb: ./nqp-j -e'nqp::say(nqp::readlink("/home/ak/Music"));'
22:47 avuserow oldhome/common/music
22:47 avuserow so that seems to work
22:49 avuserow does anyone know how to keep github forks up to date?
22:53 vendethiel avuserow: git pull :P
22:53 avuserow nope, turns out it involves remotes
22:54 FROGGS git remote add <name> <remote url>
22:54 FROGGS git pull <name> master
22:54 FROGGS git push
22:54 Mouq Or just git pull <remote url>
22:54 FROGGS ahh yes, true
22:55 Mouq FROGGS: http://irclog.perlgeek.de/p​erl6/2015-03-10#i_10254254
22:55 FROGGS Mouq: yes, I'll do that when I have time
22:56 larion joined #perl6
22:56 Mouq FROGGS: Don't worry about it, I just wanted to see that you were aware of it :) I don't really trust myself to mess with the IO::Socket::INET test
22:56 Mouq s
22:57 FROGGS and then you trust me? O.o
22:58 vendethiel .oO( what'd you trust a frog with? )
23:00 FROGGS delicious sauce perhaps
23:01 adu hi all
23:01 avuserow okay, got everything synced and a PR up. comments heavily welcomed so I write better code next time :D
23:02 FROGGS hi adu
23:05 dalek nqp: 68accfc | (Adrian Kreher)++ | src/vm/jvm/ (2 files):
23:05 dalek nqp: [jvm] Implement nqp::readlink
23:05 dalek nqp: review: https://github.com/perl6/nqp/commit/68accfcefa
23:05 dalek nqp: fbd3e5f | FROGGS++ | src/vm/jvm/ (2 files):
23:05 dalek nqp: Merge pull request #227 from avuserow/master
23:05 dalek nqp:
23:05 dalek nqp: [jvm] Implement nqp::readlink
23:05 dalek nqp: review: https://github.com/perl6/nqp/commit/fbd3e5ffb1
23:07 FROGGS avuserow++
23:10 FROGGS \o/
23:11 FROGGS I THINK I FIXED THAT BLOODY JVM+URI BUG!
23:13 timotimo \o/
23:15 FROGGS .tell jnthn the outer of all evil: https://gist.github.com/FR​OGGS/5646d051dca96e3f879f (that fixes the jvm+uri issue)
23:15 yoleaux FROGGS: I'll pass your message to jnthn.
23:15 FROGGS I know that it does not look nice, but it is a start
23:16 BenGoldberg joined #perl6
23:19 madmuid joined #perl6
23:20 avuserow thanks FROGGS. and FROGGS++ for fixing other JVM stuff
23:20 FROGGS I am building all the things now, and then will push the nqp version bump, as well as starting a jvm smoke run
23:28 donaldh joined #perl6
23:28 donaldh FROGGS: What's the JVM+URI bug?
23:29 FROGGS donaldh: that one: http://testers.p6c.org/reports/18805.html
23:30 FROGGS a week ago it just ended in a null pointer exeption
23:30 FROGGS and we had that issue as long as we have the jvm backend...
23:30 FROGGS (we saw it for the first time when we ran star module tests on jvm)
23:30 donaldh FROGGS++
23:31 donaldh The elusive bug I am chasing is the escaping UnwindException
23:31 FROGGS and it involves our scoped subroutines in a package that got 'use'd in a module the gets precompiled
23:32 FROGGS ohh, that sounds like fun too
23:32 donaldh (maybe more than 1 bug) most easily exposed with ./perl6 -e '{;}'
23:33 donaldh I'm just worried when I see priorInvocation
23:33 adu FROGGS: so how goes the c-parser native-call thing?
23:34 donaldh We need to invest in eliminating priorInvocation at some point
23:35 FROGGS donaldh: aye... though I am not sure that *I* want to do that :o)
23:35 FROGGS adu: well, besides that I'm not working on C parsers... very well :o)
23:37 * donaldh is too tired to do anything productive tonight; sleep&
23:37 FROGGS gnight donaldh
23:37 lizmat joined #perl6
23:37 adu FROGGS: I'm working on c parsers
23:37 adu FROGGS: I was wondering about the native-call part
23:37 FROGGS NativeCall for C and C++ is making progress... but stuff like CUnion etc need more testing
23:38 adu ok, I'll take a look
23:38 FROGGS if you have any questions please write these down here... it is past bedtime but I will backlog and reply
23:39 FROGGS because that is a very important topic for me these days
23:52 bjz joined #perl6
23:56 larion joined #perl6

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

Perl 6 | Reference Documentation | Rakudo