»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend! | Rakudo Star Released! Set by diakopter on 6 September 2010. |
|||
diakopter | sorear: what kind of textual pattern does that grammar express | 00:05 | |
sorear | diakopter: the first, same as /bc/, the second, same as /<?>/ | 00:07 | |
but the important part is that $/.<X> == 1 after both | 00:08 | ||
or, if it happens from a subrule, maybe $/.<a><X> == 1 | |||
00:28
wamba joined
00:29
Schwern joined
00:39
tylercurtis joined
00:43
nimiezko left
01:04
Eevee left
01:06
Eevee joined
01:09
wamba left
|
|||
TimToady | whoever put up rosettacode.org/wiki/Numerical_inte...ion#Perl_6 the math is wrong at least three different ways, some of which apparently was already wrong in whichever source you copied, which is unattributed | 01:17 | |
midpoint is wrong one way, the trapezoidal method is wrong at least two ways | |||
the perpetrator would appear to be someone from Brazil | 01:18 | ||
01:25
lichtkind left
01:28
azert0x left
01:33
mfollett joined
01:34
hercynium left
|
|||
TimToady | I suspect it was transcribed from the Java example, which would explain both its verbosity and 2/3 of its wrongness | 01:37 | |
01:39
ash_ left
|
|||
allbery_b | heh | 01:57 | |
02:00
flatwhatson_ joined
|
|||
flatwhatson_ | hi, is there an implementation of perl6 grammars that i can use in perl5? | 02:01 | |
perigrin | Perl6::Rules, Regexp::Grammar, Parse::RecDescent all come to mind | 02:04 | |
02:04
rgrau_ left
|
|||
allbery_b | oh damn. now I'm gonna be tempted to use them :) | 02:05 | |
02:10
leprevost joined
02:20
whiteknight left
|
|||
florz | how would I go about accessing a capture from code within a regex following said capture? as in / (fo*) { here } / | 02:25 | |
flatwhatson_ | Regexp::Grammar and Parse::RecDescent both look quite good! it seems the major difference is that P::RD lets you trigger actions during the parsing process, whereas R::G is more geared towards the perl5-style parse-then-process pattern | ||
would that be an accurate assessment? | |||
02:27
patspam joined,
patspam left
02:32
jaldhar joined
|
|||
perigrin | flatwhatson_: well Regexp::Grammar is based on 5.10+ Regex extensions while Parse::RecDescent implement an entire Recursive Descent parser | 02:33 | |
so at a high level "yes" but that's partly because the implementations are wildly different | |||
02:35
meppl joined
02:36
ash_ joined
|
|||
flatwhatson_ | sure, so it is the 5.10 engine's lack of parse actions that limits Regex::Grammars in that sense | 02:37 | |
but it seems that it would be more performant due to re-using the built-in engine? | |||
also i think the syntax would be less likely to give my co-workers aneurysms :) | 02:38 | ||
02:39
b0m1ro left
02:41
mfollett left,
mfollett joined,
ash_ left
02:42
Holy_Cow joined
02:43
Holy_Cow left
|
|||
sorear | florz: just use $0 | 02:47 | |
02:51
mfollett left
|
|||
florz | sorear: oh, IC, captures are 0-based now, eh? thx :-) | 02:58 | |
sorear | yeah | 03:13 | |
$0 is short for $/[0], it's zero-based like every other array | |||
florz | sounds sensible - thx :-) | 03:18 | |
03:28
ioio_1 joined
03:34
meppel joined
03:37
meppl left
03:38
sjn joined
03:41
meppel is now known as meppl,
ioio_1 left
03:47
tom_tsuruhara joined
03:59
Schwern left
04:06
envi^home joined
04:08
envi^home left
04:10
qw3rty joined
|
|||
qw3rty | hi... i was just introduced to =pod annotations in perl5 today... I found it very interesting, i like its simplicity. The thing is... | 04:12 | |
does pod annotations evolved too with perl6? | |||
tylercurtis | qw3rty: yes, although I think it's not really nailed down yet due to not being fully implemented. | 04:15 | |
qw3rty | is there any specs available??? | ||
tylercurtis | github.com/perl6/specs/raw/master/S...tation.pod It's written in Perl 6 Pod. | 04:17 | |
qw3rty | cool... thanks tylercurtis! | ||
04:24
mfollett joined
|
|||
mfollett | Is it a bug that you can't call d, f, and such on an object of type Str and instead of to do $str.IO or was it a bug that you could at some point in the past? | 04:29 | |
04:33
gfx joined
|
|||
tylercurtis | mfollett: There is another possibility: both were correct. Which is actually the case, I don't know. | 04:33 | |
mfollett | tylercurtis: that's true. I'm just seeing a lot of code around that does $str ~~ :f which, at least in * 2010-08, does not seem to be a thing you can do. | 04:35 | |
It would make sense that you could do either way and that way just isn't working at the moment though. | |||
04:46
Chillance left
05:01
REPLeffect left,
qw3rty left
|
|||
mfollett | Is there an English version of the Perl 6 tutorial that is listed on the perl6 wiki? | 05:02 | |
sorear | mfollett: AIUI, both were correct *at the respective times*. We haven't frozen the spec yet. | 05:09 | |
mfollett | sorear: oh, ok, thanks for the explanation. | 05:10 | |
05:13
jaldhar left
05:15
jaldhar joined
05:17
REPLeffect joined
05:18
meppl left
|
|||
TimToady | strings are generally not assumed to be filenames anymore | 05:27 | |
we broken that on purpose | 05:28 | ||
broke, even | 05:30 | ||
05:32
Guest23195 joined
|
|||
mfollett | TimToady: good to know, thanks | 05:32 | |
I'm kind of playing around with Web.pm, trying to bring it up to speed and it looks like Tags.pm is getting a "Null PMC access in invoke()" with terms like ::Tags{$tag} and ::Tags::EXPORT::DEFAULT{$tag} (for context here is a pastie pastie.org/1151608 lines 29 and 32). What was this originally doing and what is the now way to do it? | 05:38 | ||
shortcircuit | TimToady: rosettacode.org/wiki/Template:Incorrect is useful for flagging such errors, if one doesn't want (or can't) fix the code oneself. | 05:42 | |
05:43
Schwern joined
|
|||
sorear | looks like an exploitation of alpha' | 05:46 | |
s chronic parrot leakage | |||
tylercurtis | What does this mean? | 05:47 | |
std: $:: | |||
p6eval | std 32123: OUTPUT«ok 00:01 114m» | ||
sorear | niecza: $:: | ||
p6eval | niecza 10151ff: OUTPUT«===SORRY!===Non-simple variables NYI at /tmp/X7a8zGQzYJ line 1:------> $::⏏<EOL>Use of uninitialized value in concatenation (.) or string at /home/p6eval/niecza/src/Niecza/Actions.pm line 1388.Use of uninitialized value in | ||
..concatenation (.) … | |||
sorear | huh | ||
I thought I had an 'XXX STD bug workaround' sorry for that | |||
I don't think it means anything at all | 05:48 | ||
TimToady | shortcircuit: I've found a fourth error in the Perl 6 code; it also comes from the Java I suspect | 05:51 | |
a fifth error, this one in the Perl transcription | 05:59 | ||
06:04
Schwern left
06:05
jaldhar left
06:06
envi^home joined,
Schwern joined
06:07
jaldhar joined
|
|||
mfollett | How do I dynamically add a sub to a module? | 06:18 | |
ingy | hi shortcircuit :) | 06:26 | |
tylercurtis | Good night, #perl6. | 06:46 | |
06:46
mfollett left
06:54
icwiener joined
07:09
brxue joined
07:15
rhebus joined
07:16
Ross joined
07:19
stepnem left
|
|||
moritz_ | good morning | 07:30 | |
sorear | hello | 07:35 | |
07:38
icwiener left,
tylercurtis left,
icwiener joined
07:39
icwiener left,
icwiener joined
|
|||
rhebus | morning | 07:50 | |
07:57
leprevost left
|
|||
TimToady | shortcircuit: okay, added the incorrections, thanks for the pointer | 07:57 | |
07:57
ashleydev left
07:58
ashleydev joined,
sunnavy joined
|
|||
TimToady | I believe rosettacode.org/wiki/Numerical_inte...ion#Perl_6 is now correct, but I didn't fix the other languages :) | 07:59 | |
07:59
tadzik joined
|
|||
Quadrescence | TimToady: you look like weird al, just sayin' as I know it's relevant to the topic | 07:59 | |
TimToady | I knew that | ||
actually, he looks like me | |||
Quadrescence | very true; i dare you to write a perl program which calculates the similarity between two images by making your own novel metric. | 08:00 | |
TimToady | mirrors.develooper.com/perl/history...c/al_wall/ | ||
Quadrescence | dammit | 08:01 | |
moritz_ thought that TimToady stayed away from the more mathematical problems :-) | 08:03 | ||
Quadrescence | moritz_: This is a linguistic problem | ||
08:04
cosimo left
|
|||
moritz_ | Quadrescence: I was talking about the numerical integration rosetta code | 08:06 | |
Quadrescence | oh >_> | ||
well numerical integration is linguistic too | |||
i mean, what /is/ the etymology of 'quadrature' and 'cubature' | 08:07 | ||
TimToady | rosettacode.org/wiki/Talk:Numerical_integration has my carpage | ||
08:08
leprevost joined
|
|||
rhebus | TimToady: won't you get lossage from numerical error in the endpoints? | 08:09 | |
TimToady | what numerical error? this is all done in Rats | ||
08:09
araujo joined
|
|||
TimToady | I don't think the function was complicated enough to get into Nums | 08:10 | |
rhebus | huh | ||
rakudo: say 1, *+0.1 ... 2.0 | |||
p6eval | rakudo ce565f: OUTPUT«11.11.21.31.41.51.61.71.81.92» | ||
rhebus | rakudo: say ~(1, *+0.1 ... 2.0) | ||
p6eval | rakudo ce565f: OUTPUT«1 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2» | ||
TimToady | we like our Rats | ||
rhebus | rakudo: say ~1, *+0.1 ... 2.0 | ||
tadzik | rakudo: say ~(1, 1.1, 1.2 ... 2.0) | ||
p6eval | rakudo ce565f: OUTPUT«11.11.21.31.41.51.61.71.81.9» | 08:11 | |
rakudo ce565f: OUTPUT«1 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2» | |||
tadzik | no need to closure | ||
rhebus | hmm, so i'm losing the endpoint because i'm stringifying the first term, not the whole sequence? | ||
tadzik | hmm | ||
rhebus | rakudo: say ~1, 1.1, 1.2 ... 2 | 08:12 | |
tadzik | rakudo: say (~1, *+0.1 ... 2.0).perl | ||
p6eval | rakudo ce565f: OUTPUT«Unable to figure out pattern of series in 'infix:<eq>' at line 1 in '_HELPER_generate-series' at line 849:CORE.setting in 'infix:<...>' at line 871:CORE.setting in main program body at line 22:/tmp/cC1eMHAtxS» | ||
rakudo ce565f: OUTPUT«("1", 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9)» | |||
tadzik | funny | ||
rhebus | tadzik: yeah, it's doing Nums not Rats | ||
TimToady | rakudo: say 1.0e0, 1.1, 1.2 .. 2.0 | 08:13 | |
p6eval | rakudo ce565f: OUTPUT«11.11.2» | ||
TimToady | rakudo: say 1.0e0, 1.1, 1.2 ... 2.0 | ||
p6eval | rakudo ce565f: OUTPUT«Unable to figure out pattern of series in 'infix:<eq>' at line 1 in '_HELPER_generate-series' at line 849:CORE.setting in 'infix:<...>' at line 871:CORE.setting in main program body at line 22:/tmp/bBI7jTvNeb» | ||
Quadrescence | arithmetic sequences with floats seems like a pretty bad idea | ||
TimToady | rakudo: say 1.0e0, 1.1e0, 1.2e0 ... 2.0 | ||
p6eval | rakudo ce565f: OUTPUT«Unable to figure out pattern of series in 'infix:<eq>' at line 1 in '_HELPER_generate-series' at line 849:CORE.setting in 'infix:<...>' at line 871:CORE.setting in main program body at line 22:/tmp/tt9fvILPsp» | ||
TimToady | it can't figure it out because the ratios aren't exactly the same | 08:14 | |
Quadrescence | ratios or differences? | ||
TimToady | rakudo: say 1.0e0, 1.1e0 ... 2.0 # should work | ||
p6eval | rakudo ce565f: OUTPUT«11.11.21.31.41.51.61.71.81.9» | ||
TimToady | work better, I mean | ||
rhebus | heh | ||
TimToady | with three terms, the differences or ratios have to match | 08:15 | |
rhebus | right | ||
Quadrescence | rakudo: say 1.1e0 - 1.0e0, 1.2e0 - 1.1e0 | ||
p6eval | rakudo ce565f: OUTPUT«0.10.0999999999999999» | ||
TimToady | it's...probably good that they don't | ||
rhebus | rakudo: say ~1.0e0, 1.1e0, 1.2e0 ... 2.0 | ||
p6eval | rakudo ce565f: OUTPUT«Unable to figure out pattern of series in 'infix:<eq>' at line 1 in '_HELPER_generate-series' at line 849:CORE.setting in 'infix:<...>' at line 871:CORE.setting in main program body at line 22:/tmp/CtYku1hYEZ» | ||
08:16
gfx left
|
|||
TimToady | rakudo: say 1.1 - 1.0,' ', 1.2 - 1.1 | 08:16 | |
p6eval | rakudo ce565f: OUTPUT«0.1 0.1» | ||
Quadrescence | rakudo: say 1.1e0 - 1.0e0, ' ', 1.2e0 - 1.1e0 | ||
p6eval | rakudo ce565f: OUTPUT«0.1 0.0999999999999999» | ||
Quadrescence | rakudo: say (1.1e0 - 1.0e0)-(1.2e0 - 1.1e0) | ||
p6eval | rakudo ce565f: OUTPUT«2.22044604925031e-16» | ||
TimToady | rakudo: say (1.1 - 1.0) - (1.2 - 1.1) | ||
p6eval | rakudo ce565f: OUTPUT«0» | 08:17 | |
TimToady | Rats++ | ||
rhebus | TimToady: but what if the user passes in a Num for $a or $b? :) | ||
Quadrescence | are those rationals internally? or fixed point? | ||
TimToady | rakudo: say 1.1.perl | ||
p6eval | rakudo ce565f: OUTPUT«11/10» | ||
rhebus | rakudo: say (1,1.1 ... 2).perl | ||
p6eval | rakudo ce565f: OUTPUT«(1, 11/10, 6/5, 13/10, 7/5, 3/2, 8/5, 17/10, 9/5, 19/10, 2/1)» | ||
Quadrescence | TimToady: have you considered using fixed point arithmetic instead | 08:18 | |
TimToady | rhebus: we call that DIHWIDT | ||
Quadrescence | rationals just get unwieldy quickly; i just wrote a chapter on this in a book i'm writing not too long ago actually | ||
rhebus | TimToady: it's reasonable to make these things explicit in example code. sub leftrect (&f, Rat $a, Rat $b, Int $n) | 08:19 | |
TimToady | Quadrescence: see S02:704 on that subject | 08:20 | |
rhebus: yes, wouldn't hurt | |||
rhebus | shall i add it in? | 08:21 | |
Quadrescence | TimToady: "i just wrote a chapter on this in a book i'm writing not too long ago actually" <-- Is this redundant because I said "just" and "not too long ago"? | ||
(I don't know how much of a grammarian you are. :) | 08:22 | ||
sorear | TimToady: e0 forces Num now?! | ||
TimToady | also, S02:733 discusses an optimization that makes rats behave a bit like fixed point by being lazy about reducing | ||
08:22
cjk101010 joined
|
|||
TimToady | sorear: it's been that way for months :) | 08:22 | |
actually, S02:751 discusses the lazy idea | 08:23 | ||
Quadrescence: redundancy is good for communication; I'm a linguist, not a grammarian | 08:24 | ||
Quadrescence | TimToady: Did you ever write anything about redundancy in programming (in the linguistic sense, not any datum sense)? | 08:25 | |
I very vaguely recall you saying something about this somewhere from years ago. | |||
TimToady | not specifically | ||
I've probably mentioned the principle from time to time | |||
I should probably go to bed; have to get up in 4.5 hours or so... | 08:27 | ||
TimToady --> SleepState | 08:29 | ||
08:32
masak joined
|
|||
masak | привет, #perl6! | 08:32 | |
08:32
rhebus_ joined
08:33
rhebus left
08:34
rhebus_ is now known as rhebus
08:38
tadzik left
|
|||
rhebus | rakudo: say do $_ for 1..10 | 08:39 | |
p6eval | rakudo ce565f: OUTPUT«12345678910» | ||
masak | rakudo: say 1..10 | 08:40 | |
rhebus | hmm, that doesn't work on my local rakudo* | ||
p6eval | rakudo ce565f: OUTPUT«12345678910» | ||
masak | star: say do $_ for 1..10 | ||
p6eval | star 2010.07: OUTPUT«» | ||
masak | confirmed. | ||
08:44
rhebus_ joined,
rhebus left
08:45
rhebus_ is now known as rhebus
|
|||
rhebus | goddamn wireless goblins | 08:45 | |
08:45
barney joined
|
|||
masak | one would have thought that the big Goblin De-wire-ification of 1996 would have led to something good. but no. | 08:45 | |
rhebus | :) | 08:46 | |
moritz_ | \o | ||
masak | o/ | ||
rhebus | moritz_++ # irclog | ||
masak | moritz_: I have another exception for our single wtop so far in github.com/moritz/perl6-wtop/blob/m...ctices.pod | 08:47 | |
moritz_: I tend to write $a..$b in some circumstances. | |||
(and $a .. $b in others, but still) | |||
moritz_ | masak: agreed. It's not a very hard rule | 08:48 | |
moritz_ would like to move all S03-operators/series*.t to S03-series/*.t | 08:49 | ||
rhebus | masak, moritz_: could you have a list of pending wtops? it'd be nice to see what you guys are thinking about as well as what you've agreed | ||
masak | moritz_: go right ahead. | ||
rhebus | RFC-style | 08:50 | |
moritz_ | rhebus: no objections | ||
masak | rhebus: heh :) I probably have some, but I can't think of any right now. | ||
at least I don't think I can. | |||
moritz_ too | |||
rhebus | there was one mentioned the other day... don't overuse junctions | ||
moritz_ should be more consequent in writing them down... | |||
rhebus | or something like that | ||
sorear | wtop? | 08:51 | |
moritz_ | right, what rhebus++ said | ||
masak | sorear: well-thought-out practice | ||
sorear: it's a tongue-in-cheek riff off "best practices" | |||
rhebus | i think the best way to arrive at best practices is to write a load of ideas down and criticise the $expletive out of them and see which ones stay standing at the end | 08:52 | |
masak | hm, maybe. | 08:53 | |
08:53
Ross left
|
|||
moritz_ | rhebus: I disagree. At the start of a best practise there's code, lots of code | 08:53 | |
masak | in some cases it's hard to speak about best practices, because much Real Code out there is still shock-full of workarounds. | ||
rhebus | moritz_: i don't understand. at the start of the best practice document, at the start of the best practice design? | 08:54 | |
masak | making the best practices hard to identify. | ||
rhebus: what moritz_ is getting at is that people talking is worth less than people with lots of experience. | |||
rhebus | masak: quite. The criticism must be based on experience | ||
moritz_ | rhebus: at the start of a best practise there should be lots of real-world code that accomplishes real-world tasks | 08:55 | |
08:55
Ross joined
|
|||
masak | experience with Perl 6 as well as with programming in general. | 08:55 | |
rhebus | at the start of the design of a best practice? at the start of the best practice document? | ||
masak | rhebus: I don't understand that question. | 08:56 | |
moritz_ | rhebus: the best practise comes before its document | ||
masak | I think 'at the start' was meant figuratively. | ||
rhebus | what I'm saying is that once a best practice is identified, it must be tested before being accepted generally | ||
that testing must involve real code and real experience | 08:57 | ||
but, for example, many of damian's pbps were found to be wanting. eg inside-out objects | 08:58 | ||
08:58
flatwhatson_ left
|
|||
rhebus | (though pbp is an excellent book) | 08:58 | |
masak | inside-out objects were run over by the Moose train. | ||
sorear | best practices should always come from an examination of already-working code | ||
masak | and they in turn superseded much of Damian's OO book. | ||
moritz_ | well, even the people using inside-out objects don't typically don't use the modules recommended in PBP | 08:59 | |
rhebus | i'm not sure best practices come from examining code, but rather from examining habits | ||
08:59
cosimo joined
|
|||
moritz_ | rhebus: and they come from making mistakes | 08:59 | |
rhebus | i see best practices as a behavioural thing rather than a purely code-based thing | ||
moritz_ | and spotting mistakes in other people's code | 09:00 | |
rhebus | i agree | ||
masak | nod | 09:01 | |
it's really about discipline, and disciplines. | |||
09:01
flatwhatson_ joined
|
|||
rhebus | but you can't know if a proposed best practice is really good until you've tried coding consciously under that best practice | 09:01 | |
moritz_ | that's why I wrote that code comes first | 09:02 | |
or phrased differently, that's another reason | |||
rhebus | well I see it like this: code -> identify problems -> identify best practices -> test bp with more code | ||
masak | it's not a best practice until it has been practiced a lot by people who consider it best. | 09:03 | |
moritz_ | code -> identify problems -> find a solution -> write code with the solution -> discuss -> write up | ||
rhebus | masak: that's what i mean. but those people won't consider it best unless they've been asked to consider it as a possible best practice | ||
moritz_: i think more code is needed in the discuss stage | |||
masak | rhebus: right. | ||
moritz_ | probably, yes | 09:04 | |
rhebus | and this process can be iterative -- find problems with the bp -> refine bp to accomodate those problems -> test new bp | ||
anyway | |||
masak | a practice that I consider to be very good, but that is non-specific to Perl 6, is "use vertical alignment to favourably expose meaningful patterns in your code" | 09:05 | |
or, put more simply, "put similar things under each other" | |||
rhebus | that's why i want to see proposed and hypothetical wtops, to try them out and see how they affect my coding | 09:06 | |
masak | and that underlies my total avoidance of tab characters, because I value vertical alignment. | ||
rhebus | i imagine a number of damian's pbp can be lifted wholesale into perl 6 | ||
masak | rhebus: yes. and I code under a number of them daily. | ||
moritz_ | can anybody please check if S03-operators/nesting.t or S03-metaops/reverse.t loop under current rakudo? | 09:08 | |
rhebus | ah here's something i've been wondering: is it ok to use ~~ instead of ==? | ||
moritz_ | it loops here, but I have some local patches | ||
masak | rhebus: I consider it sloppy to use ~~ when == is what's intended. | 09:10 | |
rhebus: but it works, yes. | |||
moritz_ | rhebus: IMHO == has the advantage of telling exactly what kind of comparison is wanted | ||
so it's better | |||
*if* you know that you want numeric comparison | |||
rhebus | yes, supposing that you do | ||
moritz_ | if you don't, ~~ is correct | 09:11 | |
09:12
mikehh left
|
|||
masak | ~~ casts to the rhs. == casts to numeric. so it depends on what you want. | 09:12 | |
in the case where the rhs is numeric, they're the same. but == shows intent better. | |||
rhebus | so 1 ~~ "1x" is not the same as 1 == "1x"? | 09:13 | |
masak | right. | ||
sorear | no current compiler is smart enough to handle ~~ quite well | ||
masak | the former is string comparison. | ||
09:13
wamba joined
|
|||
moritz_ | rakudo handles ~~ pretty well, just not fast | 09:13 | |
masak | I don't know if I consider it a "best practice" to prefer == whenever that's what's intended, or just common sense :) | ||
moritz_ pushed to perl6-wtop | 09:14 | ||
09:14
wamba left,
wamba joined
|
|||
masak | for what it's worth, I don't see the value of differentiating practices.pod and rfc.pod. | 09:15 | |
one sounds more official than the other, but who determines when something is worthy of moving up to practices.pod? | 09:17 | ||
moritz_ | good point | ||
you're welcome to join them, and remove the comment from README | |||
masak does so | |||
moritz_ | masak++ | ||
rhebus | well i guess you could sort practices.pod by number of champions, such that more-championed practices rise to the top | ||
09:18
Steppenwolf joined
|
|||
rhebus | but that will lead to horrible diffs | 09:18 | |
moritz_ | aye | ||
I'd rather prefer the presenting software (if any) to do the sorting | |||
rhebus | yeah | ||
09:22
sunnavy left,
ashleydev left
09:23
frew left
09:24
rgrau_ joined
09:28
sunnavy joined
09:29
ashleydev joined
09:30
frew joined
|
|||
moritz_ | rakudo: say ~(1, 3 ... 9) | 09:36 | |
p6eval | rakudo ce565f: OUTPUT«1 3 5 7 9» | 09:37 | |
09:42
kjeldahl joined
09:46
azert0x joined
09:47
flatwhatson_ left,
flatwhatson_ joined
|
|||
sorear | S05 specs that regexes return lists of Cursor, but I (and viv) think returning lists of Match makes some more sense | 09:48 | |
moritz_ | github.com/rakudo/rakudo/pull/4 | 09:51 | |
09:58
whiteknight joined
|
|||
masak writes his first given/when in Perl 5 | 10:03 | ||
10:03
barney left
10:08
mikehh joined
10:11
baest left
|
|||
rhebus | moritz_: it seems the spec has changed to remove inexact endpoint dwimmery | 10:17 | |
which would make 'AA' ... 'Z' infinite | |||
masak | works for me. :) | 10:18 | |
I don't think I'd ever want that to dwim to anything anyway... | 10:19 | ||
rhebus | github.com/perl6/specs/commit/69247...2555e17d8d | ||
well, 2,3,*+2 ... sqrt $n would be nice | 10:20 | ||
or 1,1,{$^a + $^b} ... 1000 | |||
masak | in general, I think incrementing strings is pretty futile. beyond perhaps the very basics, which can be useful. | ||
10:22
tadzik joined
10:24
Schwern left
|
|||
rhebus | it's not just strings which may want inexact limits | 10:32 | |
masak | true. | 10:33 | |
rhebus | but, as the spec shows, you can always use a closure | ||
masak | we've seen arrays in series lately. | ||
rhebus | 2,3,*+2 ... * >= sqrt $n | ||
rakudo: [1,2,3].succ.say | |||
p6eval | rakudo ce565f: OUTPUT«Method 'succ' not found for invocant of class 'Array' in main program body at line 22:/tmp/ZOOCh7wH05» | ||
rhebus | so it's be something like [1,2,3], [*[1]+1,*[2]+2,*[3]+3] ... *? | 10:34 | |
although it would seem more intutive to me to say 2,3,*+2 ... * < sqrt $n | 10:36 | ||
iow, i think the limit should be a while condition, not an until condition | |||
masak | I had the same thought when I read the latest spec changes. | 10:41 | |
but then I remembered that the rhs of a series operator actually reads like an until condition. | |||
rhebus | right i'm off to the local park fun day | 10:45 | |
bouncy castle and face painting :D | 10:46 | ||
masak | have the appropriate amount of fun :) | ||
rhebus | heh | 10:47 | |
10:47
rhebus left
10:59
mberends joined
|
|||
tadzik | masak: what do you think about ripping the make-substitute part out of pls and rolling out something like Module::Builder? | 11:05 | |
masak | tadzik: that might be a good idea. | ||
pls would still carry of copy of such a module, of course. | |||
tadzik | sure thing | 11:06 | |
masak | to avoid having dependencies. | ||
tadzik | so is neutro | ||
also, I think of using the actual File::Find instead of writing own sub find-files | |||
masak | :) | ||
tadzik | crap, I can't build parrot due to something that looks like an ld bug | 11:07 | |
wklej.org/id/387595/ | |||
11:08
mberends left
|
|||
masak | tadzik: I get a 500 error on that paste. | 11:10 | |
"Unhandled Exception -- An unhandled exception was thrown by the application." | |||
tadzik | oh, I do too | ||
whatever, seems like --as-needed in LDFLAGS was breaking it | |||
11:20
nimiezko joined
|
|||
jnthn | afternoon, 6folk | 11:23 | |
masak | o/ | 11:25 | |
jnthn | yayitsmasak! | ||
jnthn makes a bacon sarnie | |||
masak | lunch, now there's an idea... | 11:26 | |
11:27
flatwhatson_ left
|
|||
jnthn | breakfast for me :P | 11:27 | |
Well...brunch :-) | |||
Plan for today: write my talk for Oslo, write a short-term roadmap for my grant, hack some more stuff into 6model. :-) | 11:29 | ||
masak | when's Oslo? | ||
jnthn | Tuesday evening | ||
Thus the talk is at the "can't procrastinate it much longer" stage. :-) | |||
masak likes that stage | 11:30 | ||
but beware, the next stage is not as fun :) | |||
not to mention the one after that... :/ | |||
or the one after that... :( | 11:31 | ||
Plan for today: continue rescuing my use.perl.org content (it's going surprisingly well, much thanks to Perl 5), maybe design the new blog a bit, pick up Web.pm, have a look at Druid. | 11:33 | ||
11:35
flatwhatson_ joined
|
|||
tadzik | hmm, I think something like Module::Tools would be nicer. There could be Module::Build, Module::Install, maybe Module::Starter | 11:36 | |
masak | tadzik++ # doing module infrastructure | 11:50 | |
tadzik | moritz_++ started some Module::Starter I think | 11:51 | |
11:53
isBEKaml joined
11:54
sftp left
11:58
am0c joined
|
|||
masak | aye, and mberends++ had a script in the proto repository before that. | 11:59 | |
create-new-project | |||
isBEKaml | OHHAI, #perl6! :) | ||
masak: I was surprised when I received mails about bug reports from proto on github. :) | |||
masak: not that I mind, though. But I thought proto was so long ago. | 12:00 | ||
masak | isBEKaml: aye, github's default emailing policy is "email contributors". it's possible to turn those emails off, though. I believe I did for my account. | 12:01 | |
isBEKaml: some people still seem to use proto. also, the pls branch is still in that repository. | |||
tadzik | I alredy msged mfollet about these | ||
masak | tadzik++ | ||
isBEKaml | tadzik++ | ||
tadzik | although I had no balls to close the issues with a message 'project abandoned' ;) | 12:02 | |
isBEKaml | I think it'll be less confusing between proto and pls if we swap branches. | ||
masak | or put pls into a separate repository. | 12:03 | |
tadzik | masak++ | ||
isBEKaml | I think that would be even more confusing. Consider a new guy, what would he think if he saw two repos by the same author that "purportedly" does the same thing? | ||
We have to have some way of pointing people towards pls than proto. | 12:04 | ||
12:04
nimiezko left
|
|||
masak | isBEKaml: would that be more confusing than pls being in the main branch of a repo called 'proto', or less? :) | 12:04 | |
isBEKaml: I don't like to make decisions for people. | |||
isBEKaml | masak: ah, proto/pls/decision-making dilemma. ;) | 12:05 | |
tadzik | well, there are now 3 projects doing purportedly the same thing | ||
masak | not when both alternatives still have different benefits over each other, at least. | ||
tadzik | . o O ( troth alternatives ) | ||
isBEKaml | tadzik: not all by the same author. :) | 12:06 | |
tadzik | well, I'm a neutro author and a pls contributor :) | ||
isBEKaml | that's one less confusion. ;) | ||
tadzik | and it's not very confusing to me :) | ||
isBEKaml | maybe because it's you? :) | ||
tadzik | :) | 12:07 | |
maybe | |||
hm, Module::Build is actually an ufo-then-pls code stolen and put into a module | 12:09 | ||
12:12
isBEKaml left
12:14
isBEKaml joined
|
|||
isBEKaml | Module::Build? | 12:16 | |
that makes it quad-alternative. =) | |||
masak | lunch & | ||
12:16
masak left
12:20
zulon joined
12:22
Mowah left
|
|||
isBEKaml | oh, Module::Builder seems to be only on p5. :| | 12:22 | |
12:23
jasonmay joined
|
|||
tadzik | Module::Build can now Module::Build itself | 12:25 | |
isBEKaml | I think you (intentionally) left out something. 6 on 6, 5 on 5, 5 on 6, 6 on 5? ;) | 12:26 | |
tadzik | wait, what? :) | 12:27 | |
6 on 6 if I understand correctly | |||
isBEKaml | perl6 Module::Build can build itself on perl6? ;) | ||
tadzik | yes :) | ||
isBEKaml | tadzik++ | 12:28 | |
tadzik | nothing fancy, it's just pls code stolen :) | ||
isBEKaml | tadzik++ # init worked! | 12:31 | |
tadzik | :) | ||
method install($project --> Result) -- now what is this? | 12:33 | ||
I like this: run $command and die() ;) | 12:37 | ||
12:37
stepnem joined
12:44
sftp joined
12:45
am0c left
|
|||
tadzik | phenny: tell masak github.com/masak/proto/blob/pls/pro...ncept#L284 -- shouldn't it be /\.pm6?$/ ? | 12:45 | |
phenny | tadzik: I'll pass that on when masak is around. | ||
12:47
aloha left,
bacek left
12:49
zulon left
|
|||
tadzik | rakudo: my $a = List.new(1, 2, 3); for $a -> $b { say $b.perl } # is this a feature? | 12:50 | |
p6eval | rakudo ce565f: OUTPUT«(1, 2, 3)» | ||
isBEKaml | rakudo: my $a = List.new(1,2,3); say $a; # does this seem different? | 12:51 | |
p6eval | rakudo ce565f: OUTPUT«1 2 3» | ||
tadzik | well, I thought it'd be iterating over a list | ||
isBEKaml | rakudo: my $a = List.new(1,2,3); say $a.perl; | ||
p6eval | rakudo ce565f: OUTPUT«(1, 2, 3)» | ||
gfldex | rakudo: my $a = List.new(1,2,3); for $a.list -> $b { say $b.perl }; | ||
p6eval | rakudo ce565f: OUTPUT«123» | ||
tadzik | hmm | ||
isBEKaml | yes. | ||
tadzik | thanks gfldex | ||
gfldex | i can even show you why this is a good feature | 12:52 | |
imagin you have a list of lists and you want to iterate over that list | |||
then you need to keep the item context in $a -> $b | |||
12:54
sftp left
|
|||
tadzik | I don't really get it | 12:55 | |
phenny: tell masak github.com/masak/proto/blob/pls/pro...ncept#L172 -- couldn't it just be try-CATCH? | 12:58 | ||
phenny | tadzik: I'll pass that on when masak is around. | ||
12:59
sftp joined
13:10
orafu left,
orafu joined
13:13
Mowah joined,
zulon joined,
redicaps joined
13:15
Patterner left,
redicaps left
13:17
envi^home left
|
|||
tadzik | Nominal type check failed for parameter '$from'; expected Str but got File::Find::Result instead | 13:17 | |
13:17
icwiener left
|
|||
tadzik | shouldn't it be ok if File::Find::Result is Cool and has a .Str method? | 13:17 | |
13:18
Psyche^ joined,
Psyche^ is now known as Patterner
13:19
Mowah left,
icwiener joined
13:20
envi^home joined
13:23
Mowah joined
|
|||
moritz_ | no, Cool !~~ Str | 13:24 | |
it's the the other way round | |||
jnthn | tadzik: If you want to take anything and coerce it to a string, use "$from as Str" instead. | 13:25 | |
tadzik | sounds safer than Str $from | 13:26 | |
more versatile | |||
jnthn | Depends what kinda safetly you want. ;-) | ||
tadzik | and less strict | ||
jnthn | Right. :-) | ||
tadzik | true :) | 13:27 | |
moritz_ | subset Stringable of Any where .can('Str'); | ||
tadzik | huh, I just did rm -r ./\~ | 13:29 | |
I'm still scared stiff :) | |||
moritz_ | accidentally create a file with non-globbed filename? | 13:30 | |
13:31
jhuni left
|
|||
tadzik | yeah | 13:32 | |
well, I created ~ in a directory | |||
13:34
zulon left
13:37
rainerschuster joined,
brxue left
13:51
tadzik left
13:57
masak joined
|
|||
masak | tadzik: ooh, reading pls? nice! | 13:58 | |
phenny | masak: 12:45Z <tadzik> tell masak github.com/masak/proto/blob/pls/pro...ncept#L284 -- shouldn't it be /\.pm6?$/ ? | ||
masak: 12:58Z <tadzik> tell masak github.com/masak/proto/blob/pls/pro...ncept#L172 -- couldn't it just be try-CATCH? | |||
masak | first question: seems it should indeed. good catch. fixing. | ||
second question: obviously you don't have the deep mistrust of try/CATCH in Rakudo that I've built up. :) that's good, I guess. | 13:59 | ||
either it still doesn't work, or my mistrust is out-of-date. | |||
14:03
mberends joined
14:04
Chillance joined
|
|||
masak | mberends: ping | 14:04 | |
mberends | masak: pong | 14:05 | |
phenny | mberends: 10 Sep 12:11Z <masak> tell mberends that if he plans to submit OSDC.fr talks: deadline falls today. | ||
masak | mberends: what phenny said. | ||
mberends | oops | ||
masak | maybe not too late still. | 14:06 | |
mberends | I saw jnthn's talks, and planned to discuss other talk ideas before making a submission, and then got sidetracked by $work :( | 14:08 | |
yes, quite possibly | |||
masak | hurry hurry | ||
mberends | think think, what would complement the existing schedule? | 14:09 | |
jnthn | Something at 90 degrees to it? | 14:10 | |
;-) | |||
masak | |o_ | ||
dalek | kudo: 62e168d | patrickas++ | src/core/operators.pm: Starting to implement new series spec |
14:11 | |
kudo: 953705a | patrickas++ | src/core/operators.pm: There is no more need to check of the wrong side |
|||
kudo: 6483439 | patrickas++ | src/core/operators.pm: Simplify the limit-reached code since geometric series don't require use of abs() anymore |
|||
14:11
dalek left
|
|||
masak | rakudo: my class Str {}; say 42.Str ~~ Str | 14:11 | |
p6eval | rakudo ce565f: OUTPUT«0» | ||
masak | :) | ||
jnthn | :-) | 14:12 | |
14:12
mberends_ joined,
dalek joined,
ChanServ sets mode: +v dalek
|
|||
masak | mberends_: are you mberends' evil twin? | 14:12 | |
jnthn | Or just the complement to mberends| ;) | ||
masak | :D | ||
jnthn | I'm sure mberends++ can submit a talk that gets the right angle on Perl 6. | 14:13 | |
masak groans appreciatively | |||
14:13
mberends left
|
|||
moritz_ | patrikas++ # the big series hacker! | 14:13 | |
masak | jnthn: sometimes you manage to angle your puns just right! | ||
jnthn | masak: Thanks for the complement. | 14:14 | |
masak | LOL | ||
14:14
mberends_ is now known as mberends
|
|||
flussence | (scrollback from ~17h ago): It'd be nice to have some sort of .POD method on functions for that. | 14:16 | |
masak | flussence: that's spec'd. not implemented, though. I plan to. | 14:17 | |
jnthn | It's .WHY speculated to be for that? | ||
dalek | kudo: fb4feba | moritz++ | t/spectest.data: track test file rename |
||
jnthn | *Isn't | ||
moritz_ | it is | ||
flussence | ooh, .WHY looks a lot more useful than I imagined. | 14:20 | |
masak | \o/ | 14:21 | |
flussence now appreciates the value of docs bundled with the language, after trying to write javascript without a net connection | 14:25 | ||
masak | programming without a net connection? curious. | 14:26 | |
and javascript of all languages, to boot :) | |||
14:27
wamba left
|
|||
flussence | stuck on a boat for 3 hours, and perl6 isn't much fun on a slow netbook :( | 14:28 | |
14:28
xinming left
|
|||
flussence | (yet) | 14:28 | |
masak | Rakudo has the slow feature built in right now. no need for a netbook to add that feature :) | 14:29 | |
14:29
xinming joined
|
|||
flussence | OTOH, the slow hardware gives me a reason to write faster code :) | 14:31 | |
14:31
meppl joined
|
|||
masak | my thinking too | 14:31 | |
14:32
tom_tsuruhara left
|
|||
masak | phenny: tell tadzik fixed, thanks! github.com/masak/proto/commit/8599d...5f72a2a7aa | 14:33 | |
phenny | masak: I'll pass that on when tadzik is around. | ||
14:35
takadonet joined,
amkrankruleuen joined
|
|||
amkrankruleuen | Hello. | 14:35 | |
masak | amkrankruleuen! \o/ | ||
moritz_ | oh hai | ||
14:40
cognominal left
14:41
rainerschuster left
|
|||
dalek | kudo: a93dcb6 | moritz++ | / (2 files): [docs] update ChangeLog |
14:41 | |
14:42
cognominal joined
|
|||
moritz_ | rakudo: / \# / | 14:45 | |
p6eval | rakudo ce565f: ( no output ) | ||
moritz_ | std: / \# / | ||
p6eval | std 32123: OUTPUT«===SORRY!===Regex not terminated at /tmp/FMr5XK2dYm line 1 (EOF):------> / \# /⏏<EOL> expecting quantifierParse failedFAILED 00:01 116m» | ||
masak | huh. | 14:46 | |
moritz_ | TimToady: LTA parse error message above | ||
masak | LTA parse, I'd say. | ||
moritz_ | TimToady: should trigger the "No unspace allowed" from line 4725 | ||
std: / / | |||
p6eval | std 32123: OUTPUT«===SORRY!===Null regex not allowed at /tmp/Axk3n03C7Z line 1:------> / /⏏<EOL>Check failedFAILED 00:01 114m» | ||
moritz_ | rakudo: / / | ||
p6eval | rakudo ce565f: OUTPUT«===SORRY!===Null regex not allowed at line 22, near ""» | 14:47 | |
moritz_ | rakudo: / & / | ||
p6eval | rakudo ce565f: ( no output ) | ||
moritz_ | bug | ||
rakudo: / | / | |||
p6eval | rakudo ce565f: ( no output ) | ||
moritz_ | same bug | ||
shortcircuit | TimToady: I was up later than usual last night. :) | 14:48 | |
moritz_ | rakudo: / : / | ||
p6eval | rakudo ce565f: OUTPUT«===SORRY!===Method 'backtrack' not found for invocant of class 'Integer'» | ||
moritz_ | LTA error | 14:49 | |
14:49
ash_ joined
|
|||
jnthn | std: / : / | 14:49 | |
p6eval | std 32123: OUTPUT«ok 00:01 116m» | ||
moritz_ | that's broken too | ||
jnthn | LTE error | 14:50 | |
moritz_ | should say "Backtrack control ':' does not seem to have a preceding atom to control" | ||
14:51
Getty left
|
|||
isBEKaml | rakudo: / #`{ / # just curious | 14:53 | |
p6eval | rakudo ce565f: OUTPUT«(timeout)» | ||
isBEKaml | std: / #`{ / | ||
p6eval | std 32123: OUTPUT«===SORRY!===Couldn't find terminator } at /tmp/n1sjPtydK7 line 1 (EOF):------> / #`{ /⏏<EOL>Parse failedFAILED 00:01 114m» | 14:54 | |
shortcircuit | TimToady: Wow; didn't expect that you'd do that much analysis on each example. Thanks. :) | 14:59 | |
shortcircuit also went in added a test output spec consisting of a couple functions, so something like that doesn't happen again on that page. | 15:00 | ||
15:00
takadonet left
|
|||
x3nU | well | 15:00 | |
i have created rakudo star installer for windows | |||
shortcircuit | whups. The 'later than usual' was intended for a different channel/person target. | 15:01 | |
15:03
macroron joined,
amkrankruleuen left,
patspam joined
15:08
whiteknight left
|
|||
moritz_ | std: /a{1,3}/ | 15:09 | |
p6eval | std 32123: OUTPUT«===SORRY!===Unsupported use of {1,3} as general quantifier; in Perl 6 please use X**1..3 at /tmp/VUiqpioGUF line 1:------> /a{1,3}⏏/Check failedFAILED 00:01 116m» | ||
x3nU | xenu.pl/rakudo-star.2010.08.exe | ||
moritz_ | rakudo: /a{1,3}/ | ||
p6eval | rakudo fb4feb: ( no output ) | ||
moritz_ | x3nU++ | ||
masak | moritz_: known, RT'd? | 15:11 | |
15:12
The_Ghost joined
|
|||
moritz_ | masak: I'm fixing the a{1,3} thing now (as good as currently possiblein nqq-rx), I don't think the others are RT'ed | 15:12 | |
masak backlogs and submits what he can sift out | 15:13 | ||
15:13
The_Ghost left
|
|||
moritz_ | I think a general "LTA regex parsing errors" ticket wouldn't hurt | 15:13 | |
masak | std: / & / | 15:15 | |
p6eval | std 32123: OUTPUT«===SORRY!===Null pattern not allowed at /tmp/jD4FwUztCd line 1:------> / & ⏏/ expecting quantifierParse failedFAILED 00:02 115m» | ||
15:18
b0m1ro joined
15:19
tylercurtis joined
15:21
isBEKaml left
|
|||
dalek | p-rx: 184e828 | moritz++ | src/Regex/P6Regex/Grammar.pm: catch p5 gneral quantifiers |
15:21 | |
shortcircuit | TimToady: Question regarding your P6 code: rosettacode.org/mw/index.php?title=...oldid=prev | 15:28 | |
15:30
takadonet joined
15:33
Chillance left
15:37
b0m1ro left
15:38
ruoso joined
15:40
Ross left,
Ross joined
15:43
patspam left
15:48
mikehh left
15:51
cjk101010 left
16:05
jettero left,
thundergnat joined
16:06
jettero joined,
jettero left,
jettero joined
|
|||
thundergnat | rakudo: my $x; $x = $x ?& 1; say $x; | 16:08 | |
p6eval | rakudo fb4feb: OUTPUT«0» | ||
thundergnat | rakudo: my $x; $x ?&= 1; say $x; | ||
p6eval | rakudo fb4feb: OUTPUT«No applicable candidates found to dispatch to for 'infix:<?&>'. Available candidates are::(Any $a, Any $b) in main program body at line 1» | 16:09 | |
thundergnat | hmmm. | ||
known bug? | |||
or does that fall under "don't do that"? | |||
tylercurtis | rakudo: my $x; $x [?&]= 1; say $x; | ||
p6eval | rakudo fb4feb: OUTPUT«===SORRY!===Confused at line 22, near "$x [?&]= 1"» | ||
16:09
Steppenwolf left
|
|||
tylercurtis | std: my $x; $x [?&]= 1; say $x; | 16:10 | |
p6eval | std 32123: OUTPUT«ok 00:01 118m» | ||
tylercurtis | The former is probably a bug. The latter almost certainly is. | ||
thundergnat | Its kind of a degenerate case | ||
pmichaud | good morning, #perl6 | 16:11 | |
jnthn | morning, pmichaud | 16:12 | |
masak | morning, pm! | 16:14 | |
I'm getting a build fail on latest Parrot and latest Rakudo: "FATAL ERROR: Duplicated VTABLE function: get_pmc_keyed_int at /usr/local/lib/parrot/2.7.0-devel/tools/build/../lib/Parrot/Pmc2c/PMC.pm line 74." | |||
should I downgrade my Parrot? | |||
PARROT_REVISION says 48909, I has 48934. | 16:15 | ||
(just to be clear, latest Parrot builds fine; latest Rakudo on top of it doesn't.) | |||
pmichaud | we might have a PMC that has multiple get_pmc_keyed_int declarations. | 16:17 | |
one of the recent Parrot changes declares that an error. | |||
x3nU | also i wonder can someone put my installer on rakudo.org? ;f | ||
pmichaud | in fact, I'm wondering if that should've required a deprecation cycle | 16:18 | |
tylercurtis | Compilers detecting bugs in supplied code is a good thing, no? | 16:19 | |
16:20
mfollett joined
|
|||
tylercurtis | By the way, github.com/rakudo/rakudo/blob/maste...b.pmc#L926 and github.com/rakudo/rakudo/blob/maste....pmc#L1112 | 16:20 | |
pmichaud | tylercurtis: sure, but making code that previously worked turn into non-working code isn't. | ||
16:23
rhebus joined
16:25
takadonet left
|
|||
tylercurtis | pmichaud: A warning might be better than a fatal error (at least for a deprecation cycle). But I'd consider pmc2c silently ignoring parts of the PMC code a bug. | 16:25 | |
pmichaud | sure, I consider that a bug also. | 16:26 | |
but part of the purpose of Parrot declaring "supported releases" and a deprecation cycle is so that HLL and library authors supposedly won't have to deal with these sorts of failures. | |||
at least, that's what I understand the purpose to be. | |||
16:27
takadonet joined,
tadzik joined
|
|||
tylercurtis | True. | 16:27 | |
tadzik | oh hai | ||
phenny | tadzik: 14:33Z <masak> tell tadzik fixed, thanks! github.com/masak/proto/commit/8599d...5f72a2a7aa | ||
masak | o/ | ||
pmichaud | a warning would be great. failing altogether isn't. | ||
tadzik | masak: also, Module::Tools are mostly working | ||
masak | \o/ | 16:28 | |
tadzik | except when they don't | ||
16:30
jferrero joined
|
|||
rhebus | rakudo: say %(1,2).WHAT | 16:31 | |
p6eval | rakudo fb4feb: OUTPUT«Hash()» | 16:32 | |
rhebus | star: say %(1,2).WHAT | ||
p6eval | star 2010.07: ( no output ) | ||
16:32
mfollett left
|
|||
tadzik | github.com/tadzik/perl6-File-Tools/...le/Copy.pm can you see anything painfully slow in here? | 16:33 | |
it takes ages to copy anything | |||
16:34
sjn left
|
|||
pmichaud | tadzik: there are some pathological cases in I/O in general (both in Parrot and in Rakudo) | 16:34 | |
I agree that should not be slow. It's probably worth tracking down a bit to see why it's slow. | |||
16:35
mfollett joined
|
|||
tadzik | sometimes it's immediate, sometimes takes around 25 seconds to copy a single file | 16:37 | |
decreasing over time | |||
pmichaud | I'm thinking it may be GC again. | ||
but I can run a test to find out. | |||
16:38
Axius joined
|
|||
tadzik | oh, maybe it's old .pir lying around confusing Parrot and Rakudo, let's see | 16:38 | |
ash_ | tadzik: you could cheat with your cp function and call cp (if its a unixy system) | ||
tadzik | well, no | ||
ash_: that's what I want to avoid | |||
moreover, I'm worried about my child being so painfully slow | 16:39 | ||
while being, well, quite straightforward | |||
ash_ | ah, well, i'd do some profiling then | ||
tadzik | gist.github.com/575338 that's the code | 16:40 | |
16:40
kjeldahl_ joined
|
|||
tadzik | gist.github.com/575340 | 16:40 | |
here's the result ↑ the copying time is approaching to 0 seconds, yet it's horrible at the beginning | |||
ash_: how do I do profiling on Rakudo? | 16:41 | ||
16:43
kjeldahl left
|
|||
tadzik | alright, it's not the matter of "the first file", it's about the size I think | 16:44 | |
...but _that_ slow? | |||
these are just 13 iterations | 16:45 | ||
16:45
mfollett left
|
|||
ash_ | in theory, you could do parrot -R profiling but that currently doesn't work in rakudo, so.... i am not sure what the best way of detecting the slow part is | 16:49 | |
tadzik | rakudo: my $t = 5555555; say "{time - $t} seconds passed" # what? | ||
p6eval | rakudo fb4feb: OUTPUT«Too many positional parameters passed; got 1 but expected 0 in 'time' at line 5933:CORE.setting in main program body at line 22:/tmp/pbmFAlpOzT» | ||
ash_ | rakudo: say time; | 16:53 | |
p6eval | rakudo fb4feb: OUTPUT«1284222665» | ||
ash_ | rakudo: my $t = time; say $t - 1; | ||
p6eval | rakudo fb4feb: OUTPUT«1284222679» | ||
ash_ | rakudo: say "{time}" | ||
p6eval | rakudo fb4feb: OUTPUT«1284222687» | ||
ash_ | rakudo: say "{time - 1}" | ||
p6eval | rakudo fb4feb: OUTPUT«Too many positional parameters passed; got 1 but expected 0 in 'time' at line 5933:CORE.setting in main program body at line 22:/tmp/7ZHhrTveTq» | ||
ash_ | thats weird | ||
must be a bug with interpolating functions | 16:54 | ||
tadzik | I sense so | 16:55 | |
ash_ | rakudo: sub f { 'foo' }; sub g($a) { 'g' ~ $a }; say "{f}"; say "{g 1}" | 16:56 | |
p6eval | rakudo a93dcb: OUTPUT«foog1» | ||
ash_ | rakudo: sub f { 'foo' }; sub g($a) { 'g' ~ $a }; say "{f ~ 1}"; say "{g 1}" | ||
p6eval | rakudo a93dcb: OUTPUT«Too many positional parameters passed; got 1 but expected 0 in 'f' at line 22:/tmp/jxxAhP2YWx in main program body at line 22:/tmp/jxxAhP2YWx» | 16:57 | |
ash_ | weird | ||
i don't get it but /shrug | |||
ash_ submits rakudo bug | |||
rhebus | ash_: is it interpreting "f ~ 1" as "f (~1)"? | 16:59 | |
16:59
timbunce joined
|
|||
rhebus | and is that correct with no parameter list? | 16:59 | |
ash_ | std: sub f { ... }; say "{f + 1}" | ||
p6eval | std 32123: OUTPUT«ok 00:01 116m» | ||
tadzik | oh, std | ||
rhebus | kk | ||
ash_ | rhebus: that seems possible | 17:00 | |
tadzik | std: my $t = 5555555; say "{time - $t} seconds passed" | ||
p6eval | std 32123: OUTPUT«ok 00:01 118m» | ||
tadzik | lol bug | ||
ash_ | that could be how its interpreting it | ||
tadzik | rakudo: my $t = 5555555; say "{time() - $t} seconds passed" | ||
p6eval | rakudo a93dcb: OUTPUT«1278667546 seconds passed» | ||
ash_ | yup thats it | ||
rhebus | rakudo: sub f () { 'foo' }; sub g($a) { 'g' ~ $a }; say "{f ~ 1}"; say "{g 1}" | 17:01 | |
p6eval | rakudo a93dcb: OUTPUT«Too many positional parameters passed; got 1 but expected 0 in 'f' at line 22:/tmp/FSQLthDu_t in main program body at line 22:/tmp/FSQLthDu_t» | ||
17:01
Axius left
|
|||
rhebus | rakudo: sub f () { 'foo' }; sub g($a) { 'g' ~ $a }; say "{f() ~ 1}"; say "{g 1}" | 17:01 | |
p6eval | rakudo a93dcb: OUTPUT«foo1g1» | ||
tadzik | wklej.org/id/387712/ -- yep, it's about the size | 17:02 | |
17:02
Chillance joined
17:04
Axius joined
|
|||
ash_ | that probably has something to do with parrot's GC system | 17:04 | |
tadzik | weird | 17:05 | |
ash_ | parrots GC is a bit weird at times | 17:06 | |
sorear | good * #perl6 | ||
tadzik | hello | 17:07 | |
17:07
thundergnat left
17:10
patch left
17:24
dju left
|
|||
jnthn afk for noms | 17:25 | ||
pmichaud | tadzik: it looks to me like it's taking about 1 sec per 4k block | 17:28 | |
let's see if I can get something similar here | |||
tadzik | I just thought about trying to increase the amount per iteration | ||
pmichaud | if it's gc-related, I think that will make it worse, no better. Ironically. | ||
*not | |||
tadzik | I'm trying 2048 now... | 17:29 | |
no significant difference | 17:30 | ||
alike with 8192. Bah | 17:32 | ||
pmichaud | rebuilding latest parrot here | ||
try 512, ooc | |||
tadzik | building with 128, just ooc | ||
pmichaud | wfm | ||
tadzik | I like edge cases for comparing | ||
pmichaud | try 1. :-P | ||
try 0. :-) | |||
tadzik | :D | ||
pmichaud | at 128 I think we might get swamped by the method call overhead, though :-| | 17:33 | |
tadzik | the lack of any difference is making me wonder whether it actually makes the changes in pirs | ||
pmichaud | well, I'm writing a baseline PIR version now so we can do a base measurement. | 17:34 | |
tadzik | great | ||
pmichaud | oh, ouch ouch ouch | 17:35 | |
github.com/rakudo/rakudo/blob/maste.../IO.pm#L72 # here's why it's slow | 17:36 | ||
that's.... not going to work in the long run. | |||
tadzik | where exactly? | ||
pmichaud | or even in the medium run. | ||
lines 72-97 | |||
tadzik | well, that I can see :) | 17:37 | |
dalek | kudo: 085920f | pmichaud++ | src/pmc/perl6multisub.pmc: Remove extra (unused) VTABLE get_pmc_keyed_int from perl6multisub. Discovered by NotFound++ (Parrot r48932) and masak++. |
||
pmichaud | after reading a 4k chunk, it pushes them one-byte-at-a-time into a ByteBuffer | ||
that's going to be... slow. | |||
tadzik | ouch | ||
(maybe inserting 1 instead of 128 wouldn't be a bad idea after all :P) | 17:38 | ||
pmichaud | oh, it's worse! | ||
17:38
Axius left
|
|||
pmichaud | it pushes them one-byte-at-a-time into an RPA! | 17:38 | |
17:38
hudnix left
|
|||
lue | ohai o/ | 17:38 | |
masak | pmichaud: o.O | ||
17:39
hudnix joined
|
|||
tadzik | RPA? | 17:39 | |
pmichaud | ResizablePMCArray | ||
which means it creates a new PMC for each element pushed | |||
tadzik | aw snap | ||
lue | O.o | ||
pmichaud | i.e., one PMC per byte read. | 17:40 | |
tadzik | btw, what's that tool extracting POD from C source? | 17:41 | |
masak sobs softly | |||
17:41
macroron left
|
|||
pmichaud | masak: this code was/is working around Parrot's difficulty in reading binary strings, or ... ? | 17:42 | |
masak | oh! we're talking about *my* code!? :/ | ||
pmichaud | oh, is it not yours? | ||
I didn't look to see the authorship. | 17:43 | ||
masak | it's Buf-related? | ||
pmichaud | I just assume buf-related item..... yes | ||
masak | probably mine, then. | ||
pmichaud | at least, I'm guessing it is, since read() is returning a buf | ||
masak checks | |||
pmichaud | let me be more precise. | ||
github.com/rakudo/rakudo/commit/692...99cc5fdc53 # looks like it | |||
masak | aye. | 17:44 | |
pmichaud | maybe that was that other "masak++" :) | ||
masak | ok, so *all* conversion to and from Buf is done byte-by-byte right now. | ||
it's not ideal by far. | 17:45 | ||
17:45
leprevost left
|
|||
rhebus grabs a pitchfork | 17:45 | ||
pmichaud | agreed, and no blame for it afaic | ||
17:45
leprevost joined
|
|||
pmichaud | buf in parrot is... tricky | 17:45 | |
masak | it's -Oworks rather than -Ospeed :) | ||
pmichaud | it's following in the footsteps of GGE :) | ||
rhebus | optimising is easy if it doesn't have to work :) | ||
masak | *lol* | ||
pmichaud | it's the GIO subsystem :) | 17:46 | |
lue | .oO(* in parrot is tricky) |
||
pmichaud | actually, * wasn't too bad :) | ||
masak | not sure there are tests for read(). checking. | ||
pmichaud | I think I'd like to see Buf implemented using a ResizableIntegerArray | 17:47 | |
lue | .oO[ * wasn't meant literally :) ] | ||
masak | pmichaud: I can look into that. | 17:50 | |
rhebus | i'm implementing a graph class, which has a method add-edges(), which I want to accept a list of Pair. A Pair 'a' => 'b' represents a line from vertex 'a' to vertex 'b' | ||
masak | rhebus: go on. :) | ||
rhebus | however, a Pair with a certain key gets interpreted as a named parameter. eg: sub add-edges (*@_ of Pair) { ... } foo(1 => 2) is ok, but foo (a => 'b') breaks with "Unexpected named parameter 'a' passed | 17:51 | |
masak | rhebus: yes. | ||
rhebus | i don't want to interpret lines as named parameters, because that's not what they are | ||
masak | rhebus: to pass a pair, you need either 'a' => 'b' or (a => 'b') | 17:52 | |
rhebus | er, any suggestions on which part of my design needs to give? | ||
masak: i see | |||
masak | rhebus: I've also experienced friction with that part of Perl 6 parameter passing. | ||
rhebus | :/ | ||
masak | rhebus: what you can do (which I don't necessarily recommend) is add a slurpy hash to the signature. | ||
rhebus: that would slurp up all the occasional named params, and you can add them post facto to the array. | 17:53 | ||
rhebus | masak: that fails for foo (a => 'b', a => 'c') | ||
masak | not per the spec. | ||
maybe per Rakudo. | |||
rhebus | really? | ||
masak checks | |||
rhebus | what does it mean then? what does %^a<a> give me in that case? | 17:54 | |
masak | S06:745 | ||
rhebus | S06:753 confirms lossage | 17:58 | |
rakudo: sub foo(*%p) { say %p.perl }; foo (a => 'b', a => 'c') | 17:59 | ||
p6eval | rakudo a93dcb: OUTPUT«Too many positional parameters passed; got 1 but expected 0 in 'foo' at line 22:/tmp/crSDJW6xjj in main program body at line 22:/tmp/crSDJW6xjj» | ||
masak | hm. | ||
rhebus | i'll go with the literal Pair syntax | ||
masak | nod | 18:00 | |
rakudo: sub foo(*%p) { say %p.perl }; foo(a => 'b', a => 'c') | |||
p6eval | rakudo a93dcb: OUTPUT«duplicate named argument in call in main program body at line 2:/tmp/ebJMPKp82_» | ||
masak submits rakudobug | |||
rakudo: sub foo(*%p) { say %p.perl }; my %h = a => 'b'; foo(|%h, a => 'c') | 18:01 | ||
p6eval | rakudo a93dcb: OUTPUT«duplicate named argument in call in main program body at line 22:/tmp/N6sXSOf5hR» | ||
rhebus | i literally can't see the difference between mine and yours there | ||
pmichaud | the potential problem with slurping things into a hash is that ordering gets lost | ||
masak | rhebus: so here's the thing about function calls and whitespace. | ||
rhebus | in my case, ordering doesn't really matter | 18:02 | |
masak | rhebus: 'foo(' and 'foo (' mean different things | ||
rhebus | masak: :O | ||
Ö | |||
pmichaud | the other way to avoid named parameters is to use an extra level of parens around the entire list | ||
masak | rhebus: general theme through all of Perl 6. | ||
pmichaud | foo(a=>1, b=>2) # named arguments | ||
masak | rhebus: they snuck a little whitespace significance in there... :) | ||
pmichaud | foo((a=>1, b=>2)) # list of pairs | ||
masak | right and 'foo (' means the latter. | 18:03 | |
18:03
envi^home left
|
|||
rhebus | hmm, my list of things i don't quite like about perl 6 is growing :( | 18:04 | |
it's got past the honeymoon period | |||
masak | :) | ||
rhebus: I might be able to argue that that particular significant whitespace thing is part of the whole two-terms-in-a-row reasoning. | 18:05 | ||
pmichaud | I've not been happy about the a=>1 named/pair dichotomy either, but so far the cures aren't much better than the disease. | ||
masak | and two-terms-in-a-row is the whole *key* to understanding Perl 6 parsing. | ||
rhebus | two-terms-in-a-row? | ||
masak | pmichaud: agreed. | ||
rhebus: ok, so here's the thing about terms and operators. | |||
rhebus: to a first approximation, code looks like this: term op term op term | |||
rhebus | with you so far | 18:06 | |
masak | that's with infix operators; prefixes and postfixes work a little different. but not much. | ||
sorear | TTIAR has been in Perl since 1.0 | ||
masak | if you find, term term or op op, it means something special is happening. | ||
sorear | I'm not sure what significant whitespace has to do with it | ||
masak | for example that something is wrong. | ||
sorear: I'm building up to it. | 18:07 | ||
at some point in the evolution of Perl 6, it was decided that postfix operators really can't have any whitespace before them. | |||
because then they're suddenly ambiguous with infix operators. | 18:08 | ||
so nowadays, the '+' in 'foo+' is a postifx operator if such an operator is defined in the current scope. | |||
only otherwise it's an infix operator. | |||
18:08
patspam joined
|
|||
pmichaud | or prefix operator | 18:09 | |
since prefix also occurs in "op" position. | |||
oh, wait | |||
masak | no. | ||
pmichaud | in term position | ||
never mind. | |||
masak | please ignore pmichaud :) | ||
pmichaud | no, don't ignore me entirely | ||
because foo + bar is not an infix | |||
masak | it's not? | ||
pmichaud | it's foo( + bar() ) | 18:10 | |
masak | oh, sorry. I didn't mean 'foo' as a listop. | ||
I shoulda said $foo | |||
pmichaud | right | ||
masak | thanks. | ||
rhebus | this is really helping | ||
masak | anyway... | ||
pmichaud | listops are also a place where we run into ambiguity | ||
masak | postcircumfixes ( () [] <> etc ) are a kind of postfix. | ||
well, not really, but it helps if they follow similar rules. | 18:11 | ||
pmichaud | i.e., listops tends ot be "term term" | ||
*tend to | |||
masak | listops basically reset the term/op clocking function. | ||
anyway... | |||
pmichaud | and what turns something into a listop is a space. | ||
masak | now you see 'foo(' is really just a postcircumfix function call. | ||
sorear | what matters isn't "term term", it's that the parser almost always knows whether the next token is going to be an infex or a term | ||
in Perl 1-5, this was a literal boolean flag in the lexer | 18:12 | ||
masak | and 'foo (' is a listop followed by a term which happens to be a parenthetical group. | ||
pmichaud | and it's the *space* that causes the listop | ||
masak | well 'foo;' is a listop too | ||
pmichaud | okay, space or terminator :) | 18:13 | |
rhebus | oh! so, for example, say (1) + 2 is actually say 1 + 2 == say(1 + 2) | ||
masak | aye. | ||
rhebus++ # gets it | |||
rhebus: thus we avoid the awkward misparsings of Perl 5. | |||
pmichaud | we just get new awkward misparsings :) | ||
masak | where say (1) + 2 puts '+ 2' in void context. | ||
pmichaud: but honestly, I find Perl 6's way of parsing function calls so much nicer. | 18:14 | ||
pmichaud | I do too. | ||
very much so. | |||
rhebus | masak: what? surely say(1) + 2? | ||
pmichaud | I'm just saying it's not completely resolved in Perl 6 :-) | ||
masak | rhebus: no, not in Perl 5. | 18:15 | |
pmichaud | because "foo + 3" is a listop (assuming foo is a sub), but "pi + 3" is an equation. | ||
masak | rhebus: in Perl 5, the space doesn't matter. | ||
rhebus | masak: ah, hadn't got perl 5 context | ||
masak | sorry, might not have been clear on that. | ||
rhebus | you need an operator for that | ||
masak++ # slow and patient explanation | 18:16 | ||
pmichaud | rakudo: say pi + 3; say abs + 3; | ||
masak | pmichaud: a lint tool might help there, too. | ||
p6eval | rakudo a93dcb: OUTPUT«6.141592653589793» | ||
masak | rhebus: I was curious whether I would be able to connect the dots :) | ||
flussence | I have to admit, whitespace after a sub is easier to remember than "put unary plus here, depending on whether the author wrote sub($) or not" | ||
rhebus | does one define a nullary function in the same way as in perl 5? ie sub foo () { } | ||
pmichaud | rhebus: sub term:<foo>() { ... } # iirc | 18:17 | |
rhebus | pmichaud: thankie | ||
pmichaud | for simple constants, it's just constant xyz = ... | ||
masak | right. because subs are always listops, even if they take no parameters. | ||
pmichaud | for example, 'self' is defined as a term. | 18:19 | |
rhebus | right | ||
tadzik | masak: github.com/tadzik/perl6-Module-Tools | 18:21 | |
seems to be working for me | |||
masak | tadzik: great! kudos. | ||
rhebus | right | 18:22 | |
off to last night of the proms <333 | |||
18:23
leprevost left
|
|||
masak | have the appropriate amount of fun! | 18:23 | |
tadzik | neutro seems to handle this | 18:24 | |
I'd say have even more :) | |||
masak .oO( inappropriate amounts of fun? ) | |||
tadzik | more than appropriate | ||
oh, btw masak | 18:26 | ||
pmichaud | afk, lunch | ||
tadzik | method test($project --> Result) -- what's that? | ||
masak | a return type...? | ||
tadzik | I don't know, that's why I'm asking :) | 18:27 | |
pmichaud | iir, it's a return constraint | ||
masak | right. | ||
basically, the method promises to return something that is or does Result, if it returns normally. | |||
I actually don't know how that interacts with &fail | 18:28 | ||
tadzik | hmm. my $command = "env PERL6LIB=`pwd`/lib prove -e 'perl6' -r t/"; | ||
can't it be just "env PERL6LIB=lib prove ..." ? | |||
18:28
synth left
|
|||
pmichaud | undefined types always match, likely. | 18:29 | |
(and Failure is undefined) | |||
really afk this time. | |||
masak | tadzik: it probably can. never thought of that. | 18:30 | |
tadzik | well, `pwd` is just . | ||
and `pwd`/bah is just ./bah, which is just bah | |||
at least I think so | |||
well, let's see if it works in Module::Test | 18:31 | ||
18:31
rhebus left
|
|||
tadzik | btw, why 'env' at the beginning | 18:32 | |
? | |||
18:35
leprevost joined
|
|||
masak | becuase people have told me to write it like that :) | 18:37 | |
tadzik | :) | ||
tadzik provoking people | |||
aaand, we have Module::Test | 18:38 | ||
masak | \o/ | 18:39 | |
sorear | I think it has more to do with tcsh | ||
masak | 'has' scoping is koan-level curious. | 18:41 | |
tadzik | star: eval 'use File::Find'; say $!.perl; eval 'use Not::Found'; say $!.perl | ||
p6eval | star 2010.07: OUTPUT«Anyundef» | ||
tadzik | hmm | ||
masak | it basically says 'put the variable/method/whatever on *instances*, only not really' | ||
18:42
Schwern joined,
rgrau_ left
|
|||
masak | for different levels of 'not really' :) | 18:42 | |
i.e. each instance has its own private attribute to a greater extent that it has its own method. | 18:43 | ||
serious dwimmery at work. | |||
18:50
Axius joined
18:51
wamba joined
18:52
M_o_C joined
18:55
Mowah_ joined,
Mowah_ left
18:59
Axius left,
Axius joined
19:02
Mowah left
19:03
Axius left
|
|||
tadzik | how do I recursively flatten a list? | 19:08 | |
if I can | |||
masak | rakudo: my @a = 1, 2, (3, 4, (5, 6, (7, 8))); say @a.perl | ||
p6eval | rakudo 085920: OUTPUT«[1, 2, 3, 4, 5, 6, 7, 8]» | ||
tadzik | well, an array then | 19:09 | |
masak | should have said array, then :) | ||
I don't know. I would write a sub, I think. | |||
19:12
wamba left
19:17
takadonet left,
Axius joined,
molaf joined
19:18
takadonet joined
|
|||
tadzik | how do I modify permissions from Perl 6 (do I?) | 19:20 | |
like chmod | |||
masak | S32/IO specs chmod. | 19:21 | |
rakudo: chmod | |||
p6eval | rakudo 085920: OUTPUT«Could not find sub &chmod in main program body at line 22:/tmp/29WkCvWp00» | ||
19:21
mberends left
19:22
timbunce left
|
|||
\xF0 | last I checked, lots of system functions don't exist yet | 19:22 | |
masak | that is so. | ||
19:23
takadonet left
|
|||
tadzik | github.com/tadzik/perl6-Module-Tool...98263ba4cc | 19:23 | |
any ideas why doesn't it always work as expected? Seems to sometimes compile some files anyway | 19:24 | ||
19:24
takadonet joined
|
|||
tadzik | . o O ( maybe I'll get myself some civilized gravatar ) | 19:25 | |
19:27
M_o_C left
19:28
timbunce joined
|
|||
moritz_ | jnthn++ # blog post | 19:30 | |
tadzik | oh, moritz_, was just thinking about you :) | ||
so I'm supposed to write some simple grammar example for the book>? | |||
based on the Q&A from advent calendar? | 19:31 | ||
moritz_ | that would be very welcome | ||
tadzik | will do | ||
I'll need to get myself an inkscape then :) | |||
moritz_ | re that commit, you don't even need the { } for interpolation | 19:32 | |
(but that's the line you deleted) | |||
tadzik | it used to by copypasted from somebody else's code I think | 19:33 | |
moritz_ | anyway, in what way doesn't it work as expected, sometimes? | 19:34 | |
tadzik | well, sometimes the difference in stat is obvious, but it still build stuff anyway | ||
(will paste some exapmle) | |||
ash_ | rakudo: sub f { 5 }; say "{f - 5}" # i found a bug, i haven't seen any tickets in the bug tracker like it, i don't think | 19:35 | |
p6eval | rakudo 085920: OUTPUT«Too many positional parameters passed; got 1 but expected 0 in 'f' at line 22:/tmp/GnQ4gv4xbg in main program body at line 22:/tmp/GnQ4gv4xbg» | ||
ash_ | actually tadzik++ found it | ||
tadzik | wklej.org/id/387765/ | ||
moritz_ | not a bug | ||
it's parsed as f(-5) | 19:36 | ||
ash_ | rakudo: sub f { 5 }; say "{f() - 5}" | ||
ah | |||
tadzik | oh | ||
p6eval | rakudo 085920: OUTPUT«0» | ||
moritz_ | but f doesn't expect a parameter | ||
ash_ | well, if thats how its supposed to work, then thats fine | ||
tadzik | If we had static dispatch... :P | ||
19:37
rainerschuster joined
|
|||
moritz_ | Perl 6 - still not able to read the programmer's mind | 19:38 | |
ash_ | Perl 6 - alpha version of skynet | 19:39 | |
tadzik | Perl 6 – prototype of Perl 7 | 19:40 | |
masak | Perl 6 - reasonable if you are | 19:41 | |
19:41
meppel joined
|
|||
masak ==> $bed | 19:41 | ||
tadzik | Perl 6 – fun as Haskell, but better | ||
19:41
masak left
19:43
Axius left
19:44
meppl left
19:45
Axius joined,
icwiener_ joined
19:46
meppel is now known as meppl
19:47
icwiener left,
icwiener_ left,
icwiener_ joined
|
|||
moritz_ | phenny: ask masak if he already applied some version of his enum patch, and if not, if I can do anything to speed it up or to help | 19:49 | |
phenny | moritz_: I'll pass that on when masak is around. | ||
19:50
Axius left
19:51
Axius joined
19:53
pjcj left
|
|||
ash_ | rakudo: say "{1 + 3 + 4}" | 19:55 | |
p6eval | rakudo 085920: OUTPUT«8» | ||
19:55
Axius left
19:56
Axius joined
|
|||
tylercurtis | rakudo: 1..5 ==> map * * 2 ==> my $foo; say $foo.perl; # curious | 19:56 | |
p6eval | rakudo 085920: OUTPUT«Method 'push' not found for invocant of class '' in main program body at line 22:/tmp/0HiSxB59nl» | ||
moritz_ | rakudo: 1..5 ==> map * * 2 ==> my @foo; say @foo.perl | 19:57 | |
p6eval | rakudo 085920: OUTPUT«[2, 4, 6, 8, 10]» | ||
moritz_ | tylercurtis: push doesn't autoviv yet | ||
though it should | |||
tylercurtis | moritz_: good to know. | ||
moritz_ | rakudo: my %h; %h<a>.push: 3 | 19:58 | |
same problem | |||
p6eval | rakudo 085920: OUTPUT«Method 'push' not found for invocant of class '' in main program body at line 22:/tmp/Svptg5GHeg» | ||
dalek | kudo: 8669d77 | Util++ | build/PARROT_REVISION: Bump PARROT_REVISION to include nwellnhof++ fix for non-ICU Parrots. Fixes RT#77778 part 2. |
||
20:00
qw3rty joined
|
|||
jnthn | "S06 explicitly allows passing the same named parameter several times." # Is that a hangover from the insanity over :@foo collecting up all the foo arguments? | 20:02 | |
jnthn votes to toss | 20:03 | ||
Either that or explicit "last one of the name wins" | |||
20:06
Schwern left
20:09
snearch joined
|
|||
tylercurtis | lazy ping: sorear; | 20:11 | |
flussence | S06 seems to say that already | 20:16 | |
at least for not-@ | 20:17 | ||
sorear | lazy? | 20:19 | |
20:21
molaf left,
araujo left
|
|||
moritz_ | rakudo: sub f { say callframe(1).line }; f | 20:24 | |
p6eval | rakudo 085920: OUTPUT«22» | ||
sorear | p6eval lies | ||
moritz_ | it just counts differently than you do | 20:25 | |
20:25
qw3rty left
20:26
timbunce left,
rainerschuster left
20:27
tadzik left,
tadzik1 joined,
tadzik1 is now known as tadzik,
ash_ left
|
|||
sorear | tylercurtis: ??? | 20:30 | |
20:30
Axius left
20:31
Ross left,
Ross joined
20:32
timbunce joined
20:34
icwiener_ left
20:35
takadonet left
20:36
tadzik left,
qw3rty joined,
takadonet joined
|
|||
qw3rty | hi... | 20:36 | |
"roles" support, is part of perl6 or parrotvm? | |||
sorear | yes | 20:37 | |
moritz_ | parrot has roles, but they are not enough for what Perl 6 needs | 20:38 | |
qw3rty | so, one can make a COBOL that runs on parrot and add "roles" to that COBOL? | ||
moritz_ | so rakudo doesn't use parrot roles to implement the Perl 6 roles | ||
yes | |||
but it wouldn't be COBOL anymore | |||
qw3rty | more like pabol or something like that | ||
but still sounds like a good experiment to do | |||
moritz_ doesn't know how 'COBOL' and 'good' go together in the same sentence | 20:39 | ||
qw3rty | hehe,, is good on the paycheck ;) | ||
some of my coleagues work in cobol | |||
they salaries are good, compared to, say, java developers | |||
sorear | supply and demand ;) | 20:40 | |
moritz_ | compensation for suffering, I guess | ||
20:41
synth joined
|
|||
qw3rty | i think a saw a test suite for cobol somewhere on the net... i have a proyect for these holidays now :) | 20:41 | |
anyway, thanks for your answers guys | 20:42 | ||
great job u are doing with perl6 | |||
even if not still out (i mean, production) i already had many interesting discussions online and in "real" life about some features | |||
well.. bye all! | 20:43 | ||
20:43
qw3rty left
20:44
araujo joined
20:52
patspam left
20:56
araujo left
|
|||
tylercurtis | sorear: sorry about the ping and disappear. I cargo-culted the CursorBase::_REDUCE and REDUCE methods from Niecza::Actions for Bennu, and I've noticed that only a certain number(around a dozen) of the "Action method ... not yet implemented" sorrys actually display. Should that be happening? Can I make it display all of the sorrys? | 20:56 | |
sorear | tylercurtis: take a look at STD.pm6 line 6028 | 20:57 | |
also the corresponding line in STD.pmc | 20:58 | ||
21:00
rainerschuster joined
21:01
araujo joined,
tom_tsuruhara joined,
araujo left
|
|||
tylercurtis | sorear: thanks. | 21:02 | |
21:02
jaldhar left
|
|||
moritz_ | rakudo: say { 1 Z=> True xx * }.perl | 21:09 | |
p6eval | rakudo 8669d7: OUTPUT«{ ... }» | ||
moritz_ | rakudo: class A::B { has $.x = 3 }; say A::B.new(x => 1).perl | 21:13 | |
p6eval | rakudo 8669d7: OUTPUT«A;B.new(x => 1)» | ||
moritz_ submits rakudobug | |||
colomon | A;B is the bug? | 21:18 | |
moritz_ | yes | ||
21:18
jaldhar joined,
patrickas joined
|
|||
colomon | moritz_++ | 21:19 | |
patrickas | rakudo: say 1..* ... 5; | ||
p6eval | rakudo 8669d7: OUTPUT«12345» | ||
patrickas | moritz_++ indeed! | ||
colomon | patrickas++ | ||
that's what I should be doing while I watch the football game -- adding series tests. | |||
21:20
jaldhar left
|
|||
patrickas | moritz_ I am reading the comments on github, indeex that tests should have been removed, I had forgotten to push it! | 21:20 | |
indeex! That's a new one! | 21:21 | ||
moritz_ kinda loves the Xxx operator | 21:22 | ||
patrickas | colomon: I am sure you'll find some new edge case I hadn't thought about and manage to send me back to the drawing board :-) | ||
moritz_ | rakudo: say 1..3 Xxx 3 | ||
p6eval | rakudo 8669d7: OUTPUT«111222333» | ||
patrickas | Oh yea, that's the nsfw operator! | ||
colomon | rakudo: say 1..3 Xxx 1..3 | 21:23 | |
p6eval | rakudo 8669d7: OUTPUT«111111222222333333» | ||
colomon | rakudo: say (1..3 Xxx 1..3).perl | 21:24 | |
p6eval | rakudo 8669d7: OUTPUT«((1), (1, 1), (1, 1, 1), (2), (2, 2), (2, 2, 2), (3), (3, 3), (3, 3, 3))» | ||
21:24
pjcj joined
|
|||
moritz_ | that usage is interesting too, bu I haven't felt the need in real world code yet | 21:25 | |
colomon | patrickas: given the scope of series, it's pretty inevitable. :) | ||
moritz_ | nopaste.snit.ch/23302 :-) | 21:26 | |
21:28
araujo joined
21:29
jaldhar joined
21:30
jaldhar left,
jaldhar joined,
snearch left,
guidjos joined
21:32
guidjos left,
guidjos joined
21:34
guidjos left
21:35
Guest23195 left
|
|||
colomon | patrickas: have you checked in all your changes to the series tests? (/me moving very slowly) | 21:35 | |
Util_ | To handle spectests like S19-command-line/dash-e.t, which contains a mix of Unicode and non-Unicode tests, | 21:38 | |
I plan to split the Unicode tests out into a separate .t (dash-e-unicode.t), then condition it with '# icu' in spectest.data. | |||
Compared to just marking the original file as '# icu', this will allow more testing to run on non-ICU systems. | |||
Objections? Have I missed anything? | |||
21:41
Mowah joined
|
|||
moritz_ | Util_: it might be better to have one command-line-unicode.t file somewhere | 21:41 | |
Util_: instead of having two files for each option | |||
Util_ | moritz_: I see. I would add comments to each block of tests in command-line-unicode.t, pointing to the .t that would normally be their home. | 21:43 | |
moritz_ | Util_: +^ | ||
+1 | |||
moritz_ should really sleep | |||
sorear | why can't we just depend on ICU? | 21:45 | |
We already depend on Parrot, which is much bigger and doubtless harder to compile | |||
pmichaud | our use of ICU depends on Parrot's use of ICU. | 21:46 | |
and at one time (although this may no longer be true), getting ICU to work with Parrot was a Real Pain on windows environments. | |||
jnthn | ICU used to be bundled in with Parrot and built with it. | ||
It was a lot of effort to get that to fly on Windows. | |||
pmichaud | ICU is still built with Parrot. | ||
jnthn | I got it to work. | ||
pmichaud: Used to be in the repo. | |||
pmichaud | (although it's not bundled with it) | 21:47 | |
Util_ | sorear: I expect that on Christmas, we might start requiring ICU. Until then, no-ICU required means more testers come to our parties! | ||
jnthn | Anyway, yes, last time I tried to build a Parrot on Windows with ICU support, I didn't manage to get it to work. | ||
patrickas | colomon: sorry I was afk, yes I think moritz_++ pulled everythin I had | ||
pmichaud | anyway, requiring ICU significantly increases the steps needed from Windows users, and that goes against our larger goal of increasing Perl 6 usage. | 21:48 | |
patrickas | rakudo: say 1 ... *>5 | ||
p6eval | rakudo 8669d7: OUTPUT«123456» | ||
pmichaud | \o/ | ||
patrickas | yes that's the alst case I worked on | 21:49 | |
jnthn | Nice | ||
21:49
Ross left
|
|||
jnthn | rakudo: say 1 ... *>* | 21:49 | |
p6eval | rakudo 8669d7: ( no output ) | ||
jnthn | :-) | ||
sorear | Util_: we can't just hide a copy of ICU in src/dynops? | 21:50 | |
*src/ops | |||
patrickas | jnthn what was that supposed to do ? | 21:51 | |
jnthn | patrickas: Be infinite. | ||
patrickas: Wanted to check it didn't blow up with arity 2 closures | |||
(on the RHS) | |||
patrickas | jnthn: the RHS closure taking two items was working yesterday but after talking to TimToady and colomon I specifically made it only work for arity 1 | 21:52 | |
pmichaud | I don't understand why dash-e.t requires unicode, btw. | ||
oh, nm. | |||
I'm thinking of something *totally* different. | |||
yes, it needs it because of the \c[...] | |||
jnthn | patrickas: Oh...so what did it do above? | ||
Util_ | pmichaud: RT#77778 | ||
patrickas | no idea! kinda confused me! | 21:53 | |
jnthn | rakudo: say 1 ... *>*; say "alive" | ||
p6eval | rakudo 8669d7: OUTPUT«alive» | ||
Util_ | sorear: Do you mean a pre-compiled library, or the ICU source? | ||
patrickas | rakudo: 1,2 .... {$^a+$^b > 5} | ||
jnthn | oh, it makes an empty list and fails silently. | ||
p6eval | rakudo 8669d7: OUTPUT«===SORRY!===Confused at line 22, near "1,2 .... {"» | ||
patrickas | rakudo: say 1,2 .... {; $^a+$^b > 5} | 21:54 | |
p6eval | rakudo 8669d7: OUTPUT«===SORRY!===Confused at line 22, near "say 1,2 .."» | ||
pmichaud | why four dots? | ||
jnthn | four dots? | ||
patrickas | rakudo: say 1,2 ... {; $^a+$^b > 5} | ||
p6eval | rakudo 8669d7: ( no output ) | ||
pmichaud | Util_: right, those are due to the lack of ICU -- I agree. | ||
jnthn | Hmm, if it's not meant to work, maybe silent failure is LTA. | ||
pmichaud | rakudo: say 2 ~~ { $^a + $^b > 5 } | 21:55 | |
p6eval | rakudo 8669d7: OUTPUT«Not enough positional parameters passed; got 1 but expected 2 in <anon> at line 2:/tmp/N8P9Onzuge in 'Block::ACCEPTS' at line 5799:CORE.setting in main program body at line 22:/tmp/N8P9Onzuge» | ||
pmichaud | rakudo: say ({ $^a + $^b > 5 }).ACCEPTS(2) | 21:56 | |
p6eval | rakudo 8669d7: OUTPUT«Not enough positional parameters passed; got 1 but expected 2 in <anon> at line 2:/tmp/xhFVrhlvK1 in 'Block::ACCEPTS' at line 5799:CORE.setting in main program body at line 22:/tmp/xhFVrhlvK1» | ||
pmichaud | that's what I'd expect. | ||
jnthn | aye | ||
21:56
Kodi joined
|
|||
patrickas | brb | 21:57 | |
Kodi | So I'm taking a shot at implementing implementation types, at least for hashes. And by that I mean I'm trying to get 'my %h is MyClass' to work. We should allow 'my %h is Set', although Sets are immutable and have boring values, right? | 21:58 | |
patrickas | rakudo: my $limit={;*>*}; say $limit.count | 21:59 | |
p6eval | rakudo 8669d7: OUTPUT«1» | ||
sorear | Util_: The source. | 22:00 | |
patrickas | rakudo: my $limit= ->$a,$b {$a+$b}; say $limit.count | ||
p6eval | rakudo 8669d7: OUTPUT«2» | ||
patrickas | rakudo: say 1,2 ... ->$a,$b {; $a+$b > 5} | ||
p6eval | rakudo 8669d7: ( no output ) | ||
patrickas | Does this mean anythig? or was i just typing random stuff under influence ? | 22:01 | |
github.com/rakudo/rakudo/commit/927...013#L0R410 | |||
Util_ | sorear: Parrot used to do that, keeping the whole ICU source in the repo. I think it is a bad practice for any project that we another project wants to include, but it *can* be done. | 22:02 | |
I certainly support Rakudo Star packagers providing ICU in their binary packages, though. | 22:03 | ||
patrickas | rakudo: fail('foo') | 22:04 | |
p6eval | rakudo 8669d7: ( no output ) | ||
patrickas | oh it's just not priting the failure message! | ||
locally | |||
> say 1,2 ... ->$a,$b {$a+$b > 5} | 22:05 | ||
===SORRY!===\nLimit arity cannot be larger than 1 | |||
22:07
ash_ joined
|
|||
dalek | kudo: 9734b29 | chromatic++ | src/pmc/objectref_pmc.template: [PMC] Made ObjectRef's mark() more accurate. |
22:07 | |
22:09
dalek left
|
|||
sorear | Util_: I'm not convinced it's bad myself... a little amusing, but submodules take most of the pain out | 22:09 | |
22:09
dalek joined,
ChanServ sets mode: +v dalek
22:12
rainerschuster left
|
|||
Util_ | me is afk for 3 hours; will commit the unicode split on my return. | 22:14 | |
s/me/\/me/ | 22:15 | ||
22:17
araujo left
|
|||
patrickas | is fail the right way to handle such a case ? | 22:19 | |
colomon | yes seems like a reasonable answer to me... | 22:20 | |
patrickas | how do i get p6eval to display the fail emssage ? | 22:25 | |
rakudo: try { fail 'foo'; CATCH { say "$!" } } | |||
p6eval | rakudo 8669d7: ( no output ) | ||
22:28
M_o_C joined
|
|||
lue | rakudo: grammar A { token B { <alpha>+ } }; say "hello" ~~ A.B | 22:30 | |
p6eval | rakudo 8669d7: OUTPUT«Type objects are abstract and have no attributes, but you tried to access &!regex in 'A::B' at line 22:/tmp/hIhidxIVgI in main program body at line 22:/tmp/hIhidxIVgI» | 22:31 | |
lue | rakudo: grammar A { token B { <alpha>+ } }; say "hello" ~~ A::B | ||
p6eval | rakudo 8669d7: OUTPUT«Can not find sub A::B in main program body at line 1» | ||
lue | .oO(so close) |
22:32 | |
patrickas | jnthn: btw TimToady prefered to remove the arity > 1 on the limit (even thought it was working) because it is rarely used and there is another way to achieve it if you really want to | 22:34 | |
rakudo: say 1,1,-> $a,$b { last if $a+$b>100 ;$a+$b;} ... * | |||
p6eval | rakudo 8669d7: OUTPUT«1123581321345589» | 22:35 | |
patrickas | I don't really like it but at least it's there | ||
pmichaud | 22:03 <Util_> I certainly support Rakudo Star packagers providing ICU in their binary packages, though. | 22:36 | |
+1, I would agree to that. | |||
(especially on the windows side, if it can be done relatively painlessly) | |||
lue | Is there another way to get token B of grammar A besides /<A::B>/ ? | ||
pmichaud | I wonder if <&A::B> works | 22:37 | |
well, no, not exactly. | |||
because it also has to change the type of the underlying cursor. | |||
22:38
hudnix left
|
|||
lue | I think using A.B [like I did above] should work, by `translating' A.B to the regex (in this case /<alpha>+/). | 22:39 | |
rakudo: grammar A { token B { <alpha>+ } }; say "hello" ~~ /{A.B}/ | 22:40 | ||
pmichaud | lue: it doesn't quite work that way. | ||
p6eval | rakudo 8669d7: OUTPUT«Type objects are abstract and have no attributes, but you tried to access &!regex in 'A::B' at line 22:/tmp/4rC3qkMnZ3 in <anon> at line 22:/tmp/4rC3qkMnZ3 in 'Cool::match' at line 2416:CORE.setting in 'Regex::ACCEPTS' at line 5840:CORE.setting in main program body | ||
..at lin… | |||
pmichaud | what if token B uses another subrule defined in A? | ||
lue | aah. | ||
tylercurtis | Or even if it recurses. | 22:42 | |
pmichaud | afk for a while | 22:45 | |
22:46
hatseflats left,
hatseflats joined,
mjk joined
22:47
mberends joined
|
|||
lue | rakudo: say "hello" ~~ a.B | 22:52 | |
p6eval | rakudo 8669d7: OUTPUT«Could not find sub &a in main program body at line 22:/tmp/PjeUhGmNUx» | ||
22:55
xinming_ joined,
timbunce left
22:56
araujo joined
22:57
kjeldahl_ left
22:59
xinming left
|
|||
lue | rakudo: regex A { '(' ~ ')' 'ab' }; say 'x(ab' !~~ /<A>/; | 23:01 | |
p6eval | rakudo 9734b2: OUTPUT«Useless declaration of has-scoped regex in a module; add our or my to install it in the lexpad or namespaceMethod 'A' not found for invocant of class 'Cursor' in <anon> at line 22:/tmp/INaopm8zX9 in 'Cool::match' at line 2416:CORE.setting in 'Regex::ACCEPTS' at line | ||
..5840:COR… | |||
lue | Has the spec changed since #62086 concerning 'has-scoped regexes'? | 23:02 | |
23:10
Kodi left
23:13
exodist_ is now known as Exodist
23:23
patrickas left
23:24
shelling_lab joined
23:26
M_o_C left
23:27
gottreu joined
23:31
saaki joined
23:33
shelling_lab left,
shelling_lab joined
23:35
saaki left
23:36
saaki joined
23:37
araujo left,
patspam joined
23:42
Mowah left
23:46
leprevost left
23:47
shelling_lab left
23:48
mjk left,
hudnix joined
23:50
mfollett joined
23:51
mfollett left
23:53
shelling_lab joined
|