»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: irc.perl6.org | UTF-8 is our friend! | feather will shut down permanently on 2015-03-31
Set by jnthn on 28 February 2015.
00:02 mohij left 00:06 tinyblak left, yqt left 00:08 virtualsue left, davido__ left 00:09 davido__ joined 00:11 skids joined 00:12 vendethiel left 00:13 spider-mario left 00:15 vendethiel joined 00:18 davido__ left 00:21 tinyblak joined 00:32 spider-mario joined 00:33 spider-mario_ joined 00:37 spider-mario left 00:38 vendethiel left 00:40 Ben_Goldberg joined 00:42 atweiden joined 00:55 spider-mario_ left 00:56 Guest89153 is now known as felher, dayangkun joined 00:58 spider-mario joined 01:04 vendethiel joined 01:09 spider-mario left 01:10 cognominal left 01:12 laouji joined 01:13 bolangi joined, coffee` left 01:14 mr-foobar left 01:20 raiph left 01:22 zacts joined 01:28 vendethiel left 01:31 zacts left 01:34 spider-mario joined
Mouq RT #120506 and RT #121804 are both closable if anyone wants to pick them up (jnthn++ for fixing these) 01:35
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=120506
Mouq #121804
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=121804
Mouq *with/if tests exist, that is
01:36 atweiden left 01:47 spider-mario left 01:50 spider-mario joined
japhb [Tux]: What is producing the "Bug summary" in tux.nl/Files/20150309084206.png ? 02:13
02:22 chenryn joined 02:44 ilbot3 left 02:46 ilbot3 joined 02:51 vendethiel joined 03:08 kaleem joined 03:15 vendethiel left 03:17 yeahnoob joined 03:25 noganex joined 03:27 colomon left 03:28 noganex_ left, raiph joined 03:31 colomon joined 03:41 yeahnoob_ joined, yeahnoob left 03:47 itz left 03:52 yeahnoob__ joined 03:54 laouji left 03:55 yeahnoob_ left
dalek ast: 5f5f5fb | Mouq++ | S09-typed-arrays/arrays.t:
Add tests for #120506
04:04
ast: df6e66b | Mouq++ | S09-typed-arrays/arrays.t:
Add test for RT #121804
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=120506
Link: rt.perl.org/rt3//Public/Bug/Displa...?id=121804
04:05 colomon left 04:11 grondilu left 04:24 chenryn left 04:44 Ben_Goldberg left 04:48 laouji joined 04:51 aborazmeh joined, aborazmeh left, aborazmeh joined 04:56 itz joined 05:03 yeahnoob__ left 05:09 chenryn joined 05:16 raiph left, aborazmeh left 05:32 yeahnoob joined 05:41 aborazmeh joined, aborazmeh left, aborazmeh joined 05:58 mr-foobar joined 05:59 yeahnoob left 06:00 yeahnoob joined 06:03 diana_olhovik_ joined 06:11 tinyblak left 06:12 tinyblak joined 06:14 ggoebel left 06:15 diana_olhovik_ left 06:16 tinyblak left 06:24 tinyblak joined 06:33 spider-mario left 06:52 rhr left 07:02 mr-foobar left 07:03 prime left 07:04 rhr joined 07:06 diana_olhovik_ joined 07:09 xinming left, xinming joined, prime joined, prime left, prime joined
[Tux] japhb, www.xs4all.nl/~hmbrand/bugs.pl 07:10
good morning btw
nine_, I'll have a look at I::P5's IO 07:11
07:11 fhelmberger joined 07:12 MadcapJake left 07:14 fhelmberger left 07:16 xinming left 07:17 xinming joined 07:19 rindolf joined, ggoebel joined
[Tux] No such method 'getline' for invocant of type 'IO::Handle' 07:22
nine_ [Tux]: I just replied to your comment 07:25
07:26 salva left, salva joined
[Tux] the getline is from Text::CSV_XS BTW, not the one from perl itself 07:26
but there will be fun inside, as Text::CSV_XS' getline will invoke perl's IO getline from XS 07:27
and I now also realize that I have to set no-chomp in perl6 07:28
07:30 fhelmberger joined 07:33 darutoko joined 07:34 breinbaas joined
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:34 fhelmberger left 07:36 rurban joined, fhelmberger joined 07:42 laouji left 07:43 laouji joined 07:44 Rounin joined 07:46 Ven joined
sergot morning #perl6 07:49
07:50 Ven left 07:52 fhelmberger left, Ven joined 07:54 fhelmberger joined, FROGGS joined 07:56 rhr left, fhelmberger left 07:57 Ven left 07:58 fhelmberger joined, rhr joined
moritz \o sergot, * 07:59
07:59 espadrine_ joined, fhelmberger left 08:00 Ven joined 08:01 fhelmberger joined 08:03 fhelmberger left 08:06 fhelmberger joined, fhelmberger left
raydiak o/ 08:07
08:07 fhelmberger joined 08:08 fhelmberger left 08:10 Ven left 08:11 Ven joined, zakharyas joined, fhelmberger joined 08:12 fhelmberger left 08:14 wicope joined 08:15 fhelmberger joined 08:16 fhelmberger left
FROGGS o/ 08:18
08:18 fhelmberger joined
raydiak moritz: would it be possible to install lua 5.1 or jit on whichever server instance runs the smoker and cpandatesters? 08:18
g'morning FROGGS 08:19
FROGGS raydiak: cpandatesters happens at user boxes
08:19 fhelmberger left
FROGGS I mean, the reports are generated by users 08:20
raydiak ah, I see
moritz raydiak: I've installed lua 5.1 on hack, where colomon++ runs the smoke tests (iirc) 08:21
FROGGS correct
raydiak thank you kindly
moritz raydiak: or should I install luajit?
FROGGS raydiak: what modules will these packages aid?
moritz lua5.1 - Simple, extensible, embeddable programming language
luajit - Just in time compiler for Lua programming language version 5.1
08:22 fhelmberger joined
raydiak FROGGS: Inline::Lua 08:22
moritz: probably 5.1 will be more common for users if I had to guess
it'll autodetect
08:23 fhelmberger left
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/panda/reports.2015.2.250.gd.2.a.17.d.1
Inline::Luaraydiak*TrueTruemoar
moritz :-)
FROGGS (after: sudo apt-get install lua5.1)
the "True True" means that build passed and tests passed 08:26
moritz \o/
FROGGS on my box :o9
:o)
raydiak yeah I saw a report of yours in there...the green stood out against all the red :) 08:27
08:29 kaleem left
raydiak almost forgot the FROGGS++ 08:30
masak good morning, #perl6
raydiak \o masak
FROGGS *g* 08:32
morning masak
08:32 chenryn left 08:33 yakudza joined, chenryn joined 08:35 telex left, [Sno] left, [Sno] joined 08:36 telex joined 08:39 smls joined
ab5tract good morning all :) 08:40
FROGGS hi ab5tract
Ven hi!
yoleaux 9 Mar 2015 19:00Z <eli-se> Ven: I don't like it. :(
Ven well, too bad 08:41
08:41 donaldh joined
ab5tract okay, so i am _only_ just beginning to feel like i grok Whatever 08:41
nwc10 good UGT, *
ab5tract hi nwc10 :) 08:42
so for some reason i had an expectation that
08:42 laouji left
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␤»
ab5tract i was expecting that to behave as a grep for some reason
moritz well, use grep if you want grep :-)
FROGGS o/ Ven, nwc10
ab5tract ie, returning all the rounded values that _can_ round 08:44
moritz: unfortunately grep isn't doing what i would expect either in this case :)
m: my $x = 4; $y = "5ive"; my @can_round = ($x,$y).grep: *.round;
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␤»
FROGGS m: my $x = 4; $y = "5ive"; my @can_round = ($x,$y).map: *.?round;
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␤»
lizmat good *, #perl6!
moritz ab5tract: what do you *want* to do?
FROGGS m: my $x = 4; my $y = "5ive"; my @can_round = ($x,$y).map: *.?round;
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…»
ab5tract moritz: no this is not so much about my wants. it is about my expectations
FROGGS ohh, that one
08:44 laouji joined
FROGGS morning lizmat 08:44
ab5tract m: my $x = 4; $y = "5ive"; my @can_round = ($x,$y).grep: * ~~ Numeric && *.round;
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
m: my $x = 4; my $y = "5ive"; my @can_round = ($x,$y).map: try *.round;
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…»
FROGGS gah
ab5tract m: my $x = 4; my $y = "5ive"; my @can_round = ($x,$y).grep: * ~~ Numeric && *.round;
camelia ( no output )
lizmat m: <a b>.Bag.BIND-KEY("a", my $b) # where does this error come from ???
camelia rakudo-moar e39570: OUTPUT«Unhandled exception: postcircumfix:<{ }> binding not defined for type Bag␤ at <unknown>:1 (/home/camelia/rakudo-inst-1/languages/perl6/runtime/CORE.setting.moarvm:throw:4294967295)␤ from src/gen/m-CORE.setting:15249 (/home/camelia/rakudo-inst-1/lan…»
ab5tract right, okay. please don't take this as a criticism or even a WAT
just saying out loud that i thought that * had slightly more magical properties than it does 08:46
08:46 laouji left
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…»
ab5tract that's an intentionally tortured string value in $y 08:47
m: my $x = 4; my $y = "give"; my @can_round = ($x,$y).grep: *.round; @can_round.say;
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 …»
FROGGS lizmat: what is in your src/gen/m-CORE.setting:15249 ?
ab5tract: you can also try in /privmsg with camelia
lizmat FROGGS: method sink() is hidden_from_backtrace {
(in class Failure) 08:48
FROGGS ahh
gimme a sec
lizmat from there it goes deep into nqp land
08:48 laouji joined
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)
lizmat the reason I'm asking is that I added BIND-KEY methods for Set/Bag/Mix(Hash), but they're not getting called
FROGGS hmmm
moritz m: say (4, 'not a number').grep: { try $_ == .round } 08:50
camelia rakudo-moar e39570: OUTPUT«4␤»
lizmat if this is intentional, then I'll remove the BIND-KEY methods
if not, then why aren't they being called?
ab5tract moritz: very nicely demonstrated, thank you
FROGGS lizmat: # alas, we cannot bind 08:51
multi method BIND-KEY(Baggy:D: \k) is hidden_from_backtrace {
fail X::Bind.new(target => self.^name);
ab5tract but partly my struggle here is that i am back to not really grokking the main advantages of * over $_
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
lizmat m: my $f = <a b>.Bag.BIND-KEY("a", my $b); say $f.exception.WHAT
camelia rakudo-moar e39570: OUTPUT«(X::AdHoc)␤»
raydiak src/core/Any L577 ?
fail "postcircumfix:<\{ \}> binding not defined for type {self.WHAT.perl}"; 08:53
lizmat hmmm....
how did I miss that?
raydiak did you escape it when you grepped? the { } I mean
lizmat gets another cuppa
ab5tract moritz: so the main advantage is `@l.map: *.upgrade` vs `@l.map: { $_.upgrade }`, along with the `1,2, * + *, ... *` stuff 08:54
(and along with other things, obviously)
lizmat FROGGS raydiak : thanks for the sanity check, I'll take it from here again 08:55
raydiak yw lizmat++
08:55 yeahnoob left, yeahnoob_ joined 08:57 Akagi201 joined, virtualsue joined 08:58 espadrine_ left 09:03 virtualsue_ joined, virtualsue left, virtualsue_ is now known as virtualsue
raydiak good night #perl6 09:05
FROGGS gnight raydiak 09:06
lizmat gnigh raydiak
dalek kudo/nom: de37ea2 | lizmat++ | src/core/ (3 files):
Get BIND-KEY signatures right, FROGGS++ raydiak++
09:08
kudo/nom: e572fca | lizmat++ | t/01-sanity/22-KEY.t:
Unfudge BIND-KEY tests
09:10
smls m: say Str(Int:D) 09:12
camelia rakudo-moar e39570: OUTPUT«(Str(Int))␤»
smls ^^ So typespecs are allowed anywhere in term position?
Not just in signatures?
dalek kudo/nom: 1fa2c20 | lizmat++ | t/01-sanity/22-KEY.t:
Fix comments
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
masak (the custom-ops branch is coming along fine, albeit slowly, btw)
smls moritz: Is the :D ignored, or just not handled by .gist ? 09:14
moritz smls: ignored atm 09:15
09:15 abraxxa joined
smls m: say Str( Int ) 09:16
camelia rakudo-moar e39570: OUTPUT«(Str(Int))␤»
smls Hm should spaces really be allowed there?
ab5tract smls: inside of the parens?
smls if the whole thing acts like a single "typename" token
ab5tract i would hope so
smls yeah
ab5tract ah
smls spaces just make it look like a function call 09:17
ab5tract indeed
09:18 laouji left, laouji_ joined 09:19 cschwenz joined 09:20 cschwenz left
smls Especially since LTM seems to be all that distinguishes it from a function call 09:22
So it really is a "token" conceptually, and should be space free
(Seeing how TimToady just forbid spaces inside operators...) 09:23
09:26 vike left, dakkar joined, yeahnoob_ left 09:27 vike joined
lizmat afk for a few hours& 09:29
09:29 kjs_ joined
dalek p: a918d58 | donaldh++ | t/nqp/59-nqpop.t:
Fix typo in rindex test case.
09:37
09:46 virtualsue left 09:48 laouji_ left, laouji joined 09:52 espadrine_ joined 09:59 fhelmberger joined, aborazmeh left 10:00 bolangi left 10:06 asdf12z_ left
FROGGS jnthn: the 'is rw' on native types does not involve strings, right? 10:13
10:13 breinbaas left
dalek kudo/nom: f83c813 | FROGGS++ | t/04-nativecall/14-rw-attrs. (2 files):
add tests for 'is rw'-attrs in CStructs
10:14
10:14 [Sno] left 10:20 [Sno] joined
FROGGS jnthn++ # 'is rw' in CStructs is damn awesome and lets me delete a lot of lines :o) 10:25
10:31 Ugator joined 10:32 xinming left 10:33 laouji left, laouji joined, xinming joined 10:35 colomon joined
donaldh FROGGS++ # 'is rw' is indeed awesome for NativeCall 10:40
FROGGS why do I get karma? 10:43
it lets me rewrite a CStruct like this: gist.github.com/FROGGS/2148e2b9f241e106963a
top = old, bottom = new
donaldh originally prototyped using 'is rw' for out params. The current pattern is CArray[OpaquePointer] is clumsy by comparison.
FROGGS ohh, I am talking about attributes here 10:44
10:44 Ven left
donaldh Yep, I realise that. More pervasive use of 'is rw' would be awesome. 10:44
FROGGS 'is rw' on parameters is still in the native-ref branch I think 10:45
though, Pointer[int32] should also be a better solution to CArray[OpaquePointer]... 10:46
but that means you have to wrap your value explicitly
donaldh Well SQLite3 passes back a void* in e.g. sqlite3_open(Str $filename, CArray[OpaquePointer] $handle) 10:48
sqlite3_open(Str $filename, OpaquePointer $handle is rw) # would be nicer
10:48 ribasushi left 10:50 Ven joined
FROGGS true 10:50
but you can use the type Pointer instead
10:51 laouji left, laouji_ joined
donaldh What's the difference between the two? 10:51
FROGGS they are identical... but OpaquePointer will be deprecated soon 10:52
donaldh ah, okay
FROGGS we needed a short name because Pointer can now be typed, like CArray
so you can even write Pointer[void] if you want to be verbose
or Pointer[MyStruct], if you want to be able to call $ptr.deref 10:53
10:54 ribasushi joined
donaldh nice 10:55
arnsholt There's no point to Pointer[void], is there? 10:59
That's just an OpaquePointer
11:01 larion joined
arnsholt Oh, but if you deprecate OpaquePointer entirely, I guess there is =) 11:01
nwc10 where's our drive-by travis bot for the main Rakudo tests? 11:06
t/01-sanity/22-KEY.t fails :-(
11:06 vendethiel joined, kaleem joined 11:11 chenryn left
masak nwc10: on which platform? 11:11
reproduced here, on Moar. 11:16
throws_like { $mh.BIND-KEY("a",$a) }, X::Bind,:target<MixHash>,"\$mh.BIND-KEY"; # the failing test 11:17
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/runtime/CORE.setting.moarvm:throw:4294967295)␤ from src/gen/m-CORE.setting:15249 (/home/camelia/rakudo-inst-1/languages/perl6/runtime/CORE.sett…»
masak m: my $a = 42.5; my $mh = <a b b c c c>.MixHash; $mh.BIND-KEY("a",$a)
camelia rakudo-moar f83c81: OUTPUT«Unhandled exception: Cannot bind to MixHash␤ at <unknown>:1 (/home/camelia/rakudo-inst-1/languages/perl6/runtime/CORE.setting.moarvm:throw:4294967295)␤ from src/gen/m-CORE.setting:15249 (/home/camelia/rakudo-inst-1/languages/perl6/runtime/CORE.sett…»
masak m: my $a = 42.5; my $mh = <a b b c c c>.MixHash; try $mh.BIND-KEY("a",$a); say $/.^name
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
masak m: my $a = 42.5; my $mh = <a b b c c c>.MixHash; try $mh.BIND-KEY("a",$a); say $!.^name
camelia rakudo-moar f83c81: OUTPUT«Cannot bind to MixHash␤ in block <unit> at /tmp/IFjGfulfou:1␤␤»
nwc10 but the former is more interesting.
dalek kudo/nom: dcd7ee0 | (Carl Masak)++ | t/01-sanity/22-KEY.t:
fix copy+paste-o

Unbusts a failing test.
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:23 laouji_ left 11:25 kaleem left
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:26
masak today's autopun spotting: twitter.com/_youhadonejob/status/5...1574689792 11:27
11:27 laouji joined 11:31 xinming left
donaldh bartolin: please go ahead 11:32
11:32 xinming joined
bartolin donaldh++ for fixing those JVM issues 11:33
dalek c: e721247 | moritz++ | lib/Language/objects.pod:
Example for submethod BUILD
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)
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.
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
Ugator ah :-) thanks @yoleaux
and nwc ;)
nwc10 Ugator: no better than any other big iron Unix
Ugator so you had no luck on aix yet? 11:37
I dont really understand what you said there :D
lizmat masak++ indeed, sorry for the pasto 11:39
masak no sweat. 11:40
11:40 kaleem joined
nwc10 Ugator: "no luck" might not be an accurate phrase 11:45
I tried. I figured out roughly what needs to be done. It's possible, but not trivial.
dalek ast: b9c0463 | usev6++ | S32-exceptions/misc.t:
Unfudge test for RT #121935
11:46
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=121935
11:46 cschwenz joined 11:47 cschwenz left, tinyblak left
Ugator nwc: okay, thanks :) I hope someday someone can help you 11:48
lizmat FROGGS: t/04-nativecall/14-rw-attrs.t (Wstat: 512 Tests: 16 Failed: 2) 11:50
Failed tests: 14, 16
dalek kudo/nom: dc6756e | lizmat++ | src/core/ (3 files):
More generally fix disallowed binding fail
11:57
12:04 tinyblak joined 12:12 chenryn joined 12:14 vendethiel left
dalek kudo/nom: 0c5a0fa | lizmat++ | src/core/Baggy.pm:
Remove superfluous ASSIGN-KEY candidate
12:16
12:16 chenryn left
TimToady eating lunch in LHR 12:20
12:21 chenryn joined 12:22 vendethiel joined
lizmat sends an EU welcome 12:24
(while it's still possible to do so when at LHR ;-)
TimToady name service seems to suck, but fortunately my irssi server is numeric IP address :) 12:25
FROGGS lizmat: can I get a detailed gist? 12:28
lizmat gist.github.com/lizmat/62d85c9f5a5d9910346d 12:29
FROGGS ahh very interesting 12:30
nwc10 TimToady: you mean they haven't grafittied 8.8.8.8 there yet?
tadzik FROGGS: i.imgur.com/fNEy5Wd.gif
FROGGS *g* 12:31
12:31 cschwenz joined
dalek kudo/nom: 5d1eb39 | lizmat++ | src/core/Nil.pm:
Bring Nil.BIND-KEY(...) in line
12:31
12:33 cschwenz left
FROGGS lizmat: duh, I made a stupid mistake 12:33
dalek kudo/nom: f8002f3 | FROGGS++ | t/04-nativecall/14-rw-attrs.c:
fix copy+pasto, lizmat++
12:35
lizmat tests clean now, FROGGS++ 12:37
dalek ast: 62ca417 | usev6++ | S14-roles/basic.t:
Add test for RT #123002
12:39
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=123002
FROGGS awesome 12:44
bartolin++ # for pervasive awesomeness 12:45
12:45 vendethiel left
moritz indeed, bartolin++ 12:46
Ven puu.sh/guo9P/cabb324b9a.png and this is why you want your arrays to be first class :D
FROGGS hehe
psch o.o 12:47
moritz tell me this isn't true
psch but... varargs...?
FROGGS that's sooo stupid
Ven psch: varargs? with arrays?
psch sure
Ven psch: mind showing me? :)
psch prepares to pull his foot out of his mouth
masak I'm pretty sure that code is from before Java had varargs. 12:49
12:49 coffee` joined, chenryn left
Ven masak: it might be, yes, but even then -- java arrays are goddamn awful 12:50
moritz learned a bit java 1.4
masak Ven: no argument there.
psch Ven: gist.github.com/peschwa/18a71ad844937594ec12
i do also agree
masak Ven: a lot of those decisions seem to be based on misguided tradeoffs for performance.
psch especially native arrays vs reference arrays
12:51 laouji left
masak Ven: or tradeoffs that made sense in the 90s, but not so much anymore. 12:51
12:51 chenryn joined 12:53 virtualsue joined
Ven masak: right ;-). so many languages were created in the 90s without that kind of crazy tradeoffs, though! 12:53
you might argue they sacrificed speed at time time...
that* time
masak Smalltalk comes to mind.
psch Ven: so how far did i miss the point, ooc? 12:57
assuming it's not just "the code is older than varargs"
Ven psch: that sounds about right :-) 12:58
psch: the code is *really* old
masak: smalltalk is really interesting, though :P 12:59
masak Ven: it is. it's one of the philosophically pure/considered ones, like Lisp or Forth. 13:00
Ven masak: not really
Self would be, in this case.
masak I stand by my point.
Ven: have you read worrydream.com/EarlyHistoryOfSmalltalk/ ?
(Self is interesting too, though. all on its own) 13:01
Ven masak: I'll read it 13:02
masak warning: big read.
but worth it.
Ven masak: I've read alan kay say that self was more "philophisically pure" than smalltalk from his pov
masak ok.
Ven oh, then I might not have the time right now
Ven goes back to his php and java...
13:03 vendethiel joined
abraxxa poor Ven! 13:04
masak .oO( is Ven working on PHP and vendethiel on Java, or the other way around? )
13:04 coffee` left
Ven masak: considering how much vendethiel is disconnecting, he might not be working a lot.... ;) 13:04
masak :)
Ven
.oO( I wonder how much fun is my computer having, without me, at home ... )
13:05
dalek osystem: 63636bb | (Andrew Egeler)++ | META.list:
Add Auth::SAML2
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.
Ven masak: it wouldn't be for me, tbh ;-)
It's just that - heh - school!
13:07 coffee` joined
TimToady -> gate 13:13
masak m: class TimToady {}; my @gate; TimToady ==> @gate; say @gate
camelia rakudo-moar f8002f: OUTPUT«(TimToady)␤»
masak \o/
the (TimToady) is in the @gate! :D 13:14
13:14 chenryn left
Ven
.oO( the bloody TIMTOWDIGate )
13:17
DrForr Bucharest then over here to Cluj, I think?
13:17 Guest71997 left
masak has no cluj 13:18
13:20 bowtie joined, bowtie is now known as Guest72861
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
jnthn FROGGS moritz: what is the reason for having an ASSIGN-KEY, *and* an AT-KEY is rw ?
is that because not all assignments to {} are going through ASSIGN-KEY ? 13:23
FROGGS I have no idea
lizmat neither 13:24
FROGGS my guess would be that at_key was not rw at some point...
moritz lizmat: I know that at_key rw was before we had assign_key
FROGGS ohh, heh
moritz and was obviously necessary
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.
moritz no idea if it's still necessary 13:25
13:25 brrt joined, vendethiel left
moritz lizmat: maybe for autovivification (*handwave*) 13:26
moritz doesn't actually know how autoviv works
lizmat $!whence
moritz that's just an attribute
lizmat with a closure to be executed if set 13:27
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
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:
multi method AT-KEY(Any:U \SELF: $key) is rw {
nqp::bindattr(my $v, Scalar, '$!whence',
-> { SELF.defined || (SELF = Hash.new);
SELF.BIND-KEY($key, $v) });
$v
}
note that it won't create the Hash until it is actually being assigned
13:30 ihabhussein left
lizmat the container to which an assignment is done, has a $!whence that is executed prior to doing the assignment 13:31
</autoviv lecture>
moritz so Scalar ahs the $!whence attribute 13:32
not the hash
lizmat yup, and in this case it will create the hash if it doesn't exist yet
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 kaleem left
lizmat I think that should die, and not silently not do the assignment 13:34
moritz nastiness 13:35
lizmat yup 13:37
13:37 raiph joined
lizmat anyways, it feels that either ASSIGN-KEY should go, or AT-KEY should no longer be "is rw" 13:37
which would allow for some AT-KEY opts 13:38
dalek kudo-star-daily: 544da94 | coke++ | log/ (9 files):
today (automated commit)
13:40
rl6-roast-data: b578440 | coke++ | / (9 files):
today (automated commit)
[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 13:49 kaleem joined
[Coke] jvm still dying. (my bisect was questionable, need to rerun it.) 13:51
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.
nwc10 worked on "my" machine 13:54
[Coke] jvm? I'm getting 284 failures on hack.
psch nqp master/HEAD looks better, but still has a few spots that aren't working
nwc10 er, sorry, not clear, MoarVM
psch lizmat++ fixes most of that yesterday iirc 13:55
*fixed
nwc10 very not clear
psch to be clear: rakudo-j build against nqp HEAD has only a few spectest failures
[Coke] gist.github.com/coke/6818867903c2c6ae3116 shows the first test failure.
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.
and this is as of b8a4665
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
lizmat off to Amsterdam to see TheDamian: nluug.nl/events/20150310conway/index.html 13:57
[Coke] psch: ok, that's 1 out of 284. :(
er, :)
13:57 lizmat left
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
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?
[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
[Coke]: the one you gisted stays failing, in any case
i remember that :) 14:01
14:01 petercommand left 14:04 brrt left, dayangkun left 14:08 vendethiel left, xfix joined 14:09 MadcapJake joined, petercommand joined 14:10 petercommand left, petercommand joined 14:13 muraiki joined 14:30 raiph left
donaldh [Coke]: my rt id is donaldh 14:30
bartolin++ has beaten me to closing JVM tickets. 14:31
14:32 cschwenz joined
cschwenz p6: say 3; 14:34
camelia rakudo-moar f8002f: OUTPUT«3␤»
|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. github.com/niner/Inline-Perl5/commit/c840b8d1bd may be of interest to you.
donaldh TimToady did bump NQP_REVISION to 2015.02-84-g27bc873
|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
where eq matches against $.s and == matches against $.i
(extremely simplified example)
moritz |Tux|: == will call method Num or Numeric, eq will call method Str 14:37
m: class C { has Int $.i; has Str $.s; method Str() { $!s }}; say C.new(i => 5, s => 'flurb') eq 'flurb'
camelia rakudo-moar f8002f: OUTPUT«True␤»
|Tux| then I don't like what Text is_deeply does, as my class already has those methods
moritz is_deeply does structural comparison with eqv 14:38
if that's not what you want, don't use is_deeply
is() uses string comparison
psch thought of infix:<===> when reading "object equality"
|Tux| is there an is_deeply that does == and eq?
moritz psch: me too, but thankfully |Tux| provided enough context :-)
psch and here i was hacking together an example that overwrites WHICH... :)
moritz |Tux|: if it did eq and/or ==, it wouldn't be deeply anymore
|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
(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;
camelia rakudo-moar f8002f: OUTPUT«OK NUM␤OK Str␤»
14:41 cschwenz left
FROGGS |Tux|: why don't you use is()? 14:41
|Tux| assumes class C cannot overload eqv :)
smls moritz: Why (other than historical reasons) does `is` use string comparison?
`eqv` would seem more appropriate in the context of Perl 6 imo
|Tux| because I have a liis of lists and expanding that to is won't work?
does «is([[1,2],[3,4]],[[1,2],[3,4]],"text");» go deep? 14:42
smls, is() now also knows about object type and undefinedness 14:43
moritz smls: because eqv is quite strict in its comparison 14:44
smls: so much so that a list/array/parcel confusion often causes it not to pass, with no good explanation
smls Well, it could be made to print a good explanation... :P 14:45
moritz how? 14:46
FROGGS got Parcel but expected Array?
I mean, it can print that when the type differs
moritz then it doesn't use eqv anymore
eqv can be amended by user-supplied multis 14:47
and doesn't have a channel for passing back any information besides a Bool
FROGGS ahh#
-#
|Tux| oh wow, is() goes deep. 14:48
assumption--
I - having perl5 in mind - assumed it only allowed scalars
</headdesk>
moritz it doesn't go deep, it simply stringifies
m: say ~[1, 2]
camelia rakudo-moar f8002f: OUTPUT«1 2␤»
14:49 chenryn joined
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'
camelia rakudo-moar f8002f: OUTPUT«ok 1 - huh␤»
smls ^^ moritz
|Tux| m: my@a=[1,2];@a.push([@a,@a]);say ~@a
camelia rakudo-moar f8002f: OUTPUT«1 2 1 2 1 2␤»
moritz smls: not huh. Works as designed.
FROGGS gorram, use whitespace, it's there
|Tux| in my case I want is() nor is_deeply() 14:51
FROGGS moritz: are you talking to me? :o)
14:51 Ven left
moritz FROGGS: erm, yes 14:52
FROGGS moritz: it is slightly surprising at a first glance, but of course makes sense 14:53
14:53 zoosha left, bjz joined
moritz it's not more surprising than eq returning True for those things 14:53
|Tux| a class cannot overload eqv, right?
moritz |Tux|: you can export an infix:<eqv>(YourClass $a, YourClass $b) 14:54
a multi, that is
FROGGS |Tux|: you can add extra (more specific) candidates to all operators
|Tux| hmm, interesting
FROGGS the question is: does that make sense or do you want to just make your tests look shiny 14:55
if it is just for these tests, the declare that extra op candidate in your test script
then*
14:56 rmgk_ joined, rmgk is now known as Guest77628, Guest77628 left, rmgk_ is now known as rmgk
|Tux| pondering. I don't know yet 14:57
|Tux| finished implementing filters in CSV
$csv.callbacks ("filter", &Filter);
in which the filter function is to return true (accept record) or false (reject record) 14:58
callbacks/hooks are easy in perl6 (compared to XS) 14:59
14:59 Rounin left
|Tux| next is to do rfc7111 and study about lazy lists 14:59
col=1,4-7,19-* => (1,4..7,19..Inf) should be safe in pelr6 :) 15:00
and I can use that with any
15:01 kaleem left 15:02 njmurphy joined, gfldex joined
|Tux| is the current index available for @c in «for @c -> $c { ... }» ? 15:03
hoelzro |Tux|: I think there's a method that gives you that 15:04
PerlJam |Tux|: for @c.kv -> $i, $c { ... }
FROGGS right
hoelzro ah, thanks PerlJam 15:05
|Tux| also in «my @new = @c.grep($idx == any @range);
»?
[Coke] donaldh++ is now a bugadmin. whee.
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 …
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);
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␤»
FROGGS PerlJam: that is more general
PerlJam yeah
15:09 raiph joined
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␤»
FROGGS m: my @a = <a b c d e f g h>; say @a.kv.pairup.grep(*.value eq any <a d f>)».key
camelia rakudo-moar f8002f: OUTPUT«0 3 5␤» 15:10
15:10 kaleem joined
PerlJam |Tux|: dont you just want a slice? 15:10
FROGGS m: say 1,4..7
camelia rakudo-moar f8002f: OUTPUT«14..7␤»
FROGGS m: say my @a = 1,4..7 15:11
camelia rakudo-moar f8002f: OUTPUT«1 4 5 6 7␤»
|Tux| no, @range might spec well outside of what I get from
FROGGS m: my @range := 1,4..7,19..Inf; my @c = (^10).grep-index(any @range);
camelia rakudo-moar f8002f: OUTPUT«(timeout)» 15:12
FROGGS hmmm
15:12 Ven joined
|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)␤»
FROGGS m: my @range := 1,4..7,19..Inf; my @c = @range.grep-index(any ^10);
moritz it tries to flatten the range
FROGGS goes back to work 15:13
|Tux| I would have expected 1,4,5,6,7
camelia rakudo-moar f8002f: OUTPUT«(timeout)»
15:13 kaleem left
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␤»
|Tux| as said, I need more study-time on this
PerlJam++
WOW!
|Tux| prepares to go to Damien in Amsterdam
15:15 kaare_ left
Ven ha! :( 15:15
15:26 spider-mario joined 15:27 zoosha joined 15:42 mr-foobar joined 15:45 larion left, larion joined
b2gills FROGGS: instead of .kv.pairup just call .pairs 15:48
FROGGS ahh, makes sense 15:50
15:54 larion left
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);␤»
Ven if an "is" wraps a sub, then it probably shouldnt get checked :)
masak can't decide who is right, Ven or Rakudo 16:02
16:02 njmurphy left
masak probably Ven. 16:02
masak submits rakudobug
Ven :D
masak Ven: it is seldom this close. congratulations.
Ven thanks, I guess
psch agrees 16:03
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
camelia rakudo-moar f8002f: OUTPUT«7␤»
PerlJam psch++
psch but then we can't rebind a normal sub declaration either
which i think was justified with "it would break optimisation" 16:04
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.
this one would be from "compile-time args checking AND sub traits" 16:08
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)
osfameron growing problems through parse tree combinations...
you could then use that + GA to evolve arbitrary programs based on a test suite :D
osfameron hand-waves
PerlJam grammar-as-generator
masak oh, I wasn't even suggesting generating code for finding the bug. just generating ideas.
(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:11
masak looks at the RT queue and smiles at seeing some new names 16:14
m: constant k = k 16:17
camelia rakudo-moar f8002f: OUTPUT«===SORRY!===␤Cannot invoke this object (REPR: Null, cs = 0)␤»
masak *evil grin*
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)␤»
PerlJam or ... 16:20
m: constant dox = dox; # :-)
camelia rakudo-moar f8002f: OUTPUT«===SORRY!===␤Cannot invoke this object (REPR: Null, cs = 0)␤»
masak m: constant TURTLES = TURTLES # all the way down!
camelia rakudo-moar f8002f: OUTPUT«===SORRY!===␤Cannot invoke this object (REPR: Null, cs = 0)␤»
16:21 Ven left
masak meanwhile, LinkedIn is saying things like "Maybe it's time now to jump on the bandwagon." 16:23
16:24 hkatz joined
hkatz Hey there can anyone help me with a question about perl6? I just started. 16:25
masak hkatz: welcome! please ask :)
hkatz Woo an irc channel that's active!
masak \o/
hkatz ok so I have a grammar and some tokens
masak active and kind! :)
hkatz and I can access the match object token with the following:
$match<token>
let's say that I have a variable for which token I want to access
how do I toll p6 to interpolate $token? 16:26
such as: $match<$token>
masak $match{$token}
hkatz ^^doesn't work obviously
masak just like in Perl 5.
hkatz thank you
wait
no I tried that first, it didn't work
masak .<> is for constant strings
.{} is for expressions
both do keyed lookup.
PerlJam hkatz: maybe put all of your code/input/whatever on a paste site somewhere (like gist.github.com) ?
masak what PerlJam said.
we can help you better if we see your code. 16:27
16:27 Ven joined
PerlJam yeah, Perl is all about context 16:27
:)
hkatz gist.github.com/hjkatz/e3b8f79dbcf23e16cd81
there you go
basically messing aronud with subsets, grammars, and main
showing it off to coworkers :P
masak :) 16:28
hkatz given input: "google.com" "hostname"
PerlJam hkatz: maybe you should look at $match.perl
hkatz I receive "(Any)"
it's also (Any)
Ven { $_ ~~ /^TOP$/ | /^byte$/ | /^ip$/ | /^schema$/ | /^hostname$/ | /^port$/ | /^path$/ }
I'd probably write
masak was gonna point to that line :)
Ven where <TOP byte ip schema hostname port path>
masak Ven: `where any <...>`
hkatz oh I can do that? neato
Ven isn't smart-matching enough? 16:29
masak no.
used to be.
Ven oh
masak but then we learned it's a bad idea to do that.
Perl 5 didn't learn that :/
they got psychoticmatch instead
16:29 telex left
hkatz now main complains its not matching 16:29
nvm I typed it wrong 16:30
still has the incorrect output from $match thougm
though*
16:30 telex joined
masak hkatz: 16:30
$ perl6 -e 'subset Foo of Str where any <A B C>; sub MAIN(Foo $f) { say $f }' A
A
$ perl6 -e 'subset Foo of Str where any <A B C>; sub MAIN(Foo $f) { say $f }' D
(usage message)
hkatz: so, works here. 16:31
hkatz masak, that works
16:31 perl6_newbee joined
masak hkatz: forgot the `any`? :) 16:31
hkatz ya
masak yeah, don't listen to Ven :P
Ven :(
masak Ven: sorry.
16:31 chenryn left
masak hugs Ven 16:31
Ven it's me!
hkatz ok, so $match.perl prints "Any"
Ven hugs masak
hkatz and $match{$token} prints "(Any)"
masak hkatz: maybe it didn't match?
hkatz i would expect a regex output
PerlJam hkatz: anyhow ... you're input doesn't match your grammar. Your grammar requires a trailing '/' which you do not have.
masak PerlJam++ 16:32
FROGGS hkatz: trailing... ehat PerlJam said
b2gills try "google.com/" "hostname"
hkatz oh bananas
this is what I get for copying a grammar from online
16:32 diana_olhovik_ left
hkatz can I query $match to see if one exists? 16:33
donaldh say $match if $match
masak hkatz: you should probably `Grammar.parse(...) or die "didn't match"`
hkatz: fail fast! :)
hkatz lol thanks
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
FROGGS that makes it work btw:
- '/' <path>?
+ ['/' <path>?]?
masak hkatz: the general pattern there is `rule foo { [ stuff to parse | { fail } ] }`
hkatz is there a graceful die built into p6? Like carp? 16:35
PerlJam masak: don't you mean || { fail } ?
masak FROGGS++ # speaking in diffs
PerlJam: oh! so I did.
PerlJam: though I'm not 100% convinced it matters, as long as the lhs has a non-empty declarative prefix.
PerlJam It matters conceptually then if nothing else :)
masak hkatz: no :/
hkatz: I would love for someone to write a Carp module for p6. 16:36
hkatz ah well, can't get everything I guess
masak PerlJam: indeed.
hkatz: it is possible to access the caller, and you get a stacktrace by default.
hkatz one last question
the MAIN sub creates a usage for you automatically 16:37
PerlJam hkatz: it won't be the last, I guarantee you :)
hkatz can you tell it to show the types of the arguments?
or customize the message?
PerlJam hkatz: write your own USAGE if you want custom
masak or suggest reasons why the thing you wanted should be auto-generated by default ;) 16:38
16:38 kjs_ left
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
especially if you name your types well 16:39
PerlJam Hmm.
hkatz that's ofcourse if internally p6 knows the types names (and not just gibberish) 16:40
Ven wrote a blog post about that :-)
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?
hkatz I dunno :P
is "with" a keyword?
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 {}
sub MAIN( NonemptyString $string ) with Types, Sigils {}
sub MAIN( NonemptyString $string ) with Types, Sigils, Etc... {}
FROGGS hkatz: if you really want to show off you can do that too:
-subset UrlToken of NonEmptyString where { $_ ~~ /^TOP$/ | /^byte$/ | /^ip$/ | /^schema$/ | /^hostname$/ | /^port$/ | /^path$/ };
+subset UrlToken of NonEmptyString where { URL.^can($_)[0].WHAT ~~ Regex };
:P
hkatz then it could be extended to any sub
donaldh Usage: url.pl <url> <wanted-fragment>
Ven hkatz: perl6advent.wordpress.com/2014/12/...t-of-main/
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?
hkatz well I've got to go, thanks all for your help!
&mysub.USAGE
;)
we have other .WHAT, .perl, and .chars 16:44
16:44 cschwenz joined
hkatz everything's an object 16:44
16:44 hkatz left 16:47 smls left
psch &MAIN.WHY already gets appended, maybe the param WHYs make sense too 16:47
although i gotta say that naming a param to MAIN $string is a bit lacking 16:48
16:52 zakharyas left 16:58 pecastro left 16:59 cschwenz left 17:00 donaldh left 17:05 pecastro joined 17:07 sqirrel joined 17:09 FROGGS left
perl6_newbee Hi all. 17:14
17:15 diana_olhovik_ joined
PerlJam perl6_newbee: greetings 17:15
perl6_newbee :-)
17:15 kjs_ joined
psch o/ perl6_newbee 17:15
perl6_newbee ha I figured it out on my own :-) 17:17
17:17 Rounin joined 17:18 krakan left 17:20 yqt joined
Ven \o 17:20
17:20 Ven left
itz I don't see a schedule for the Dutch PW yet? but I imagine there will be much perl6 goodness? 17:20
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
I think debugging is necessary and the module is installed anyway earlier or later
17:25 grondilu joined
grondilu Larry's 2015 FOSDEM talk is still not available, is it? 17:26
17:30 Ven joined
dalek pan style="color: #395be5">perl6-examples: 0560aa1 | paultcochrane++ | categories/tutorial/ (5 files):
[tutorial] add title and author info
17:35
pan style="color: #395be5">perl6-examples: efeec43 | paultcochrane++ | categories/euler/prob005- (2 files):
Merge branch 'master' of github.com:perl6/perl6-examples
17:35 eli-se joined
eli-se hola 17:36
perl6_newbee hi
bartolin m: my int $x = Int 17:40
camelia rakudo-moar f8002f: OUTPUT«(signal SEGV)»
bartolin I've lost track in the last week or so -- is this a known problem? 17:41
m: sub foo(int $x) { $x }; foo(Int) # this works, gave a segfault earlier; RT #123789 17:42
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=123789
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 tinyblak left
Ven hi eli-se 17:43
eli-se hi Ven 17:44
Ven Wow, Pypy has a GIL.
eli-se inb4 Perl 6 implementations have GILs 17:46
17:46 molaf joined
Ven they don't... Or at least not that I know of :) 17:47
17:47 perl6_newbee left
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:49
Ven b2gills: Jython doesn't have a GIL 17:50
dalek pan style="color: #395be5">perl6-examples: 2689d5c | (L. Grondin)++ | rosalind/cons-grondilu.pl:
minor change
pan style="color: #395be5">perl6-examples: e03747e | (L. Grondin)++ | / (589 files):
Merge branch 'master' of github.com:perl6/perl6-examples

