»ö« 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:00 larion joined 00:15 tinyblak joined 00:21 roguelazer left
ugexe why not capture $*IN on the main thread and do your work in the start {}? 00:27
to do a progress bar i do SHOW-PROGRESS-BAR { <some logn running code> } which is basically a wrapper around capturing $*OUT and running <some logn running code> inside a start block 00:29
Proc::Async lets you tap stdin as well 00:33
dalek ast: cf74e36 | skids++ | / (2 files):
Make fudge aware of some more functions from packages/Test/
00:48
ast: 2385c97 | skids++ | S06-currying/ (3 files):
Add "use lib" statements for files that need Test::Assuming
00:51 Ben_Goldberg joined 00:57 dayangkun joined 01:02 gfldex left 01:09 aborazmeh joined, aborazmeh left, aborazmeh joined 01:10 yeahnoob joined 01:14 rmgk_ joined, rmgk is now known as Guest10940, rmgk_ is now known as rmgk, rurban left 01:17 Guest10940 left 01:34 dj_goku joined 01:41 roguelazer joined, TimToady left 01:50 tinyblak left 01:51 tinyblak joined, AlexDaniel left 01:55 tinyblak left 02:00 vendethiel left
dalek ast: c012c6f | skids++ | packages/Test/Assuming.pm:
Re-fix priming-fails-bind-ok. Hopefully for the last time.
02:01
02:02 tinyblak joined 02:06 vendethiel joined, telex left 02:08 telex joined 02:14 yeahnoob left 02:18 noganex joined 02:20 lolisa joined 02:21 noganex_ left 02:30 cognominal_ left 02:39 raiph left 02:40 raiph joined, raiph left 02:44 Sqirrel left 02:48 cognominal joined 02:57 roguelazer left 03:03 roguelazer joined
[Coke] waves from NYC. 03:05
skids o/ 03:06
03:08 roguelazer left 03:13 Ben_Goldberg left 03:27 Sqirrel joined 03:32 vendethiel left 03:33 vendethiel joined 03:41 atroxaper joined
ugexe perl6: class Foo { submethod BUILD { fail "doobie doobie doo" }; method bar { say 23; }; }; my $baz = Foo.new; $baz.bar 04:02
camelia rakudo-jvm 389998: OUTPUT«23␤»
..rakudo-moar 389998: OUTPUT«doobie doobie doo␤ in block <unit> at /tmp/tmpfile:1␤␤»
04:10 khw left
ugexe jvm/moar on windows both output 23 as well 04:12
04:19 vendethiel left 04:20 lolisa left 04:21 vendethiel joined 04:30 skids left 04:36 atroxaper left 04:39 kurahaupo left 04:53 nys left
moritz BUILD is called on an instance 04:55
04:58 atroxaper joined 04:59 kurahaupo joined
ugexe perl6: class Foo { submethod BUILD { say 1; fail "doobie doobie doo" }; method bar { say 23; }; }; my $baz = Foo.new; $baz.bar 05:00
camelia rakudo-jvm 389998: OUTPUT«1␤23␤»
..rakudo-moar 389998: OUTPUT«1␤doobie doobie doo␤ in block <unit> at /tmp/tmpfile:1␤␤»
05:01 diana_olhovik_ joined 05:21 mattp__ joined 05:22 diana_olhovik_ left 05:28 atroxaper left 05:31 atroxaper joined 05:32 vendethiel left 05:34 vendethiel joined 05:38 baest_ is now known as baest 05:44 kurahaupo left 05:57 diana_olhovik joined 06:04 kurahaupo joined 06:09 mr-foobar joined 06:30 FROGGS joined 06:31 zacts left, atroxaper left 06:32 atroxaper joined 06:36 kurahaupo left 06:41 RabidGravy joined 06:42 domidumont joined 06:46 domidumont left 06:47 domidumont joined 06:56 dakkar joined 07:09 rindolf joined 07:14 darutoko joined 07:21 g5 joined
RabidGravy marnin! Are we all fabulous? 07:27
07:29 larion left, abraxxa joined 07:31 anaeem1 joined 07:35 kurahaupo joined 07:36 FROGGS left 07:37 rurban joined
DrForr Well, awake. 07:37
07:42 atroxaper left 07:48 atroxaper joined 07:52 anaeem1 left, anaeem1 joined 08:02 yeahnoob joined 08:04 gcole left
RabidGravy is there any way of finding out how many elements in a CArray? 08:14
moritz you can access past the end, and observe where you segfault 08:16
it's just not very reliable
the problem is that in C, an array is just a pointer, which no extra runtime information whatsoever 08:17
08:17 Foxcool_ left, Foxcool joined 08:18 TEttinger left
RabidGravy yeah, I was just hoping that something else may have kept track of it 08:19
kurahaupo moritz: well, that's the default implementation. There's nothing stopping a C implementation using "fat pointers" (aside from rotten performance, of course) 08:20
moritz kurahaupo: but then it's not a CArray anymore 08:21
RabidGravy so for may supplementary question would a PR that made CArray.elems fail rather than return 1 be accepted? I keep forgetting that it doesn't work 08:22
moritz +1 08:23
kurahaupo moritz: normally one wouldn't see the difference between a fat pointer and a normal point, but indexing outside a declared array invokes undefined behaviour, at which point an implementation with fat pointers could trap 08:25
but I digress in #perl6 08:26
08:29 nowan left 08:32 nowan joined, FROGGS joined 08:56 salva left 08:57 espadrine joined
RabidGravy kurahaupo, the background to the above is that I'm binding an audio API that is a whole load of some "encode_something(long in_frames[], int no_frames, unsigned char *out_frames, int bufsize)" variants and knowing the size of the resulting CArrays that are getting thrown around would aid composability somewhat 08:59
DrForr Oh, unsigned ints are now in?
RabidGravy yeah, CArray[uint8] all over the place in this code ;-) 09:00
DrForr Cool, I can finally finish up some bits of OpenCV.
I've got a friend over at Drexel that uses this and its Python bindings extensively, when I get it working I'm going to badger him for some of his code and port it. 09:02
DrForr wonders what would be required to get 'perlbrew install perl-6.0.0' working. 09:04
RabidGravy never looked in the perlbrew code 09:05
DrForr Neither have I, but I suspect it's nontrivial.
09:06 larion joined
DrForr And possibly controversial. 09:06
09:08 atroxaper left 09:09 atroxaper joined
vendethiel probably not as controversial as rvm (which overrides cd...). 09:16
DrForr Eeh, who uses that old command? I just click and it runs. 09:22
09:29 kurahaupo left 09:30 rindolf left 09:34 yeahnoob left 09:36 virtualsue joined 09:45 RabidGravy left
lizmat raiph: re irclog.perlgeek.de/perl6/2015-07-07#i_10862254 perhaps it is good to know that at least MMD handles literal ints as native ints 09:45
m: 'multi a(int $) {"int"}; multi a(Int $) {"Int"}; say a 1 09:46
camelia rakudo-moar 389998: OUTPUT«5===SORRY!5=== Error while compiling /tmp/FUb6g9ByEj␤Unable to parse expression in single quotes; couldn't find final "'" ␤at /tmp/FUb6g9ByEj:1␤------> 3{"int"}; multi a(Int $) {"Int"}; say a 17⏏5<EOL>␤ expecting any of:␤ sing…»
lizmat m: multi a(int $) {"int"}; multi a(Int $) {"Int"}; say a 1
camelia rakudo-moar 389998: OUTPUT«int␤»
lizmat m: multi a(int $) {"int"}; multi a(Int $) {"Int"}; say a 0xffff_ffff_ffff_ffff
camelia rakudo-moar 389998: OUTPUT«Int␤»
lizmat m: multi a(int $) {"int"}; multi a(Int $) {"Int"}; say a 0xffff
camelia rakudo-moar 389998: OUTPUT«int␤»
lizmat m: multi a(int $) {"int"}; multi a(Int $) {"Int"}; say a 0xffff_ffff
camelia rakudo-moar 389998: OUTPUT«Int␤»
lizmat hmmm... no sure why *that* is happening 09:47
m: multi a(int8 $) {"int8"}; multi a(Int $) {"Int"}; say a 256 # definitely some work here still 09:48
camelia rakudo-moar 389998: OUTPUT«int8␤»
lizmat does this warrant a rakudobug?
09:58 atroxaper left 09:59 stux|RC-only joined 10:00 laouji joined
FROGGS hmmm 10:04
good question
it surely isnt DWIM in this case 10:05
though sometimes you want to let it overflow, and not get an exception
bbiab
ShimmerFairy lizmat: I want to say that integer literals should be non-native by default (since that's by far the more common use case), and thus require something like 42.int for the native version, but I can't say for sure. 10:09
|Tux| lizmat, yt?
lizmat ShimmerFairy: but why? natives are much faster in most cases? or are you afraid of unneccesary boxing/unboxing ?
[Tux]: if I have time, yes, I guess... :-) 10:10
|Tux| gist.github.com/Tux/47d333430eb1a966ded1
gather/act miscommunication?
10:11 gfldex joined
lizmat I'm still investigation that... 10:11
ShimmerFairy lizmat: to me, the native integer case is more likely to do native-ish things, and I don't think most Perl 6 code leans towards native stuff. That's what my reasoning is.
(But I fully admit I'm not that familiar with how native types get used in Perl 6, because I've almost never needed them.) 10:12
lizmat [Tux]: well, actually, atm I'm looking at masak's splice bug 10:13
10:15 dayangkun left
dalek kudo/nom: 7aa070e | lizmat++ | src/core/Mu.pm:
Apparently, the new code doesn't like the JVM
10:30
kudo/nom: d1e9b18 | lizmat++ | src/Perl6/Grammar.nqp:
Seems we *do* need worryobs somehow

