»ö« 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!
Set by masak on 12 May 2015.
00:08 cognominal joined 00:15 BenGoldberg_ joined 00:49 kaare_ joined 00:50 cognominal left 01:17 laouji joined 01:25 rmgk joined
dalek kudo-star-daily: e54e956 | coke++ | log/ (8 files):
today (automated commit)
01:30
01:36 atroxaper joined 01:40 atroxaper left 01:47 ilbot3 joined 01:56 dayangkun joined 01:57 chenryn joined 02:05 HoppingMadMan joined 02:21 leont left, amurf joined 02:26 amurf left 02:30 raiph left 02:49 labster_ joined, HoppingMadMan left, labster_ is now known as labster 02:52 noganex joined 02:56 yqt left 03:07 gfldex left 03:12 grondilu joined
rangerprice m: print "Hello World" 03:35
camelia rakudo-moar 3e88cf: OUTPUT«Hello World» 03:36
03:40 telex left 03:42 atroxaper joined, telex joined 03:51 skids left 03:53 chenryn left 04:17 aborazmeh joined, aborazmeh left, aborazmeh joined 04:22 khw left 04:30 chenryn joined 04:32 atroxaper left 04:35 vendethiel joined 04:37 pierrot joined 04:38 atroxaper joined 04:54 Calibellus left 05:00 dayangkun left 05:03 llfourn joined, vendethiel left 05:08 amurf joined 05:09 sisar joined 05:10 amurf left, amurf joined
sisar I'm unable to install MoarVM/Rakudo in Cygwin due to pthreds unavailability. Is there a workaround ? Something in which i can ask it to skip building libuv/thred support. 05:11
*pthreads
05:11 nightfrog joined 05:12 dayangkun joined 05:15 ChoHag joined 05:16 rangerprice left 05:18 BenGoldberg_ left 05:42 atroxaper left 05:46 atroxaper joined 05:56 atroxaper left 05:58 diana_olhovik_ joined 06:00 lolisa joined 06:02 atroxaper joined 06:08 FROGGS left 06:09 jack_rabbit joined, lolisa left 06:12 rurban_ joined 06:34 azawawi joined 06:35 jkva joined 06:38 aborazmeh left 06:40 nightfrog left 06:42 chenryn left 06:43 rurban joined
Timbus sisar, pretty sure libuv is a hard dependency for moarvm 06:43
azawawi hi
Timbus dunno about turning off pthreads for libuv though.. might? be possible
06:45 chenryn joined
nwc10 sisar: is there a reason why you want a Cygwin Rakudo particularly? MoarVM (and Rakudo) build for native Win32, and there are MSI installers for download at rakudo.org/downloads/star/ 06:46
06:51 jkva left 06:52 abraxxa joined 06:53 Ven joined 06:54 jkva joined 06:56 abraxxa left 06:59 Ven left
ChoHag How can I pass the contents of a hash as named arguments to a function? 07:00
nine m: sub foo(:$bar) { say $bar }; my %h = bar => 1; foo(|%h); 07:02
camelia rakudo-moar 3e88cf: OUTPUT«1␤»
ChoHag Hmm I tried |%var before. Why does it work this time?
sisar nwc10: oh, ok. No showstopper reasons. Only that I'm more comfortable in Linux, but currently forced to use Windows. Ok, I'll try the Win32 version.
thanks
which MSI should I use ? JIT or no JIT ? 07:03
07:04 nightfrog joined
sisar goes with 64-bit JIT 07:04
07:06 Ven joined 07:08 sisar left, salva joined 07:09 darutoko joined, nightfrog left 07:10 abraxxa joined, FROGGS joined 07:12 nightfrog joined 07:13 Ven left 07:15 espadrine joined 07:16 RabidGravy joined 07:21 bjz joined 07:23 zakharyas joined
RabidGravy morning! 07:24
07:24 nightfrog left 07:26 nightfrog joined
FROGGS mornang RabidGravy 07:26
RabidGravy Rarr!
FROGGS :P 07:27
dalek kudo/nom: d35b76f | ugexe++ | src/core/CompUnitRepo/Local/Installation.pm:
[bugfix] /bin wrapper requires CURLI object

CompUnitRepo::Local::Installation /bin wrappers work again.
07:30
kudo/nom: 646b90f | FROGGS++ | src/core/CompUnitRepo/Local/Installation.pm:
Merge pull request #483 from ugexe/patch-14

  [bugfix] /bin wrapper requires CURLI object
