»ö« 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.
timotimo to be fair, the original used to have a getarg_o, so we turned the getarg_o into a getarg_i + boxing 00:00
that'll probably jit better
and that then got numified and the result of that intified
so we would really have to know more about boxing and such, which i'd like to do at some point 00:01
flussence is string_to_int called on every string to int coercion? as in, even the ones from parsing a script? 00:02
timotimo don't think so
00:02 AlexDaniel left
timotimo it's inside nqp 00:02
in HLL::Actions, so only used during parsing, i'd bet
00:04 llfourn left
flussence I'm looking closer, and it looks like that path gets hit for *every* literal number in p6 code... 00:10
during parsing, anyway, so it wouldn't make a difference after precomp. 00:11
00:18 aborazmeh left
pmichaud if it's modeled properly, then yes, string_to_int will happen during parsing. Put another way, the string-to-integer conversion done at runtime is also used for compile-time parsing. 00:22
m: sub xyz(@a) { @a.shift; }; my @b = 1,2,3; xyz(@b); say @b.elems 00:23
camelia rakudo-moar 642946: OUTPUT«2␤»
pmichaud m: sub xyz(@a) { @a.shift; }; my @b = 1,2,3; xyz(@b.values); say @b.elems
camelia rakudo-moar 642946: OUTPUT«3␤»
pmichaud m: my @b = 1,2,3; say (0, @b, 4)[1];
camelia rakudo-moar 642946: OUTPUT«1 2 3␤»
pmichaud m: my @b = 1,2,3; say (0, @b, 4)[3];
camelia rakudo-moar 642946: OUTPUT«Nil␤»
pmichaud m: say (:a(1):b(2)).WHAT 00:25
camelia rakudo-moar 642946: OUTPUT«(Parcel)␤»
pmichaud m: say (:a(1):b(2))[1]
camelia rakudo-moar 642946: OUTPUT«b => 2␤»
pmichaud m: say %(a => 1, b=> 2).hash
camelia rakudo-moar 642946: OUTPUT«a => 1, b => 2␤»
pmichaud m: say %(:a(1):b(2));
camelia rakudo-moar 642946: OUTPUT«a => 1␤»
00:25 laouji joined
pmichaud m: say (:a(1):b(2)).hash 00:26
camelia rakudo-moar 642946: OUTPUT«a => 1, b => 2␤»
pmichaud m: say (:a(1), :b(2)).hash
camelia rakudo-moar 642946: OUTPUT«a => 1, b => 2␤»
pmichaud m: say (:a(1), :b(2)).WHAT
camelia rakudo-moar 642946: OUTPUT«(Parcel)␤»
raydiak pmichaud: also noticed I can save my fingers a bit by reducing it to :a:b, same behavior 00:28
Brock is annoyed that rakudo yells at me when trying to do $somethingn.somemethod during method chaining 00:31
00:31 Brock is now known as awwaiid 00:35 aborazmeh joined, aborazmeh left, aborazmeh joined 00:39 SevenWolf joined, laouji left 00:40 laouji joined
raydiak awwaiid: if I did "say sub {}␤.defined" would that be "say(sub {}); $_.defined" or "say(sub {}.defined)"? 00:40
awwaiid the latter 00:43
timotimo single-pass-parsing be damned
to be fair, we can do this in a single pass
awwaiid I'm sure this issue with whitespace surrounding method invocation has been hashed out already ... I'm just registering my irritation.
my ongoing irritation, that is. 00:44
timotimo you most probably already know about putting a backslash in front of the newline?
00:44 laouji left
awwaiid I do not! Yay back to C (or is it sh?) line continuations! 00:45
00:45 laouji joined
timotimo it's not the same, though 00:45
for example, it allows you to put comments in there, too
it's the more general concept of "unspace" and it works in many placse
raydiak oops, assumed you were irritated about having to put the backslash :)
timotimo m: "hello"\ .uc\ .say 00:46
camelia rakudo-moar 642946: OUTPUT«HELLO␤»
timotimo m: "hello"\ #`( this is an in-line comment in some unspace ) .uc\ .say
camelia rakudo-moar 642946: OUTPUT«HELLO␤»
awwaiid raydiak: well... _now_ i'm irritated with the backslash :)
timotimo haha
but at least you have a way to deal with the problem :)
awwaiid ya!
gracias :)
raydiak heh I ought to not suggest new irritations :) 00:47
awwaiid naw. Now I can say to people "oh yeah, you can totally put whitespace before a method invocation. You just have to escape it. BECAUSE THAT MAKES SENSE"
</sarcasm> 00:48
well. easy to judge; not like I wrote any perl6 parsers lately :)
raydiak fwiw I have wanted to do that same thing and wonder about a slang for it 00:49
awwaiid Also from the same littlescript, I'm still irritated at .elems instead of .count or .size or .cardnality or anything that makes sense (or all of them) :) 00:51
timotimo perhaps use prefix:<+>?
awwaiid I forgot about that. lemme see here...
@things .= grep(*.elems == 4) becomes @things .= grep(+* == 4) . Seems to work. Even less readable, which is impressive. 00:53
also, .= amuses me endlessly
gagalicious what's the largest open source perl program (framework/software/etc etc ) out there? coz i would like to borrow some codes and peek at how they manage to get things to work together... db accesses , cache management etc.
raydiak or just * == 4, since == is implicitly numeric
awwaiid now there's an idea 00:54
timotimo heads towards bed
raydiak \o timo
awwaiid See, this is why it is good to complain. Y'all get feedback about annoyances, and I get to learn about work arounds / simplifications :) 00:55
timotimo flussence: how about getting a --profile of a piece of perl6 that contains a lot of number literals?
awwaiid gagalicious: Good question. One source might be some of the libraries implemented in the Panda collection, modules.perl6.org/ . Not sure what is biggest 00:56
hey were did "unit" in the front of things come from? I just started seeing that 00:57
gagalicious what about perl5 programs? by the way, how portable is perl5 to perl6?
awwaiid there are tons of large perl5 programs; perl5 and perl6 are quite different languages so not very portable (though there are some bridge libraries, but these are about the same as running python and perl together IMO) 00:58
BenGoldberg awwaiid, In the context of software (and especially of testing), a unit is the smallest testable part of an application. 00:59
awwaiid That is, Perl5 and Perl6 have diverged significantly, despite their apparent numerical relationship.
BenGoldberg: I was referring to recent changes in libraries, such as github.com/masak/html-template/com...c7eb981c57
BenGoldberg Hmm, ok, I have no idea what that does. Sorry :) 01:00
gagalicious i'm extremely comfy with perl5... i've checked out on perl6... basically some... "tweak" and "programming style improvements"... what's the ultimate goal of perl6 again?
raydiak awwaiid: it's required when you're using the braceless form of a package decalration, where it governs the entire rest of the file...aiui, the unit keyword is meant to eliminate confusion about "class Foo;" looking like a stub, so now you have to write "unit class Foo;" instead 01:01
awwaiid gagalicious: here are some perl5 website codebases you could browse, perlmaven.com/web-sites-powered-by-...-code-base
gagalicious thanks
BenGoldberg The ultimate goals of perl6 are just like that of any other high level language -- ease of writing, ease of testing, efficiency, etc.
raydiak awwaiid: unit also makes it easier to tell whether a .pm is P6 or P5 01:02
awwaiid ah. interesting way to disambiguate stub vs braceless. Does it apply to package as well?
raydiak yes
awwaiid cool, thanks!
raydiak you're welcome :) 01:03
timotimo I meant --profile-compile, flussence
01:05 gfldex left 01:19 kurahaupo1 joined 01:32 amurf joined 01:36 amurf left 01:38 Ben_Goldberg joined 01:40 BenGoldberg left 01:42 BenGoldberg_ joined 01:46 Ben_Goldberg left 01:47 llfourn joined 01:52 llfourn left 01:58 yqt left 01:59 aborazmeh left 02:16 yeahnoob joined, bjz left 02:30 bjz joined 02:32 bjz left, noganex joined 02:35 rmgk_ joined, rmgk left, rmgk_ is now known as rmgk, noganex_ left 02:52 aborazmeh joined, aborazmeh left, aborazmeh joined 03:11 BenGoldberg joined 03:13 aborazmeh left 03:14 BenGoldberg_ left 03:15 aborazmeh joined, aborazmeh left, aborazmeh joined 03:23 cognominal left, cognominal joined 03:27 vike1 left, mattp__ left, nwc10 left, zoosha_ left, zoosha joined, pRiVi left, awwaiid left, lestrrat left, sunnavy left, nwc10 joined, sunnavy joined 03:28 awwaiid joined, pRiVi joined, mattp__ joined, jdv79 joined, vike1 joined 03:30 lestrrat joined 03:31 nys left 03:39 BenGoldberg left 03:53 amurf joined 03:57 amurf left
Util gagalicious: work-in-progress Perl 5->6 translator at github.com/Util/Blue_Tiger 04:01
04:02 adu_ joined 04:16 [Sno] joined 04:25 mr-foobar joined 04:37 telex left 04:39 telex joined 04:45 telex left 04:46 telex joined 04:58 mr-foobar left, mr-fooba_ joined 05:01 skids left 05:04 prevost joined 05:07 prevost left 05:19 [Sno] left
gagalicious i have a long list of variables : my($url,$website,$information,$desc); how do i make them all initialize with '' <-- nothing? just initialize it that's all... my list is like 50+ variables. 05:19
raydiak m: my ($a, $b) = '' xx *; say [$a, $b].perl 05:24
camelia rakudo-moar 642946: OUTPUT«["", ""]␤»
05:26 llfourn joined 05:27 Settwi joined
raydiak gagalicious: like that ^ 05:27
gagalicious raydiak : wow... i have no idea what xx * means 05:28
Timbus list multiplier, multiplies it infinite times 05:29
raydiak gagalicious: it's a lazy list of infinitely many ''
gagalicious ok thanks
where to read about that?
Timbus m: say 'a' xx 5 05:30
camelia rakudo-moar 642946: OUTPUT«a a a a a␤»
Timbus should be on doc.perl6.org
raydiak doc.perl6.org/routine/xx
05:31 llfourn left
gagalicious i've read a lot of funny things online... some i dont agree. i have a question... what's a "syntatically correct" way of breaking out of a "if" block? i dont mind even if it's not programmatically correct or good industry practise. i would like it to be "get the job done" kind of way. what do you guys recommend? a "last;" inside a very long if? stackoverflow.com/questions/1705366...-statement 05:33
Timbus i think the only times ive had to do that.. is in a situation where i would return, or throw an error to get out 05:36
maettu or use dispatch tables en.wikipedia.org/wiki/Dispatch_table ? 05:38
05:39 Settwi left, aborazmeh left 05:41 adu_ left 05:42 amurf joined 05:45 FROGGS left, Woodi left, Psyche^ joined 05:46 Woodi joined 05:47 amurf left 05:50 Patterner left 05:52 diana_olhovik_ joined
gagalicious i have multiple regex config script for different websites... to scrape certain metadata off the site. what's the best way to do an eval() on code snippet where it matters? i mean.. as there are a lof of ' ' " <-- etc inside the eval statement, how should i go about it? i vaguely recall a way to put everything as it is... is it q//... i cant remember how to put everything as it is inside a $perlscriptcontent; does anyone know? 05:53
Timbus : ok. thanks. i did if{ "the whole statement" } in the end... maybe.. that's programmatically advisable... oh well. 05:54
05:55 domidumont joined 05:59 spider-mario left, domidumont left
Timbus gagalicious: If you want feedback, just paste a snippet of your code (gist.github.com) from time to time and see what people say :) 06:00
06:00 spider-mario joined, domidumont joined
Timbus .. it helps a lot if it's perl 6, though. 06:00
06:15 FROGGS joined 06:22 araujo joined
moritz hoelzro: fwiw, exception types is an area where the implementation generally leads and the design docs follow 06:24
dalek kudo/nom: 0a8f51b | lizmat++ | t/01-sanity/55-use-trace.t:
Hopefully fix test on Win, jnthn++
06:27
06:29 RabidGravy joined 06:33 domidumont left
[Tux] lizmat, has that null-thing been identified yet? 06:39
and performance is also worse again (compared to early this weekend)
lizmat [Tux]: I have no idea, been offline most of today... (yesterday for you)
I didn't even backlog yet 06:40
06:40 darutoko joined
lizmat gagalicious: there is a "leave" statement specced that leaves a block, much like a return, however that's NYI atm 06:45
gagalicious what's NYI?
[Tux] not yet implemented
moritz Not Yet Implemented
gagalicious i just put it in a file and then slurp it, then eval that slurp... works nicely. thanks btw 06:46
dalek kudo/nom: 2281689 | lizmat++ | src/core/Hash.pm:
Make my %h.perl and %h{An}.perl identical