This reverts commit eaee44f81268500c175c57566621a1cb7b7eabaa.
   # Expected: (X::Comp::Group)
   # Got: (X::AdHoc)
   # Exception message: Cannot find method 'worryobs'
kudo/nom: ed63b72 | lizmat++ | src/core/List.pm:
Part 1 of List.splice streamlining
10:35
10:38 kurahaupo joined
dalek line-Perl6: 74a7fbd | (Stefan Seifert)++ | t/lib/Perl6Test.pm:
Add missing test library
10:43
10:45 itz joined
itz morning 10:45
10:48 user3 joined 10:52 atroxaper joined 10:55 laouji left 10:56 kurahaupo left 10:57 user3 is now known as iH2O, atroxaper left, iH2O left 11:02 dakkar left 11:04 aborazmeh left
itz how do I get access to examples.perl6.org/ ? 11:06
sjn github.com/perl6/perl6-examples 11:08
itz I mean shell access
sjn why do you need that? 11:09
itz in order to debug why the colour syntax highlighting in p6-Text-VimColour doesn't work on that system when it works on my debian jessie system 11:10
sjn do you have an url where that can be demonstrated? 11:12
itz not anymore ... but just knowing whether the current version of that module is 1. installed and 2. the test passes would help me 11:13
dalek kudo/nom: 09041bc | lizmat++ | src/core/List.pm:
Add typechecking to List.splice, fixes #125571
11:14
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=125571
11:16 anaeem1 left
sjn is not sure who manages that site (I'd love to know too) 11:16
let's find out :)
itz I'm not even sure if the perl6-examples are built there or on another system .. but can wait for [ptc] anyway 11:17
11:18 kurahaupo joined 11:22 anaeem1 joined 11:24 bin_005 joined 11:25 rindolf joined 11:28 lucasb joined, bin_005 left
dalek kudo/nom: cac0c21 | lizmat++ | src/core/List.pm:
Part 2 of List.splice streamlining

Don't build the return value if it is not needed.
11:30
lucasb m: multi f(int) {'i'}; say f(42) 11:31
camelia rakudo-moar ed63b7: OUTPUT«i␤»
lucasb m: multi f(int) {1+2}; say f(42) 11:32
camelia rakudo-moar ed63b7: OUTPUT«Cannot call f(Int); none of these signatures match:␤ (int)␤ in block <unit> at /tmp/d7kQT8Ofxq:1␤␤»
lucasb lizmat: Hi. MMD doesn't seem reliable when there is more than a simple literal on it.
I don't why, in this case, it seems to upgrade the int to Int
lizmat lucasb: could you rakudobug that, because that would seem essential for optimizing
lucasb *idk why
11:33 bin_005 joined
lizmat with examples :-) 11:33
pretty please :-)
lucasb lizmat: OMG, I never rakudobuged before; I was just sayin' :)
lizmat ok, could you please gist some examples then? 11:34
(fwiw, rakudobugging is as simple as sending a mail to [email@hidden.address]
lucasb ^^ That's the only example I have; If there was another 'multi f(Int)' it would have called that, and it would have worked, with int changed to Int 11:35
arnsholt In this case, it's probably that integer literals have type Int by default
Or not. Didn't scrollback far enough 11:37
It's odd that the *body* of the multi should influence the MMD, yeah
11:45 telex left
masak lucasb++ # finding that bug 11:46
11:46 telex joined
masak ++lucasb # reporting it 11:46
11:48 bin_005 left
lizmat m: my @a = ^10; use nqp; nqp::bindattr(@a,List,q/$!items/,nqp::list()); say @a # somehow I thought this would empty the array 11:49
camelia rakudo-moar ed63b7: OUTPUT«0 1 2 3 4 5 6 7 8 9␤»
lizmat jnthn pmichaud is this some reification thing ? 11:50
11:53 skids joined 11:54 anaeem1 left
kanl m: say 1 <= 2 <= 3; say 1 !after 2 !after 3; 11:54
camelia rakudo-moar cac0c2: OUTPUT«True␤False␤»
moritz m: say !after 2 11:55
camelia rakudo-moar cac0c2: OUTPUT«5===SORRY!5=== Error while compiling /tmp/216NZEwtx8␤Undeclared routine:␤ after used at line 1␤␤»
moritz m: say 1 !after 2
camelia rakudo-moar cac0c2: OUTPUT«True␤»
kanl so before/after can't be chained? 11:56
11:56 laouji joined
lizmat perhaps that is the problem 11:56
m: say 3 after 2 after 1
camelia rakudo-moar cac0c2: OUTPUT«True␤»
moritz seems like the negation is the problem
lizmat I think it's the auto-generated !after is the problem 11:57
feels rakudobuggable
11:58 RabidGravy joined
kanl lizmat: i can do that if you'd like me to 11:59
lizmat please do :-)
12:00 laouji left
lizmat m: my @a = ^10; @a.gimme(*); use nqp; nqp::bindattr(@a,List,q/$!items/,nqp::list()); say @a # is this correct? 12:02
camelia rakudo-moar cac0c2: OUTPUT«␤»
12:04 skids left, ShimmerFairy left
lizmat so it was reification related :-) 12:04
moritz lizmat: you'd have to reset $!nextiter too, I suppose (if you don't use .gimme(*)) 12:08
12:08 ShimmerFairy joined
lizmat ah, ok.. hmm... 12:08
dalek kudo/nom: 537e90e | lizmat++ | src/core/List.pm:
Make @a.splice (without params) about 6x as fast
12:11
12:21 kurahaupo left
lucasb Should after/before numify boolean literals to 0 or 1 when they appear as operands? 12:25
oh, maybe it is instead boolifying the integers when there is bool/int mixed operands 12:27
12:28 Ahmad joined
Ahmad hello, is there a good book in market for perl6? or an opensource one for newcommers? I found only this which looks very old (2012) github.com/perl6/book/downloads 12:29
lizmat Ahmad: there is no (good) book yet, please check doc.perl6.org and examples.perl6.org 12:30
m: my @a = ^10; my @b = @a.splice(0,2,1..Inf); say @a # this should either fail or hang in my book
camelia rakudo-moar cac0c2: OUTPUT«2 3 4 5 6 7 8 9␤»
lizmat aka splicing in an infinite list 12:31
m: my @a = ^10; my @b = @a.splice(0,2,1..4); say @a # works fine
camelia rakudo-moar cac0c2: OUTPUT«1 2 3 4 2 3 4 5 6 7 8 9␤»
colomon m: my @a = ^10; my @b = @a.splice(0,2,1..Inf); say @a; say @b[^10]
camelia rakudo-moar cac0c2: OUTPUT«2 3 4 5 6 7 8 9␤0 1␤»
lizmat ranges don't auto-extend by design, colomon 12:32
ShimmerFairy lizmat: I'd say fail. The only case I can think of where it could maybe make sense would be appending it to the end of a finite list, but even then I don't immediately see why that's necessary. 12:33
(Also, what you just said made the appending thing sound silly :P)
lizmat m: my @b = ^2; say @b[^10].perl; say @b(0,1,2,3,4,5,6,7,8,9].perl
camelia rakudo-moar cac0c2: OUTPUT«5===SORRY!5=== Error while compiling /tmp/wE06hp7BdA␤Unable to parse expression in argument list; couldn't find final ')' ␤at /tmp/wE06hp7BdA:1␤------> 3@b[^10].perl; say @b(0,1,2,3,4,5,6,7,8,97⏏5].perl␤»
lizmat m: my @b = ^2; say @b[^10].perl; say @b[0,1,2,3,4,5,6,7,8,9].perl
camelia rakudo-moar cac0c2: OUTPUT«(0, 1)␤(0, 1, Any, Any, Any, Any, Any, Any, Any, Any)␤»
lizmat colomon: FWIW, I find it also counter-intuitive and had to adapt recent spectests for this behaviour
12:34 smls joined
colomon is reading the docs for splice right now, and is very confused 12:34
lizmat colomon: the problem is not in the splice, but in [^10] versus [0,1,2,3,4,5,6,7,8,9]
colomon lizmat: huh?
m: my @a = ^10; my @b = @a.splice(0,2,1..Inf); say @a; say @b 12:35
camelia rakudo-moar cac0c2: OUTPUT«2 3 4 5 6 7 8 9␤0 1␤»
12:35 Ahmad left
lizmat ah, that, ok 12:35
:-)
yeah
working on that
colomon why does .splice work in place? 12:36
that seems very un-p6ish
guess it’s classed with .push?
lizmat colomon: I have no idea... 12:37
I guess convenience ?
Perlishness ?
12:37 |Tux| left, |Tux| joined
ShimmerFairy Would splice make sense on a literal list? If not, I can see why you'd make it a mutating method. 12:38
colomon and then yes, why isn’t the inifinite range stuck at the beginning of the list where the spliced out values were? 12:39
ShimmerFairy: it seems to me that splice is kind of like subst for lists/arrays, and subst doesn’t mutate.
12:40 anaeem1 joined
smls @a.splice-rw(0,2) = 1..Inf would be a more Perl6ish syntax IMO 12:40
colomon though I guess maybe it’s substr instead?
lizmat smls colomon : I'll leave that for TimToady to decide
sjn \o 12:41
lizmat is just the implementor being tormented :-)
12:41 atroxaper joined
smls lizmat++ 12:41
kanl m: Inf.WHAT.say
camelia rakudo-moar cac0c2: OUTPUT«(Num)␤»
kanl m: my Int @a = 1 .. Inf; ## dumb question, how does this work?
camelia ( no output )
ShimmerFairy I don't like the -rw methods, honestly. They look kinda ugly.
kanl m: my Int @a = 1 .. Inf; say @a[*-1]; ## then why not this?
camelia rakudo-moar cac0c2: OUTPUT«Cannot coerce Inf or NaN to an Int␤ in block <unit> at /tmp/EprYxqi3Tg:1␤␤»
lizmat kanl: good one
please rakudobug :-)
kanl no kidding? :) 12:42
lizmat the error message is LTA for sure
kanl m: sub foo( Int $min, Int $max ) { $min .. $max }; foo( 1, Inf ).say; 12:43
camelia rakudo-moar cac0c2: OUTPUT«5===SORRY!5=== Error while compiling /tmp/sTKcouwI83␤Calling foo(Int, Num) will never work with declared signature (Int $min, Int $max)␤at /tmp/sTKcouwI83:1␤------> 3 Int $min, Int $max ) { $min .. $max }; 7⏏5foo( 1, Inf ).say;␤»
kanl i guess this is no surprise.
but it's awkward to make it foo(Int, Num)
dalek kudo/nom: 3776b7d | lizmat++ | src/core/List.pm:
Prevent infinite lists from being spliced in