07:33 TEttinger left 07:40 JimmyZ joined 07:43 darutoko- joined 07:45 darutoko left 07:47 inokenty joined 07:50 anaeem1_ joined 07:54 [Tux] joined 07:55 vendethiel joined, brrt joined, dakkar joined
brrt \o 07:56
08:01 pdcawley joined
jkva o/ 08:04
08:04 prettyuglyliar joined 08:19 chenryn left 08:20 vendethiel left 08:21 jkva left 08:26 bjz left, virtualsue joined, virtualsue left 08:27 virtualsue joined, bjz joined 08:29 chenryn joined, bjz left 08:30 chenryn left
lizmat plugs a new Perl 6 Weekly again: p6weekly.wordpress.com/2015/07/27​...e-present/ 08:36
timotimo lizmat++
Ulti lizmat its already on reddit :)
lizmat++
lizmat ah?
ok, cause I did not see anybody react to my announcement at all last Monday night 08:37
ah good, no reactions on reddit either :-) 08:38
moritz lizmat++ 08:39
DrForr I clicked 'like' on FB :) 08:40
lizmat :-)
08:40 chenryn joined
lizmat doesn't do FB 08:40
DrForr Good for you :)
timotimo neither
lizmat well, I know what a time sink IRC can be... don't want to take away more time from rakudo at this point 08:41
virtualsue thanks for the prompt, lizmat
i'm going to shuffle that past london.pm a bit 08:42
08:43 prettyuglyliar left 08:44 jkva joined
DrForr Tweeted just in case... 08:45
FROGGS lizmat++
08:45 g4 joined, g4 left, g4 joined
FROGGS lizmat++ again # harry potter reference 08:49
lizmat FROGGS: I didn't make that one up, I just passed it along
but yeah, it was *very* descriptive of the situation at OSCON
FROGGS then you get the karma for passing it along to good ol' europe :o) 08:50
lizmat you really had to be persistent to find Diagonal Alley
:-)
thank you
ChoHag Can a role have a BUILD (or otherwise fiddle around at construction time) without interfering with construction of its consuming class or co-consumed roles?
lizmat ChoHag: don't think so 08:51
either the class has a BUILD, in which case the role's one will be ignored
and if it doesn't, importing the BUILD will mask the default (inherited) BUILD 08:52
on which the class may well depend
ChoHag So a role's options for acting during construction are nothing at all or everything? 08:53
08:53 itz_ joined
lizmat well, if the class doesn't have its own BUILD 08:54
itz_ morning
ChoHag That's the 'nothing at all' option.
lizmat you *could* "nextsame" it from the role's BUILD, I guess
ChoHag Hmm
lizmat if it does have its own BUILD, you're basically without options, I think
itz_ o/
moritz you could nextame in BUILDALL 08:55
08:57 yeahnoob joined
FROGGS .oO( you could nex t'aime BUILDALL ) 08:58
lizmat moritz: aren't we really getting in rakudo specific internals land there ? 08:59
ChoHag Is BUILDALL rakudo-specific? 09:00
lizmat the string BUILDALL does not appear in the specs 09:01
and there are no tests for it in roast
or in the sanity test 09:02
so, it's at least in a grey area :-)
09:10 llfourn left 09:15 [TuxCM] left 09:21 espadrine left 09:23 [TuxCM] joined
ChoHag How is code split onto multiple lines now? 09:26
\ didn't cut it.p
SPecifically, @list.grep({...}).map({...}) 09:28
moritz lizmat: it's documented in perl6/doc
arnsholt ChoHag: Just a newline? 09:29
moritz m: say <a b c>.grep(True)\ .map(&uc)
camelia rakudo-moar 646b90: OUTPUT«Earlier failure:␤ Cannot use Bool as Matcher with '.grep'. Did you mean to use $_ inside a block?␤ in block <unit> at /tmp/jfUa2uw66L:1␤␤Final error:␤ Type check failed in binding $s; expected 'Cool' but got 'Failure'␤ in block <unit> at /tm…»
moritz m: say <a b c>.grep({1})\ .map(&uc)
camelia rakudo-moar 646b90: OUTPUT«A B C␤»
moritz ChoHag: works with \ here
ChoHag Hmm
arnsholt Oh, right. The invocant dot
moritz m: say <a b c>.grep({1})\␤.map(&uc)
camelia rakudo-moar 646b90: OUTPUT«A B C␤»
moritz even with a proper newline
lizmat FWIW, this is one of the things that Slang::Tuxic "fixes" 09:30
timotimo i think ChoHag is wondering about the REPL?
ChoHag Ah it's self which is confusintg it.
self.\
self\↵.foo
09:31 bjz joined
moritz m: class A { method x { self\␤.new } }; say A.x 09:32
camelia rakudo-moar 646b90: OUTPUT«5===SORRY!5=== Error while compiling /tmp/8F5UhA_zRj␤Variable '&self' is not declared␤at /tmp/8F5UhA_zRj:1␤------> 3class A { method x { 7⏏5self\␤»
nine lizmat: I'm not sure it's true that a role's BUILD is ignored if the class has one. I came across the same question yesterday and my role's BUILD still gets called after adding one to the class. I just found no way to get the default BUILD in addition to the role's. 09:33
lizmat m: role A { method BUILD() { say "A" } }; class B does A { method BUILD { say "B" } }; A.new # seems wrong ?? 09:36
camelia rakudo-moar 646b90: OUTPUT«A␤»
lizmat m: role A { method BUILD() { say "A" } }; class B does A { method BUILD { say "B" } }; B.new # duh
camelia rakudo-moar 646b90: OUTPUT«B␤»
lizmat m: role A { method BUILD() { say "A" } }; class B does A { method BUILD { say "B"; self.A::BUILD } }; B.new # solution ? 09:37
camelia rakudo-moar 646b90: OUTPUT«B␤A␤»
lizmat ChoHag: ^^
FROGGS m: role A { mutli method BUILD() { say "A" } }; class B does A { method BUILD { say "B" } }; B.new # lol
camelia rakudo-moar 646b90: OUTPUT«===SORRY!===␤Cannot find method 'collisions'␤»
lizmat mutli ? 09:38
FROGGS tpyo
ChoHag Grr seems this POS can't do unicode as well as I thought.
lizmat ChoHag: ?? 09:39
ChoHag Something in thi chain of terminal/ssh/tmux/irssi is confused by all these weird characters.
My money's on irssi.
Makes copying text a PITA because the mouse is buried at the back of the desk. 09:40
lizmat loves Textual on OS X
ChoHag holds no love for OS X. 09:41
09:41 espadrine joined, llfourn joined
lizmat hugs ChoHag anyway :-) 09:41
RabidGravy ugexe++ # just made me make new versions of nine modules 09:42
timotimo you remade nine's modules?
RabidGravy :-p 9 09:43
ChoHag The above don't work if B is a role punned into classhood.
'No concretization found for A'
lizmat ChoHag: so A and B are both roles ? 09:45
RabidGravy it was correctly pointed that if one has a Build.pm with "class Build is Panda::Builder { ... }" then "panda" should be in the build-depends for the convenience of other installers than panda
ChoHag Probably. I'm not convinced one way or the other on the inheritence vs. composition. 09:46
09:46 [Tux] left
ChoHag Thanks, whoever did that. 09:46
I can see nothing expcept that you did it on purpose. 09:47
lizmat ChoHag: I now [Tux] well enough to know that he didn't do that on purpose 09:48
09:48 ChoHag_ joined
ChoHag_ 'ǿȵ ṗụṝṕõsḛ'? 09:48
lizmat please don't attribute to malice what you can attribute to NFG happy people
[Tux] is one of the people who figured how to print (ASCII) text upside down using readily available Unicode characters 09:49
ChoHag No Freaking Good? Non-Functional Gear?
lizmat Normalization Form Grapheme
ChoHag Not Fully Guaranteed?
lizmat it was one of the three main things to be done before we can release Perl 6 09:50
and jnthn++ did it
[TuxCM] ChoHag, what is your problem with my Unicode message?
jkva w00t
ChoHag It screwed up my terminal somehow and all I saw was that.
I think irssi's a bit shit and is fighting somehow with tmux.
[TuxCM] maybe your terminal in not (fully) Unicote capable? 09:51
jkva ChoHag: reminds me of when PuTTY borks on some unicode chars
lizmat wish jnthn had put is OSDC.no NFG lightning talks slides online
[TuxCM] sorry for that
ChoHag Something isn't.
I don't care anywhere near enough to fix it.
If something goes wrong enough there's /clear and logfiles.
lizmat .tell jnthn seems jnthn.net/articles.shtml is in need of an update :-) 09:52
yoleaux lizmat: I'll pass your message to jnthn.
[TuxCM] FWIW that message was the output of a "normal" ASCII text filtered through my 'uchar -d' script that puts random (valid) diacriticals on every letter
ChoHag But out of curiosity, can you do whatever you did again so I can see what my non-tmux'd alter-ego makes of it?
Oh looks like it was a quit message...
[TuxCM] ḞẄÎẆ ƭḫåţ ṁéŝʂąğé ẇäŝ ťḫę òūťṕứṯ ǫƒ ặ ȵóɾṁạł ǞȘĆȊȊ ťěẍṭ ḟĭłƫḛɽeḋ ẗḧṟớŭǧḫ ḿỳ 'ūȼẖąȓ -ḓ' ʂćɾïṗʈ ʈḧȁṭ ṕûťş ɍáɳḓȫḿ (ṿąłįḋ) ƌįáčrîƫịçằḷș ȫñ ěʋȇɾẏ ľȅṭťêṙ 09:53
ChoHag Yeah it's tmux doing something.
[TuxCM] yes, it was quit message. I rebooted my box after some security fixes
ChoHag Quelle suprise it's the thing which tries to do magic.
09:54 ChoHag_ left, ChoHag left, ChoHag joined 10:00 inokenty left, amurf left, pierrot left, dj_goku joined, dj_goku left, dj_goku joined, pierrot joined, xinming joined, noganex_ joined 10:01 Exodist joined, amurf joined 10:02 brrt` joined, brrt` left 10:03 inokenty joined 10:05 ChoHag_ joined, llfourn_ joined
ChoHag I suppose role A; role B does A; class C does B;; is the same as role A; role B; class C does A does B; ? 10:05
Mostly the same?
Not even remotely the same?
10:05 vike left, robinsmidsrod left, llfourn left, noganex left, ChoHag left 10:06 brrt left 10:07 baest joined, vike joined
lizmat I think they should be the same... 10:12
as we don't have any collision resolution logic built in 10:13
you need to do that yourself
ChoHag_ I noticed the lack...
lizmat afaik, it has been a conscious choice to have developer solve that "manually" 10:14
10:15 leont joined, vendethiel joined 10:16 yeahnoob left
timotimo right, that way you won't be surprised when an upstream role suddenly changes to give you a collision 10:17
or rather: you won't suddenly get different behavior; instead, you'll be asked to make a decision
RabidGravy yeah it's documented to be like that in docs.perl6.org/language/objects#Role_Application and everything 10:25
10:26 dayangkun left
lizmat reported the mutli LTA error as #125716 10:27
azawawi reads about www.intel.com/content/www/us/en/com...brief.html :) 10:28
10:29 rurban left
itz_ oh nice it has wifi 10:31
azawawi yup
8GB flash memory on ubuntu version 10:32
azawawi wonders how much time 'rakudo build moar' will take on that atom processor :)
on my RPi, it is like forever lol 10:33
and fails
only 512MB on the RPi B model
RabidGravy It's a tad quicker on the RPi 2 10:34
azawawi did you try it?
itz_ Quad Core Atom is probably OK
azawawi looks up its performance specs
10:35 gfldex joined
RabidGravy the "panda smoke" gets twatted by the oom killer after a while but it works and all 10:35
azawawi 2MB cache ark.intel.com/products/80274/Intel-...o-1_83-GHz
RabidGravy I have a RPi B with Fedora on and it will build and run rakudo but ridiculously slow 10:36
I also have a gigabyte brix with an Atom and that builds fine
virtualsue refrains from digging out her slowest and oldest machines for a test 10:37
itz_ I used to build on a N450 which was fine after a bit of wait
virtualsue itz: maybe you should try on the amiga
azawawi for $17 that processor provides CPU + GPU... not bad :) 10:38
RabidGravy I binned an Amiga a few years ago
itz_ virtualsue: or moarvm on the cc65 :)
itz_ has been unbinning old hardware :| off ebay 10:39
jdv79 building rakudo on my lame vm at rackspace takes forever 10:40
azawawi aha.. that atom processor is ranked #1468 with a score of 884 on www.cpubenchmark.net/cpu_list.php
jdv79 old gen
i tried on rpi b and no cide
RabidGravy I think the oldest computer I have now is a turn of the century dell latitude which I "liberated" from Via networks
jdv79 *dice
RabidGravy it works for me
might be the Pidora vs debian or something 10:41
jdv79 compiling on my 1.5y old laptop takes a while even
10:41 jkva left
jdv79 wonder if setting hacking will ever be faster 10:42
azawawi so basically it is like an Intel Core Duo T2500 @ 2.00GHz
itz_ has anyone tried gcc5? yet 10:43
virtualsue regularly clears out old equipment and is only occasionally fleetingly sorry about it
jdv79 right now its like 75s for me
azawawi single core performance is like an Intel Celeron M 1.00GHz... pretty slow lol 10:44
jdv79 i think mine is "Intel(R) Core(TM) i7-3537U CPU @ 2.00GHz"
4 core looks like 10:45
RabidGravy actually I lied the gigabyte brix has a "Intel(R) Celeron(R) CPU N2807 @ 1.58GHz"
azawawi goes back to working on Atom::Electron after looking at the atom processor lol 10:46
jdv79 on my shit vm it takes more like 15m
is there a way to throw past an upper/outer level CATCH? 10:47
itz_ does gcc even use extras cores?
azawawi gcc -j num_of_jobs # maybe? 10:48
jdv79 the middle manager is causing trouble
nine itz_: I have gcc 5.1 on my desktop at home. Everyting seems to work just fine. 10:51
azawawi im starting to write tests for Atom::Electron so that the test is executed only if you have electron installed and skipped otherwise 10:52
10:54 vendethiel left 10:55 rurban_ left 10:57 zakharyas left
RabidGravy I've given most of my modules a Build.pm that blows out if the module won't work in the environment it finds itself in 11:00
11:00 jkva joined, robinsmidsrod joined 11:05 zakharyas joined 11:12 telex left 11:13 rurban joined, rurban_ joined 11:14 telex joined 11:16 Psyche^_ joined 11:18 cognominal joined 11:22 chenryn left
azawawi question, what's the difference between END: { } and END { } ? 11:33
11:33 jack_rabbit left
azawawi spots a buggy pattern that rakudo did not warn about 11:33
nine m: END: { say "yes"; }; say "no"; 11:34
camelia rakudo-moar 646b90: OUTPUT«yes␤no␤»
nine m: END { say "yes"; }; say "no";
camelia rakudo-moar 646b90: OUTPUT«no␤yes␤»
nine END: is a label followed by some anonymous block
azawawi confused 11:35
well 1-hour hunting an IPC bug due to it lol 11:36
moritz azawawi: END: is just a label
azawawi i wish if rakudo could warn about it though 11:37
moritz like in OUTER: for @a -> $x { for @$x -> $y { next OUTER if $y == 0 } }
itz_ maybe using phasor text for a label should warn?
11:38 atroxaper left 11:39 atroxaper joined, atroxaper left 11:41 [Sno] joined, spider-mario joined
azawawi first test for A:E:clipboard api done :) 11:41
github.com/azawawi/perl6-atom-elec...lipboard.t
11:50 squuuc joined, khw joined 11:51 skids joined 11:52 squuuc left 11:56 p6-riche left 11:57 itz_ left
azawawi is there anything like metacpan.org/pod/File::Which in Perl 6? 11:58
11:58 itz_ joined 12:05 skids left
azawawi decides to port metacpan.org/pod/File::Which :) 12:11
12:21 vendethiel joined 12:22 raiph joined
itz_ wonders why he is trying to parse XML for fun :| 12:25
I'm getting plenty of rakudo debugger practice anyway
moritz itz_: sounds like a mild form of Mental Masochism 12:26
RabidGravy azawawi, top plan
12:30 laouji left
dalek osystem: afa7a6a | azawawi++ | META.list:
Add File::Which
12:34
azawawi notices a BSON/META.info error in ecosystem-api.p6c.org/update.log 12:36
12:36 cognominal left 12:37 anaeem1_ left, cognominal joined, anaeem1_ joined 12:38 Ven joined 12:40 atroxaper joined
leont perl6 -e 'my $proc = Proc::Async.new("perl6", "-e", "exit 2").start.result.perl.say 12:43
It seems Proc::Async is passing the status as exitcode, and it gets confused because there's not value for signal.
timotimo so, i'm wondering (still? again?) if libuv supports starting a process while handing over more file descriptors than just 0, 1 and 2 12:44
azawawi what $*DISTRO.name and $*KERNEL.name on a cygwin rakudo? anyone?
12:44 Ven left 12:45 atroxaper left
leont I think I know how to fix it, but developing and testing from a rakudobrew checkout feels wrong 12:47
lizmat looks at it 12:51
timotimo oh, way cool, libuv has a feature for handing over/sharing any number of file descriptors
i wish this to be reflected in Proc::Async and run/shell api, please
lizmat timotimo: won't this need some nqp hooks ? 12:53
timotimo very likely
but i don't know how the current spawn works on the nqp level
i was about to open one of the relevant files right now
lizmat nqp::spawnprocasync( 12:54
hmmm... looks like the callbacks are not getting called ? 12:57
13:00 anaeem1_ left
hoelzro good morning #perl6 13:01
timotimo i'll be afk for two hours or so 13:03
ChoHag_ How do I constrain the elements of a hash/array/etc.? 13:04
ISTR reading that I can stick a where clause in, but I can't find it.
lizmat my Int @a; my Int %hash
ChoHag_ That does the hash and the array. What about the etc.? 13:06
lizmat my Int $a ?
ChoHag_ How do I have a SetHash of Foo::Bar's.
lizmat hmmm.... good point 13:07
I guess you should be able to parameterize a SetHash
hoelzro m: 1.map({ if $^arg == 2 { } else { say "arg = $^arg" } }); Nil
camelia rakudo-moar 646b90: OUTPUT«arg = False␤»
hoelzro is $^arg supposed to be False in the else block? I didn't think that if/else altered placeholder variables 13:08
jnthn hoelzro: it's an (unusual) way to write the else -> $thingy { ... } 13:09
yoleaux 09:52Z <lizmat> jnthn: seems jnthn.net/articles.shtml is in need of an update :-)
ChoHag_ Can attributes or variables be defined with a where clause or am I thinking of Moose?
jnthn m: 1.map({ if $^arg == 2 { } else { say "arg = $arg" } }); Nil # one alternative
camelia rakudo-moar 646b90: OUTPUT«arg = 1␤»
hoelzro jnthn: so that's expected behavior, then? 13:10
jnthn hoelzro: yes
hoelzro ok, thanks for confirming!
lizmat m: subset Foo of Int where * > 42; my Foo @a; @a[0] = 43 # ChoHag_
camelia ( no output )
lizmat m: subset Foo of Int where * > 42; my Foo @a; @a[0] = 1 # ChoHag_
camelia rakudo-moar 646b90: OUTPUT«Type check failed in assignment to '@a'; expected 'Foo' but got 'Int'␤ in block <unit> at /tmp/dudhd_ZFk3:1␤␤»
jnthn ChoHag_: It certainly works on attributes 'cus I remember implementing it.
I think it works for variables too
m: class A { has $.x where * > 42 }; A.new(x => 43) 13:11
camelia ( no output )
jnthn m: class A { has $.x where * > 42 }; A.new(x => 42)
camelia rakudo-moar 646b90: OUTPUT«Type check failed in assignment to '$!x'; expected '<anon>' but got 'Int'␤ in block <unit> at /tmp/O7KPx_sFqm:1␤␤»
jnthn But you may want to do what lizmat++ showed for a nicer error :)
ChoHag_ Right. 13:12
Which compound types can be parameterised? 13:14
jnthn At present, Hash (on key and value, for object types), Array (with value type, for object types), array (with value type, for native types) and Buf (with any native integer type) 13:15
moritz Rational
jnthn hah, I forgot that one :) 13:16
moritz++
azawawi do we have something like this in Perl 6? stat($filename); print "Readable\n" if -r _; # the underscore that is 13:17
moritz azawawi: no
azawawi -r _ # to save a system call
well i hated it lol and it was confusing lol
ChoHag_ So something like a type-constrained SetHash is eminently possible but unimplemented? 13:18
azawawi totally unreadable
moritz azawawi: the proper solution would be have a .stat method that returns a proper Stat object, or something like
azawawi yup
ChoHag_ (Or in other words, I don't need to bother writing type-verification code and can simply change the definition when it becomes possible and let perl do the hard work)
ShimmerFairy If you're checking for a file's readability, I believe $filename.IO.r works. (Assuming $filename is a Str) 13:19
ChoHag_ (In the meantime slapping an "alpha code running on alpha code" label and expect users (ie. me) not to break things, exploding spectacularly when they do).
lizmat m: my $s = SetHash[Int].new # drawing a blank here, how can I make this to work ?
camelia rakudo-moar 646b90: OUTPUT«5===SORRY!5=== Error while compiling /tmp/t35M_wp7Cc␤SetHash cannot be parameterized␤at /tmp/t35M_wp7Cc:1␤------> 3my $s = SetHash[Int]7⏏5.new # drawing a blank here, how can I␤»
jnthn lizmat: Either make it a parametric role (the Buf approach) or do what Array does and implement method ^parameterize 13:20
lizmat gotcha 13:21
jnthn lizmat: I'd study the two and see which you think fits best :)
lizmat: Hash and Array are awkward to do as roles 'cus of bootstrapping reasons: we need them really early on
lizmat looking at ^parameterize now
13:21 cognominal left
hoelzro does anyone mind if I merge my Socket.print branch (github.com/rakudo/rakudo/tree/sock...not-send)? I didn't hear a ton of support in favor of, but I didn't hear any against either 13:22
lizmat hoelzro++ # it sorta matches my plans in newio, ISTR 13:23
moritz hoelzro: +1
jnthn hoelzro: I think I suggested it in the first place, which is I guess an implicit +1 from me ;) 13:25
azawawi travis-ci.org/azawawi/perl6-file-w...s/73190357 # travis ci ftw :) 13:28
13:30 Ven joined 13:35 anaeem1_ joined
ChoHag_ Can I mark attributes as required? 13:35
nine m: class Foo { has $.foo is required; }; Foo.new;
camelia rakudo-moar 646b90: OUTPUT«The attribute '$!foo' is required, but you did not provide a value for it.␤ in block <unit> at /tmp/uEjKGc0l9L:1␤␤»
ChoHag_ Of course...
dalek kudo/nom: 7bda3db | hoelzro++ | src/core/IO/Socket.pm:
Deprecate Socket.send in favor of Socket.print