Fixes RT #125352
06:47
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=125352
dalek ast: 60dd9f8 | lizmat++ | S32-num/rat.t:
Fix tests with new nu/de behaviour
06:52
Heuristic branch merge: pushed 41 commits to rakudo/newio by lizmat 06:54
lizmat and on that note, I wish #perl6 a good night! 06:55
06:56 domidumont joined
moritz \o 06:57
06:58 larion left
El_Che there are streams for YAPC::NA, are there perl6 talks planned? 06:59
06:59 bjz joined
dalek c: 5458f98 | RabidGravy++ | bin/p6doc-index:
Hand merge c4125cbd2b1bedc1f16610043a7c1e6790049c05 from ab5tract
07:00
c: 575666c | RabidGravy++ | bin/p6doc-index:
Merge branch 'ab5tract-inc'
07:08 [TuxCM] joined 07:14 [Sno] joined 07:15 g4 joined, g4 left, g4 joined 07:19 _mg_ joined 07:20 SevenWolf left 07:25 _mg_ left 07:27 rindolf joined
dalek c: c6dc297 | ab5tract++ | lib/Type/Whatever.pod:
Add a few clarifications, re-wordings, and expansions to the Whatever docs
07:31
c: 1ce879c | ab5tract++ | lib/Type/Whatever.pod:
Clarify a bit
07:31 andreoss joined
RabidGravy that was harder than it should have been 07:32
07:39 [Tux] left, larion joined
andreoss is there something like Moose builder routine for class variables? 07:42
07:42 bjz left
mst andreoss: class variables are basically a way to hide a global - I'm not sure how it'd make sense to do that 07:42
moritz andreoss: what's your use case? 07:43
andreoss has $.x is rw, builder => sub { ... }; 07:44
and i also want it lazy 07:45
moritz that's how you want it to look, which isn't the same as your use case
07:45 Ven joined
andreoss moritz: i didn't come up with a use case, yet, i know i could use ordinary cached method here 07:46
though having builder seems more explicit 07:47
moritz andreoss: but your example uses an attribute, not a class variable
mst (I've no idea if such a feature exists, but I'd avoid it if it did)
moritz andreoss: so I'm wondering what you really want/need 07:48
mst andreoss: yeah, the question is why you'd want that in the first place
step back. explain what you're trying to achieve.
07:49 abraxxa joined
El_Che mst: kudos on passing the torch for the state of the velociraptor. 07:50
jnthn morning, #perl6
andreoss i got class with methods in it, but i want to dry it out a bit, by replacing method with class variables and builder methods
moritz andreoss: just to get our terminology straight, a class variable exists once per class, not once per object/instance 07:51
andreoss: is that what you want? and if yes, why?
andreoss oh. instance variable of course, sorry
moritz ah
mst oh, then ignore everything I said
moritz we call them "attributes"
mst I was talking about class variables
El_Che: it was always meant to happen at some point; I think this is the best chance I could possibly have gotten to make it work 07:52
moritz there was a "will lazy" patch in rakudo, but it was backed out
can be done in a module
andreoss moritz: so a cached method will do something like that? 07:53
moritz andreoss: I'd rather go with the "will lazy" approach for lazily building it
see my two lines above
07:54 larion left
mst moritz: really? we still don't have proper lazy build? 07:54
that's, like, the most common sort of Moose/Moo attribute other than ro+required in my code :( 07:55
(and, actually, the biggest reason I get annoyed trying to write OO in python/ruby/javascript, so perl6 missing it is ... wat ...)
andreoss is there : lvalue attributes in Perl 6?
moritz mst: seems like :( 07:56
andreoss: it's spelled 'is rw'
07:56 [Tux] joined 07:57 brrt joined
andreoss m: class Y {method z is rw {} }; my $y = Y.new; $y.z = 1; 07:57
camelia rakudo-moar 228168: OUTPUT«Attempted to STORE to Nil.␤ in block <unit> at /tmp/z2cOZFCNNh:1␤␤»
moritz andreoss: you must return something that can hold the value you assign to 07:58
jnthn still things an "is cached" method is the right way to go for "compute it once per instance". The fact you need some per-instance state to store it, which may be an attribute, feels like an implementation detail to me. 08:00
*thinks
andreoss m: class Y {method z is rw { state Int $x; return $x } }; my $y = Y.new; $y.z = 1;
camelia rakudo-moar 228168: OUTPUT«Cannot assign to a readonly variable or a value␤ in block <unit> at /tmp/d0pSKklhxf:1␤␤»
RabidGravy lose the "return" and you're good
andreoss m: class Y {method z is rw { state Int $x; $x } }; my $y = Y.new; $y.z = 1; 08:01
camelia ( no output )
andreoss
mst jnthn: I've used it as a cache, sure, but (1) cache invalidatation (clearers in Moose parlance) (2) computing it is allowed to have side effects
andreoss RabidGravy: why no return?
08:02 [TuxCM] left, larion joined
RabidGravy because return doesn't itself return an lvalue 08:02
FROGGS m: class Y {method z is rw { state Int $x; return-rw $x } }; my $y = Y.new; $y.z = 1; 08:03
camelia ( no output )
RabidGravy Now that I didn't know
andreoss only state variable could be rw? 08:07
RabidGravy andreoss, no but it doesn't really make a great deal of sense for e.g. a lexically scoped variable 08:09
e.g.
m: class Y {method z is rw { my Int $x; return-rw $x } }; my $y = Y.new; $y.z = 1;
camelia ( no output )
RabidGravy that works but doesn't make sense
mst RabidGravy: "< RabidGravy> that works but doesn't make sense" is now the topic of my work social channel 08:10
RabidGravy++ 08:11
RabidGravy :-\
FROGGS m: class Y {method z is rw { my Int $x; return-rw $x } }; my $y = Y.new; $y.z = 1; say $y.z 08:12
camelia rakudo-moar 228168: OUTPUT«(Int)␤»
FROGGS at least it is correct 08:13
RabidGravy andreoss, to be more specific it only makes sense if the lvalue you are returning will persist between invocations of the method, as is the case with "state" but also attributes or even class data 08:14
e.g. 08:16
m: class Y {my Int $x; method z is rw { return-rw $x } }; my $y = Y.new; $y.z = 1; say Y.new.z
camelia rakudo-moar 228168: OUTPUT«1␤»
mst jnthn: OTOH if you wanted to call it 'is cached' I'd basically be ok with that so long as I can expire it 08:18
jnthn: I just want the feature. perl6 OO should not annoy me in ways perl5 doesn't :)
dalek c: e792986 | paultcochrane++ | lib/Type/Str.pod:
State more clearly that substr-eq matches substring exactly
08:31
08:32 zakharyas joined, spider-mario left, larion left 08:49 espadrine_ joined, bin_005 joined 08:52 gfldex joined 08:58 larion joined 09:00 tinyblak_ joined 09:03 tinyblak left 09:04 llfourn joined 09:07 bin_005 left 09:08 bin_005 joined 09:09 _mg_ joined 09:10 llfourn left 09:18 |Tux| joined 09:20 amurf joined 09:24 amurf left 09:31 diana_olhovik_ left 09:35 diana_olhovik_ joined 09:48 Ven left, bin_005 left 09:50 bin_005 joined, kurahaupo1 left 09:51 yeahnoob left 10:03 diana_olhovik_ left 10:05 diana_olhovik_ joined 10:07 dayangkun left 10:10 Vlavv left 10:13 andreoss left 10:19 _mg_ left, bbkr_ left 10:24 Vlavv joined 10:25 brrt left 10:27 Ven joined 10:30 rindolf left 10:32 bin_005 left 10:35 Sqirrel left, laouji left 10:36 Sqirrel joined, Ven left 10:40 laouji joined 11:09 Sqirrel left 11:13 Ven joined
masak good time, #perl6 11:22
RabidGravy erp 11:26
masak good erp, RabidGravy
sue_ :-) 11:29
11:29 _mg_ joined 11:32 Blub\0 joined 11:34 domidumont left, bjz joined 11:36 _mg_ left, domidumont joined 11:37 bjz left
flussence mst: I asked about the expiry thing a few months back, and the answer was something along the lines of "write your own trait_mod" 11:42
RabidGravy it seems entirely doable 11:43
flussence it also helps that "is cached" is a multi to begin with :)
11:55 _mg_ joined
RabidGravy on a related note, if one wanted to introduce a new trait auxillary like "might" how do you do it from user code? 11:56
12:02 domidumont left, domidumont joined
moritz RabidGravy: I don't think that's supported yet 12:04
RabidGravy boo! ;-) It would go some way to simplifying the discussions about traits where people struggle to find a suitable name to follow e.g. 'is' :) 12:06
12:11 yqt joined 12:20 Sqirrel joined
hoelzro o/ #perl6 12:28
12:33 zakharyas left
dalek kudo-star-daily: 42f55ac | coke++ | log/ (2 files):
today (automated commit)
12:40
kudo-star-daily: b40b4bd | coke++ | log/ (2 files):
today (automated commit)
kudo-star-daily: f54abcd | coke++ | log/ (2 files):
today (automated commit)
rl6-roast-data: 26418ea | coke++ | / (9 files):
today (automated commit)
rl6-roast-data: 37e3674 | coke++ | / (9 files):
today (automated commit)
rl6-roast-data: 4c1dcb0 | coke++ | / (9 files):
today (automated commit)
12:41 rindolf joined 12:42 llfourn joined 12:45 xinming joined 12:46 zakharyas joined 12:47 llfourn left 12:49 spriggy joined 12:52 Ven left
arnsholt moritz/RabidGravy: I guess the ability to add a new trait_mod:<foo> would work along the same lines of adding custom operators 12:57
moritz yeah, you just declare a new proto or multi 12:58
RabidGravy but as it currently stands the foos are in the grammar 13:00
arnsholt And there they have to stay. But the compiler knows how to insert new foos into the grammar
That's how "sub infix:<blerg>" works 13:01
13:01 itz is now known as _itz, itz joined, dayangkun joined 13:02 dayangkun left 13:03 dayangkun joined
RabidGravy right 13:03
13:06 llfourn joined
jnthn It's a bit trickier for trait mods, as there's no one way to parse them 13:07
is/does/will all parse differently after the trait mod word itself, for example
arnsholt Aha. That complicates things, yeah 13:08
13:09 domidumont left 13:11 domidumont joined 13:15 cschwenz joined 13:16 molaf joined 13:17 cschwenz left
FROGGS jnthn: one can always write a slang though... 13:17
jnthn Indeed, that's how to do it today and may well be the long term answer too 13:18
13:23 Foxcool left 13:25 Foxcool joined 13:32 Foxcool left 13:33 Ven joined
RabidGravy speaking of slangs why isn't %*LANG bound into perl space? 13:36
spriggy I have been imagining a 'never' pragma where one can organize some compile-time failures based on syntax
use never :too-many-sigils 13:37
would make something like '!?$!object-bool' a compile time error
13:38 TimToady left
spriggy I don't see many details on pragmas, nor very many examples, either 13:39
13:40 TimToady joined
spriggy but I think "use never" will be a helpful tool for users to shape the language according to what they think is acceptable (I for one do not think !?@things is acceptable whatsoever) 13:42
FROGGS RabidGravy: because it is the wrong pig to hang something off, so to say
spriggy but perhaps a slang would be more appropriate?
FROGGS though, I have no idea about something better
RabidGravy: though you can access %*LANG indirectly via $~MAIN etc 13:43
RabidGravy ah okay 13:45
13:50 domidumont left
RabidGravy so $~MAIN.grammar is the same as what you get from nqp::atkey(%*LANG, 'MAIN') ? 13:52
FROGGS m: say $~MAIN 13:53
camelia rakudo-moar 228168: OUTPUT«Slang.new(:grammar(Perl6::Grammar), :actions(Perl6::Actions))␤»
FROGGS aye
RabidGravy perfect 13:54
FROGGS RabidGravy: that's how we currently slang btw: github.com/rakudo/rakudo/blob/nom/...ll.pm#L486
13:57 yqt left, danstone1 is now known as danstoner
cognominal FROGGS: that's the way to deal with nqp level variabies in Perl 6? 13:58
14:02 lolisa joined, dayangkun_ joined 14:03 dayangkun left
cognominal m: my $l = nqp::atkey(%*LANG, 'MAIN'); 14:04
camelia rakudo-moar 228168: OUTPUT«===============================================================================␤The use of nqp::operations has been deprecated for non-CORE code. Please␤change your code to not use these non-portable functions. If you really want␤to keep using nqp:…»
cognominal m: use nqp; my $l = nqp::atkey(%*LANG, 'MAIN');
camelia rakudo-moar 228168: OUTPUT«This type does not support associative operations␤ in block <unit> at /tmp/2xlKhz2VLN:1␤␤»
FROGGS cognominal: well yes, currently one has to be careful about what is from NQP and what is from Perl 6 when dealing with slangs 14:05
moritz m: say %*LANG.^name
camelia rakudo-moar 228168: OUTPUT«Failure␤»
[ptc] strange... I'm getting "Cannot invoke null object" errors when building DBIish and Linenoise via panda in a freshly-built Rakudo.
any ideas what the problem could be? 14:06
cognominal how come %*LANG is visible in NativeCall and not in the REPL?
[ptc] i.e. what am I doing wrong...
FROGGS cognominal: it is visible in an EXPORT sub
cognominal: because that one is called from the Perl6::Grammar directly 14:07
cognominal "that one"? which one? :) 14:08
RabidGravy [ptc], I don't think it's just you I smoked the whole ecosystem and saw it a couple of places
itz [ptc] I got that with DBIish as well
[ptc] RabidGravy: ok, good to know. Usually I expect I've got a thinko somewhere
the question is: where to dig first? 14:09
itz I suspect its a recent rakudo change since I don't see it with last months release
FROGGS cognominal: sub EXPORT 14:10
14:10 laouji left
[ptc] itz: hrm, ok, I might try a git-bisect then 14:11
14:11 molaf_ joined
cognominal I probably need to read more of Grammar.pm to be able to pose more specific question because I still don't get it 14:12
14:14 molaf left
cognominal eeems interesting, not sure it is relevant. github.com/rakudo/rakudo/blob/nom/...d.nqp#L603 14:16
RabidGravy I looked at Template6 yesterday that had the same issue and it seemed to be associated with the "use" of another module
cognominal need a walk to clarify my mind
jnthn (from backlog) !?@things is of course pointless since it's equivalent to !@things :) 14:18
14:19 Ven left 14:24 ssqq joined, telex left
RabidGravy FROGGS, going back to the slang thing why is the role being applied to the grammar's metamodel rather than to the grammar directly or does mixin do something different to what I think 14:26
14:26 telex joined
[ptc] itz: I don't think it's Rakudo. I just tested with the 2015.04 release candidate and the problem is still there. 14:27
itz: it would seem the issue is lower down...
RabidGravy i.e. why can't you just do "$~MAIN.grammar does Foo" 14:28
FROGGS RabidGravy: A.HOW.mixin(A, Foo) is desugar for A.^mixin(Foo)... so the HOW knows how to mix into an object
itz maybe it's intermittent .. or dependent on panda install order of modules or something
FROGGS RabidGravy: because 'does' only works when you declare things
RabidGravy: you are probably thinking of 'but' 14:29
cognominal FROGGS++ # got it
[ptc] itz: don't think it's dependent on panda module installation order; DBIish is the first module to install after a rebootstrap 14:30
itz: I tested 2015.04 Rakudo with current nqp/MoarVM, and my guess is that something lower level has changed to cause the issue
[ptc] trawls the git logs
itz I was able to install DBIish with rakudo-2015.05 14:31
although I didn't try and reproduce the problem
[ptc] I'll try with a completely fresh panda and see how I go 14:32
14:32 dayangkun_ left
RabidGravy itz, [ptc] I just got "Cannot invoke this object (REPR: Null, cs = 0)" (which I think is the error in question) without any panda involved at all 14:32
and that I achieved by accidentally commenting out a role in some code I was testing 14:34
FROGGS RabidGravy: can you gold that down to a simple test case? 14:35
RabidGravy GOLD! ALWAYS BELIEVE IN YOUR SOUL! 14:36
er, 'ang on - I'll remove some more code
FROGGS :P
remove all the things! /o/ 14:37
zostay m: my $t = "$*TMPDIR/test".IO; $t.f.say; my $h = $t.open:w; $h.perl.say;
camelia rakudo-moar 228168: OUTPUT«True␤IO::Handle.new(path => q|/tmp/test|.IO(:SPEC(IO::Spec::Unix)), ins => 0, chomp => Bool::True)␤»
RabidGravy m: multi trait_mod:<is>(Routine $r, :$foo!) { $r does Foo; }; class Bar { method boom() is foo {}; }; 14:39
camelia rakudo-moar 228168: OUTPUT«5===SORRY!5=== Error while compiling /tmp/lYJy8jS5Aa␤Cannot invoke this object (REPR: Null, cs = 0)␤at /tmp/lYJy8jS5Aa:1␤»
RabidGravy was the actual code
(it does work as expected with the role Foo defined
14:40 tinyblak_ left
zostay for some odd reason, rakudo won't create files on my laptop, i just built a fresh rakudobrew and same thing :( 14:40
FROGGS zostay: can you explain what piece of code fails? 14:41
zostay that snippet i just sent to camilia fails 14:43
14:43 Su-Shee joined
Su-Shee good afternoon #perl6! 14:43
zostay actually, it fails before it tries to open, so i have to leave that part out
Su-Shee you monthly PLEASE SUBMIT A YAPC::EU TALK reminder has arrived! :)
zostay when it does the .f test, it reports: Failed to find '/var/folders/78/dj67wxmd6kzfvrvzh5f5hdbh0000gn/T/test' while trying to do '.f' in block <unit> at <unknown file>:1 14:44
FROGGS hi Su-Shee
Su-Shee FROGGS: U NO TALK? ;)
zostay without that test it reports: Failed to open file /var/folders/78/dj67wxmd6kzfvrvzh5f5hdbh0000gn/T/test: no such file or directory
FROGGS Su-Shee: I NO PARTICIPANT :o(
zostay the directory does exist and .f shouldn't fail even if it doesn't 14:45
FROGGS zostay: what's your $*TMPDIR?
itz is there a pastebot I forget?
14:45 Ven joined
Su-Shee FROGGS: WOW NO ATTENDING SUCH SAD? but granada is lovely! 14:45
FROGGS itz: gist?
zostay $*TMPDIR == '/var/folders/78/dj67wxmd6kzfvrvzh5f5hdbh0000gn/T/'.IO
FROGGS Su-Shee: yes, but expensive, at least with $family which I would have to bring with me when I'd visit Spain 14:46
TimToady RabidGravy, FROGGS: note that we'd like to get rid of %*LANG someday, because slangs should be inherited along with current language, not current dynamic scope of the compiler
jnthn Su-Shee: I did submit one talk, and pondering a second :)
Su-Shee jnthn: I just saw, I'll yell at masak instead :) 14:47
FROGGS zostay: that almost sounds like it has no write perms...
zostay the perms are there
it's definitely a problem in the moarvm/nqp/rakudo chain somewhere
itz gist.github.com/stmuk/25b0a169ac0ec7e130b0
FROGGS zostay: can you run nqp's tests? it creates files etc 14:48
14:48 smls joined
spriggy jnth: well, the idea was inspired by looking at a rosetta code example: rosettacode.org/wiki/Priority_queue#Perl_6 14:48
my version was simplified
but my point is, there are going to be a fair amount of complaints about some of the syntax that perl 6 affords
and I wonder whether having a standard pragma from which to disallow them might be useful
zostay (or let me clarify, it's definitely in moarvm/nqp/rakudo chain or my calling of it... i'm not ruling out my own stupidity yet)
FROGGS zostay: ooc, what filesystem do you have? 14:49
smls m: say $*TMPDIR
camelia rakudo-moar 228168: OUTPUT«"/tmp".IO␤»
smls ^^ Wasn't this deprecated in favor of $*SPEC.tmpdir ?
RabidGravy actually it does the same here 14:53
zostay OS X
14:53 xinming left
spriggy the specific expression was: !?@!elems.first 14:54
zostay watch your mouth
14:54 xinming joined
spriggy actually: !?@!tasks.first({$^_}) 14:55
jnthn I'm bemused why that does !? instead of just !
spriggy that's the kind of code that is going to make people avoid perl 6, guaranteed
jnthn: fair
I am bemused at what the heck $^_ is
FROGGS $^a is a placeholder variable, which creates a signature is the surrounding block has none... 14:57
jnthn I'm also surprised to see it written like that
14:57 lizmat left
FROGGS $^_ is non-sense... 14:57
jnthn Well, _ is a valid variable name
I'm thinking it was meant to be $_
FROGGS you either write $_ there (the topic), or $^foo to give it a name 14:58
jnthn Yeah, $^_ is legal but...odd :)
spriggy :)
PerlJam
.oO( or $^_ if you're going for obfuscation )
spriggy use never :odd
:)
FROGGS PerlJam: aye
spriggy I read it that was, as the $^anything style, but wasn't sure whether there was a subtle magic when used in conjunction with the traditional topic var 14:59
FROGGS hates WTF-8 15:00
15:00 coffee` left
FROGGS talks about Perl 5 at $work 15:00
smls would probably write .first(?*) instead of .first({$^_})
RabidGravy zostay, I agree that .f shouldn't fail (it should just catch the fail from stat and return false) but 15:01
m:my $t = $*TMPDIR.child("test"); $t.e; my $h = $t.open(:w); $h.perl.say;
15:01 coffee` joined
RabidGravy m: my $t = $*TMPDIR.child("test"); $t.e; my $h = $t.open(:w); $h.perl.say; 15:01
camelia rakudo-moar 228168: OUTPUT«IO::Handle.new(path => q|/tmp/test|.IO(:SPEC(IO::Spec::Unix)), ins => 0, chomp => Bool::True)␤»
RabidGravy works fine for me
spriggy smls: that would also make sense, except why does it need the so in there?
smls dunno, haven't read the code in context :P 15:02
spriggy seems strange to me that @t.first($_) would be any different from @t.first(*) 15:03
smls oh, that's what you mean
Well, * by itself does not construct a WhateverCode
spriggy ah, yes fair point !
:)
smls that only happens when it interacts with operators or method calls
spriggy you need the (? *) for the currying
15:05 tinyblak joined
smls I guess the whole expression !?@!tasks.first({$^_}) could be written much more readably as not any(@!tasks) couldn't it? 15:06
15:07 domidumont joined
smls or as: ?none(@!tasks) 15:07
Ven ...which is none(@!tasks) ?
smls Ven: not quite
you also need to boolify to avoid surprises in the caller code
which might arise when from giving back a Junction :P 15:08
Ven m: sub it's($){}; say it's so True 15:09
camelia rakudo-moar 228168: OUTPUT«Nil␤»
15:09 Ven left
spriggy smls: from a quick test over here, first({$_}) and first(*) are equivalent 15:09
smls m: say (0, 0, 4).first(*); say (0, 0, 4).first(?*); 15:10
camelia rakudo-moar 228168: OUTPUT«0␤4␤»
spriggy m: my @a = 40..100; @a.first({$_}).say; @a.first(*).say;
camelia rakudo-moar 228168: OUTPUT«40␤40␤»
smls nope :)
it seems that * simply gives the first element, period
without putting any constraints on it
spriggy what constraints are you seeing in {$_} ? is it really taking into account whether so $_ is True or False ? 15:11
smls yes
spriggy ok 15:12
smls passing a code object to first, means "get the first one for which this evaluates to true"
apparently, passing a lone Whatever star means "get the first one."
s/this evaluates to true/evaluates to true when boolified/ 15:13
spriggy ok
interesting
15:14 lizmat joined
smls I like the (?*) notation because it is both short, and makes it explicit what is going on. 15:14
15:14 skids joined
spriggy well, it certainly highlights that first({$_}) is not just interested in the first value, but the first (boolified-to) True value 15:15
smls: though I would write it as (so *) :)
or at least, I might :)
smls *.so also works 15:16
zostay nqp tests pass... trying the spectests now... this is really weird
lizmat YAPC::NA 2015 about to begin 15:17
15:17 diana_olhovik_ left
zostay wish i was there :-| 15:17
PerlJam too 15:18
smls await...start seems to work reliably again \o/
15:18 ssqq left
smls Is this your doing jnthn? 15:18
jnthn smls: I've done a bunch of stability work on concurrency stuff, yes 15:19
smls jnthn++
itz NA is being streamed isn't it?
FROGGS itz: correct 15:21
nwc10 denizens of #austria.pm reported earlier that the streaming URLs were grumpy and refused to play in Austria, claiming "rights issues" 15:22
Su-Shee tadzik: TALK! PERL6! you can't hide in japan from me!!
FROGGS I see a count down for www.youtube.com/watch?v=mQVUvAz3zhQ&pxtry=1 - but the other one that started twenty minutes ago just shows "please stand by" 15:23
Su-Shee "live streaming is not possible in your country because of rights issues" (germany)
15:25 FROGGS left
zostay roast never tests the .open the method, only the sub 15:27
itz I think this "Cannot invoke null object" is a heisenbug .. I saw it with Linenoise but repeated the panda install and it worked
zostay open the sub works find on my system, but .open only works when the file exists already 15:28
spriggy itz: I noticed exactly the same thing
I think it is a bug in Panda
zostay ah... maybe i'm full of it... nm
spriggy itz: it would always fail when installing Linenoise 15:29
thebn I installed the dependency of Linenoise manually
and on the next run Linemnoise installed fine
maybe panda needs to rehash the environment before the next package or something
[ptc] don't think it's in panda... I'm running an involved git-bisect on the stack while keeping panda constant and panda's behaviour is consistent
RabidGravy zostay, I think your problem was .open:w rather than .open(:w)
zostay that's it! thank you RabidGravy 15:30
RabidGravy the : is swallowed by the method name and thus the argument is w which will be ignored as a positional or something like that 15:31
itz there is an odd line in panda which seems to look for just .pm6
zostay hmm... seems like that ought to error, though
PerlJam Ah ... /me finally sees Yaakov (and now Karen)
zostay .open :w works find too
RabidGravy yeah, it's just the colon adjacent to the method name 15:32
spriggy [ptc]: hmmm.... so which are you bisecting? the Linenoise repo? 15:34
zostay it's the disapearring letter error, i still don't understand how that parses, then
RabidGravy infact I'm wonder whether the open:w becomes an adverb on the method rather than an argument
[ptc] spriggy: rakudo
spriggy zostay: whitespace is not simply 'nothing' in perl 6
[ptc] spriggy: I have to make realclean and remove the install/ and nqp/ dirs each time so that I get consistent results
spriggy: hence it's taking a while... 15:35
RabidGravy [ptc] it seems to be some uses of a type where it is not available at compilation time
zostay spriggy: understood, but i want to know where the :w went... why is this not an error?
if it went nowhere, that sounds like an error 15:36
that should be caught
[ptc] worries that he won't be able to gold it once the commit has been found
RabidGravy [ptc] "multi trait_mod:<is>(Routine $r, :$foo!) { $r does Foo; }; class Bar { method boom() is foo {}; };" does it every time 15:37
smls spriggy: I cleaned up & modernized the "Priority queue" example on rc; hope it's less offputting now :)
RabidGravy [ptc] which suggests to me that it's not failing correctly when it fails to find the type, blunders on and tries to use it in the belief that it exists 15:38
[ptc] interesting... 15:40
m: multi trait_mod:<is>(Routine $r, :$foo!) { $r does Foo; }; class Bar { method boom() is foo {}; };
camelia rakudo-moar 228168: OUTPUT«5===SORRY!5=== Error while compiling /tmp/dOsjJa0PNL␤Cannot invoke this object (REPR: Null, cs = 0)␤at /tmp/dOsjJa0PNL:1␤»
15:40 Foxcool joined
itz I'm not convinced RabidGravy's test is the same as the apparent panda issue since I see that as far back as "rakudo-star-2014.12.1" 15:42
spriggy zostay: ah yes, good point 15:43
itz unless its an old rakudo bug revealed by a recent panda change
spriggy smls: thanks man!
15:45 Ven joined
RabidGravy itz, I think it's the same bug compounded by some compilation order change in panda or something 15:45
in e.g. Template6 it started after 2015.03 15:46
itz www.youtube.com/watch?t=960&v=88K1h1XhEeo sort of works 15:47
RabidGravy: yeah that makes sense
[Coke] waves 15:53
[ptc] maybe the issue with Linenoise and DBIish is a different issue? The perl6-examples tests on Travis only show the DBIish problem recently 15:54
15:54 cognominal left, cognominal joined
RabidGravy I'm making a great guess, but I think Panda::Builder.build needs to add a --libpath to the compiler when it does the compile 15:56
16:03 Ven left, alexghacker joined, spider-mario joined 16:04 domidumont left
[ptc] rakudo d39fe1c is the first bad commit: "bump nqp/moar for fixing async stability" 16:05
unfortunately, I don't know what that could mean in order to fix the issue 16:06
16:06 diana_olhovik joined, _mg_ left
alexghacker jnthn++ for all his NFG work 16:06
RabidGravy or build-order is returning the files in the wrong order for some other reason now 16:08
16:09 tinyblak left 16:10 Ven joined 16:14 spriggy left 16:18 uncleyea1 joined
alexghacker I have a question about the treatment of the [COMBINING GRAPHEME JOINER] 16:18
it appears to be counted as a separate grapheme
16:18 Su-Shee left, uncleyear left
alexghacker which I wasn't expecting, but I'm not Unicode expert 16:18
m: say "o\c[COMBINING DOT BELOW]\c[COMBINING GRAPHEME JOINER]\c[COMBINING DOT ABOVE]" 16:19
camelia rakudo-moar 228168: OUTPUT«ọ͏̇␤»
16:19 rindolf left
alexghacker m: say "o\c[COMBINING DOT BELOW]\c[COMBINING GRAPHEME JOINER]\c[COMBINING DOT ABOVE]".chars 16:20
camelia rakudo-moar 228168: OUTPUT«2␤»
alexghacker m: say "o\c[COMBINING DOT BELOW]\c[COMBINING DOT ABOVE]"
camelia rakudo-moar 228168: OUTPUT«ọ̇␤»
alexghacker m: say "o\c[COMBINING DOT BELOW]\c[COMBINING DOT ABOVE]".chars
camelia rakudo-moar 228168: OUTPUT«1␤»
geekosaur "Its name is a misnomer and does not describe its function; the character does not join graphemes.[1] Its purpose is to separate characters that should not be considered digraphs."
alexghacker Yes, I've read that 16:21
geekosaur anyway "o\c[COMBINING DOT BELOW]\c[COMBINING GRAPHEME JOINER]\c[COMBINING DOT ABOVE]".chars looks like it should return 2: 1 for the o+dot below and one for the freestanding dot above 16:22
alexghacker however, see unicode.org/faq/char_combmark.html#14
jnthn m: say ord "\c[COMBINING GRAPHEME JOINER]" 16:23
camelia rakudo-moar 228168: OUTPUT«847␤»
alexghacker Q: Is U+03fF COMBINING GRAPHEME JOINER a combining mark? A: Yes.
jnthn m: say uniprop
camelia rakudo-moar 228168: OUTPUT«5===SORRY!5=== Error while compiling /tmp/qOsQdAH3XW␤Calling uniprop() will never work with any of these multi signatures:␤ (Str $str, Any |c) ␤ (Int $code, Stringy $propname = { ... })␤at /tmp/qOsQdAH3XW:1␤------> 3say 7⏏5uniprop␤»
16:23 Ven left
jnthn m: say uniprop 847, 'Canonical_Combining_Class' 16:23
camelia rakudo-moar 228168: OUTPUT«0␤»
alexghacker typo in the above, should be U+034F
(that's what I get for manually transcribing things)
jnthn That's why. 16:24
geekosaur wow, that's ... unicode, I guess. nearly the canonical example of bizarre
(unicode, not that specific example)
jnthn The NFG algorithm is defined in terms of the NFC algorithm, and so works in terms of Canonical_Combining_Class.
If something has a ccc of 0 then it's a non-starter
alexghacker so, if I'm understanding you (and the faq) correctly 16:25
jnthn uh, non-combiner
As far as the NFG algo is concerned
alexghacker it's a combining character that is defined to combine with the empty set
jnthn m: say "o\c[COMBINING DOT BELOW]\c[COMBINING GRAPHEME JOINER]\c[COMBINING DOT ABOVE]".chars
camelia rakudo-moar 228168: OUTPUT«2␤»
jnthn Well, except by Canonical_Combining_Class it claims *not* to be a combining char 16:26
16:26 andreoss joined
alexghacker so how does the "The presence of a combining grapheme joiner in the midst of a combining character sequence does not interrupt the combining character sequence" work out then? 16:27
jnthn Badly, apparently. 16:28
16:28 smls left, smls joined
alexghacker I've had this picture in my head of how it would work at a grapheme level, but have never been able to test it out until recently 16:28
not having read the detailed unicode specs, I'm going mostly on supposition 16:29
jnthn Well, NFG isn't defined by Unicode, so we have to define it somehow
And given it's been discussed as a kind of "NFC but make synthetics where there aren't precomposed", the implementation we have just extends the definition of NFC in that direction. 16:30
16:30 cognominal left
jnthn And the NFC spec uses the Canonical_Combining_Order property 16:31
16:31 _mg_ joined 16:33 abraxxa left
smls m: (gather await do for ^10 { start { sleep rand; take $_ } }).map(*.say) 16:34
camelia rakudo-moar 228168: OUTPUT«Unhandled exception: take without gather␤ at <unknown>:1 (/home/camelia/rakudo-inst-1/share/perl6/runtime/CORE.setting.moarvm:throw:4294967295)␤ from src/gen/m-CORE.setting:24410 (/home/camelia/rakudo-inst-1/share/perl6/runtime/CORE.setting.moarvm:…»
smls Hm, I guess it was naive to think that that might work :D
jnthn No, you can not gather/take across threads :P
smls right
RabidGravy if you wanted to do that I;d go with a Channel 16:35
jnthn Well, that example does exactly the right thing if you delete the gather and the take :P
RabidGravy :-) 16:36
smls except that is does not give back the result as a lazy list
so that the .map could start processing the first ones as soon as they arrive
alexghacker jnthn: this sentence from the answer to unicode.org/faq/char_combmark.html#16 also looks like it will be problematic: "[COMBINING GRAPHEME JOINER] has no impact on line breaking, except that as for other combining marks, it should be kept with its base when breaking a line." 16:37
should I be submitting this as a bug to Unicode? ;) 16:38
jnthn Well, not sure it's a submittable bug per se, but it's interesting to ask why CGJ ends up with a 0 ccc when it's clearly meant to function as a combining char 16:39
m: say uniprop ord('A'), 'Canonical_Combining_Class'
camelia rakudo-moar 228168: OUTPUT«0␤»
alexghacker the FAQ (which I understand isn't normative) explicitly says it has "ccc=0" and explicitly says it combines and should be kept with its base 16:40
16:40 fhelmberger left
jnthn Grumble. 16:40
alexghacker sorry :(
16:41 fhelmberger joined
jnthn It's not your fault. Unicode is just...crazy in places. 16:41
I mean, the easy way out on this one is just to go and special case the problem char
But I always fear there'll be another one waiting to pop up.
16:42 fhelmberger left, fhelmberger joined
alexghacker I guess one of the problem with an expansive character set is that there's plenty of room for special cases 16:42
16:42 fhelmberger left 16:43 fhelmberger joined
jnthn Aye 16:44
16:44 fhelmberger left, fhelmberger joined 16:45 fhelmberger left, fhelmberger joined 16:46 fhelmberger left, fhelmberger joined 16:47 andreoss left, fhelmberger left, fhelmberger joined 16:48 muraiki joined, fhelmberger left, fhelmberger joined 16:49 fhelmberger left, fhelmberger joined 16:50 fhelmberger left, fhelmberger joined 16:51 fhelmberger left, fhelmberger joined 16:52 fhelmberger left, fhelmberger joined
jdv79 could someone shed a little light on paste.scsys.co.uk/487319 16:52
i'm not sure why or how that's happening 16:53
16:53 fhelmberger left, fhelmberger joined
RabidGravy smls, gist.github.com/jonathanstowe/a93e...71e7eac92a 16:54
16:54 domidumont joined, fhelmberger left 16:55 fhelmberger joined
smls thanks 16:55
16:55 fhelmberger left, atweiden joined
smls although, didn't we have a shortcut for "loop { earliest $c { more * { ... }}}" ? 16:55
16:56 fhelmberger joined
atweiden m: class A1 { has $.a }; my @arr = 1, 2, A1.new; say @arr.grep({ A1 }) 16:56
camelia rakudo-moar 228168: OUTPUT«␤»
smls wouldn't for @channel.list { } work?
16:56 fhelmberger left
RabidGravy yes it would 16:56
16:57 fhelmberger joined
atweiden m: class A1 { has $.a }; my @arr = 1, 2, A1.new(:a(1)); say @arr.grep({ A1 }) 16:57
camelia rakudo-moar 228168: OUTPUT«␤»
atweiden is this the right way to grep for a class?
16:57 fhelmberger left
jnthn no 16:58
16:58 fhelmberger joined
jnthn m: class A1 { has $.a }; my @arr = 1, 2, A1.new(:a(1)); say @arr.grep(A1) 16:58
camelia rakudo-moar 228168: OUTPUT«A1.new(a => 1)␤»
16:58 fhelmberger left
atweiden m: class A1 { has $.a }; my @arr = 1, 2, A1.new(:a(1)); say @arr.grep({ Int }) 16:58
camelia rakudo-moar 228168: OUTPUT«␤»
atweiden ah i see
16:59 fhelmberger joined, Ven joined
ab5tract speaking of 'gather', I had trouble finding it on docs.perl6.org 16:59
16:59 SevenWolf joined, fhelmberger left 17:00 fhelmberger joined
RabidGravy smls, though would still need the "last if $p" bit to break out the loop 17:00
ab5tract is that defined on Mu?
hoelzro ab5tract: I don't see it doc'd
17:00 fhelmberger left
hoelzro interestingly enough, take is: doc.perl6.org/routine/take 17:00
17:01 fhelmberger joined 17:02 fhelmberger left, fhelmberger joined 17:03 fhelmberger_ joined, fhelmberger left, fhelmberger_ left 17:04 fhelmberger joined
smls RabidGravy: It seems to work with allof(@ps).then({ $c.close }); - see gist comment 17:04
17:05 fhelmberger left, fhelmberger joined
RabidGravy ab5tract, hoelzro it's one of those tricky things as it's a syntactic structure rather than a function - probably wants to go in some language/ page 17:05
smls, oh yeah nice
17:06 fhelmberger left
ab5tract RabidGravy: true, but then again perldoc -f gather should DWIM 17:06
17:06 fhelmberger joined
ab5tract sorry, p6doc -f gather 17:06
17:07 fhelmberger left, fhelmberger joined
ab5tract also, it is not clear to me how to reach the language/ docs from p6doc 17:08
17:08 fhelmberger left, fhelmberger joined
ab5tract plays fhelmberger 'Should I Stay or Should I Go' by the Ramones 17:08
or was that the Clash? *shrug* 17:09
17:09 fhelmberger left, itz left, fhelmberger joined
RabidGravy it was the Clash 17:09
jdv79 fhelmberger: you ok? 17:10
ab5tract thanks RabidGravy :)
17:10 fhelmberger left, tinyblak joined, fhelmberger joined 17:11 fhelmberger left, fhelmberger joined 17:12 fhelmberger left
dalek line-Python: 5865f28 | (Stefan Seifert)++ | t/p (2 files):
Replace deprecated is_deeply by is-deeply in tests
17:12
17:12 fhelmberger joined
ab5tract speaking of allof/anyof 17:13
can we kebab case those too?
17:13 fhelmberger left, fhelmberger joined 17:14 fhelmberger left, fhelmberger joined 17:15 fhelmberger left 17:16 fhelmberger joined, fhelmberger left 17:17 fhelmberger joined, fhelmberger left
RabidGravy is $*SPEC going to stay? If so it I'll stick it in variables.pod 17:18
17:18 fhelmberger joined, fhelmberger left
timotimo o/ 17:19
17:19 fhelmberger joined
lizmat RabidGravy: if it were up to me, it would go 17:19
m: role Foo { }; multi trait_mod:<is>(Routine $r, :$foo!) { $r does Foo }; sub boom() is foo {} # works
camelia ( no output )
lizmat m: multi trait_mod:<is>(Routine $r, :$foo!) { $r does Foo }; role Foo {}; sub boom() is foo {} # does not work, should it ?
17:19 fhelmberger left
camelia rakudo-moar 228168: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Sr83img5F7␤Cannot invoke this object (REPR: Null, cs = 0)␤at /tmp/Sr83img5F7:1␤» 17:19
RabidGravy lizmat, yes it does. The point being the error 17:20
17:20 fhelmberger joined
lizmat yes, I know 17:20
17:20 fhelmberger left
lizmat looking at fixing it, just wondering whether my second example should work or not 17:20
17:21 fhelmberger joined
lizmat aka, is the does bound at compile time, or at trait use time 17:21
17:21 fhelmberger left 17:22 fhelmberger joined 17:23 fhelmberger left, fhelmberger joined, espadrine_ left 17:24 fhelmberger left
ab5tract lizmat: Is The Does sounds like a decent band name :) 17:24
17:24 fhelmberger joined 17:25 fhelmberger left, fhelmberger joined 17:26 fhelmberger left
RabidGravy lizmat it should behave the same as: 17:26
17:26 fhelmberger joined
RabidGravy m: class Foo {}; my $e = Foo.new; $e does Bar; role Bar {} 17:26
camelia rakudo-moar 228168: OUTPUT«5===SORRY!5=== Error while compiling /tmp/NuzwGhj8UL␤Illegally post-declared type:␤ Bar used at line 1␤␤»
timotimo oooh, it's monday, isn't it
lizmat timotimo++ # realizing what day it is :-) 17:27
17:27 fhelmberger left, fhelmberger joined 17:28 fhelmberger left, fhelmberger joined 17:29 fhelmberger left, fhelmberger joined, _mg_ left, pjscott joined
lizmat ab5tract: :-) 17:29
17:30 pjscott left, _mg_ joined, zakharyas left, fhelmberger left
ab5tract lizmat: heck, it could even be a great catch phrase for Perl 6 17:30
17:30 fhelmberger joined
lizmat But Is The Does 17:30
17:31 fhelmberger left, fhelmberger joined 17:32 _mg_ left, fhelmberger left, fhelmberger joined 17:33 fhelmberger left, Ven left, fhelmberger joined
ab5tract ""The syntax C<has $.x> is short for something like C<has $!x; method x() { 17:34
17:34 fhelmberger left
ab5tract $!x }>" 17:34
sorry for the line-break in the paste
is it another compiler transform? 17:35
17:35 fhelmberger joined, fhelmberger left
ab5tract and why the "something like" qualification? That just makes me want to know what it _really_ is! 17:35
17:35 fhelmberger joined 17:36 fhelmberger left 17:37 fhelmberger joined
timotimo it does generate a method for you, yeah, but it's not really a transformation 17:37
if it were a transformation - and we do want that at one point - we'd have a much more efficient version of that method
17:37 fhelmberger left
timotimo because the code we have right now goes via the attribute table ... by name :( 17:37
17:38 fhelmberger joined
ab5tract timotimo: ah, that's clear. and: ouch :( 17:38
during method constuction or dispatch?
17:38 fhelmberger left
timotimo the method gets installed as a closure that closes over the name of the attribute 17:39
17:39 fhelmberger joined
timotimo and we can't optimize that in spesh or the jit 17:39
17:39 fhelmberger left
ab5tract timotimo: that explains "something like" quite well, I think 17:40
17:40 fhelmberger joined
timotimo i wonder how we could do much, much better on inlining 17:40
since AFAIU we inline a particular closure and thus should be able to get at the values ... ?
i shall discuss this in #moarvm
17:41 fhelmberger left, fhelmberger joined
masak m: my $x of Str = "42"; say $x 17:41
camelia rakudo-moar 228168: OUTPUT«42␤»
masak m: my $x of Int(Str) = "42"; say $x
camelia rakudo-moar 228168: OUTPUT«Type check failed in assignment to '$x'; expected 'Int(Str)' but got 'Str'␤ in block <unit> at /tmp/jJXxpKfyET:1␤␤»
17:41 fhelmberger left, Ven joined
masak m: my Int(Str) $x = "42"; say $x 17:41
camelia rakudo-moar 228168: OUTPUT«5===SORRY!5=== Error while compiling /tmp/UEVDZmExaU␤Coercion Int(Str) is insufficiently type-like to qualify a variable␤at /tmp/UEVDZmExaU:1␤------> 3my Int(Str) $x7⏏5 = "42"; say $x␤ expecting any of:␤ constraint␤»
17:42 fhelmberger joined
ab5tract timotimo: it also feels a it "macro-y" to me, but I say that without ever doing much with macros personally 17:42
masak why are coercions insufficiently type-like to qualify a variable?
the feel pretty type-like to me.
timotimo hmm.
lizmat masak: isn't that a case of NYI ? 17:43
17:43 fhelmberger left, fhelmberger joined
masak supposably. 17:43
17:43 fhelmberger left 17:44 fhelmberger joined 17:45 fhelmberger left, fhelmberger joined
ab5tract would that be an Int whihc only coerces to Str? 17:45
17:46 FROGGS joined, fhelmberger left, fhelmberger joined
masak no, it expects to get a Str, but converts it to an Int. 17:46
timotimo ab5tract: maybe it'd be interesting to install a method by using actual code-gen when we reach the end of the class definition and we have public attributes left that have not had their name shadowed by some other method
ab5tract or, to phrase it as an open question: what is the particular use case for that?
masak ab5tract: should read Int(Str) a bit like the conversion is a function, f(Str)
17:47 fhelmberger left, fhelmberger joined
ab5tract timotimo: honestly, that was how I assumed it already worked :) 17:47
17:48 fhelmberger left
skids gather is docced in language/control-flow. It's a statement, not a routine, so it got passed over for /routines. Likely there are other statements that do not have an entry there. 17:48
17:48 fhelmberger joined
timotimo ab5tract: it works in a way that's hard to distinguish if you don't look at the actual internals :) 17:48
RabidGravy yeah like e.g. earliest
17:49 fhelmberger left, fhelmberger joined 17:50 fhelmberger left, fhelmberger joined
skids Oh I'm mistaken. gather is not docced yet. 17:51
17:51 fhelmberger left, fhelmberger joined 17:52 fhelmberger left, fhelmberger joined 17:53 fhelmberger_ joined, fhelmberger left 17:54 fhelmberger_ left, fhelmberger joined 17:55 Ven left 17:56 fhelmberger left, fhelmberger_ joined, fhelmberger_ left 17:57 fhelmberger joined, fhelmberger left 17:58 fhelmberger joined, fhelmberger left 17:59 fhelmberger joined 18:00 fhelmberger left, fhelmberger joined, fhelmberger left 18:01 cognominal joined, fhelmberger joined, fhelmberger left 18:02 fhelmberger joined, fhelmberger left 18:03 fhelmberger joined, fhelmberger left 18:04 fhelmberger joined 18:05 fhelmberger left, fhelmberger joined 18:06 fhelmberger left, fhelmberger joined 18:07 fhelmberger left, fhelmberger joined 18:08 fhelmberger left, fhelmberger joined 18:09 fhelmberger left, fhelmberger joined 18:10 fhelmberger left, fhelmberger joined 18:11 fhelmberger left, fhelmberger joined 18:12 fhelmberger left, fhelmberger joined 18:13 fhelmberger left, fhelmberger joined 18:14 fhelmberger left, fhelmberger joined
ab5tract skids: but -f should still find it, right? 18:15
lizmat lunch&
18:15 lizmat left, fhelmberger left, fhelmberger joined
skids ab5stract: I actually don't see anything that mentios gather other than some docs for various take methods 18:16
cognominal Swift will be Open Source
18:16 fhelmberger left 18:17 fhelmberger joined, fhelmberger_ joined, fhelmberger left
ab5tract skids: oh, I meant conceptually :) 18:18
18:18 fhelmberger_ left 18:19 fhelmberger joined
ab5tract I couldn't find any gather either 18:19
skids I dunno. Is lazy or eager docced? That would e the same category.
ab5tract outside of the synopses
18:19 fhelmberger left 18:20 fhelmberger joined, bin_005 joined
ab5tract Does the nominative 'non-routine terms' fit as a name for this category? 18:20
skids I think "statement prefix"?
18:20 fhelmberger left 18:21 fhelmberger joined
ab5tract I would think that anything one might encounter in term position would be usefully accessible through -f 18:21
18:21 fhelmberger left
ab5tract not sure if the original perldoc -f was short for 'function', but we can choose it to be 'find' :) 18:21
18:22 fhelmberger joined, fhelmberger left 18:23 llfourn left, fhelmberger joined
ab5tract the recent documentation expansion has been both impressive and inspiring 18:23
18:23 fhelmberger left 18:24 fhelmberger joined 18:25 fhelmberger left, fhelmberger joined, fhelmberger left 18:26 fhelmberger joined 18:27 fhelmberger left, fhelmberger joined, anaeem1_ joined, anaeem1_ left 18:28 fhelmberger left, fhelmberger joined 18:29 fhelmberger left, fhelmberger joined 18:30 fhelmberger left, fhelmberger joined 18:31 fhelmberger left, fhelmberger joined 18:32 fhelmberger left, fhelmberger joined 18:33 fhelmberger left, fhelmberger joined 18:34 fhelmberger left, fhelmberger joined 18:35 fhelmberger left, fhelmberger joined 18:36 fhelmberger left, fhelmberger joined 18:37 fhelmberger left 18:38 fhelmberger joined
skids I think it would be more useful to have at least one one-stop-shopping flag for doc, yes. 18:38
18:38 fhelmberger left 18:39 fhelmberger joined, fhelmberger left
RabidGravy maybe "-k" which could be "keywords" 18:39
18:40 fhelmberger joined, fhelmberger left 18:41 fhelmberger joined, brrt joined, fhelmberger left 18:42 fhelmberger joined, fhelmberger left 18:43 fhelmberger joined, fhelmberger left 18:44 [Sno] left, fhelmberger joined, fhelmberger left 18:45 fhelmberger joined 18:46 anaeem1_ joined, fhelmberger left, fhelmberger joined 18:47 fhelmberger left 18:48 fhelmberger joined 18:49 fhelmberger left, fhelmberger joined, anaeem1_ left 18:50 fhelmberger left
pmichaud m: say min(1/0, 2/0) 18:50
camelia rakudo-moar 228168: OUTPUT«Attempt to divide 1 by zero using div␤ in block <unit> at /tmp/H5YmvrxqMY:1␤␤»
18:50 fhelmberger joined
timotimo hm, "using div"? maybe that would have wanted to read "/"? 18:50
pmichaud m: say min( 1 div 0, 2 div 0) 18:51
camelia rakudo-moar 228168: OUTPUT«Inf␤»
pmichaud better.
18:51 fhelmberger left, fhelmberger joined 18:52 fhelmberger left, fhelmberger joined 18:53 fhelmberger left, fhelmberger joined 18:54 fhelmberger left, vendethiel joined, fhelmberger joined 18:55 fhelmberger left, fhelmberger joined 18:56 fhelmberger left
timotimo can all of our exceptions be resumed? o_O 18:56
18:56 fhelmberger joined 18:57 fhelmberger left 18:58 fhelmberger joined, fhelmberger left 18:59 fhelmberger joined, fhelmberger left 19:00 fhelmberger joined, fhelmberger left 19:01 fhelmberger joined, fhelmberger left
[Coke] m: say min( Failure.new(), Failure.new() ) 19:02
camelia rakudo-moar 228168: OUTPUT«Too few positionals passed; expected 2 arguments but got 1␤ in block <unit> at /tmp/Ggv9rSYfhI:1␤␤»
19:02 fhelmberger joined
[Coke] m: say min( Failure.new(""), Failure.new("") ) 19:02
camelia rakudo-moar 228168: OUTPUT«Method 'backtrace' not found for invocant of class 'Str'␤ in block <unit> at /tmp/Gf60JiSEFx:1␤␤»
pmichaud just replied to the ticket.
19:02 fhelmberger left
pmichaud well, I tried to reply... it's not showing up in RT yet. 19:02
oh, there it is. 19:03
19:03 fhelmberger joined
jdv79 anyone? ^^ 19:03
19:03 fhelmberger left 19:04 fhelmberger joined
brrt jdv79: missed the conversation. is there anything we can help you with? 19:04
19:05 fhelmberger left, fhelmberger joined, bin_005 left
brrt timotimo: no, not all of them, only with a thrown object 19:05
'category' exceptions cannot
19:05 fhelmberger left
smls There was some way to bind a parameter to an outer lexical, right? 19:06
USe-case:
my $verbose; sub MAIN (:$verbose) { ... foo() ... }; sub foo { if $verbose ... }
19:06 bin_005 joined, fhelmberger joined
pmichaud that's not an "outer" lexical, that's a "caller" lexical. 19:06
the scope of $verbose is inside of MAIN's curlies.
smls yes, that's why I was asking for a way 19:07
19:07 fhelmberger left
smls (to bind the MAIN parameter to the previous my $verbose 19:07
19:07 fhelmberger joined
pmichaud oh 19:07
sorry, I misread.
19:08 fhelmberger left, anaeem1_ joined, fhelmberger joined 19:09 smls_ joined, fhelmberger left
FROGGS my $verbose; sub MAIN (:$verbose) { ... foo() ... }; sub foo { if OUTER::<$verbose> } # something like that 19:09
smls: ^^
pmichaud at one time it was something like sub MAIN( :$verbose = OUTER::<$verbose> ) { ... }
19:09 fhelmberger joined
FROGGS there is also OUTERS:: now IIRC 19:09
19:10 fhelmberger left, fhelmberger joined 19:11 fhelmberger left
smls_ m: my $x; sub set-x (:x(OUTER::<$x>)) { }; set-x x => 42; say $x 19:11
camelia rakudo-moar 228168: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Xl1EXY92ZU␤Malformed parameter␤at /tmp/Xl1EXY92ZU:1␤------> 3my $x; sub set-x (:x(7⏏5OUTER::<$x>)) { }; set-x x => 42; say $␤ expecting any of:␤ formal parameter␤»
19:11 fhelmberger joined
pmichaud smls_: are you trying to get foo to see MAIN's $verbose, or (and?) are you trying to get MAIN's $verbose to default to the mainline's verbose? 19:11
smls_ trying to set the MAIN variable automatically 19:12
19:12 fhelmberger left, smls left
smls_ of course I could just use an assignment statement in MAIN 19:12
FROGGS m: my $x; sub set-x (:x = OUTER::<$x>) { }; set-x x => 42; say $x
camelia rakudo-moar 228168: OUTPUT«5===SORRY!5=== Error while compiling /tmp/2htc96QFok␤Malformed parameter␤at /tmp/2htc96QFok:1␤------> 3my $x; sub set-x (:7⏏5x = OUTER::<$x>) { }; set-x x => 42; sa␤ expecting any of:␤ formal parameter␤ named paramet…»
pmichaud m: my $a; sub xyz(:$b = $a) { say $b; }
camelia ( no output )
19:12 fhelmberger joined
pmichaud m: my $a; sub xyz(:$b = OUTER::<$a>) { say $b; } 19:12
camelia ( no output )
pmichaud m: my $a = 'hello'; sub xyz(:$b = OUTER::<$a>) { say $b; }; xyz() 19:13
camelia rakudo-moar 228168: OUTPUT«(Any)␤»
19:13 fhelmberger left
pmichaud m: my $a = 'hello'; sub xyz(:$b = OUTER::<$a>) { say $b; say OUTER::<$a>; }; xyz() 19:13
camelia rakudo-moar 228168: OUTPUT«(Any)␤hello␤»
smls_ I just thought since there was a way to automatically bind to object attributes in a method signature, maybe there was something similar for outer lexicals
pmichaud well, there's the obvious:
oh, not so obvious
19:13 fhelmberger joined
pmichaud m: my $a = 'hello'; sub xyz(:$b = MY::<$a>) { say $b; say OUTER::<$a>; }; xyz() 19:13
camelia rakudo-moar 228168: OUTPUT«(Any)␤hello␤»
pmichaud I'm guessing the scoping rules aren't quite working properly in parameter lists. 19:14
19:14 fhelmberger left
pmichaud m: my $a = 'hello'; say MY::<$a>; sub xyz(:$b = MY::<$a>) { say $b; say OUTER::<$a>; }; xyz() 19:14
camelia rakudo-moar 228168: OUTPUT«hello␤(Any)␤hello␤»
19:14 fhelmberger joined 19:15 petercom1and joined
FROGGS m: my $a = 'hello'; say MY::<$a>; sub xyz($b = MY::<$a>) { say $b; say OUTER::<$a>; }; xyz() 19:15
camelia rakudo-moar 228168: OUTPUT«hello␤(Any)␤hello␤»
19:15 Juerd joined, petercommand left, fhelmberger left
FROGGS hmmm 19:15
19:15 fhelmberger joined
pmichaud I feel certain that the correct Perl 6 would be something like 19:15
m: my $a = 'hello'; say MY::<$a>; sub xyz(:$b = OUTER::<$a>) { say $b; say OUTER::<$a>; }; xyz() 19:16
camelia rakudo-moar 228168: OUTPUT«hello␤(Any)␤hello␤»
FROGGS m: my $a = 'hello'; say MY::<$a>; sub xyz($b = OUTERS::<$a>) { say $b; say OUTER::<$a>; }; xyz()
camelia rakudo-moar 228168: OUTPUT«hello␤hello␤hello␤»
FROGGS m: my $a = 'hello'; say MY::<$a>; sub xyz($b = OUTER::<$a>) { say $b; say OUTER::<$a>; }; xyz()
camelia rakudo-moar 228168: OUTPUT«hello␤(Any)␤hello␤»
pmichaud because inside of the xyz parameter list, OUTER:: should refer to the scope containing xyz
FROGGS now I need to look at TimToady++'s commit about OUTERS
pmichaud oh, yeah.
interesting.
19:16 fhelmberger left, fhelmberger joined
pmichaud well, at least we know the OUTERS:: scope works somewhat. 19:17
19:17 fhelmberger left, fhelmberger joined
pmichaud i'm afk again to finish preparing for my talk 19:18
FROGGS hmmm, that's not much: github.com/rakudo/rakudo/commit/d3...2e468b6f94
pmichaud: have fun!
(and make the others have fun as well :o)
19:18 fhelmberger left 19:19 fhelmberger joined, fhelmberger left 19:20 anaeem1_ left, fhelmberger joined 19:21 fhelmberger left, fhelmberger joined, fhelmberger left 19:22 fhelmberger joined, fhelmberger left 19:23 fhelmberger joined, fhelmberger left 19:24 fhelmberger joined
vendethiel So, seems like Apple will open-source swift. that's great to hear. www.apple.com/live/2015-june-event/...d044cb7-im 19:24
19:24 fhelmberger left 19:25 fhelmberger joined, yqt joined, fhelmberger left 19:26 fhelmberger joined, anaeem1 joined 19:27 fhelmberger left, fhelmberger joined, anaeem1 left 19:28 fhelmberger left, anaeem1_ joined, smls_ is now known as smls, fhelmberger joined 19:29 fhelmberger left, fhelmberger joined 19:30 fhelmberger left, fhelmberger joined
pyrimidine vendethiel: wonder if Go's popularity has something to do with that? 19:30
vendethiel pyrimidine: I think I'd say microsoft's new "popularity" has more to do with it. After all, people can't use Go for iOS apps, and apple was very happy with obj-c before 19:31
19:31 fhelmberger left
pyrimidine tru 19:31
19:31 fhelmberger joined 19:32 fhelmberger left, anaeem1_ left, fhelmberger joined 19:33 anaeem1 joined, fhelmberger left, anaeem1 left, fhelmberger joined, anaeem1 joined 19:34 fhelmberger left, fhelmberger joined 19:35 fhelmberger left, fhelmberger joined 19:36 fhelmberger_ joined, fhelmberger left, domidumont left 19:37 fhelmberger_ left
moritz the cynical part in my wonders if swift is going open source because it didn't gain as much traction as apple hoped 19:37
19:38 fhelmberger joined, anaeem1 left, fhelmberger left
vendethiel moritz: I don't think so, considering how much traction it got 19:38
19:38 anaeem1 joined, fhelmberger joined
masak also -- I'd still consider it some kind of victory. 19:39
19:39 fhelmberger left 19:40 fhelmberger joined, fhelmberger left, espadrine_ joined 19:41 fhelmberger joined
brrt re: swift, it's rather typicial of 'us language geeks' to hold it in somewhat less esteem as the typical 'industry' programmer 19:41
19:41 fhelmberger left
brrt that is, we may think not too much of it but for the industry programmer, it's both an improvement and it's Sanctioned By Apple 19:42
nwc10 so, we get to see how well Swift marries ARC with threads?
19:42 fhelmberger joined
brrt now that's just mean :-P 19:42
19:42 fhelmberger left
smls I think we can all agree that Swift is a step up from Objective C... >.< 19:43
19:43 fhelmberger joined, anaeem1 left
brrt hmm. that depends. objective-c still had it's 'C parts' to fall back on 19:43
19:43 fhelmberger left 19:44 lizmat joined, fhelmberger joined
moritz hasn't tried either yet 19:44
19:44 fhelmberger left, brrt left 19:45 espadrine_ left, fhelmberger joined, fhelmberger left 19:46 cognominal left, fhelmberger joined
nwc10 no, I'm actually curious 19:46
as I understood it, Swift makes a big thing of reference counting
19:46 fhelmberger left
nwc10 (and it makes sense in a memory constrained environment, as my understanding was that it needs less total memory than a "real" GC) 19:47
19:47 fhelmberger joined
nwc10 (with obvious downsides of reference counting) 19:47
but the thing is multicore CPUs
and I'm unaware of anyone getting reference counting to play nicely with threads
19:48 fhelmberger left, fhelmberger joined, cognominal joined 19:49 fhelmberger left
FROGGS does something rely on the refcounting nature of their GC? or are they free to change it in future to something else? 19:49
19:49 fhelmberger joined 19:50 fhelmberger left, fhelmberger joined 19:51 fhelmberger left, fhelmberger joined
jnthn I think the argument for refcounting on phones is that you're more memory constrained so timely reclamation matters 19:51
19:52 fhelmberger left, fhelmberger joined
nwc10 this was pretty much exactly my understanding. I read something online that seemed to be well explained, and it showed that a GC starts to perform very badly if you try to keep its total memory usage less than 4x the in use memory 19:52
whereas reference counting gets you at or close to 1x 19:53
FROGGS jnthn: but how long will this be true?
19:53 fhelmberger left, fhelmberger joined
nwc10 FROGGS: I don't know what they rely on. (others might) 19:53
also, as there's only one implementation, er, welcome to Perl 5 19:54
FROGGS yeah
19:54 fhelmberger left
jnthn FROGGS: It's less and less true already I suspect :) 19:54
FROGGS there is (almost) only one Perl 6 implementation tbh
19:54 fhelmberger joined
FROGGS jnthn: that's what I think too 19:54
nwc10 however, it is at least on >1 VM 19:55
FROGGS I mean ppl buy games that almost dont run smoothly on current hardware... why can't that work out for compilers too?
19:55 fhelmberger left
jnthn There's some amount of material out there on improving reference counting, coalescing counts, etc. 19:55
19:55 fhelmberger joined
jnthn However, my guess is some of the tricks might trade in timeliness 19:56
19:56 fhelmberger left
jnthn And if you're single impl then of course folks can come to depend on very exact timing, I'd guess. 19:56
FROGGS interestingly I can watch the yapc::na stream right now
19:56 fhelmberger joined
FROGGS just spotted sjn++ 19:57
19:57 fhelmberger left
nwc10 I was able to watch it during a lightning talk 19:57
19:58 fhelmberger joined, fhelmberger_ joined, fhelmberger left 19:59 fhelmberger_ left 20:00 fhelmberger joined, fhelmberger left 20:01 fhelmberger joined 20:02 fhelmberger left, fhelmberger joined 20:03 fhelmberger left, fhelmberger joined 20:04 fhelmberger left, fhelmberger joined 20:05 fhelmberger left, fhelmberger joined, [Sno] joined 20:06 fhelmberger left, fhelmberger joined 20:07 fhelmberger left, llfourn joined, fhelmberger joined
smls Is it normal for a 500 line Perl 6 script to take 1.7 seconds to parse? 20:08
20:08 fhelmberger left
spider-mario I’d say so 20:08
smls (as measured by a say now - BEGIN now; at the top)
spider-mario you don’t have to do that
20:08 fhelmberger joined
spider-mario just run perl6 --stagestats 20:08
smls good to know 20:09
20:09 fhelmberger left, fhelmberger joined
lizmat smls: that's why we precomp modules :-) 20:09
20:10 fhelmberger left
pyrimidine is there a way to run smoke tests w/o running 'panda install'? 20:10
20:10 fhelmberger joined
pyrimidine Based on the p6advent it's not apparent. 20:10
FROGGS pyrimidine: not yet
pyrimidine ok 20:11
FROGGS but it would be very awesome to have
20:11 fhelmberger left
smls Ok, only 1.3 seconds for actual 'parse' then :P 20:11
pyrimidine FROGGS: agreed
20:11 fhelmberger joined, llfourn left
jnthn smls: We build AST as we parse, however, so it's only so accurate. Also, make declarations and run any BEGIN-time code :) 20:12
spider-mario is Nil not a valid hash key anymore?
20:12 fhelmberger left
spider-mario I now get: “Use of Nil in string context” 20:12
20:12 fhelmberger joined
spider-mario but it used to work 20:12
20:13 fhelmberger left, amurf joined
spider-mario then, when I pass the resulting hash to a function that expects one, I get: 20:13
Type check failed in binding %possibilités; expected 'Associative' but got 'Any'
smls lizmat: Are there plans for a solution for precompiling main programs too?
20:13 fhelmberger joined
smls Would have to be tied in with the build/install tool I guess 20:14
20:14 fhelmberger left
lizmat actually, you can already :) just running them is a bit of an issue 20:14
FROGGS m: say :{ CORE::Nil => 'bar' }
camelia rakudo-moar 228168: OUTPUT«(Any) => bar␤»
20:14 fhelmberger joined
FROGGS is... that one correct? 20:15
20:15 fhelmberger left, fhelmberger joined 20:16 fhelmberger_ joined, fhelmberger left 20:17 fhelmberger_ left
[Coke] m: class Any { }; say Any===Core::Any; 20:17
camelia rakudo-moar 228168: OUTPUT«Could not find symbol '&Any'␤ in block <unit> at /tmp/3IHHJ6MAM5:1␤␤»
[Coke] m: class Any { }; say Any===CORE::Any;
camelia rakudo-moar 228168: OUTPUT«True␤»
20:17 amurf left, fhelmberger joined
spider-mario Nil seems to be treated differently in hash litterals and hash indexing 20:18
[Coke] seems like something should complain or be false there.
spider-mario m: say {a => 42}{'a'}
camelia rakudo-moar 228168: OUTPUT«42␤»
spider-mario m: say {Nil => 42}{Nil}
camelia rakudo-moar 228168: OUTPUT«Use of Nil in string context in block <unit> at /tmp/M_DERvebsN:1␤(Any)␤»
20:18 fhelmberger left 20:19 fhelmberger joined
FROGGS spider-mario: the last example will treat the first Nil as a string 20:19
spider-mario oh, silly me
it’s just because of =>
my bad
20:19 fhelmberger left
FROGGS m: say {CORE::Nil => 42}{Nil} 20:19
camelia rakudo-moar 228168: OUTPUT«Use of uninitialized value of type Any in string context in block <unit> at /tmp/kdahAyWVsc:1␤Use of Nil in string context in block <unit> at /tmp/kdahAyWVsc:1␤42␤»
FROGGS aye
though, still does not work
m: say {CORE::Any => 42}{Any}
camelia rakudo-moar 228168: OUTPUT«Use of uninitialized value of type Any in string context in block <unit> at /tmp/jtWYjpQD5z:1␤Use of uninitialized value of type Any in string context in block <unit> at /tmp/jtWYjpQD5z:1␤42␤»
20:20 fhelmberger joined
FROGGS m: say {CORE::Any => 42}.perl 20:20
camelia rakudo-moar 228168: OUTPUT«Use of uninitialized value of type Any in string context in block <unit> at /tmp/6yGY0k5UQu:1␤{"" => 42}␤»
FROGGS m: say :{CORE::Any => 42}.perl
camelia rakudo-moar 228168: OUTPUT«:{Any => 42}␤»
FROGGS m: say :{CORE::Any => 42}{Any}
camelia rakudo-moar 228168: OUTPUT«42␤»
20:20 darutoko left
FROGGS m: say :{CORE::Nil => 42}{Nil} 20:20
camelia rakudo-moar 228168: OUTPUT«(Any)␤»
20:20 anaeem1 joined, fhelmberger left
FROGGS so... you need to create an object hash and you cannot use Nil, at least not atm 20:20
20:21 fhelmberger joined, fhelmberger left
jnthn Also note that Nil, when assigned, evaporates into the type object of the type of the container you assigned it into 20:21
20:22 fhelmberger joined
jnthn m: my Int $x = 42; $x = Nil; say $x 20:22
camelia rakudo-moar 228168: OUTPUT«(Int)␤»
20:23 fhelmberger left, Possum left, fhelmberger joined
smls heh: "*** Error in `.../moar': double free or corruption (fasttop): 0x00000000040d9770 ***" 20:23
20:23 Possum joined
RabidGravy good job! 20:23
20:23 fhelmberger left 20:24 fhelmberger joined 20:25 fhelmberger left
jnthn oh debugger... 20:25
RabidGravy smls: I'd be suggesting rakudobug with output of perl6-valgrid ;-)
20:25 fhelmberger joined
smls well, trouble is I can't reproduce it... 20:25
RabidGravy don't you just hate that
20:25 fhelmberger left 20:26 fhelmberger joined 20:27 fhelmberger left
jnthn Yes. 20:27
20:27 fhelmberger joined 20:28 fhelmberger left
smls Fro the prior program output, I do know that it happened during a await do for @some-list { start .some-method } 20:28
20:28 fhelmberger joined
smls And some.-method does a bunch of IO operations (only reading, not writing) 20:29
20:29 fhelmberger left
smls is that not allowed? 20:29
20:29 fhelmberger joined 20:30 fhelmberger left
RabidGravy no it's definitely designed to allow that 20:30
20:30 fhelmberger joined
smls specifically, it uses .IO, .resolve, .dirname, dir() 20:30
ohhhh, and it starts (and read from )an external provess using pipe() 20:31
20:31 fhelmberger left
smls is that allowed too? 20:31
20:31 fhelmberger joined
RabidGravy afaik that all uses libuv which can handle all 20:31
jnthn There can be trouble if you share the handle between threads at the moment 20:32
But doesn't look like you're doing that.
20:32 fhelmberger left, fhelmberger joined
smls no 20:33
20:33 FROGGS left, fhelmberger left, fhelmberger joined 20:34 fhelmberger left, fhelmberger joined 20:35 fhelmberger left, fhelmberger joined 20:36 fhelmberger left, fhelmberger joined 20:37 zakharyas joined, fhelmberger left, fhelmberger joined 20:38 lolisa left, fhelmberger left, fhelmberger joined 20:40 fhelmberger left, fhelmberger_ joined, fhelmberger_ left 20:41 fhelmberger joined
spider-mario m: for <a b c> Z <d e f> -> $a, $b {say "a = {$a.perl}, b = {$b.perl}";} 20:41
camelia rakudo-moar 228168: OUTPUT«a = $("a", "d"), b = $("b", "e")␤Too few positionals passed; expected 2 arguments but got 1␤ in block <unit> at /tmp/YJ_oyco8Pp:1␤␤»
spider-mario does this not work like before?
20:41 fhelmberger left
spider-mario it used to be possible to deconstruct the result of Z this way 20:41
ab5tract m: my $x = Nil; my Int $y = $x; # is the Nil eventually going to be sticky? 20:43
camelia rakudo-moar 228168: OUTPUT«Type check failed in assignment to '$y'; expected 'Int' but got 'Any'␤ in block <unit> at /tmp/4FkN3cP0st:1␤␤»
20:43 fhelmberger joined, fhelmberger left
jnthn m: for flat <a b c> Z <d e f> -> $a, $b {say "a = {$a.perl}, b = {$b.perl}";} 20:43
camelia rakudo-moar 228168: OUTPUT«a = "a", b = "d"␤a = "b", b = "e"␤a = "c", b = "f"␤»
ab5tract m: my Nil $x = Nil; my Int $y = $x; $y.say
camelia rakudo-moar 228168: OUTPUT«(Int)␤»
spider-mario oh, ok
thanks
20:43 fhelmberger_ joined
ab5tract that answers that question :) 20:43
20:44 fhelmberger joined
ab5tract jnthn: the current behavior of Nil is becoming clearer to me. Other than it not disappearing in list context, are there other changes ahead? 20:44
20:45 fhelmberger left, fhelmberger joined 20:46 fhelmberger left, fhelmberger joined
jnthn ab5tract: Not that I'm aware of 20:46
20:46 telex left
ab5tract cool, I'll be done this PR to doc.git in a jiff then :) 20:46
20:46 fhelmberger left 20:47 fhelmberger joined 20:48 fhelmberger_ left, fhelmberger left, anaeem1 left, fhelmberger joined, telex joined, anaeem1 joined, fhelmberger left 20:50 fhelmberger joined, fhelmberger left, fhelmberger joined 20:51 fhelmberger left
ab5tract m: my Nil @e = Nil 20:51
camelia rakudo-moar 228168: OUTPUT«Unhandled exception: Type check failed in assignment to '@e'; expected 'Any' but got 'Any'␤ at <unknown>:1 (/home/camelia/rakudo-inst-1/share/perl6/runtime/CORE.setting.moarvm:throw:4294967295)␤ from src/gen/m-CORE.setting:16647 (/home/camelia/raku…»
20:51 fhelmberger joined 20:52 fhelmberger left, fhelmberger joined 20:53 anaeem1 left, fhelmberger left, fhelmberger joined 20:54 fhelmberger left, fhelmberger joined 20:55 fhelmberger left, fhelmberger joined 20:56 fhelmberger_ joined, fhelmberger left 20:57 diana_olhovik left
ab5tract LTA 20:57
20:57 fhelmberger_ left, fhelmberger joined 20:58 fhelmberger_ joined, fhelmberger left 20:59 diana_olhovik_ joined, fhelmberger_ left, fhelmberger joined 21:01 fhelmberger left, fhelmberger_ joined 21:02 fhelmberger_ left, fhelmberger joined, kurahaupo1 joined, fhelmberger left 21:03 brrt joined, fhelmberger joined, fhelmberger left 21:04 fhelmberger joined
brrt re: refcounting. the argument for refcounting is that it's what apple has been doing since the 1980s, and that it's simple to implement 21:04
21:04 fhelmberger left 21:05 fhelmberger joined
masak 'night, #perl6 21:05
brrt modern, efficient gc can do significantly better than refcounting. but it's harder
goodnight masak :-)
skids And no stop-the-world, better for RT apps.
21:05 fhelmberger left, bin_005 left 21:06 fhelmberger joined
jnthn Ref-count pause time is O(data structure size) 21:06
So the bound is only as good as you are at limiting how much data you let go of at a time :)
21:06 fhelmberger left 21:07 fhelmberger joined
brrt right. and in exchange for no stop-the-world, you get 'let's use atomic inc/dec for everything' 21:07
21:08 fhelmberger left, fhelmberger joined
dalek c: ec2fc82 | ab5tract++ | lib/Type/Nil.pod:
Add a few examples for Nil; jnthn++ for the 'evaporation' example
21:08
c: 2a755c1 | paultcochrane++ | lib/Type/Nil.pod:
Merge pull request #91 from ab5tract/nil