This used to splice in an empty list silently.
12:44
12:45 brrt joined
sjn can someone here tell me who the people behind *.perl6.org are? 12:45
lizmat moritz would be a good bet ?
sjn sees Daniel Wright owns the domain
12:46 atroxaper left
lizmat that's just the Perl Foundation, no? 12:46
sjn right, but who actually manages it? (keeps the system alive and updated)
lizmat moritz again would be a good bet 12:47
FROGGS also, I guess
sjn lizmat: allright, thanks, let's get some confirmation :) 12:48
moritz sjn: me, mostly 12:49
sjn: also FROGGS++ has been doing a bit of admin work around it
sjn moritz: ah, no other backups? (cue maddingue as a SPOF example for the Act sites)
moritz: do you handle _all_ the *.perl6.org sites? 12:50
timotimo sjn: have a look at p6c.org 12:51
that explains it a fair bit
sjn is trying to get an overview of such things for his yapc talk
timotimo: is that page up-to-date? 12:52
ribasushi damn, sounds like an interesting talk, pity I likely won't make it 12:53
sjn timotimo: I see "A third virtual machine is planned for high-risk applications [...] is planned"
moritz sjn: lots of folks have root on the web server, it's just that most people don't use it
timotimo yeah, that's not made yet
moritz sjn: yes, still being planned
sjn ok, the typo there, is it being planned to be fixed? :D
or is just the planning being planned ;) 12:54
12:54 rarara joined
moritz sjn: you can plan at fix at github.com/perl6/www.p6c.org 12:54
sjn :D
12:55 anaeem1 left, anaeem1 joined 12:57 anaeem1__ joined, anaeem1 left 12:58 colomon left 12:59 Obbi left, BinGOs left, Obbi joined, leedo joined
Ulti the latest R* the start time is half a second... this is on a beefy machine with 16 cores and 80GB of RAM 12:59
12:59 colomon joined, yogan left, timotimo left 13:00 yogan joined
Ulti locally on my laptop with an SSD its at 0.003s 13:00
13:01 BinGOs joined
Ulti which is worryingly an order of magnitude faster than Perl 5 on this laptop :Z 13:01
smls 0.003s, are you sure?
13:01 timotimo joined, cosimo joined
Ulti yeah thats what I thought 13:01
doing perl6 -e ''
smls for me (PC with SSD) it's 0.13 s
13:01 abraxxa left
Ulti did it again so now with disk cache its 0.002s lol 13:02
wat
ahhh there we go it was the time not to find it in the path ;)
smls sounds like Perl 5
ah
Ulti but the half a second is definately not the best I've seen for Rakudo recently 13:03
dalek kudo-star-daily: b04d7dd | coke++ | log/ (9 files):
today (automated commit)
lizmat Ulti: it's caused by CURL and having a lot of modules installed
Ulti 0.3 locally
lizmat actually, the CURI
still, it shouldn't be that for a bare -e 1 13:04
it should be for the first "use" you do, I would think
Ulti and locally I have whatever head was five minutes ago
yeah I thought the empty -e was before a lot of things get sucked in or deserialised... if I do -e 'say "hi"' its a bit slower 13:05
but to get into the REPL its a delay that feels super slow 13:06
and I only say this because its been fast for a while now normally :) 13:07
with Task::Star installed
timotimo hm, with the REPL it could be because we load Linenoise? 13:09
lizmat yep, and that loads CURI and that deserializes 13:10
13:10 dakkar joined 13:11 laouji joined
timotimo at least we deserialize today, instead of json-parsing :) 13:11
lizmat yeah, json-parsing took 20+ seconds or so 13:12
which is why we didn't have a R* for a while
timotimo 20+ seconds!? for how many modules?
dalek kudo/nom: d33ece8 | lizmat++ | src/core/List.pm:
Allow * as size indicate in splice
13:15
lizmat the ones that came with Rakudo*, don't know how many 13:16
or maybe that was the whole ecosystem time...
I remember FROGGS complaining about it :-) 13:17
13:17 espadrine left
moritz sjn: thanks for the pr; you could have pushed directly though :-) 13:18
timotimo mhm 13:19
JSON::Fast could have possibly reduced that to ~12 seconds :\
moritz how was it fixed? 13:22
lizmat the database is effectively precomped 13:23
afaik
FROGGS it is a compilation unit containing a hash 13:24
though besides the precomp issues we had I'm not that fond of the cur-specs... they do not round-trip very well in some cases, and I wonder if we're blind to see a better option 13:26
though we have the limitation that we need to pass the cur specs around via ENV :o(
have other languages database like library storages? 13:27
of different kinds?
lizmat P5 has a package list, but that's only used during installation
P6 introspection and MMD on compilation units and unicode support is what makes this all less simple 13:28
arnsholt Some languages have stuff like RubyGems, but that's all library-level stuff 13:29
I don't know of any languages that handle versioning and such at the level P6 does
13:30 g5 left
FROGGS I don't care about versioning right now... is there another language that has library storage *types*? 13:31
dalek kudo/nom: 192e89a | lizmat++ | src/core/List.pm:
Make sure we propegate the type of array
FROGGS lizmat: perhaps a solution would be to only allow one cur type per path?
lizmat FROGGS: isn't it that way already ??? 13:32
FROGGS and then have some sort of cur-magic (like mime magic) to guess the right type
lizmat FROGGS: please remember that we can (and will) have CUR's that are *not* local 13:33
FROGGS true
13:33 VinceDee joined
lizmat e.g. a distribution might decide to install precomped files on the fly from their own on-line repo 13:33
FROGGS I... just like to get rid of the cur-specs I think 13:35
lizmat I'm all ears :-) 13:36
FROGGS like: -I/foo/bar results in a check for /foo/bar/MANIFEST.json, and if it exists it is an CURLI, otherwise a CURLF
though, might be non trivial to guess other types, e.g. when they are non-local
lizmat exactly :-( 13:37
it would only be an optimization for CURLF/CURI
which could make sense for detecting CURI and not having to prefix "inst#" for specifying CURI's
dalek kudo/nom: 3776723 | lizmat++ | docs/ChangeLog:
Mention List.splice fixes/improvements
13:40
13:40 laouji left 13:43 VinceDee left 13:47 skids joined
lizmat m: say Array.new.of; say Array[Mu].new.of 13:50
camelia rakudo-moar 3776b7: OUTPUT«(Mu)␤(Mu)␤»
lizmat hmmm...
timotimo hm, how does the splice candidate work that has "$size?, *@values"? we probably expect @values to be empty if $size isn't passed? 13:51
lizmat m: my @a := Array.new; my @b := Array[Mu].new; dd @a.of, @b.of
camelia rakudo-moar 192e89: OUTPUT«Mu␤Mu␤»
lizmat hmmm...
size is about how many to remove 13:52
timotimo also: even though there's a :range("0..^$elems") in there, we only check for $o < 0, not for $o > $elems?
lizmat indeed, because you may splice into after the end
I guess we should check for Inf there
m: my @a = ^5; @a.splice(10,0,^10); say @a.perl' 13:53
camelia rakudo-moar 192e89: OUTPUT«5===SORRY!5=== Error while compiling /tmp/OM_wBUVpL8␤Two terms in a row␤at /tmp/OM_wBUVpL8:1␤------> 3a = ^5; @a.splice(10,0,^10); say @a.perl7⏏5'␤ expecting any of:␤ infix␤ infix stopper␤ postfix␤ s…»
lizmat m: my @a = ^5; @a.splice(10,0,^10); say @a.perl
camelia rakudo-moar 192e89: OUTPUT«[0, 1, 2, 3, 4, Any, Any, Any, Any, Any, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9]<>␤»
timotimo well, $offset is also not checked against an upper bound
we may want to check $offset against the upper bound if and only if $size isn't 0 13:54
13:54 notjack joined
lizmat m: my @a; @a.splice(Inf,0,^10) 13:55
camelia rakudo-moar 192e89: OUTPUT«This type cannot unbox to a native integer␤ in block <unit> at /tmp/nCesICcBTv:1␤␤»
lizmat m: my @a; @a.splice(*,0,^10)
camelia rakudo-moar 192e89: OUTPUT«This type cannot unbox to a native integer␤ in block <unit> at /tmp/JCvUVc4fZF:1␤␤»
lizmat I guess the latter should DWIM to end of array
the former should get a better error message
13:58 novice-273C joined, laouji joined 13:59 eitz joined
novice-273C p6: $_="\$666"; s:g[\$ <( \d+ )> ] *= 2; .say 14:01
camelia rakudo-moar 192e89: OUTPUT«$1332␤»
novice-273C but oneliner perl6 -pe 's:g[\$ <( \d+ )> ] *= 2' doesn't work after entering $666. why? 14:03
notjack novice-273C: Maybe the implicit say in -pe isn't doing what you want 14:07
novice-273C: I don't have -6 installed on this machine, but maybe try adding an explicit ;.say to your one-liner?
PerlJam I don't think the say is the problem.
[Coke] m: s:g[\$ <( \d+ )> ] *= 2 14:08
camelia rakudo-moar 192e89: OUTPUT«Method 'subst-mutate' not found for invocant of class 'Any'␤ in block <unit> at /tmp/PCCwifQJIP:1␤␤»
14:09 abraxxa joined
[Coke] tries that locally, realizes this machine has a 2014.07 install. whoops. 14:10
14:10 laouji left
timotimo the 2014s called, they want their rakudo back 14:10
[Coke] one of our long term goals is to get rid of any #if jvm (e.g.) blocks in rakudo, yes? (these differences should already be handled by nqp in an ideal stack) Aye? 14:16
timotimo in an ideal world, yeah, but it's not The Prime Directive
but i think there should still be bugs filed somewhere for things that need unequal treatment 14:17
14:20 espadrine joined 14:26 larion_ joined 14:32 aborazmeh joined, aborazmeh left, aborazmeh joined 14:34 virtualsue left 14:38 rurban left, brrt left
ugexe perl6.bat" -e "my $p1 = IO::Path.new-from-absolute-path('C:\Users'); my $p2 = 'Nick'; my $p3 = $p2.IO.relative($p1); say $p3" # > Nick\Documents\GitHub\zef\Nick speaking of IO::Path... 14:40
14:48 lucasb left, rurban joined, mr-foobar left 14:50 khw joined, lucasb joined 14:54 nowan left 14:55 raiph joined 14:57 nowan joined 14:58 novice-273C left 15:00 lucasb left 15:06 nowan left
ugexe my confusion appears to have stemmed from expecting it to use $p1.CWD, not $p2.CWD. i see how that could be expected to work either way now 15:07
still a dream compared to using File::Spec 15:09
hoelzro morning #perl6 15:10
15:12 nowan joined 15:15 aborazmeh left 15:22 tinyblak left 15:23 tinyblak joined
itz DBIish seems quite "worried" 15:27
15:27 tinyblak left 15:30 spider-mario joined 15:37 diana_olhovik left 15:41 TimToady joined, pecastro joined
PerlJam heh ... I was confused why perl5 wasn't finding my library even though I set the environment var. Took me a minute to realize that I'd set PERL6LIB 15:42
15:45 nys joined 15:47 leont joined
leont How do I generate a stacktrace, like confess in p5? 15:47
nine m: say Backtrace.new 15:52
camelia rakudo-moar 377672: OUTPUT«Backtrace.new␤»
TimToady m: say Backtrace.new.full 15:53
camelia rakudo-moar 377672: OUTPUT« in block at src/gen/m-CORE.setting:15046␤ in method new at src/gen/m-CORE.setting:15047␤ in block <unit> at /tmp/TLtHnUmCQc:1␤␤»
nine m: say Backtrace.new.Str
camelia rakudo-moar 377672: OUTPUT« in block <unit> at /tmp/IV4kUylb5e:1␤␤»
TimToady that's probably deferring to .nice 15:54
no, it's just a summary, I guess 15:55
yes, it defers to .nice, was reading the wrong class
15:56 nowan left 15:58 laouji joined
timotimo is there anything nice that'll remind me to update my oracle java JDK when new versions get released? 15:58
nwc10 an egg timer? :-) 15:59
(oh no, wait, that's for *Flash* security updates)
timotimo :)
16:00 nowan joined 16:01 Ven joined 16:02 laouji left
itz can someone with access to hack.p6c.org:/home/rakudobrew do a "panda install Text::VimColour" please? 16:03
16:05 larion left, larion_ left 16:06 virtualsue joined
dalek line-Perl5: e314d53 | (Stefan Seifert)++ | p5helper.c:
Fix loading P5 modules from P6 code run by Inline::Perl6

Add missing XS hookup when Inline::Perl5 is loaded by Inline::Perl6 Fixes: $p6.run('use Foo:from<Perl5>;');
16:07
16:09 FROGGS left
leont Stacktraces not showing arguments to functions is not very helpful :-/ 16:09
TimToady certainly not as helpful as it could be 16:12
nine Especially since in Perl 6 we could see more useful arguments than just "HASH(0x1bb6e78)" 16:13
16:17 atroxaper joined 16:18 rindolf left 16:19 andreoss joined 16:20 diana_olhovik_ joined
dalek rl6-roast-data: 133f61a | coke++ | / (9 files):
today (automated commit)
16:20
16:21 atroxaper left, anaeem1__ left 16:22 uncleyear left
leont I have an array of Subs, I want to return true if calling any of them (with given arguments) return true. How do I express that most easily? 􏿽xABany(@rules).($args)􏿽xBB doesn't seem to work 16:22
16:22 synbot6 left
leont (or maybe PEBKAC) 16:23
16:23 uncleyear joined 16:24 itz left
timotimo i think you need to |$args in any case 16:25
[Coke] m: sub a($) { False } ; sub b($) { False } ; sub c($) { False } ; sub d($) { False } ; sub e($) { True } ; sub f($) { False } ; my @subs = &a, &b, &c, &d, &e, &f; say so any(@subs>>.("stuff"));
camelia rakudo-moar 377672: OUTPUT«True␤»
timotimo that doesn't short-circuit, though 16:26
which leont may want
[Coke] leont: do you want short circuiting?
(in which case, you don't want junctions)
leont That would be nice
Ah, I see 16:27
[Coke] the any has to go around the whole invocation, not just the rules.
m: sub a($) { False } ; sub b($) { False } ; sub c($) { False } ; sub d($) { False } ; sub e($) { True } ; sub f($) { False } ; my @subs = &a, &b, &c, &d, &e, &f; say so [||] @subs>>.("stuff"); 16:28
camelia rakudo-moar 377672: OUTPUT«True␤»
16:28 domidumont left
[Coke] ^^ that should short circuit. 16:28
vendethiel uh; why? 16:29
you're first computing the list
is >> specced to be lazy? 16:30
timotimo it's the opposite of lazy, it's hyper 16:31
Ven oh, wow. blogs.perl.org/users/will_the_chill...lease.html looks cool
16:33 sjn_phone joined
leont Ven: too bad it documents nothing about what it can and can not do 16:33
Ven leont: yep. but apparently it's bazinga-ly fast...
leont AFAIK, for a tiny feature set of perl that it can convert into C 16:34
Ven well, that's already interesting :P 16:35
PerlJam Ven: I dunno ... if you remove all of the Perly features everyone is used to so that you can get super fast ... why not just write in another language, like, I dunno ... C or C++? 16:36
16:36 lucasb joined
leont Given XS call overhead, it wouldn't matter unless you're doing something that you should have been doing in C in the first place 16:36
Or at least I think it does that, if it's actually capable of generating custom opcodes that may be a lot better 16:37
[Coke] (eager vs. lazy) whoops. 16:39
16:40 rindolf joined
leont Why doesn't 􏿽xAB@patterns.first($value ~~ *);􏿽xBB DWIM? 16:40
lizmat was working some more on splice and tests
japhb Dear lazy-#perl6: Please make ||:= work. I want to use the Orcish Maneuver when binding. :-)
lizmat afk for dinnr&
leont Erm, because I forgot to Boolify􏿽x85
timotimo leont: "first" already gives you smart match semantics 16:41
and also: foo ~~ * doesn't create a WhateverCode IIRC
Ven timotimo: wasn't it changed recently? 16:42
m: say (5 ~~ *)(5)
camelia rakudo-moar 377672: OUTPUT«True␤»
timotimo could be
leont No, I think I want the opposite of first
Or really, I want a short-cutting any 16:43
timotimo so [||]?
i *think* that short-circuits?
16:43 spider-mario left
timotimo um, no, probably not 16:43
leont I wouldn't expect that to shortcut
Even if I would expect that to be lazy
Ven well, if the list is lazy, maybe? 16:44
timotimo i don't understand why first isn't what you need :)
leont Because "Regex object coerced to string" 16:45
I want the left and right hand side of the smartmatch to be the other way around 16:46
I suppose that's 􏿽xAB@patterns.first({ $value ~~ $_ })􏿽xBB 16:47
Ven leont: if your perl6 is >1month old, `x ~~ *` might mean something different 16:48
leont It's two days ago
s/ago/old/
Anyway, in the end I'm getting a 􏿽xABNo such method 'match' for invocant of type 'Any'􏿽xBB error that I just can't grok
nine m: m: my @p = /foo/, /bar/, /baz/; say @p.first: "bar" ~~ *; 16:49
camelia rakudo-moar 377672: OUTPUT«/bar/␤»
[Coke] leont: code sample? 16:50
colomon Hmmm… @subs.first({ ?($_($args)) }) ?
leont Would need to reduce, probably 16:51
nwc10 Ven: in addition to what leont and PerlJam said, if you look at all the things that rperl won't support, it's arguably a less powerful language than C: rperl.org/the_low_magic_perl_commandments.html
vendethiel oh :( 16:52
leont It seems I'm getting that error when boolifying the result of the first, not sure what that means 16:54
nwc10 Also, I think it's very hard to judge how practical a language it is, such as trade offs between desgined lack of expressiveness versus performance, until there's more than just bubblesort as an example
the $1000 goal of the kickstarter is really what I'd love to see, to get a feel for it: 16:55
www.kickstarter.com/projects/wbras...escription -- RPerl Application, Alioth Shootout Performance Benchmark, Released On Github Feb 01, 2014
in terms of "what does coding in it look like?" and "how fast does it go?" 16:56
[Coke] do they have an rperlbench or equiv? 16:57
16:58 laouji joined
nwc10 I believe not. It would be cool if they did. Right now, I believe that most of the numbers stated are extrapolations and estimates, not measurements 16:58
16:58 abraxxa left
nwc10 and the surrounding text is being a bit disingenuous by not mentioning this. 16:59
[Coke] I am reminded to ask brrt how things are going! ;)
17:02 Hor|zon joined 17:03 rarara left
leont What should I do to make 􏿽xABsub foo(*@a) as Bool􏿽xBB work? 17:05
tony-o what is your intention with as Bool 17:06
leont I'm getting a 􏿽xABCannot call trait_mod:<as>(Sub, Bool); none of these signatures match: (Parameter:D $param, $type)􏿽xBB
I want to trigger a coercion to Bool, basically
(of the return value)
tony-o m: sub r (*@a) returns Bool { return True; }; r.say; 17:07
camelia rakudo-moar 377672: OUTPUT«True␤»
DrForr m: $x=3; ?^?^$x 17:11
camelia rakudo-moar 377672: OUTPUT«5===SORRY!5=== Error while compiling /tmp/jqAb2aR8oj␤Variable '$x' is not declared␤at /tmp/jqAb2aR8oj:1␤------> 3<BOL>7⏏5$x=3; ?^?^$x␤»
DrForr m: my $x=3; ?^?^$x
camelia ( no output )
tony-o m: $x=3; say ?^?^$x 17:13
camelia rakudo-moar 377672: OUTPUT«5===SORRY!5=== Error while compiling /tmp/vhENiCK78D␤Variable '$x' is not declared␤at /tmp/vhENiCK78D:1␤------> 3<BOL>7⏏5$x=3; say ?^?^$x␤»
tony-o m: my $x=3; say ?^?^$x
camelia rakudo-moar 377672: OUTPUT«True␤»
17:16 pullphinger joined 17:20 dakkar left 17:22 gcole joined
lucasb m: say -> $a,$b {}.perl 17:24
camelia rakudo-moar 377672: OUTPUT«-> ($a, $b) { #`(Block|40320144) ... }␤»
lucasb m: say -> ($a,$b) {}.perl
camelia rakudo-moar 377672: OUTPUT«-> ($ ($a, $b)) { #`(Block|39674320) ... }␤»
lucasb ^^ A tiny glitch when printing signatures for blocks. iiuc, Blocks and Subs share the same signature printing code. Unfortunately, the signature for blocks has different semantics in respect to ->$a,$b vs. ->($a,$b)
[Coke] there is no mechanism to coerce an output. It's your function, you can cast it when you're done.
s/an output/a return/
17:25 gcole left
[Coke] if you have a complicated sub or method, you could probably do something clever with LEAVE 17:27
ugexe you can even abstract that mechanism with a wrap or something
[Coke] (so you don't need the cast in N places)
17:31 telex left 17:32 telex joined 17:37 gcole joined 17:38 larion_ joined, larion joined
skids m: say -> ($($a,$b)) {}.perl 17:45
camelia rakudo-moar 377672: OUTPUT«5===SORRY!5=== Error while compiling /tmp/kI3TgNB2LJ␤Shape declaration with () is reserved;␤ please use whitespace if you meant a subsignature for unpacking,␤ or use the :() form if you meant to add signature info to the function's type␤at /t…»
skids m: say -> ($ ($a,$b)) {}.perl 17:46
camelia rakudo-moar 377672: OUTPUT«-> ($ ($ ($a, $b))) { #`(Block|58221072) ... }␤»
skids Yeah that'll need to be fixed.
I'll look into it when I do another round of cleanups for quirly corner cases I found while writing .assuming. 17:47
*quirky. Though I kindly like the sound of quirly. 17:48
17:49 raiph left
[Coke] like squirrely 17:52
17:55 raiph joined
skids IMO the biggest marketing fail of the early IT age was not getting people to pronounce SQL as "squirrel". 17:57
leont Getting 􏿽xABCan't use unknown trait 'is signature' in a method declaration.􏿽xBB, though signature is documented in S06
Is that NYI? Or have things changed? 17:58
[Coke] assuming NYI - what are you trying to do? 17:59
leont metaprogramming, really 18:01
I have a bunch of methods, and for every method foo I want a second method not-foo with the same signature
skids Hrm... actually if that were implemented and took a variable of type Signature rather than a literal, that might be one step towards an EVAL-less .assuming.
18:02 FROGGS joined
tony-o leont: us 'returns' instead of 'as' 18:03
[Coke] tony-o: that doesn't coerce, it squawks.
tony-o oops, typed that a while ago
skids m: sub foo ($a, $b) { say "a$a b$b" }; my $bar = &foo.assuming(); bar(1,2); &bar.signature.say
camelia rakudo-moar 377672: OUTPUT«5===SORRY!5=== Error while compiling /tmp/NHVhtPsmNf␤Undeclared routines:␤ &bar used at line 1. Did you mean '&bag'?␤ bar used at line 1. Did you mean 'bag'?␤␤»
skids m: sub foo ($a, $b) { say "a$a b$b" }; my &bar = &foo.assuming(); bar(1,2); &bar.signature.say
camelia rakudo-moar 377672: OUTPUT«a1 b2␤($a, $b)␤»
skids ^^ leont 18:04
[Coke] m: sub a returns Str { 3 } ; a.WHAT.say
camelia rakudo-moar 377672: OUTPUT«Type check failed for return value; expected 'Str' but got 'Int'␤ in block <unit> at /tmp/XvQjqFGxNn:1␤␤»
18:04 cognominal left
skids Though I guess it is harder with methods as you ave to install them with the MOP. 18:05
18:05 laouji left
[Coke] if you're dynamically installing methods, you could just use the MOP API and not the language sugar, aye? 18:07
18:07 laouji joined
[Coke] s/just// 18:07
skids There's little MOP api in the way of creating signatures IIRC.
[Coke] doesn't find coercing types for argument sigs in S06 18:08
is there a get/set at least? 18:09
(if you just want something identical...)
leont Now doing $package.HOW.add_method: $package, $name, method($arg) {...};
I want to add that signature to that method
skids [Coke] They are in S02. 18:10
18:12 smls left 18:13 Ven left 18:24 uncleyear left, uncleyear joined
skids leont: what does the body of a not-foo look like? 18:25
andreoss m: my $a = 1; say ($a.WHAT == Nil); 18:27
camelia rakudo-moar 377672: OUTPUT«Use of uninitialized value of type Int in numeric context in block <unit> at /tmp/2rijqmNHOx:1␤Use of Nil in numeric context in block <unit> at /tmp/2rijqmNHOx:1␤True␤»
andreoss m: my $a = 1; say ($a.WHAT == Int);
camelia rakudo-moar 377672: OUTPUT«Invocant requires a 'Int' instance, but a type object was passed. Did you forget a .new?␤ in block <unit> at /tmp/LALPCM9_U_:1␤␤»
leont the normal one is 􏿽xABmethod($arg) { self.bar($arg) }􏿽xBB, the negative one is 􏿽xABmethod($arg) { self.baz($arg) }􏿽xBB, basically
andreoss m: my $a = 1; say ($a.WHAT ~~ Int);
camelia rakudo-moar 377672: OUTPUT«True␤»
skids m: my $a = 1; say ($a.WHAT === Nil);
camelia rakudo-moar 377672: OUTPUT«False␤»
skids Also:
leont ($arg being a sub itself, this is somewhat simplified))
skids m: my $a = 1; say ($a.WHAT === Mu); 18:28
camelia rakudo-moar 377672: OUTPUT«No appropriate parametric role variant available for 'Rational'␤ in any specialize at src/gen/m-Metamodel.nqp:2471␤ in any compose at src/gen/m-Metamodel.nqp:2781␤ in any make_pun at src/gen/m-Metamodel.nqp:1642␤ in any find_method at src/gen/m…»
skids m: my $a = 1; say ($a.WHICH === Mu.WHICH);
camelia rakudo-moar 377672: OUTPUT«False␤»
18:30 nowan left
skids leont: well, in order to write the body you need stuff from the signature, so... adding a dynamic signature won't help there unless you include a capture of a known name. 18:31
andreoss Cannot call factorize(967); none of these signatures match:
(Int $n)
why such thing could happen?
skids m: factorize.^candidates.say
camelia rakudo-moar 377672: OUTPUT«5===SORRY!5=== Error while compiling /tmp/TzjOqftnR0␤Undeclared routine:␤ factorize used at line 1␤␤»
andreoss paste.debian.net/280297/ 18:33
itz_ andreoss: I think the Vim::TextColour issue was due to it not working under cron (which should now be fixed) 18:34
18:35 raiph left
skids andreoss: try factorize(Empty,967); # this is why. Add a | to your calls. 18:36
andreoss itz_: the TERM variable? 18:40
skids andreoss: Or, sorry, comprehension fail, anyway is it possible @primes is truning empty somehow...?
andreoss Cannot call factorize(967); none of these signatures match: 18:41
(Empty, |z)
itz_ andreoss: no not a missing environment variable but some more mysterious vim options discovered by actually RTFMing :) 18:42
skids Really another spot where it needs to say waht you passed.
geekosaur would suspect isatty()...
skids andreoss: I didn't mean to change factorize's signature. I mean if you actually invoke factorize(Empty,967) you get the same error message. 18:44
andreoss skids: yes, i was stupidly thinking about 2**8 as 8 digit number, 18:45
18:48 domidumont joined, laouji left 18:49 laouji joined 18:52 nowan joined
leont Is there a p6 equivalent of splitdir? 18:54
18:54 laouji left
leont IO::Path.parts is not as helpful as I had hoped 18:55
18:58 bin_005 joined 19:00 laouji joined
domidumont [ptc]: now that moarvm in on Debian unstable, do you have some time to work on nqp package ? 19:06
19:06 atroxaper joined
andreoss m: sub x { loop { return 1 } }; say x(); 19:09
camelia rakudo-moar 377672: OUTPUT«1␤»
19:09 beastd joined
andreoss m: sub x { gather loop { return 1 } }; say x(); 19:09
camelia rakudo-moar 377672: OUTPUT«Attempt to return outside of any Routine␤␤»
andreoss why?
m: say return 1 19:11
camelia ( no output )
vendethiel andreoss: because the gather is lazy
andreoss m: say { return 1 }
camelia rakudo-moar 377672: OUTPUT«-> (;; $_? is parcel) { #`(Block|55643616) ... }␤»
19:11 atroxaper left
vendethiel m: sub x { @ = gather loop { return 1 } }; say x(); 19:11
camelia rakudo-moar 377672: OUTPUT«1␤»
vendethiel (really, "@ =" could be any "strict" modificator; to avoid the laziness)
19:11 rindolf left
andreoss m: sub x { eager gather loop { return 1 } }; say x(); 19:13
camelia rakudo-moar 377672: OUTPUT«1␤»
19:15 Alina-malina left, beastd left 19:19 anaeem1 joined, Alina-malina joined
vendethiel andreoss: basically, when you call the function, it returns the "Gather" construct itself, that did NOT iterate yet. then, when you print it, it starts iterating over it... only to find it's trying to return from outside a function 19:20
that might have a surprising behavior, though...
m: sub x { gather loop { return 1 } }; sub f { for ^3 { say x(); }}; f; 19:21
camelia rakudo-moar 377672: OUTPUT«Attempt to return outside of any Routine␤␤»
vendethiel nah, it "correctly" crashes
(oh rather, errors) 19:25
19:25 roguelazer joined, beastd joined 19:29 domidumont left 19:41 laouji left 19:43 lucasb left, firefish5000 joined 19:44 espadrine left
masak good evening, #perl6 19:44
[Coke] hio
19:46 andreoss left
dalek ast: 104d08f | usev6++ | S12-attributes/clone.t:
Fudge test for RT #125577 on JVM
19:48
19:52 firefish5000 left 19:59 spider-mario joined
hoelzro anyone here use Inline::Perl5 (or any other modules that use a helper library) on Ubuntu? 20:02
I'm seeing a weird dynamic linker error with Xapian, and I see it in Inline::Perl5 too, but not on Arch Linux
Cannot locate native library '/tmp/8631-p5helper.so': /tmp/8631-p5helper.so: undefined symbol: boot_DynaLoader 20:03
I get a simliar error with my Xapian binding, even though libxapian is in the dependencies of my .so file
20:05 Sqirrel_ joined, Sqirrel left 20:08 meisl joined 20:11 eitz left 20:15 colomon left, Sqirrel_ left
nwc10 good UGT heresy, masak 20:15
20:18 TEttinger joined
masak nwc10: when I rez in #perl6, no matter how I greet, it is always morning in my heart. :> 20:19
dalek ast: 08b64b7 | usev6++ | S06-signature/arity.t:
Add test for RT #78240
20:20
ast: 1c8e5ab | usev6++ | S06-signature/arity.t:
Add test for RT #77744
20:23 eitz joined 20:29 yeltzooo joined 20:30 eitz left 20:33 colomon joined 20:34 darutoko left 20:42 laouji joined 20:47 laouji left 20:49 rurban left 20:53 notjack left, cognominal joined 20:58 larion_ left, larion left 20:59 [particle] joined, [particle]1 left 21:00 kurahaupo joined 21:03 FROGGS left, [particle] left 21:05 bin_005 left, bin_005_w joined 21:06 [particle] joined 21:08 diana_olhovik_ left, skids left 21:10 larion_ joined, larion joined 21:16 colomon left 21:22 notjack joined 21:33 colomon joined 21:35 larion_ left, larion left 21:43 notjack left 21:46 beastd left 21:48 kurahaupo left 21:57 nowan left 21:59 nowan joined 22:01 nowan left 22:02 espadrine joined 22:04 nowan joined 22:09 meisl left
RabidGravy is there a more concis way of doing "for @a -> $b, $c { @b.push($b); @c.push($c); }" ? 22:13
masak m: my @a = <OH HAI OH HAI>; my ($b, $c) = (@a.classify({ ++$ % 2 })).values; say $b; say $c 22:15
camelia rakudo-moar 377672: OUTPUT«HAI HAI␤OH OH␤»
masak though that `.values` there could be refined a bit, since you'd essentially be getting something unordered. 22:16
better to sort by key first, and then extracting the values.
RabidGravy this is "de-interleaving" pcm frames I don't changing the order in any way will work ;-) 22:19
22:19 sjn_phone left
TimToady m: my ($a,$b); ($++ %% 2 ?? $a !! $b).push: $_ for <OH HAI OH HAI>; say $a, $b 22:19
camelia rakudo-moar 377672: OUTPUT«OH OHHAI HAI␤»
22:20 bin_005_w left
RabidGravy ha ha brilliant 22:20
22:22 pullphinger left 22:25 cognominal left
TimToady m: my ($a,$b); flat(($a,$b) xx *) Z[[&push]] <OH HAI OH HAI>; say $a, $b 22:26
camelia rakudo-moar 377672: OUTPUT«OH OHHAI HAI␤»
masak "we just zip this infinite list..."
'night, #perl6 22:27
22:42 atroxaper joined 22:43 ab6tract joined, skids joined 22:46 virtualsue left, spider-mario left, atroxaper left
ab6tract m: my $d = Date.new(:year(1999)); say $d.succ # if Range uses succ for Date.new(:year(1999))^..Date.new(:year(2015)), then ^ has a not-quite-DWIMing feel to it 22:49
camelia rakudo-moar 377672: OUTPUT«1999-01-02␤»
22:50 kurahaupo joined, laouji joined
ab6tract I did not expect Date.new(:year(1999)) to become "1 January 1999" 22:50
22:54 espadrine left, laouji left 22:55 RabidGravy left
leont What did you expect? 23:01
TimToady that feels a bit like expecting the successor of 1i to be 2i 23:04
23:05 kaare_ left, kaare_ joined 23:10 tinyblak joined 23:11 kaare_ left
ab6tract TimToady: it's a fair point. But I'd argue that there is real value in having Date objects which can represent just a year, or just a year month. 23:13
leont: I would expect Date.new(:year(1999)) to just be '1999' . 'yyyy' and 'yyyy-mm' are also pretty common date-y things 23:18
leont Would you want a different class for every level of precision? Or fat classes that are half useless half of the time? 23:19
lizmat maybe Year and Month should be roles?
ab6tract I don't think adding a few defined-ness checks would fatten things up too much, but I haven't looked too deeply at the Date code 23:20
But obviously a 'third way' would be ideal her 23:21
*here
because neither of your options sound very appetizing leont :)
TimToady well, if something has different opertions, it's a different type, to me 23:22
*rat
leont lizmat: Months are truly horrible, and years are mostly just integers (except there's no year 0)
ab6tract lizmat: that sounds intriguing.
TimToady leont: sure there's a year 0, the idiots just call it 1 BC 23:23
timotimo wait, so it goes from 1 AD to 1 BC?
leont Yes
timotimo i don't even know what to say about that 23:24
leont I love Postgress' documentation on this: The first century starts at 0001-01-01 00:00:00 AD, although they did not know it at the time. This definition applies to all Gregorian calendar countries. There is no century number 0, you go from -1 century to 1 century. If you disagree with this, please write your complaint to: Pope, Cathedral Saint-Peter of Roma, Vatican.
TimToady and -1 is 2 BC :)
ab6tract leont: I'm not sure all calendars use integers, but even if so, that doesn't obviate the fact that I am operating on Years, not Ints 23:25
timotimo that's as unnerving to me as the way AM and PM change over the course of the day
TimToady and we should rewrite all our textbooks such that year div 100 is the century, so we're current in the 20th century 23:26
leont What part of that problem isn't solved by 􏿽xABsubset Year of Int􏿽xBB?
TimToady *currently
ab6tract in my opinion, I should be able to have an array where .grep( * ~~ Date ) and have years and year months in there 23:27
TimToady leont: doesn't complain if you pass it to a Month parameter?
ab6tract or s/Date/Dately/, I don't mind
TimToady I think approximate dates should be a different type than exact dates
leont Yeah 23:28
ab6tract TimToady: that sounds perfectly fine to me
hence the "Dately" bit
TimToady maybe you're just looking for DateInterval
ab6tract because I want to keep my DateTimes too
TimToady or InstantInterval, once we extend atomic time back to the beginning of time 23:29
ab6tract TimToady: is DateInterval a thing already? 23:30
TimToady
.oO("Historians concluded today that there was a leap-second in 1066, and that is what brought on the Norman victory")
23:31
lizmat sleep&
ab6tract I don't see any references in the code. but I do see that Dateish is already a thing. 23:33
TimToady: if you elaborate more on what you mean, I might just end up implementing it 23:34
23:36 khw left
ab6tract btw, leont, poking around in Range does make me less inclined for a fat class solution to anything 23:45
though in that case I think its probably worth it
timotimo i'd like to know p6ers opinions on Groovy 23:47
ab6tract so sleep and +@see-you-later.grep( Dateish ) 23:49
23:53 ab6tract left 23:58 vendethiel left