Users may confuse the send method (which is just a Str-friendly wrapper over write) with send(2), which is subtly different from write(2). To avoid this confusion, and open up the possibility of a true send(2) analogue in the future, I think that the current send should be renamed to print (thanks to jnthn++ for the suggestion)
13:36
azawawi File::Which module is a bit weird for new comers.... any name suggestions?
RabidGravy File::Whence? ;-) 13:38
azawawi you're basically finding executable paths
RabidGravy yes 13:39
moritz File::Locate::Executable
File::Find::Executable
File::Find::InPath
azawawi cool thx 13:40
itz_ need moar club mate 13:41
13:44 skids joined
hoelzro can a file "re-open" an existing module to add things into it? for example, I have a module Xapian, and I'd like for Xapian::Database and Xapian::Error to live in separate files, but I get a redeclaration warning when I do module Xapian { ... } in both files 13:51
moritz hoelzro: just do a module Xapian::Database { } and a module Xapian::Error { } 13:52
lizmat augment class foo
?
ah, ok
moritz m: module Xapian { }; module Xapian::Database { }
camelia ( no output )
hoelzro moritz: so class Xapian::Database { ... } if it's a class, then? 13:54
13:55 nebuchadnezzar joined 13:56 vendethiel left
azawawi panda install File::Which; perl6 -MFile::Which -e 'say which(:exec("perl"))' # Perl 6 ftw :) 13:59
now I can test the executable before handing it to Proc::Async :) 14:00
moritz hoelzro: yes
14:01 anaeem1_ left 14:06 diegok joined 14:07 FatalNIX joined 14:11 yqt joined 14:12 hahainternet joined 14:14 Hor|zon left
RabidGravy is there any reason why Buf.unpack("Z") doesn't strip the trailing \x[0]s like the P5 unpack? 14:15
14:16 hahainternet left 14:17 Hor|zon joined, anaeem1_ joined
dalek kudo/nom: df4c333 | lizmat++ | src/core/ (6 files):
Don't call BUILD ourselves anymore