Add a few examples for Nil; jnthn++ for the 'evaporation' example
21:09 fhelmberger left
skids Yeah you pay over time with all the inter-CPU mesage passing but it is muh smoother (currently). Lot of interesting theories as to how to get GC to finer granularity. 21:09
21:09 kurahaupo1 left, fhelmberger joined 21:10 fhelmberger left, bin_005 joined, fhelmberger joined 21:11 fhelmberger left, fhelmberger joined
dalek c: 87daf4e | paultcochrane++ | lib/Type/Nil.pod:
Add some missing punctuation
21:12
c: 73c23ee | paultcochrane++ | lib/Type/Nil.pod:
Replace hard tabs with spaces
c: 8119091 | paultcochrane++ | lib/Type/Nil.pod:
Made example code more compact
21:12 fhelmberger left
21:12 smls left
brrt hmm... maybe i just hate rc irrationally 21:12
or rather
21:12 fhelmberger joined
jdv79 could someone shed a little light on paste.scsys.co.uk/487319 21:12
brrt i hate how rc is treated as some sort of 'solution' to non-problems
21:13 Foxcool left
jdv79 i'm a bit confused about the error message 21:13
21:13 espadrine_ joined, fhelmberger left, fhelmberger joined 21:14 fhelmberger left
skids Really GC exploits that fact that RAM is cheap these days (as long as it isn't being pulled in and out of cache too many times because time is money.) Whenever that isn't true RC is tried-and-true, if a PITA. 21:14
21:14 fhelmberger joined
spider-mario RC is deterministic, which allows it to be used for more than just RAM 21:15
(cf. C++)
jnthn jdv79: It means that somehow, a Failure "leaked" (that is, the error contained within it ws never checked)
21:15 fhelmberger left
spider-mario you can use it to manage files, locks, etc. 21:15
jnthn *was
21:15 fhelmberger joined 21:16 fhelmberger left, fhelmberger joined 21:17 fhelmberger left, fhelmberger joined
dalek ecs: 5557888 | paultcochrane++ | S32-setting-library/Str.pod:
Correct "to" -> "too"
21:17
21:18 fhelmberger left, fhelmberger joined
jdv79 the error was thrown inside a "throws_like". huh. i'll try a few things. 21:19
21:19 llfourn joined
jnthn If you can golf it, that'd be great 21:19
21:19 fhelmberger left
jnthn gets some rest o/ 21:19
21:19 fhelmberger joined 21:20 fhelmberger_ joined, fhelmberger left 21:21 kurahaupo1 joined 21:22 fhelmberger_ left, fhelmberger joined 21:23 fhelmberger left, fhelmberger_ joined, llfourn left, fhelmberger_ left 21:24 fhelmberger joined 21:25 fhelmberger left, fhelmberger joined 21:26 fhelmberger left, Peter_R left, lizmat left, fhelmberger joined, brrt left, fhelmberger left
timotimo gnite jnthn :) 21:27
darn, late again :\
21:27 fhelmberger joined 21:28 fhelmberger left, fhelmberger joined 21:29 fhelmberger left, fhelmberger joined 21:30 fhelmberger left, fhelmberger joined, labster joined 21:31 fhelmberger left, fhelmberger joined 21:32 fhelmberger left, fhelmberger joined 21:33 fhelmberger left, fhelmberger joined 21:34 fhelmberger left, fhelmberger joined, lizmat joined 21:35 kurahaupo1 left, fhelmberger left, fhelmberger joined 21:36 fhelmberger left, fhelmberger joined 21:37 fhelmberger left, fhelmberger joined
muraiki vendethiel: re: go for iOS apps: talks.golang.org/2015/state-of-go-may.slide#20 21:37
still has a ways to go, but it's coming :)
timotimo probably way closer than perl6 :) 21:38
21:38 fhelmberger left
muraiki hehe 21:38
21:38 bin_005 left
PerlJam just realizes that pmichaud is speaking on Perl 6 21:38
21:38 espadrine_ left, fhelmberger joined 21:39 bin_005 joined
lizmat yup, he is 21:39
21:39 fhelmberger left
timotimo right now? can has live stream? 21:39
21:39 fhelmberger joined
PerlJam www.youtube.com/watch?v=PNhofgKG1sc 21:39
21:40 fhelmberger_ joined, fhelmberger left
timotimo aaw come on 21:41
21:41 fhelmberger_ left
timotimo "not available in your country"? 21:41
21:41 fhelmberger joined, muraiki left
PerlJam Sorry timotimo :( 21:42
labster must be copyright problems, we just sang "Happy Birthday" earlier today
21:42 fhelmberger left 21:43 fhelmberger joined
timotimo god damn you, copyright industr 21:43
industry*
21:43 fhelmberger left 21:44 fhelmberger joined 21:45 fhelmberger left, fhelmberger joined, fhelmberger left 21:46 fhelmberger joined
dalek c: c61d3c7 | paultcochrane++ | WANTED:
Add substr-rw to WANTED
21:46
21:46 fhelmberger left 21:47 fhelmberger joined
PerlJam heh ... the video stream was interrupted and the frame is frozen with pmichaud's face looking like he's angry about something. 21:47
21:48 fhelmberger left, fhelmberger joined 21:49 fhelmberger left, fhelmberger joined 21:50 fhelmberger left, fhelmberger joined, diana_olhovik_ left
lizmat we experienced a freeze type event on pmichaud's computer here as well 21:51
21:51 fhelmberger left, fhelmberger joined 21:52 fhelmberger left, fhelmberger joined 21:53 fhelmberger left, fhelmberger joined 21:54 fhelmberger left, fhelmberger joined 21:55 fhelmberger left, fhelmberger joined 21:56 fhelmberger left, fhelmberger joined
flussence
.oO( let's blame it on solar flares )
21:57
21:57 fhelmberger left, labster left, fhelmberger joined 21:58 fhelmberger left
ab5tract the other stream is down as well. the error I see is 'The streamer stopped streaming' 21:58
21:58 fhelmberger joined 21:59 labster joined, diana_olhovik_ joined, fhelmberger left, fhelmberger joined 22:00 fhelmberger left, fhelmberger_ joined 22:02 fhelmberger joined, fhelmberger_ left, fhelmberger_ joined, fhelmberger left
Ulti weird the stream for pmichaud's talk just says streamer not streaming, did it happen? 22:03
22:03 fhelmberger_ left
Ulti :[ 22:03
22:04 fhelmberger joined, alexghacker left, zakharyas left, fhelmberger left
rjbs rebuilds moar. 22:04
PerlJam Ulti: did the talk happen? yes, it's happening (AFAIK). The video stoppped for me in the middle.
rjbs Ulti: I dunno, I'm in the room and there is a talk happening. I dunno what's up with the streamer. His video is a mess.
22:05 fhelmberger joined
rjbs his slides cut in and out every few minutes 22:05
PerlJam Does anyone know if the videos will also be available after the fact relatively quickly or if we'll have to wait N weeks?
labster flickered again
rjbs PerlJam: I believe that last year, it took hours. I'm assuming the same this year.
#yapc probably has a staffer who knows. maybe. :0
22:05 fhelmberger left 22:06 fhelmberger joined
PerlJam
.oO( <rjbs> now the podium is on fire! <labster> And the screen just exploded! )
22:06
22:07 fhelmberger left, fhelmberger joined
labster And now there's lens flare. Dammit JJ Abrams. 22:07
PerlJam :-)
22:07 fhelmberger left 22:08 fhelmberger joined 22:09 fhelmberger left, fhelmberger joined
rjbs o no, linenoise won't build in my new build 22:09
I did rakudobuild moar and I got a new rakudo with no linenoise. My life is over!
22:09 fhelmberger left 22:10 fhelmberger joined
rjbs Huh. Worked on a reinstall. :) 22:10
22:11 fhelmberger left, fhelmberger joined 22:12 fhelmberger left, fhelmberger joined 22:13 fhelmberger left, fhelmberger joined 22:14 fhelmberger left, fhelmberger joined 22:15 RabidGravy left, fhelmberger left, fhelmberger joined 22:16 fhelmberger left, diana_olhovik_ left, fhelmberger joined 22:17 fhelmberger left
ab5tract PerlJam: the youtube channel already has videos from earlier today 22:17
22:17 fhelmberger joined 22:18 fhelmberger left, fhelmberger joined 22:19 diana_olhovik_ joined, fhelmberger left, fhelmberger joined 22:20 fhelmberger_ joined, fhelmberger left 22:21 fhelmberger joined, fhelmberger_ left 22:22 labster left, fhelmberger left 22:23 fhelmberger joined, fhelmberger left, fhelmberger joined 22:24 bin_005 left, fhelmberger left 22:25 fhelmberger joined 22:26 fhelmberger left, fhelmberger joined 22:27 fhelmberger left, fhelmberger joined 22:28 fhelmberger left, fhelmberger joined 22:29 fhelmberger left, fhelmberger joined, diana_olhovik_ left, fhelmberger left 22:30 fhelmberger joined 22:31 fhelmberger left, fhelmberger joined 22:32 fhelmberger left, fhelmberger joined 22:33 fhelmberger left, lizmat left, fhelmberger joined 22:34 fhelmberger left, fhelmberger joined 22:35 fhelmberger left, fhelmberger joined 22:36 fhelmberger left, fhelmberger joined 22:37 fhelmberger left, fhelmberger joined 22:38 fhelmberger left, fhelmberger joined 22:39 fhelmberger left, fhelmberger joined 22:40 fhelmberger left, fhelmberger joined 22:41 fhelmberger_ joined, fhelmberger left 22:42 fhelmberger joined, fhelmberger_ left 22:43 [Sno] left, fhelmberger left 22:44 fhelmberger joined, fhelmberger left 22:45 cognominal left, fhelmberger joined, fhelmberger left 22:46 fhelmberger joined, fhelmberger left 22:47 fhelmberger joined, fhelmberger left 22:48 fhelmberger joined, fhelmberger left, [Sno] joined 22:49 fhelmberger joined 22:50 fhelmberger left, fhelmberger joined 22:51 fhelmberger left, fhelmberger joined 22:52 fhelmberger left, fhelmberger joined 22:53 fhelmberger left, fhelmberger joined, gfldex left 22:54 fhelmberger left, bjz joined, fhelmberger joined 22:55 fhelmberger left, fhelmberger joined 22:56 fhelmberger left, fhelmberger joined 22:57 fhelmberger left, fhelmberger joined 22:58 fhelmberger left, fhelmberger joined 22:59 fhelmberger left, fhelmberger joined 23:00 amurf joined, fhelmberger left, fhelmberger joined 23:01 fhelmberger left, bjz left, fhelmberger joined 23:02 fhelmberger left, fhelmberger joined 23:03 fhelmberger left, fhelmberger joined 23:04 fhelmberger left 23:05 fhelmberger joined, vendethiel left, fhelmberger left 23:06 fhelmberger joined, fhelmberger left 23:07 fhelmberger joined, fhelmberger left 23:08 fhelmberger joined, llfourn joined, fhelmberger left 23:09 fhelmberger joined 23:10 fhelmberger left, fhelmberger joined, fhelmberger left 23:11 fhelmberger joined, fhelmberger left 23:12 fhelmberger joined, llfourn left, fhelmberger left 23:13 fhelmberger joined 23:14 fhelmberger left, fhelmberger joined 23:15 fhelmberger left, fhelmberger joined 23:16 fhelmberger left, fhelmberger joined 23:17 fhelmberger left, CurtisOvidPoe joined, fhelmberger joined 23:18 fhelmberger left, fhelmberger joined 23:19 fhelmberger left, fhelmberger joined 23:20 fhelmberger left
CurtisOvidPoe m: sub foo(Int $a) { say $a }; say foo(3.7) 23:20
camelia rakudo-moar 228168: OUTPUT«5===SORRY!5=== Error while compiling /tmp/hIlHyZLBAf␤Calling foo(Rat) will never work with declared signature (Int $a)␤at /tmp/hIlHyZLBAf:1␤------> 3sub foo(Int $a) { say $a }; say 7⏏5foo(3.7)␤»
CurtisOvidPoe m: sub foo(Int $a where * >= 0) { say $a }; say foo(3.7)
camelia rakudo-moar 228168: OUTPUT«Type check failed in binding $a; expected 'Int' but got 'Rat'␤ in sub foo at /tmp/P7yUNmTTSC:1␤ in block <unit> at /tmp/P7yUNmTTSC:1␤␤»
23:20 fhelmberger joined 23:21 fhelmberger left
CurtisOvidPoe While I know that using a subset can’t be checked at compile time, the Int can still be checked at compile time, but adding the ‘where’ now skips this check if the type can’t possibly succeed. I assume this is known and not considered a bug? 23:21
23:21 fhelmberger joined 23:22 fhelmberger left, fhelmberger joined 23:23 fhelmberger left, fhelmberger joined 23:24 fhelmberger left, fhelmberger_ joined 23:25 fhelmberger_ left 23:26 fhelmberger joined
japhb CurtisOvidPoe: The "will never work" check is coming from the *optimizer*, which is attempting to do simple type proofs. You don't get that message if the optimizer faces something it doesn't yet know how to handle. 23:27
23:27 fhelmberger left, fhelmberger joined
CurtisOvidPoe japhb: thank you. 23:27
japhb That said, we obviously want to strengthen the compile-time checks, it's just NYI to handle that sort of case.
23:27 fhelmberger left 23:28 fhelmberger joined, fhelmberger left 23:29 fhelmberger joined, fhelmberger left 23:30 fhelmberger joined 23:31 fhelmberger left, fhelmberger joined 23:32 fhelmberger left, fhelmberger joined 23:33 fhelmberger left, fhelmberger joined 23:34 fhelmberger left, fhelmberger joined 23:35 fhelmberger left, fhelmberger joined 23:36 fhelmberger left, fhelmberger joined 23:37 tinyblak left, tinyblak joined, fhelmberger left, fhelmberger joined 23:38 fhelmberger left, fhelmberger joined 23:39 fhelmberger left, fhelmberger joined 23:40 fhelmberger left, fhelmberger joined 23:41 fhelmberger left, fhelmberger joined 23:42 fhelmberger left 23:43 fhelmberger_ joined
japhb .tell [ptc] Re: specs commit 5557888, I don't think the original meant "can be aliased also", I think it meant "can be the target of an alias", so the 'to' would be correct (though I recognize it's confusing wording all around) 23:43
yoleaux japhb: I'll pass your message to [ptc].
23:43 fhelmberger_ left 23:44 fhelmberger joined, fhelmberger left 23:45 fhelmberger joined, fhelmberger left 23:46 fhelmberger joined, fhelmberger left 23:47 fhelmberger joined, labster joined, fhelmberger left 23:48 fhelmberger joined, labster left, fhelmberger left 23:49 fhelmberger joined, fhelmberger left 23:50 fhelmberger joined, fhelmberger left 23:51 fhelmberger joined, fhelmberger left 23:52 fhelmberger joined 23:53 fhelmberger left, fhelmberger joined 23:54 fhelmberger left, fhelmberger joined, Uladox joined
Uladox Hello, I made a perl6 module 23:55
23:55 fhelmberger left
Uladox If anyone is interested it is github.com/Uladox/Editscr-Uggedit 23:55
23:55 fhelmberger joined
skids Uladox: congratulations! 23:55
23:56 fhelmberger left, labster joined, fhelmberger joined, jack_rabbit joined, labster left 23:57 fhelmberger left, fhelmberger joined
Uladox Part of the idea behind it is when I have to write a C library the header for it can be generated using datastructures found in headers in the project 23:57
23:58 fhelmberger left, fhelmberger joined
Uladox I think it can be used to do a fair bit more, so I wrote a module to automate problems that are similar 23:58
Would it be possible to add it to the modules list? 23:59
23:59 fhelmberger left, fhelmberger joined