»ö« | 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. |
|||
00:01
Psyche^ joined
00:05
Patterner left,
Psyche^ is now known as Patterner
|
|||
dalek | odel: 4c8ee84 | jnthn++ | dotnet/runtime/Metamodel/Representations/P6 (3 files): Eliminate use of Nullable<T>, which should make life a bit easier for mberends++ when porting. |
00:11 | |
00:13
lichtkind left
00:15
flatwhatson left
00:16
flatwhatson joined
|
|||
dalek | odel: b23a318 | jnthn++ | dotnet/runtime/Metamodel/SharedTable.cs: Flesh out STable a little more; this adds find_method and postcircumfix:<{ }> caching. |
00:24 | |
00:34
hudnix left
00:37
drbean left
00:45
meppl left
00:46
lest_away is now known as lestrrat
|
|||
jnthn -> sleep | 00:54 | ||
00:59
whiteknight left
01:05
jferrero joined
|
|||
TimToady | phenny: tell masak yes, checking scope constraints on FIRST is in my todo file | 01:07 | |
phenny | TimToady: I'll pass that on when masak is around. | ||
01:17
jferrero left
01:23
Trashlord joined
01:39
cggoebel left
01:47
Italian_Plumber joined
01:49
molaf_ joined
01:52
molaf left
|
|||
[Coke] | git question: How do I kill all the changes I've made locally since my last 'push' ? | 02:09 | |
(I'm ahead by N commits, and I don't want any of them.) | |||
02:10
hudnix joined
|
|||
colomon | some form of git reset, I think | 02:10 | |
02:10
Italian_Plumber left
02:12
Italian_Plumber joined
02:14
Italian_Plumber left
02:19
gfx joined
|
|||
diakopter | jnthn: interesting: bugsplat.info/2010-08-22-perl-with-a-lisp.html | 02:19 | |
02:32
agentzh joined
|
|||
colomon must remember he has a lot of stuff to do, and not just spend the next week translating that blog post's code to p6.... | 02:32 | ||
02:33
meppl joined
|
|||
sorear | [Coke]: git reset --hard origin/master | 02:36 | |
02:36
cheeps left
|
|||
[Coke] | sorear++ | 02:39 | |
02:46
azert0x left
02:47
meppl left
02:53
xinming joined
|
|||
tylercurtis | Is there a named subrule form of \w? | 03:27 | |
03:40
[Coke] left,
[Coke] joined
|
|||
ingy | tylercurtis: hi | 03:49 | |
tylercurtis | ingy: Hi. | 03:50 | |
ingy | :) | 03:51 | |
you wanted something? | |||
tylercurtis | ingy: Remember how I was supposed to add a LICENSE to yaml-pm6? I finally got around to doing so, but I wanted to know what you want the COPYRIGHT section of the README to say before I commit it. | 03:52 | |
ingy | tylercurtis: how about something like any of my cpan modules | 03:54 | |
03:55
[Coke] left
|
|||
ingy | tylercurtis: gist.github.com/544745 | 03:55 | |
tylercurtis | ingy: well, same terms as Perl itself seems kinda inappropriate for a Perl 6 module, since that could be anything from AL 1.0/GPL if you interpret it as Perl 5, AL 2.0, MIT, or who knows what else. In addition, the "Ingy döt Net." part will become only partially accurate once I start working on it. | 03:57 | |
ingy: gist.github.com/544748 here's the standard-ish (in that everything but the Copyright 2010. <SOMETHING> part came from TPF's webpage) notice for the AL 2.0 (IIRC, that's what you said to put as the license, right?). | 03:59 | ||
ingy | tylercurtis: I think you should add your name to authors but the copyright should just be in one name | 04:01 | |
04:01
[Coke] joined
|
|||
tylercurtis | ingy: Works for me. | 04:01 | |
ingy: Create a seperate AUTHORS or CREDITS file or just add an AUTHORS section to the README? | 04:06 | ||
tylercurtis has some slight changes to push to the loader branch that don't make it work but at least let it compile. | |||
04:17
sftp left
04:21
redicaps joined
04:22
redicaps left,
shelling_lab left,
shelling_lab joined
04:39
shelling_lab left
04:49
shelling_lab joined
04:50
molaf_ left
05:07
Eevee left
05:08
gfx left
05:26
drake1 joined
|
|||
drake1 | hello, how do you code something like pastebin.ca/1923137 in perl6 / rakudo ? | 05:27 | |
05:29
kaare joined
05:30
kaare is now known as Guest81071
|
|||
drake1 | things like dynamic method construction | 05:33 | |
tylercurtis | drake1: which bit are you asking about? | ||
drake1 | the ``sub'' and the my @bin initialization | 05:34 | |
tylercurtis | You could do them exactly the same way. Perl 6 does have some nicer ways to do some of it, though. | 05:35 | |
drake1 | oh, and is it possible to export a perl6 program in VM-code only ie. without the source code itself | 05:36 | |
tylercurtis | For example, in Perl 6, list assignment is looser than comma, so you don't need the parentheses around the list in the my @bin assignment. | ||
drake1 | tylercurtis: good | ||
nice | |||
tylercurtis | Well, technically, you would have to use my or our or such to declare the @bin variable, since Perl 6 is strict by default(and for now, at least, is strict always). | ||
title => "Winamp" can be written perhaps a little more nicely as :title<Winamp>. | 05:37 | ||
drake1 | that's what im used to, only forgot to in this test script. first run with Tk; | ||
tylercurtis | And so on for the other items in the hashes. | ||
drake1 | not .title = "Winamp" | 05:38 | |
tylercurtis | In Perl 6, "foreach my $bin (@bin) {...}" becomes "for @bin -> $bin {...}". | ||
drake1 | fine | 05:39 | |
tylercurtis | You also don't need the -> in your hash dereferences in Perl 6. | ||
drake1 | so foreach is dropped? | ||
TimToady | yes, always for now | ||
tylercurtis | drake1: for is always foreach. If you want C-style for, you want loop. | ||
drake1 | tylercurtis: like with multi-dimensional hashes in perl5 ? | ||
TimToady | yes, but you can drop it on the first one now too :) | 05:40 | |
drake1 | TimToady: OK | ||
TimToady | because it's always a ref/deref at that boundary | ||
drake1 | naturally | ||
good | |||
tylercurtis | $bin->{title} would have to become either $bin<title> or $bin{'title'} since postcircumfix:<{ }> doesn't autoquote anymore. | 05:41 | |
TimToady | only => autoquotes now | ||
drake1 | im also tired of the -> thingy | ||
TimToady | and it doesn't do -foo like p5 | ||
but => indicates real pairs, so we don't need the - to keep tk in sink | |||
sync | |||
assuming we had Tk bindings... | 05:42 | ||
tylercurtis | -> becomes . for methods, as well. | ||
TimToady | not sure what blizkost wants to cross over to p5 there... | ||
drake1 | then it's getting closer to ``sh'' perhaps | ||
TimToady | if so, it's an accident :) | 05:43 | |
tylercurtis | drake1: you can now drop the sub from "sub { ... }", also. | ||
drake1 | perl is alot more friendly with data structures etc | ||
tylercurtis: to it's just the curlies? | |||
05:43
snearch joined
|
|||
TimToady | rakudo: my $closure = { 'say hi drake1' }; $closure() | 05:44 | |
drake1 | nice | ||
p6eval | rakudo b958a1: ( no output ) | ||
TimToady | er...only written right | ||
drake1 | it's a lot of nice improvements | ||
TimToady | rakudo: my $closure = { say 'hi drake1' }; $closure() | ||
p6eval | rakudo b958a1: OUTPUT«hi drake1» | ||
drake1 | you're continuing to support the ``fork'' ? | 05:45 | |
TimToady | those are just the surface improvements | ||
drake1 | sweet | ||
tylercurtis | I'm not sure Perl 6 supports "new MainWindow;" syntax anymore. I though I had seen it in the spec, but I can't seem to find it at the moment. | ||
TimToady | though the 'for @array -> $elem {...}' syntax actually points to the fundamental notion that all blocks are really just lambdas | ||
drake1 | just copied from another website. I never use objects like that, normally | 05:46 | |
TimToady | no, you'd either have to put a : after MainWindow, or flip it around to MainWindow.new | ||
no more guessing about indirect objects | |||
drake1 | fine enough | ||
more like ``ld'' import, then | 05:47 | ||
TimToady | so the colon is now required after such an object | ||
but lets you add more args | |||
tylercurtis | What's the name for that syntax? | ||
TimToady | we still call it indirect object | ||
it's just not ambiguous anymore | |||
tylercurtis thought it had some fancy linguistics-inspired name that he can never remember. | 05:48 | ||
tylercurtis appears to be wrong. | |||
TimToady | it's really more like the direct object in English | 05:49 | |
drake1 | with adjective constructors | ||
TimToady | rakudo: class Dog { has $.ears; has $.tail }; my $fido = new Dog: tail => 'long', ears => 'short'; say $fido.perl | 05:50 | |
p6eval | rakudo b958a1: OUTPUT«===SORRY!===Confused at line 22, near "my $fido ="» | ||
TimToady | maybe rakudo doesn't parse that yet | 05:51 | |
std: class Dog { has $.ears; has $.tail }; my $fido = new Dog: tail => 'long', ears => 'short'; say $fido.perl | |||
p6eval | std 32087: OUTPUT«ok 00:01 119m» | ||
TimToady | the STD parser doesn't mind it | ||
drake1 | cool | ||
cool syntax/ | |||
TimToady | esp when formatted one initializer per line | 05:52 | |
which is hard to show in irc | |||
drake1 | a bit more active than bind configuration | 05:53 | |
you know with wildcard_name { parameter1=blah\nparameter2 ... | 05:55 | ||
TimToady | tylercurtis: \w === <alnum> | ||
we have to preserve the clocking of the code to better report syntax errors | 05:56 | ||
so it takes a bit more punctuation to make sure the parser stays in sync, since it's a richer language | 05:57 | ||
many syntax errors show up by noticing two terms in a row | |||
so that's always an error in Perl 6 | |||
std: 42 42 | |||
p6eval | std 32087: OUTPUT«===SORRY!===Two terms in a row at /tmp/LcB0P4wdGb line 1:------> 42 ⏏42 expecting any of: bracketed infix infix or meta-infix statement modifier loopParse failedFAILED 00:01 116m» | ||
tylercurtis | TimToady: if I modify alnum, will that change the behavior of \w, then? I don't think I'm going to end up doing that, since the grammar in question turned out to be simple enough to not need word boundary checks, but it's nice to know in case I do need to. | 05:58 | |
TimToady | but it can show things that are more subtle, like a missing semicolon | ||
std: my $a = 42my $b = 43; | 05:59 | ||
p6eval | std : ( no output ) | ||
TimToady | heh | ||
tylercurtis | rakudo: my $a = 42my $b = 43 | ||
p6eval | rakudo b958a1: OUTPUT«===SORRY!===Confused at line 22, near "my $a = 42"» | ||
05:59
cono left
|
|||
TimToady | tylercurtis: uh, I think changing alnum would probably change \w in STD, but not sure about rakudo | 06:00 | |
std: my $a = 42my $b = 43; | |||
p6eval | std : ( no output ) | ||
TimToady | std: my $a = 42;my $b = 43; | ||
p6eval | std : ( no output ) | ||
TimToady | hmm, evalbot hosed? | ||
std: my $a = 42; | |||
p6eval | std : ( no output ) | ||
drake1 | it's really good to see it becomes clear | 06:01 | |
TimToady | odd, it was just there... | ||
drake1 | perl5's a bit messy | ||
TimToady | yes, just a bit | ||
drake1 | fine enough to the hardcore scripts | ||
TimToady | std: 42 | ||
p6eval | std : ( no output ) | ||
06:02
uniejo joined
|
|||
TimToady | it shouldn't be stuck mid compile, because it is supposedly using snapshot semantics | 06:02 | |
perhaps the server is overloaded or something | 06:03 | ||
rakudo: 42 | |||
p6eval | rakudo b958a1: ( no output ) | ||
TimToady | rakudo: say 42 | ||
p6eval | rakudo b958a1: OUTPUT«42» | ||
TimToady | std: 42 | 06:04 | |
p6eval | std 32087: OUTPUT«ok 00:01 114m» | ||
TimToady | std: my $a = 42my $b = 43; | ||
p6eval | std 32087: OUTPUT«===SORRY!===Two terms in a row (previous line missing its semicolon?) at /tmp/S0YtT21PCl line 2:------> <BOL>⏏my $b = 43; expecting any of: POST bracketed infix infix or meta-infix postfix | ||
..postfix_prefix_meta_operator statement modif… | |||
TimToady | here it figures out a semicolon seems to be missing, since there's a line break | 06:05 | |
tylercurtis | As I write tests for a toy LISP interpreter, I find myself thinking about how convenient it is to use functions as list ops, without parenthesizing the arguments. That seems a little ironic. | 06:12 | |
drake1 | well, printf "%s\n" $F |egrep '\.l|\.y' for now. thanks for the introduction | 06:15 | |
bye | |||
06:15
drake1 left
06:21
wtw joined
06:27
moritz__ is now known as moritz_
06:28
snearch left
06:40
mberends left
06:45
barika joined
|
|||
moritz_ | good morning | 06:55 | |
and good evening to sorear :-) | 06:56 | ||
tylercurtis | Good night, #perl6. | 06:57 | |
06:58
tylercurtis left
07:35
tadzik joined
|
|||
tadzik | o/ | 07:35 | |
07:37
wamba joined
07:39
rgrau joined
07:44
azawawi joined
|
|||
azawawi | hi | 07:44 | |
07:45
rokoteko_ joined
07:49
barika left,
nadim left,
huf left,
phenny left,
renormalist left,
aesop left,
rokoteko left
|
|||
azawawi | sorear: ping | 07:50 | |
phenny: tell sorear I tried irclog.perlgeek.de/perl6/2010-08-19#i_2722179 and it worked. Thanks. How about documenting that somewhere? | 07:51 | ||
phenny down? | 07:53 | ||
07:54
lestrrat is now known as lest_away
|
|||
sorear | no, you're just on the wrong channel | 07:55 | |
phenny is in the other #perl6 now | |||
azawawi | other #perl6? | 07:56 | |
07:56
drbean joined
|
|||
sorear | do you know what a netsplit is | 07:57 | |
azawawi | nop but i just read about it | 07:58 | |
08:00
barika joined,
nadim joined,
huf joined,
phenny joined,
renormalist joined,
aesop joined,
card.freenode.net sets mode: +v phenny
|
|||
azawawi | sorear: on a unsuccessful parse, i get a lot of uninitialized variable errors. It that normal? | 08:00 | |
sorear | not for me | 08:03 | |
it might be for you; disable the warnings if you have to | 08:04 | ||
azawawi | std: say 1; | 08:05 | |
p6eval | std 32087: OUTPUT«ok 00:01 115m» | ||
azawawi | std: say; | ||
p6eval | std 32087: OUTPUT«Potential difficulties: Unsupported use of bare 'say'; in Perl 6 please use .say if you meant $_, or use an explicit invocant or argument at /tmp/cuPE3P6cui line 1:------> say⏏;ok 00:01 114m» | ||
08:06
patrickas joined
08:07
patrickas left
|
|||
azawawi | sorear: here is what im getting when trying it on Strawberry Perl 5.12.0 | 08:08 | |
azawawi checks it again on his ubuntu vm | 08:09 | ||
sorear | I am sorry but I cannot help with any Strawberry-specific problem | 08:13 | |
it works fine on a 5.12.0 built from the git sources | 08:14 | ||
azawawi | sorear: yeah i know. i couldnt even get blizkost on run on that strawberry... | ||
08:16
fod left
08:18
thebird joined
08:24
tadzik left
08:27
dakkar joined
08:29
daxim joined,
drake1 joined
|
|||
azawawi | sorear: ok i tried all the steps again on ubuntu and I still get the same warnings. Any clue to what is happening? Am i compiling CORE.setting in a wrong way or should i get a compatible CORE.setting with the same STD version? | 08:29 | |
drake1 | another question. something like pastebin.ca/1923194 with pipe-line shell setup, how's that in perl6 ? | 08:30 | |
azawawi | sorear: this is what i use to compile the setting if it is not there pastebin.ca/1923196 | ||
sorear | azawawi: you can't use STD->parse* twice in one process without a huge amount of locals, and even then it's not reliable | 08:33 | |
see sys_compile_module for the current list | |||
08:33
zulon joined
|
|||
azawawi | sorear: i know but it is executed once after syml/CORE.syml is created | 08:34 | |
moritz_ | drake1: a lot of IO stuff isn't specified yet. So I'm not sure how it will end up looking | ||
azawawi | sorear: second runs yield the same warnings. Am i missing something here? | ||
drake1 | moritz_: ok | ||
sorear | azawawi: are you changing directories at all anywhere? | 08:35 | |
azawawi | sorear: nop, just that simple example | 08:36 | |
sorear: and i made sure that S:H:P6 STD stuff is deleted before installing STD | |||
sorear | well, there's something wrong, probably related to STD's lack of reusability | 08:38 | |
azawawi tries older STD versions | 08:39 | ||
sorear: maybe the change to STD:: namespace made these errors | 08:41 | ||
drake1 | use Tk; won't allow perl to fork so had to use stdio for extern solutions | ||
azawawi | sorear: older STD behaves the same | ||
drake1: why dont you try using blizkost? Write p5 in perl6 | 08:42 | ||
drake1 | blizkost? | ||
azawawi | drake1: github.com/jnthn/blizkost | ||
drake1: embeds perl5 in Rakudo perl 6 | |||
sorear | azawawi: you're on your own | 08:43 | |
drake1 | azawawi: nice. ill try it | ||
azawawi | sorear: Thanks. I thought so :) | 08:44 | |
sorear: im rolling back S:H:P6 to the older STD copying script. | |||
08:44
shade\ left
|
|||
drake1 | no perl6 module to associate a file descriptor with an io buffer? | 08:45 | |
08:46
azawawi left
08:47
shade\ joined,
shade\ left
08:54
lest_away is now known as lestrrat,
lestrrat is now known as lest_away
08:55
lest_away is now known as lestrrat
08:58
zulon left
08:59
drake1 left
|
|||
jnthn | morning | 09:05 | |
dalek | ecza: 36e966d | sorear++ | src/ (3 files): *very* hacky first take on $/ and $¢ They're only available inside regex embedded blocks. |
||
ecza: 862b2be | sorear++ | / (2 files): Parse $/ and $¢ |
|||
ecza: eb16e02 | sorear++ | src/Niecza/Actions.pm: Implement parsing of $<foo> form |
|||
moritz_ | next step: $0 | ||
niecza: 'abc' ~~ / <alpha> { say $<alpha> } / | 09:09 | ||
p6eval | niecza eb16e02: OUTPUT«Unhandled exception: Unable to resolve method alpha in class Cursor at /tmp/VHk_61qKRO line 0 at lib/SAFE.setting line 976 at /tmp/VHk_61qKRO line 0 at /tmp/VHk_61qKRO line 0 at lib/SAFE.setting line 988 at lib/SAFE.setting line 346 at /tmp/VHk_61qKRO line 1 | ||
..at lib/… | |||
moritz_ | niecza: 'abc' ~~ / $<alpha>=(.) { say $<alpha> } / | 09:10 | |
p6eval | niecza eb16e02: OUTPUT«===SORRY!===Can't locate object method "new" via package "RxOp::Any" (perhaps you forgot to load "RxOp::Any"?) at /home/p6eval/niecza/src/Niecza/Actions.pm line 546.Attribute (zyg) does not pass the type constraint because: Validation failed for | ||
..'ArrayRef[RxOp]'… | |||
moritz_ | sorear: what built-in named rules are available? | ||
sorear | ws. | 09:12 | |
also, while $<foo> parsing may be implemented... | 09:13 | ||
niecza: ' ' ~~ / <ws> { say $<ws> } / | |||
p6eval | niecza eb16e02: OUTPUT«Unhandled exception: Unable to resolve method at-key in class Cursor at /tmp/da70PO5Syg line 1 at /tmp/da70PO5Syg line 1 at lib/SAFE.setting line 975 at /tmp/da70PO5Syg line 0 at lib/SAFE.setting line 933 at /tmp/da70PO5Syg line 0 at lib/SAFE.setting line 976 | ||
..at /tm… | |||
moritz_ | niecza: ' ' ~~ / <ws> { say ':' ~ $/{'ws'} ~ ':' } / | 09:14 | |
p6eval | niecza eb16e02: OUTPUT«Unhandled exception: Unable to resolve method at-key in class Cursor at lib/SAFE.setting line 836 at /tmp/U4fSrSdzxx line 1 at /tmp/U4fSrSdzxx line 1 at lib/SAFE.setting line 975 at /tmp/U4fSrSdzxx line 0 at lib/SAFE.setting line 933 at /tmp/U4fSrSdzxx line 0 | ||
..at lib… | |||
09:20
shade\ joined,
shade\ left,
Mowah joined
09:25
drbean left,
mulander left
09:27
shade\ joined,
shade\ left
|
|||
sorear is now trying to get niecza's parse->past-ish stage to accept STD | 09:28 | ||
I don't think jnthn is going to try to compete with me in parsing STD.pm6 in the next two weeks | 09:29 | ||
moritz_ | I don't expect that either | ||
he's working on much more low-level stuff | |||
sorear | moritz_: one flaw in niecza which affects the evalbot that I'm not sure how to fix | 09:31 | |
moritz_: niecza keeps a cache of precompiled modules | |||
moritz_: sometimes I like to make binary-incompatible changes to the code generation, but I don't want to invalidate the cache on any compiler tweak | 09:32 | ||
is there a more elegant way out than just a Parrot-style version number? | |||
09:33
shade\ joined
|
|||
sorear | looks like the next big error generator is adverbs. hmm. | 09:33 | |
rakudo: my %foo; say %foo<x> :exists; | |||
moritz_ | sorear: have a dummy revision file, and make all modules depend on it | ||
p6eval | rakudo b958a1: OUTPUT«===SORRY!===Confused at line 22, near "say %foo<x"» | 09:34 | |
moritz_ | sorear: and change that revision file whenever you want them to recompile | ||
sorear | would that work across git? | ||
moritz_ | sure; if you commit these changes to the revision file, its timestamp will be updated too | ||
09:35
ruoso left
|
|||
jnthn | sorear: No, I generally stay well away from the grammar engine. :-) | 09:40 | |
moritz_ | sorear: I'm curious about your mid to long-term goals for niecza. Will you try to attract users and contributors? what will you do after you have STD bootstrapped? | 09:41 | |
09:42
ppant joined
|
|||
moritz_ | github.com/moritz/perlgeek.de/blob/...ro-sum.txt # anybody want to comment on my next blog post before it goes live? | 09:44 | |
sorear | moritz_: after STD is bootstrapped, I'm going to try the metacircular aspects of Perl 6 - BEGIN and eval | 09:47 | |
I'm going to try to set up a real REPL | 09:48 | ||
there may be an attempt at macros, or maybe not; I would need to figure out how to resolve meta type issues first | 09:49 | ||
TimToady has said that the compiler and the compilee have logically distinct interpreters, which raises questions on how they can share AST nodes and strings | |||
github-- # presenting a .*\.txt URL as text/html | 09:50 | ||
moritz_: 1, how does worldwide population growth figure into this 2. is it just me, or has the US gov't become a disproportionate exporter of demographics? | 09:53 | ||
moritz_ | sorear: if you have better links, please share them :-) | ||
mathw | o/ | ||
jnthn | o/ mathw | 09:54 | |
moritz_ | I'll write a bit about population growth | 09:55 | |
09:59
tadzik joined,
Mowah left
10:00
Mowah joined,
Mowah left
10:03
Mowah joined
10:04
Gothmog_ joined
10:07
rokoteko_ is now known as rokoteko,
rokoteko left,
rokoteko joined
10:08
ggoebel joined
|
|||
sorear | ggoebel: are you reachable? | 10:09 | |
10:09
agentzh left
|
|||
moritz_ | perlgeek.de/blog-en/perl-6/not-zero-sum.html loliblogged | 10:10 | |
sorear | perl 6 hackers have their blogs on paper sticks? | 10:11 | |
moritz_ | paper stick? | ||
jnthn | lol | ||
moritz_ doesn't get it | |||
jnthn | moritz_: Think it's a place on "lolly" | ||
*play | |||
szbalint | moritz_++ | 10:12 | |
moritz_ | oh my | ||
sorear | they're called lolipops in the states | ||
10:12
Mowah left
|
|||
jnthn | Yes, in the UK too :-) | 10:12 | |
Or "lolly" as slang. :-) | |||
moritz_ | we have "lolly" too | ||
jnthn | Sweet. :-) | ||
10:12
Mowah joined
|
|||
moritz_ | but I didn't make the jump to paper sticks | 10:13 | |
szbalint | The connection was a bit *thin*. | ||
moritz_ | that's why I didn't *thin*k of it | 10:14 | |
10:14
Mowah left
10:15
Mowah joined
|
|||
moritz_ | I've also hackernews'ed it - let's see what comes out of it :-) news.ycombinator.com/item?id=1626335 | 10:17 | |
10:19
Mowah left,
Mowah joined
10:23
ppant left
10:24
Mowah left
10:25
Mowah joined,
Mowah left
10:26
Mowah joined
10:27
Mowah left,
pnu left,
Mowah joined,
Mowah left
10:29
lestrrat is now known as lest_away
|
|||
dalek | ecza: f61a6db | sorear++ | / (3 files): Implement operator adverb processing |
10:32 | |
10:32
pnu joined,
Mowah joined
10:34
azert0x joined,
azert0x left
10:35
Mowah left,
Mowah joined
|
|||
sorear | Mowah: What's the problem? | 10:36 | |
10:36
azert0x joined
|
|||
moritz_ ignores joins and leaves | 10:37 | ||
sorear | what about quits? | ||
moritz_ | too | ||
12:36 3 #perl6: JOINS PARTS QUITS NICKS | |||
azert0x | hello | ||
sorear | down to 205 sorry()s in STD parse | ||
moritz_ | from my ignorance list | ||
hi azert0x | |||
tadzik | I miss an irc client which will keep those events in some separate windows, visible, but not polluting the tal | ||
the fact is these are almost useless on irc, where everyone idles like hell anyway | 10:38 | ||
hi azert0x | |||
moritz_ | tadzik: I ignore them in irssi, and if they interest me, I look into the web based IRC logs | ||
sorear | tadzik: that's what I was planning when I got sidetracked. | ||
moritz_ | though they aren't quite complete | ||
tadzik | sorear: sidetracked? By Perl 6? | ||
there's an old irssi theme having that, but it segfaults | 10:39 | ||
sorear | by *implementing* perl6 :| | ||
tadzik | :) | ||
sorear | I pretty thoroughly hate irssi | ||
tadzik on weechat | |||
but not a love-hate relationships, these are just tools | |||
sorear | I was writing a replacement in perl6 when I realized a couple features I needed were missing | ||
who says those are mutually exclusive? | 10:40 | ||
tadzik | hm? | ||
isn't there some nice irc client in Perl which we can extend all way long? | 10:41 | ||
sorear | next... metaoperators | 10:47 | |
this will be a little bit interesting. | 10:48 | ||
(I'm mainly concerned with infix_postfix_meta_operator:sym<=>) | |||
sorear wonders if the user should be able to define metaops with names like that | |||
dalek | ecza: 5b403a4 | sorear++ | src/Niecza/Actions.pm: Implement \$\d+ syntax |
10:50 | |
sorear out | 10:51 | ||
10:58
meppl joined
11:07
scottp joined,
scottp left
11:26
Mowah left
11:34
envi^home joined
11:36
envi^home left
11:40
envi^home joined
11:45
M_o_C joined
11:47
araujo left
|
|||
takadonet | morning all | 12:02 | |
12:07
[particle] left
12:08
[particle] joined
12:10
zulon joined
12:15
ruoso joined
12:16
zulon left,
M_o_C left
12:17
zulon joined
12:22
sftp joined
12:23
araujo joined
12:30
zulon left
|
|||
[Coke] | RT: 673 active tickets; 152 new; 12 need tests. | 12:40 | |
moritz_ | :/ | 12:41 | |
12:42
rgrau_ joined
|
|||
TiMBuS | mo' users, mo' tickets | 12:42 | |
[Coke] | moritz_: by which I mean "are assigned to moritz". =-) | 12:45 | |
12:47
drbean joined
12:52
Italian_Plumber joined
12:56
timbunce joined
12:58
karb joined
13:04
karb left
13:07
drake1 joined
|
|||
drake1 | it's my perl day today heh | 13:07 | |
just wrote this pastebin.ca/1923290 | 13:08 | ||
and started to think that maybe perl6 is more nice to call functions from returned object pointers | |||
moritz_ | what are these pointers you're talking about? | 13:09 | |
drake1 | object methods | ||
sry | |||
the ->pack on like 13 eg | 13:10 | ||
s,like,line | |||
jnthn | Well, you save a character :-) | ||
moritz_ | .pack instead of ->pack | 13:11 | |
jnthn | Other things would likely get neater too :-) | ||
moritz_ | like, no more - in front of named options | ||
drake1 | with dots instead of arrows | ||
jnthn | "sub { my $widget = shift;" could become maybe -> $widget { ... } | ||
tadzik | looks like the Canvas methods is using some funny named parameters paring | ||
drake1 | the dot colors of that Canvas grid drove me close to insane on MSN and cpan to find the property | ||
13:12
foodoo joined,
orafu left
|
|||
drake1 | not => { ... } instead of ``sub''? | 13:13 | |
13:14
orafu joined
|
|||
drake1 | instead of => sub { ... } sry | 13:15 | |
13:15
zulon joined
|
|||
jnthn | $mw.bind('<ButtonPress-1>' => -> $widget { ... }) # pointy block way | 13:15 | |
$mw.bind('<ButtonPress-1>' => sub ($widget) { ... }) # anonymous sub way | |||
drake1 | and `pairs' by the arrow instead | ||
jnthn | The => -> looks kinda funny though :-) | ||
drake1 | yes | 13:16 | |
13:16
Guest81071 left
|
|||
drake1 | but => is still to associate a pair? | 13:17 | |
moritz_ | not "still" | ||
perl 5 has no idea of pairs | |||
drake1 | seems like -> int argc, int argv alike prototyping | 13:18 | |
moritz_ | in perl 5, => is just like a comma, except that it quotes the LHS | ||
drake1 | yes I know with first one being the even positions | ||
moritz_ | buubot: eval: [my $a = 5 => 'b' => a => 4] | ||
buubot | moritz_: [5,"b","a",4] | ||
moritz_ | whereas in Perl 6, the => actually constructs a Pair object | 13:19 | |
PerlJam | moritz_: well, it quotes barewords on the LHS, not just anything :) | ||
moritz_ | bareword identifiers, right | ||
drake1 | does anyone know how to get a direct pixmap to X instead of all those objects? | 13:23 | |
moritz_ | aren't there Tk widges for displaying pixel graphics? | ||
drake1 | I don't know | ||
moritz_ | I'd be surprised if not | 13:24 | |
drake1 | something like an X pixmap string | ||
whatever | |||
it's fine enough with perl objects | |||
moritz_ | search.cpan.org/~srezic/Tk-804.029/...Pixmap.pod | 13:25 | |
drake1 | XPM then | ||
13:26
bbkr joined
|
|||
drake1 | then $mw->bind would then be $mw.bind or just mw.bind ? | 13:29 | |
in perl6 | |||
tadzik | $mw.bind, variable is a variable | 13:30 | |
drake1 | and it's still called a reference variable? | ||
tadzik | well, it's just a scalar | 13:31 | |
drake1 | no special type | ||
moritz_ | since (nearly) everything in Perl 6 is a reference, it doesn't make sense to call something explcilitly a reference | 13:32 | |
drake1 | nice | ||
but perl6 know we're asking for an object method by the dot? | 13:33 | ||
knows* | |||
moritz_ | with the dot you *always* ask for an object method | ||
drake1 | alright | ||
jnthn | ...what other sort of method is there in Perl 6? :-) | ||
moritz_ | well, .() is probably not an object method | 13:34 | |
jnthn | oh, I see what you mean. | ||
drake1 | jnthn: only playing smart with OO terms | ||
moritz_ | other languages distinguish "object methods" and "class methods" | 13:35 | |
jnthn | Yeah | ||
moritz_ | in Perl 6, a "class method" just means calling a method on the type object | ||
drake1 | class methods are still package::method ? | ||
tadzik | package.method | ||
moritz_ | TypeObject.method() | ||
like | |||
drake1 | nice | 13:36 | |
moritz_ | Gymnast.new().walk-to-bar() | ||
jnthn | ;-) | ||
moritz_ | there .new() is a method on the type object | ||
drake1 | and perl6 also has arbitrary constructors with blessings ? | ||
moritz_ | yes | ||
drake1 | cool | ||
moritz_ | though you get one free for default | 13:37 | |
13:37
Helios- left
13:38
Helios- joined
|
|||
drake1 | then perl is close to perfect | 13:38 | |
are there any pattern modifiers for locale compatible BREs and EREs? | 13:45 | ||
moritz_ | what are BREs and EREs? | 13:46 | |
PerlJam | basic regex and extended regex | ||
they are POSIXy I think. | 13:47 | ||
drake1 | \(basic\|extended\) regular expression | ||
sometimes perl is very rich in meta characters | |||
moritz_ | I don't know; Perl 6 doesn't use POSIX regexes :-) | ||
drake1 | read a bit about the angle bracket expressions for pattern meta control | 13:48 | |
seems it' | |||
s | |||
gonna be possible | |||
13:50
wooden left
|
|||
drake1 | even in a `lex' alike fashion by default | 13:53 | |
with implicit /.../e's actions and stuff | 13:54 | ||
13:55
uniejo left
|
|||
drake1 | perfect for ASM generators | 13:55 | |
maybe a bit slower than lex+yacc+cc | 13:59 | ||
PerlJam | slower for now, but still more expressive. | 14:01 | |
moritz_ | well, we found that Perl 6 is a pretty good language to write a compiler in | ||
drake1 | very friendly, usually | ||
moritz_ | which is why big parts of Rakudo are written in Perl 6 | ||
drake1 | with a proper build system, the compilation time isn't really an issue | 14:02 | |
PerlJam | whenever the code is optimized for speed, I'd be willing to be the total time of development using Perl6 will be much less than lex+yacc | ||
drake1 | probably | ||
also a matter of taste | |||
14:03
lamstyle joined
14:06
Trashlord left
|
|||
bbkr | lex+yacc are very complicated when compared to P6 grammar with :actions attached. check for example masak's HTML::Template - grammar is on one screen. i use Eyapp at work and most jobs can be done with P6 grammars in 50% less time. | 14:10 | |
14:10
amkrankruleuen joined
14:11
drbean left
|
|||
drake1 | I love to code C | 14:11 | |
tadzik | I need to lear about this grammars Actions | ||
drake1 | sometimes Perl is a lot more complicated | ||
moritz_ | and sometimes a lot easier :-) | 14:12 | |
drake1 | when things are getting tiny and specific | ||
moritz_: depends on many things | |||
bbkr | drake1: me too. and I think it will be possible soon (or it is possible now) to have very clear P6 grammar and C libs to interpret AST. | ||
drake1 | hmm | 14:13 | |
moritz_ | drake1: sure; for low level stuff C is easier; but string manipulations are just a PITA in C | ||
more so if they can contain binary data | |||
drake1 | depends how you wrap it | ||
14:13
Italian_Plumber left
|
|||
moritz_ | well, the fact that you have to wrap it speaks for itself | 14:14 | |
in Perl, it is already wrapped | |||
bbkr | tadzik: the best way to see how grammar actions work is to analyze JSON::Tiny (available on CPAN) | ||
drake1 | C99 macro code is typically far enough string magic | ||
but I like perl to | |||
depends on my personal mood | 14:15 | ||
sometimes the one sometimes the other | 14:16 | ||
moritz_ | github.com/moritz/json/blob/master/...Grammar.pm | ||
github.com/moritz/json/blob/master/...Actions.pm | |||
14:17
Trashlord joined
|
|||
drake1 | a bit paradoxical, how perl5 is completely utf-8 for a trillion different scripts while trying to be the a single language for everything at the same time | 14:17 | |
moritz_ doesn't understand that statement | 14:18 | ||
you can use perl5 in all-latin1 if you want | |||
14:20
alester joined
|
|||
drake1 | I mean with `sh' you always switch scripting language, in perl you stay or can stay in perl | 14:20 | |
tadzik | moritz_: make $<pair>>>.ast.flat; is actually make $<pair>».ast.flat? | ||
>>> looks not pretty | |||
moritz_ | tadzik: yes; I planned to change that | ||
now that the applicable rakudobug is fixed | 14:21 | ||
tadzik | so Grammar is Parsing, and Actions is generating the actual data structure? | 14:22 | |
14:22
perlygatekeeper joined
|
|||
tadzik | duh, I need to finally read this grammar chapter | 14:22 | |
drake1 | the actions stack the compilation | ||
in fine binary strings | |||
moritz_ | tadzik: yes, you should | 14:23 | |
tadzik: and report back whether it answers your questions | |||
amkrankruleuen | Hello, i find documentation for Sockets in Perl6 | 14:31 | |
moritz_ | where? | ||
amkrankruleuen | generally | 14:32 | |
moritz_ | are you searching for documentation? | 14:33 | |
perlcabal.org/syn/S32/IO.html#IO%3A...%3A%3AINET seems all we have right now :( | 14:34 | ||
amkrankruleuen | Ups, sorry, i sleep -.-, i s/find/search/ | ||
moritz_ | there are some working examples that you could use as inspiration, though | ||
amkrankruleuen | Thanks | ||
tadzik | moritz_: so far the book looks nice, I even noted down some bugs and typos | 14:35 | |
moritz_ | in particular github.com/mberends/http-server-simple | ||
tadzik++ | |||
tadzik | I sat and started reading it from the very beginning | ||
let me translate it to english | |||
moritz_: can I fix them myself? | |||
moritz_ | tadzik: sure | ||
hugme: add tadzik to book | |||
hugme hugs tadzik. Welcome to book! | |||
tadzik | that'd be the second Warsaw Perl Monger fixing the Perl 6 Book :) | 14:36 | |
after Piotr Fusik | |||
moritz_: oh thanks :) | |||
suprise hugme :) | |||
moritz_ thinks we could use a dozen Warsaw Perl Mongers :-) | 14:37 | ||
14:37
x3nU is now known as mbialy
|
|||
drake1 | IO::Pipe, that's exactly what I needed. Thank you moritz_. | 14:37 | |
tadzik | :) | ||
speaking of Warsaw Perl Mongers, how is require doing in Rakudo? | |||
14:38
pnate joined
|
|||
moritz_ | it blocks on me not getting it to parse, and nobody else is working on it :/ | 14:38 | |
rakudo: use Test <is ok plan>; | |||
p6eval | rakudo b958a1: OUTPUT«===SORRY!===Confused at line 22, near "use Test <"» | ||
tadzik | looks like pdf conversion is eating letters | 14:39 | |
moritz_ | the parsing code is in src/Perl6/Grammar.pm line 458 | ||
tadzik: are you looking at the latest PDF? | |||
dalek | ok: 8746dbc | moritz++ | src/ (2 files): [subs] rip out section about multi methods; it belongs into the OO chapter, and probably with quite different wording |
||
tadzik | moritz_: yep | 14:40 | |
moritz_ | and I think that the <arglist> *should* be parsing <is ok plan> | ||
tadzik | imgur.com/xeGFO | ||
moritz_: ↑ | |||
moritz_ | ouch | ||
tadzik | also, I don't know how to fix that one: imgur.com/Sle6T | 14:41 | |
besides another lowercased c | |||
drake1 | sed '/^\.PL/,/^\.LP/!d' */* |perl . Gotta run. Bye | 14:42 | |
14:42
drake1 left
|
|||
tadzik | also I have no tools to build the book :/ | 14:43 | |
moritz_ | tadzik: the README tells you what you need... it comes with every modern Linux distributions | ||
s/s$// | |||
tadzik | speak for yourself, CRUX has no inkscape in official ports ;) | 14:44 | |
should I add myself to contributors? | |||
moritz_ | s/modern/modern and mostly complete/ | ||
:-) | |||
tadzik: yes, please | |||
tadzik | CRUX is complete. It's just frugal in terms of packages :) | 14:45 | |
moritz_ | I can't build it currently, because at $work I don't have the tools either | ||
will try some fixes at home later on | |||
14:46
zulon left
|
|||
dalek | ok: 54b6b80 | tadzik++ | src/regexes.pod: Fixed another broken C<> in regexes.pod |
14:46 | |
ok: d28f1b3 | tadzik++ | src/basics.pod: Fixed C<> in basics.pod |
|||
tadzik | I think the first one fixed that second bug | ||
moritz_ | aye | ||
and I think the first bug is just missing indention | |||
it seems the building code uncondtionally cuts off the first 4 characters of code blocks | 14:47 | ||
tadzik | so indenting it will fix it? This appears in many places | 14:48 | |
moritz_ | I'll test it when I get home | ||
if that's the fix, easy karma :-) | |||
tadzik | :D | 14:49 | |
speaking of easy karma... | |||
jnthn | tadzik++ | 14:50 | |
;-) | |||
14:50
sftp left
|
|||
tadzik | oh noes, you have spoiled the effect! :) | 14:50 | |
speaking of easy karma, **dalek**... | |||
14:50
sftp joined
|
|||
dalek | ok: 426a900 | moritz++ | src/basics.pod: markup fix, noticed by tadzik++ |
14:52 | |
ok: 081b5ef | tadzik++ | lib/book.sty: Added myself to contributors |
|||
tadzik | ...there we go :) | ||
I mean the second one :) | |||
14:52
mbialy is now known as x3nU
|
|||
tadzik | so these are just spaces, yep? I remember seeing another few bugs like this one | 14:53 | |
or maybe I didn't | |||
14:54
wtw left
|
|||
moritz_ | there are some more | 14:55 | |
src/basics.pod lines 491 to 502 | 14:56 | ||
tadzik | www.reddit.com/r/programming/commen...bsets_and/ I see a room for some nice propaganda response to that comment :)( | ||
moritz_ | and src/subs-n-sigs.pod lines 76 and later | ||
tadzik | aye | ||
are you fixing it now? | |||
moritz_ | no; I want to test if my last commit actually fixed anythinig | 14:57 | |
but I can't do that right now | |||
so I have to wait for tonight | |||
tadzik | building inkscape atm, I may be able to test it in a few minuts | 14:58 | |
moritz_ | (reddit) replied, though my reply seems a bit lame | ||
tadzik | not bad | 14:59 | |
lue | hello o/ | 15:05 | |
bbkr | rakudo: sub foo(Int $x) {say "called with $x"}; foo(any(1,2,3)) # it that correct method dispatch or a bug? looks like a bug because Int !~~ Junction | ||
tadzik | hi lue \o | ||
p6eval | rakudo b958a1: OUTPUT«(timeout)» | ||
moritz_ | timeout looks bad | ||
rakudo: sub foo(Int $x) {say "called with $x"}; | |||
p6eval | rakudo b958a1: ( no output ) | 15:06 | |
bbkr | it returns "called with 1" "called with 2" "called with 3" locally on Pisa release | ||
moritz_ | and that's spec | ||
that's what we call "autothreading" | |||
jnthn | That's what auto-threading does. | ||
bbkr | ah, awesome! | 15:07 | |
tadzik | autothreading alredy works? yay. I thought threads in Parrot are NYI | ||
15:08
justatheory joined
|
|||
mathw | it doesn't necessarily do it in parallel | 15:08 | |
conceptually yes | |||
moritz_ | authoreading != threading | ||
mathw | but at the moment it doesn't use threads to do it | ||
tadzik | oh, I see | ||
bbkr | rakudo: multi sub foo(Int $x) {say "called with number $x"}; multi sub foo(Str $y) {say "called with string $y"}; foo(one(1,"a")) # this dispatch is purely AWESOME! | 15:11 | |
p6eval | rakudo b958a1: OUTPUT«(timeout)called with number 1» | 15:12 | |
bbkr | eval has some hickup today :( | 15:13 | |
jnthn | bbkr: That took...effort...to get right. :-) | ||
[Coke] | partcl-nqp: puts [namespace children ::] | ||
p6eval | partcl-nqp: OUTPUT«» | ||
[Coke] | ww! | ||
15:13
isBEKaml joined
|
|||
moritz_ | bbkr: what's odd is that the p6eval has a pretty load at the moment | 15:14 | |
15:15
scoon joined
|
|||
isBEKaml | good evening, #perl6! | 15:16 | |
moritz_ | o/ isBEKaml | 15:17 | |
isBEKaml | hugme: hug moritz # for his response to the reddit thread. esp "Steal" xD | 15:18 | |
hugme hugs moritz | |||
15:18
scoon left,
justatheory left
|
|||
tadzik | hehe | 15:19 | |
bbkr | hmm, i found some inconsistency. %($x) calls method $x.hash but @($x) does not call $x.array. | 15:27 | |
i'm not sure if it's anywhere in the spec | |||
moritz_ | what does @() call? .flat? | ||
TimToady | probably .list | 15:28 | |
bbkr | rakudo: class A { method list {say 1}}; %(A.new) # checking | ||
jnthn | rakudo: class A { method flat { say "yes" } }; say @(A.new) | ||
p6eval | rakudo b958a1: OUTPUT«Method 'hash' not found for invocant of class 'A' in main program body at line 22:/tmp/rhvL2pb_Pp» | ||
rakudo b958a1: OUTPUT«A()<0x5fbf5e0>» | |||
bbkr | rakudo: class A { method list {say 1}}; @(A.new) # checking | ||
p6eval | rakudo b958a1: OUTPUT«1» | 15:29 | |
jnthn | rakudo: class A { method list { say "yes" } }; say @(A.new) | ||
p6eval | rakudo b958a1: OUTPUT«yes1» | ||
jnthn | ah, bbkr beat me to it :-) | ||
bbkr | .list :) thanks, everything clear now | ||
TimToady | we try to keep the flat/slice distinction lazy | ||
15:42
pyrimidine joined
|
|||
x3nU | where can i find list of date&time related functions in perl6 (if there's any)? | 15:42 | |
tadzik | S32 is it? | 15:44 | |
PerlJam | x3nU: perlcabal.org/syn/S32/Temporal.html | ||
tadzik | yep | ||
TimToady | you can find these things via perl6.org specifications linking to perlcabal.org/syn/ | 15:45 | |
x3nU | thanks :) | 15:46 | |
15:48
zulon joined
15:50
Mowah joined
15:55
ruoso left
|
|||
pmichaud | good morning, #perl6 | 15:57 | |
TimToady | back atchya | ||
jnthn | afternoon, pmichaud :-) | 15:58 | |
tadzik | pre-evening, pmichaud :) | ||
TimToady | hugme should randomly hug people who use :( or :/ | 16:00 | |
pmichaud | it doesn't do that yet? :( | ||
16:00
risou joined
|
|||
tadzik | :( | 16:00 | |
that'd be a nice feature | |||
TimToady | if not overdone | 16:01 | |
jnthn | But what about all the extra traffic? :/ | ||
tadzik | hugme: hug jnthn | ||
hugme hugs jnthn | |||
TimToady | it should track who it has not hugged recently | ||
jnthn | .oO( hugma ) |
||
TimToady | it should especially hug someone new to the channel | 16:02 | |
[Coke] thinks that's a little overboard. | |||
TimToady | I mean if they use a negative emoticon | ||
[Coke] | oh, I thought you meant on join. | 16:04 | |
Þ | |||
bbkr | rakudo: say "mmmmmmmmmany" ~~ /m ** 1..0/ # a bug? inverted ranges (correct according to STD) matches infinite amount in regexp repetition ** op | 16:05 | |
p6eval | rakudo b958a1: OUTPUT«mmmmmmmmm» | ||
TimToady | it could also detect when someone asks a question and there's no activity for the next N minutes | ||
jnthn | Oh wow, :Þ is a really cool Icelandic smiley. | ||
TimToady | bbkr: yes, that should match 0 times | 16:06 | |
should probably be a compile error, really | |||
PerlJam suddenly wonders what / x ** 'a'..'z' / would mean | 16:07 | ||
sjn | jnthn: :Ð | ||
pmichaud | bbkr: yes, it's a bug. | ||
PerlJam: I suspect it would parse as / [ x ** 'a'] .. 'z' / | 16:09 | ||
bbkr reports | 16:10 | ||
pmichaud | std: / <[9..0]> / # just checking | 16:11 | |
p6eval | std 32087: OUTPUT«ok 00:03 117m» | ||
16:11
tylercurtis joined
16:13
molaf joined
16:14
foodoo left,
tadzik left
|
|||
pugssvn | r32088 | lwall++ | [STD] detect empty range on ** quantifier | 16:14 | |
gfldex | i like hugme as it is right now because the human interaction that is required to trigger the hug gives that hug a meaning | ||
bbkr | inverted ranges should be legal. there are many examples when silent-skip of inverted range is most DWIM behavior. | 16:16 | |
pmichaud | inverted ranges are okay, but probably not if the range is a constant. | 16:17 | |
jnthn | bbkr: I suspect this is only looking for literals that are inverted. | ||
TimToady | jnthn: that is correct | 16:18 | |
16:18
pmurias joined
|
|||
pmurias | hi | 16:18 | |
bbkr | jnthn: yes | ||
TimToady | empty character class ranges are a bit harder to detect, since we'd have to deal with \x and such | ||
that should probably be done in the semantic layer | 16:19 | ||
pmichaud | agreed | ||
afk, lunch and errands | 16:22 | ||
bbkr | rakudo: say "" ~~ /m ** 1..-1 / # tiny bug - error message should say "positive integers" because -1 IS an integer. | 16:25 | |
x3nU | i know that i'm asking stupid questions but it's because there's no good perl6 tutorial | 16:26 | |
p6eval | rakudo b958a1: OUTPUT«===SORRY!===Only integers or '*' allowed as range quantifier endpoint at line 22, near "-1 / # tin"» | ||
x3nU | how do i read Str from socket? | ||
16:26
Mowah left
|
|||
moritz_ | x3nU: there is indeed no good documentation for that - see github.com/mberends/http-server-simple for an example though | 16:26 | |
x3nU | i heard that there was get() method, but well... it *Was* | ||
TimToady | std: say "" ~~ /m ** 1..-1 / | 16:28 | |
p6eval | std : ( no output ) | ||
TimToady | std: 42 | ||
p6eval | std : ( no output ) | ||
TimToady | has p6eval abandoned using 'make snap' for std? | 16:29 | |
16:29
zulon left
|
|||
moritz_ | no | 16:29 | |
16:31
spq1 joined
16:32
ambs joined
16:34
ambs left
16:35
snearch joined
|
|||
TimToady | std: say "" ~~ /m ** 1..-1 / | 16:35 | |
p6eval | std 32088: OUTPUT«===SORRY!===Malformed range at /tmp/NlvQf0HNFI line 1:------> say "" ~~ /m ** 1..⏏-1 / expecting quantifierParse failedFAILED 00:01 119m» | ||
TimToady | std: say "" ~~ /m ** 1..0 / | 16:36 | |
p6eval | std 32088: OUTPUT«===SORRY!===Empty range at /tmp/CL9etXG2gw line 1:------> say "" ~~ /m ** 1..0⏏ /Parse failedFAILED 00:01 119m» | ||
bbkr | TimToady: I'll add this output to both tickets. | 16:38 | |
std: "" ~~ /m ** 1..Inf / | 16:40 | ||
p6eval | std 32088: OUTPUT«===SORRY!===Malformed range at /tmp/S0dgnvVdrx line 1:------> "" ~~ /m ** 1..⏏Inf / expecting quantifierParse failedFAILED 00:03 119m» | ||
bbkr | well, 1..Inf is not malformed range :) | 16:41 | |
std: 1..Inf | |||
p6eval | std 32088: OUTPUT«ok 00:04 116m» | 16:42 | |
bbkr | inconsistency here | ||
16:47
ruoso joined,
isBEKaml left
|
|||
TimToady | it can't match Inf of them, only * of them :) | 16:47 | |
matching is harder than counting :) | 16:49 | ||
dalek | ok: 917d907 | moritz++ | src/ (2 files): more markup fixes; turns out we need four leading spaces in each code block |
16:50 | |
x3nU | ok, i know how to read str from socket | 16:55 | |
16:55
justatheory joined
|
|||
x3nU | but what if i want read bytes or integer | 16:56 | |
bbkr | TimToady: you're right. and that's why it shouldn't complain about malformed range, because range is perfectly legal, but not in this context. STD error is misleading. | ||
moritz_ | x3nU: oha has submitted a patch that allows reading bytes | 16:57 | |
x3nU: it's being reviewed | |||
16:59
dakkar left
|
|||
x3nU | so in best case i will be able to do that in a month? ;f | 17:00 | |
moritz_ | in a week, if you're lucky | ||
(and if you build the compiler from source) | |||
x3nU | using compiler builded from repo is bad idea imho ;/ | 17:01 | |
bbkr | TimToady: most P5 converts won't see difference between 1..* and 1..Inf meaning. and if they get "malformed range" error they will report bug because the range is valid. | ||
TimToady | tylercurtis: in your subset article, a 16-year-old is neither a Child nor an Adult | 17:02 | |
mathw | TimToady: that's because they're a Hassle | ||
tylercurtis | TimToady: thanks. | 17:03 | |
tylercurtis fixes. | |||
TimToady | bbkr: I don't think that's going to be a major problem | ||
normal ranges also allow negative numbers and non-numerics, and we don't allow those here either | 17:07 | ||
it's much more likely for a p5 programmer to try to leave out the right side of .. entirely in this case | 17:08 | ||
std: /x ** 1../ | |||
p6eval | std 32088: OUTPUT«===SORRY!===Malformed range at /tmp/jJajhI08ZT line 1:------> /x ** 1..⏏/ expecting quantifierParse failedFAILED 00:01 117m» | ||
tylercurtis suspects that, for now at least, Rakudo's error messages are much more relevant for (new) P5 converts. | 17:09 | ||
moritz_ | tylercurtis: yes, but rakudo gets its parse error messages from STD | ||
17:12
thebird left
17:13
pmurias left
|
|||
bbkr | TimToady: I'm just saying that "expecting quantifier" part of this error message is not helpful at all because there are some "hidden" limitations about this quantifier (positive Int or *). But I assume not muany implementations will use directly STD errors, so maybe you're right that it won't be major problem | 17:13 | |
bbkr is back to bughunting | 17:14 | ||
17:15
pmurias joined
|
|||
TimToady | I just don't want the grammar to end up ten times larger to catch marginal mistakes that almost anyone can figure out rapidly; there has to be some balance between that and an error message that just says '?' | 17:16 | |
ingy | hi TimToady. Got a sec? | 17:17 | |
moritz_ | and the error message does indicate the position pretty well | ||
TimToady | had one, but it expired 17 seconds ago... | ||
moritz_ | rakudo: / ; / | ||
p6eval | rakudo b958a1: OUTPUT«===SORRY!===Confused at line 22, near "/ ; /"» | ||
TimToady | std: / ; / | ||
p6eval | std 32088: OUTPUT«===SORRY!===Semicolon must be quoted at /tmp/BkGopLO1bQ line 1:------> / ;⏏ /Parse failedFAILED 00:01 115m» | ||
moritz_ | std: / - / | 17:18 | |
p6eval | std 32088: OUTPUT«===SORRY!===Unrecognized regex metacharacter (must be quoted to match literally) at /tmp/AnzpibclQL line 1:------> / -⏏ /Can't call method "from" on unblessed reference at STD.pm line 53782.FAILED 00:01 115m» | ||
ingy | I need a word/term... general term for a piece of data like a string or num | ||
TimToady | oopsie | ||
moritz_ | ingy: "atom"? | ||
TimToady | scalar? item? | ||
datum? | |||
ingy | "object" feels correct but too overloaded | ||
TimToady | thingie? | ||
ingy | the value could be a list | 17:19 | |
TimToady | Moo | ||
moritz_ | "value"? | ||
ingy | value and object are two | ||
except $value->value feels yucky | |||
bbkr | "item" | ||
PerlJam | bbkr: I don't think the limitations will be hidden if everywhere we talk about ranges in regexp, we use normal ranges as an analogue rather than begin the same. | 17:20 | |
s/begin/being/ | |||
ingy | the thingy has type and value properties | ||
variable seems wrong | |||
moritz_ | "instance"? | ||
tylercurtis | Thing? | ||
PerlJam | ingy: "object" :) Just because it's too overloaded in general doesn't mean it can't work. | 17:21 | |
ingy | thing is too wishy washy | ||
x3nU | case insensitive regex is still unimplemented? | ||
moritz_ | x3nU: no | ||
tylercurtis | rakudo: say 'AbC' ~~ /:i abc/ | ||
p6eval | rakudo b958a1: OUTPUT«AbC» | ||
ingy | I am on PerlJam's camp, but thought I'd ask here | 17:22 | |
moritz_ | rakudo: say 'AbC' ~~ m:i/abc/ | ||
p6eval | rakudo b958a1: OUTPUT«AbC» | ||
x3nU | wow | ||
moritz_ | now with modifiers on the outside | ||
bbkr | ingy: maybe "chunk" ? | ||
tylercurtis | Noun. | ||
ingy | I like wow ;) | ||
17:22
rhr_ left
|
|||
ingy | x3nU++ | 17:22 | |
datum | 17:23 | ||
TimToady | dat | ||
17:23
snearch left
|
|||
ingy | nice | 17:24 | |
TimToady++ for inventing new words | |||
but I think I want a common one | 17:25 | ||
17:25
BlueT_ joined
|
|||
ingy | more acmeist | 17:25 | |
acmeism is inclusive of boring languages | |||
17:25
envi^home left
|
|||
ingy | :P | 17:25 | |
tylercurtis | thesaurus.com/browse/thing?r=76&...amp;ch=the | ||
ingy | tylercurtis: I been surfing too :) | 17:26 | |
portion | 17:28 | ||
sjn wonders where to find documentation for the batch method | |||
17:29
rhr joined
|
|||
colomon | sjn: don't know if it exists yet. | 17:30 | |
sjn | S07 mentions itr | ||
colomon | and come to think of it, I don't think it's supposed to exist at all any more -- the batch method, I mean, not the documentation | ||
sjn | oh? | ||
TimToady | S07 is quite out of date | 17:31 | |
colomon | I believe it's been replaced (more or less) by munch. | ||
which probably also isn't documented. | |||
that area of the spec and implementation has been under heavy construction recently. | 17:32 | ||
sjn | colomon: so you'd write (1,2,4...*).munch(10) ? | 17:33 | |
colomon | any objections to my removing batch from the spectests (it's only in two tests at the moment) and Rakudo? | ||
sjn: yes | |||
sjn | ok | ||
why the name change? | |||
colomon | star: say (1,2,4...*).munch(10) | ||
p6eval | star 2010.07: OUTPUT«1248163264128256512» | ||
colomon | star: say (1,2,4...*).munch(10).perl | ||
p6eval | star 2010.07: OUTPUT«(1, 2, 4, 8, 16, 32, 64, 128, 256, 512)» | 17:34 | |
17:34
pmurias left
|
|||
colomon | It behaves by taking the first N items off of the list (like using shift N times in a row), so munch was considered more accurate than batch, because it conveys the notion that the items are now gone from the list. | 17:34 | |
sjn | right | 17:35 | |
why not just call it first? | |||
TimToady | first does something else | 17:36 | |
colomon | again, first doesn't convey the notion that the elements are gone from the list | ||
sjn | ah | ||
right | |||
colomon | star: my $a := (1, 2, 4 ... *); say $a.munch(3).perl; say $a.munch(3).perl | 17:37 | |
sjn | and .shift(10) would be kinda odd | ||
p6eval | star 2010.07: OUTPUT«(1, 2, 4)(8, 16, 32)» | ||
colomon | I think shift(10) has been seriously considered, but people felt it was better to have a separate method name for now. | ||
TimToady | .munch might default to .munch(*), which would let the list decide how big to make the batch | 17:38 | |
17:39
risou left
|
|||
sjn | fwiw, I like term reuse, when possible :) | 17:39 | |
TimToady | shift was also felt to be more specific to arrays than to lists | ||
we're trying to keep the APIs somewhat distinct | 17:40 | ||
sjn | hm. | ||
bbkr | rakudo: %() # Parrot VM: PANIC: Out of mem! | 17:45 | |
p6eval | rakudo b958a1: ( no output ) | ||
bbkr | hmm | ||
does it go OOM locally for you on Pisa build? | |||
sjn | shift and munch(1) are the same type of actions, but still different... | 17:46 | |
is it possible to have lists that begin with * ? | 17:47 | ||
(or Inf) | |||
17:47
justatheory left
|
|||
moritz_ | sure | 17:48 | |
rakudo: say (Inf, 1, 2, Inf).perl | |||
p6eval | rakudo b958a1: OUTPUT«(Inf, 1, 2, Inf)» | ||
TimToady | you're confusing lists with ranges | ||
sjn | e.g. (*...*+*,1,1) | ||
moritz_ | arithmetics with Inf is pretty boring | 17:49 | |
Inf +-*/ finite number == +- Inf | |||
all other operations are either +-Inf or NaN | |||
bbkr | rakudo: %(); say "alive"; | 17:50 | |
p6eval | rakudo b958a1: ( no output ) | ||
bbkr reports | |||
sjn | right, so munch() works on lists _and_ ranges, but not arrays | 17:51 | |
TimToady | rakudo: say (* R... 1,1,*+*).munch(10).perl | 17:52 | |
p6eval | rakudo b958a1: OUTPUT«(1, 1, 2, 3, 5, 8, 13, 21, 34, 55)» | ||
moritz_ | scary. | 17:53 | |
sjn | rakudo: (1..*).munch(4).perl.say | 17:54 | |
p6eval | rakudo b958a1: OUTPUT«Method 'munch' not found for invocant of class 'Range' in main program body at line 22:/tmp/PsFUmJmtTg» | ||
sjn | right | ||
sjn is even more confused | |||
maybe I should play with something safer :-P | 17:55 | ||
moritz_ | .[^10] is pretty safe | ||
sjn | rakudo: (1..*)[^4].perl.say | ||
moritz_ | rakudo: say (1..*).[^10].join(', ') | ||
p6eval | rakudo b958a1: OUTPUT«(1, 2, 3, 4)» | ||
rakudo b958a1: OUTPUT«1, 2, 3, 4, 5, 6, 7, 8, 9, 10» | |||
sjn likes the munch() thing mostly because of the possibilities for making Edvard Munch jokes :) | 17:56 | ||
moritz_ | rakudo: say %(a => 1, b => 2).perl | 17:57 | |
p6eval | rakudo b958a1: ( no output ) | ||
17:58
tylercurtis left
|
|||
sjn | on the down side, I'm getting a bit worried about the keyword inflation in Perl6 :-( | 17:59 | |
17:59
TimToady left
|
|||
moritz_ | .munch is not a keyword | 18:00 | |
sjn | well | ||
ok, "term inflation"? | |||
moritz_ | "method inflation"? | ||
dalek | kudo: 689bb75 | moritz++ | src/builtins/Parcel.pir: fix %() segfault. Patch courtesy of TiMBuS++ |
18:01 | |
sjn | "concept inflation" | ||
or as we n00bs like to call it, "ETOOMUCHTOLEARN" | 18:02 | ||
moritz_ | I kinda share your concerns | 18:03 | |
OTOH you don't need to learn them all | |||
sjn proposed to jnthn to give a talk in Oslo about "patterns" in Perl6 (where that term means "concepts that are common all over perl 6, that you can put together to create really cool tings") | 18:04 | ||
multimethods is one such thing | |||
another is metaoperators | 18:05 | ||
moritz_ | that's actually a nice idea | ||
sjn | I'm sure there are others</perl6 n00b> | ||
my problem with that thought, plus the munch/shift thing, is that they don't really go together | 18:06 | ||
18:06
araujo left
|
|||
pugssvn | r32089 | moritz++ | [t/spec] tests for %() hash context forcer; also tests RT #75502 | 18:06 | |
sjn | in my brane at least - munch and shift are so similar, it seems weird they're named differently | 18:07 | |
18:07
araujo joined
|
|||
sjn | the concept is really "take n items of the beginning of this sequence", right? | 18:08 | |
where shift just takes 1, and munch takes any | |||
but they do it differently according to what kind of sequence they operate on | |||
(at which point, my thoughts go "this smells awefully multimethod-like") | 18:10 | ||
18:13
macroron joined
18:14
macroron left,
macroron joined
|
|||
pugssvn | r32090 | moritz++ | [t/spec] get rid of wrong plan | 18:16 | |
18:17
cotto_work joined,
plainhao joined
18:20
am0c^ joined
18:25
jakk_ joined,
rlb3 joined
|
|||
moritz_ | std: / - / | 18:26 | |
p6eval | std 32088: OUTPUT«===SORRY!===Unrecognized regex metacharacter (must be quoted to match literally) at /tmp/iBU9UZsd8y line 1:------> / -⏏ /Can't call method "from" on unblessed reference at STD.pm line 53782.FAILED 00:01 115m» | ||
moritz_ | rakudo: / - / | ||
p6eval | rakudo b958a1: OUTPUT«===SORRY!===Confused at line 22, near "/ - /"» | ||
18:26
jakk_ left
|
|||
moritz_ | nqp: / - / | 18:27 | |
p6eval | nqp: OUTPUT«Confused at line 1, near "/ - /"current instr.: 'parrot;HLL;Grammar;panic' pc 552 (src/cheats/hll-compiler.pir:205)» | ||
18:27
Phiend joined
18:28
alanhaggai joined
|
|||
Phiend | hello, I have a simple question on roles : I know it is possible to add a role to an object or class, but I never hear of the role being removed. Possible/how ? | 18:28 | |
PerlJam | Phiend: sounds painful | 18:29 | |
Phiend laughs | |||
moritz_ | Phiend: don't think it's supported | ||
Phiend | if not, that would be kinda a glaring design issue. | ||
moritz_ | removing a role screams for trouble | 18:30 | |
Phiend | well, it is reasonable. happens all the time in real life, for example. an it would be orthogonal behavior, darn it :) | ||
18:31
tylercurtis joined
|
|||
moritz_ | phenny: tell mberends if you replace 'plan *;' with a specific number, please spectest before committing | 18:32 | |
phenny | moritz_: I'll pass that on when mberends is around. | ||
colomon | Phiend: would you expect every existing object of that class to be modified to lose the attributes and methods from that role? | 18:33 | |
pugssvn | r32091 | moritz++ | [t/spec] remove a wrong plan; avoid STDOUT output that confuses TAP | 18:34 | |
moritz_ | std: $ | ||
p6eval | std 32090: OUTPUT«===SORRY!===Non-declarative sigil is missing its name at /tmp/GlPSJbdGbL line 1:------> <BOL>⏏$Bogus statement at /tmp/GlPSJbdGbL line 1:------> $⏏<EOL> expecting twigilParse failedFAILED 00:03 116m» | ||
moritz_ | std: @ | ||
p6eval | std 32090: OUTPUT«===SORRY!===Non-declarative sigil is missing its name at /tmp/vckluP58Zp line 1:------> <BOL>⏏@Bogus statement at /tmp/vckluP58Zp line 1:------> @⏏<EOL> expecting twigilParse failedFAILED 00:03 116m» | ||
jdv79 | wrong chan - sorry | ||
Phiend | colomon: for truly dynamic roles, yes. | 18:35 | |
pugssvn | r32092 | moritz++ | run more tests | 18:36 | |
18:36
chromatic joined
|
|||
chromatic | Allowing role removal would violate the type system. | 18:36 | |
colomon | chromatic++ | 18:37 | |
Phiend | perhaps it is a design issue, then | ||
moritz_ | aye; it would make every operation unsafe | ||
gfldex | what does not mean that you can't implement a prototype based object system with perl 6 | ||
chromatic | You're welcome to write a custom MOP which allows that, but you get to respond to bug reports when that happens. | ||
Phiend chuckles | |||
moritz_ | it sounds comparably safe to allow ripping out integers from a language | 18:39 | |
or any other built-in types | |||
chromatic | Now I can imagine that it's useful to pretend that an entity does not perform a role in certain cases, but I expect it's more useful to override the DOES() equivalent, whatever that's called in Perl 6 today. (Haven't tried lately; don't remember.) | ||
moritz_ | well, method does() in the metaclass | 18:40 | |
chromatic | $entity.^does() ? | ||
Phiend | from a design standpoint, it makes sense though that some roles be removable. For instance if you were writing code that modelled admin privileges, you would want to be able to revoke those privileges. In the real world, this often happens with 'roles' - once a cop, not always a cop for instance. It is fine if you want to keep perl6 simple, however I would assume roles would be able to | ||
reflect transient behavior occasionally. | |||
chromatic | That's really not a role as much as it is instance data. | 18:41 | |
moritz_ | Phiend: just because something is called a "role" doesn't mean you have to implement it with actual rules | ||
s/rules/roles/ | |||
colomon | "perl6 simple" !!!!!!!!!!!!!!! | ||
18:41
sorear left
|
|||
moritz_ | in fact it's probably a pretty bad idea | 18:41 | |
18:41
rlb3 left
|
|||
Phiend | yes, maybe roles shouldn't actually be roles ? | 18:41 | |
moritz_ | because you'd have to generate code for each roles | ||
Phiend | well, maybe this is something to think on for a future version of p6. maybe it is a bad idea, but then maybe not. | 18:42 | |
chromatic | It's a very bad idea to allow decomposition of roles from classes. | 18:43 | |
That said, if you implement your admin system in terms of runtime decoration of instances with roles, you could make that work. | |||
Phiend | but doing so would make it orthogonal. mmmmmmmm...orthogonal. | ||
chromatic | Orthogonal is useless if the system doesn't work. | ||
Phiend | chrome, you mean runtime subtraction of roles is possible ? | 18:44 | |
colomon | you keep saying "orthogonal", but what I keep hearing is "insane" | ||
Phiend | I get that a lot :) | ||
chromatic | Runtime manipulation of the class of an object is (in theory) possible. | ||
moritz_ | you could just have a "reset" role that just overrides the privilege methods that the other roles might have mixed in | ||
Phiend | well, how many calculators have you seen with '+' but no '-' ? | ||
m: yes, but why would you need to do that hack in a well-designed language ? | 18:45 | ||
tylercurtis | Peano arithmetic. | ||
chromatic | How many calculators have you seen where you can say 10.02 looks like a rational number, but it's an integer. I promise. | ||
tylercurtis always had fixed point calculators, as far as he could tell. | 18:46 | ||
gfldex | Phiend: if the Perl 6 role would not have been called role, would you still want it to be removeable? | ||
moritz_ | Phiend: why would you not need that in a well-designed language? | ||
colomon | Phiend: what exactly do you think the opposite of removing a role at run time? | ||
Phiend | what would we call it then : a biscuit ? | ||
moritz_ | a trait | ||
chromatic | an aspect | 18:47 | |
moritz_ | a mixin | ||
an interface | |||
whatever | |||
Phiend | I think the name role is good enough. | ||
chromatic | I hope not a mixin or an interface. | ||
tylercurtis | A class. | ||
Phiend | an interface, not quite. | ||
chromatic | a partial class | ||
Phiend | gfldex: no matter what you call it, my answer is yes. | 18:48 | |
chromatic | Okay, so when you decompose a role out of a class at runtime, do you run the constraint solver? | 18:49 | |
Do you reoptimize all of the code that could possible use that class? | |||
Phiend | I don't know - not a design expert. | ||
chromatic | Do you modify all of the instances of that class? | ||
moritz_ | Phiend: what do you think should happen if you remove the Numeric role from Int at runtime, and then somebody calls 3.sin? | ||
chromatic | What if they have user data that goes away, because those are attributes of the role? | ||
Do you save them? | |||
Phiend | kaboom! | ||
chromatic | Do you discard them? | ||
moritz_ | right | ||
gfldex | do you remove all methods that come from classes that use attributes that come from a role? | 18:50 | |
chromatic | What if it's a parametric role> | ||
Phiend | I didnot say every role should have this ability, but you should be able to, if it makes sense. | ||
moritz_ | ok | ||
chromatic | It never makes sense. | ||
moritz_ | that#'s a good idea | ||
Phiend | how this is done is left up to those crazy enough to go for it. | ||
moritz_ | as long as it's only allowed on the empty set of roles | ||
gfldex | :-> | 18:51 | |
Phiend | chrome: sure it does. You have a role as a licensed driver. If you should do a few illegal DUI operations, you could lose that role | ||
chromatic | That's instance data. | ||
That's not a role. | |||
Phiend | roles can be granted on instance objects, no ? | ||
chromatic | Sure. | 18:52 | |
gfldex | the name role put an idea into your head that works very well with the reality you live in, but quite bad with programming languages | ||
moritz_ | and I must admit that some of us gave examples likes this, which might not be the best OO design | 18:53 | |
gfldex | well, it does work quite well with javascript. But you trade languages niceness with speed and unpredictable runtime behaviour | ||
Phiend | I remain unconvinced; it would seem natural for a language that seeks to go along with how you think to actually do it. | ||
gfldex: it does ? | |||
colomon | I dunno, I'm not seeing any obvious reason why removing a role *from an instance object* would necessarily be a terrible thing, though it would probably be a pain to implement cleanly. | ||
gfldex | at lest for mozilla you can fool around with the prototype chain | 18:54 | |
moritz_ | Phiend: it's ok. You can drop a topic even if you're not convinced that your idea is bad :-) | ||
18:54
sorear joined
|
|||
chromatic | Why would you decompose the LicensedDriver role from the Driver class when one instance of the Driver loses his license? | 18:54 | |
Phiend | mor: I take that as an insult, sir | ||
moritz_ | Phiend: you shouldn't | ||
colomon | it's generalizing that to removing a role from an entire class that's completely insane. | ||
Phiend | chrome: you would not - you would decompose the instance/object, obviously. | ||
I didn't even suggest that...although now that I think about it... | 18:55 | ||
moritz_ | colomon: it's interface sanity. sin(5 bot not Numeric) # BOOOM | ||
chromatic | Runtime application and deapplication of roles from instances makes sense. | ||
Phiend | I think so :) | ||
moritz_ | if you're unlucky, such cases blow up in your own code | ||
chromatic | Runtime decomposition of roles from classes does not. You cannot do it safely in any but the most trivial circumstances. | ||
colomon | moritz_: yeah, but you can always do stuff that blows up code. | 18:56 | |
moritz_ | and people will write bug reports because your code blows up, even though it's not your problem | ||
Phiend | <nods> | ||
moritz_ | colomon: if you have good type constraints and precondtions, you can avoid that | ||
colomon | I mean, why shouldn't you be able to say my $a = 5 but not Numeric? | ||
yes, that would mean Numeric functions wouldn't work on it. | |||
moritz_ | because code all around assumes that Int ~~ Numeric | 18:57 | |
and if you have instances where that's not true, your type system is screwed | |||
gfldex | role foo { has $.a; }; class bar does foo { method bumm () { say $.a; } } }; my $o1 = bar.new(); remove role foo from bar; $o1.bumm(); # what would happen? | ||
18:57
masak joined
|
|||
colomon | moritz_: on an instance -- ie, this particular $a -- not on every Int. | 18:57 | |
masak | ahoy, #perl6! | ||
phenny | masak: 01:07Z <TimToady> tell masak yes, checking scope constraints on FIRST is in my todo file | ||
moritz_ | colomon: code we have depends on 1 ~~ Numeric | ||
masak | no rush. | ||
Phiend | it should throw a runtime exception, I would expect. | 18:58 | |
gfldex | :-> | ||
colomon | moritz_: 1 is not an instance of an object, it's a literal. | ||
moritz_ | Phiend: and disable all optimizations that are based on nominal types? | ||
Phiend | m: I dunno ! | ||
moritz_ | well, that would be a consequence | ||
masak: but is it FIRST on the todo list? :-) | 18:59 | ||
Phiend | I'm not saying that decomposition on every role is the right thing - I would think not. Once an int, always a filthy int. | ||
chromatic | That's what we're saying. You can't decompose roles from classes at runtime. | ||
Phiend | true dat | ||
chromatic | The system does not have sufficient information to do so, even if it were safe. | 19:00 | |
Phiend | but I think such an operation on instances does make sense, in some situations. | ||
chromatic | Sure; no one's disputing that. | ||
moritz_ | well, I do | ||
Phiend | ok, we are then in agreement. | ||
except for moritz. | |||
chromatic | Sure; no good-hearted person could possibly dispute that! | ||
moritz_ | :-) | ||
Phiend | much is explained :) | ||
well, thats all I desired ! | |||
19:01
TimToady joined
|
|||
chromatic | There are probably better ways to accomplish most goals (in your Driver case, a subset type) but it's a possible operation. | 19:01 | |
jnthn | chromatic is right - you *lose* information when you compose roles into a class. When you compose roles into an instance, it actually creates an anonymous subclass and puts the role into that. So in that case you could re-bless to the superclass, I guess. | ||
Phiend | how would you code that then ? | ||
masak | moritz_: maybe it's NEXT on the todo list :P | ||
chromatic | You *lose* that information on purpose, as a design goal of roles. | 19:02 | |
19:02
mberends joined
|
|||
jnthn | chromatic: Right. :-) | 19:02 | |
Phiend | thats part of what makes roles great | ||
it increases the KISS-itude | |||
jnthn | I've mostly tended to think of roles as re-usable bits of functionality that you use to build stuff, rather than pluggable things to add and remove. | 19:03 | |
chromatic | Phiend, something like subset LicensedDriver of Driver where *.points < 3 && age > 17; | ||
Phiend | interesting...although it is a hack methinks. | ||
chromatic | How so? It's a parametric type, like you might find in ML. | ||
jnthn | chromatic: I'd tended to see them as refinement types rather than parametric types. | 19:04 | |
TimToady imagines running some subset of DESTROY submethods if you rebless yourself to a parent class | |||
Phiend | well, I think so because I don't know subsets so good, and when I think of removing roles, I want to say stuff like 'bob isnt aLicensedDriver' - I'm a lazy coder ;) | ||
jnthn | TimToady: I wasn't offering to implement it, just saying its possible. :P | ||
TimToady: Though yes, running the DESTROYs could make sense. | 19:05 | ||
TimToady | I've been wanting to talk about mixins for the last 1/2 hour, but appflux was unusable | ||
chromatic | You don't have to write code to specify *how* to make Bob an unlicensed driver. You can write declarative code to specify the rules as to why Bob has just become an unlicensed driver. | ||
TimToady | took you guys about 20 minutes to get there... | ||
Phiend | knock yourself out, TT ! | ||
chromatic | You can ignore the mechanism and describe the policy. | ||
TimToady | yes and no | 19:06 | |
a language designer must simultaneously know everything and nothing | |||
chromatic | You need a Leelu wig. | 19:07 | |
PerlJam | If you already know nothing, how do you get to know everything? :) | ||
moritz_ | that's the problem. | ||
rokoteko | PerlJam: ? | ||
TimToady | the basic problem is that performance and exceptions leak through every abstraction | ||
Phiend | chrome: but what if the decomposition is a decision made at runtime, ad hoc ? | 19:08 | |
PerlJam | and knowing things (or no things) isn't enough either, you have to *decide* which is important. And *that's* the hard part if you ask me. | ||
rokoteko | You must be humble enough to understand you know nothing, as I see it. So basically he willingness always to learn something new. :) Not saying "I know everything, Im not interested.." But OTOH, Im not a language designed. :) | ||
Phiend | ya gotta have Vision. Unlike Microsoft. | 19:09 | |
TimToady is now contemplating a form of mixin that is really delegation | |||
chromatic | If you have subset types (whether you call them parametric or refinement), than any type dispatcher can destructure to examine specific attribute values. | ||
19:09
tylercurtis left
|
|||
chromatic | That's a runtime decision, but a fair amount of type-based dispatch can be runtime dispatch anyway. | 19:10 | |
PerlJam | TimToady: temporized? | ||
TimToady | no | ||
if you mixin a role, and you make not only an anon class but a new object that delegates to the parent object | |||
then you can just switch back to the parent, and the child will be GC'd | 19:11 | ||
the main problem with that is identity | 19:12 | ||
moritz_ | rakudo: / | / | ||
p6eval | rakudo 689bb7: ( no output ) | 19:13 | |
moritz_ | rakudo: / | /; say "alive" | ||
p6eval | rakudo 689bb7: OUTPUT«alive» | ||
chromatic | What does that offer over swapping to the anon class? | ||
TimToady | so you want the delegating child to pretend to have the same identity as its parent | ||
automatic GC | |||
jnthn | TimToady: I'd hope that we have enough flexibility in the meta-model for that to be done in a module. | ||
moritz_ | std: / | / | ||
p6eval | std 32092: OUTPUT«===SORRY!===Null pattern not allowed at /tmp/seCzwubd7Z line 1:------> / | ⏏/ expecting quantifierParse failedFAILED 00:01 115m» | ||
TimToady | when you unmixin | ||
jnthn: sure, I'm just speculatin' | |||
jnthn | TimToady: Oh, I'm not saying it's a bad idea. :-) | 19:14 | |
chromatic | Suppose the anon class remembers its parent (because it has to). | ||
TimToady | just sayin' that making it two different objects makes it really clear which memory belongs to each | 19:15 | |
jnthn | Aye. | 19:16 | |
chromatic | True. You don't have to morph. | ||
TimToady | morphing is also possible, of course | ||
19:16
jferrero joined
|
|||
jnthn | Wrapping existing stuff rather than mutating it always makes it easy to "go back". | 19:16 | |
gfldex | i'm trying to find a real world example where somebody is revoked a role and you dont want to keep any record that he/she ever had this role. I can't find any. On top of that drivers licenses are a really bad example here. | ||
TimToady | but I don't think calling the appropriate DESTROYs would do it completely | ||
unless you can GC within an object's storage :) | |||
Phiend | would a Power Rangers example help ? | 19:17 | |
chromatic | DESTROY on morph is a hard problem. Trust me. | ||
TimToady | and that's likely to depend on the repr | ||
jnthn | TimToady: Yeah, that's the other thing that bothers me about re-blessing to a superclass. | ||
TimToady | we're only discussing morph to a parent class here | ||
jnthn | Yes, immediate parent makes it less bad. | ||
chromatic | If all of these anon classes are singletons though, instance storage and class storage could be the same thing. | ||
TimToady | so calling the right DESTROY is just a smop, but reclaiming memory is a different issue | ||
jnthn | But it'd still need the repr to co-operate I guess. | 19:18 | |
chromatic | Identity seems like the least worst problem to solve. | ||
TimToady | one wonders if the mixed object can serve as its own class | ||
the inside-out way of repeating what chromatic said | 19:19 | ||
chromatic | Yes, but then wouldn't $mixed.^does( 'Class' ) be true suddenly? | ||
jnthn | TimToady: It may want to wrap the meta-object too. | ||
TimToady | huh? we don't have Class in that sense in Perl 6 | ||
jnthn | It took me a while longer to realize that www2.parc.com/csl/groups/sda/public...or-web.pdf is basically a lot of words for "let's do delegation" :-) | 19:20 | |
TimToady | I guess the problem is that :U would be false | ||
jnthn | *while longer than it should have done | ||
TimToady: When you say "serve as its own class" I'm not sure what meaning of class you're meaning. :-) | 19:21 | ||
TimToady | me too :) | ||
moritz_ | std: / \p / | ||
jnthn | ;-) | ||
p6eval | std 32092: OUTPUT«===SORRY!===Unrecognized regex backslash sequence at /tmp/lZEfIRsa8p line 1:------> / \⏏p /Check failedFAILED 00:03 116m» | ||
TimToady | that should probably be a .obs() | 19:22 | |
moritz_ | ie "Obsolete use of..." ? | ||
sorear | good * #perl6 | ||
jnthn | o/ sorear | ||
moritz_ | \o | 19:23 | |
rakudo: /\p/ | |||
p6eval | rakudo 689bb7: OUTPUT«===SORRY!===Confused at line 22, near "/\\p/"» | ||
masak | o/ sorear | ||
jnthn | masak! \o/ | ||
jnthn didn't see masak sneak in :-) | |||
masak | jnthn: only half here... :) | ||
jnthn | Ah | 19:24 | |
Clearly just your invizible half. :-) | |||
TimToady | the problem is we should really parse the argument to \p as well, and you example wouldn't trigger that | ||
Alias waves | 19:25 | ||
masak | Alias! \o/ | ||
moritz_ particles | |||
Alias | I'm heading off to TechEd today for the sekrit Microsoft Open Source track | ||
Anyone got anything they want me to talk to MS about | |||
Phiend | Visual COBOL | 19:26 | |
chromatic | Not DDOSsing CPAN Testers. | ||
Alias | :) | ||
PerlJam | Alias: providing resources for Perl 6 development. | ||
Alias | PerlJam: What kind | ||
Phiend | yeah: $$$$$$$$$$$$, preferrably in gold. | ||
PerlJam | Alias: whatever jnthn needs :) | ||
chromatic | Build servers for Parrot and Rakudo would be lovely. | ||
PerlJam | Alias: what chromatic said | 19:27 | |
jnthn | PerlJam: We can get Microsoft to give me beer? ;-) | ||
Alias | chromatic: I'll add that to the list for the testing lab 2.0 | ||
chromatic | Thank you. | ||
Phiend | don't they have a micro-brewery ? <ducks> | ||
jnthn | lol :-D | ||
PerlJam | Alias++ | ||
jnthn | Phiend: Trouble is it only makes soft drinks... | ||
19:27
pnate left
|
|||
Alias | jnthn: Anything you want? MSDN license? (I have one spare) | 19:28 | |
Phiend bites his tongue... | |||
jnthn | Alias: I have a lot of Microsoft stuff already 'cus I do .Net dev in my $other-job. | ||
PerlJam | jnthn: couldn't you use a really nice machine for dev work? | 19:29 | |
:) | |||
jnthn | ;-) | ||
Alias | Not entirely sure I can get hardware out of them | ||
Phiend | that would be cute - ask them for MacBooks | ||
jnthn | Alias: I don't know how much interest they have in knowing that folks are looking at Perl 6 on .Net (multiple, in fact). | ||
moritz_ | rakudo: /<[\]]>/ | 19:30 | |
p6eval | rakudo 689bb7: ( no output ) | ||
Alias | jnthn: I've got a 20 minute talk tomorrow | ||
jnthn | Alias: It may be worth mentioning that there are such efforts afoot. They can't take an interest if they don't know about them. :-) | ||
Alias | I'll include it | ||
PerlJam | Does microsoft have any real interest in perl these days? | ||
Phiend | well, this is a new record for me - I never been on here this long without being kicked... | 19:31 | |
PerlJam: that is a GOOD question ! | |||
They've got IronRuby and IronPython.... but missing some perl loving. | |||
PerlJam | Phiend: well, the important part would be, if they do ... for what? | ||
Phiend | Yes. | 19:32 | |
Alias | PerlJam: They care about InterOp in general | ||
Phiend | they do ??? | ||
rokoteko | PerlJam: I dunno. I think perl people should have interested on making it work on windows systems. | ||
Phiend | pardon my skepticism. | ||
I think it is good for Perl, and actually good for Microsoft, although I fear they don't have the wisdom to see it that way. | 19:33 | ||
rokoteko | PerlJam: it's anyways the most popular platform. That's just a sad fact. :/ | ||
Alias | Phiend: The more code works on Windows, the more code gets run on Windows, the more licenses people will buy | ||
Phiend | true dat. | ||
well, roko. things are changing. laptops are rising, and OS X is getting bigger. | 19:34 | ||
Alias | Plus, I'm sure there's a soft spot for Perl in MS | ||
Tene | There's a perception I've sen before that the more open-source code windows-using people run, the easier they can migrate away from MS. | ||
Phiend MUHAHAHAHAHA | |||
Alias | They built Windows using Perl for years and years | ||
Phiend | Tene: yes, but lets not mention that. | ||
moritz_ | rakudo: /a[b}/ | 19:35 | |
p6eval | rakudo 689bb7: OUTPUT«===SORRY!===Confused at line 22, near "/a[b}/"» | ||
Phiend | yes, in the past Microsoft has been good to Perl. Even though part of the reason I got uninstalled at my last job was that it was a "Microsoft shop", which made perl unpopular. | ||
moritz_ | std: /a[b}/ | ||
p6eval | std 32092: OUTPUT«===SORRY!===Unable to parse bracketed regex at /tmp/cYo4scQBFP line 1:------> /a⏏[b}/Couldn't find final ']'; gave up at /tmp/cYo4scQBFP line 1:------> /a[b⏏}/ expecting any of: metachar quantifier | ||
..regex atomParse … | |||
PerlJam | "uninstalled"? That's an interesting metaphor. | 19:36 | |
Alias | Phiend: I'm hoping that Strawberry Professional will help with that. Make's Perl look more like a "normal" Windows language | ||
Phiend | why do that to Perl though ? | ||
19:36
molaf left
|
|||
Phiend | or is this a visual studio add in ? | 19:36 | |
Alias | So it will suck less? | ||
It's a Visual Studio equivalent | |||
Phiend | Perl doesn't suck. windows does. | ||
Alias | Plus no command line | ||
Phiend | well, it sounds good. | ||
Alias | Unless you want it | ||
Phiend | command line : old farts love it. | ||
however you get perl in there, is good. We must infiltrate, integrate and destroy ! | 19:37 | ||
hopefully at some point during all that, there will be beer involved. | 19:38 | ||
moritz_ | phenny: ask pmichaud it seems that the p6regex tests in nqp-rx assumes that nqp-rx should support the :x($count) modifier -- is that sitll a valid assumption? | ||
phenny | moritz_: I'll pass that on when pmichaud is around. | ||
Phiend | well, I've exceeded my luck quotient for today; everybody weng chung ! | 19:39 | |
19:39
chromatic left,
Phiend left
19:42
amkrankruleuen left
|
|||
dalek | p-rx: 705f966 | moritz++ | t/p6regex/ (8 files): [p6regex-test] fudge it to be clean; fix a few tests along the way |
19:43 | |
19:47
masak left
|
|||
dalek | p-rx: dfbe437 | moritz++ | build/Makefile.in: include p6regex-test in "test" target |
19:55 | |
20:02
timbunce left
20:03
Alias left
|
|||
ingy | re: the datum/object/thing naming discussion, I am settling on "value" for now. This is mainly due to the fact that they are always thought about in the context of things returned by functions. | 20:03 | |
and everyone knows that a function returns a value. | |||
QED | |||
BBQ | 20:04 | ||
ETC | |||
FTW | |||
PerlJam | I thought they returned PArcels | ||
ingy | meh | ||
TimToady | not are values are valuable | ||
[Coke] | not everything is a perl6. | ||
ingy | [Coke]: but perl6 is certainly a everything | 20:05 | |
x3nU | how do i convert Match to Str? | 20:07 | |
ingy | x3nU: tmtowtdi | ||
moritz_ | $/.Str | ||
or ~$/ | |||
TimToady | or just use it as a string | ||
20:07
timbunce joined
|
|||
x3nU | also imho it sucks that i must conver it | 20:07 | |
convert it* | |||
moritz_ | TimToady: rakudo currently requires a conversion to Str for hash keys | 20:08 | |
because $/ ~~ Positional, so the .{}(Positional) multi is called | |||
which iterates over the argument | |||
and since $/ doesn't flatten, it recurses infinitely | |||
jnthn | Maybe we need a Match candidate... | 20:09 | |
(that knows to strinfigy it) | |||
er, stringify | |||
TimToady | I guess the question is what will DWTM | ||
jnthn | It kinda feels like we're adding a (allbeit useful) special case there. | 20:10 | |
It makes me feel slightly dirty. | |||
As if there should be a better way for this to work. | 20:11 | ||
moritz_ | rakudo: 'abc' ~~ /(.)(.)(.)/; my @a := $/; .say for @a; | 20:13 | |
p6eval | rakudo 689bb7: OUTPUT«abc» | ||
moritz_ | is that right? | ||
I would kinda expect something @-sigiled to be flat | |||
rakudo: 'abc' ~~ /(.)(.)(.)/; my @a := $/.flat; .say for @a; | |||
p6eval | rakudo 689bb7: OUTPUT«abc» | 20:14 | |
x3nU | also, how do i convert str to uppercase? there is .tou but it don't work with Str | ||
PerlJam | rakudo: say "foo".uc | ||
p6eval | rakudo 689bb7: OUTPUT«FOO» | 20:15 | |
20:15
daxim left
|
|||
PerlJam | rakudo: say uc("foo") | 20:15 | |
p6eval | rakudo 689bb7: OUTPUT«FOO» | ||
x3nU | lol, i don't know why i was thinking about tou | 20:16 | |
but thanks :) | |||
pugssvn | r32093 | lwall++ | [STD] handle \p redirection | 20:20 | |
20:20
Mowah joined
|
|||
moritz_ | rakudo: my @a := 1; say @a.perl | 20:20 | |
p6eval | rakudo 689bb7: OUTPUT«1» | 20:21 | |
moritz_ | rakudo: my @a := 1; say @a ~~ Positional | ||
p6eval | rakudo 689bb7: OUTPUT«0» | ||
moritz_ | rakudo: my Str $a := 1 | ||
p6eval | rakudo 689bb7: OUTPUT«You cannot bind a variable of type Int() to a variable of type Str(). in 'infix:<:=>' at line 685:CORE.setting in main program body at line 22:/tmp/22REpULr3l» | ||
20:22
Helios- left,
Helios joined
20:23
Helios left
|
|||
jnthn | moritz_: Some type of problem there... | 20:23 | |
moritz_ | some type of problem ticketed there :-) | 20:24 | |
jnthn | moritz_: I think we get away with it for assignment because list assignment means you can't fail to assign something positional. | ||
20:24
Helios joined
|
|||
moritz_ | jnthn: is the problem that @a doesn't have a Positional type constraint? | 20:25 | |
jnthn | Yeah, I think so. | 20:26 | |
mberends | phenny, tell masak oha++'s Socket.pm and INET.pm patch in gist.github.com/543580 tests out OK on all the webservers unmodified in github.com/mberends/http-server-sim.../examples/ so it looks good to commit it. This does not prove binary file I/O yet however, that requires some rewriting. | 20:28 | |
phenny | mberends: I'll pass that on when masak is around. | ||
mberends: 18:32Z <moritz_> tell mberends if you replace 'plan *;' with a specific number, please spectest before committing | |||
20:28
guidj0s_ joined
|
|||
moritz_ | phenny++ | 20:29 | |
jnthn | o/ mberends | 20:30 | |
mberends | moritz_: I did spectest, that's what delayed the commits. Have I let some errors through? Sorry if that is the case. | ||
moritz_ | mberends: yes, two mis-plans; I fixed them, so no problem | ||
mberends | thanks moritz_++ :) | ||
20:31
tylerni7 joined
20:32
kirillm left
|
|||
moritz_ | std: sub design-ice-cream-mixture(:$name!, $base = 'Vanilla') { | 20:33 | |
p6eval | std 32093: OUTPUT«===SORRY!===Can't put optional positional parameter after variadic parameters at /tmp/PCimRuuR2z line 1:------> cream-mixture(:$name!, $base = 'Vanilla'⏏) {Unable to parse block at /tmp/PCimRuuR2z line 1:------> eam-mixture(:$name!, | ||
..$ba… | |||
mberends | o/ jnthn: I'm going to have to apply a dependency injection circularity saw to the 6model java hierarchy. Still wondering where to cut... | ||
moritz_ | std: sub design-ice-cream-mixture(:$name!, $base = 'Vanilla') { } | ||
p6eval | std 32093: OUTPUT«===SORRY!===Can't put optional positional parameter after variadic parameters at /tmp/hmxUfXl2CG line 1:------> cream-mixture(:$name!, $base = 'Vanilla'⏏) { }Potential difficulties: $base is declared but not used at /tmp/hmxUfXl2CG line | ||
..1:… | |||
moritz_ | TimToady: that error message is mighty confusing | ||
:$name! doesn't look rather variadic to me | |||
jnthn | I think it's Just Wrong. | ||
moritz_ | std: sub design-ice-cream-mixture($base = 'Vanilla', :$name!) { } | 20:34 | |
jnthn | Probably just bug somewhere. | ||
p6eval | std 32093: OUTPUT«Potential difficulties: $base is declared but not used at /tmp/wR4NDCkoBN line 1:------> sub design-ice-cream-mixture(⏏$base = 'Vanilla', :$name!) { }ok 00:01 119m» | ||
jnthn | mberends: Oh, curious. | ||
mberends: Why, ooc? | |||
mberends | jnthn: it's a long loop. SharedTable used to be at the end, now it's also at the beginning. | 20:35 | |
jnthn | :S | ||
mberends | jnthn: via ThreadContext and Context | 20:36 | |
jnthn | I'm curious why I didn't hit the problem in the .Net version. | ||
20:36
PhatEddy joined
|
|||
jnthn | mberends: Is this some "can't have circular references between classes" thingy? | 20:36 | |
dalek | ok: 677ac11 | moritz++ | src/subs-n-sigs.pod: Fix order of named and positional parameters. Thanks to David H Adler and James E Keenan in RT #77220 |
||
jnthn | mberends: If so, I guess I just hadn't appreciated that Java had such a restriction. | 20:37 | |
mberends | jnthn: yes, hence dependency injection as a solution. | ||
jnthn | Ah | ||
That sucks. | |||
.oO( Surprise! It's Java! ) |
|||
mberends | jnthn: nvm, first nom, then hacking | 20:38 | |
jnthn | mberends: Oh well. At least you didn't offer to port it to VBScript... ;-) | ||
moritz_ | rakudo: sub a(:$a!, $b = 2) { } | ||
20:38
slavik left
|
|||
p6eval | rakudo 689bb7: OUTPUT«===SORRY!===Can't put required parameter after variadic parameters at line 22, near ") { }"» | 20:38 | |
mberends | jnthn: lol | ||
jnthn | moritz_: I blame STD! ;-) | ||
PhatEddy | rakudo: my $ = 2; say 'hello' | ||
p6eval | rakudo 689bb7: OUTPUT«hello» | ||
20:38
timbunce_ joined
|
|||
moritz_ | jnthn: sure; I'll just retitle the ticket | 20:38 | |
PhatEddy | std: my $ = 2; say 'hello' | ||
20:38
timbunce left
|
|||
p6eval | std 32093: OUTPUT«ok 00:01 118m» | 20:38 | |
20:39
timbunce_ is now known as timbunce
|
|||
jnthn | moritz_: I'll probably be lazy and let STD fix it first. ;-) | 20:39 | |
pugssvn | r32094 | colomon++ | [t/spec] Add some new series operator tests. | ||
moritz_ | wfm. | ||
PhatEddy | rakudo: my $ = 2; say $ | 20:40 | |
jnthn loves having blog stats | |||
p6eval | rakudo 689bb7: OUTPUT«===SORRY!===Non-declarative sigil is missing its name at line 22, near "$"» | ||
jnthn | std: my $ = 2; say $ | ||
p6eval | std 32093: OUTPUT«===SORRY!===Non-declarative sigil is missing its name at /tmp/bl2JeNupzH line 1:------> my $ = 2; say ⏏$Confused at /tmp/bl2JeNupzH line 1:------> my $ = 2; say $⏏<EOL> expecting twigilOther potential difficulties: | ||
..… | |||
moritz_ | jnthn: so, how many visitors did your 6model post attract? | ||
jnthn | Just 192 so far. | ||
moritz_ | probably too young to have number of RSS followers | 20:41 | |
jnthn | moritz_: But after 2 days its the second most popular post. | ||
moritz_: Yes, it's only the 4th post on the blog. | |||
It's quite young. | |||
moritz_: I haven't got any historical stats to compare it to, of course. | |||
dalek | kudo: 819e2ce | colomon++ | src/core/List.pm: Remove List.batch method, as it is obsolete. |
20:42 | |
20:42
molaf joined
|
|||
moritz_ | jnthn: my p6 blog posts usually attract between a few hundred and 2k visitors | 20:42 | |
many of them through planetsix and perlphere.net | 20:43 | ||
PhatEddy | jnthn: you noticed the earlier $ = 2 example that std and rakudo took. Is that the one you're going wait for std on? Is it ok? | ||
moritz_ | perlsphere.net actually | ||
jnthn | PhatEddy: No, I was talking about the one moritz_ found in signature parsing. | ||
PhatEddy: The my $ = 2; is silly but OK. | 20:44 | ||
moritz_ | std: sub f(:$x, :$y!) { } | ||
p6eval | std 32093: OUTPUT«ok 00:02 117m» | ||
jnthn | PhatEddy: It's a degenerate case of things like my ($a, $, $b) = foo(); where you don't want the second thing stored anywhere. | 20:45 | |
moritz_ | std: sub f($x?, $y) { } | 20:46 | |
p6eval | std 32093: OUTPUT«===SORRY!===Can't put required parameter after optional parameters at /tmp/FIXs6hnsIk line 1:------> sub f($x?, $y⏏) { }Potential difficulties: $x is declared but not used at /tmp/FIXs6hnsIk line 1:------> sub f(⏏$x?, $y) { | ||
..… | |||
PhatEddy | rakudo: say $.perl | 20:47 | |
p6eval | rakudo 689bb7: OUTPUT«Lexical 'self' not found in main program body at line 2:/tmp/LIXuBOBNea» | ||
PhatEddy | rakudo: say Any.perl | ||
p6eval | rakudo 689bb7: OUTPUT«Any» | ||
jnthn | std: say $.perl | 20:48 | |
p6eval | std 32093: OUTPUT«ok 00:03 116m» | ||
jnthn | We could whine about that one I guess. | ||
20:50
macroron left
|
|||
moritz_ | we do :-) | 20:51 | |
jnthn | moritz_: :P | 20:52 | |
moritz_: I was thinking more, like, compile time-y, and helpfully. :-) | |||
PhatEddy | Um ... what should say $.perl have done? | 20:53 | |
jnthn | PhatEddy: It's equivalent to self.perl | ||
PhatEddy: But outside of a method, there is no self. | 20:54 | ||
PhatEddy | rakudo: say self.perl | ||
p6eval | rakudo 689bb7: OUTPUT«(timeout)» | ||
jnthn | rakudo: say self.perl | 20:55 | |
PhatEddy | rakudo: say 'hello' | ||
p6eval | rakudo 689bb7: OUTPUT«===SORRY!===Symbol 'self' not predeclared in <anonymous> (/tmp/YyC4Me9q8E:22)» | ||
rakudo 689bb7: OUTPUT«hello» | |||
dalek | ok: 98d51fe | moritz++ | src/subs-n-sigs.pod: [subs] positional parameters come before named ones |
||
20:56
molaf left
|
|||
PhatEddy | If it's ok I'll try to research a bit further and file the critter ?? | 20:56 | |
if needed | |||
20:57
drake1 joined
|
|||
jnthn | PhatEddy: I'm all for a ticket that proposes making those two fail more consistently/helpfully. | 20:57 | |
I'm even happier with a patch that does so. ;-) | |||
drake1 | now I wrote some more perl pastebin.ca/1923627 | 20:58 | |
how would that be perl6? | |||
moritz_ | drake1: are you sure that does what you want it to do? | 20:59 | |
drake1 | yes | ||
moritz_: but only with mode=0 | |||
moritz_ | ah, unpack has a ($$) prototype | 21:00 | |
I thought it would slurp up the whole file in line 04 | |||
drake1 | in perl6? | ||
no I set the record size with $/ | |||
21:00
guidj0s_ left
21:01
guidj0s_ joined
|
|||
moritz_ | no, perl 5 | 21:01 | |
oh right | |||
well | |||
still, if it were in list context, it would slurp the whole file | |||
which was my point of confusion | 21:02 | ||
drake1 | is it possible to compare two arrays with implicit iteration ? | ||
for exact identical values | |||
21:02
guidj0s_ left
|
|||
jnthn | Maybe try @a >>===<< @b | 21:02 | |
drake1 | unpack only read in a single record | ||
moritz_ | or @a == @b && @a >>===<< @b | 21:03 | |
because @a >>===<< @b dies if they have different lengths | |||
jnthn | oh, true | 21:04 | |
21:04
sekimura joined
|
|||
moritz_ -> sleep | 21:05 | ||
drake1 | output snip pastebin.ca/1923644 | ||
PhatEddy | rakudo: my (Any, @x) = (3, 10); say "@x" | 21:06 | |
p6eval | rakudo 689bb7: OUTPUT«@x» | ||
21:06
dju left
|
|||
PhatEddy | rakudo: my (Any, @x) = (3, 10); say "{@x}" | 21:06 | |
p6eval | rakudo 689bb7: OUTPUT«3 10» | 21:07 | |
PhatEddy | rakudo: my ($, @x) = (3, 10); say "{@x}" | ||
p6eval | rakudo 689bb7: OUTPUT«10» | ||
drake1 | PhatEddy: I thought about comparing @magic with ( 0x32,0x04) | 21:08 | |
Tene | moritz_: use the angles the other way on something you want autoextended | 21:10 | |
21:10
pyrimidine left
|
|||
drake1 | if (@magic == (0x32,0x04) ) { # PSF1 format should work? | 21:12 | |
they're always the same length | |||
Tene | rakudo: say "foo" if (1,2) == (3,4); | 21:13 | |
p6eval | rakudo 689bb7: OUTPUT«foo» | ||
drake1 | hmm | ||
Tene | that casts both sides to a scalar and does a numeric comparison on the result. | ||
rakudo: say "foo" if (1,2) >>==<< (3,4); | |||
p6eval | rakudo 689bb7: OUTPUT«foo» | ||
Tene | Oh... | 21:14 | |
drake1 | so you still have to iterate manually? | ||
Tene | rakudo: say "foo" if all((1,2) >>==<< (3,4)); | ||
drake1 | explicitly* | ||
p6eval | rakudo 689bb7: ( no output ) | ||
Tene | rakudo: say "foo" if all((1,2) >>==<< (1,2)); | ||
p6eval | rakudo 689bb7: OUTPUT«foo» | ||
Tene | rakudo: say "foo" if all((1,2) >>==<< (1,3)); | ||
p6eval | rakudo 689bb7: ( no output ) | ||
Tene | So, that works fine for you. | ||
drake1 | nice | ||
21:14
perlygatekeeper left,
PhatEddy left
|
|||
Tene | the >> << make the operation run on individual elements from each list, and produces a list of the results. | 21:15 | |
gfldex | std: my @a = 1..3; say [?] @a; | 21:16 | |
p6eval | std 32094: OUTPUT«===SORRY!===Prefix requires an argument at /tmp/wJwz1P3CBl line 1:------> my @a = 1..3; say [?⏏] @a;Parse failedFAILED 00:01 119m» | ||
jnthn | [op] needs an infix | ||
drake1 | I could always say: if("@magic" eq "@psf1") I guess | 21:18 | |
21:18
justatheory joined
21:19
ruoso left
|
|||
drake1 | or ultimately pack a binary string | 21:19 | |
21:21
eternaleye_ joined
|
|||
drake1 | if pack ("CC",(0x32,0x04)) eq <FONT> | 21:21 | |
21:22
eternaleye_ left
|
|||
drake1 | better get the X11 pixmap toggle I wrote a bit earlier combined with this PSF reader. then it's gonna be a nice 'r' and a nice EUR for ISO8859-1[56] | 21:28 | |
21:30
timbunce left
|
|||
x3nU | i have written simple module | 21:31 | |
but | |||
because lack of tutorials it's really ugly | 21:32 | ||
and i don't know how to fix it | |||
so i hope someone helps | |||
github.com/xenu/Net-Daytime | |||
21:34
eternaleye left,
eternaleye joined
21:35
timbunce joined
21:37
dju joined
21:40
dju left,
dju joined
21:41
Trashlord left
21:49
drake1 left
|
|||
gfldex | x3nU: timeZoneToTimeZone would want to be a hash if i would have wrote it :) | 21:51 | |
x3nU | gfldex: makes sense | 21:52 | |
21:54
tylercurtis joined
|
|||
gfldex | x3nU: And that regex don't got any names in it. You might want to have a grammer instead and export it for other folk to use. | 21:56 | |
x3nU | could show me example? :) | 21:57 | |
could you* | |||
tylercurtis wishes a bit that he didn't have somewhere to go earlier during the removing roles discussion. | 21:58 | ||
x3nU | seriously, perl6 *really* needs a good tutorial, it would bring a lot of supporters | 21:59 | |
22:01
Mowah left
22:02
tadzik joined
|
|||
gfldex | x3nU: another note to that hash thingy. If some country comes up with the brilliant idea to introduce another timezone. Only 10 years or so later the ISO will have a name for it and your package would have to updated or subclassed. Updating that hash could be done even at runtime, without any hassle. | 22:02 | |
tadzik | oh hai | ||
22:02
Mowah joined,
Mowah left
|
|||
gfldex | and there are tutorials :) | 22:02 | |
x3nU | btw timezones | ||
gfldex | rosettacode.org/wiki/Category:Perl_6 | ||
22:02
Mowah joined
|
|||
x3nU | thing that pisses me off is duplicated timezone acronyms | 22:02 | |
gfldex | github.com/perl6/perl6-examples | 22:03 | |
x3nU | anyway i'm going to fix my module tommorow | ||
22:03
alester left
|
|||
x3nU | thanks for gfldex | 22:03 | |
thanks for help gfldex * | |||
22:03
Mowah left
|
|||
TimToady | std: /\pL/ | 22:03 | |
x3nU | good night :) | ||
p6eval | std 32094: OUTPUT«===SORRY!===Unsupported use of \pL; in Perl 6 please use <+isL> at /tmp/eK_kFp8ncS line 1:------> /\pL⏏/Parse failedFAILED 00:02 115m» | 22:04 | |
22:06
colomon left,
Eevee joined
22:10
colomon joined
|
|||
TimToady | rakudo: say "foo" if (1,2) eqv (1,2) | 22:14 | |
p6eval | rakudo 689bb7: OUTPUT«foo» | ||
TimToady | rakudo: say "foo" if (1,2) eqv (1,3) | ||
p6eval | rakudo 689bb7: ( no output ) | ||
TimToady | I dunno why you guys are futzing with >>===<< | 22:15 | |
22:16
fod joined
|
|||
sbp | original question was: | 22:16 | |
22:01 <drake1> is it possible to compare two arrays with implicit iteration ? | |||
22:02 <drake1> for exact identical values | |||
TimToady | and in what sense does eqv not do implicit iteration? | ||
rakudo: say "foo" if (1,2) ~~ (1,2) # also works, unless RHS contains wildcard | 22:18 | ||
p6eval | rakudo 689bb7: OUTPUT«foo» | ||
22:18
am0c joined
22:21
wamba left
|
|||
Tene | TimToady: i didn't remember eqv. | 22:24 | |
22:27
timbunce left
22:32
whiteknight joined
22:35
tylercurtis left
22:40
xinming left,
xinming joined
22:45
shade\ left
22:46
lest_away is now known as lestrrat
22:48
shade\ joined
22:49
risou joined
|
|||
cognominal | this may be of interest to people here : code.google.com/p/es-lab/wiki/Traits | 22:55 | |
23:01
lue left
23:07
shade\ left
|
|||
cognominal | voilà qui m'avait échappé car je ne lis guère linuxfr mais que je trouve via une recherche google : linuxfr.org//2010/07/21/27151.html | 23:08 | |
23:11
shade\ joined
23:14
xinming left
|
|||
cognominal | oops, wrong window again :( | 23:14 | |
23:15
xinming joined
|
|||
mberends | cognominal: nice all the same :) | 23:16 | |
"une affaire de mugs" :-) | 23:17 | ||
cognominal | masak++ | 23:23 | |
23:26
Pavlz joined
|
|||
Pavlz | hello | 23:26 | |
do you know which license is used by perl6 ? | 23:27 | ||
thanks | |||
iw0fzw paolo | |||
gfldex | Pavlz: your question is not that easy to answer | 23:28 | |
jnthn | Pavlz: Depends what you mean by "Perl 6", since it's a spec, and implementations of it are free to use whatever license they wish. | ||
mberends | Pavlz: Rakudo has the same as Perl 5, Artistic License 2.0. Other implementations vary. | ||
jnthn | Pavlz: One popular implementation is Rakudo, and its license is github.com/rakudo/rakudo/blob/master/LICENSE | ||
Pavlz | why is used a camel as logo ? | 23:29 | |
is funny, but i am curios to know | 23:30 | ||
mberends | Pavlz: O'Reilly trademarked it as part of their series of book cover pictures. | ||
gfldex | that camel is a butterfly | ||
for perl 6 that is | |||
Pavlz | camel is not a butterfly | 23:31 | |
gfldex | indeed | ||
Pavlz | camel is an animal which walk in the desert | ||
gfldex | i | ||
23:32
crythias joined
|
|||
gfldex | i'm not entirely sure you understood me as i wanted to | 23:32 | |
mberends | Pavlz: camel => O'Reilly book, onion => Perl, butterfly => Perl 6 | ||
Pavlz | comes out on Artistic License 2.0 | 23:34 | |
This license is a free software license, compatible with the GPL thanks to the relicensing option in section 4(c)(ii).Artistic License 2.0 | |||
and this is described on Artistic License 2.0 | 23:35 | ||
www.gnu.org/licenses/licenses-list....reLicenses | 23:36 | ||
so Artistic License 2.0 is compatible with the GPL | 23:37 | ||
mberends | Pavlz: yes | ||
Pavlz | and i am happy for this | ||
in which contest can be used PERL ? | 23:38 | ||
wath is its own point of force ? for what is really good ? | |||
mberends | Pavlz: mainly text processing, "glue" between applications, and thousands of other uses | 23:39 | |
Pavlz | one example | ||
mberends | Pavlz: most examples are in search.cpan.org/ | 23:40 | |
gfldex | the BBC uses perl for most of their websites | 23:41 | |
mberends | Pavlz: if you're interested in learning, see www.perl101.org/ | ||
Pavlz | and how you know to do this about BBC ? | ||
23:41
Trashlord joined
|
|||
gfldex | Pavlz: are you using an online translation thingy? | 23:42 | |
Pavlz | no | ||
i am typing myself | 23:43 | ||
and i made any error | |||
i know this | |||
but it's normal, cause i am english | |||
gfldex | i'm asking because i can't find meaning in your last question | 23:44 | |
23:45
drake1 joined
|
|||
Pavlz | i am italian, and is just good that i type in English, because there are many italian people, which don't know Italian, and you think that to know English is more important when people, don't speak the language of their own country ? | 23:45 | |
23:46
draxil left
|
|||
drake1 | in perl6, can you subclass without blessing the initial class like this pastebin.ca/1923798 ? | 23:47 | |
Pavlz | in italy there are 6.000.000 ofilliterate,and you think that English is the primary focus ? | 23:48 | |
23:48
ruoso joined
|
|||
mberends | Pavlz: your English is very much better than my Italian. And many of us enjoyed a very well run conference in Pisa recently: conferences.yapceurope.org/ye2010/ | 23:50 | |
Pavlz | when there are 6.000.000 people of illeterate, you must ask to yourself if Berlusconi won for its own program, or for the fact that people don't know him in the IRL = In the Real Life | ||
gfldex | Pavlz: i did not intend to offend you and am very sad that my english does not allow me to be as gentle as mberends | 23:51 | |
Pavlz | i am happy for your conference, but i don't know if you have seen what this the real situation here in Italy | ||
you are not offending me | 23:52 | ||
TimToady | however, this seems somewhat OT for #perl6 | ||
Pavlz | yes, is OT for #perl6 | 23:53 | |
TimToady | it's okay, as long as it's not interfering with people trying to work | ||
mberends | .oO( there's that TimToady++ sending us back to work again ;) |
23:54 | |
TimToady | but some of us do feel like we have to read everything here | ||
23:55
draxil joined
|
|||
drake1 | if you actually called the constructor through a sub class, how would perl6 manage to associate the new tier in the chain? | 23:56 | |
TimToady | drake1: in what sense are you subclassing? I just see functional wrappers around an anonymous | ||
hash | |||
drake1 | typical | ||
23:56
lestrrat is now known as lest_away
|
|||
jnthn | class Cat { }; class Lolcat is Cat { } # this is how to subclass in Perl 6 | 23:57 | |
And the default inherited new constuctor will do the right thing. | |||
So will your own new method and self.bless(...) | |||
drake1 | jnthn: I mean how the constructor in a parent class would associate the sob class with the object | 23:58 | |
jnthn: the class name of the sub class still has to be blessed? | |||
jnthn | drake1: No, you don't have to do that in Perl 6. The self in the constructor in the parent class is a type object of the subclass, and that's how it knows what to bless into. | 23:59 |