So that BUILD won't need to return self either anymore
14:18
14:21 flussence joined 14:23 raiph left 14:26 raiph joined
ugexe hoelzro: want to change io::socket::async as well? 14:26
hoelzro ugexe: sure, I must've missed that 14:27
ugexe i wonder if we should update ::Async to use .out/.err/.in like the Proc api (or the other way around) 14:31
DrForr
azawawi moritz: is this Perl6ish enough github.com/azawawi/perl6-atom-elec...oard.t#L13 ? 14:32
14:34 anaeem___ joined
leont Why the named argument? 14:34
azawawi im asking my self that also lol 14:35
14:38 anaeem1_ left
ugexe you may wish to incorporate whereis/where as well 14:40
14:41 llfourn_ left 14:42 anaeem___ left
azawawi ugexe: where returns all the executables in the path, right? 14:43
ugexe yea. mostly it might make your windows code easier 14:44
C:\Users\Nick\Documents\GitHub\zef>where perl
C:\strawberry\perl\bin\perl.exe
14:44 anaeem1_ joined
FROGGS ugexe: I'd like to see .out/.err/.in for Proc::Async, but then I made the API for Proc, so I'm biased 14:45
azawawi ugexe: which('perl', :all) 14:47
ugexe i mean it could possibly make your modules code easier 14:48
azawawi ugexe: i think im going to change it to File::Find::Executable. File::Which seems too unixish
leont File::Find:: sounds like it's finding executables in general
azawawi ugexe: then we need App::pwhich :)
ugexe: API separated from utilities implemented on top of it 14:49
perfect travis-ci.org/azawawi/perl6-atom-e...1934#L1253 :)
it is like Padre's headless testing :)
leont What's the procedure again for adding dists the the module lists? 14:50
ugexe FROGGS: i prefer the Proc API as well, although im not sure why considering its only 3 letters of difference 14:51
dalek kudo/nom: 26589f2 | hoelzro++ | src/core/IO/Socket/Async.pm:
Replace send with print on IO::Socket::Async