Conflicts: rosalind/cons-grondilu.pl
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
you can perfectly implement Python without a GIL, especially since "spec" in Python means "speculation"
17:51 mohij joined 17:54 virtualsue left 17:55 dakkar left 17:56 tinyblak joined, sqirrel left 18:00 colomon left 18:02 colomon joined 18:04 tinyblak left 18:06 colomon left
dalek ast: cae9192 | usev6++ | S06-signature/types.t:
Add test for RT #123789
18:07
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=123789
18:08 kyclark joined 18:11 eli-se left 18:12 kjs_ left
timotimo what the pypy devs have to say about "gil-less python" is very interesting 18:12
basically, there's two ways to make a python interpreter that behaves the way a python programmer expects it to:
have a GIL, or sprinkle the built-in types with fine-grained locks 18:13
well, there's the third way, which is building STM, which they are also doing
18:18 J-L_ joined 18:19 cognominal joined
J-L_ A quick question: Is there a way to weaken a reference in Perl6 ? Like Perl5's Scalar::Util::weaken() ? 18:19
18:19 J-L_ left
timotimo what is making all these test reports show up as N/A with no compilation output and no test result output? testers.p6c.org/recent.html 18:19
18:20 J-L_ joined
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.
J-L_ Whoops... I have two irc connection going on. I'll exit from this, and continue as J-L.
timotimo J-L_: is that for allowing the target of a reference to be garbage collected if only that "weak" reference still exists?
J-L timotimo: That's my intent, yes. 18:22
timotimo we don't have that at all currently
i have no clue if we'll end up having it in moar and/or jvm
J-L Something's strange here... I'm not seeing all the chatter. I'm gonna leave and reconnect. 18:23
18:23 J-L left, J-L_ left
TimToady and the Mrs in Budapest now 18:24
18:24 J-L joined 18:25 rurban left
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:25
grondilu proposal for a rewrite of base-repeating: gist.github.com/grondilu/b44db2a1af91e736382a 18:26
kyclark playing with P6, what does the trailing “<“ mean? say ">$read_id<";
i was just trying to decorate some output, but I’m obviously using some operator 18:27
timotimo J-L: when the main thread is done with the channel, why not .close it? 18:28
in general, weak references are useful when you don't have a clue when the thing is no longer needed
or when putting explicit management into the code would cause sprinkles of management to land all over the whole code base 18:29
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, colomon joined
TimToady kyclark: postfix <> is literal hash subscript; you can use ">{$read_id}<" to keep it from seeing the < 18:31
18:31 eli-se left
TimToady m: say %*ENV<HOME> 18:31
camelia rakudo-moar f8002f: OUTPUT«/home/camelia␤»
kyclark ok, thanks!
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.
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?
TimToady but only inside quotes
m: say "%*ENV\<HOME>"
camelia rakudo-moar f8002f: OUTPUT«%*ENV<HOME>␤»
TimToady m: my $x = "stuff"; say "$x\<and nonsense>" 18:33
camelia rakudo-moar f8002f: OUTPUT«stuff<and nonsense>␤»
kyclark Looks like File.basename doesn’t take an arg of the suffix (list) to trim? 18:34
> $f.basename(".fa")
Too many positionals passed; expected 1 argument but got 2
18:34 molaf left 18:35 yqt left, eli-se joined
timotimo J-L: trying to receive data on a closed channel raises the X::Channel::ReceiveOnClosed exception 18:37
J-L: oh, and also you can ask .closed 18:39
which will give you a Promise
18:40 colomon left
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:41
18:45 amaliapomian joined
J-L timotimo: .closed returns a Promise. Will that tell me if the channel is really closed? 18:48
How do I use the REPL feature of perl6 on a script? Kind of like "perl -de script.pl", but with Perl6.
18:50 kyclark left
dalek rl6-roast-data: 31418ff | coke++ | / (9 files):
today (automated commit)
18:50
timotimo J-L: the "closed" message is part of the queue, as in it's "in-band"
18:51 fhelmberger left
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
otherwise you can check the promise for its status
[Coke] someone broke parrot-nqp
+t/nqp/59-nqpop.t (Wstat: 0 Tests: 126 Failed: 6)
+ Failed tests: 20-22, 32-34
rakudo-jvm much improved, thanks. 18:53
18:53 colomon joined
timotimo evaluating the promise with "so" or "?" or "not" or "!" will check for broken/kept vs planned for you without blocking 18:53
18:54 madmuid joined
hoelzro doc.perl6.org/routine/setbagmix%23S...0Operators =/ 18:56
timotimo doc.perl6.org/routine/ - haha!
hoelzro yikes 18:57
[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 perl6advent.wordpress.com/2012/12/...debugger/)
[Coke] github.com/perl6/nqp/issues/226
PerlJam assuming that still works
timotimo the debugger still works, but you install it differently 18:59
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
PerlJam J-L: What timotimo said 19:00
19:00 Ven left
J-L Okay, I couldn't install Debugger::UI::CommandLine because of 'git' not recognized on my system. 19:02
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
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
J-L PerlJam: Even use/require a *.p6 (non-module) file?
PerlJam J-L: require "filename"; # should work. 19:04
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
19:05 espadrine_ left
timotimo just put "is export" at the sub and that should work, no? 19:05
PerlJam aye
though, it may depend on if he's got a module declaration or not 19:07
timotimo i never tried, to be honest
PerlJam me either
:)
timotimo usually i'll just write a quick multi sub MAIN("test") { ... } and put a bunch of things in there 19:08
but that doesn't necessarily compare to a repl
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:09
timotimo ah, good 19:11
yeah, "is export" requiring an actual module declaration makes a whole lot of sense
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.
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 19:16 yqt joined
timotimo (sadly our REPL tends to do some very funky things, especially when := is involved) 19:16
Mouq FROGGS: Mind testing and closing #109306 ?
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=109306
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:19
[Coke] tbrowder: go to doc.perl6.org/ and look at the footer. 19:20
19:21 colomon left, rindolf left
Mouq tbrowder: github.com/perl6/doc and specifically github.com/perl6/doc/blob/master/l...e/5to6.pod (it says POD errors because it's in Pod6 not POD) 19:21
19:22 tbrowder_ joined
timotimo someone could perhaps spend a tiny bit of time reviewing faq.perl6.org/ for outdatedness and stuff; i'll be AFK for a bit now 19:23
19:23 tbrowder left
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.
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 github.com/perl6/doc/blob/master/l...e/5to6.pod ?
timotimo tbrowder_: are you looking for this? github.com/moritz/perlgeek.de/tree...erl-5-to-6
19:26 cognominal left
timotimo J-L: generally $the-thing.Int and $the-thing.Str 19:26
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
m: sub as-str(Str(Any) $foo) { say $foo; say $foo.WHAT }; as-str(1); as-str([1, 2, 3]);
camelia rakudo-moar f8002f: OUTPUT«1␤(Str)␤1 2 3␤(Str)␤»
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:29 tbrowder_ left
timotimo damn, his irc session died ... hopefully through clicking the link which replaced the irc tab with the target? 19:30
their*
19:34 kjs_ joined 19:35 Akagi201 left 19:37 Akagi201 joined, kjs_ left 19:38 kjs_ joined
J-L Thanks, timotimo. That's something I never knew about. 19:38
19:44 colomon joined
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:46
psch avuserow: adding a new nqp op needs an op mapping to a backendspecific implementation 19:51
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:52
psch isn't quite sure what's needed, besides File.isSymbolicLink() 19:53
avuserow presumably it needs Path.readSymbolicLink() or so
psch docs.oracle.com/javase/tutorial/ess...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
psch avuserow: well, moar calls libuv's uv_fs_readlink, which allegedly does the same as readlink(2)
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)
TimToady grondilu: compare the performance of 1/(2**48-1) with 1/(2**48+1) 19:56
avuserow psch: *nod*
TimToady grondilu: but yours does appear to be faster, whic his nice
19:57 abraxxa left
b2gills m: (1/3).FatRat.base-repeating(10) 19:59
camelia ( no output )
b2gills m: say (1/3).FatRat.base-repeating(10)
camelia rakudo-moar f8002f: OUTPUT«0. ???␤»
20:01 itz_ joined
TimToady grondilu's works if you poke it into FatRat rather than Rat 20:01
20:04 itz left 20:08 kjs_ left
dalek kudo/nom: 418c1f3 | TimToady++ | src/core/Rational.pm:
use grondilu's faster base-repeating
20:10
TimToady that should fix the FatRat issue as well
grondilu++ 20:11
20:12 madmuid left
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 ast: d461bad | usev6++ | S32-exceptions/misc.t:
Unfudge passing tests for JVM
moritz flussence: maybe pack has something for that?
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…»
timotimo wouldn't that be unpack?
m: say :16($_) for <0A 9F 57 2D>;
camelia rakudo-moar f8002f: OUTPUT«10␤159␤87␤45␤»
timotimo ^- my approach
ugexe hmm if i install Compress::Zlib::Raw directly (not with panda smoke) it installs fine
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 20:18 virtualsue joined
danstoner Where should I report issues with "panda" that come with rakudo star perl 6? 20:18
FROGGS danstoner: probably here: 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
ugexe the orange stats are not due to the architecture
danstoner On a "minimal" install Linux system, I was missing pre-requisites of "git" and "Test::Harness" (e.g. no "prove" command available)
FROGGS timotimo: hmmm, interesting idea
ugexe they are about the panda issue above
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?
danstoner FROGGS: thanks
ugexe FROGGS: panda is getting borked installing Compress::Zlib::Raw. it just fetches the remaining modules but doesnt try to build or test them
FROGGS eww 20:21
ugexe: can you analyse that? I did several smoke runs the last days and can not replicate your issue
ugexe all i can guess is withp6lib and %*ENV<PERL6LIB>
i tried, but the tests pass if i manually do them 20:22
gist.github.com/ugexe/bc48b6911038...-txt-L8250
FROGGS well, you could dump that and run the smoker... (without submitting results)
ugexe clearly you want to check the $bone for defined, but still
dump that? <- you mean start a new smoke test? 20:23
there are already 2 datasets on testers.p6c.org that follow the same pattern
FROGGS dump the %*ENV<PERL6LIB> from inside panda, to see if it gets messed up 20:24
20:25 rurban joined, rurban left
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…»
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"
m: class A { }; say A.new.?frabusel 20:27
20:27 kaare_ joined
camelia rakudo-moar f8002f: OUTPUT«Nil␤» 20:27
TimToady m: "3.1416".?round.say
camelia rakudo-moar f8002f: OUTPUT«3␤»
ab5tract ah, so Str has a round on itself, and this is what is unhappy.
psch Str has a round from Cool
moritz it comes form Cool
TimToady well, Cool does, I think 20:28
moritz as doc.perl6.org/type/Str should clearly indicate :-)
it does not :(
something is wrong with doc.perl6.org build 20:29
ugexe hmm just found a ghost smoking process from 4 days ago
FROGGS hmmmm 20:30
moritz oh
it seems to only transport methods, not routines in general
TimToady tries to decide if smoking a ghost would do it any harm... 20:32
20:33 fhelmberger joined
moritz sounds vaguely uncomfortable 20:33
ugexe as long as its not operating any heavy machinery
20:33 darutoko left
TimToady smoking preserves meat, but a ghost is about as far from meat as you can get... 20:34
FROGGS as far as tofu 20:35
20:35 madmuid joined 20:37 fhelmberger left 20:38 fhelmberger joined
TimToady is obviously too jet-lagged to be a productive member of society now... 20:39
TimToady ghosts off to bed &
20:39 fhelmberger left 20:42 vendethiel joined, gunod joined
gunod Is it possible to make object attributes lazy? how would that work? 20:45
FROGGS gunod: you want to initialize them at first access? 20:46
gunod exactly
psch m: class A { has $!shadow-attr; method attr { $!shadow-attr =// do { #`[ slow calculation ] 1 } };
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 } };␤»
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>␤»
psch m: class A { has $!shadow-attr; method attr { $!shadow-attr //= do { #`[ slow calculation ] 1 } } };
camelia ( no output )
psch there
gunod: the Int method in core/StrDistance is another example 20:48
github.com/rakudo/rakudo/blob/nom/...istance.pm
FROGGS either what psch++ showed or by binding a Proxy... but I think his solution is the sanest
gunod I see. not as nice as it works in Moose ;D
psch looks how it works in Moose 20:49
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
ab5tract some nice references in core, as usual, and tests
FROGGS then we have to write docs 20:51
20:51 amaliapomian left
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 :)
FROGGS :o)
20:51 breinbaas joined
FROGGS I still have to finish the NativeCall docs... 20:51
ab5tract yeah, that's more important 20:52
but if you are about to add C++ ...
FROGGS everything is important.... that is part of the problem
ab5tract then maybe it's better to wait on the docs until after that
flussence m: sub foo(&code) { 1 }␤my $bar = foo { 2; }␤$bar; # Is this error correct? Only started happening recently...
camelia ( no output )
flussence guess it isn't...
flussence updates again
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() }
ab5tract that's a good point
PerlJam docs are more important if you want to get some of the earlier adopters actually using the features :)
psch (not tested, i don't do much trait writing...)
FROGGS multi trait_mod:<is>(Attribute $attr, Block :$lazy!)
what also is important for me is that bloody bug in nqp-j, which breaks URI and the modules that depend on it... 20:54
I want to have that fixed until next release, but I already have spent too much time on it :o( 20:55
psch FROGGS++ right, the required-bang is postfix... :) 20:56
FROGGS: re that bug, i had a golfed testcase which started working in august last year, and i set it aside
20:56 Ugator left
psch FROGGS: gist.github.com/peschwa/e5aee72dcce9d4b60ec1 is the gist of the golf and irclog.perlgeek.de/perl6/2014-08-22#i_9228612 is when it apparently worked 20:58
FROGGS: the issue was/is a broken outer chain iirc?
FROGGS psch: correct 20:59
psch bisecting over rakudo and nqp is inconvenient, but maybe that data point helps
i'm looking at the native-is-rw bug that nativeref brought to jvm currently 21:00
FROGGS hmmm
my golf is a lot short happily :o)
just about a few lines in three files
21:01 zoosha left, bayprogrammer left
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
but this one has no link to <unit-outer>
21:02 Rounin left
FROGGS and then, when we deserialize and load the setting, we install the setting as the outer of the <unit-outer> 21:02
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...
FROGGS so it is just about the bloody link between <unit> and <unit-outer>
O.o
psch well, it was probably flawed in more than the obvious way :P 21:04
FROGGS okay, I think I can say the serializing is not the issue 21:08
that* 21:09
21:19 bayprogrammer joined
masak 'night, #perl6 21:27
vendethiel night :-) 21:28
21:29 cognominal joined 21:30 raiph left 21:36 tbrowder joined 21:38 raiph joined 21:44 dwarring joined, zoosha joined
psch & 21:45
tbrowder timotimo: thanks for the good link I was looking for (I got kicked off twice earlier--bad irc client) 21:49
[Coke]: thanks for the link for future use
21:51 Vlavv left, xfix left
dalek ast: 6c3d4d7 | (David Warring [email@hidden.address] | S02-literals/radix.t:
added fudged test for RT #123862 - negative radix
21:53
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=123862
21:56 wicope left, telex left
dwarring ^ do I need special RT privileges to remove the 'testneeded' tag? 21:56
21:58 telex joined
FROGGS dwarring: quite possible 22:00
22:00 aborazmeh joined, aborazmeh left, aborazmeh joined
FROGGS I removed it though 22:00
dwarring just as easy 22:01
22:01 muraiki left 22:03 Vlavv joined 22:05 espadrine_ joined 22:07 aborazmeh left
timotimo tbrowder: you know of the irclog? 22:09
22:10 kjs_ joined 22:15 spider-mario left 22:16 larion joined 22:17 kjs_ left 22:18 [Sno] left, [Sno] joined
tbrowder yes, that's where I recovered the links you and [Coke] and Mouq gave me 22:28
22:31 kjs_ joined
timotimo OK 22:31
22:32 madmuid left 22:34 larion left 22:43 adu joined
avuserow japhb: ./nqp-j -e'nqp::say(nqp::readlink("/home/ak/Music"));' 22:46
oldhome/common/music 22:47
22:47 cognominal left
avuserow so that seems to work 22:47
does anyone know how to keep github forks up to date? 22:49
vendethiel avuserow: git pull :P 22:53
avuserow nope, turns out it involves remotes
FROGGS git remote add <name> <remote url> 22:54
git pull <name> master
git push
Mouq Or just git pull <remote url>
FROGGS ahh yes, true
Mouq FROGGS: irclog.perlgeek.de/perl6/2015-03-10#i_10254254 22:55
FROGGS Mouq: yes, I'll do that when I have time
22:56 larion joined
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
s
FROGGS and then you trust me? O.o 22:57
vendethiel
.oO( what'd you trust a frog with? )
22:58
23:00 eli-se left
FROGGS delicious sauce perhaps 23:00
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:01 larion left
FROGGS hi adu 23:02
dalek p: 68accfc | (Adrian Kreher)++ | src/vm/jvm/ (2 files):
[jvm] Implement nqp::readlink
23:05
p: fbd3e5f | FROGGS++ | src/vm/jvm/ (2 files):
Merge pull request #227 from avuserow/master

  [jvm] Implement nqp::readlink
FROGGS avuserow++ 23:07
\o/ 23:10
I THINK I FIXED THAT BLOODY JVM+URI BUG! 23:11
23:11 bjz left
timotimo \o/ 23:13
FROGGS .tell jnthn the outer of all evil: gist.github.com/FROGGS/5646d051dca96e3f879f (that fixes the jvm+uri issue) 23:15
yoleaux FROGGS: I'll pass your message to jnthn.
FROGGS I know that it does not look nice, but it is a start
23:16 BenGoldberg joined 23:19 madmuid joined
avuserow thanks FROGGS. and FROGGS++ for fixing other JVM stuff 23:20
23:20 kjs_ left
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:20
23:27 virtualsue left 23:28 donaldh joined
donaldh FROGGS: What's the JVM+URI bug? 23:28
FROGGS donaldh: that one: testers.p6c.org/reports/18805.html 23:29
a week ago it just ended in a null pointer exeption 23:30
and we had that issue as long as we have the jvm backend...
(we saw it for the first time when we ran star module tests on jvm)
donaldh FROGGS++
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
ohh, that sounds like fun too 23:32
donaldh (maybe more than 1 bug) most easily exposed with ./perl6 -e '{;}'
I'm just worried when I see priorInvocation 23:33
adu FROGGS: so how goes the c-parser native-call thing?
donaldh We need to invest in eliminating priorInvocation at some point 23:34
FROGGS donaldh: aye... though I am not sure that *I* want to do that :o) 23:35
adu: well, besides that I'm not working on C parsers... very well :o)
23:36 gunod left
donaldh is too tired to do anything productive tonight; sleep& 23:37
FROGGS gnight donaldh
23:37 lizmat joined, donaldh left
adu FROGGS: I'm working on c parsers 23:37
FROGGS: I was wondering about the native-call part
FROGGS NativeCall for C and C++ is making progress... but stuff like CUnion etc need more testing
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
because that is a very important topic for me these days 23:39
23:41 bayprogrammer left 23:52 bjz joined 23:56 larion joined 23:58 bjz left