»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend! | Rakudo Star Released!
Set by diakopter on 6 September 2010.
TiMBuS rakudo: "hello".split('')».ord.map(*+13)».chr.join('').say 00:30
p6eval rakudo : OUTPUT«uryy|␤»
arnsholt phenny: tell moritz_ Turns out EXPR isn't in Rakudo, only NQP, which makes my post a bit pointless. Sorry =/ 00:54
phenny arnsholt: I'll pass that on when moritz_ is around.
colomon is sitting staring at a quarter-written line intersection, without enough brain power to finish an algorithm he's done a dozen times before. 03:43
rakudo: say Any; 03:54
p6eval rakudo : OUTPUT«Any()␤»
kthakore TRIX,m);
awm hello 04:13
kthakore awm: hi
awm How can someone volunteer to help the Perl6 project? 04:15
kthakore awm: just volunteer 04:23
which project do you want to help with?
err
I mean
what part in the project do you want to help with?
awm Well I suppose wherever volunteers might be needed. I just love perl and would like to get involved even doing something non-programming really or whatever 04:25
kthakore awm: first take a look at the different projects that constitute for perl. There is rakudo and parrot
have a look at their bug reports and see what you can do 04:26
awm ah I see
kthakore awm: this is for rakudo rakudo.org/node/23 04:26
err sorry that is for the site 04:27
hold on
awm thanks
kthakore awm: rt.perl.org/rt3/Public/Search/Simpl...lled%27%29
and parrot is at trac.parrot.org/parrot/report/1
pick a bug, talk to the people on mailing lists and start hacking :D 04:28
awm thanks I appreciate it! 04:29
kthakore awm++ no problem go have fun :D 04:30
sorear good * #perl6 06:11
masak: arnsholt: STD's OPP is in STD.pm6 itself. Talking with TimToady and from personal experience I'd say that it's too hard to make a totally general OPP 06:14
You could steal the OPP from niecza's v6/STD.pm6; I think it's closer to being runnable with Rakudo
although you'll need to fix the subrule backtracking protocol 06:15
the original EXPR from std.git/STD.pm6 used labelled control flow and computed method calls; I had to heavily rewrite it for niecza 06:16
sorear also I'd like something like Match.synthetic to be standardized 06:17
TiMBuS id like to get libyaml working in rakudo. should I use zavolaj or is it outdated/superseded? 06:46
sorear no, zavolaj is current 06:49
TiMBuS alright then 06:50
TiMBuS guess i also have to figure out how to work with pointers to types 06:51
sorear TimToady: pin 07:07
masak sorear: too hard to make "a totally general OPP"? that must be with LTM or something, becuase the one in PGE feels pretty general. 07:49
sorear Can the PGE one handle postcircumfix operators? 07:57
masak yes.
sorear Can it handle null-string operators?
masak yes.
sorear Can it handle multiple OPPs in one language?
masak er.
when does that happen?
sorear C has a language of types and a language of expressions, and they're mostly separate 07:58
masak ah, so it's the same string that needs to be parsed with two "views"?
no, it doesn't handle that. 07:59
sorear so I suppose they're different languages in a sense
masak unless you parse them twice.
sorear has never used PGE
masak has ported it
here's the PGE OPTable parser in Perl 6: github.com/masak/gge/blob/master/l...OPTable.pm
that's alpha code, by the way. 08:00
I don't remember the ng code being extremely different.
sorear bah, Perl 5 doesn't like qw< foo, bar, baz, > much 08:50
masak it accepts it with a warning. 08:51
moritz_ good morning 09:22
phenny moritz_: 00:54Z <arnsholt> tell moritz_ Turns out EXPR isn't in Rakudo, only NQP, which makes my post a bit pointless. Sorry =/
sorear good morning moritz_ 09:23
masak: I'd love to see more discussion on a standardizable EXPR, if you think it's feasable. 09:24
masak good morning, moritz_.
sorear: I was thinking about ways to expose Perl6::Grammar as an API the other day. 09:25
it seems that relatively often what people do is reimplement parts of Perl 6 parsin at great expense.
having those parts accessible could help make some solutions ridiculously short, just by leveraging Perl 6 parsing and ASTs. 09:26
sorear masak: I, too, would like to see an elaboration on S05:4035 09:30
masak yes, that's a bit lean on details :) 09:34
usually, the way to get more spec for these things is to run headlong into them with an implementation. 09:35
dalek : 472fcb0 | moritz++ | misc/perl6advent-2010/ (2 files):
[advent] some schedule and topic updates
09:39
tadzik so still nothing for today? 09:40
how about smartmatching?
sorear can't we just use the OPP thing?
masak: aye.
masak: I would love to talk about this more 09:41
moritz_ tadzik: I just went through the list of topics, and thought that smartmatching was the easiest to write about on short notice
masak sorear: me too. maybe at the #phasers on Tuesday?
sorear masak: STD is, quite frankly, useless when taken strictly as a library
yes
I have lots of time then
masak yes -- I think considering STD from the viewpoint of an API could be very fruitful. 09:42
sorear I'm thinking I'll write an announcement for the 'v1' Niecza tag on the last Monday in November 09:43
December
and 'v1' will be set to mark the announcement
masak sounds nice.
sorear it'll be my own version of the "official and complete" gag - self-referential releases
masak I'm hoping to get in quite a lot of niecza use until then.
:) 09:44
moritz_ WOAH, AN 1.0 RELEASE!
*scnr*
masak yes, what moritz_ said. do make it v1.0 :)
it'll complement "official and complete" nicely.
so when newbtrolls say "no, but I mean an 1.0 release", we can counter that too :P 09:45
sorear on the last Monday of November, I tagged v0.0
but forgot to mention that in the mail
masak that's usually not a problem. 09:46
masak especially not if you tagged it at the time of the announcement. 09:47
sorear isn't Rakudo already at version 40.0?
moritz_ no, it's at version 2010.11
tadzik WOAH! 09:48
sorear !
masak that's a seriously impressive version number.
tadzik 2010.109999(9) was nice too
moritz_ This is Rakudo Perl 6, version 2010.11-15-gfedc117 built on parrot 2.10.1 RELEASE_2_10_1-697-g1ebb549 09:49
sorear It's nothing compared to the STD version, though
masak :)
sorear stefan@stefans:~$ perl -MV=STD
STD /usr/local/lib/perl5/site_perl/5.12.0/STD.pm: 20101111
masak o.O
& 09:50
sorear out 10:14
tadzik moritz_: so, ~~ for today? 10:16
moritz_ rakudo: say 'b' ~~ 'a' .. 'c'
p6eval rakudo : OUTPUT«Bool::True␤»
moritz_ tadzik: yes, I'm working on it
tadzik . o O ( one operator to rule them all ) 10:16
tadzik moritz_: oh, need a hand, or mind letting me write a part? :) 10:17
moritz_ tadzik: I'll push what I have now
dalek : afd5fc5 | moritz++ | misc/perl6advent-2010/articles/smartmatching.pod:
[advent] smartmaching
10:18
moritz_ tadzik: feel free to pick it up from here
tadzik I'd substitute a table with a set of examples 10:19
moritz_ feel free 10:20
tadzik how about { $_ > 10 } instead of -> $x { $x > 10 }? 10:26
moritz_ I didn't do it because $_ has a special handling
tadzik mhm
moritz_ and it might be confusing to have it once as the LHS, and once as a formal parameter 10:27
tadzik right 10:28
moritz_ thinks we should link to masak's coding challenge at the end, even if not related 10:29
erm, contest 10:31
tadzik hmm
tadzik maybe a separate post with "how to contribute" mentioning the post? 10:32
moritz_ maybe that, yes
moritz_ or it's something that I can add to one of the side bars 10:33
tadzik that'be great
ingy TiMBuS++ # libyaml 10:36
tadzik moritz_: gist.github.com/737973 ok for you? 10:38
TiMBuS well, at least I hope to get it working ingy. atm I'm just converting yaml.h but I'm not sure how to get these pointers all working properly
moritz_ tadzik: sure 10:39
dalek : 3b865ae | (Tadeusz Sośnierz)++ | misc/perl6advent-2010/articles/smartmatching.pod:
some additions to smartmatching
10:46
tadzik moritz_: pushed this and that, will be back in a while
dalek : fc49a66 | moritz++ | misc/perl6advent-2010/articles/smartmatching.pod:
[advent] some small corrections and enhancements to smart match article
11:03
moritz_ rakudo: my @a = 1, 2, 3; my @b; my $c = @b[0] = @a[1] + 1; say $c; say @b[0]; 11:04
p6eval rakudo : OUTPUT«3␤Any()␤»
moritz_ rakudo: my @b; my $c = @b[0] = 1; say $c; say @b[0];
p6eval rakudo : OUTPUT«1␤1␤»
moritz_ rakudo: my @a = 1, 2, 3; my @b; my $c = @b[0] = @a[1]; say $c; say @b[0]; 11:05
p6eval rakudo : OUTPUT«2␤Any()␤»
moritz_ submits rakudobug
rakudo: my @b; my $c = @b[0] = (1, 2); say $c; say @b[0]; 11:07
p6eval rakudo : OUTPUT«1 2␤1 2␤»
moritz_ rakudo: my @b; my $c = @b[0] = 1, 2; say $c; say @b[0]; 11:08
p6eval rakudo : OUTPUT«1 2␤1 2␤»
tadzik anyone experienced with Zavolaj? 11:36
wklej.org/id/436410/ 11:39
TiMBuS tadzik, that looks correct? 12:23
well, actually i think void functions arent supposed to have an OpaquePointer as a return, its meant to be undefined. but aside from that.. 12:24
tadzik TiMBuS: look at the errors below, that's the problem 12:25
TiMBuS according to google, the changelog for libmpd: connection: renamed mpd_connection_close() to mpd_connection_free() 12:26
tadzik hmm
tadzik bah, stupid tadzik 12:26
TiMBuS++
TiMBuS glad to help 12:28
now if you happen to know how to take an int pointer from a C function and dereference it from parrot... 12:29
id be really happy to hear how to do it :D
tadzik :)
I actually thought about writing a helper zavolaj-friendly C library to do what zavolaj can't do :) 12:31
TiMBuS it might be handy
tadzik so you would dereference_intptr()
that's a bit workaround-y 12:32
extendind Parrot NCI would be more noble 12:33
TiMBuS i really cant figure out how to do it from parrot, either 12:34
the Pointer PMC doesnt help
jnthn TiMBuS: If you like, drop me a mail with the C function signature you're having trouble calling. I won't be able to look for the next week or so, but at least it'll be a reminder for when I do get some Zavolaj hacking time. 12:48
(Zavolaj certainly needs to extensions. It'll get 'em.)
(Parrot got better NCI support since I wrote Zavolaj.)
tadzik jnthn: is reading the returned arrays (array poiters) supported? 12:55
jnthn I believe that there's already some array support, yes 12:56
And you can treat any pointed to thing as an array in a sense. :)
tadzik any examples around?
jnthn I think the mysql driver may do that to read the columns. 12:57
tadzik oh, so Positional, not Array
jnthn Yeah 12:59
tadzik # Since mysql_fetch_fields() is not usable yet...
yeah :)
jnthn returns Positional of Int
tadzik yes 13:00
returning unhandled string type in struct -- I don't get it
jnthn But if it returns an int pointer then using that and then [0] will be just like a dereference of the pointer.
?
tadzik wklej.org/id/436480/ 13:01
ah, I see
so, any way to use this now?
jnthn hmm 13:05
I'm not sure where that error comes from
It looks like a Parrot-y one.
moritz_ tadzik: what's the state of the advent post?
tadzik: I pushed a small change, do you want to add more to it? 13:06
jnthn afk for a bit
tadzik moritz_: Let me look through it once again 13:09
moritz_: I'd add something about ACCEPTS method, so people will know how to use it with their own classes 13:12
moritz_ tadzik: good idea 13:13
tadzik moritz_: I don't have much experience in this field, but will write some draft and what I know 13:15
moritz_ rakudo: my @x := gather { take 1; take 2; take @x[0] + @x[1] }; say @x[*-1] 13:22
p6eval rakudo : OUTPUT«3␤»
moritz_ \o/
tadzik moritz_: wklej.org/id/436512/ what's wrong about this thingy? Returns False for the second say 13:25
moritz_ tadzik: needs the point on the RHS 13:40
tadzik moritz_: hm?
the Point?
moritz_ [3,5] ~~ $a
the object of class Point 13:41
tadzik oh
can't it be the other way around?
tadzik ah, I see 13:42
the other way around would be prettier thouth
* though
tadzik moritz_: pushed 13:46
dalek : acca283 | (Tadeusz Sośnierz)++ | misc/perl6advent-2010/articles/smartmatching.pod:
[advent] A word about ACCEPTS in smartmaching article
moritz_ tadzik: can you publish it please? 14:09
tadzik moritz_: as it is? 14:10
moritz_ tadzik: well, if we want to today, we'd better get going
tadzik alright 14:17
moritz_: perl6advent.wordpress.com/2010/12/1...-matching/ I don't know how to add you as an author though 14:24
moritz_ tadzik: neither do I 14:25
tadzik: but that's OK; I published your IO post too
tadzik wklej.org/id/436636/ -- could someone give me a hand? 15:57
flussence rakudo: class Foo { has $!obj; method BUILD() { $!obj = 1 } }; Foo.new.perl.say 16:12
p6eval rakudo : OUTPUT«Foo.new(obj => 1)␤»
flussence (that was just from blindly changing things until it worked though, so may not be the best answer)
s/method/submethod/ # now it's the right answer 16:14
tadzik hmm 16:16
uasi tadzik: this would work wklej.org/id/436665/ 16:23
tadzik oh, this way 16:24
thanks flussence and uasi
uasi :) 16:25
tadzik cool, works :) 16:26
lichtkind jnthn: www.youtube.com/watch?v=5q6A27c8DwE...ature=fvwp 16:30
tadzik now what worries me is that DESTROY is never called 16:32
rakudo: class Foo { method DESTROY { say "I'm out" } } Foo.new 16:35
p6eval rakudo : OUTPUT«===SORRY!===␤Confused at line 22, near "class Foo "␤»
tadzik rakudo: class Foo { method DESTROY { say "I'm out" } }o Foo.new
p6eval rakudo : OUTPUT«===SORRY!===␤Confused at line 22, near "class Foo "␤»
tadzik bah
rakudo: class Foo { method DESTROY { say "I'm out" } }; Foo.new
p6eval rakudo : ( no output )
tadzik a bug?
colomon tadzik: last time I checked, Rakudo doesn't do end of execution garbage collection. I ran into problems with open files not closing automatically at the end of a script run. 17:29
tadzik bah, not too good 17:32
tadzik fun with zavolaj: github.com/tadzik/perl6-MPD 17:37
lue ohai to the world o/ 18:46
tadzik o/ 18:49
lue Am I able to post to the advent calendar? [if you need my nick, it's lueinc on wordpress (stupid minimum character limit)] 19:29
rindolf lue: I envy you. 19:30
My nick is ga-827482749274829-somethiing.
And they won't let me change it. 19:31
lue how did that happen?
rindolf lue: it was assigned automatically. 19:33
lue: after I used my email or something.
lue ah.
rindolf Hi all. 21:17
diakopter hi
rindolf diakopter: what's up? 21:18
diakopter rindolf: not all that much 21:27
moritz_ lue: actually I need your email address, not your nick 21:59
lue rnddim at gmail dot com [I believed I used it for my account] 22:00
moritz_ lue: invitation sent 22:01
lue
.oO(giving out email is probably the best time to use the "don't log this line" secret code)
moritz_ lue: the IRC logs automatically turn the @ into images if it's between two word characters 22:02
lue: and since the email appears in the rakudo commit log anyway, there's not much hiding anymore 22:03
sorear good * #perl6
colomon o\ 22:04
diakopter gmail's spam filter is top-notch, anyway
sorear jnthn: hi 22:05
jnthn sorear: hi 22:13
(though bye soon...need to sleep...early start tomorrow...)
sorear jnthn: I'm wondering how javolaz will work in a non-Parrot environment 22:14
jnthn ...javolaz? 22:15
...is that the worst spelling of "zavolaj" ever? :)
sorear: I expect that has to be re-implemented per VM
sorear: Thus why I encourage pepole to write things against it rather than against Parrot's NCI. 22:16
I suspect it's not too bad to do a CLR version, and probably harder to do a JVM version. 22:17
But at least only one thing needs changing. :)
sorear Suppose I re-implement it for another VM
sorear How do I get people to use the new implementation? 22:17
flussence
.oO( maybe there needs to be a %*ENV{RAKUDOLIB} too )
22:18
jnthn sorear: I think of it more about implementation portability. So long as you implement the same interface or close enough, modules that target Zavolaj today will "just work" (provided the other Perl 6 features they need are in place) in the implemntation targetting the other VM. 22:20
plobsing
.oO( javolaz might be a good name for zavolaj on jvm )
22:24
jnthn :)
flussence javalolz!
jnthn hehe :)
plobsing zavo
jnthn OK, sleeps... &
plobsing using zavolaj over raw parrot nci also has the advantages of dealing with an API which *should* be interested in being user-friendly (in stead of minimal-but-functional), and people bugging jnthn in stead of me when things go wrong 22:26
lue Does anybody happen to know of a service that would let me run a P6 website? (IIUC, this means "what (kind of) web service can I run perl6 on?" 22:29
flussence I guess anything that lets you run arbitrary binaries will... provided it's got the resources to run p6. 22:31
lue .oO[ I can easily find services that let me run Perl, but that's about 1 away from what I want :) ] 22:32
flussence if it's got proper ssh, that's a good start 22:33
lue I already run rakudo and friends on a remote server (no sudo privs), could I properly run a website through it? 22:34
plobsing lue: use viv maybe? 22:35
sorear lue: use rakudo to generate html, output to ~/public_html 22:37
I wonder how hard it would be to integrate Niecza with ASP.NET
flussence If you're thinking of FastCGI then it'll be slightly fiddly without root, as you'll have to run lighttpd or something on a port > 1024. 22:38
sorear there's also HTTP::Server::Simple 22:38
diakopter hm 22:41
sorear ?
diakopter big netsplit I guess
lue
.oO(must...fight....computer....to...post...advent...calendar.....)
23:16
lue published (er, scheduled) advent post, afk! 23:38
takadonet hey 23:45
sorear hello 23:52
takadonet sorear: you know anything about weak references in perl 5? 23:55
sorear yes 23:58