For consistency with IO::Socket
ugexe leont: pr to github.com/perl6/ecosystem/blob/ma.../META.list 14:52
14:54 chenryn joined 14:57 llfourn joined
ugexe only drawback i have against Proc API vs Proc::Aync is method .in does something completely different on a promise 14:58
azawawi leont: submit a pull request to github.com/perl6/ecosystem
leont: after adding your module to META.list 14:59
leont: also make sure your META.info is JSON valid via jsonlint.com/ :)
ugexe then swear profusely as you try to figure out why your meta doesnt work
azawawi ugexe: jsonlint lol 15:00
ugexe: i hate it lol
ugexe: ecosystem-api.p6c.org/update.log is your friend 15:01
ugexe if you're lucky. there are other nits, like parsing source-url vs support : { source: '' }, the scheme of the given url, etc
RabidGravy that's why I always do "panda install ." before I'm done
azawawi ugexe: also ecosystem-api.p6c.org/errors.json
ugexe ah i didnt know about errors.json 15:02
panda doesn't require a strict meta file
not syntax wise, but it will precompile modules that your meta doesn't `provides` (which maybe you want this) 15:03
azawawi going home &
ugexe: that's why i add .travis.yml also to my modules :)
15:03 hoelzro_ii joined
ugexe that doesn't help with `provides` problem i mentioned though 15:05
well, "problem".
15:08 azawawi left
ugexe would be fun to do a week of exploiting the ecosystem, at the p6 level 15:12
15:14 anaeem1_ left, anaeem1_ joined
hoelzro $line ~~ /^ \s ** $indent '}' / # is there a way to get this to match $indent whitespace characters at BOL? 15:16
15:17 Ven left 15:18 muraiki joined 15:19 anaeem1_ left
jnthn yays, teaching successfully completed :) 15:20
Now I've pretty much nothing but Perl 6 to worry about for a week or so \o/
15:20 Ven joined 15:21 anaeem1_ joined
RabidGravy yay! 15:21
itz_ jnthn++
15:22 g4 left 15:24 anaeem1__ joined 15:25 anaeem1_ left 15:28 diana_olhovik_ left
hoelzro hooray! jnthn++ 15:31
15:33 chenryn left
jnthn Gotta fly home first, alas... 15:33
bbl
15:33 yqt left 15:34 anaeem1__ left
[Coke] I misread that as "fly home first class" 15:34
15:35 vike left 15:36 yqt joined 15:41 vike joined 15:46 jkva left, chenryn joined 15:48 atroxaper joined, FROGGS left 15:50 itz__ joined, itz___ joined 15:52 itz___ is now known as itz, atroxaper left, itz_ left 15:53 zakharyas left 15:55 rurban_ left 15:56 Ven left, chenryn left
RabidGravy "Date is the number of days since January 1st, 4713 BC" what the actual 15:59
16:00 Ven joined 16:02 chenryn joined 16:04 diana_olhovik joined
RabidGravy so dBase has a Y27504 problem 16:07
geekosaur recognizes date, shudders
16:08 isacloud joined 16:09 xinming_ joined 16:12 xinming left
lizmat I wonder whether we shouldn't move the functionality of Promise.in(10) to Promise.keep(:in(10)) 16:13
to free up .in on Promises, and therefore reduce confusion with Proc::Async ? 16:14
*should
16:16 spider-mario left
lizmat .tell FROGGS looking at debugging 'Proc::Async.new("perl6", "-e", "exit 2").start.result.perl.say' 16:22
yoleaux lizmat: I'll pass your message to FROGGS.
lizmat .tell FROGGS it looks like the "done" callback is not being called, and thus the exit code is never set
yoleaux lizmat: I'll pass your message to FROGGS.
lizmat stops looking into this further for now 16:23
hoelzro $line ~~ /^ \s ** $indent '}' / # is there a way to get this to match $indent whitespace characters at BOL? 16:28
16:29 SmokeMachine joined 16:30 chenryn left
lizmat $line ~~ /^ \s ** {$indent} '}' / # perhaps ? 16:30
m: my $indent = 4; say " }" ~~ /^ \s ** {$indent} "}" / # hoelzro
camelia rakudo-moar 26589f: OUTPUT«「 }」␤»
hoelzro ahhhh, that makes sense. 16:31
lizmat m: my $indent = 4; say " }" ~~ /^ \s ** {$indent} "}" / # hoelzro
camelia rakudo-moar 26589f: OUTPUT«Nil␤»
hoelzro thanks lizmat!
lizmat not sure whether that made sense or is a workaround :-)
geekosaur thought it had to be either literal or {expr} 16:33
lizmat is there a specific reason why there are so many 'proto method new(|) {*}' in the core setting? 16:40
itz 4713 BC is the date of Creation according to the Church of Dbase? 16:43
16:47 spider-mario joined 16:50 telex left
RabidGravy it appears that it's the start of "Julian Time" 16:50
16:52 telex joined, brrt joined 16:54 dakkar left
dalek kudo/nom: eaf57d7 | lizmat++ | src/core/ (6 files):
Remove superfluous proto method new(|) {*}
16:56
16:56 _sri joined
itz ah Julian Time is used by astronomy oddly 16:57
so its not the Eastern Orthodox Church of Dbase
16:59 yqt left
lizmat wonders how a year can be a date 16:59
itz it's all explained in www.conservapedia.com/Date_of_creation :) 17:01
DrForr Isn't -4713 when the solar and lunar years, ad Metonic cyces all coincide?
itz "In 1849, the astronomer John F. Herschel turned Scaliger's calendar into the astronomical Julian Date system, taking January 1, 4713 BC as JD=0," from the probably more reliable curious.astro.cornell.edu/about-us/...n-advanced 17:02
17:04 ggoebel joined 17:10 grondilu left, grondilu joined 17:13 RabidGravy left 17:14 cognominal joined, itz left 17:18 RabidGravy joined
RabidGravy m: enum DataType(Abalone => "A"); my DataType $a = DataType("A"); say $a.perl 17:19
camelia rakudo-moar 26589f: OUTPUT«DataType::Abalone␤»
RabidGravy anyway, that kind of thing works as a snippet, but fails in my code
moritz how does it fail? 17:22
17:22 TimToady joined 17:27 spider-mario left
dalek kudo/nom: f7cdcd9 | lizmat++ | src/core/ (3 files):
Don't call BUILD in new
17:28
rl6-roast-data: 62d4224 | coke++ | / (9 files):
today (automated commit)
17:30
17:34 abraxxa left 17:39 chenryn joined 17:41 brrt left 17:46 chenryn left 17:54 espadrine left 17:59 Ven left 18:03 rindolf joined
rindolf Hi all. Are integers in rakudo-moar automatically converted to bigints? 18:04
18:04 colomon joined
leont Great, coredump due to double-free that doesn't show up on perl6-gdb 18:05
18:05 isBEKaml joined
leont rindolf: that question isn't making sense 18:06
Why are you assuming that distinction?
rindolf leont: don't know - in Perl 5 they are not the same. 18:07
leont: and I recall something about them lacking support in an earlier version of a perl 6 interpreter.
eval: 2 ** 100
p6: 2 ** 100
camelia ( no output )
DrForr m: 2 ** 100 18:08
camelia ( no output )
DrForr Huh.
leont Stuff that's generally considered a misfeature in perl5 is changed in perl6 ;-)
m: say 2 **100
camelia rakudo-moar f7cdcd: OUTPUT«1267650600228229401496703205376␤»
18:09 isBEKaml left
rindolf leont: OK, thanks. 18:09
geekosaur well, historically bigints were an add-on to perl5, not part of the core
moritz we've had bigints since 2011
geekosaur not too surprising they;re not fully integrated 18:10
moritz the biggest problem in p5 is that ranges aren't overloadable 18:11
so for (1..100) { say $_ ** $_ } # doesn't use bigints, even if "use bigint;" is in scope
leont Both python and ruby have had builtin arbitrary sized integers. In the Debian language shootout, this was the one tests where perl5 was a dead duck in the water (I think they got rid of it though). 18:12
*for a long time 18:13
nwc10 off topic ish, but I'd love to see Will's rperl in the Debian language shootout 18:14
leont Would be interesting, even if unofficial. 18:15
nwc10 yes, I wasn't quite sure of the right terms to use. 18:16
I'd like to see some/most/all of their benchmarks implemented in rperl
to get a feel for what rperl's speed vs beauty trade off is
RabidGravy m: say 2**(2**32) ; # though 18:17
camelia rakudo-moar f7cdcd: OUTPUT«0␤»
moritz RabidGravy: our number of digits is still a 32 bit integer, I think
or something like that 18:18
nwc10 more on topic ish - are their Perl 6 implementations of any or many? How do they fare on the JVM and on MoarVM? And will doubleplusbrrt's JIT work help more?
RabidGravy it thinks about 2**(2**31) for a very very long time 18:20
18:20 colomon_ joined 18:22 colomon left 18:23 dha joined 18:25 colomon_ left, mr-foobar left
moritz RabidGravy: well, it's probably 2**31 multiplications of bigints 18:25
18:26 abc-xyz joined 18:28 mr-foobar joined
abc-xyz In S05 I read phrase "Perl6 will come with at least one grammar predefined: grammar STD { ... }". But after $parsetree = STD.parse('..') I got error "Undeclared name STD". 18:33
18:37 atroxaper joined 18:40 rjbs joined 18:41 atroxaper left 18:42 abc-xyz left
dalek pan style="color: #395be5">perl6-examples: 824562a | (Shlomi Fish)++ | categories/euler/prob288-shlomif.p6:
Add a solution for Euler #288.

