»ö« | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, alpha:, pugs:, std:, or /msg p6eval perl6: ... | irclog: irc.pugscode.org/ | UTF-8 is our friend! Set by moritz_ on 25 June 2010. |
|||
Tene | "Some of it's still broken, and a lot of it isn't done yet, but this is something that you can see, and try, and maybe use for some things. We use it ourselves, and want to share both the ideas and the product. We hope you like it, and hope you'll submit bug reports." | 00:01 | |
That's what I see it as. | |||
masak | Tene++ | ||
masak heads bedwards | |||
00:02
masak left
|
|||
lue | goodnight masak o/ | 00:02 | |
E1SECONDLATE | |||
pmichaud | what are we using it for? | ||
what are the key ideas that we think are particularly worth sharing? | |||
lue | We code rakudo with it :) | ||
$_ = P6 of course | |||
pmichaud | yes, but what would we share with people who want to use p6, as opposed to create an implementation of p6? ;-) | 00:03 | |
lue | well, everything in proto/pls , for starters.. | ||
00:03
masonkramer joined
|
|||
pmichaud | no, I mean as far as features go. | 00:04 | |
what do we think would entice people to take a look at Rakudo Star? | |||
or at least make them say "oh, that's really cool. I should take a look someday." | |||
TimToady | p5 people, or normal people? | ||
pmichaud | normal, in this case | ||
lue *thinking* | |||
pmichaud | well, open-source leaning people if nothing else :) | 00:05 | |
Tene | ARGV -> signature on MAIN -> usage statement | ||
makes for nice little things on the command line | |||
lue | Well, meta/hyper/reductions ops [come on brain, more] | ||
pmichaud | grammars and parsing, obviously. | ||
Tene | Hm, 'sec, lemme ask my interested-but-not-yet-using friends. | ||
diakopter | everyone (Perl and non-Perl folks) will of course demand to know when a "stable release" is expected, and as usual an unqualified "patches welcome" response will raise hackles and spark derision; I recommend addressing that question, and carefully. | ||
pmichaud | diakopter: sure, I'm addressing that. got lots of stuff on that question. | 00:06 | |
diakopter | oh | ||
pmichaud | diakopter: but even after I address that question, there's still the question of "why is it important?" | ||
Juerd | "When it's ready" and "patches welcome" are good ways to get rid of your audience, possibly for good, indeed. | ||
pmichaud | Rakudo Star is all about saying "it's ready for some people". | 00:07 | |
and also "still needs work" | |||
but that's not the part I'm struggling with. | |||
(or just now addressing) | |||
to a larger audience, the question is "what should Perl 6 (and Rakudo Star) mean to me?" | |||
diakopter | how does it fit into the ecosystem of PLs | ||
pmichaud | yes, some people will see "not stable" and say "okay, not for me." That's fine. | ||
diakopter | so you need a PL framework or category system in which to place it | 00:08 | |
pmichaud | diakopter: just need to be able to describe it in terms of something they're already likely to know | ||
Juerd | pmichaud: The future of multiparadigm programming, in an actually usable state. This piece of software is going to the next language all the other languages are going to steal from :) | ||
pmichaud | Juerd: that's a good meme. | ||
lue | a lot of code is greatly reduced to one line due to the insane number of operators. | ||
Juerd | So if you value your job or hobby, you will *need* to know about Perl 6. | 00:09 | |
Tene | The metamodel is pretty great. OO in Perl 6 is very nice. | ||
Juerd | Given the pace of open source development, waiting until a stable release is out means you'll be having waited too long. | ||
TimToady | "Everything you liked about your other languages except for the bad parts." :) | 00:10 | |
pmichaud | "A language with completely new bad parts." :-P | ||
Juerd | TimToady: People do tend to like the bad parts though :) | ||
pmichaud | scnr | ||
if others come up with ideas, just post them to the channel | 00:11 | ||
I think I'll try to draft something tonight that we can react to and edit | |||
Juerd | pmichaud: Frankly, perhaps the best way to convince people nowadays might be "because you can" | 00:12 | |
00:12
lestrrat is now known as lest_away
|
|||
Tene | I expect that grammar and OO stuff is going to be the most-visible. | 00:13 | |
pmichaud | and strong typing | ||
Juerd | At 600 CPM my typing is already pretty strong :) | ||
pmichaud | Juerd: it's even stronger in perl 6 :) | ||
Juerd | pmichaud: Wow, isn't that great! | ||
pmichaud | your 600 cpm go a lot farther in perl 6 :) | ||
diakopter | Perl 6: The densest Perl yet | 00:14 | |
TimToady | Perl 6, Almost a Black Hole. :) | ||
Juerd | "Everyone loves six" | ||
"We're open 42/7" | |||
pmichaud | TimToady: I'm sure you've been asked this question before, though -- what do you emphasize to people who ask "Why Perl 6?" Or does nobody dare to approach you with that question anymore? ;-) | ||
TimToady | "It'll take the other languages ten years to catch up, and then we'll be another hundred years ahead." :) | 00:15 | |
well... | |||
"because it's not there" except is almost is now | |||
lue | .oO(P6 will been stolen from. We know, we went to future with it.) |
00:16 | |
Juerd | Heh | ||
lue can't wait for the day for Rakudo to run itself :) | 00:17 | ||
diakopter | er | ||
Tene | lue: looked at yapsi? | ||
sorear | (people LIKE the Perl 6 metamodel?!) | ||
lue | yes I have. I'm talking about doing something like perl6 perl6.pl6 :) | 00:18 | |
jnthn | lue: Same. :-) | ||
lue: Some hacking to go before that though. ;-) | |||
lue | I type perl6, and it runs a shell script containing "perl6 perl6.pl6" | ||
pmichaud | sorear: I like the Perl 6 metamodel. A metamodel is good when you don't have to think about it to use it. | ||
lue | (Yes it's recursive, I'm waiting for quantum computing) | 00:19 | |
sorear | quantum computing doesn't help with recursion | ||
at all | |||
pmichaud | it's boxes with (dead|alive) cats, all the way down. | ||
lue | just kick the computer, and random events make it work! \o/ [so excited] | 00:20 | |
sorear | pmichaud: I come from Moose land, the metamodel there is far better | ||
jnthn | sorear: Don't confuse the current implementation with how it's eventually meant to be. | ||
lue | (R* is quantum computing ahead of schedule) | ||
TimToady | though I would be interested to see a list of Moose's betternesses | 00:22 | |
jnthn | Same. :-) | ||
Rakudo's meta-model guts are in for a significant, well, gutting, though. :-) | |||
lue | rakudo: my $a = 2; pir::setprop('rw',$a); pir::setprop('ro',$a); say "$a is OK!" | ||
p6eval | rakudo bbacb7: OUTPUT«===SORRY!===The opcode 'setprop_p_p' (setprop<2>) was not found. Check the type and number of the arguments» | ||
jnthn | pmichaud: s/strong typing/gradual typing/ | ||
pmichaud | setprop wants three arguments | 00:23 | |
00:23
dduncan joined
|
|||
jnthn | pmichaud: The combination of static and dynamic is the win here, with specifying more static stuff giving you more wins. | 00:23 | |
(on performance and checking) | |||
but the dynamicness letting you just hack stuff up | |||
pmichaud | jnthn: +1 | 00:24 | |
jnthn | I guess in a sense, Perl 6 gives you a language you can prototype in, and then easily refactor towards production code, with potential to be safe and fast. | ||
TimToady | you can scale from quick hack to enterprise without hitting a brick wall | ||
lue | rakudo: my $a = 2; pir::setprop($a,'rw',1); pir::setprop($a,'ro',1); say "$a is OK!" | ||
p6eval | rakudo bbacb7: OUTPUT«===SORRY!===The opcode 'setprop_p_p_p' (setprop<3>) was not found. Check the type and number of the arguments» | ||
pmichaud | +1 | ||
jnthn | Also, Perl 6 re-visits a lot of assumptions that other languages have just taken for granted. | ||
lue | such as? | 00:25 | |
pmichaud | also, Perl 6 is designed to be future-compatible | ||
jnthn | "Why can't I just write if $foo == 1 | 2 { ... }?" In Perl 6, you can. | ||
pmichaud | or even better | ||
"Why can't I just write if 1 < $foo < 2 { ... }" | |||
TimToady | such as "Obviously if I wanted a parser I'd use a parser generator like yacc" | ||
jnthn | That also. | ||
lue | (Perl6: Do whatever the hell you want.) | ||
pmichaud | we even have coded the notion of "whatever" :-P | 00:26 | |
lue | we also feature more pronouns than any spoken language :) | ||
TimToady | such as, obviously the catch blocks go after the block in question | 00:27 | |
00:27
isBEKaml left
|
|||
TimToady | such as, there is only one dispatcher | 00:27 | |
00:27
eternaleye_ left
|
|||
jnthn | I find the combination of signatures and functional-style pattern matching quite exciting too | 00:28 | |
lue | afk | ||
pmichaud | multidispatch. | ||
TimToady | such as, assuming that types are only good for strong typing | 00:29 | |
jnthn | In many senses, in Perl 6 I find myself writing heavily multi-paradigm code without actually realizing I'm writing multi-paradigm code. | ||
Because they feel like a coherent whole rather than just a bunch of features. | |||
sorear | one thing that I still haven't totally figured out how to do in Perl 6 is unboxing | ||
you might annotate all your functions as working on Int, but that's not enough information to use native types, because someone might subclass Int | 00:30 | ||
jnthn | Int is not a native type though | ||
sorear | (also, our types have 2^N + 1 values) | ||
no. it's not. | |||
replacing non-native types with native ones is one of the most important optimizations in HLL compilers | 00:31 | ||
00:31
eternaleye joined
|
|||
sorear | what should this do? | 00:31 | |
(more) | |||
sub a { my class B { }; my &c = BEGIN sub { for ^4 -> $d { augment class B { method e { $d }; }; }; }; my $f = B.new; c(); say $f.e }; a; | 00:33 | ||
00:40
eternaleye_ joined,
eternaleye left
00:45
simcop2387 left
00:46
skids joined
|
|||
jnthn | sorear: I'm not sure what the BEGIN really changes in that. | 00:46 | |
(in that we don't run the sub until runtime anyway) | 00:47 | ||
(and iiuc the augment takes place a BEGIN time or so with or without it.) | 00:48 | ||
Tene | jnthn: how does augment take place at BEGIN time if the sub isn't run intil the end? | 00:49 | |
c(); | |||
jnthn | Tene: Same way that sub foo { class A { } } results in class A existing even if foo never gets run | 00:50 | |
Tene | ah | ||
jnthn | iiuc what TimToady mentioned the other day, my classes are no different from our ones, other than they get installed in the lexpad. | 00:51 | |
And not in the package | |||
It'd just be anonymous classes that are interesting. | |||
Tene | nodnod | ||
jnthn needs sleep | 00:53 | ||
night o/ | |||
sorear | putting BEGIN on a sub prevents it from being cloned | 00:54 | |
00:54
lkk- joined
00:58
simcop2387 joined
01:04
lest_away is now known as lestrrat
01:06
ashleydev joined
01:07
eternaleye_ left
|
|||
lichtkind | good night | 01:15 | |
01:15
lichtkind left,
elmex_ joined
01:16
elmex left,
elmex_ is now known as elmex
01:29
masonkramer left
|
|||
pmichaud | hugme tweet rakudoperl Rakudo now has autovivifying arrays and hashes | 01:45 | |
ENOHUGS | 01:46 | ||
01:49
eternaleye joined
01:50
lkk- left
01:54
kid51 joined
02:00
buubot joined
|
|||
lue hugs pmichaud manually | 02:04 | ||
02:05
Chillance left,
buu joined
|
|||
lue | I'm wondering, | 02:06 | |
> my @a = 1,2,3; @a[3..5] := @a[0..2]; say @a.perl | |||
[1, 2, 3] | |||
is this a binding error or a slicing error? | |||
pmichaud | I doubte that you've implement list binding. :-) | 02:07 | |
also, note that @a[3..5] is Nil. | |||
Also, I doubt there's a list-binding operator. | 02:09 | ||
(I could be mistaken on this last point.) | |||
lue | if := doesn't do it already, it should (maybe invent a :::= if neede :D) | 02:10 | |
ooh! let's see if this works... | |||
> my @a = 1,2,3; [:=] @a[3..5], @a[0..2]; say @.perl | 02:11 | ||
Lexical 'self' not found | |||
pmichaud | rakudo: say [+] [1,2,3] | ||
p6eval | rakudo 55acd1: OUTPUT«3» | ||
pmichaud | rakudo: say [!=] 1 | 02:12 | |
p6eval | rakudo 55acd1: OUTPUT«1» | ||
lue | well, assign.pir checks for nil assignment, maybe := should check for nil binding? | ||
pmichaud | assign.pir checks for nil being assigned as a value to a target | 02:13 | |
in @a[3..5] above, Nil *is* the target. | |||
lue | ah, well, nvm then :) | ||
pmichaud | (and rakudo doesn't implement it correctly yet anyway) | ||
lue | rakudo: my @a = 1,2,3; say @a[3..5].WHAT | ||
p6eval | rakudo 55acd1: OUTPUT«Parcel()» | 02:14 | |
lue | rakudo: my @a = 1,2,3; say @a[3..5] | ||
p6eval | rakudo 55acd1: OUTPUT«Any()Any()Any()» | ||
lue | What interests me is that binding to Nil doesn't die, but it doesn't work either. | 02:15 | |
pmichaud | I did just say that Rakudo doesn't handle it correctly yet. | 02:16 | |
and by "doesn't work", I don't know what "does work" would mean. :-) | |||
lue | Ah. | ||
EAMBIGUOUSSPEC | 02:17 | ||
02:20
lkk- joined
|
|||
lue | Heh, when it comes to getting := to do what I want, it feels like dividing by 2. I keep getting closer to 0 each time, but never quite there :) | 02:22 | |
> my @a = 1,2,3; @a[$_+3] := @a[$_] for 0..2; say @a.perl | 02:23 | ||
[1, 2, 3, 1, 2, 3] | |||
not the best way, but it works. | |||
02:24
tylercurtis joined
02:25
sftp left
|
|||
lue | I get the feeling there's no easy way to deal with Nil being the target in binding right now ( esp. considering it doesn't work right :) ) | 02:28 | |
02:29
skids left,
duzy` joined
02:30
olgagirl joined
02:31
tedv joined
02:32
olgagirl left
02:35
agentzh joined
02:39
plobsing joined
02:44
sorear sets mode: +v buubot
|
|||
dalek | kudo: f8dde0a | pmichaud++ | docs/spectest-progress.csv: spectest-progress.csv update: 507 files, 33927 (84.4% of 40197) pass, 19 fail |
02:45 | |
sorear | oh | ||
apparently hugme is supposed to run on feather*2* | |||
sorear has root on feather1 | 02:46 | ||
sorear pokes moritz_ | |||
ok, I *do* have an account on feather2 | 02:47 | ||
but I don't seem to have a sudoers line | 02:48 | ||
02:57
lkk- left
02:58
ashleydev left
02:59
eternaleye left
03:15
ash_ left
03:21
kid51 left
03:22
eternaleye joined
03:38
skangas joined
03:39
eternaleye left
|
|||
dduncan | with all this talk about how Parrot is supposed to support one hosted language invoking another, are there any existing examples of this, where both languages are Parrot hosted and both languages existed before Parrot? | 03:41 | |
PerlJam | dduncan: you mean like calling ruby from perl or vice versa? | ||
dduncan | yes | ||
or to make this a little more on topic, any examples of Perl 6 code invoking code that is neither part of the Parrot toolkit (NQP, PIR, etc) nor is Perl 5? | 03:44 | ||
examples that run | |||
03:45
ashleydev joined
|
|||
PerlJam | Someone (jnthn?) had some examples like that at one point, but I don't know where they are right off. | 03:45 | |
dduncan | okay | ||
PerlJam | Ah ... this is what I was thinking of blogs.gurulabs.com/stephen/2009/05/...ading.html | 03:46 | |
Tene | That's me. | ||
PerlJam | yeah, sorry to confuse you with jnthn ;) | 03:47 | |
Tene | It did work in the past, and then things got changed out from under me twice, and I gave up on trying to keep it maintained. I hear that it's working to some degree again these days, but afaik none of the langauges other than rakudo support it anymore, if even rakudo does, so it's not really useful. | ||
PerlJam: Quite honored, actually. Maybe you should apologize to jnthn instead. :) | |||
PerlJam | heh | ||
dduncan | any thought as to whether a modern analogy might be working in time for Rakudo Star? ... specifically of Perl 6 calling other languages | 03:48 | |
[Coke] | I don't think that's on the short list. | 03:49 | |
Tene | dduncan: I expect it'll only happen if an HLL Interop Champion shows up to drive it. That was my job for quite a while, but I haven't been available in any reasonable way for quite a while. | 03:50 | |
[Coke] | (not that I'm someone who'd know. =-) | ||
Tene | It shouldn't be that much work for someone comfortable with parrot-hosted languages, but it's not going to happen unless someone who cares shows up to do the work and get the other languages in line, etc. | 03:51 | |
dduncan | well maybe I'll work on it then ... in a few months | ||
Tene | That'll be after the first release of rakudo start, but it would still be great to have someone working on it. :) | 03:52 | |
dduncan | since I'm creating a Parrot hosted language, I'd like to call it from Perl, and perhaps vice-versa | ||
Tene | I'd be more than glad to try to guide you through it. | ||
dduncan | thank you ... anyway, my schedule has it that I don't expect to start before October, but that isn't too far off | ||
Tene | If it turns out to be a pressing feature that needs work before then, that would probably mean that someone else now cares enough to work on it, so that's probably fine. | 03:53 | |
03:54
hejki joined
|
|||
dduncan | on a tangent, something I'm wanting to start working on in August is a test suite for my new language which is intended to be used to test multiple compilers of my language, and I'll be looking at the Perl 6 suite for guidance | 03:55 | |
Tene | Certainly not a bad place to look. | ||
dduncan | I also intend to be working on no fewer than 4 distinct implementations ... or maybe 3 ... one over Perl 5, one over Perl 6, one as a native Parrot hosted language, and one as a Postgres procedural language ... though probably the last 2 can be one and the same | 03:56 | |
so its useful to have a common test suite from day one | |||
the first 2 are expected to be easier as they'll just generate Perl code that does the same thing, and the Parrot one is expected to be the "real" one | 03:57 | ||
where I have to do more work myself | |||
similarly, I'd be following the Perl 6 example of making much of the language self-hosting, so I only have to do it once for all implementations, by default | 03:59 | ||
that is, mostly self-hosting | 04:00 | ||
04:03
ashleydev left
|
|||
dalek | ecza: af32687 | sorear++ | (4 files): Implement the possibility of metaobject cloning |
04:04 | |
ecza: 81429e4 | sorear++ | setting: Revise metaobject API for new guts |
|||
04:05
Guest99304 left
04:07
tedv left
04:23
quietfanatic joined
|
|||
quietfanatic | How much of Perl 6 grammars can I currently use in Rakudo? | 04:23 | |
because I'm getting some inexplicable syntax errors. | 04:24 | ||
Wait, no I see the error | 04:25 | ||
sorear | quite a lot of them - enough to parse Rakudo Perl 6 itself | 04:26 | |
dduncan | that's good | 04:28 | |
quietfanatic | Cool | ||
How do I parse a file with a grammar? | |||
I'm trying slurp($file) ~~ grammar_name | 04:29 | ||
but it's returning 0 | |||
tylercurtis | Grammar.parsefile(filename, :actions(Actions.new)) | ||
I think. | |||
quietfanatic | (where grammar_name contains a rule TOP {...}) | ||
That's a little...verbose | |||
but I'll try it. | |||
wait, it requires actions of some sort? | 04:30 | ||
sorear | no | ||
tylercurtis | No. | ||
sorear | named args are always optional | ||
(in standard functions) | |||
quietfanatic | so just parsefile, eh? I was hoping smartmatch would be smart enough for that | ||
sorear | a grammar is fundamentally a kind of class. slurp($file) ~~ grammar_name is an isa test | ||
also, grammars are intended for fairly complicated languages | 04:31 | ||
if your grammar is small enough that you care about saving ten characters, just use a regex | |||
quietfanatic | okay, I see. | 04:32 | |
That makes sense, actually. | |||
tylercurtis | Alternately, if you really want to use slurp, Grammar.parse(slurp($file)). That's probably what Grammar.parsefile does internally, anyway. | ||
TimToady | well, it also sets the filename for error messages | 04:33 | |
quietfanatic | Just putting the rules bare in the file gives a bunch of "useless declaration of has-scoped rule..." warnings | ||
and then can't find the rule. | |||
TimToady | grammar {...} | ||
quietfanatic | I guess I have to my them all. | ||
TimToady | grammar MyGrammar {...} | ||
just put them in a grammar declaration | 04:34 | ||
quietfanatic | So then I'll use a grammar after all. | ||
TimToady | hard to have methods without a class | ||
quietfanatic | It's not returning true even with a trivial rule. | 04:35 | |
rule TOP { ^ .* $ } | |||
TimToady | rakudo: grammar Foo { rule TOP { ^ .* $ } }; say Foo.parse("stuff").perl | 04:36 | |
p6eval | rakudo 55acd1: OUTPUT«Match.new( # WARNING: this is not working perl code # and for debugging purposes only from => 0, orig => "stuff", to => 5,)» | ||
TimToady | that matched | 04:37 | |
04:37
duzy`` joined
|
|||
quietfanatic | Well my file is not matching. | 04:38 | |
I've tried parsefile and parse(slurp()) | |||
PerlJam | quietfanatic: you can always nopaste the code and input | ||
04:39
duzy` left
|
|||
quietfanatic | Alright, let's see to that then... | 04:39 | |
TimToady | you're not trying to run it from the command line are you? | ||
quietfanatic | wait where's the nopaste? | ||
TimToady: Of course, why would that matter? | |||
TimToady | shell quoting and interpolation | 04:40 | |
quietfanatic | Oh, no, I misunderstood what you meant. | ||
My grammar is in a file. | |||
say slurp(@*ARGS[0]) works, but grammar.parse(slurp(@*ARGS[0])) does not. | 04:41 | ||
PerlJam | quietfanatic: I tend to use gist.github.com | ||
sorear | quietfanatic: rule TOP { ^ .* $ } is not going to match anything that starts with whitespace | 04:43 | |
TimToady | troo | ||
s/rule/token/ | |||
sorear | use "token" unless you actually want the spaces in your pattern to be taken semi-literally | 04:44 | |
quietfanatic | . doesn't match whitespace? | ||
sorear | " " matches \s* possessively | ||
TimToady | rules don't backtrack, and ^ won't match the beginning if the implicit <.ws> matched first | ||
sorear | "^", seeing that it's not at the beginning of the string, fails to match | ||
quietfanatic | Oh fooey | 04:45 | |
sorear | and drop the ^ and $. grammars, unlike naked regexes are always anchored | ||
quietfanatic | I see. | ||
Well, that fixes it. | 04:46 | ||
I do remember that 'rule' means sigspace, but I never figured out why 'rule' does and 'token' doesn't | |||
in terms of the word choice I mean. | |||
Why 'rule' for sigspace? | 04:47 | ||
TimToady | tokens are typically used to match small bits that exclude whitespace, and rules are typically used to call into subrules that want to marshall the matching of multiple "words" | ||
quietfanatic | I see, but | 04:48 | |
TimToady | of course, when you match something like an expression in parens, the parens are a token on the outside, but parse a rule on the inside | ||
quietfanatic | there are times when I want to disable sigspace in a regex, and then it looks odd having a token contain rules. | 04:49 | |
TimToady | happens all the time for any kind of circumfix | ||
quietfanatic | I just don't think the terminology matches the meaning well. | ||
The instance this time is matching a closing } with the same indentation as the opening { | 04:50 | ||
sorear | you are free to turn off sigspace in the middle of a rule | ||
quietfanatic | adding sigspace makes that not work. | ||
sorear | rakudo: say ("a b" ~~ rule { a b }) | 04:51 | |
p6eval | rakudo f8dde0: OUTPUT«a b» | ||
sorear | rakudo: say ("a b" ~~ rule { a:!s b }) | ||
p6eval | rakudo f8dde0: OUTPUT«» | ||
sorear | rakudo: say ("ab" ~~ rule { a:!s b }) | ||
p6eval | rakudo f8dde0: OUTPUT«ab» | ||
sorear | or simply | ||
rakudo: say ("a b" ~~ rule { ab }) | |||
p6eval | rakudo f8dde0: OUTPUT«» | ||
04:52
TiMBuS joined
|
|||
quietfanatic | I'll just stick with 'token | 04:52 | |
' | |||
tylercurtis | It matches it to some extent, because many programming languages' grammars care about exact whitespace in their tokens, but only care about some amount of whitespace or no whitespace in their rules. And the distinction is pretty simple to remember once you learn what they mean in the context of Perl 6. | ||
TimToady | that's fine, especially if you're gonna be fiddly with the whitespace | ||
sorear | although sometimes I miss the phase separation in p6 | 04:53 | |
quietfanatic | I can see that *usually* token means token and rule means rule | ||
but it bothers me that it's almost a literal meaning but actually is not at all. | |||
...that was worded weirdly | 04:54 | ||
I just don't like it that the terms don't mean exactly what they say they mean. | |||
TimToady | that's always a problem when you're dealing with concepts that don't map well onto the lexicon | 04:57 | |
quietfanatic | I don't know, everything else in Perl 6 is usually pretty self-explanatory in its naming. | 04:58 | |
tylercurtis | quietfanatic: No name is self-explanatory. A name can, at best, be self-explanatory with a certain background knowledge and in a certain context. Rule and token aren't quite self-explanatory to someone who knows what rules and tokens are in the context of grammars in general, but once you understand what they mean in the context of Perl 6, their association with the meaning of "rule" and "token" in general is a helpful mnemonic. | 05:09 | |
05:10
jaldhar left
|
|||
quietfanatic | That's a point, I suppose. | 05:13 | |
tylercurtis | comb is similar; it's not a standard function across many programming languages, but it's a simple name that's easy to remember and the thought of "combing through" something is a helpful mnemonic. | ||
Many of Perl 6's names for things are not things I find self-explanatory, but once I learn what they mean, they're easy to remember. | 05:15 | ||
quietfanatic | But comb doesn't obviously mean anything at first. | ||
token and rule, in informal usage mean a small thing and a large thing | |||
but in implementation they mean :!s and :s. | |||
which is not the same thing at all. | 05:16 | ||
TimToady | you're missing an important distinction | 05:18 | |
quietfanatic | So when I see the term token, I'll have to wonder whether they mean a small unit of parsing, or a regex without sigspace. | ||
sorear | I don't know where you come from, but here, in informal usage, a token is a small round metal thing representing a commodity | ||
quietfanatic | informal programmer usage, I mean. | 05:19 | |
TimToady | precisely *because* tokens don't have sigspace, they participate as alternatives in lexers, and hence are tokens in the usual (technical) sense | ||
leading whitespace tends to disqualify a rule from participating in a lexer | |||
sigspace is merely a means to an end | 05:20 | ||
or a not-end, in this case | |||
05:20
skangas left
|
|||
tylercurtis | Really, in languages in which whitespace only matters to separate tokens, rules and tokens mean exactly what they should mean for that language. | 05:20 | |
quietfanatic | Huh. I guess I must concede the point due to my head spinning too much. | ||
TimToady | even in English, the distinction between "word" and "phrase" is unclear | 05:21 | |
for instance, "the King of England's hat" | |||
the 's wants a word on its left, so 'the King of England' functions like one temporarily | 05:22 | ||
quietfanatic | What bothers me isn't the ambiguity in distinction, it's that there's two possible distinctions that aren't the same. | ||
TimToady | if things like that bother you, either you should or shouldn't be a language designer. :) | 05:23 | |
quietfanatic | Well, perl has always been a very interpretive language. | 05:24 | |
TimToady | most words in natural language are very imprecise at the best of times | ||
quietfanatic | But the words 'token' and 'rule' in Perl 6 are very precise. | ||
TimToady | yes, and they're just about the best words we could find that match the abstract concepts | 05:25 | |
quietfanatic | in their meaning, I mean. | ||
TimToady | and Perl 6 tends to emphasize the abstract meanings over the concrete | ||
quietfanatic | But their literal meaning isn't abstract in any way. | ||
TimToady | given/when vs switch/case | ||
huh? | |||
quietfanatic | one means sigspacem the other doesn't | ||
*, | |||
TimToady | that's its concrete meaning | 05:26 | |
but there are ramifications on the abstract level | |||
quietfanatic | whereas picking the terms 'token' and 'rule' overlays abstract meaning on it that I think is too confusing. | ||
I'm trying to think of something it's like... | 05:28 | ||
well my brain is not operating on analogy mode tonight. | 05:29 | ||
tylercurtis | I think TimToady is saying that when choosing a name for something, the pool from which you can draw(which mostly consists of natural language words, because no one would even have a clue what "figel Foo { zabez TOP { <statement> }; gix statement { 'bar' } }" meant without being told in advance, and they'd have difficulty remembering even then), consists of things with imprecise meanings that rarely correspond exactly to what you really mean. | ||
05:29
skangas joined
|
|||
tylercurtis | E.g., the mathematical concept of a function rarely coincides with the general meaning of the word, and neither is identical to most programming languages concepts of a function. | 05:30 | |
quietfanatic | tylercurtis: True. I just am of the opinion that in this case there is too much disconnect between the abstract and the concrete here. | ||
TimToady | about the best you can do is minimize the gratuitous overloading in a particular context; at one point "proto" meant about four different things in perl 6 | ||
quietfanatic | Oh yeah I remember that :) | 05:31 | |
Well I'm not changing anybody's mind, I just wanted to cast my dissent. | |||
tylercurtis | Of course, there are some times when this can go wrong. E.g., structs in C++ not being what a C programmer coming to C++ would expect at all(normal objects, just with a different default visibility for members). | 05:32 | |
quietfanatic | Well, normal objects are just structs underneath, right? | ||
tylercurtis | C structs don't have member functions, can't inherit(well, you can manually do something similar), will never have a vtable unless you explicitly implement one, etc. | 05:34 | |
Or constructors or destructors. | |||
TimToady | Perl stole BEGIN and END from awk and made them mean something rather different | 05:35 | |
ingy | greetings | ||
TimToady | o/ | ||
ingy | how do I findbin in rakudo/p6? | 05:36 | |
tylercurtis | Anyway, I should be getting to bed. quietfanatic, why must you start interesting conversations that I get drawn into? :P Good night, folks. | ||
sorear | run("which")? | ||
TimToady | um, use FindBin? | 05:37 | |
quietfanatic | gn tyler | ||
ingy | :\ | ||
oh?! | |||
TimToady | leastwise t/spec/S16-filehandles/dir.t uses it | ||
ingy | where do I findfindbin? | 05:38 | |
TimToady | I don't know if rakudo runs it at all though | ||
05:38
tylercurtis left
|
|||
TimToady | looks like there's one in ./ext/FindBin/lib/FindBin.pm that was probably used by pugs | 05:39 | |
yeah, I don't think rakudo will grok m:P5// | 05:41 | ||
sorear | did pugs grok m:P6//? | ||
quietfanatic | Are lookbehinds NYI in rakudo? | ||
TimToady | not really | ||
ingy | TimToady: where is this ext? | ||
I don't see it in rakudo src | |||
TimToady | the upgs repo | 05:42 | |
*pugs | |||
05:42
gabiruh joined
|
|||
ingy | do we use that anymore? | 05:42 | |
TimToady | parts of it, but maybe not that part :) | ||
still, should be pretty easy to port to rakudo | 05:43 | ||
ingy | like what parts? | ||
TimToady | like the specs and the tests all live in the pugs repo | ||
so does STD | |||
ingy | hrmm | ||
TimToady | and several other implementations | ||
rakudo: say "foo" ~~ / <?after 'oo'> / | 05:45 | ||
p6eval | rakudo f8dde0: OUTPUT«Method 'after' not found for invocant of class 'Cursor' in <anon> at line 11:/tmp/5jXKpIznTR in 'Cool::match' at line 2309:CORE.setting in 'Regex::ACCEPTS' at line 5240:CORE.setting in 'infix:<~~>' at line 401:CORE.setting in main program body at line | ||
..11:/tmp/5jXKpIznTR» | |||
TimToady | quietfanatic: it would appear not | ||
sorear | lookbehind has to be implemented at /some/ level for .ws to work | ||
you might need to drop down to pir though | 05:46 | ||
quietfanatic | I'm not gonna try to fiddle with that then. | 05:47 | |
TimToady | that only needs one char of lookbehind | ||
ingy | is github.com/audreyt/pugs up to date? | ||
TimToady | so probably cheats with substr or some such | ||
quietfanatic | Being unable to override ws makes writing a line-based grammar really hard. | ||
sorear | ingy: wrong pugs repo | 05:48 | |
that's the repository which contains pugs | |||
we're talking about the repository called pugs | |||
quietfanatic | I'll have to switch to semicolon-based. That'd be more better anyway probably. | ||
ingy | sorear: url? | 05:49 | |
sorear | yow, I broke STD | ||
svn.pugscode.org/pugs/ | |||
Can't locate object method "_SUBSUMEr" via package "main" at Niecza/Grammar.pm line 1171. | |||
TimToady | how did you get an object blessed into main? | 05:50 | |
sorear | I misspelled a :lang | ||
and apparently CORE::bless thinks undef = PL_defstash | |||
yay for wrong defaults | |||
TimToady | huh | ||
dduncan | in my mind's experience, writing a parser is a lot easier if we don't have to keep track of lines, and all whitespace outside string literals is the same | 05:51 | |
TimToady | you'll note that in P6 the type is now the mandatory invocant of bless :) | 05:52 | |
ingy | sorear: they pretty similar. is there a git mirror of the svn repo? | ||
I remember svn checkout of pugs taking a very long time. :\ | 05:53 | ||
dduncan | by "same" I mean "differences aren't significant" | ||
sorear | ingy: yes but it's pretty stale iircx | ||
TimToady | dduncan: but the highest goal of writing a parser is not to make it easy to write, but easy for the user to use. Easy to write is nice as a bonus, of course. | 05:54 | |
anyway, even the languages that say "all whitespace is the same" often treat 0-width whitespace as significantly different from 1-or-more width | 05:55 | ||
dduncan | for my own purposes in writing a parser, the only useful thing about paying attention to which whitespace you have is to give useful error or diagnostic messages | ||
sorear | ingy: on the plus side, now that pugs is gone, checking out pugs is faster. (confused yet?) | 05:56 | |
dduncan | by "the same", I mean different line-endings versus tabs vs spaces ... | ||
I *do* consider the presence vs absence of whitespace significant | |||
zero-width meaning absence | 05:57 | ||
TimToady | dduncan: on the other hand, vertical whitespace looks different to the user, so is psychologically valuable to distinguish sometimes | ||
in particular, the desire for extensibility has driven some of the P6 whitespace decisions, such as no ws before postfixes, and } at end of line always ends the expression | 05:58 | ||
and of course, Perl has had here-docs for ages | 05:59 | ||
which very much distinguish \v from \h whitespace | |||
dduncan | on a tangent, I found it useful with my own language to format comment strings like other data strings, in that they have a non-whitespace delimiter at both ends, rather than just at the start and treating the end-of-line as the end delimiter | 06:00 | |
the Perl analogy would be having a trailing # in addition to a leading one | |||
TimToady | both forms can be useful | ||
06:01
uniejo joined
|
|||
TimToady | and pod is also keyed to vertical transitions | 06:01 | |
dduncan | yes | 06:02 | |
well, its an exercise in trade-offs ... I went for something that I perceived was 90% as easy to write by a user but was 5+ times easier to parse | 06:04 | ||
dalek | ecza: 1c21454 | sorear++ | (4 files): Implement quoted identifiers, some more class stuff |
06:05 | |
ecza: 68a676c | sorear++ | (4 files): Implement ClassHOW injection and bootstraping (3rd time) |
|||
ingy | TimToady: do you know about $*PROGRAM_NAME? | ||
that's all I wanted | |||
:\ | |||
Well I guess I learned a little along the way. | 06:06 | ||
dduncan | about strings, another design decision I made, which I'm not aware of any other language doing, is disallowing literal occurrences of the string delimiter within the string, even with a leading backslash ... rather the same char is represented with something else ... | 06:07 | |
as a result, when you encounter an opening delimiter, you know that the next occurrence is its pair, and you don't have to test for leading backslash or whatever | |||
TimToady | sounds like you're making it easier for you than for your user | 06:08 | |
06:09
lafille joined
|
|||
dduncan | well they still have to escape somehow, and I just have them escape differently | 06:09 | |
granted, Perl 6 has the matching braces thing, so often you don't need escapes of the same thing | 06:10 | ||
but practically every other language doesn't do that AFAIK, and I'm comparing with them in this case | |||
TimToady | but how do they know what that other character is? | ||
ingy: $*PROGRAM_NAME seems to work here, as long as it's in a file | |||
dduncan | first of all, there are only a small number to remember ... 2-4 ... and its documented | 06:11 | |
06:11
lafille left
|
|||
TimToady | what if your string has all of those? | 06:11 | |
dduncan | mainly, the differences are single-quotes, double-quotes, and backslashes ... everything else looks as you're used to | ||
except for the odd removal ... | 06:12 | ||
sorear | dduncan: you appear to be reinventing the Perl 5 quote-like operator parsing engine | 06:13 | |
read "Gory details of parsing quote-like operators" in perlop, spare yourself some time | |||
dduncan | actually, no | ||
all Text literals use single quotes, period | |||
all Name literals use double quotes, period | 06:14 | ||
same as in SQL | |||
so in a Text (Str of Perl 6) | |||
only the single quote and backslash need escaping | |||
other things may optionally be escaped, but don't have to | |||
so no quote-like operator | 06:15 | ||
TimToady | why does the backslash need escaping if you're not using it to backslash single quote? | ||
dduncan | this is Text: 'hello world' ... Name: "Hello World" ... Comment: #hello world# | ||
if you have a literal backslash | 06:16 | ||
one moment ... | |||
a relevant url: search.cpan.org/dist/Muldis-D/lib/M...g_Literals | 06:17 | ||
sorear goes to read up on MROs | |||
dduncan | keep in mind, I'm going for now for a 90% solution, and my primary competitor is SQL | 06:18 | |
in a Text literal, a single-quote may be escaped as either \a (apostrophe) or the same \c<> format that Perl 6 has | 06:19 | ||
and a backslash, with a \b | 06:20 | ||
moritz_ | Perl 6 uses \c[...] | ||
dduncan | these rather than \' and \\ | ||
yes, okay | |||
I think I meant \c followed by a delimited unicode name or num | |||
06:20
justatheory left
|
|||
dduncan | so, 'this isn\at something' is a Text literal | 06:22 | |
basically just the \a, \b etc are different from common practice, the rest is more the same | |||
especially, the \t, \n, \f, \r are the same as convention | 06:23 | ||
dalek | ecza: ee41c0d | sorear++ | (3 files): Don't pollute global syml/ with our data |
||
sorear | looks like someone needs to be exposed to nibblers. | ||
moritz_: hugme is AWOL | |||
dduncan | \a or \b used to mean "alarm"/"bell" but I think hardly anyone uses those | ||
sorear | no, \b is backspace, not bell | 06:24 | |
(and I've used it) | |||
dduncan | sure, okay, but its used rarely isn't it? | ||
sorear | very much so | ||
BinGOs has used | |||
06:24
hugme joined
|
|||
dduncan | well one can still use the \c form for those, or even include them literally | 06:24 | |
sorear | I still think you're actually making this more complicated when you think you're simplifying | ||
Perl6 regex was designed, among other things, to make processing strings with escapes easy | 06:25 | ||
dduncan | sure, but I'm also targeting implementations not over Perl 6, in addition to Perl 6 | 06:26 | |
TimToady | recognizing \' is *just as easy* as recognizing \a, and isn\'t is a lot more readable than isn\at | ||
dduncan | well, maybe I'll change that, but at the moment I don't see this issue to be a problem in practice | 06:28 | |
TimToady | even isn''t is better than isn\at | ||
well, as long as you don't expect this to be used for English text, you'll be fine... :P | 06:30 | ||
seriously though, one of the P5 things we ran away from screaming is multi-pass parsing, so I wouldn't feature it | 06:32 | ||
it just comes back and bites you later | |||
dduncan | I certainly don't feature it | ||
a key feature of Muldis D is that it can be single-pass parsed | 06:33 | ||
TimToady | then there's little point in excluding the delimiters from recognizable constructs in the middle | ||
dduncan | understanding the meaning of any character only requires having read the prior ones | ||
you make a point there | 06:35 | ||
TimToady | what if Unicode in their infinite wisdom decides to add a character name containing one of your quote chars? | ||
dduncan | you mean, having something other than latin letters and spaces? | 06:36 | |
TimToady | they already have parens in there | ||
anyway, it doesn't buy you much to exclude them, and doesn't help readability, in my estimation | 06:37 | ||
dduncan | so, if I change to using \' and \\ etc then you would consider this to be a huge improvement in useability? | ||
TimToady | certainly a great number of C/C++/Java programmers will think so | 06:38 | |
dduncan | fyi, while the language is single-pass parseable, I imagined it might be easier to do multiple passes in practice ... my current design could make the tokenization phase easier ... then again, that may be antiquated thinking | 06:40 | |
so I'll make this design change now to conform to more common practice and hope for the best | 06:41 | ||
TimToady nods, probably off to sleep... | |||
dduncan | I'll just do the \' though, no '' ... that one looks like 2 strings side by side | 06:42 | |
thanks for the feedback | 06:43 | ||
07:20
Mowah joined
07:25
Ross joined
07:54
mberends joined
08:04
plobsing left
|
|||
sorear | class Foo { } ; (BEGIN Foo.new).isa(Foo) # this = 0 according to my current understanding of perl 6 | 08:05 | |
moritz_ | why should it? | ||
if that were the case, 1.isa(Int) would also be false | 08:06 | ||
because 1 is kinda like Int.new(1) | |||
at compile time | 08:07 | ||
08:07
mikehh left
|
|||
sorear | well, Foo, as an our object, is instantiated more than once | 08:07 | |
first it's instantiated against the protopad, producing Foo#1 | |||
the BEGIN returns an instance of Foo#1 | 08:08 | ||
on each execution of the closure, Foo is bound to the current environment, producing Foo#2, etc | |||
moritz_ | that's the first time I've heard of the "protopad" | ||
sorear | so it's really (Foo#1.new).isa(Foo#2) | ||
moritz_ | why should the Foo's resolve to different objects? | 08:09 | |
I don't see any closure closing over Foo | |||
it's not a variable | |||
sorear | because they close over different lexical environments | ||
moritz_ | ... and? | ||
Foo is an 'our' symbol, as you've said yourself | |||
sorear | my $x; class Foo { method bar { $x } } | ||
moritz_ | why should it be different in different instances of a closure? | 08:10 | |
rakudo: class Foo { }; say (BEGIN { Foo.new}).isa(Foo); | 08:11 | ||
p6eval | rakudo f8dde0: OUTPUT«===SORRY!===too few positional arguments: 1 passed, 2 (or more) expected» | ||
moritz_ | rakudo: class Foo { }; say (BEGIN { Foo.new}).^isa(Foo); | ||
p6eval | rakudo f8dde0: OUTPUT«===SORRY!===too few positional arguments: 1 passed, 2 (or more) expected» | ||
moritz_ | rakudo: class Foo { }; say (BEGIN { Foo.new}) ~~ Foo; | ||
08:11
cjk101010 joined
|
|||
p6eval | rakudo f8dde0: OUTPUT«===SORRY!===too few positional arguments: 1 passed, 2 (or more) expected» | 08:11 | |
sorear | moritz_: what should (class { method foo { $_ } }).foo for ^2 return? | 08:12 | |
I assert that the answer is 0, 1 | |||
moritz_ | sorear: I have no idea, but I don't see how it is related to the previous question | 08:13 | |
sorear | classes close over their lexical environment, just like the methods they contain | ||
moritz_ | sounds kinda sane | ||
08:13
pnate left
|
|||
sorear | moritz_: a class is a closure, so each time it is cloned it produces a new value | 08:13 | |
rakudo: my sub foo() { say "Hi" }; BEGIN { foo; } # If rakudo had working protopads it could run this | 08:14 | ||
p6eval | rakudo f8dde0: OUTPUT«===SORRY!===Could not find sub &foo» | ||
sorear | pugs: my sub foo() { say "Hi" }; BEGIN { foo; } | ||
p6eval | pugs: OUTPUT«Hi» | ||
sorear | that's what protopads are | ||
moritz_ | waitwaitwait | ||
cloning a closure only clones the lexpad | |||
not the entire thing | |||
so there's still a a relation between the clones | |||
sorear | a relation, yes | 08:15 | |
but not === | |||
moritz_ | I don't think .isa needs to consider the cloned parts, does it? | ||
sorear | I had taken it for granted .isa would use === | ||
but now that you say that - I am not so sure | |||
thanks | |||
moritz_ | then it wouldn't work for (3 but True) ~~ Int | 08:16 | |
which would be kinda surprising | |||
IMHO | |||
but I think I'm not the right person to discuss it with | |||
sorear | well, (3 but True) has a class of all(__ANON__, Int, Cool, Any, Mu) | 08:17 | |
so it could match Int regardless | |||
but - the cloned parts of a class or role affect only implementation, not interface, so there's no reason for isa and does to consider them | |||
moritz_ | all(Int, Any) ~~ Int is false | ||
so it needs to do a bit smarter matching :-) | 08:18 | ||
TiMBuS | does Any ~~ Int work? | 08:29 | |
moritz_ | rakudo: say Any ~~ Int | 08:30 | |
p6eval | rakudo f8dde0: OUTPUT«0» | ||
TiMBuS | i guess that's the problem | ||
moritz_ | not really | 08:31 | |
it's a feature | |||
TiMBuS | of course | ||
moritz_ | I guess that changing all() to any() would do | 08:32 | |
TiMBuS | rakudo: say any(Int, Any) ~~ Int | ||
p6eval | rakudo f8dde0: OUTPUT«0» | ||
TiMBuS | ahhh | 08:33 | |
moritz_ | now *that's* a problem | ||
08:33
thebird joined
|
|||
TiMBuS | is there a "great big table of smartmatching" to say what works and in what order? i recall seeing one but I think it was for perl 5 | 08:35 | |
sorear | right | ||
perl 5 has a Great Big Table | |||
perl 6 smartmatching is very simple | |||
moritz_ | TiMBuS: S03 has such a table | ||
sorear | A ~~ B = B.ACCEPTS(A) | 08:36 | |
moritz_ | but it's not all implemented | ||
TiMBuS | I see | ||
moritz_ | sorear: not quite | ||
first $_ is set to A | |||
sorear | A ~~ B = (let $_ = A in B).ACCEPTS(A) | ||
moritz_ | which explains how 'a' ~~ .uc is supposed to work | 08:37 | |
perlcabal.org/syn/S03.html#Smart_matching | |||
08:38
pnate joined
08:39
masak joined
|
|||
masak | oh hai, #perl6 | 08:39 | |
moritz_ | lolitsmasak | 08:40 | |
fun question: what happens if you smartmatch against a Match object? | |||
masak | er. | 08:41 | |
moritz_ | btw I'm kinda surprised that the fallback for smartmatching is === and not eqv | ||
masak | aye. | ||
moritz_ | since most cases of ~~ test structural things, not object identity | ||
08:42
clintongormley joined
|
|||
TiMBuS | i think i've ran into this issue! and most of the time I wanted Match to be stringified | 08:42 | |
dduncan | TimToady, sorear - I've now committed the design change on char escape seqs we discussed - utsl.gen.nz/gitweb/?p=Muldis-D;a=co...h=afd38e57 | 08:43 | |
08:44
dakkar joined
|
|||
dduncan | ... and also the prior commit lays groundwork, since I had used double-backslash for something else which had to be altered first so not to conflict | 08:44 | |
moritz_ | I'm curious, what did it mean before? | ||
dduncan | moritz_, was that question directed at me? | 08:47 | |
moritz_ | dduncan: yes | ||
dduncan | okay, the old meaning was related to "unspace" | ||
the prior commit - utsl.gen.nz/gitweb/?p=Muldis-D;a=co...=e25af94a2 | 08:48 | ||
essentially, I was using the same grammar token, a backslash pair surrounding optional whitespace, for 2 distinct purposes | |||
one inside strings to split them over lines, and the other like Perl 6's unspace but without (initially) embedded comments | 08:49 | ||
optional whitespace means a double backslash could be in a string literal | |||
I split the concepts so that the one inside the literal is now called 'splitter' instead of 'unspace' and the whitespace is mandatory | |||
08:50
Ross left
|
|||
dduncan | in the future I'll probably update my 'unspace' to have embedded comments, but I omitted those for now for simplicity | 08:50 | |
er, hm, just realized another thing I have to fix ... | 08:53 | ||
08:53
meppl joined
08:54
thebird left
|
|||
dduncan | the "\ " in a string is now ambiguous ... | 08:55 | |
08:57
mikehh joined
|
|||
dalek | ecza: 7292187 | sorear++ | (3 files): cleanup .method, implement dup@, start Mu |
09:05 | |
ecza: 8c57de0 | sorear++ | (4 files): Nicer syntax for boxing in NIL |
|||
ecza: 5135541 | sorear++ | (4 files): Bootstrap more methods. Add integers to NIL. NEW CLASS: Mu |
|||
sorear | it's finally starting to come together | 09:07 | |
dduncan | now that's fixed - utsl.gen.nz/gitweb/?p=Muldis-D;a=co...;h=6756404 | 09:11 | |
sorear out. | 09:12 | ||
dduncan | ditto | ||
I mean ... | |||
dduncan ditto | |||
09:12
_mpu joined
09:22
mberends left
09:44
Ravi joined
09:45
Ravi left
09:50
quietfanatic left,
masak left
09:54
dduncan left
10:03
lestrrat is now known as lest_away
10:04
jaldhar joined
10:10
thebird joined
|
|||
jnthn | Afternoon, #perl6 | 10:17 | |
10:18
pmurias joined
|
|||
moritz_ | did you see the new don knuth talk? it's hilarious | 10:19 | |
pmurias | moritz_: link? | 10:20 | |
moritz_ | river-valley.tv/media/conferences/t...Don-Knuth/ | ||
and if that times out, try a mirror: onlineflashplayer.net/?url=http%3A%...-Knuth.flv | |||
10:23
skids joined
10:27
Ross joined
|
|||
pmurias | YOU_ARE_HERE works in mildew :) | 10:30 | |
moritz_ | /me IS THERE | ||
10:36
dakkar left
|
|||
hghgd | "the bell is also part of the logo" :) | 10:38 | |
moritz_ | :-) | ||
10:46
agentzh left,
dakkar joined
10:58
Trashlord joined
11:06
szabgab left,
john__ left,
literal left
11:09
szabgab joined,
john__ joined,
literal joined,
ascent_ joined,
mdxi_ joined,
fda314925 joined,
TimToady joined,
farmer.freenode.net sets mode: +o TimToady
|
|||
dalek | p-rx: d01b490 | pmichaud++ | src/HLL/Compiler.pm: Refactor interactive mode context handling slightly. |
11:14 | |
p-rx: 2fb1606 | pmichaud++ | src/stage0/ (3 files): Update bootstrap files. |
|||
11:14
Backglass joined
11:15
hghgd_ joined
|
|||
Backglass | who can help me using regex? | 11:15 | |
hejki prepares for collective facepalm | 11:16 | ||
11:19
hghgd left
11:22
Guest7606 left,
Guest7606 joined,
Guest7606 is now known as pragma_
11:25
wallberg joined
11:31
wallberg left
|
|||
pmichaud | pmichaud@plum:~/rakudo$ ./perl6 | 11:35 | |
> my $a = 5; | |||
5 | |||
> say $a * 3 | |||
15 | |||
arnsholt | Shiny! | ||
pmichaud | > role A { method x() { say 'x' } }; class B does A { }; B.new.x | 11:36 | |
x | |||
moritz_ | Perl 6 regex? | 11:38 | |
dalek | kudo: 5f40d37 | pmichaud++ | src/Perl6/Actions.pm: Rename some setup variables to be more accurate. |
11:39 | |
kudo: b0cd2b8 | pmichaud++ | src/ (2 files): Add a $MAIN parameter to unit mainline (signals that the unit is the mainline). |
|||
kudo: c9aa0e9 | pmichaud++ | src/Perl6/Actions.pm: Refactor !YOU_ARE_HERE to use outer_ctx. |
|||
kudo: 3d0a9c2 | pmichaud++ | src/glue/run.pir: Refactor !UNIT_START. |
|||
kudo: 114971b | pmichaud++ | build/PARROT_REVISION: Bump PARROT_REVISION. spectest-progress.csv update: 507 files, 33926 (84.5% of 40171) pass, 2 fail Failure summary: S32-temporal/DateTime.t 15 - epoch at 1970-01-01 01:01:01 S32-temporal/DateTime.t 16 - as Str 1970-01-01T01:01:01+0100 S32-temporal/DateTime.t passed 18 unplanned test(s) |
|||
moritz_ | pmichaud: btw [Coke] has asked to link to the nqp-rx revision in the parrot commit that updates the nqp-rx bootstrap | ||
wich I kinda like, for easier bisecting | 11:40 | ||
pmichaud | moritz_: okay, wfm | ||
time for some sleep -- bbl | 11:41 | ||
moritz_ | good night | 11:42 | |
jnthn | pmichaud: Wow!! | ||
pmichaud++ | |||
moritz_ | pmichaud++ indeed | 11:48 | |
Juerd | Why is the executable named perl6, not rakudo? | 11:53 | |
moritz_ | hysterical raisins? | 11:54 | |
jnthn | I think there's a precedent of people typing language name rather than implementation name in many cases. I'm pretty sure it's "java" or "javac" whichever underlying compiler/vm implementation you have. | 11:59 | |
moritz_ | otoh C compiler names differ | 12:00 | |
szbalint | would mess up a whole lot of shebang lines too | ||
12:00
proller left
|
|||
jnthn | Though perhaps perl6 wants to be an alias to rakudo and then people can choose which implementation their perl6 is aliased to as well as easily get at different impls. | 12:00 | |
takadonet | morning all | 12:01 | |
12:02
proller joined
12:08
pmurias left
12:10
pmurias joined
12:12
sftp joined
12:14
bluescreen joined
12:15
bluescreen is now known as Guest43164
12:26
ruoso joined
12:31
duzy`` left
12:32
Trashlord left
12:34
Trashlord joined
12:36
Backglass_ joined
12:39
Backglass left,
Backglass_ left,
Backglass joined
12:42
pmurias left
12:43
Backglass left
12:49
rgrau_ joined
12:53
Mowah left
12:57
Mowah joined
13:02
IllvilJa joined
13:09
charsbar_ joined
13:11
charsbar left,
rokoteko left,
rokoteko_ joined,
BinGOs_ joined
13:12
tadzik joined
13:13
araujo left,
spinclad_ joined
13:14
araujo joined,
sunnavy_ joined
13:15
TiMBuS left,
szbalint left,
sunnavy left,
LionMadeOfLions left
13:17
BinGOs_ is now known as BinGOs,
BinGOs left,
BinGOs joined
|
|||
[Coke] | my preference would be that we get a rakudo, and have a switch (hardwired to on for now. =-) that installed a copy / link as perl6 | 13:17 | |
13:17
nsh_ joined
|
|||
Juerd | That's a good idea | 13:19 | |
13:24
szbalint joined
13:27
TiMBuS joined,
athomason joined
13:35
jaldhar left
13:41
hans__ joined
13:50
Ross left,
tylercurtis joined
13:54
nicePerl6 joined
13:55
nicePerl6 left,
hans__ left
13:59
uniejo left
|
|||
pmichaud | good morning, #perl6 | 14:16 | |
mathw | oh hai pmichaud | ||
jnthn | morning, pmichaud | 14:17 | |
pmichaud | hugme: tweet rakudoperl Rakudo's REPL now remembers lexical variables across input lines | 14:19 | |
hugme hugs pmichaud; tweet delivered | |||
mathw | \o/ | 14:20 | |
pmichaud++ | |||
TiMBuS | yes. yes! | ||
jnthn | pmichaud: I see your roles lexicals fix worked too | 14:21 | |
14:21
perlygatekeeper left
|
|||
jnthn | pmichaud: I'm not sure I understand why. :-) | 14:21 | |
But I'm happy it's fixed. :-) | |||
pmichaud | actually, I don't think it worked. | ||
I think it must be an artifact of something else going on. | |||
need tests. :-) | |||
if it did work, it's because I somehow changed the order of initialization :-) | 14:22 | ||
jnthn | rakudo: role R { method m { say 42 } }; class C does R { }; C.new.m | ||
p6eval | rakudo 855ca6: OUTPUT«Could not find sub &say in 'm' at line 11:/tmp/uC4AK36C_m in main program body at line 11:/tmp/uC4AK36C_m» | ||
jnthn | pmichaud: That's the classic test case. | ||
(not sure if p6eval is up to date) | |||
pmichaud | right. I don't know why it worked for me. | ||
but: | |||
TiMBuS | rakudo: any(Int) ~~ Int | ||
p6eval | rakudo 855ca6: ( no output ) | ||
TiMBuS | rakudo: say any(Int) ~~ Int | ||
p6eval | rakudo 855ca6: OUTPUT«0» | ||
TiMBuS | ^should that work | ||
pmichaud | rakudo: say 42; { role R { method m { say 42 } }; class C does R { }; C.new.m } | ||
p6eval | rakudo 855ca6: OUTPUT«42Could not find sub &say in 'm' at line 11:/tmp/c3KgwWOEid in main program body at line 11:/tmp/c3KgwWOEid» | ||
pmichaud | hmmm | 14:24 | |
anyway, for some reason it "worked" that one time for me in the repl. not sure why. | |||
rakudo: say Int ~~ Int | |||
p6eval | rakudo 855ca6: OUTPUT«1» | ||
jnthn | TiMBuS: I don't think so. | 14:25 | |
It's a type check | |||
pmichaud | TiMBuS: I'm not sure how junctions are supposed to autothread there. | ||
jnthn | They can't. | ||
Otherwise auto-threading won't work. | |||
TiMBuS | the reverse works fine | ||
jnthn | Because the type check won't fail, causing the signature not to bind, causing auto-threading. | ||
TiMBuS | Int ~~ any(Int) | ||
jnthn | Right | ||
But that's normal :-) | 14:26 | ||
Smart-match is not symmetric. | |||
In that case it does Junction.ACCEPTS | |||
Which threads through the things in the junction. | |||
14:32
alester joined
14:33
perlygatekeeper joined
14:34
perlygatekeeper left
14:37
plobsing joined
14:38
macdaddy joined,
macdaddy is now known as Guest84429
|
|||
jnthn | pmichaud: confusing bug is confusing. | 14:40 | |
> role R { method m { say 42 } }; class C does R { }; C.new.m | |||
Could not find sub &say | |||
however | |||
> role R { method m { say 42 } } | 14:41 | ||
R() | |||
> class C does R { }; C.new.m | |||
42 | |||
pmichaud | right | ||
14:41
patspam joined
|
|||
pmichaud | it probably has to do with the way the REPL now captures lexicals from one line to the next | 14:42 | |
in fact | 14:43 | ||
jnthn | oh!! | ||
Actually | |||
I think it's to do with the fact that we run the body of the role at the time the "does" statement happens | |||
And that is in a :load :init | |||
In the case where it's split over lines, the role body block has had change to somehow get captured by the mainline body instead. | 14:44 | ||
moritz_ | speaking of loading times... why is module loading deferred to :load :init time? | ||
jnthn | moritz_: It shouldn't be - unless it's in a pre-compiled module and that's the earliest it can happen | 14:45 | |
But we should be loading them when we parse a use statement otherwise. | |||
Otherwise we can't stub lexicals into the lexpad | |||
moritz_ | rakudo: use Test; BEGIN { @*INC.push: 't/spec/package/' } | ||
p6eval | rakudo 855ca6: ( no output ) | ||
moritz_ | rakudo: use Test; BEGIN { @*INC.push: 't/spec/packages/' } | ||
p6eval | rakudo 855ca6: ( no output ) | ||
moritz_ | locally that failed... | 14:46 | |
maybe fixed by now | |||
jnthn | I did it in the REPL and it works OK | ||
moritz_ | oh wait | ||
rakudo: use Test; BEGIN { @*INC.unshift: 't/spec/packages/' } | |||
jnthn | no error with -e either | ||
p6eval | rakudo 855ca6: ( no output ) | 14:47 | |
moritz_ | hm | ||
it used to do the 'use' too late | |||
and then find t/spec/packages/Test.pm | |||
and fail during loading | |||
but it seems to be fixed now | |||
14:49
masak joined
|
|||
pmichaud | yes, I want to switch BEGIN so that it's an actual phaser, instead of having its own separate way of doing things. | 14:52 | |
masak | pmichaud++! # REPL memory | ||
dalek | kudo: c89a843 | pmichaud++ | src/ (2 files): Remove IN_EVAL() function, $*IN_EVAL dynvar. |
14:57 | |
kudo: 17654af | pmichaud++ | docs/ROADMAP: Mark REPL task as done in the ROADMAP. |
|||
kudo: 7bbb35f | pmichaud++ | docs/spectest-progress.csv: Merge branch 'master' of github.com:rakudo/rakudo |
|||
15:00
Backglass joined
|
|||
masak | Backglass: hi! | 15:00 | |
15:04
tadzik left
|
|||
pmichaud | is $x.map({ .key => .value + 1}), ('a' => 6), 'map on pair works (=>)'; | 15:04 | |
IllvilJa concludes that "programmers are unreasonable" after reading a blog post by Ovid... | |||
pmichaud | how are we calling this one? Should the block passed to .map end up being a hash composer or no? | ||
moritz_ | pmichaud: block, because it uses $_ | 15:05 | |
pmichaud | ...and the same would be true with { 'a' => 3 + $_ } ? | ||
moritz_ | yes | 15:06 | |
pmichaud | my $hash = { 'a' => 3 + $_ }; # fail. | ||
15:06
plobsing left
|
|||
moritz_ | (the tests might not be consistent in some cases) | 15:06 | |
right. | |||
dakkar | hm. has anyone seen TimToady in the last few days? | 15:07 | |
TimToady | nope | ||
moritz_ | no mirrors around? | ||
pmichaud | Tim... who? | ||
dakkar | hi! | ||
TimToady: I'm just chasing down the last few speakers for the YAPC::EU | |||
can I count on you for a 40- or 50-min keynote? | 15:08 | ||
TimToady | sure | ||
moritz_ | \o/ | ||
pmichaud | has anyone noticed that flights to pisa from the u.s. are on the expensive side, and have weird times? ;-) | ||
actually, getting *to* pisa is pretty easy, it's getting back that is weirdish. :) | |||
TimToady | we're flying from Barcelona... | ||
pmichaud | ...because you'll happen to be there already, or because that ends up being easier than the other options? | 15:09 | |
moritz_ | pmichaud: Munich <-> Pisa is no problem either way | ||
with Lufthansa | |||
dakkar | TimToady: could you log into the website and tell it that you are attending? then I'll create the talk and you can edit it at your leisure (relatively speaking…) | ||
conferences.yapceurope.org/ye2010/ | |||
pmichaud | dakkar: I noticed that my NQP talk was accepted (yay) -- would you prefer the Perl 6 talk instead? | ||
dakkar | pmichaud: we already have a few P6 talks, NQP seemed more interesting from a general point of view… | 15:10 | |
pmichaud | dakkar: wfm | 15:11 | |
[particle] | perl 6 is old news. nqp is the new hotness :) | ||
15:13
Backglass left
|
|||
TimToady | dakkar: okay, I'm registrationalized. | 15:14 | |
dakkar | TimToady: great, thanks | 15:16 | |
conferences.yapceurope.org/ye2010/talk/2953 ← here's your keynote, make something up :) | 15:17 | ||
pmichaud | dakkar: I think he always does. :-) | ||
15:17
Backglass joined
|
|||
dakkar | that's why we like him :) | 15:18 | |
TimToady | probably something on the order of "What makes Perl Perl?" this time | ||
15:18
perlygatekeeper joined,
LionMadeOfLions joined,
Backglass left
|
|||
masak | rakudo: Any.substr(0, 1) | 15:18 | |
p6eval | rakudo ddf224: OUTPUT«Method 'substr' not found for invocant of class '' in main program body at line 11:/tmp/8hDhgTiUk_» | ||
masak | I think I read somewhere that this is expected nowadays. | ||
and I think I agree. | |||
moritz_ | right | ||
masak | rakudo: substr(Any, 0, 1) | ||
p6eval | rakudo ddf224: OUTPUT«Method 'chars' not found for invocant of class '' in 'Cool::substr' at line 2121:CORE.setting in main program body at line 11:/tmp/BLXjHiaPx8» | 15:19 | |
masak | but that... why does it even call something? | ||
masak submits rakudobug | |||
pmichaud | maybe want a type constraint on the first arg. | ||
moritz_ | it should type-constrain substr() to Cool | ||
masak | moritz_: that's what I think too. | ||
pmichaud | (or invocant, if it's an "is export" method) | ||
masak | AFAICS, the sub is exported from Cool.substr | ||
so it should have an implicit typing on the invocant. | 15:20 | ||
pmichaud | right | ||
moritz_ | shouldn't the exporting add a constraint automatically? | ||
moritz_ too slow to type | |||
TimToady | hmm, if substr calls chars, we can't use it to test a cat string to see if there are more chars with $cat.substr($pos,1) | ||
15:20
Backglass_ joined
|
|||
masak | I'd actually like to ask for &substr the sub to work on Any, if that's at all possible. | 15:20 | |
TimToady | Any is not Cool | ||
moritz_ | might be a pecularity of the implementation though | ||
masak | it could just coerce it to an empty Str or somthing. | ||
pmichaud | the use of .chars is undoubtedly a think-o. | 15:21 | |
lots of times people contributing code run to .elems and .chars without asking if there's a lazier way to do it | |||
moritz_ | maybe it was to avoid "can't take substr out of range" or so | ||
TimToady | well, one way or another, we need a primitive that lets us work through a string without committing to finding its end | ||
moritz_ | ... and please don't let it be split() :-) | 15:22 | |
pmichaud | my $len = $length // self.chars; | ||
bah. | |||
masak | I need to delimit this ticket somehow. I think the bug is that the sub is not constrained to Cool. | ||
but I'll include the other things too for posterity. | |||
moritz_ | masak: that's right | ||
pmichaud | TimToady: we're safe there, though -- if $length is provided we don't call .chars | 15:23 | |
(we break a little later on, but that's fixable) | |||
TimToady | perhaps cat strings have "false ends", and there's just an extra loop around when you think you've run out that increases it | ||
jnthn | Note that Rakudo doesn't put type constraints on invocants properly yet | 15:24 | |
So if the method is exported it won't type-check it's invocant unless you are explicit about what it should check just yet. | 15:25 | ||
A few days ago, it didn't even do that though... :-) | |||
pmichaud | right | ||
moritz_ | jnthn: for every NYI feature you implement, we find two more to do :-) | ||
jnthn | Great, I'll be trying to implement Perl 6 for the rest of my life! :P | 15:26 | |
dalek | kudo: 894e793 | pmichaud++ | t/harness: Fix bug with --long and --stress option handling. |
||
moritz_ | jnthn: the good news is that you'll get used to it :-) | ||
jnthn | pmichaud: Is --long everything? | ||
.oO( at this point, --even-longer might be more apt ;-) ) |
15:27 | ||
TimToady | it just means the community must keep doubling to keep up with what needs to be done | ||
moritz_ hopes that when the community expands, the code developer pool also expands | 15:28 | ||
TimToady | we must all be resigned to becoming a smaller percentage of the Perl 6 community :) | ||
pmichaud | jnthn: --long is default | ||
basically, a test can be marked as #long or as #stress | |||
by default, #long tests get run (this was the bug -- they weren't being run) | |||
by default #stress tests are not run | 15:29 | ||
so: | |||
jnthn | Is there a make quicktest? | ||
pmichaud | yes. | ||
jnthn | aha! | ||
\o/ | |||
pmichaud | make quicktest does --long=0 | ||
and skips the S05-mass/rx.t and S32-trig tests | |||
(and any other tests we deem to be "#long" in t/spectest.data) | |||
jnthn | Is it kosher to mostly run make quicktest and then commit if it's clean, if it's unlikely the patch woulda broken either of those? | 15:30 | |
pmichaud | make spectest doesn't add any options, so we get the long tests but not the stress tests | ||
make stresstest does --stress=1 | |||
which includes those tests that we deem to be "really long" :-) | |||
moritz_ | jnthn: I'll tell you when you broke something :-) | ||
pmichaud | jnthn: yes, it's kosher | ||
use best judgement here | |||
jnthn | .oO( testing...without the pork! ) |
15:31 | |
pmichaud: I'll try ;-) | |||
pmichaud | Since adding those, I've been tending to do "make quicktest" on local commits, and then a "make spectest" before push. | ||
jnthn | *nod* | ||
pmichaud | anyone have further comments on the discussion from irclog.perlgeek.de/perl6/2010-07-06#i_2523937 ? (about "why Rakudo Star"?) | 15:32 | |
I'll be drafting some text later this morning | |||
(unless I get sidetracked) | |||
rakudo: my @array = <1 2 3>; say ?(@array[0,1] ~~ List); say @array[0,1].WHAT; | 15:37 | ||
p6eval | rakudo ddf224: OUTPUT«0Parcel()» | ||
pmichaud | does @array[0,1] have to be a *List*? | ||
Parcel feels more appropriate | 15:38 | ||
moritz_ | pmichaud: shouldn't you be the one answering the question? :-) | ||
pmichaud | well, it feels funny to require Parcel, too. | ||
moritz_ would require Positional | |||
pmichaud | I'll switch to Positional for now. | 15:39 | |
15:40
timbunce joined
|
|||
masak | ok, so the &substr thing was one of two things that had broken in GGE since last time I got it up to date. the other thing was that $obj.?nosuchmethod now gives Nil, not Failure. | 15:41 | |
+1 on that, by the way. | |||
but how does one test for Nil-ness in a nice way? | |||
pmichaud | ~ Nil seems to work. | ||
er, ~~ Nil | |||
TimToady | or ~~ () is the same thing | ||
pmichaud | rakudo: sub foo() { return; }; say foo ~~ Nil; | ||
masak | right. | ||
p6eval | rakudo ddf224: OUTPUT«Too many positional parameters passed; got 1 but expected 0 in 'foo' at line 11:/tmp/SAbgTooWgg in main program body at line 11:/tmp/SAbgTooWgg» | ||
pmichaud | rakudo: sub foo() { return; }; say foo() ~~ Nil; | 15:42 | |
p6eval | rakudo ddf224: OUTPUT«1» | ||
masak | for some reason I settled on 'eqv Nil' in my code. | ||
pmichaud | eqv Nil also works. | ||
TimToady: do we allow "list binding"? e.g., @a[1,2] := ($x, $y); | |||
(please say "no") | |||
TimToady | we can say no for now | 15:43 | |
pmichaud | we don't have a list prefix form of := at the moment anyway. | ||
15:43
zostay left
15:44
zostay joined,
Ross joined,
envi^home joined
|
|||
TimToady | I think if Cat ~~ Stringy, then perhaps any Stringy needs to be able to handle * as a length, and have a Stringy.reify($pos) that returns $pos max $actualchars | 15:47 | |
tylercurtis | pmichaud: I can't seem to get your attention in #parrot, so I'll ask here. Would you mind giving me, off the top of your head, a guess as to which PAST::Node subclass attributes might be useful to traverse for PAST::Walker/Transformer/etc.? Mainly, I'm looking for things like viviself, control, loadinit, etc. that can contain other PASTs. | 15:48 | |
pmichaud | tylercurtis: I think you named them all already. :) | ||
TimToady | and substr would say my $realchars = $stringy.reify($offset+length) | ||
pmichaud | let me re-check. | ||
tylercurtis: viviself, vivibase, control, loadinit | 15:51 | ||
that's all I see at the moment. | |||
tylercurtis | pmichaud: thanks. | ||
pugssvn | r31567 | pmichaud++ | [t/spec]: Update some tests on slices, resolve RT #63014. | 15:53 | |
masak | tylercurtis: any comment on gist.github.com/464349 ? I hope I'm not creating too much downstream chasing for you with your LLVM compiler. | 15:56 | |
pmichaud | rakudo: 'a' ~~ /<alpha>/; for %($<alpha>) { say $_ } | 16:00 | |
p6eval | rakudo ddf224: ( no output ) | 16:01 | |
16:08
Backglass_ left
|
|||
tylercurtis | masak: I like that change, actually. I'd rather you not rather worry about changing SIC on my account, anyway. Thanks for the warning, though. Not only will it be helpful to know that environment is going away when I implement blocks, it's given me an idea about how to implement them. | 16:08 | |
16:08
pragma_ left
|
|||
masak | tylercurtis: cool. | 16:09 | |
TimToady | I am coming to the conclusion that ~~ should autothread, and relegate the highly specialized Junction testing to .^does(Junction) | ||
masak | tylercurtis: yes, I very much like the change too. I hope to find some quiet hacking time to write a new runtime for it. | ||
TimToady | we've run into that several times in recent days, and I think the autothreading will be much more useful | 16:10 | |
that is, the arg to ACCCEPTS should be Any, not Mu | |||
16:10
quietfanatic joined
|
|||
TimToady | *CC | 16:10 | |
quietfanatic | rakudo: say [[4, 5], [6, 7]].map: {.perl} | ||
p6eval | rakudo ddf224: OUTPUT«[4, 5][6, 7]» | 16:11 | |
quietfanatic | isn't map supposed to recurse into nested structures? | ||
moritz_ | nope | ||
wolverian | no. | ||
moritz_ | only hyper operators do | ||
quietfanatic | hm. | 16:12 | |
pmichaud | TimToady: that might be a bit of a problem, since .ACCEPTS is what we use for type checking and multidispatch | 16:16 | |
TimToady: is it sufficient if ~~ expects a lhs of Any ? | |||
so that ~~ autothreads, and .ACCEPTS doesn't? | |||
16:17
pragma_ joined
|
|||
TimToady | well, that precludes a simple desugaring implementatoin | 16:17 | |
16:17
pragma_ is now known as Guest52181
|
|||
pmichaud | we can try it and see. | 16:17 | |
(.ACCEPT autothreads) | |||
TimToady | why are you using .ACCEPTS and not the more basic .does? | ||
pmichaud | sorry, "type checking" being more generic than just does | 16:18 | |
16:18
hghgd_ left
|
|||
pmichaud | e.g. sub foo($x where { ... }) { ... } | 16:18 | |
TimToady | so, constraint checking? | ||
pmichaud | right | ||
cono | rakudo: say $*VM<config><osname> | 16:19 | |
p6eval | rakudo ddf224: OUTPUT«linux» | ||
TimToady | okay, lemme think about ACCEPTS s'more while I'm out walking | ||
pmichaud | sure thing. | ||
TimToady | did you see my .reify proposal above? | 16:20 | |
16:20
Ross left
|
|||
pmichaud | I did. | 16:20 | |
masak | swimming & | ||
16:20
masak left
|
|||
pmichaud | I'm waiting for a better definition of cats before jumping on it. :-) | 16:20 | |
16:20
ruoso left
|
|||
pmichaud | but it looks to me like we're just reinventing or copying the laziness model for strings :) | 16:20 | |
TimToady | .oO(you're never quite sure how many lives a cat has remaining...) |
16:21 | |
pmichaud | (which is fine) | ||
TimToady | well, it's positing that the Stringy abstraction can have an underlying impementation that pulls from a lazy list, at least | ||
whether that turns into Ropes Of Unknown Size is anyone's guess | 16:23 | ||
walking & | |||
pmichaud avoids the fire swamp. | |||
rakudo: my Int $b = "4" - 3; | |||
p6eval | rakudo ddf224: OUTPUT«Type check failed for assignment in '&infix:<=>' at line 1 in main program body at line 11:/tmp/luNImBS3qe» | ||
16:24
Ross joined,
dakkar left
|
|||
pmichaud | rakudo: my @a = 1,2,3; say @a min 4; | 16:26 | |
p6eval | rakudo ddf224: OUTPUT«1» | ||
pmichaud | rakudo: my @a = 1,2,3; say +@a min 4; | ||
p6eval | rakudo ddf224: OUTPUT«3» | ||
16:29
thebird left
|
|||
pmichaud | rakudo: say "README" ~~ :f | 16:29 | |
p6eval | rakudo ddf224: OUTPUT«0» | 16:30 | |
pmichaud | rakudo: say "/etc/passwd" ~~ :f | ||
p6eval | rakudo ddf224: OUTPUT«1» | ||
pmichaud | rakudo: say "/etc/passwd" ~~ :s | ||
p6eval | rakudo ddf224: OUTPUT«1» | 16:31 | |
pmichaud | rakudo: say "/etc/passwd" ~~ :d | ||
p6eval | rakudo ddf224: OUTPUT«0» | ||
pmichaud | rakudo: say "/etc" ~~ :d | ||
p6eval | rakudo ddf224: OUTPUT«1» | ||
16:35
ruoso joined,
skids left
16:40
cdarroch joined,
cdarroch left,
cdarroch joined,
ashleydev joined
16:42
ash_ joined
16:43
Guest84429 left
17:02
TiMBuS left
17:04
alester left,
alester joined,
alester left
17:10
timbunce left
17:13
timbunce joined
|
|||
lue | ohai o/ | 17:16 | |
17:16
clintongormley left
17:23
envi^home left
|
|||
quietfanatic | How do I get the modtime of a file? | 17:23 | |
There doesn't seem to be a defined way. | |||
short of run 'stat $_' | 17:24 | ||
17:24
timbunce left
17:27
hercynium left
17:28
patspam left
17:29
eternaleye joined
17:34
Backglass joined
17:35
clintongormley joined
17:36
dtwright joined
17:37
dtwright left
17:41
shade_ joined
|
|||
moritz_ | it seems to be missing indeed | 17:46 | |
probably something like $filename.IO.modification-time or so | 17:47 | ||
17:47
rokoteko_ is now known as rokoteko,
rokoteko left,
rokoteko joined
|
|||
ash_ | $filename.IO.last-modified ? | 17:50 | |
17:50
shade_ left
|
|||
ash_ | (its a bit shorter) | 17:50 | |
17:50
shade_ joined
|
|||
lue | I thought there was a file test for that. | 17:51 | |
(like :e, :f, etc.) | |||
TimToady | file tests only return boolean in p6 | 17:52 | |
quietfanatic | rakudo: say '/etc/passwd'.IO.last-modified | ||
p6eval | rakudo 894e79: OUTPUT«Method 'IO' not found for invocant of class 'Str' in main program body at line 11:/tmp/IcZRPcD3nD» | ||
TimToady | rakudo: say open('/etc/passwd').last-modified | ||
p6eval | rakudo 894e79: OUTPUT«Method 'last-modified' not found for invocant of class 'IO' in main program body at line 11:/tmp/QxUgtP7sE0» | ||
TimToady | rakudo: say open('/etc/passwd').modification-time | ||
p6eval | rakudo 894e79: OUTPUT«Method 'modification-time' not found for invocant of class 'IO' in main program body at line 11:/tmp/JtnVOJuCp3» | ||
TimToady | rakudo: say ~IO.^methods | 17:53 | |
quietfanatic | rakudo: say open('/etc/passwd').^methods(:local) | ||
p6eval | rakudo 894e79: OUTPUT«ins print say open printf t slurp close eof autoflush lines get getc chop tanh split match exp acosh words cotan atan2 lcfirst uc sec cis log substr from-radians sprintf trans sin pred acosec subst sinh cosech abs acosech chomp index ceiling trim asec trim-leading unpolar | ||
..trim-trai… | |||
rakudo 894e79: OUTPUT«getcinsprintsayopenprintftslurpcloseeofautoflushlinesget» | |||
quietfanatic | rakudo: say ~open('/etc/passwd').^methods(:local) | ||
p6eval | rakudo 894e79: OUTPUT«eof autoflush lines get getc ins say print open printf t close slurp» | ||
quietfanatic | what does t do? | ||
rakudo: say open('/etc/passwd').t | 17:54 | ||
p6eval | rakudo 894e79: OUTPUT«0» | ||
TimToady | terminates the file :) | ||
quietfanatic | eheh :) | ||
ash_ | lol | ||
t seems like and odd name for that functionality | 17:55 | ||
TimToady | rakudo: say open('/dev/tty').t | 17:56 | |
p6eval | rakudo 894e79: OUTPUT«0» | ||
lue | I would expect eof | ||
TimToady | I dunno what it does | 17:57 | |
lue | (or eot, if that's where .t gets its name) | ||
.u EOT | |||
phenny | U+C5CD HANGUL SYLLABLE EOT (엍) | ||
ash_ | :t ? | 17:59 | |
jnthn | multi method t() { | ||
$!PIO.isatty; | |||
} | |||
lue | so it checks if it's a terminal? | 18:00 | |
rakudo: say open('/dev/tty0').t | |||
p6eval | rakudo 894e79: OUTPUT«Unable to open filehandle from path '/dev/tty0' in 'open' at line 4807:CORE.setting in main program body at line 11:/tmp/cly5u62_cj» | ||
quietfanatic | rakudo: say "abc.abc" ~~ /^(.*)\.abc$/ | 18:01 | |
p6eval | rakudo 894e79: OUTPUT«» | ||
quietfanatic | So why doesn't this work? | ||
rakudo: say "abc" ~~ /^(.*)$/ | 18:02 | ||
p6eval | rakudo 894e79: OUTPUT«abc» | ||
quietfanatic | rakudo: say ".abc" ~~ /^(.*)\.abc$/ | 18:03 | |
p6eval | rakudo 894e79: OUTPUT«» | ||
quietfanatic | rakudo: say ".abc" ~~ /^(.*?)\.abc$/ | ||
p6eval | rakudo 894e79: OUTPUT«.abc» | ||
quietfanatic | rakudo: say ".abc" ~~ /(.*)\.abc$/ | ||
p6eval | rakudo 894e79: OUTPUT«» | ||
quietfanatic | rakudo: say "abc.abc" ~~ /(.*?)\.abc$/ | ||
p6eval | rakudo 894e79: OUTPUT«.abc» | ||
quietfanatic | rakudo: say "abc.abc" ~~ /^(.*?)\.abc$/ | ||
p6eval | rakudo 894e79: OUTPUT«» | ||
quietfanatic | Lacking backtracking? | ||
tylercurtis | rakudo: say "." ~~ /\./ | 18:04 | |
p6eval | rakudo 894e79: OUTPUT«.» | ||
tylercurtis | rakudo: say ".abc" /^(.*)?\.abc$/ | 18:05 | |
p6eval | rakudo 894e79: OUTPUT«===SORRY!===Confused at line 11, near "say \".abc\""» | ||
tylercurtis | rakudo: say ".abc" ~~ /^(.*)?\.abc$/ | ||
p6eval | rakudo 894e79: OUTPUT«.abc» | ||
quietfanatic | If I can't do that to recognize and remove a file extension I'll have to use rindex and substr. | 18:07 | |
pmichaud | there's a bug in backtracking in captured expressions at the moment | 18:08 | |
but you should be able to do /^ <name>=[.*]\.abc $/ | |||
er | |||
but you should be able to do /^ $<name>=[.*]\.abc $/ | |||
quietfanatic | I'll try that | ||
tylercurtis | rakudo: "abc.abc" ~~ /^ $<name>=[.*] \.abc $/; say $<name> | 18:09 | |
p6eval | rakudo 894e79: OUTPUT«abc» | ||
quietfanatic | That works. Thanks. | 18:10 | |
moritz_ | stackoverflow.com/questions/3196539...l6/3197558 | ||
pmichaud | regex backtracking is the last on my "big issues to fix for Rakudo #31" at the moment. | 18:11 | |
ash_ | moritz_: isn't that because of closures? | ||
pmichaud | I got the other three out of the way this week. :-) | ||
moritz_ | ash_: that's what I've answered | ||
pmichaud: for me, <foo> picking up lexicals, and escapes in char classes are also big issues | 18:12 | ||
pmichaud | moritz_: which is bigger? | ||
i.e., rank the three. :-) | |||
moritz_ | lexicals, escapes, backtracking | 18:13 | |
I know others prefer backtracking though | |||
pmichaud | yeah, backtracking is the one that's likely to give the most pain. | 18:14 | |
anyway, it's likely to be (lexicals|backtracking), escapes | |||
ash_ | rakudo: say "abc.abc" ~~ /(.*?)\.abc$/ | ||
p6eval | rakudo 894e79: OUTPUT«.abc» | ||
pmichaud | ash_: that ends up not helping either | 18:15 | |
ash_ | sorry, i meant to do that in a /msg to p6eval | ||
pmichaud | basically, parenthesized captures and subrules act like they have a ':' immediately following them. | ||
nqp-rx doesn't yet backtrack into them once they've succeeded | |||
18:22
justatheory joined
|
|||
Backglass | Can someone help me to apply a regex to a variable? | 18:26 | |
TimToady | what have you tried? | 18:27 | |
moritz_ | rakudo: say 'abc 123' ~~ /\d+/ | 18:28 | |
p6eval | rakudo 894e79: OUTPUT«123» | ||
Backglass | I'm using a module call WWW:Mechanize for make a regex in url | ||
moritz_ | that sounds like Perl 5 | 18:29 | |
or is there a Perl 6 WWW::Mechanize already? | |||
Backglass | nop | ||
is in perl 6 | |||
sorry | |||
perl 5 | |||
moritz_ | then #perl6 is not quite the right channel to ask | ||
Backglass | but help is a simple regex :S | 18:30 | |
diakopter | simple to whom? | 18:31 | |
Backglass | gist.github.com/467059 | ||
this is my script in perl | |||
i want a url link this valeptr.com/scripts/runner.php?IM=0...d28110375. | 18:32 | ||
but my script show all links in web | |||
diakopter | like moritz_ said, people here are focused on Perl 6 | ||
oh, this probably shouldn't be merely implied: and regexes are quite different in Perl 6 | 18:33 | ||
huf | nah, they're different everywhere, you just made it readily apparent ;) | 18:34 | |
Backglass | Does someone help me? | 18:35 | |
diakopter | doesn't look like it, so far. I wouldn't bet on it | 18:36 | |
moritz_ | Backglass: is there anything that prevents you from joining a perl 5 channel, and ask for help where it's appropriate? | ||
[particle] | head on over to #perl, they'll help you there | ||
Backglass | ok | ||
thanks | |||
I go to #perl channel | |||
18:37
Backglass left
|
|||
[particle] | it's better to give options for more help, rather than simply refusing to help | 18:38 | |
dalek | p-rx: 70f4eb7 | moritz++ | src/Regex/P6Regex/Actions.pm: put AST generation for named assertions into a separate method |
18:44 | |
lue | (Go Germany...) | 18:46 | |
moritz_ | "Schland" | 18:47 | |
lue: www.youtube.com/watch?v=JFd9JvyFRYo | |||
lue | s/Germany/Deutschland/ danke for reminding me :) | ||
Aw, I can't haz flash :( | |||
moritz_ | clive $url; mplayer $generated_flv_file; | 18:48 | |
18:48
skids joined
|
|||
moritz_ | can I generate a PAST that does one things if a lexical exists, and something else if it doesn't? | 18:48 | |
oh noez, I can see another problem coming up | 18:49 | ||
sub print(*@args) vs. <print> for printable characters | 18:50 | ||
18:51
shade_ left
18:52
shade_ joined
|
|||
lue | rakudo: my @a; my @b; say @a[1..3].WHAT | 18:57 | |
p6eval | rakudo 894e79: OUTPUT«Parcel()» | ||
lue | rakudo: my @a = Nil; my @b; say @a[1..3].WHAT | 18:58 | |
p6eval | rakudo 894e79: OUTPUT«Parcel()» | ||
19:03
cono left
19:04
shade_ left,
shade_ joined
19:05
cono joined
19:07
pmurias joined
|
|||
pmurias | sorear: ping | 19:07 | |
19:09
timbunce joined,
eternaleye left
19:18
timbunce left
|
|||
lue | > my @a = 1,2,3,4; @a[2..3] := @a[0..1]; say @a.perl | 19:19 | |
[1, 2, 3, 4] | |||
well, at least now I know list binding is the issue. | |||
(not Nil being incorrectly handled) | 19:20 | ||
pmichaud | lue: | 19:21 | |
15:42 <pmichaud> TimToady: do we allow "list binding"? e.g., @a[1,2] := ($x, $y); | |||
15:42 <pmichaud> (please say "no") | |||
15:43 <TimToady> we can say no for now | |||
sorear | pmurias: hi | ||
good morning #perl6 | |||
sorear -> backlog | |||
lue | pmichaud: I bet the was a forced answer :) | 19:24 | |
s/the/that/ | |||
pmichaud | it actually wouldn't be all that hard to implement, but it might be tricky to parse. | 19:26 | |
we'd have to do the same sorts of things for := that we're doing with = now. | |||
anyway, "no for now" is the answer I'm going with. :) | |||
sorear back | |||
lue | There is a way, which I pasted last night: | 19:27 | |
> my @a = 1,2,3; @a[$_+3] := @a[$_] for 0..2; say @a.perl | |||
[1, 2, 3, 1, 2, 3] | |||
tylercurtis | rakudo: my @y = 0, 0, 0, 0; my $x; my $z; [+=] $x, @y, $z, 1; say ($x, @y, $z).join(' ') | ||
p6eval | rakudo 894e79: OUTPUT«Any() 0 0 0 0 Any()» | ||
lue | So I can use that until it works. I have been thinking about it (w/o looking at assign.pir), and the apparent issue is differently sized lists on either side. | 19:28 | |
methinks that would require spec clarity first, to be on the safe side. | 19:29 | ||
tylercurtis | Does Rakudo not support reduction of assignment ops? | 19:30 | |
lue | [ good discussion for a not-world-cup time :) ] | ||
pmichaud | tylercurtis: what result were you expecting, ooc? | 19:32 | |
tylercurtis | According to S03, "[+=] $x, @y, $z, 1" is equivalent to "$x += @y[0] += @y[1] += @y[2] ... @y[*-1] += $z += 1", so I was expecting it to output "6 5 4 3 2 1". | 19:33 | |
pmichaud | seems reasonable. :-) | ||
my $x; my @y = 0, 0, 0, 0; my $z; $x += @y[0] += @y[1] += @y[2] += $z += 1; say ($x, @y, $z).join(' ') | 19:34 | ||
rakudo: my $x; my @y = 0, 0, 0, 0; my $z; $x += @y[0] += @y[1] += @y[2] += $z += 1; say ($x, @y, $z).join(' ') | |||
p6eval | rakudo 894e79: OUTPUT«1 1 1 1 0 1» | ||
pmichaud | rakudo: my $x; my @y = 0, 0, 0; my $z; $x += @y[0] += @y[1] += @y[2] += $z += 1; say ($x, @y, $z).join(' ') | 19:35 | |
p6eval | rakudo 894e79: OUTPUT«1 1 1 1 1» | ||
pmichaud | however, looks like the result is 1, 1, 1, 1, 1 :-P | ||
19:35
rhr left
|
|||
ash_ | rakudo: my 'foo' | 19:37 | |
oops | |||
p6eval | rakudo 894e79: OUTPUT«===SORRY!===Malformed my at line 11, near "'foo'"» | ||
tylercurtis | rakudo: my $x; my @y = 0, 0, 0; my $z; $x = @y[0] = @y[1] = @y[2] = $z = 5; say ($x, @y, $z).join(' ') | ||
p6eval | rakudo 894e79: OUTPUT«5 0 5 5 5» | ||
lue | rakudo: my $x; my @y = 0, 0, 0; my $z; $x = @y[0] = @y[1] = @y[2] = $z = 5; say "$x [@y] $z" | 19:38 | |
p6eval | rakudo 894e79: OUTPUT«5 [@y] 5» | ||
tylercurtis | my $x; my @y = 0, 0, 0; my $z; [=] $x, @y, $z, 5; say ($x, @y, $z).join(' ') | ||
lue | be that an interpolation bug? | ||
19:39
takadonet left
|
|||
tylercurtis | rakudo: my $x; my @y = 0, 0, 0; my $z; [=] $x, @y, $z, 5; say ($x, @y, $z).join(' ') | 19:39 | |
p6eval | rakudo 894e79: OUTPUT«Any() 0 0 0 Any()» | ||
tylercurtis | rakudo: my $x; my @y = 0, 0, 0; my $z; $x = @y[0] = @y[1] = @y[2] = $z = 5; say "$x [@y[]] $z" | 19:40 | |
p6eval | rakudo 894e79: OUTPUT«5 [0 5 5] 5» | ||
tylercurtis | lue: there you go. | ||
lue | ah. wonder why [@y] didn't interpolate though. | ||
moritz_ | because arrays and hashes only interpolate when there are trailing postcircumfixes. | 19:41 | |
pmichaud | @-variables don't interpolate until suffixed with a postcircumfi.... right | ||
that way we don't have to worry about [email@hidden.address] suddenly trying to interpolate @yahoo or @yahoo.com | |||
19:41
Guest43164 left
|
|||
lue | rakudo: my $x; my @y = 0, 0, 0; my $z; $x = @y[0] = @y[1] = @y[2] = $z = 5; say "$x [{@y}] $z" | 19:41 | |
p6eval | rakudo 894e79: OUTPUT«5 [0 5 5] 5» | 19:42 | |
lue | :D | ||
pmichaud | yes, that's my preferred way of handling it :) | ||
lue thinks of silly frenchman | |||
"And your father smelt of elderberries!" | |||
19:43
clintongormley left
|
|||
tylercurtis -> recreational activities for a few hours. | 19:43 | ||
19:43
tylercurtis left
|
|||
lue | what if your email is me@brac[]ket.com? | 19:43 | |
rakudo: say "what if your email is me@brac[]ket.com?" | 19:44 | ||
p6eval | rakudo 894e79: OUTPUT«===SORRY!===Symbol '@brac' not predeclared in <anonymous> (/tmp/mKSh2fK0Es:11)» | ||
[Coke] | then use single quotes. | ||
pmichaud | or backwhack the @ | 19:45 | |
or get a real email address | |||
lue | :) | ||
Tene | [] in domains? | ||
pmichaud | or live comfortably knowing that you aren't going to get caught up on some spam lists | ||
[Coke] | tene: no doubt the third great expansion of TLDs will include arbitrary unicode. | ||
[particle] | abc@def is a valid email address | 19:46 | |
lue | they already allow Chinese (approved just recently) | ||
[particle] | so you could print [] directly afterward | ||
i mean, it'd be a valid thing to do generally, not in perl 6 | |||
lue | .oO(∫upermath.net) |
||
19:50
shade_ is now known as shade\
19:54
rhr joined
19:56
justatheory left
|
|||
moritz_ | moritz.faui2k3.org/tmp/waffle.jpg # part of my dinner tonight :-) | 19:57 | |
19:58
Guest43164 joined
|
|||
TimToady | phone | 20:00 | |
jnthn | moritz_: oooh, that looks tasty! | ||
moritz_ | jnthn: it was :-) | 20:01 | |
sorear | Tene: iirc the only illegal characters in domain names are NUL, NL, and TAB | ||
(bind 1 used a tab-delimited data file!) | |||
Trashlord | null | ||
lue | aah! Spain got a goal *sob* | 20:02 | |
jnthn | lue: Yeah... :-/ | ||
Trashlord | so, is it 1 - 0 for spain? | ||
moritz_ | well deserved, even if I don't like it | ||
jnthn | That won't get Germany any Klose to the final... | ||
<ducks> | |||
lue is currently engrossed in the world cup. Sorry for the intermittent appearance. | |||
Trashlord | er | ||
I was hoping for a Netherlands - Germany final | 20:03 | ||
and a German victory | |||
ascent_ | there will be Netherlands - Spain final, and Netherlands victory (yeah) :P | 20:04 | |
Trashlord | Germany played very well throughout the entire tournament, they deserve to win for their high quality and very entertaining football, imo | 20:05 | |
PerlJam | Trashlord: they deserve to win if they score more goals than spain ;) | 20:06 | |
20:06
Guest52181 left,
Guest52181 joined
|
|||
Trashlord | or if they concede less ;p | 20:06 | |
cognominal | is this the #perl6 channel? :) | ||
moritz_ | cognominal: not sure... :-) | ||
20:06
Guest52181 is now known as pragma_
|
|||
Trashlord | it might be | 20:06 | |
jnthn | I've been surprised...I expected Germany to do better than this again Spain. | ||
moritz_ | seems like #europe right now | ||
PerlJam | There's a reason it's called the "World Cup" | 20:07 | |
20:07
unik joined
20:08
eternaleye joined
20:09
macdaddy joined,
macdaddy is now known as Guest5559
|
|||
unik | p6eval rakudo: multi sub fib(Int $x where 0) { 0 }; multi sub fib(Int $x where 1) { 1 }; multi sub fib(Int $x where { $x > 1 }) { fib($x - 2) + fib($x - 1) }; my $val = 0 .. 10; $val.map: fib; | 20:13 | |
p6eval | unik: rakudo 894e79: OUTPUT«No applicable candidates found to dispatch to for 'fib'. Available candidates are::(Int $x where ({ ... })):(Int $x where ({ ... })):(Int $x where ({ ... })) in main program body at line 11:/tmp/Q0DlIQx48j» | ||
20:13
lest_away is now known as lestrrat
|
|||
unik | p6eval rakudo: multi sub fib(Int $x where 0) { 0 }; multi sub fib(Int $x where 1) { 1 }; multi sub fib(Int $x) { fib($x - 2) + fib($x - 1) }; my $val = 0 .. 10; $val.map: fib; | 20:14 | |
p6eval | unik: rakudo 894e79: OUTPUT«No applicable candidates found to dispatch to for 'fib'. Available candidates are::(Int $x where ({ ... })):(Int $x where ({ ... })):(Int $x) in main program body at line 11:/tmp/8oMXUeNYKx» | ||
20:15
eternaleye left
|
|||
PerlJam wonders if you can use a proto to define a default to OUTER::<$_> once | 20:18 | ||
moritz_ | unik: try $val.map: &fib | ||
unik: otherwise fib() is called first, and the result is passed to map() | |||
20:19
tadzik joined
|
|||
moritz_ | rakudo: multi sub fib(Int $x where 0) { 0 }; multi sub fib(Int $x where 1) { 1 }; multi sub fib(Int $x) { fib($x - 2) + fib($x - 1) }; my $val = 0 .. 10; $val.map: &fib | 20:19 | |
p6eval | rakudo 894e79: ( no output ) | ||
moritz_ | rakudo: multi sub fib(Int $x where 0) { 0 }; multi sub fib(Int $x where 1) { 1 }; multi sub fib(Int $x) { fib($x - 2) + fib($x - 1) }; my $val = 0 .. 10; say $val.map: &fib | ||
p6eval | rakudo 894e79: ( no output ) | ||
moritz_ | uhm. | ||
jnthn | oddness. | 20:21 | |
20:21
Ross left
20:22
Ross joined
|
|||
jnthn | rakudo: multi fib(0) { 0 }; multi fib(1) { 1 }; multi fib($x) { fib($x - 2) + fib($x - 1) }; say fib(0); say fib(1); say fib(2); | 20:22 | |
p6eval | rakudo 894e79: OUTPUT«011» | ||
jnthn | rakudo: multi fib(0) { 0 }; multi fib(1) { 1 }; multi fib($x) { fib($x - 2) + fib($x - 1) }; my $r = 0 .. 10; say $r.map(&fib); | 20:23 | |
p6eval | rakudo 894e79: ( no output ) | ||
jnthn | rakudo: multi fib(0) { 0 }; multi fib(1) { 1 }; multi fib($x) { fib($x - 2) + fib($x - 1) }; say (0..10).map(&fib); | ||
p6eval | rakudo 894e79: ( no output ) | ||
jnthn | rakudo: multi fib(0) { 0 }; multi fib(1) { 1 }; multi fib($x) { fib($x - 2) + fib($x - 1) }; say (0..10).map(&fib).eager; | ||
moritz_ | WTBH? | ||
p6eval | rakudo 894e79: OUTPUT«Method 'count' not found for invocant of class 'Perl6MultiSub' in main program body at line 1» | ||
jnthn | wtf | ||
oh | |||
unik | p6eval rakudo: my $a = 0 .. 10; $a.map: { say $^a } | ||
moritz_ | but shouldn't say() be eager? | ||
jnthn | map + multi = boom? | 20:24 | |
p6eval | unik: rakudo 894e79: ( no output ) | ||
jnthn | moritz_: I thought that too | ||
moritz_: Was just trying to tease out what's really wrong. | |||
moritz_ | map + multi == boom, right | ||
jnthn | Looks like map wants to .count | ||
hugme: hug lue_sad | 20:25 | ||
hugme hugs lue_sad | |||
unik | also, is it ok now that fib(N) where N is slightly above 19 eats loads of RAM and never seems to exit? | ||
i just couldn't wait long enough for it to exit, fearing OOM killer will bork my workstation | 20:27 | ||
moritz_ | unik: yes, the recursive implementation tries to run 2**19 sub invocations | ||
rakudo: say (0, 1, *+* ... *)[19] | |||
p6eval | rakudo 894e79: OUTPUT«4181» | ||
moritz_ | that's an iterative, more elegant version that doesn't blow all up | ||
unik | nice | ||
moritz_ | rakudo: say ~(0, 1, *+* ... *)[^10] | ||
p6eval | rakudo 894e79: OUTPUT«0 1 1 2 3 5 8 13 21 34» | 20:28 | |
moritz_ | unlike haskell, Perl 6 can't easily do purity analysis and cache pure functions | ||
unik | it's stringified slice of a lazy list? | ||
20:28
saaki left
|
|||
moritz_ | yes | 20:31 | |
20:32
justatheory joined
20:33
saaki joined
|
|||
unik | p6eval rakudo: my $a = 0 .. 10; ~$a.map: { say $^a } | 20:34 | |
p6eval | unik: rakudo 894e79: OUTPUT«012345678910» | ||
TimToady | jnthn: that .count should become simpler when &fib is a proto wrapper | 20:36 | |
jnthn | TimToady: Yeah | ||
TimToady | also thinking that perhaps we allow the form: proto foo ($sig); | 20:37 | |
where semicolon form means "write the body for me" | |||
jnthn | TimToady: I guess .signature is the signature of the proto too? | ||
Eww | |||
20:37
aindilis joined
|
|||
jnthn | I'd rather not do that unless we allow it as a general shorthand for { ... } | 20:37 | |
moritz_ | I like that better than a magical empty function body | ||
TimToady | or maybe {*} | 20:38 | |
jnthn | Would proto foo($sig) { ... } be an auto-written proto? | ||
Or a stub? | |||
pmichaud | we can do count on multis -- just haven't implemented it yet. | ||
TimToady | I think it's best not to confuse stubs with auto-writes | ||
pmichaud | at least good enough to get past map. :-) | ||
(and map shouldn't be using .count anyway.) | 20:39 | ||
jnthn | TimToady: Then probably <...> in regexes also wants to change. | ||
pmichaud | (it's a cheat for now) | ||
TimToady | yes, map should be using partial binding | ||
moritz_ | which isn't specced yet, right? | ||
TimToady | jnthn: I was going to change <...> anyway | ||
20:39
rhr left
|
|||
TimToady | since {...} means the same, though now maybe we'll get {*} back to mean call the multies | 20:40 | |
jnthn | proto foo($sig) { * } | ||
or | |||
20:40
masak joined
|
|||
jnthn | proto foo($sig) { {*} } | 20:40 | |
? | |||
masak | ahoy! | ||
jnthn | lolitsmasak! | ||
moritz_ stares at a round tuit | 20:41 | ||
masak | moritz_: thanks for the link to the Knuth talk. I'd been wanting to see that talk. | ||
TimToady | just {*} in proto sub, { {*} } in proto regex | ||
though I suppose we could allow the special form on regexen too | |||
since * can't stand alone in a regex | |||
moritz_ | masak: you're welcome. | ||
TimToady | we might want to distinguish {*} from nextsame/callsame anyway | 20:43 | |
masak | TimToady: can we make the spec change `slurp($filename)` -> `slurp($filename.IO)` now? I think it's a good idea, and would like to see it go into Rakudo before Star. | ||
ditto `$filename.IO ~~ :e`, actually. | |||
TimToady | if we always start the multi dispatch with {*}, then nextsame can always refer to the outer | ||
without playing lastcall tricks | |||
20:45
spinclad_ is now known as spinclad
|
|||
lue | hai masak o/ | 20:45 | |
masak | woo, the StackOverflow question that moritz_++ linked to (and answered) previously makes me happy. # stackoverflow.com/questions/3196539...l6/3197558 | ||
lue: \o | |||
jnthn | TimToady: So it's up to the proto if we then go deferring inheritance wise? | ||
TimToady | hmm, not sure about slurp, since slurp($string) would then be a no-op; was more concerned about the difference between "splitters" like words and lines | ||
masak | one, because it's a rather advanced question. two, because it's fixed in Rakudo already :) | 20:46 | |
PerlJam | moritz, masak: what knuth talk? | ||
masak | PerlJam: grep today's logs for "Knuth". | ||
TimToady | yes, assuming that {*} can also be used internally as well as the whole body, you could redispatch with proto fib ($x) { {*}; nextsame } | ||
20:47
patspam joined
|
|||
moritz_ | PerlJam: announcing the successor of TeX | 20:47 | |
jnthn | slurp imo loses its usefulness if it can't just be given a filename | ||
masak | PerlJam: in it, he's revealing his new application, iTex <pingeling> | ||
jnthn | I see it more like open | ||
TimToady | well open-close | ||
jnthn | TimToady: Could work | ||
TimToady: close doesn't take a file name :-P | 20:48 | ||
TimToady: But yes :-) | |||
TimToady: Are we going to parse {*} as a magical term? | |||
masak | what was the ultimate rationale for changing it? making words() and lines() more alike, no? | ||
TimToady | yes, but slurp isn't one of those | 20:49 | |
lue | .oO(work on NES emulator, or tackle the foreign code import mechanism...) |
||
TimToady | so Str.words and Str.lines always just split the string, and you have to use IO.words or IO.lines to read; however... | ||
words() and lines() can still default to $*ARGFILES input | 20:50 | ||
lue goes for foreign code. | |||
moritz_ | +1 | ||
(to TimToady) | |||
masak | this Backglass fellow who entered earlier has been chatting me up three times. I watched his script evolve gradually. I never gave him any specific tips, just pointed to CPAN modules that seemed appropriate. he grew increasingly insistent. | 20:51 | |
TimToady | alternately, we have a default IO that you always say IO.lines or IO.words | ||
where "IO" is negotiable | |||
masak | I should probably be more brusque from the start. | ||
TimToady: I like just words() and lines() | |||
TimToady | I don't | 20:52 | |
jnthn | masak: I love that in the dictionary one definition of that word is "ungracious harshness" :-) | ||
TimToady | because the () is required in a for loop | ||
masak | TimToady: will it still gobble the block if I forget the parens? | ||
moritz_ | std: for lines { } | ||
p6eval | std 31567: OUTPUT«===SORRY!===Function 'lines' needs parens to avoid gobbling block at /tmp/_LG5S8EOdK line 1:------> for lines⏏ { }Missing block (apparently gobbled by 'lines') at /tmp/_LG5S8EOdK line 1:------> for lines { }⏏<EOL> | ||
..expe… | |||
masak | jnthn: oh, did I do the word thing again? sorry :P | ||
jnthn | :P | ||
TimToady | druther have something like: for slurp.lines {...} | ||
masak | jnthn: I should be less circumspect in my explications. | 20:53 | |
jnthn | Not unless you want to the whole file | ||
masak .oO(I accidentally the whole file ) | |||
TimToady: slurp.lines looks non-lazy to me, like jnthn said. | |||
diakopter | or more perspicuous | 20:54 | |
TimToady | which is why I mentioned: for cat.lines {...} | ||
the other day | |||
moritz_ | please don't make IO rely on lazy strings | ||
jnthn | What moritz_ said. | ||
moritz_ | it took us so long to get proper lazy lists and arrays | 20:55 | |
TimToady | yes, well, what we really need is something short that means the IO of $*ARGFILES | ||
moritz_ | I don't want to wait another few years to do proper IO | ||
diakopter | but.. in theory, they're optimizable...... | ||
masak | TimToady: we don't have a cat, so that's not an option Right Now(TM). | ||
[particle] | .oO(something like the fish operator) |
||
TimToady | we want mumble.lines where mumble is something short for $*ARGFILES.IO | ||
masak | input.lines | 20:56 | |
lue | .oO($*AFIO ?) |
||
moritz_ | +1 to a term-like input | ||
20:56
rhr joined
|
|||
diakopter | I like mumble | 20:57 | |
TimToady | "IN" maybe | ||
hmm, too much like $*IN | |||
masak | too similar to $*IN | ||
TimToady: what TimToady said. | |||
TimToady | I am beside myself. | 20:58 | |
masak | why am I suddenly seeing double? | ||
TimToady | ohoh | ||
diakopter does a double gather | |||
pmurias | sorear: so we want viv to prepend Perl6:: to package names when translating p6 to p5? | ||
lue | (That's *my* TARDIS, TimToady) | ||
masak | I thought we fixed the cloning bug! :) | ||
lue | Looks like my biggest hurdle to foreign code is the spec. S21 makes it apparent :) | 21:00 | |
masak | std: class A { method foo { $!b } } | ||
p6eval | std 31567: OUTPUT«ok 00:01 108m» | ||
masak | theoretically, one could detect direct references to nonexistent attributes, right? | 21:01 | |
TimToady | nodnod | ||
masak | just checking. | ||
21:01
diakopter sets mode: +v masak
|
|||
masak | for example, they're always wrong in a disconnected method. | 21:01 | |
diakopter | hugme: hug masakbot | 21:02 | |
hugme hugs masakbot | |||
masak purrs | |||
jnthn | masak: We will :-) | ||
moritz_ | rakudo: class Foo { method x { $!b } } | ||
p6eval | rakudo 894e79: ( no output ) | ||
masak | jnthn: when? | ||
jnthn | masak: Probably after R* as part of object guts chnages. | 21:03 | |
moritz_ | jnthn: speaking of attributes... is there any (hacky) way to set a parent attribute? | ||
21:03
DarkWolf84 joined
|
|||
jnthn | moritz_: Eww | 21:03 | |
moritz_: From PIR? | |||
masak | DarkWolf84! \o/ | ||
moritz_ | jnthn: Perl 6 or PIR | ||
DarkWolf84 | hello | ||
hi masak | |||
pmichaud | if there's not a name collection, $!attribute works just fine. | 21:04 | |
jnthn | setattribute obj, ['Parent';'Name'], '$!attr', value | ||
pmichaud | *collision | ||
masak | DarkWolf84: welcome back to the party! \o/ | ||
moritz_ | jnthn: I want to write a Match.new... but the actual attribute is stored in Regex::Match | ||
ah, thanks | |||
pugssvn | r31568 | kyle++ | Delete empty directories. | ||
DarkWolf84 | I have a little question | 21:05 | |
how to delete a var | |||
masak | DarkWolf84: how do you mean? | ||
like, set it to its initial state? | |||
moritz_ | undefine($x) | ||
DarkWolf84 | undefine just makes $foo to be Any | ||
masak | $var = Nil; works too | 21:06 | |
moritz_ | it's a bit wrong right now | ||
DarkWolf84 | but $var exists | ||
PerlJam | DarkWolf84: you mean you want to eradicate the var from whatever symbol table it happens to live in? | ||
DarkWolf84 | yeah | ||
moritz_ | no way | ||
masak | rakudo: my @a = 1, 2, 3, 4, 0; @a .= [@a]; say @a.perl | ||
p6eval | rakudo 894e79: OUTPUT«Method '!postcircumfix:<[ ]>' not found for invocant of class 'Array' in main program body at line 11:/tmp/lVjyAC6JuO» | ||
moritz_ | existance of variables is a compile-time property | 21:07 | |
masak | p6eval: what? :) | ||
masak submits rakudobug | |||
rakudo: my @a = 1, 2, 3, 4, 0; @a = @a[@a]; say @a.perl | |||
pmichaud | I hate to mention this (and I know it goes against tradition), but part of me now thinks that "slurp()" ought to do what lines() currently does. | ||
p6eval | rakudo 894e79: OUTPUT«[2, 3, 4, 0, 1]» | ||
pmichaud | i.e., it should return a list of elements, and we have something else that means "give us the string" | ||
DarkWolf84 | will a $var wich is Any be GC | ||
pmichaud | rationale: slurpy arrays and slurpy hashes are lists of elements | ||
DarkWolf84 | sorry for the bad english | ||
masak | DarkWolf84: no, it won't. | ||
moritz_ | setattribute self ['Regex';'Match'], '$!from', from | 21:08 | |
DarkWolf84 | too bad | ||
moritz_ | The opcode 'setattribute_p_kc_sc_p' (setattribute<4>) was not found. Check the type and number of the arguments | ||
masak | DarkWolf84: easiest way to make a var go out of scope, is to end the scope :) | ||
moritz_ | oh, forgot a comma | ||
DarkWolf84 | yeah the local vars help | ||
masak | rakudo: my @a = 1, 2; @a.=[1]; say @a.perl | ||
p6eval | rakudo 894e79: OUTPUT«===SORRY!===Can not use .= on a non-identifier method call at line 11, near "; say @a.p"» | ||
jnthn | If you have some large data structure in a $var and you undefine it, what it used to hold will be GC'd. | 21:09 | |
pmichaud | moritz_: won't .new initialize the attribute anyway without having to do something special? | ||
21:09
pmurias left
|
|||
masak | I like this error message better. | 21:09 | |
DarkWolf84 | that means now REPL will memory leack over time | ||
masak | right. the difference between variables and values. | ||
pmichaud wonders about "REPL will memory leak..." | |||
masak | DarkWolf84: not any worse than the corresponding program would. | 21:10 | |
21:10
tylercurtis joined
|
|||
moritz_ | pmichaud: it does not | 21:10 | |
rakudo: say Match.new(from => 1, to => 5).perl | |||
p6eval | rakudo 894e79: OUTPUT«Match.new( # WARNING: this is not working perl code # and for debugging purposes only from => Any(), orig => Any, to => Any(),)» | ||
pmichaud | moritz_: hmm, that seems odd. | ||
DarkWolf84 | I think there should be some way to GC the defined objects/vars | 21:11 | |
pmichaud | DarkWolf84: undefine() will do that. | ||
tylercurtis | Hi. | ||
moritz_ | rakudo: class Parent { has $.bla }; class Child is Parent { }; say Child.new(bla => 5).bla | ||
p6eval | rakudo 894e79: OUTPUT«5» | ||
pmichaud | moritz_: I'm a little surprised by that. | ||
jnthn | I think that's spec. | ||
moritz_ | pmichaud: maybe it's because Regex::Match is a foreign object? | ||
pmichaud | I mean I'm surprised that it doesn't work for Regex::Match | ||
jnthn | oh | 21:12 | |
lue | rakudo: my $a; my $a = Mu; say $a | ||
pmichaud | Regex::Match isn't all that foreign, though. | ||
p6eval | rakudo 894e79: OUTPUT«===SORRY!===Redeclaration of symbol $a at line 11, near " = Mu; say"» | ||
jnthn | pmichaud: Yeah, see your point. | ||
lue | rakudo: my $a; $a = Mu; say $a | ||
p6eval | rakudo 894e79: OUTPUT«Mu()» | ||
jnthn is also a bit surprised. | |||
pmichaud | I mean, IIRC the default BUILD just walks through the objects attributes and does initializations. | ||
a-ha | |||
maybe the problem is that Regex::Match needs a BUILD | |||
masak | rakudo: multi fib(0) { 0 }; multi fib(1) { 1 }; multi fib($x) { fib($x - 2) + fib($x - 1) }; say (0..10).map(&fib).eager; # did anyone submit this to RT? | ||
p6eval | rakudo 894e79: OUTPUT«Method 'count' not found for invocant of class 'Perl6MultiSub' in main program body at line 1» | ||
jnthn | pmichaud: oh, that makes sense. | 21:13 | |
moritz_ | rakudo: say Regex::Match.new(from => 3).from | ||
p6eval | rakudo 894e79: OUTPUT«Null PMC access in type() in main program body at line 11:/tmp/Rtki_Mk9Tc» | ||
masak submits rakudobug | |||
(the Null PMC access one) | |||
moritz_ | masak: don't. Regex::Match isn't spec | ||
masak | oh, right. | ||
moritz_ retires | |||
masak | but shouldn't we eradi... oh, forget it. | ||
pmichaud | we should be able to get Regex::Match to disappear at some point, yes. | 21:14 | |
masak | I meant the Null PMC access. | ||
submitting tickets on those are reflex nowadays. | |||
and I'm not sure "this class is not spec" is a justified excuse not to. | |||
pmichaud | well, if Regex::Match goes away, you won't be able to .new to get the NPA in the first place. :-) | 21:15 | |
masak | I realize that. just like every other *bug* *fix*. :P | ||
is there a "Regex::Match should go away" ticket in RT? | 21:16 | ||
pmichaud | no. But if you want to start filing those, I can give you a long list. | ||
masak | huh. | ||
pmichaud | there's quite a bit that's "visible" currently that perhaps ought not to be, or that isn't really part of the spec. | 21:17 | |
like many of our "helper subs" | |||
masak | nod | ||
DarkWolf84 | rakudo {my $a = 42; $a.say;}; $a.say | ||
oops | |||
rakudo: {my $a = 42; $a.say;}; $a.say | |||
p6eval | rakudo 894e79: OUTPUT«===SORRY!===Symbol '$a' not predeclared in <anonymous> (/tmp/iFdccWkSCe:11)» | ||
DarkWolf84 | yes | ||
rakudo: my $a = 42; $a = Nil; $a.say; | 21:18 | ||
p6eval | rakudo 894e79: OUTPUT«Any()» | ||
DarkWolf84 | that's what I mean | 21:19 | |
$a will not be GC-ed | |||
TimToady | if "io" is the ingy-esque lazy IO thingy, then it's just: for io.lines {...} | ||
masak | DarkWolf84: *variables* aren't GC-ed. *objects* are. | 21:20 | |
21:20
wp6ft joined
|
|||
lue | DarkWolf84: If I may ask, why do want to delete a variable? | 21:21 | |
masak | TimToady: it feelsn't like a straight line between $*ARGFILES.IO and that. | ||
lue | (do *you* want) | 21:22 | |
21:22
wp6ft left
|
|||
DarkWolf84 | masak: but aren't they leacking the memmory that way | 21:22 | |
21:22
shade\ left
|
|||
DarkWolf84 | s/memmory/memory/ | 21:22 | |
Any is an object isn't it? | 21:23 | ||
masak | DarkWolf84: ok, so "leaking memory" usually refers to allocating something and then never de-allocating it. just making sure we're agreed on that. | ||
DarkWolf84 | yeah the C pointers are that way | 21:24 | |
masak | DarkWolf84: Any is an object. one which has plenty of live references to it in a Perl 6 program :) | ||
for example, many routines in the setting have Any as a parameter type. | |||
especially as it's the default type for parameters. | 21:25 | ||
cognominal | I don't find Knuth funny, he seems embiterred by all the new technology and marketting. Like if everything new was bad. Sounds similar to some perl5 crowd taking cheap shots at Perl 6. | ||
masak | cognominal: I didn't find it bitter. but he does put it in some well-needed perspective. | ||
21:26
tadzik left
|
|||
PerlJam | I didn't get "bitter" from Knuth either. | 21:26 | |
DarkWolf84 | masak, I think I've got the idea | 21:27 | |
21:27
Guest43164 left
|
|||
DarkWolf84 | $foo just points the Any() object when it's undefined | 21:28 | |
masak | actually, I couldn't decide if an iTex living up to the spec in the presentation would be the Last Application Ever (and as such, fully desirable), or just Modern Tech Buzzword Overload. I kept flip-flopping between the two. | ||
Tene | I still don't follow what's happened with Knuth. Did he actually release something new, or not? I've seen a couple of links to a video, but I haven't had time to sit down and watch a video yet. | ||
cognominal | Except at the language level (objC sigh), I find the iStuff good. I wish free software facing end users to be half as good. | ||
masak | Tene: there won't be any doubts after you watch the video :) | ||
Tene | :) | 21:29 | |
21:32
unik left
21:33
Ross left
|
|||
spinclad | .u CHI | 21:37 | |
phenny | U+2627 CHI RHO (☧) | ||
masak | as in "CHI RHO practor". | ||
spinclad | i thought the saddest thing (well, going to the opposite of FLOSS aside) was his caving on how to pronounce '\c[GREEK UPPERCASE CHI]' | ||
masak | spinclad: he failed to pronounce it 'x' a number of times after that himself :P | 21:38 | |
lue | when I first read of iTex, I had to sit there for a moment. | ||
spinclad | but he seemed to keep forgetting to go with the vulgus mobile | ||
21:39
silug left
|
|||
cognominal | masak++ # a good pun is a bad one. | 21:39 | |
lue | I haven't seen the videos (and can't), but iTex sounds like a joke (based on a short description, of course) | ||
masak | cognominal: wasn't aware I made one. but thanks. | ||
lue: you should also see the vid, to be completely sure. | 21:40 | ||
spinclad | CH R istian science: CHI RHO praxis | ||
masak | pmichaud: did that IO::Prompter module ever make it online? | ||
lue | if only I could... even if isn't flash, my poor old laptop can't handle good video. | 21:41 | |
[ would you like to make a donation? :) ] | |||
masak | I can give you a hug. | ||
hugme: hug lue | |||
hugme hugs lue and blushes | |||
lue | (I'm not a fan of Flash anyway) | 21:42 | |
21:46
alester joined,
rhr left,
ash_ left,
LionMadeOfLions left,
athomason left
21:47
shade_ joined
21:49
ruoso left,
rhr joined,
ash_ joined,
LionMadeOfLions joined,
athomason joined
21:53
rhr left,
ash_ left,
LionMadeOfLions left,
athomason left
|
|||
spinclad | masak: re gist.github.com/464349, a sweet improvement. One note: "This will need to fall back to hash access [on] indirect lookup ($::'$a')": (more) | 21:56 | |
masak waits, hopefully, for more | 21:59 | ||
spinclad | seems to me this involves a static hash from strings ('$a') to accessors ($access = {[0, 0]}) and a way to apply them (fetch $access; store $access, $2) | ||
21:59
rhr joined,
ash_ joined,
athomason joined
|
|||
spinclad | and the static hash goes in the static lexpad | 22:00 | |
masak | hm. | ||
that seems right. | 22:01 | ||
spinclad | (i don't expect this literal use of $access; i expect it would have to get compiled into a few operations each) | ||
masak | I will remember that for when we do indirect lookup. | ||
slavik | what is yapsi? | 22:05 | |
22:05
skangas left
|
|||
masak | slavik: it's a compiler/runtime I'm writing on my spare time, along with a bunch of other people -- notably snarkyboojum++ and isBEKaml++. | 22:07 | |
spinclad | yapsi is Perl 6's first 'complete', 'official' implementation (see masak's release announcements: use.perl.org/~masak/journal/40429) | 22:08 | |
masak | oh yeah, that too. :P | ||
in the long run, Yapsi's PR staff is so screwed. :) | 22:09 | ||
tylercurtis | masak: Aren't you Yapsi's PR staff? | ||
22:09
skangas joined
|
|||
masak | tylercurtis: d'oh! | 22:09 | |
DarkWolf84 | that's a secret | 22:10 | |
:) | |||
masak | speaking of which -- download Yapsi today! github.com/masak/yapsi/downloads | 22:11 | |
you know you want to. :> | |||
hm, I just noticed that the tags have 'tgz'/'zip' links. do I really need the download files too? | 22:12 | ||
I guess they form a way to post-process the git repo a bit... | 22:13 | ||
pugssvn | r31569 | lwall++ | [IO,Str] regularize .lines to be more like .words when fed a string | ||
r31569 | .lines will no longer interpret a string as a filename | |||
masak | TimToady++ | 22:14 | |
TimToady: why not just 'is export' on the method form? | 22:15 | ||
TimToady | er, copy/past from words? | ||
masak | same question for words, then :P | 22:16 | |
TimToady | feel free, I'm geezernapping & | ||
masak makes a guerilla edit | 22:17 | ||
tylercurtis | rakudo: (1,2,3 Z, 4, 5, 6)[0].perl.say | ||
p6eval | rakudo 894e79: OUTPUT«(1, 4)» | ||
tylercurtis | rakudo: (1,2, 3 Z 4,5,6)[0].perl.say | 22:18 | |
p6eval | rakudo 894e79: OUTPUT«1» | ||
22:18
kensanata joined
|
|||
tylercurtis | According to S03, Z is a shortcut for Z,. | 22:18 | |
22:19
hercynium joined
|
|||
pugssvn | r31570 | masak++ | [S32/Str] saved a few words and lines with "is export" | 22:19 | |
masak | tylercurtis: that looks familiar. but feel free to submit to RT anyway. | ||
tylercurtis: ah, here: rt.perl.org/rt3/Ticket/Display.html?id=73948 | 22:20 | ||
tylercurtis | masak: Your RT-fu is impressive. | 22:22 | |
masak | :) "Z," was unusually easy to search for. | ||
the RT search thingie is idiosyncratic, but in predictable ways. | |||
in particular, it has no metacharacters and doesn't care for word boundaries. | 22:23 | ||
22:24
ash_ left
22:27
rhr left,
rhr joined
|
|||
tylercurtis | rakudo: my @foo; push(@foo, 1, 2, 3); @foo.perl.say | 22:28 | |
p6eval | rakudo 894e79: OUTPUT«[1, 2, 3]» | ||
tylercurtis | rakudo: my @foo; @foo ,= 1, 2, 3; @foo.perl.say | ||
p6eval | rakudo 894e79: OUTPUT«[1]» | ||
tylercurtis | S03: "@foo ,= 1,2,3 # same as push(@foo,1,2,3)" | ||
masak | well spotted. | 22:29 | |
masak submits rakudobug | |||
tylercurtis++ | |||
22:31
justatheory left
|
|||
tylercurtis | rakudo: (1,2,3 Z, 4,5,6) >>+<< (7,8,9 Z, 10,11,12) | 22:34 | |
p6eval | rakudo 894e79: OUTPUT«Sorry, sides are of uneven length and not dwimmy. in 'hyper' at line 179:CORE.setting in main program body at line 1» | ||
tylercurtis | rakudo: say (1,2,3 Z, 4,5,6).elems | ||
p6eval | rakudo 894e79: OUTPUT«3» | ||
tylercurtis | rakudo: say (7,8,9 Z, 10,11,12).elems | 22:35 | |
p6eval | rakudo 894e79: OUTPUT«3» | ||
22:37
athomaso1 joined
22:38
athomason left
|
|||
masak | TimToady: `Int $limit = *` typefails in Rakudo. was that a thinko, or is there something Rakudo should know about Int and Whatever? | 22:43 | |
TimToady: giving it a bit of thought, I think this is a case where $limit shouldn't be typed Int. as usual in these cases, it's more a question of a coercion than a typing. | 22:44 | ||
jnthn | It should fail | 22:45 | |
And I'd not type it | |||
Also don't "as Int" it unless you want *.Int to happen though ;-) | |||
*too | 22:46 | ||
masak | o.O | ||
22:46
skangas left
|
|||
masak | I don't :/ | 22:46 | |
jnthn | Then don't "as Int" it :-) | ||
Default values are subject to type checking and type coercion. :-) | 22:47 | ||
masak | I've just written a small patch that effectuates TimToady's spec change. spectesting. | ||
pmichaud | I need to read that diff. | ||
masak | I didn't "as Int" it. :) | ||
pmichaud | (the spec change diff, not the patch diff) | ||
masak | :) | ||
pmichaud | yes. I think that one of the things that Perl 6 programmers will quickly re-discover is that strong typing can be very limiting. | 22:48 | |
Tene | masak: so wait, did you "as Int" it, then? 'cos if you do that, .Int will happen. | ||
masak | there's definitely a way to overuse typing in Perl 6. | ||
<masak> I didn't "as Int" it. :) | 22:49 | ||
Tene: no. | |||
in the end I used no coercion, and no typing, and I let the default be '*'. | 22:50 | ||
22:50
_mpu left
|
|||
masak | the method I wrote delegates to Str.comb anyway, which likely does something sensible with $limit. | 22:50 | |
masak checks | |||
er, Cool.comb | 22:51 | ||
heh, Cool.comb also doesn't type/coerce its $limit param, and it seems to DTRT no matter what it gets. | 22:52 | ||
22:52
skangas joined
|
|||
Tene | masak: did you try passing it a null pmc? | 22:52 | |
22:52
cdarroch left
|
|||
pmichaud seriously considers trapping "Null PMC" exceptions and changing them to some colorful phrase instead | 22:53 | ||
no, wait | |||
even better | |||
Null PMC exceptions should simply provide the url or script whereby masak++ can automatically post it to RT | |||
masak | :) | 22:54 | |
pmichaud | so, Str.lines breaks a string into lines, similar to what IO.lines does? | ||
Tene | base64encode the stack trace, and print a url that will submit it to RT when clicked, of course. | ||
pmichaud | Tene: ...if only RT accepted submissions via the web.... | ||
masak | what's the pir:: for getting a Null PMC again? | 22:55 | |
pmichaud | so, it prints a url that goes to a bug proxy that converts it into an email and submits it to RT | ||
frettled | pmichaud: couldn't Null PMC exceptions automagically post to RT? :D | ||
pmichaud | masak: pir::null__P() | ||
Tene | It wouldn't be outside the realm of possibility to set up some kind of submission service on feather. | ||
pmichaud | frettled: that would just be evil. | ||
frettled | oh, befuddled lag | ||
pmichaud: yes! | |||
masak | rakudo: say "foo".comb(/o/, pir::null__P()) | ||
p6eval | rakudo 894e79: OUTPUT«Null PMC access in can() in main program body at line 1:/tmp/QJCtpureJq» | ||
Tene | frettled: it's impolite to make internet connections without permission. | ||
pmichaud | and the submission server could also check to see if this particular Null PMC exception has been reported and not re-post it | 22:56 | |
masak | Tene: seems it never reaches the .comb method. | ||
frettled | pmichaud: mmm | ||
Tene: what if rakudo has a letter from its parents saying that it's okay? | |||
pmichaud | the rakudo will have been a naughty girl. | 22:57 | |
*then | |||
masak | is it wrong to find the spectests that need changing by changing the code and seeing what breaks? :) | 22:58 | |
jnthn | masak: We could call it...Implementation Driven Development! | ||
It's like TDD in the mirror. | |||
masak | 哈哈 | ||
DDT? | 22:59 | ||
Development-Driven Development. | |||
lue | .oO(Should Be Fine™ development) |
23:00 | |
frettled | lue++ | ||
masak | Drive-By Development. | ||
jnthn | I Accidentally Development | 23:01 | |
frettled | Development By Proxy | ||
lue | If it works great for us, it's a test. If it doesn't, it shouldn't be there :) | ||
(IIWGFUIATIIDISBT) | 23:02 | ||
masak | jnthn: :D | ||
tylercurtis | Acronym-Driven Development | ||
or.. ADD | |||
masak | Driven-Insane Development. | 23:03 | |
lue | Why yes I DID | ||
23:04
lestrrat is now known as lest_away
|
|||
masak | Didn't-I-fix-this-yesterday-Driven Development | 23:04 | |
lue | aka Parodoxically-Driven Development | ||
frettled | Déjà-vu Development | 23:05 | |
jnthn | masak: I think that's could "You-shoulda-used-TDD" ;-) | ||
*called | |||
masak | :) | ||
lue | .oO(Let's-Steal-From-The-Future-We-Did-Will-Do-It-Already Development) |
||
frettled | Bikeshed-Driven Development | 23:06 | |
lue | [ tenses may be incorrect, please ignore that :) ] | ||
frettled | lue: don't be so tense | ||
23:06
sawyer_ left
|
|||
Arthur_TwoSheds_ | What's this about a shed? | 23:06 | |
lue | (it should've been Arthur_TwoSheds_Jackson) | 23:07 | |
masak | the more rigorously I use TDD, the more I feel they settle into the role of a "sure, good, but you forgot this aspect of things" advisor. | ||
frettled | masak: perhaps it's time for DDT… | ||
…Development-Driven Testing | |||
masak | which is a really good advisor to have when writing code. | ||
frettled | it's the new killer project management | ||
masak | frettled: only write one, and *exactly* one test after you've written some code? :P | 23:08 | |
lue | RTD (Rapid Tuit Development) | ||
sorear | masak: Recommended reading for IRC helpers: www.shadowcat.co.uk/blog/matt-s-tro...a-bastard/ | ||
masak | sorear: thanks. read it. | ||
lue | .oO(OK, I've coded this awesome macro implementation for rakudo.... |
23:09 | |
23:09
masonkramer joined
|
|||
masak | sorear: I understand where he's coming from, but I'm not sure I have it in me to assume the role of a channel bastard myself. | 23:09 | |
sorear | pmichaud: yes, that is the plan | ||
lue | ....I'll add this test to the macros tests: is 2+2, 4, "complex macro wizardry"; ) | ||
masak | sorear: definitely not through privmsg, which has more of a booth-like feel to it. | ||
sorear: the closest I got was tossing catb.org/esr/faqs/smart-questions.html at the fellow. | 23:10 | ||
23:12
justatheory joined
|
|||
lue | .oO(I should work more on my Time Traveller's Tenses Handbook before attempting to pull off that kind of thing again) |
23:13 | |
frettled | masak: Or, to quote someone who may very well have been Don Knuth in a sardonic mood: «if your code is correct, you don't need tests» | 23:14 | |
lue: Recommended starting point for that: www.google.com/url?sa=t&source=..._CoSaOfKag | 23:15 | ||
artghle, sorry, I forgot about googles effin' way of handling URLs. | |||
lue: en.wikipedia.org/wiki/James_while_J...he_teacher | |||
23:15
justatheory left
|
|||
masak | frettled: sure. it's just a big 'if'. | 23:15 | |
frettled: I find tests let me lower my guard when coding, and get away with it. feels less tense. | 23:16 | ||
frettled | masak: which is why i kindof suspect that it was a sardonic remark :) | ||
masak: I tend to add a lot of in-code tests, yet I somehow seem to slip quite often, leaving uncaught test cases, heh. | 23:17 | ||
lue | frettled: want me to link you to one big inspiration for this book? *evil grin* | ||
sorear | pmichaud: meant that for pmurias | ||
frettled | lue: Perhaps, I could need som help in getting to bed two hours ago :) | ||
pmichaud | sorear: I guessed that eventually. It's happened to me and pmurias a lot. :) | ||
masak | frettled: "in-code tests"? as in, mixing code and tests? | ||
lue | frettled: tvtropes.org/pmwiki/pmwiki.php/Main...nseTrouble *evil laugh* | 23:18 | |
frettled | masak: yes, but not tests as in test-framework tests, since most of my code isn't about re-usable modules, but rather scriptish programs. | ||
lue: uh-oh, TV Tropes... | |||
lue | (quite seriously, I was spending one late night browsing Time Travel Tropes when the book idea hit me) | ||
23:19
sawyer_ joined
23:20
IllvilJa left
|
|||
masak | frettled: would be cool to have a testing framework that disrespected the reduced visibility of things like 'my' subs. :) | 23:21 | |
then they could be tested more easily. | |||
lue | .oO(lexcial subs, the enemy to unfudged binding tests) |
23:22 | |
masak | also, private methods. | ||
lue should really get to work on _something_. Stupid quantum feelings. | 23:23 | ||
23:24
skangas left
|
|||
frettled | masak: ooh aah :) | 23:24 | |
23:24
IllvilJa joined
|
|||
sorear | lue: for someone who claims to be a hhgttg fan, you needed tvtropes to get the book idea? | 23:25 | |
lue | I haven't read the first 5 of 3 in a looong time, and I only read 6 of 3 a little while ago. | 23:26 | |
23:27
sawyer_ left,
sawyer_ joined
|
|||
lue | not only that, but at the time I had Doctor Who on the brain, which led me to the Time Travel Tropes in the first place :) | 23:27 | |
23:30
ashleydev_ joined,
ashleydev left,
ashleydev_ is now known as ashleydev
23:32
sawyer_ left,
sawyer_ joined
23:33
rv2733 joined
23:40
tedv joined,
masonkramer left,
masonkramer_ joined,
masonkramer_ is now known as masonkramer
|
|||
masak | heh -- every spectest file that has failed spectacularly (except for t/spec/S05-mass/properties-derived.rakudo, a usual suspect) has had the old 'lines' or '.lines' calls in it. :) | 23:41 | |
jnthn | :-) | ||
lue | :) .oO(hrm, spectacularily not ok 63) | 23:42 | |
masak | lue: yeah, like that. :) | ||
pugssvn | r31571 | Kodi++ | [S32] Dropped mention of quarters from Temporal.pod. I don't think quarter-numbering belongs in the core, since (as far as I know) there is no precise standard way of dividing calendar years into four. | 23:43 | |
masak | hm, Kodi isn't on the channel. | ||
seems dividing by triplets of months is sane enough for DateTime. | 23:45 | ||
pugssvn | r31572 | Kodi++ | [t/spec] Cleaned up DateTime.t a bit. (I hadn't meant to commit it yet.) | ||
23:46
skangas joined,
proller left
|
|||
masak | oh well, I won't miss quarters greatly. if no-one else kicks up a fuss about it, I won't either. :) | 23:46 | |
23:47
DarkWolf84 left,
silug joined
|
|||
jnthn | Aww, I thought somebody was about to get hung, drawn and quartered ;-) | 23:47 | |
masak | jnthn: well, can't do that after r31571, can we? :P | ||
frettled | can we settle for my 2 cents? | 23:48 | |
23:49
LionMadeOfLions joined
|
|||
masak | absolutely. | 23:49 | |
23:49
rv2733 left
|
|||
lue | rakudo if pir::getprop('ro', $target) { punish("severly") } | 23:49 | |
frettled | masak: but, ye gods, does that mean I'll have to find when March ends and April starts all by myself? :D | 23:51 | |
23:51
silug left
|
|||
masak | frettled: that was your two cents? just checking. :) | 23:52 | |
frettled | Yup, all out. Oh. D'oh! | ||
masak | frettled: you can still create a DateTime object for April 1, and check the day-of-year property on it. | ||
in other news, we have too many trig tests. | 23:53 | ||
jnthn | masak: It's not a huge leap to realize that this is not going to be so simple for some years though. ;-) | ||
lue wonders if any part of DateTime is suitable to (sim|em)ulate a CPU clock... | |||
sorear | STD.pm6 has lots of ¢ you may be able to borrow | ||
lue: no | |||
DateTime handles the insanity that is civil time | 23:54 | ||
masak | jnthn: it's not intrinsically harder for quarters than for months. | ||
23:55
Psyche^ joined
23:59
Patterner left,
Psyche^ is now known as Patterner
|
|||
lue | (not that the CPU clock is terribly important. I have to worry about VBlanking and mid-frame trickery and such.) | 23:59 |