It's very slow , but is working fine.
18:42
18:47 abc-xyz joined 18:51 rangerprice joined 18:52 vendethiel joined 19:03 rurban_ joined 19:04 brrt joined 19:05 virtualsue left 19:07 virtualsue joined
moritz m: use Perl6::Grammar :from<NQP>; 19:11
camelia rakudo-moar f7cdcd: OUTPUT«===SORRY!===␤Could not find Perl6::Grammar in any of:␤ file#/home/camelia/.perl6/2015.07.1-29-gf7cdcd9/lib␤ inst#/home/camelia/.perl6/2015.07.1-29-gf7cdcd9␤ file#/home/camelia/rakudo-inst-1/share/perl6/lib␤ file#/home/camelia/rakudo-inst-1/sh…»
19:12 brrt left
ChoHag_ How can I create a class where one attribute's value is constrained based on the contents of another? 19:12
eg. Say I had a Triangle class with three attributes, $!angle1, $!angle2 and $!angle3 19:13
19:14 anaeem1 joined 19:16 anaeem1 left 19:17 vendethiel left 19:19 vendethiel joined 19:20 yqt joined 19:21 pippo joined
pippo o/ #perl6 19:21
Somebody can help me? I need to know how to write a variable value when the program bails out. 19:22
Bails out due to an unhandled exception. 19:23
RabidGravy END { $foo = 1 }
pippo Does it work if the problem occurs in a loop and I would print $_? 19:25
Does it work if the problem occurs in a loop and I want to print $_?
vendethiel pippo: UNDO{} ? 19:27
pippo RabidGravy: It works. But it always work even if an exception is not encountered! 19:29
moritz m: sub f ($x) { UNDO say $x; die "oh noez" if $x < 0 }; f(4); f -4; 19:30
camelia rakudo-moar f7cdcd: OUTPUT«4␤-4␤oh noez␤ in sub f at /tmp/OMND_HpMvd:1␤ in block <unit> at /tmp/OMND_HpMvd:1␤␤»
moritz m: sub f ($x) { UNDO say $x; die "oh noez" if $x < 0; True }; f(4); f -4;
camelia rakudo-moar f7cdcd: OUTPUT«-4␤oh noez␤ in sub f at /tmp/l45s4aPEBB:1␤ in block <unit> at /tmp/l45s4aPEBB:1␤␤»
RabidGravy or
moritz pippo: UNDO isn't just for exceptions, it's for unsuccessful returns too
RabidGravy m: for <1 2 3> -> $v { CATCH { say "> $v" }; die "foo" if $v == 2 }
camelia rakudo-moar f7cdcd: OUTPUT«> 2␤foo␤ in block <unit> at /tmp/wwbO2kXNX8:1␤␤»
moritz pippo: maybe you want a CATCH block instead?
pippo vendethiel moritz: thank you trying your suggestions… 19:31
hoelzro if I have a module Xapian::MSetIterator that is use'd by Xapian.pm, and it provides &infix<eqv>(MSetIterator, MSetIterator), what's the proper way to re-export that multi candidate from within Xapian.pm? 19:33
19:35 espadrine joined 19:36 abc-xyz left
dha So, given these two examples in the regexes doc, is there a reason why the "whitespace is ignored" comment is on the example that *doesn't* contain whitespace, or should these be reversed? 19:36
'perl' ~~ / per . /; # matches the whole string
'perl' ~~ /per./; # the same; whitespace is ignored
19:39 brrt joined
ChoHag_ Does rakudo not (fully?) support anonymous subtypes? 19:40
pippo m: say 'per l ' ~~ /:s per . /;
camelia rakudo-moar f7cdcd: OUTPUT«「per l 」␤»
pippo dha ^^
moritz dha: might make more sense the other way round, yes
dha moritz - that's what I thought. I'll change.
thanks.
moritz dha++ 19:41
pippo Ooops. Did not understand the question. Sorry.
moritz ChoHag_: such a question won't get you far, I fear
lizmat m: class A { has $.x where * > 42 }; A.new.x.WHAT.say # looks like an anon subtype to me 19:43
camelia rakudo-moar f7cdcd: OUTPUT«(<anon>)␤»
RabidGravy yeah
lizmat m: my $x where * > 42; say $x.WHAT # same
camelia rakudo-moar f7cdcd: OUTPUT«(<anon>)␤»
ChoHag_ Ah S12 is just unclear as to where the where goes then.
19:44 rangerprice left
dalek c: e16ef96 | (David H. Adler)++ | lib/Language/regexes.pod:
Reversed the examples in the "Dot to match any character" section so

whitespace appears.
19:44
19:45 darutoko- left
ChoHag_ OK so that works. Can I have two attributes whose values are dependent on each other? 19:47
lizmat you mean, as a default? 19:48
moritz ChoHag_: at initialization time? or always?
ChoHag_ Whose constraints are dependent on each other's values.
Sorry it's late and I'm slightly drunk.
From above: eg. Say I had a Triangle class with three attributes, $!angle1, $!angle2 and $!angle3
lizmat m: class A { has $.a = 42; has $.b where * > $!a }; say A.new( b => 1 ) 19:49
camelia rakudo-moar f7cdcd: OUTPUT«Cannot look up attributes in a type object␤ in block <unit> at /tmp/Qz_Soo3EeW:1␤␤»
ChoHag_ All three angles added together must be precisely 180 (or pi).
lizmat m: class A { has $.a = 42; has $.b where * > $.a }; say A.new( b => 1 )
camelia rakudo-moar f7cdcd: OUTPUT«5===SORRY!5=== Error while compiling /tmp/iM9Biki2jY␤Virtual call $.a may not be used on partially constructed objects␤at /tmp/iM9Biki2jY:1␤------> 3 A { has $.a = 42; has $.b where * > $.a7⏏5 }; say A.new( b => 1 )␤ expecting any of:…»
lizmat m: class A { has $.a = 42; has $.b where * > $!a } # compile time? 19:50
camelia ( no output )
lizmat hmmm...
ChoHag_: I assume at BUILD time?
ChoHag_ Being broken before or during build would be acceptable. 19:51
Or the universe would implode.
I'm beginning to suspect that what I want would be logically as well as practically impossible. 19:52
lizmat class A { has Int $.x; has Int $.y; has Int $.z; submethod BUILD(:$!x,:$!y,:$!z) { die if $!x + $!y + $!z != 180 } }; A.new(x=>100,y=>70,z=>10).say 19:53
m: class A { has Int $.x; has Int $.y; has Int $.z; submethod BUILD(:$!x,:$!y,:$!z) { die if $!x + $!y + $!z != 180 } }; A.new(x=>100,y=>70,z=>10).say
camelia rakudo-moar f7cdcd: OUTPUT«A.new(x => 100, y => 70, z => 10)␤»
ChoHag_ But perl's generally good at doing the impossible, so I'm going to have a bash before I try and find an alternative.
lizmat m: class A { has Int $.x; has Int $.y; has Int $.z; submethod BUILD(:$!x,:$!y,:$!z) { die if $!x + $!y + $!z != 180 } }; A.new(x=>100,y=>70,z=>11).say
camelia rakudo-moar f7cdcd: OUTPUT«Died␤ in submethod BUILD at /tmp/aVMDNNaFuo:1␤ in block <unit> at /tmp/aVMDNNaFuo:1␤␤»
ChoHag_ Well not a bash...
lizmat note that this version of BUILD actually sets the attributes befpre checking them 19:54
(in the signature)
ChoHag_: is that what you had in mind?
ChoHag_ That's exactly what I had in mind. 19:55
Except that having a BUILD method is out because the roles trample all over each other.
lizmat there you go: I guess you also want to check for values <0
ChoHag_ That was more or less my plan A.
plan H or I or something is to use real classes rather than a pun, but I'm not that far down the alphabet yet. 19:56
lizmat Perhaps then Triangle should be a class, and you should use "handles" ?
ChoHag_ handles as in method delegation?
lizmat yes
ChoHag_ Hmm. 19:57
I shall see what plan C becomes.
But tomorrow. I'm being huffed at by the wife for sitting here with the light on.
lizmat m: class A { has $.x }; class B { has A $.a handles <x> }; say B.new(x => 42) 19:58
camelia rakudo-moar f7cdcd: OUTPUT«B.new(a => A)␤»
lizmat hmmm....
19:58 spider-mario joined
lizmat m: class A { has $.x }; class B { has A $.a handles <x> }; say B.new(a => A.new(x => 42)).x # this works 19:59
camelia rakudo-moar f7cdcd: OUTPUT«42␤»
lizmat I guess one could argue that the default .new would need to know about attributes that handle methods?
is this a bug, a NYI, something not thought of yet ? 20:00
ChoHag_ It's quite reassuring (literally - I'm not being sarcastic and am too out of it to apply the standard social filters) when even the people making perl 6 make syntactical mistakes.
Because sometimes this language is fucking weird.
20:01 pdcawley left
lizmat we go for "amazing" really :-) 20:01
ChoHag_ Amazing is just weird which glitters.
lizmat loves glitters :-)
pippo m: for 1..10 {say $_ / ($_ -10); CATCH {say $_}};
camelia rakudo-moar f7cdcd: OUTPUT«-0.111111␤-0.25␤-0.428571␤-0.666667␤-1␤-1.5␤-2.333333␤-4␤-9␤Attempt to divide 10 by zero using div␤ in block <unit> at /tmp/HoiMSKptHc:1␤␤Attempt to divide 10 by zero using div␤ in block <unit> at /tmp/HoiMSKptHc:1␤␤Actually…»
ChoHag_ Anyway. The morning's work is set. 20:02
pippo ^^ why $_ is not printed?
ChoHag_ Goodnight.
Thank you all.
lizmat sleep wel, ChoHag_ !
RabidGravy pippo, because the CATCH sets $_ to the exception
pippo RabidGravy: how can I tell him to use the outer one? 20:03
20:03 ChoHag_ left
lizmat m: for 1..10 {say $_ / ($_ -10); CATCH {say OUTER::<$_>}}; # pippo 20:04
camelia rakudo-moar f7cdcd: OUTPUT«-0.111111␤-0.25␤-0.428571␤-0.666667␤-1␤-1.5␤-2.333333␤-4␤-9␤10␤Attempt to divide 10 by zero using div␤ in block <unit> at /tmp/qO0yJcVOlB:1␤␤Actually thrown at:␤ in block <unit> at /tmp/qO0yJcVOlB:1␤␤»
sjn Ooh! Microsoft gives us examples of error messages in Windows 10! twitter.com/jonathantimar/status/6...5908285441 :D
lizmat m: for 1..10 {$_ / ($_ -10); CATCH {say OUTER::<$_>}}; # pippo
camelia ( no output )
lizmat hmmm
sjn A little less than awesome error message. :D 20:05
lizmat m: for 1..10 -> $i {say $i / ($i -10); CATCH { say "Caught $i"}} 20:06
camelia rakudo-moar f7cdcd: OUTPUT«-0.111111␤-0.25␤-0.428571␤-0.666667␤-1␤-1.5␤-2.333333␤-4␤-9␤Caught 10␤Attempt to divide 10 by zero using div␤ in block <unit> at /tmp/Mua_5fvMif:1␤␤Actually thrown at:␤ in block <unit> at /tmp/Mua_5fvMif:1␤␤»
pippo lizmat: that is cheating :))
lizmat it's a workaround :-)
OUTER::<$_> didn't work
pippo I would have liked that to work. 20:07
lizmat: thank you.
lizmat m: for 1..10 {say $_ / ($_ -10); CATCH {say "Caught " ~ OUTERS::<$_>}}
camelia rakudo-moar f7cdcd: OUTPUT«-0.111111␤-0.25␤-0.428571␤-0.666667␤-1␤-1.5␤-2.333333␤-4␤-9␤Caught 10␤Attempt to divide 10 by zero using div␤ in block <unit> at /tmp/qZbhvEcmn3:1␤␤Actually thrown at:␤ in block <unit> at /tmp/qZbhvEcmn3:1␤␤»
lizmat I guess the trick is OUTERS::<$_>
I guess there are some hidden levels in the CATCH processing so that OUTER:: is checking the wrong scope 20:08
pippo lizmat for president! Thank you1 :-))
lizmat for president! Thank you! :-))
lizmat afaik, TimToady implemented OUTERS:: so, he would need to be president 20:09
pippo :-))
lizmat but since he is benevolent dictator already, there is not much point :-)
RabidGravy It would also be nice if the CATCH could be pointy
pippo :-))
lizmat and then keep the outers $_ ?
brrt no reason a dictatorship can't also appoint a president. i think the soviet union did that 20:10
RabidGravy yaw
lizmat m: CATCH { $^a } # :-( 20:11
camelia rakudo-moar f7cdcd: OUTPUT«5===SORRY!5=== Error while compiling /tmp/xSQgyytX1Q␤Placeholder variable $^a may not be used here because the surrounding block takes no signature␤at /tmp/xSQgyytX1Q:1␤------> 3CATCH { $^a } # :-(7⏏5<EOL>␤»
RabidGravy of course catch is like a special given of sorts
lizmat feels to me it's a lambda like any other 20:12
brrt-to-the-future.blogspot.nl/2015...ilers.html # brrt++
brrt :-) i think it's currently customary to count words and estimate reading time 20:13
i will not
it is long
20:22 TEttinger joined 20:25 brrt left
jnthn m: for 1..10 {say $_ / ($_ -10); CATCH {say OUTER::<$_>; default { }}}; 20:32
camelia rakudo-moar f7cdcd: OUTPUT«-0.111111␤-0.25␤-0.428571␤-0.666667␤-1␤-1.5␤-2.333333␤-4␤-9␤10␤»
jnthn Seems the OUTER:: worked fine, you just got confused 'cus you didn't handle the exception so it propagated :)
20:33 rindolf left
jnthn lizmat: On the proto method new things you removed, they hid (and so rule out) the default constructor inherited from Mu. 20:33
pippo jnthn: Interesting. Thank you.
lizmat jnthn: but the removal did not cause any spectest breakage 20:34
so it's an optimization ?
jnthn lizmat: Well, I suspected you've have spectested, but I was about to add that I couldn't see any cases where it'd have made a difference.
20:34 yqt left
jnthn lizmat: Maybe, only thing that's bothering me is that one was in array, and I wrote that recentlyish, but I can't remember why on earth I put a proto there.. 20:35
lizmat there were some cases I could not remove the proto without breaknng things
leont seems to have a working rakudopatch to the issue he mentioned yesterday, though he's not sure his solution is the best possible
jnthn m: say array[int].new
camelia rakudo-moar f7cdcd: OUTPUT«␤»
jnthn m: say array[int].new(1)
camelia rakudo-moar f7cdcd: OUTPUT«1␤»
jnthn m: say array[int].new(1,2)
camelia rakudo-moar f7cdcd: OUTPUT«1 2␤»
lizmat leont: we take PRs :-)
jnthn m: say array[int].new(1,2).perl
camelia rakudo-moar f7cdcd: OUTPUT«array[int].new(1, 2)␤»
jnthn m: say array[int].new.perl
camelia rakudo-moar f7cdcd: OUTPUT«array[int].new()␤»
jnthn Hm, no damage there :)
Dunno what I was thinking.
:)
lizmat well, me neither, and if it was not because of an optimization, then we should be better now, right ? 20:36
but if you're not comfy with it, a revert is done easily :-)
jnthn lizmat: I'm not uncomfy with your patch, more curious what I was thinking. But I think I did have to insert a bunch of proto methods in array in general, and maybe it was just cargo cult :) 20:38
lizmat: I doubt I'd have done it for optimization since it's...barely one. After the first dispatch or so we'd hit the cache.
lizmat so, proto creates a local dispatcher 20:39
jnthn Right, and hides any candidates from the base classes.
vendethiel (from user-land) only creates proto when it's not for { * }
lizmat wouldn't it be simpler to make the sig on the methods more specific ?
jnthn Well, it already *is* 20:40
For array at least.
lizmat class A { multi method new(A:) { } } ?
jnthn That's the default.
lizmat then I don't understand why yoy would want to hide candidates 20:41
jnthn So the Mu constructor is already unreachable for array.
Well, in the array case I don't
But in other cases you may
For example, if the base class had a method that took exactly two parameters, I think by arity that beats one in a subclass that takes the invocant and a slurpy 20:42
(in the array.new case, that is)
Anyway, as far as I can tell the patch is harmless.
(And so we do the same thing with less code, which is good)
lizmat
.oO( mostly harmless )
well, yeah, that was the idea: less code to maintain for the same effect, is good 20:43
lizmat hopes TimToady will chime in on Pos 20:50
m: "foo".index("f").WHAT.say
camelia rakudo-moar f7cdcd: OUTPUT«(Pos)␤»
leont Sent :-) 20:51
lizmat m: say Pos.^mro
camelia rakudo-moar f7cdcd: OUTPUT«(Pos) (Int) (Cool) (Any) (Mu)␤»
lizmat m: if "foo".index("f") -> $pos { say "found at $pos" }
camelia rakudo-moar f7cdcd: OUTPUT«found at 0␤»
lizmat I'll start writing tests for Pos soonish 20:52
[Coke] reads brrt-to-the-future.blogspot.nl/2015...ilers.html and wonders if result = LOCAL[8]+12 should have (const 12 int_sz) instead of (const 8 int_sz) 20:54
TimToady thinks Pos is kind of a bad name, given that it could be taken to mean "Positive" 20:55
20:56 dha left
[Coke] "maybe we could call it StrPos" *duck* 20:57
lizmat [Coke]: it's not only for Strings
ShimmerFairy I imagine "Index" (or shorter "Idx") would be a good alternative. 20:58
[Coke] I know, just a callback.
Tcl calls it ind... what ShimmerFairy said. And I would prefer Index, not Idx.
lizmat Index would work for me
it share In with Int
TimToady I would prefer that to Pos
jnthn I'm fine with Index
lizmat ok, then I'll make it Index and get the testing done 20:59
ShimmerFairy [Coke]: I only suggested Idx because 1) I tend to use that abbreviation, and 2) In case people liked keeping it to three letters for some reason :)
jnthn My head is somewhat sympathetic to masak++'s concerns on the Index thing, but my gut feels alright with it :) 21:00
[Coke] is any index false?
(just an undefined one?)
lizmat undefined 21:01
and that would mean False
TimToady or arguably that's a good time to return Nil
lizmat Nil would be fine by me
21:02 dha joined, abc-xyz joined
TimToady we like to distinguish missing from uninitialized 21:02
lizmat I think the code returning Int predates the existence of Nil 21:03
running spectest with these changes now
jnthn looks at the bunch of Perl 6 things he wants to work on and wonders where to start... 21:04
pippo good night #perl6
21:04 pippo left, virtualsue left
jnthn At least when to start is clear (tomorrow, after a good night's sleep :)) 21:04
t\01-sanity\55-use-trace.t still has a sad on Windows
lizmat gist ? 21:05
jnthn Was about to, then noticed it appears to be about line endings
lizmat ah so borked test ?
jnthn oh, no 21:06
screwed path
So I'll gist it :)
gist.github.com/jnthn/f8965600031fea235ba8
The first line of the got is certainly bust
lizmat i'll do some digging 21:07
dalek kudo/nom: fa71870 | (Leon Timmermans)++ | src/core/Proc (2 files):
Pass correct exitstatus and signal values from Proc::Async to Proc
21:08
kudo/nom: c27dc53 | FROGGS++ | src/core/Proc (2 files):
Merge pull request #484 from Leont/exit-status

Pass correct exitstatus and signal values from Proc::Async to Proc
leont \o/
21:08 cognominal left
dalek kudo/nom: 98cdc1e | lizmat++ | src/core/ (3 files):
s/Pos/Index/ and make (r)index return Nil on fail

As discussed on irclog.perlgeek.de/perl6/2015-07-29#i_10974515
21:10
21:14 virtualsue joined, kaare_ left 21:20 raiph left, vendethiel left, skids left
lizmat leont: I just noticed you're not in CREDITS 21:20
care to do a PR for that as well ?
21:20 diana_olhovik left 21:24 dolmen joined 21:27 rurban left
dalek kudo/nom: 07adb0e | leont++ | CREDITS:
Added leont to CREDITS
21:30
kudo/nom: 6e2a7c9 | lizmat++ | CREDITS:
Merge pull request #485 from Leont/exit-status

Added leont to CREDITS
lizmat leont++ 21:32
m: say "ƌįáčrîƫịçằḷș" 21:34
camelia rakudo-moar c27dc5: OUTPUT«ƌįáčrîƫịçằḷș␤»
lizmat hmmm...
[Coke] can someone give me random diacriticals on VARJAS ?
lizmat [Coke]: irclog.perlgeek.de/perl6/2015-07-29#i_10970971 21:35
[Coke] he mentions uchar but not where it is! 21:36
jnthn m: say "ƌįáčrîƫịçằḷș".chars 21:38
camelia rakudo-moar c27dc5: OUTPUT«12␤»
jnthn \o/
lizmat yeah :-)
jnthn m: say "ƌįáčrîƫịçằḷș".codes
camelia rakudo-moar c27dc5: OUTPUT«12␤»
jnthn ...really?
m: say "ƌįáčrîƫịçằḷș".NFC.codes
camelia rakudo-moar c27dc5: OUTPUT«12␤»
jnthn hmmm
lizmat maybe their all valid NFC
couild be
jnthn m: say "ƌįáčrîƫịçằḷș".NFC.list.map(&uniname)
camelia rakudo-moar c27dc5: OUTPUT«LATIN SMALL LETTER D WITH TOPBAR LATIN SMALL LETTER I WITH OGONEK LATIN SMALL LETTER A WITH ACUTE LATIN SMALL LETTER C WITH CARON LATIN SMALL LETTER R LATIN SMALL LETTER I WITH CIRCUMFLEX LATIN SMALL LETTER T WITH PALATAL HOOK LATIN SMALL LETTER I WITH DOT…»
jnthn They are as well :P 21:39
How...boring :)
lizmat hehe
TimToady darn it, those Unifolks did their work too good
lizmat he also has a script in which you can print text upside down
21:41 yqt joined
jnthn :) 21:41
lizmat I think he's gone to bed already... he'll probably react here tomorrow 21:43
jnthn What a sensible thing to have done... :)
jnthn nearly went to space today, so should probably rest soon too..
21:44 muraiki left
leont jnthn: Can I realistically do anything about that proc-async IO termination issue? 21:44
jnthn leont: Not sure what issue you mean...link?
(provided it's RT'd...) 21:45
leont We discussed it some time ago, no idea if it has an RT. In a tap on a stream from PA, the done handler can be called before all the IO has been handled.
jnthn ah 21:46
Yeah, that's probably part of the "serial supply" stuff I talked about in my recent stuff to fix/improve gist
So will get fixed as part of that 21:47
leont Awesome!
21:51 inokenty left
lizmat hmmm... 21:52
TimToady asked for Nil to be returned by index()
but that means we have a variable return signature
21:52 timo joined
lizmat jnthn: isn't that a bad thing optimization wise ? 21:52
21:53 timo is now known as Guest45814
lizmat wouldn't it be better to always return Index, either defined or undefined ? 21:53
jnthn lizmat: spesh treats the type object and instances of it as different things in a lot of places, so it's not automatically bad 21:54
lizmat m: sub a(--> Index) { Nil }; my Index $a = a 21:55
camelia rakudo-moar 6e2a7c: OUTPUT«Type check failed for return value; expected 'Index' but got 'Any'␤ in block <unit> at /tmp/YSK8CBx3xq:1␤␤»
jnthn uh, or automatically worse
lizmat m: sub a(--> Index) { Nil }; a # shorter
camelia rakudo-moar 6e2a7c: OUTPUT«Type check failed for return value; expected 'Index' but got 'Any'␤ in block <unit> at /tmp/WLOW8F_fRg:1␤␤»
jnthn Though in reality dynamic opt's success is more about predictability than anything
21:55 RabidGravy left
Guest45814 o/ 21:57
21:57 Guest45814 is now known as timotimo
lizmat timotimo o/ 21:57
dalek ecs: ff70871 | lizmat++ | S32-setting-library/Str.pod:
Spec index/rindex changes wrt to Index
ast: ae65a02 | lizmat++ | S32-str/index.t:
Minimal test changes for index(--> Index)
21:59
22:00 dolmen left 22:02 rurban joined
dalek ast: ea00fa0 | lizmat++ | S32-str/index.t:
Remove bogus test
22:05
ast: d2e3055 | lizmat++ | S32-str/rindex.t:
Minimal test changes for rindex(--> Index)
timotimo i missed a lot while my irc client was down
dalek ast: f631546 | lizmat++ | S02-types/WHICH.t:
Add Index as a valid type
22:06
lizmat timotimo: irclog.perlgeek.de/perl6/today :-)
timotimo yup
already there :)
moritz++ # irc log infrastructure
22:06 rurban_ left
jnthn Time for some rest...'night o/ 22:17
lizmat good night, jnthn 22:18
22:21 freeze joined, cognominal joined 22:26 abc-xyz left 22:29 virtualsue left, spider-mario left 22:33 freeze left 22:35 freeze joined 22:41 hoelzro_ii left 22:42 abc-xyz joined 22:43 freeze left
dalek kudo/nom: debcfcb | lizmat++ | src/core/Cool.pm:
Streamline (r)index some more

  - separate candidates with/without pos
  - in signature coercion to Str/Int
22:44
22:44 ShimmerFairy joined 22:45 freeze joined
lizmat and on that note, I wish #perl6 a good night 22:46
22:47 skids joined 22:49 ShimmerFairy left
abc-xyz In S05 I see phrase: <Perl 6 will come with at least one grammar predefined: STD> . But after { $tree = STD.parse('...') } I see error 'Undeclared name: STD' 22:49
22:53 freeze left 22:54 freeze joined 22:56 bjz left 23:00 telex left 23:01 ShimmerFairy joined 23:02 raiph joined, telex joined, freeze left 23:04 freeze joined 23:13 freeze left 23:14 dha left 23:15 freeze joined 23:19 abc-xyz left 23:23 freeze left 23:25 freeze joined
timotimo those streamlinings look good 23:27
23:32 rurban left 23:33 freeze left 23:35 freeze joined 23:36 ShimmerFairy left 23:37 ShimmerFairy joined 23:43 freeze left 23:45 freeze joined 23:48 ShimmerFairy left 23:52 khw left 23:53 freeze left 23:55 freeze joined
ugexe hooks/ implementation works. just need to mangle existing Build.pm files to work without dependencies now 23:59