»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.pugscode.org/ | UTF-8 is our friend! | Rakudo Star Released!
Set by moderator on 29 July 2010.
00:16 LaVolta joined 00:17 ruoso joined 00:26 whee joined
snarkyboojum sorear: I suspect they'd enjoy hashing it out there anyway :) 00:28
the discussion is just so much more dynamic and interesting on IRC :) 00:31
00:36 davidfetter left
sorear how crazy would I have to be to switch niecza to MSBuild? 00:38
00:44 jhuni joined 01:04 ryan_ joined
diakopter sorear: mono's xbuild ? 01:13
01:15 Axeman joined
Axeman So, I was doing this early-adoption thing with rakudo star. The include directory points to a directory that only has Test.pir and Test.pbc in it. 01:19
01:22 HarryS joined
Axeman In fact, if I pushed parrot_install/lib/2.6.0-devel/library onto @*INC and I still get Unable to find module 'Archive::Zip' in the @*INC directories. 01:26
01:27 ctang joined
[Coke] I don't think you can load raw Parrot libs as perl6 modules. 01:29
* came with several modules. if you're only seeing Test.pm, I presume there's another directory. 01:30
Tene That's right.
I never actually worked out if :from<parrot> worked again or not.
Axeman Well I saw some pms under the tools directory, but those didn't say use v6. 01:31
tylercurtis star: .say for @*INC
p6eval star 2010.07: OUTPUT«/home/p6eval/.perl6/lib␤/home/p6eval/rakudo-star-2010.07/install/lib/parrot/2.6.0/languages/perl6/lib␤.␤»
01:32 whee joined
tylercurtis Axeman: Are you sure that $YOUR_RAKUDO_STAR_INSTALL_PREFIX/lib/parrot/2.6.0/languages/perl6/lib only contains Test.pm and Test.pir? 01:33
Axeman What are the core modules that come with rakudo? I cloned the git repo just like in the instructions.
tylercurtis Axeman: That's not Rakudo *. 01:34
Axeman: github.com/rakudo/star/downloads is Rakudo *. Download either the .msi or the tarball as appropriate.
Axeman it points to parrot_install/lib/2.6.0-devel/languages/perl6/lib and there is only those two files in that directory.
Tene star: use Data::Dumper:from<parrot>; 01:35
p6eval star 2010.07: OUTPUT«===SORRY!===␤Parent isn't a Class.␤»
Tene That's... something, at least.
star: use Foo::XXLXLXLX:from<parrot>; 01:36
p6eval star 2010.07: OUTPUT«===SORRY!===␤Parent isn't a Class.␤»
Tene Oh, so it's not actually something.
Too bad. :(
Axeman So that was just enough to check that perl6 was built correctly.
tylercurtis Axeman: You cloned the git repository at github.com/rakudo/rakudo? That's the Rakudo compiler. It doesn't include any modules(other than Test.pm). Rakudo * is at github.com/rakudo/star/downloads 01:37
sorear diakopter: yeah sure xbuild 01:49
Axeman So I downloaded the tarball, and I looked at the README. It's saying much same thing that I read last night at rakudo.org. 01:52
Where do I untar it all?
01:56 Eddward joined
[Coke] it's a build, not a binary. 01:56
so just dump it somewhere (like ~/sources) and build from there.
01:58 Eddward left
Axeman Thanks. Do I want to do the --gen-parrot thing again? I've already got about 2 installations of parrot on my machine already. 01:58
tylercurtis What version of Parrot do you have? 02:01
Axeman I have 2.0 installed by apt and I installed 2.6 last night.
02:05 mberends joined
sorear mberends: hi 02:06
mberends hi sorear! We had a nice post -R* meeting yesterday here in Pisa, no earth moving decisions, simply steady progress. 02:07
(good thing the earth didn't move, the Tower might have fallen over onto masak's hotel ;) 02:09
sorear mberends: you said something a while ago about wanting an app for niecza 02:11
mberends I had nice chats with Tim Bunce about DBDI v2 and how MiniDBI can help in the short term.
sorear: yes I did, and thanks for asking
02:13 ash_ joined
mberends two ideas come to mind, most specifically a perldoc utility, and more generally picking something that's already been written in Perl 6, such as projects from proto's projects.list, the Advent Calendar, or the pugs examples directories. 02:14
Axeman So I don't need the git clone? 02:18
02:20 agentzh joined
tylercurtis Axeman: right. You can either use your installed 2.6(in which case you'll want to pass a --parrot-config=whereveryourparrot_configis option to Configure.pl) or use --gen-parrot. By the way, you may want to specify a --prefix to Configure.pl if you don't want to install it to $BUILDDIR/install, though I don't know if that's necessary with --parrot-config. 02:21
mberends ah, Axeman, you definitely need Parrot 2.6 for Rakudo Star. It may also cause problems to have older Parrots present.
02:22 thepler joined
mberends Axeman: getting a newer Parrot will use svn, not git clone, so be sure to have Subversion installed 02:23
sorear: I am planning to de-bitrot github.com/perl6/perl6-examples/blo.../Parser.pm etc. It's simple in flow and features used, even the grammars could become substring comparisons. I think niecza is probably close to being able to run it, 02:36
sorear mberends: What would niecza's killer feature for Pod::Parser be? 02:42
mberends sorear: speed, memory efficiency (Rakudo is weak there) 02:43
02:51 sd_ joined, jaldhar joined
sorear argh: STD.pm6 doesn't correctly handle the case where a setting has a setting 02:55
cxreg yo dawg i herd u liked settings 03:05
sorear ping moritz_
mberends sorear: that might take a few hours, it's 5am here (but moritz_ may surprise us) 03:06
sorear Er, why are you talking to me then? :) 03:07
03:09 drbean joined
dalek ecza: 2d7691a | sorear++ | (8 files):
Refactor signature handling to better support named parameters &c
03:09
ecza: 1d38d31 | sorear++ | (6 files):
Add a SAFE setting

bodies of I/O operations with die statements. No, really, I couldn't think of anything better.
ecza: 31ea5d7 | sorear++ | (3 files):
Add a --safe driver option
pugssvn r31898 | mberends++ | [docs/talks/p6.dbi.odp] add examples of p5 and p6 connect() source code 03:10
mberends sorear: quite. I should be asleep too. Unwinding after a hectic few days. 03:12
03:20 petdance joined
petdance OK, who wants to see my first Perl 6 program? 03:20
melte
sorear Does it work?
melte sorear: no, it's just a trick to get you to fix it! :P 03:21
Andy it does, yes!
ash_ sorear do you have any tips on building rakudo on a system with low memory 03:22
tylercurtis Andy/petdance/alester/Guest39500: sure!
alester github.com/petdance/rakudo/blob/mas...lab/primes 03:24
Anythign I'm doing NON-Perl6y? 03:25
tylercurtis rakudo: say 5 mod 2 03:26
p6eval rakudo efe72c: OUTPUT«1␤»
tylercurtis Wow. I didn't know there was an infix:<mod>
rakudo: say 5 %% 2; # divisible by operator, iirc.
p6eval rakudo efe72c: OUTPUT«0␤»
tylercurtis alester: infix:<%%> is the divisible by operator, so better to use it than roll your own with $n mod $i == 0. 03:27
sorear rakudo: say 1882056929 !%% all(2..10000)
03:27 drbean joined
p6eval rakudo efe72c: OUTPUT«===SORRY!===␤Infix !% is deprecated in favor of infix %% at line 22, near "% all(2..1"␤» 03:27
sorear rakudo: say 1882056929 ![%%] all(2..10000)
alester oooh
why don't I get that warning?
p6eval rakudo efe72c: ( no output )
sorear what warning? 03:28
rakudo: say 1882056929 ![%%] 2
p6eval rakudo efe72c: OUTPUT«1␤»
sorear rakudo: say 12211 ![%%] all(2..100)
p6eval rakudo efe72c: OUTPUT«1␤»
sorear rakudo: say 12213 ![%%] all(2..100) 03:29
p6eval rakudo efe72c: OUTPUT«1␤»
sorear rakudo: say !(12213 %% all(2..100))
p6eval rakudo efe72c: OUTPUT«1␤»
alester OK, I don't know what you're doing, sorear
sorear trying to see if it works with junctions
(no)
alester rakudo: say 5 %% 2 03:30
p6eval rakudo efe72c: OUTPUT«0␤»
alester Why even have a divisible by?
sorear because it's useful all over the place
rakudo: say ?(12213 ![%%] any(2..100)) #oh, I just had it backward 03:31
p6eval rakudo efe72c: OUTPUT«0␤»
sorear rakudo: say ?(12211 ![%%] any(2..100)) #oh, I just had it backward
p6eval rakudo efe72c: OUTPUT«1␤»
tylercurtis say 6 %% all(1..3)
03:31 drbean_ joined
tylercurtis rakudo: say ?(6 %% all(1..3)) 03:31
p6eval rakudo efe72c: OUTPUT«1␤»
alester How do I give a sub a return type? 03:33
sorear my Int sub foo() iirc
alester I tried that with Bool 03:34
it didn't like that
oh, wait, a "my"?
tylercurtis or sub foo(--> Bar) or sub foo() returns Bar
sorear yeah, needs an explicit scope
my is the default for subs
melte interesting
frooh is there a way to capture what output was sent to $*ERR? 03:36
tylercurtis frooh: sure. Just replace $*ERR with something that logs the output. 03:37
frooh also: how do I disable warn? In p5 I'd have done $SIG{__WARN__} = sub {}; 03:38
er
I'm guessing the same :-)
tylercurtis: can you point me to what kind of object that should be?
03:40 agentzh joined
frooh pmichaud: you gonna be around next week? 03:40
alester You'd think it would complain if I try to return a non-Bool for a Bool func, no? 03:41
frooh alester: I don't think it does return val checking at all yet
alester ok
tylercurtis frooh: $*ERR is an IO. You probably just need say/print for your purpose. Although maybe at some point that will be a built-in class for doing what you want, though. 03:42
mberends frooh: you create a class that has a print or a say multi method (or both) and then create an object of that class. For example lines 13-23 in github.com/mberends/http-server-sim...Simple.pm6
frooh ty friends 03:43
alester github.com/petdance/rakudo/blob/mas...lab/primes
is my latest
03:43 drbean joined
mberends alester: sometimes operators get misparsed in Perl 6 if they are not surrounded by spaces. Your `2..$top` worked, but padding with spaces is a good habit. 03:46
03:54 molaf joined
alester do we have backtracking working yet? 03:59
I'm working on the prime regex
tylercurtis alester: for a really succinct implementation: $n %% none(2 .. $top) 04:00
alester tylercurtis: No, I'm working on the prime regex.
tylercurtis alester: I know, but for what you were working on earlier. 04:01
alester which in Perl 5 is /^1?$|^(11+?)\\1+$/
oh, ok, thanks, I don't wanna be that succinct. :-)
so I've got 04:02
return False if $str ~~ / ^x$ | ^ (xx+?) $1+ $ /;
but that never returns
snarkyboojum ash_: I have a tip for building rakudo on a machine with 256MB RAM, but it requires a precompiled core.pir ;) 04:11
sorear What's a prime regex?
alester montreal.pm.org/tech/neil_kandalgaonkar.shtml
Not a, the. 04:12
ash_ snarkyboojum: i can do that
snarkyboojum: so, i'd have to pre-compile core.pir and do?
snarkyboojum ash_: I've used a precompiled version of core.pir from my mac laptop with 4GB of RAM, and transfered it to my linux slice (VPS) with 256MB RAM and got it going
ash_: so you still need an env where you can get the same version of rakudo compiled (to get you core.pir) 04:13
ash_: but if that's ok, then it's a simple matter of hacking the Makefile slightly to not attempt to build core.pir and just use the precompiled one 04:14
ash_: and Bob's your aunty - even passes spectest - eventually :) 04:15
ash_ kk
will do that now
thanks for the tip
so, you only need to copy over core.pir?
snarkyboojum ash_: yep - but you can do it with other generated files too if you like 04:16
ash_ could i copy perl6.pbc?
snarkyboojum ash_: but core.pir is the stickler for machines with limited RAM
ash_: don't know - haven't tried 04:17
tylercurtis ash_: I don't think PBCs are (guaranteed, at least) portable.
ash_ hmmm i might try the perl6.pbc just to see what happens
snarkyboojum tylercurtis: no? they should be OS agnostic no?
tylercurtis may be wrong.
ash_ i thought that was only true if the system had the same endian ness
snarkyboojum doesn't know either
sorear PBCs are guaranteed portable, except that if you try to copy them they become EVEN SLOWER 04:18
snarkyboojum ah - there you go ;)
ash_: but the core.pir idea seems to work - let me know how you travel
sorear PBCs are always written using native data format
ash_ alright i'll just move core.pir
sorear if cross-reading is required, byte swapping and other reformatting has to happen 04:19
snarkyboojum ash_: good luck :)
sorear++ # for guts level knowledge :) 04:20
alester ok, anyone see anything wrong with line 35 ? github.com/petdance/rakudo/blob/mas...lab/primes
snarkyboojum alester: first capture is $0 04:25
alester oh? 04:26
snarkyboojum not $1 as in Perl 5
alester wow
that's a big gotcha
thak you
snarkyboojum aye, but a well documented one :)
04:26 ryan_ joined
alester Yes, where? 04:27
Please.
If you say "S05" i'm going to cry
snarkyboojum alester: perlcabal.org/syn/Differences.html
alester: is a handy and quick read
alester thanks
All of this I am working on feeding into perl101 04:28
snarkyboojum alester++
alester I want to have "perl 5 way" and "perl 6 way" for everythign in perl101
snarkyboojum what about ways of doing thing in perl 6 which are impossible in perl 5? :P 04:29
alester: sounds awesome - do you have a URL for a work in progress?
alester perl101.org has been around forever
snarkyboojum ah.. I remember visiting perl101 some time ago 04:30
alester ok, that diffs doc is huge 04:31
huge as in hugely helpful.
snarkyboojum alester: I guess it doesn't capture everything, but I found it useful early on 04:32
alester Also didn't know about :P5 operator
or modifier
tylercurtis alester: I don't think Rakudo implements that.
snarkyboojum alester: yeah, not implemented yet AFAIK, but specced
tylercurtis rakudo: say 'a' ~~ rx:P5 / a /
p6eval rakudo efe72c: OUTPUT«Could not find sub &rx:P5␤ in main program body at line 22:/tmp/09Y_mfPl4f␤»
snarkyboojum that's something someone should convince sorear to work on :) 04:33
sorear niecza: say 'a' ~~ /:P5 a /
snarkyboojum I bet niecza will get it soon :)
p6eval niecza 01680b9: OUTPUT«Can't locate STD_P5.pm in @INC (@INC contains: STD_checkout /opt/perl-5.12.1/lib/site_perl/5.12.1/x86_64-linux /opt/perl-5.12.1/lib/site_perl/5.12.1 /opt/perl-5.12.1/lib/5.12.1/x86_64-linux /opt/perl-5.12.1/lib/5.12.1 .) at STD_checkout/STD.pm line 62641.␤»
sorear niecza uses the STD parser 04:34
which supports parsing rx:P5
alester what's ARGV now
sorear but there's no backendsupport
alester @ARGV
sorear @ARGV is @*ARGS
tylercurtis @*ARGS
snarkyboojum @*ARGS
sorear <ARGV> is $*ARGFILES
snarkyboojum 3 simultaneous answers - #perl6++
:)
alester oh, right * twigil because it's global
and ? : is now ?? !! 04:35
tylercurtis alester: and check out perlcabal.org/syn/S06.html#Declarin...subroutine for command line parsing
alester don't wanna parse
where's that Differences doc stored anyway 04:36
I'd be glad to add to it.
snarkyboojum alester: I believe it's in pugs SVN - svn.pugscode.org/pugs/docs/Perl6/Pe...rences.pod 04:37
alester thanks 04:38
on my to-do now
I want to run perl5->perl6 stories on Perlbuzz, too.
snarkyboojum alester: if you don't have a commit bit, just ping moritz_ & co
alester co?
oh, & co. 04:39
got it.
sorear alester: what's your e-mail, I can add you 04:40
alester andy@petdance.com 04:41
sorear hugme: add andy@petdance.com to pugs 04:42
hugme sorear: sorry, you don't have permissions to change 'pugs'
sorear ... I don't?
snarkyboojum sorear: I think you can do it via the web interface at commitbit.pugscode.org/admin/project/Pugs/people 04:43
sorear done. 04:44
alester sorear: Can you redo it so it's user petdance? 04:45
it'll be easier for tracking if nothing else
tylercurtis alester: I think it gives you a choice of username when you set up your password and such. 04:46
alester n
tylercurtis Or, at least, the username field looked editable when I did so. 04:47
alester well, let me see
04:48 sekimura1 joined 04:50 ash_ joined 04:51 yuetiantian joined 04:55 drbean joined
snarkyboojum Mr bean got a PhD! 04:55
pugssvn r31899 | andy++ | add a note about C<@*ARGS> 04:56
alester yay me 04:57
and I'm apparently already in there as "andy"
snarkyboojum alester: it's also traditional to add yourself to the AUTHORS file at svn.pugscode.org/pugs/AUTHORS if you haven't already 04:58
alester ok
so how do I coerce a type?
@*ARGS is filled with Str, and I want to coerce to Int
sorear $foo.Int 04:59
alester ah
snarkyboojum rakudo: my $a = "Foo"; say $a.WHAT; my $b = $a.Int; say $b.WHAT
p6eval rakudo efe72c: OUTPUT«Str()␤Int()␤»
sorear rakudo: say "Foo".Int
p6eval rakudo efe72c: OUTPUT«0␤»
05:00 LaVolta joined
sorear Why am I *now* starting to be daunted by the magnitude of what remains to be done with niecza 05:02
snarkyboojum speaking of niecza, when I try and build it on my box I get "cannot open unicode maps from <home>/lib : No such file or directory" 05:03
what am I missing? 05:04
sorear Does it literally say <home>?
snarkyboojum nope 05:05
it says /Users/adrian i.e. my home dir
as far as I know I have all the prereqs installed, but I haven't delved into it
sorear the unicode maps are found via PERL6LIB 05:06
if PERL6LIB is unset, the internal directories are used
snarkyboojum sorear: ah.. so the makefile is setting it incorrectly 05:07
on OS X
05:07 kaare joined
snarkyboojum i.e. no 'shell' cmd 05:08
sorear No 'shell' on OSX?
snarkyboojum as a command? nope
pugssvn r31900 | andy++ | add my name 05:10
alester well, pugs thinks I'm andy
05:10 TiMBuS joined
sorear enough information to go on has not been presented 05:11
when you find out what's wrong, tell me and I'll fix it
05:11 plobsing joined
sorear or better yet, patches 05:11
snarkyboojum sorear: sussing it out now
05:17 drbean joined
pugssvn r31901 | andy++ | cleaned up inappropriate whitespace and removed embedded tabs 05:18
alester perlbuzz.com/2010/08/diving-into-perl-6.html 05:31
snarkyboojum alester: good to have you on board :) 05:34
alester I've always been on board 05:35
just never actually doing Perl 6 code. :-)
snarkyboojum alester: well writing Perl 6 :)
sorear alester: I suppose you've seen perl.plover.com/NPC/index.html ? 05:38
alester what about it
sorear It's possibly relevant to weird things done with regex 05:39
alester my big concern is that the PHP version fails quietly 05:40
snarkyboojum does mjd weigh in on perl 6 at all? 05:54
05:58 ashleydev joined 06:04 Su-Shee joined 06:07 Mowah joined 06:10 jfried joined 06:16 masak joined
masak morning! 06:16
today's "cute" anti-p6 tweet: twitter.com/built/status/20255192116 06:17
sorear masak: How does this "live filter" thing work?
masak sorear: I bet the technical underpinnings are not that complicated. they're delivered to me through the slick interface of Tweetie on Mac. 06:18
melte funny 06:19
masak the "live" part simply means that, after I've started the program, searches for the terms are done automatically, at regular intervals.
melte: yes, I thought so. as criticisms go, it's fairly clever.
sorear masak: ok, that would explain why I couldn't find the button on the web site 06:21
masak right. web interface has no live searches. 06:22
that's one reason I prefer a non-web client.
the &mkdir builtin creates a directory with mode 000 per default. do we really have the balance between security and least-surprise right in this case? 06:24
sorear sounds like a flat out bug to me 06:25
should be 777
masak submits rakudobug 06:26
funny how octal is just assumed for that number. :) 06:27
moritz_ good morning 06:33
phenny moritz_: 03 Aug 22:10Z <[Coke]> tell moritz_ Ok, I'll just hold longer. =-)
06:33 snearch joined
masak moritz_: \\o 06:33
06:35 _sri joined
mulander morning all 06:36
masak mulander: \\o 06:37
06:38 abrasive joined 06:39 azawawi joined, agentzh joined
pmichaud good morning, #perl6 06:40
azawawi pmichaud: good morning
masak morning, pmichaud 06:41
azawawi pmichaud: thanks for fixing the fake executable. It now works on strawberry. pmichaud++
pmichaud preview of my slides for today's talks: pmichaud.com/2010/pres/yapceu-rakudo/
comments and suggestions and additions and subtractions welcome
mathw reads 06:44
06:44 Casan joined
masak is working on his slides generator 06:44
it's currently at the stage where it generates 54 blank slides.
would be kinda fun to hold the talk that way. :)
mathw is that an arbitrary number
or is it supposed to generate 54 slides? 06:45
pmichaud a talk is finished when there's nothing left to be removed. :)
masak no, it's the number of my slides.
azawawi pmichaud: the index needs fixing on high resolutions pmichaud.com/2010/pres/yapceu-rakud...index.html
masak its parses them OK, and creates proper Slide objects.
but then it throws away all that information, and just generates blank slides.
pmichaud azawawi: I don't worry too much about the index page appearing properly.
azawawi pmichaud: the footer is in the middle while the rest of the index continues.
pmichaud azawawi: it's primarily a slide show for project presentations; not necessarily meant to be "perfect" in all web clients. 06:46
*projector
azawawi pmichaud: I see. Then totally ignore my comment :)
pmichaud someday I'll fix that.
sorear good morning pmichaud 06:47
pmichaud sorear: good morning
sorear in some ways hashes are simpler than arrays
no support for laziness, no [*-1]
pmichaud adds the neat notes moritz_++ sent via email 06:48
mathw pmichaud: I like your slides 06:49
pmichaud: I have no comments other than wishing I was at YAPC::EU
masak mathw: you usually say that when we have a conf. you should go for it some day. 06:50
mathw yeah but then I go and spend all my money on musical instruments 06:51
sorear niecza is only at 6,500 LOC so far
sorear wonders if he can make a meaningful comparison out of this number
masak "OMG HOW CAN IT BE SO SLOW?!" pmichaud++ 06:52
much better than using the word "honest" :)
the ladybugs-on-a-pole are *so* cute!
sorear hmm. I could probably implement heredocs. 06:53
06:53 oha joined 06:54 ashleydev joined
masak pmichaud: excellent slides. I have nothing to add/subtract. 06:56
sorear neither
pmichaud masak: thanks
sorear: thanks
masak sorear: I know at least one p6er whom you'd make very happy by implementing heredocs. 06:57
tylercurtis also likes the slides and also wishes he was at YAPC::EU
snarkyboojum the play by play on IRC re release day excietement is fun :) 06:58
pmichaud any other twitter quotes or things worth pointing out?
(play by play) -- yeah, I'm not sure how that will work out in the presentation itself. We'll see.
kaare_ pmichaud: You'll answer "No" to "Where is the official Perl 6 compiler?" 06:59
pmichaud kaare_: correct.
if someone asks "Where is the best Perl 6 compiler", I know how to answer. :)
(although that answer may change over time :) 07:00
sorear Do you have a single answer in mind for the worst Perl 6 compiler?
masak rakudo: my @slides = "" xx 5; .say for 1..@slides
cotto Not "Mu"?
p6eval rakudo efe72c: ( no output )
snarkyboojum masak: are you writing slide presentation software in Perl 6? :D
07:00 Ross joined
pmichaud sorear: no, no answer yet for "worst Perl 6 compiler" 07:01
masak rakudo: my @slides = 42 xx 5; .say for 1..@slides
p6eval rakudo efe72c: OUTPUT«1␤2␤3␤4␤»
masak snarkyboojum: yes, the one for today's presentation is in Perl 6.
masak submits rakudobug
snarkyboojum masak: yapsi or rakudo? ;)
pmichaud I suspect the worst one hasn't been written yet. When it is written, it can be called "Rats Odukar" :-)
masak snarkyboojum: rakudo :) 07:02
sorear interesting, niecza is perfectly willing to compile heredocs right now
they show up as empty strings at runtime 07:03
kaare_ didn't know "no" could be an answer to a where-question :-)
snarkyboojum got a chuckle out of the same joke :)
sorear Q:to/EOA/ is the right syntax? 07:04
tylercurtis pmichaud: Can Bennu be the worst Perl 6 compiler?
masak pmichaud: maybe include this one? twitter.com/freekey/status/19752653473 -- it's a good summary of 'underpromise/overdeliver'
rakudo: my $slides = 5; .say for 1..$slides 07:06
p6eval rakudo efe72c: OUTPUT«1␤2␤3␤4␤5␤»
kaare_ pmichaud: I may have paged too quickly through the slides, but... 07:07
... do you have a slide spelling out the goals of star as compared to the regular releases.
not the content, but the goals.
07:08 Scotl joined
sorear What if we made {} *always* a block, and let people who want to make hashes use hash()? 07:08
pmichaud kaare_: there's the one that describes the difference between a compiler release and a distribution release 07:10
just a sec
www.pmichaud.com/2010/pres/yapceu-r...ide38.html 07:12
kaare_ pmichaud: OK, just testing your slides ;-) 07:16
pmichaud kaare_++
okay, time to head down to the conference rooms
bbiab
tylercurtis masak: speaking of Bennu (is it socially acceptable to say "speaking of $foo" where $foo is something that only I mentioned?), after GSoC is over, I hope to find some time to actually start working on it again. And I'm probably going to stop using Yapsi as my parser(mostly because I plan to define all sorts of weird bootstrappy things that let me write C in Perl 6 so that I can write EVERYTHING in Perl 6. It just might happen that some of the things I
write in Perl 6 use nonstandard pragmas/traits that give them much easier to compile semantics.
07:16 go|dfish joined
kaare_ hm, bennu isn't on perl6.org/compilers/ 07:19
tylercurtis kaare_: that's good. People might hear about it and expect it to actually work. :)
07:19 Ross joined
kaare_ Do all the other compilers there work? 07:20
masak tylercurtis: sounds exciting. let me know how it goes.
tylercurtis masak: anyway, after that mostly useless burst of information that might have actually been interesting if I had managed to emit all of the thoughts relevant to it currently into my head, I'm going to go to bed now. I'll try to remember to actually write up some code examples of the sorts of things I plan to do regarding bootstrapping at some point. Have fun at YAPC::EU! 07:21
kaare_: I don't know. But as long as Yapsi isn't there, Bennu definitely shouldn't be(at least, not until the rewrite mentioned above actually happens to some extent), given that it's currently impossible for Bennu to implement anything Yapsi doesn't, and it doesn't implement most things Yapsi does. 07:24
sorear phenny: tell tylercurtis to check out Niecza/Grammar.pm6, subclassing STD to add implementation-specific hooks actually works reasonably well 07:26
phenny sorear: I'll pass that on when tylercurtis is around.
tylercurtis Also, if Bennu was there, as I said, people might hear about it and expect it to work, and I'd have to figure out how to compile the runtime library with a LLVM C compiler instead of gcc, and make the compile process less likely to violate the Geneva Conventions, and fix the runtime's Makefile so that it didn't hardcode the path to libtool (and then I'd have to fix that the wrong libtool comes first in my path), and so on. 07:27
phenny tylercurtis: 07:26Z <sorear> tell tylercurtis to check out Niecza/Grammar.pm6, subclassing STD to add implementation-specific hooks actually works reasonably well
tylercurtis Much easier to pretend it doesn't exist and only make jokes and grandiose plans about it.
sorear That's the great thing about .net as a compiler target 07:28
I can ship Niecza.exe and pretend the build system doesn't exist
tylercurtis sorear: I'm hoping to, instead of having something like a Q:CgOp or Q:PIR helper for bootstrapping, something more like what I'm guessing "is rawcall" in your setting does. Traits and pragmas that cause a given segment of syntactically normal Perl 6 to have more low-level semantics. E.g., a "use static-typing;" pragma that forces all code in the lexical scope to have appropriate type declarations(unless I can manage to inference it, which would probabl 07:37
not be worth the effort), and for all dispatch to be resolved at compile time.
Anyway, as I was saying, I'm going to bed. Good night, #perl6. 07:40
sorear is rawcall switches off the generation of a binder stub; code in the function has to handle calling itself
night
kaare_ Yeah, I missed Yapsi as well. After all, it's an official and complete Perl 6 implementation :-)
tylercurtis sorear: sounds precisely like the sort of thing I'm thinking about, though with my ignorance of Niecza's internals, I might be totally wrong. :) 07:41
07:43 Psyche^ joined 07:51 synth joined 07:52 foodoo joined
dalek ecza: 3a5bf4e | sorear++ | CodeGen.pm:
Make string literals robust against non-printable characters
07:54
ecza: 868644c | sorear++ | (2 files):
Implement here documents
ecza: bbc3800 | sorear++ | test.pl:
Tests for heredocs
LaVolta hey guys, if i want port my Perl 5 script to Perl 6, what's the best choice for undef? Whatever? 07:56
avar what are you using undef for? 07:58
LaVolta for an empty string
undefined string...
sorear Str 07:59
07:59 mberends joined
sorear hello mberends! 07:59
mberends good *
LaVolta whatif a undefined scalar value, that can hold a ref or whatever... 08:00
mberends YAPC::EU is just launching!
avar rakud; my Str $meh; $meh
rakudo; my Str $meh; $meh
rakudo: my Str $meh; $meh
p6eval rakudo efe72c: ( no output )
avar eval: my Str $meh; $meh
meh
08:02 vlad0 joined 08:08 ambs joined 08:11 [Coke] joined
sorear starts attacking S02-literals/quoting.t 08:15
I am annoyed by the interdependance of testing 08:16
quoting.t wants me to implement list assignment!@
mberends sorear: unpicking any of those interdependencies would be a Good Thing 08:18
sorear mberends: the trouble is that they're pretty necessary stuff :/ 08:23
ambs what's the difference between 1..6 and 1..^6? 08:24
mberends ambs: ^6 means up to but not including 6
snarkyboojum ambs: one constructs a range from 1 to 6 inclusive, and the other from 1 to 5
ambs ok, 1..5 08:25
thanks
08:25 PZt joined
mberends ambs must be wall-shadowing ;-) 08:25
sorear you found the wall? 08:26
mberends The Wall is addressing YAPC::EU
ambs yeah, listening to the wall
snarkyboojum how many Pink Floyd references does The Wall use during his keynotes? :D 08:27
sorear envy 08:28
snarkyboojum seconds that 08:30
sorear I am, sadly, far away.
So far away that the distance is measured in miles. 08:31
snarkyboojum Sydney -> Pisa is a very long way as well
08:34 drbean joined, Khisanth joined, alexm joined 08:42 plol joined 08:47 IllvilJa joined
sorear perl6: say (2 === "2") 08:52
p6eval rakudo efe72c: OUTPUT«0␤»
..pugs: OUTPUT«␤»
08:57 jferrero joined 08:59 wamba joined, wtw joined 09:00 meppl joined 09:02 ambs joined 09:03 drbean joined
moritz_ colomon++ 09:05
patrickas++
TimToady show-cased (1, -2, 4 ... *) at his yapc keynote
09:06 timbunce joined
frettled yay 09:08
09:09 tadzik joined
sorear idly wonders if he's famous yet. 09:10
perl6: say Nil.Str 09:12
p6eval pugs: OUTPUT«*** No such subroutine: "&Nil"␤ at /tmp/TYHhB_JxwO line 1, column 5 - line 2, column 1␤»
..rakudo efe72c: OUTPUT«␤»
dalek ecza: 616bc42 | sorear++ | Test.pm6:
Add plan * and done_testing to Test.pm6
09:14
ecza: b034cd5 | sorear++ | Test.pm6:
fix broken fudged multi in Test.pm6
ecza: 7beb95b | sorear++ | Test.pm6:
Add crude is() for spectest purposes
ecza: 8fedca5 | sorear++ | (4 files):
Add an ArrayP hook for defining the backing class for my @foo
timbunce anyone got a url for blitzkost info? 09:23
09:25 alexm left 09:28 mj41 joined 09:32 felliott__ joined, mutewit joined, dukeleto joined 09:33 xinming joined, [Coke] joined 09:35 Ross joined 09:36 cognominal joined
dalek ecza: f13a472 | sorear++ | CORE.setting:
Rework LLArray.new to be more direct and avoid a dependency loop with Array.new
09:44
ecza: ff2f9de | sorear++ | test2.pl:
Prototype of the Array class
09:44 NOTevil joined 09:49 TiMBuS joined 09:55 uniejo joined 09:57 briang joined 09:59 mberends joined
tadzik oh, mberends. Is HTTP::Server::Simple(::PSGI) ready to add it to proto? 09:59
mberends tadzik: yes, it's ready enough. It will get more features later on, but runs its current examples without problem. 10:01
tadzik great 10:02
10:04 timbunce joined
sorear is testing a fix for the nested settings but 10:04
bug
10:10 azert0x joined
timbunce anyone got a url for blitzkost info? 10:10
sorear github.com/jnthn/blizkost? 10:11
timbunce sorear: d'oh. I looked but missed it. thanks. 10:13
bbkr rakudo: my $ = 'a'; $ = 4; # bug or not?
p6eval rakudo efe72c: OUTPUT«===SORRY!===␤Non-declarative sigil is missing its name at line 22, near "$ = 4; # b"␤»
bbkr rakudo: my $ = 'a'; my $ = 4; # hmm
p6eval rakudo efe72c: OUTPUT«===SORRY!===␤Redeclaration of symbol $ at line 22, near " = 4; # hm"␤» 10:14
tadzik std: my $ = 5;
p6eval std 31901: OUTPUT«ok 00:01 117m␤»
tadzik oh
sorear my $ = 5 is absolutely legal 10:15
it creates an anonymous variable
it's most useful in parameter lists
it prevents unused variable warnings 10:16
pugssvn r31902 | sorear++ | [STD] Correctly handle setting chains other than NULL->CORE->UNIT 10:22
10:25 ambs joined
moritz_ rakudo: say 0o777 10:26
p6eval rakudo efe72c: OUTPUT«511␤»
bbkr i know that "my $ = 5" is legal. still "my $ = 'a'; my $ = 4;" IMO should not warn about redeclaration, because symbol is anonymous :) 10:27
moritz_ rakudo: my $ = 5; my $ = 7; say "alive"
p6eval rakudo efe72c: OUTPUT«===SORRY!===␤Redeclaration of symbol $ at line 22, near " = 7; say "␤» 10:28
bbkr same as ([1,2,3], [1,2,3]) is legal code and those are two anonymous arrays in the same scope
sorear niecza: my $ = 'a'; my $ = 4; say "alive"
p6eval niecza 01680b9: OUTPUT«[31m===[0mSORRY![31m===[0m␤Non-simple variables NYI at /tmp/GPz2nPpQWs line 1:␤------> [32mmy $[33m⏏[31m = 'a'; my $ = 4; say "alive"[0m␤Use of uninitialized value $t in pattern match (m//) at Niecza/Actions.pm line 1086.␤Use of uninitialized value $t in pattern match
..(m//)…
moritz_ bbkr: that's right; it's a bug
sorear moritz_: I've added a safe mode to niecza; to use it, change 'make' to 'make safe' and add --safe to the niecza_eval command
moritz_ sorear++ 10:29
bbkr reports
moritz_ sorear: thanks - I have a local patch, and will commit as soon as pugs svn works again for me 10:32
10:32 muixirt joined
sorear niecza: say slurp("/etc/passwd").substr(0,1) 10:32
p6eval niecza 01680b9: OUTPUT«[31m===[0mSORRY![31m===[0m␤Undeclared routine:␤ 'slurp' used at line 1␤Check failed␤»
bbkr what is "niecza" evalbot? 10:33
sorear oh, it hasn't updated since July
seriously wtf is wrong with the update cron job
bbkr: github.com/sorear/niecza 10:34
(and/or wtf is wrong with my Makefile that only manifests under cron)
bbkr sorear: thanks for info 10:35
moritz_ niecza: say slurp("/etc/passwd").substr(0,1) 10:36
p6eval niecza bbc3800: OUTPUT«[31m===[0mSORRY![31m===[0m␤Undeclared routine:␤ 'slurp' used at line 1␤Check failed␤»
moritz_ niecza: say slurp("/etc/passwd").substr(0,1) 10:38
p6eval niecza ff2f9de: OUTPUT«[31m===[0mSORRY![31m===[0m␤Undeclared routine:␤ 'slurp' used at line 1␤Check failed␤»
moritz_ that's the newest niecza I could get
TimToady is afraid what phenny will say 10:39
phenny TimToady: 27 Jul 09:42Z <sorear> ask TimToady what do CallFrame.line and $?LINE mean in your LF-polymorphic model?
TimToady: 27 Jul 09:43Z <sorear> tell TimToady STD bug: my module CORE; my class Bool { our constant False = 0; } # Can't call method "id" on an undefined value
TimToady: 28 Jul 04:15Z <sorear> ask TimToady I feel like I'm using phenny a bit much. Does STD.pm6 have a bug tracker?
sorear niecza: say 2
p6eval niecza ff2f9de: OUTPUT«2␤» 10:40
sorear niecza: say Q:CgOp { (null Variable) }
p6eval niecza ff2f9de: OUTPUT«MAIN.cs(38,77): error CS0023: The `.' operator cannot be applied to operand of type `null'␤Compilation failed: 1 error(s), 0 warnings␤"gmcs" unexpectedly returned exit value 1 at (eval 39) line 13␤ at CompilerDriver.pm line 82␤»
sorear moritz_: if you've switched the build to 'make safe', the evaluator also needs to be switched to '--safe' 10:41
bbkr rt.perl.org/rt3/Ticket/Display.html?id=69010 - yesterday I got no answer - is 'break' command used in this ticket something that was removed from spec?
sorear using one but not the other fails in a very LTA way
10:49 vcrini joined
moritz_ sorear: could you please apply nopaste.snit.ch/22555 for me? 10:50
I can't access pugs right now :( 10:53
sorear I suspect that patch is corrupted
It only changes one character
It appears to have been chopped at 80 chars 10:54
10:56 meppl joined 10:58 yannt joined 10:59 timbunce joined 11:04 redicaps joined 11:09 jferrero joined 11:12 funkymonk0 joined, PZt joined
yannt The perl6 site says, 'if you are looking for production ready code please use perl5'. When will perl6 be ready in that way? 11:15
tadzik yannt: not soon 11:16
yannt: The date is "when it's ready"
TiMBuS i recall duke nukem forever had the same release date :x 11:17
tadzik the difference is that you can use Perl 6
yannt Is the transition going to be smooth? Are there plans for that?
TiMBuS lol
tadzik yannt: plans for what? 11:18
TiMBuS yannt, the plan is to run a perl5 interpreter alongside parrot for backwards compatibility for things like cpan modules
yannt ok 11:19
tadzik this is actually the reality, not the plan :)
TiMBuS well i'd assume the long term goal is to convert all perl 5 modules to perl 6 11:20
tadzik iirc it's not
sorear *very* long term goal
tadzik 2010-07-26 12:17:35 sorear tadzik: computers are cheap. replacing CPAN will cost billions. 11:24
so it is a goal eventually?
11:25 bjarneh joined, phenicsl joined 11:26 Italian_Plumber joined
TiMBuS has anyone made p5top6 yet 11:28
11:29 uniejo joined
gfldex TiMBuS: no and that might not be needed 11:30
TiMBuS hm? 11:31
gfldex the idea is to run perl5 and perl6 in the same program
tadzik blizkost works 11:32
11:44 iloveperl6 joined
TiMBuS I know that backwards compatibility is needed, but I think it would be nice to encourage authors convert their modules to perl 6. 11:45
mberends TiMBuS: we do, we do :)
TiMBuS so a (probably not-so-)simple preprocessor for converting perl 5 to 6 could really help 11:46
gfldex it most cases it wont
perl6 != per5+1
moritz_ even parsing perl 5 isn't simple 11:47
gfldex look how many cpan modules bring some c code with them
you dont need tha c code with perl6
hopefully .)
TiMBuS well I don't mean a full conversion. that's pretty insane. but I've seen a lot of people saying that most perl 5 code runs as perl 6 with only a bit of search&replace (sigils mostly) 11:49
dalek kudo: 8f8ad30 | moritz++ | src/core/IO.pm:
fix RT #76978, mkdir() umask should default to 0o777
11:50
11:55 takadonet joined
takadonet morning all 11:55
moritz_ o/ 11:56
takadonet moritz_: how are u?
moritz_ takadonet: busy :-) - at YAPC::EU, waiting for the next talk 11:57
tadzik are the talks streamed maybe?
moritz_ no :(
11:58 timbunce joined
takadonet moritz_: any online? 11:58
moritz_ takadonet: probably not yet
12:06 envi^home joined
timbunce sorear: am I right in thinking that the README at github.com/jnthn/blizkost is very outdated? 12:07
tadzik it is 12:08
12:09 amkrankruleuen joined
timbunce tadzik: great. any chance of an update? and can it talk well with the perl5 DBI? 12:09
12:09 ruoso joined
sorear it can talk to the perl5 dbi, though you may need a bit of glue 12:10
tadzik timbunce: poke jnthn, I have no access to blizkost
sorear the only things that roundtrip very well are strings and closures
12:12 M_o_C joined
timbunce I'm thinking of doing a 'perl5 dbi' driver for DBDI using blitzkost 12:12
12:19 macroron joined 12:24 bluescreen joined 12:32 timbunce joined 12:33 drbean joined 12:40 Guest86395 joined 12:43 Alias joined 12:44 grai joined 12:47 muixirt joined, masonkramer joined 12:53 LaVolta joined 13:07 perlygatekeeper joined 13:15 cibs joined 13:19 Holy_Cow joined
tadzik does IO::Socket::INET need some love? 13:33
TiMBuS yes 13:35
13:36 mberends joined 13:38 xinming joined, ambs joined, [1]Casan joined 13:39 timbunce joined
TiMBuS does recv still close the socket when it's done? that was terrible 13:40
or it did something else that was terrible, i forget what 13:41
hrmmmm yeah it only returns once a connection is closed
unless you specify a buffer size 13:42
13:48 javs joined 13:51 timbunce joined 13:53 thrn joined 13:56 oha joined, clintongormley joined 13:57 amkrankr1leuen joined 14:02 masak joined
masak \\o/ 14:02
takadonet masak: ? 14:03
masak takadonet: first talk down -- it went reasonably well. 14:04
takadonet masak: sweet!
masak now I just need to *write* the next talk before Friday. o.O
dalek kudo: e41c47b | moritz++ | src/ (2 files):
:ii is a synonym for :samecase
14:05
14:05 kthakore left 14:07 briang joined 14:12 envi^home joined, LaVolta joined
LaVolta rakudo: if "abc" ~~ m:i/ B / { say "matched"; } 14:12
p6eval rakudo 8f8ad3: OUTPUT«===SORRY!===␤Missing block at line 22, near ""␤»
dalek kudo: 0185653 | moritz++ | src/Perl6/Actions.pm:
:ii/:samecase now implies :i, as per spec
14:12 mberends joined
moritz_ LaVolta: I noticed that m// doesn't work if I implement it according to the spec - needs some tweaking by TimToady++ 14:12
14:13 _ilbot2 joined
moderator »ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.pugscode.org/ | UTF-8 is our friend! | Rakudo Star Released!
LaVolta btw, where's TimToady these days? :) 14:13
PerlJam vacation
moritz_ LaVolta: YAPC::EU
masak szabgab: you've been using the verb "crashes" in recent bug reports in a manner which confuses me slightly. it seems to me you really meant "dies" each time. 14:14
szabgab: at least to me, "crashes" means that it dies with some kind of casualties, such as a bus error or segfault. 14:15
LaVolta seems like I am a fake Perl lover here...
moritz_ LaVolta: it took me 4 years in the perl community to make it to my first YAPC
14:15 Guest23195 joined
LaVolta I did not even know that it's YAPC::EU time... 14:17
masak LaVolta: maybe you can make it to YAPC::Asia instead? 14:18
LaVolta masak: I know there's PerlChina around...but I've never meet someone 14:19
and it seems to me Perl needs some hype/buzz/whatever here 14:20
masak and good p6 user docs for someone to translate to Mandarin. 14:22
LaVolta masak: I don't know if someone already start translating, or may be we can work together 14:23
or...I may just try to do it 14:24
masak LaVolta: ISTR that JimmyZ did some translating of the Synopses. 14:25
14:25 Holy_Cow joined 14:29 alester joined
moritz_ rakudo: $_ = 'Foo'; s/foo/bar/; .say 14:29
p6eval rakudo 8f8ad3: OUTPUT«Foo␤»
moritz_ \\o/
wait
moritz_ borked it
rakudo: $_ = 'Foo'; s:ii/foo/bar/; .say 14:30
p6eval rakudo 8f8ad3: OUTPUT«Found adverb ii␤===SORRY!===␤Adverb 'ii' not allowed on substitution at line 22, near "; .say"␤»
masak "Found adverb ii"?
14:30 plobsing joined
moritz_ sutpid debugging output 14:30
which I've fixed locally
masak in HEAD on Github? :) 14:31
moritz_ yes :(
masak yes, that counts as borking it. :P
moritz_ that's not the only bork
look again
masak "'ii' not allowed"?
moritz_ 16:29 < moritz_> rakudo: $_ = 'Foo'; s/foo/bar/; .say
16:29 <+p6eval> rakudo 8f8ad3: OUTPUT«Foo␤»
masak that's ok, no? 14:32
moritz_ rakudo: say 'Foo' ~~ /foo/
p6eval rakudo 8f8ad3: OUTPUT«␤»
melte case sensitive
moritz_ right
masak doesn't see the other bork
moritz_ and I accidentally it for s///
masak: s/foo/bar/ should be case senstive 14:33
masak no wai!
oh wait.
yes.
case *sensitive*
it is, in your example above.
moritz_ rakudo: $_ = 'Foo'; s/foo/bar/; .say
masak that's why it doesn't do the substitution.
p6eval rakudo 8f8ad3: OUTPUT«Foo␤»
melte it doesn't match so it doesn't substitute
masak right.
moritz_ ah
masak as it shouldn't.
moritz_ really confused 14:34
masak the bork isn't in Rakudo in this case :)
moritz_ rakudo: $_ = 'Foo'; s:ii/foo/bar/; .say
p6eval rakudo 8f8ad3: OUTPUT«Found adverb ii␤===SORRY!===␤Adverb 'ii' not allowed on substitution at line 22, near "; .say"␤»
moritz_ that will print Bar soon
it does locally
dalek kudo: ecb4b0a | moritz++ | src/Perl6/Actions.pm:
remove left-over debugging output, moritz--
LaVolta masak: sorry...it's the latency...where can I find him? I don't see him around... 14:37
masak LaVolta: he's around irregularly. 14:38
LaVolta ah...then I have to wait or could you point me somewhere in the doc to start?
moritz_ rebuilding parrot failed :( 14:39
on the p6eval server
a distclean helped 14:41
pugssvn r31903 | moritz++ | [t/spec] RT #75900 14:46
r31904 | moritz++ | [syn/] remove broken S26 link 14:47
r31905 | moritz++ | [evalbot] enable niecza safe mode
r31906 | moritz++ | tests for :ii and :samecase implying :i
14:47 ashleydev joined 14:48 molaf joined
masak LaVolta: far be it from me to tell someone else what to do, and this documentation stuff is complicated enough without involving other languages. :) but (hint, hint) I see far too little Perl 6 blogging in Chinese. :) 14:48
LaVolta masak: there actually are some bloggin/announcing of the release of R*, but yes too few... 14:53
ex: solidot (Slashdot-alike site) developers.solidot.org/developers/1...2236.shtml 14:54
and CSDN: java.csdn.net/a/20100802/277561.html (right news, wrong place, I guess, put in "Java channel") 14:56
14:56 Kodi joined
masak yeah. I meant more like people in China using Perl 6 and blogging about their experiences. 14:57
Kodi masak: Would you prefer I bug somebody else about my Instants and Durations patch? :) gist.github.com/493037
14:58 uniejo joined
LaVolta I know, even Perl 5 didn't get its population I guess :p 14:58
masak Kodi: if you want it reviewed in the next 2-3 days, you'll probably want to recruit someone else, yes. 14:59
Kodi: let me just say at this point that I like your work so far with Temporal, and I'm very happy you're taking the time to do it. sadly I don't have time to review things right now.
Kodi masak: Come to think of it, I'll be in a better position to make changes in the week of the 15th than now. Will you be less busy then, too? 15:00
moritz_ Kodi: that .perl method is ugly... why not use the default one? it will preserve $.x too 15:01
masak Kodi: I can guarantee that I won't be *more* busy. :)
Kodi moritz_: I did indeed screw up with Duration.perl, but Instant.perl needs to be silly in order to be spec-compliant, I think.
masak: Let's just wait and see, I guess. 15:02
15:02 ambs joined
moritz_ and from looking at the code, it seems it might benefit from Instant inheriting from Rat instead of having one 15:03
Kodi moritz_: Maybe? The thing with both of these datatypes is that more standard numeric operations should be *disallowed* on them than *allowed*. Although I admit I haven't really thought through whether you should be able to, e.g., take the sine of a Duration. 15:04
15:04 patrickas joined
patrickas good * 15:05
moritz_ Kodi: that's why I wrote "maybe" :-)
patrickas moritz_ o/ How is YAPC::EU going ? 15:06
15:06 dolmen joined
moritz_ patrickas: great 15:06
masak moritz_: re nopaste.snit.ch/22523, D2 is something I've been considering doing at times. my plan was to trawl through S?? and identify each possible error condition. your way of doing it seems more reasonable. 15:07
15:09 pmurias joined
moritz_ pmurias: nopaste.snit.ch/22523 15:09
masak: thanks
15:11 bgs100 joined
pmichaud moritz_: proposal +1 15:13
patrickas is 1...^5 the ... op with ^5 on the rhs or is it ...^ op with 5 on the rhs ?
pmichaud patrickas: the latter
masak patrickas: NYI in Rakudo. 15:14
15:14 ash_ joined
masak (last I looked) 15:14
patrickas masak I am asking in order to I :-)
15:14 jferrero joined, smash joined, justatheory joined
ambs hmms, how should (1...^6) expand? 15:14
smash moritz_: ping 15:15
moritz_ smash: pong
pmichaud ambs: 1,2,3,4,5
patrickas ambs: 12345
ambs that was my guess
but
> (1...^6)
1 0 1 2 3 4 5
moritz_ smash: your idea of copying the svn dir to anothermachine worked well, thank you
smash++
pmichaud ambs: looks like a bug to me
masak ambs: as I said, NYI in Rakudo.
moritz_ ambs: it's not yet implemented, and mis-parses
patrickas ambs: that's because it is not yet implemented
ambs: so it is getting parsed at 1...0 1 2 3 4 5 15:16
ambs oh, ok.
15:16 M_o_C joined
smash moritz_: just changed my "benchmarking" script, it now gets the programs to run from a repository, which means that to add your program to the benchamarking suite just add it to the repository 15:16
patrickas since ^6 on its own is equiv to 0..^6
15:16 jkramer joined
jkramer Ahoy 15:16
dukeleto jkramer: salutations 15:17
moritz_ smash: which repo? pugs or rakudo?
masak jkramer: greetings!
ambs patrickas: understood
jkramer I've been playing with rakudo star and it's incredibly slow. So I wondered if I can compile my .p6 files to .pir/.pasm and then run them directly with parrot
smash moritz_: i created a new one but it can be moved anywhere else
jkramer perl6 --target=pir seems to emit pir, but how can I run it?
PerlJam jkramer: what makes you think that'll make them faster? :)
moritz_ smash: new repo is fine too
smash moritz_: (svn workaround) glad it worked
moritz_ jkramer: you currently can't - but you will be able to in the next release 15:18
pmichaud jkramer: parrot file.pir
jkramer PerlJam: Hmm, I though probable compiling the script all the time makes it so slow :)
pmichaud jkramer: oh, it doesn't work with Rakudo Star yet, correct
smash moritz_: i can even create a new one on github
jkramer Ah, ok
pmichaud it does work for the next release
moritz_ or in the rakudo development version from git :-)
pmichaud jkramer: you're correct, compilation is slow for large input programs
jkramer pmichaud: Well, I was talking about something like 'say "Hello, world"' :) 15:19
pmichaud jkramer: ah, that problem is likely startup cost. Converting it to .pir won't improve the speed much.
pmichaud checks
jkramer Hello world takes 3.254s here
[Coke] pmichaud: trac.parrot.org/parrot/ticket/1728 (basically didn't apply it in case it does something other than make my life easier. =-) 15:20
15:20 grai left
rcfox pugs: class foo { has $.text is rw; has $.code is rw; method postfix:<()> { $.code(); } }; macro newfoo(Str $code) { "foo.new(text=>\\"$code\\",code=>{$code})"; }; my $a = newfoo("1+1"); say $a(); 15:20
p6eval pugs: OUTPUT«*** Cannot cast from VObject (MkObject {objType = (mkType "foo"), objAttrs = <Hash:0x2adc7bf3e169>, objOpaque = Nothing, objId = MkObjectId {unObjectId = 4}}) to Pugs.AST.Types.VCode (VCode)␤ at /tmp/rJBMjyhIxW line 1, column 184-188␤»
rcfox Why doesn't this work?
masak rcfox: because Pugs is old?
[Coke] rcfox: why are you trying in pugs?
moritz_ rcfox: because macros weren't properly implemented 15:21
[Coke] try again with "rakudo: "
rcfox Rakudo doesn't support macros.
pmichaud gist.github.com/508293 # timings of precompiled versus non-precompiled
masak rcfox: neither does Pugs, AFAIK.
jkramer: needless to say, the fact that "Hello world" takes 3 and a quarter seconds to parse and execute, is evidence that there is some room for optimisation.
rcfox pugs: macro f { "1" }; say f;
pmichaud [Coke]: wifi is slow here, so may take me a while to load up the ticket
p6eval pugs: OUTPUT«1␤»
masak rcfox: I stand corrected. 15:22
rcfox ;)
[Coke] pmichaud: no rush. just adding a few piropsigs.
moritz_ just not "properly" implemented
rcfox I see.
STD doesn't work seem to support macros either.
Is there anything that might work?
[Coke] rcfox: I'm not sure anyone does, no.
moritz_ right, because it actually needs to run code to executed macros
rcfox Aw. 15:23
moritz_ there's a rakudo branch on sorear's github account that supports some basic macros
rcfox Well, I really should be studying instead of playing with Perl 6. :P 15:24
I just thought it'd be neat to see if I could get a textual representation of a Block. 15:25
But then Pugs didn't support the 'does' keyword for adding a role to a block, so I made a new class.
masak rcfox: .perl should give a textual representation of a block, but no implementation does that right now.
15:26 shelling_lab joined
[particle] hrmm... is there a way to list all the Types in the current scope? 15:26
moritz_ no
rcfox masak: I was going to do it by using a macro to grab the code as a string, and then store it in an actual string, as well as code. 15:27
masak [particle]: what are *you* doing? :)
[particle] should there be?
moritz_ yes
masak rcfox: ooh, nice.
[particle] i'm thinking if you could do that, you could see which types didn't have .perl (or some other method) implemented, and provide LHF
masak [particle]: I know I will want to do such introspection for an eventual class browser. 15:33
[particle] absolutely. i imagine all the Types are known, but not exposed. 15:34
rcfox [particle]: Just do every character permutation as a class name. :P
masak they're only countably infinite. 15:35
15:36 pyrimidine joined
[particle] all declared types are known, and considerably less than infinite. in fact, one might be able to count them on his fingers while rakudo loads. :P 15:37
masak not while "Hello World" loads :) Rakudo has more types than that. 15:39
rcfox There's even a Whatever type, I think. 15:41
rakudo: class foo { has $.bar; } my $a = foo.new; say $a.bar;
p6eval rakudo ecb4b0: OUTPUT«===SORRY!===␤Confused at line 22, near "class foo "␤» 15:42
rcfox rakudo: class foo { has $.bar; }; my $a = foo.new; say $a.bar;
p6eval rakudo ecb4b0: OUTPUT«Any()␤»
rcfox Oh, Any...
Hrm, I thought I saw Whatever at some point.
cxreg rakudo: *.WHAT.say 15:47
p6eval rakudo ecb4b0: OUTPUT«Whatever()␤»
[particle] yep.
rakudo: **.WHAT.say 15:48
p6eval rakudo ecb4b0: OUTPUT«===SORRY!===␤HyperWhatever (**) not yet implemented at line 22, near ".WHAT.say"␤»
alester You know what we need?
[particle] lol
cxreg [particle]: is *** PlaidWhatever?
alester 100 of these: perlbuzz.com/2010/08/diving-into-perl-6.html
in 100 different blogs
patrickas rakudo: sub infix:<...^>($lhs, $rhs) {my @all := ($lhs ... $rhs);gather {loop {\tmy $current = @all.shift();\tlast if $current eqv $rhs;\ttake $current;}}}; say 1 ...^ 5 ; say 9 ...^ 5; say (1,*+2) ...^ 7 ; say (1,-2 , 4) ...^ 16; 15:49
p6eval rakudo ecb4b0: OUTPUT«1234␤9876␤135␤1-24-8␤»
15:49 tadzik joined
patrickas I think I just implemented ...^ 15:49
PerlJam alester: I agree. Though we could use a little less of the first comment I think. 15:50
alester yes, agreed
PerlJam (only comment)
alester 3 posts like that are worth more than all the comment replies to the FUD in Infoworld. 15:51
In terms of visibility and positivity.
[particle] alester++: i may have used a MAIN sub there, but that's something for you to investigate in another post :) 15:52
15:52 stefan_ joined
moritz_ MAIN is a feature I really love 15:52
[particle] dear rakudo... if HyperWhatever isn't implemented how do you know that's what ** is? kthxbye 15:53
moritz_ by parsing it.
masak [particle]: parsing vs implementation
[particle] well, it's LHF to get **.WHAT working, that's for sure
tadzik moritz_: is there anything that can be done for IO::Socket::INET?
alester what's MAIN?
patrickas moritz_ I bet I love it more ;-) 15:54
dolmen is leaving. Time to go to the hotel
[particle] alester: perlcabal.org/syn/S06.html#Declarin...subroutine
alester so basically, automagic arg parsing. 15:55
[particle] aye 15:56
15:56 stefan_ joined
[particle] multi MAIN(@list of Int) {...}; multi MAIN() { my @list = 2..100; ...} 15:57
pmichaud rakudo: sub ipvf($n) { ?(2..($n.sqrt)).grep( $n %% * ); }; say ipvf(47);
p6eval rakudo ecb4b0: OUTPUT«0␤»
pmichaud rakudo: sub ipvf($n) { !(2..($n.sqrt)).grep( $n %% * ); }; say ipvf(47);
p6eval rakudo ecb4b0: OUTPUT«1␤»
pmichaud rakudo: sub ipvf($n) { !(2..($n.sqrt)).grep( $n %% * ); }; say ipvf($_) for 0..50; 15:58
alester The js on that page makes my Firefox choke.
p6eval rakudo ecb4b0: OUTPUT«1␤1␤1␤1␤0␤1␤0␤1␤0␤0␤0␤1␤0␤1␤0␤0␤0␤1␤0␤1␤0␤0␤0␤1␤0␤0␤0␤0␤0␤1␤0␤1␤0␤0␤0␤0␤0␤1␤0␤0␤0␤1␤0␤1␤0␤0␤0␤1␤0␤0␤0␤»
pmichaud rakudo: sub ipvf($n) { !(2..($n.sqrt)).grep( $n %% * ); }; say $_ if ipvf($_) for 0..50;
p6eval rakudo ecb4b0: OUTPUT«0␤1␤2␤3␤5␤7␤11␤13␤17␤19␤23␤29␤31␤37␤41␤43␤47␤»
pmichaud ( "is prime via factors" ) 15:59
smash x/quit
ups 16:00
16:00 jkramer left 16:01 Ross joined
pmichaud rakudo: sub ipvf($n) { !(2..($n.sqrt)).grep( { say $_; $n %% $_ } ); }; say ipvf(15); # checking laziness 16:01
16:02 NiiHiiL joined
p6eval rakudo ecb4b0: OUTPUT«2␤3␤0␤» 16:02
pmichaud \\o/
oh, wait.
rakudo: sub ipvf($n) { !(2..($n.sqrt)).grep( { say $_; $n %% $_ } ); }; say ipvf(100); # checking laziness
p6eval rakudo ecb4b0: OUTPUT«2␤0␤»
pmichaud \\o/
patrickas interresting! 16:03
pmichaud rakudo: sub ipvf($n) { !(2..($n.sqrt)).grep( { say $_; $n %% $_ } ); }; say ipvf(97); # checking laziness
p6eval rakudo ecb4b0: OUTPUT«2␤3␤4␤5␤6␤7␤8␤9␤1␤»
pmichaud \\o/
16:04 clintongormley joined
patrickas rakudo: sub ipvfj($i) { $i %% none(2 .. $i.sqrt ) }; say $_ if ipvfj($_) for 0..50; #does NONE ever short circuit? pseudo lazyness! 16:04
p6eval rakudo ecb4b0: OUTPUT«0␤1␤2␤3␤5␤7␤11␤13␤17␤19␤23␤29␤31␤37␤41␤43␤47␤»
pmichaud currently our junctions aren't short-circuiting
(at least, I don't think they are)
we can probably fix that now that we have lazy lists, though. 16:05
16:06 timbunce joined
patrickas shortcircuiting and parallel :-) 16:06
that would be a good day!
how do I tell rakudo the precedence of my operator ? 16:23
16:25 pnate joined 16:26 justatheory joined
alester pmichaud: That prime via factors is sexy. 16:29
16:30 cdarroch joined 16:32 Trashlord joined
alester It seems silly to call $n.sqrt instead of sqrt($n). 16:33
That just seems methody for the sake of methody.
PerlJam Perl 6 has more of a methody feel about it. 16:34
alester and yet, I see no benefit to that.
wtw is my terminal broken or why can't i see proper output of the rakudo-bot? anyone have a clue? ;)
rcfox patrickas: perlgeek.de/blog-en/perl-5-to-6/13-...ators.html
PerlJam $n.sqrt is fewer characters and keystrokes than sqrt($n)
how about that? :) 16:35
exodist alester, chaining, $thing->a->b->c-D instead of d(c(b(a($thing))));
* $thing->a->b->c->d
oops /->/./
tadzik * $thing.a.b.c.d :)
exodist still in perl5 mode...
alester I understand the notional benefit to method chaining.
In this case, I don't see it.
I think of taking "square root of $n", not "$n's square root" 16:36
tadzik but there is a way to sqrt(n) right?
star: say sqrt(4)
exodist for 1 thing like sqrt it is meaningless which is used, but having the option means you can decide for yourself instead of being dictated to.
p6eval star 2010.07: OUTPUT«2␤»
tadzik so where's the problem?
alester exodist: Yes, I undestand that. 16:37
[particle] alester: fewer shift keystrokes, less visual noise
and evaluation reads in ltr order
16:37 Trashlord joined
tadzik when there are many things chained it's easier to read the whole sentence 16:37
patrickas rcfox: Thanks!
alester tadzik: Yes, and there are not many things chained. 16:38
PerlJam why would it seem silly to say $n.sqrt rather than sqrt($n)? It's all just syntax. if the former weren't tied to OOP in your head, would it seem just as silly?
alester I'm not saying .methods don't make sense.
fuck it.
I haven't said anything.
exodist alester, you mean $thing.fuck_it? or fuck_it( $thing )?
:-D 16:39
sorry, could not resist
ghyspran that was kind of lame...
hi exodist
PerlJam exodist: well, you botched the joke a bit too because "it" is spelled $_ in Perl :)
exodist hola, yes, very lame
alester Right, it should be $thing.fuck
[particle] actually, .fuck is "fuck it" 16:40
alester Which I think is an album by Marilyn Manson.
tadzik it.fuck
patrickas rcfox: ... seems NYI
rcfox NYI? 16:41
[particle] not yet implemented
rcfox Oh.
patrickas rakudo: our sub infix:<...^> ($lhs, $rhs) is equiv(&infix:<...>) {...};
p6eval rakudo ecb4b0: OUTPUT«===SORRY!===␤Unexpected named parameter 'equiv' passed␤»
[particle] hrmm... it doesn't like equiv? 16:42
rcfox They haven't implemented most of the fun stuff. :P
16:42 ruoso joined
patrickas but there should eb some workaround! otherwise how would half of the operators be implemented in perl6 with the correct precedence ?! 16:43
PerlJam ruoso: "they" is you too you know :)
16:44 hercynium joined
rcfox PerlJam: Er, was that supposed to be directed at me? 16:45
PerlJam rcfox: aye
16:46 GeneralMaximus joined 16:48 Trashlord joined
rcfox PerlJam: I wouldn't know how to begin. 16:48
PerlJam rcfox: that's okay, I don't know how to begin most of the time either. But there are lots of people on #perl6 who are willing to help. :-) 16:49
rcfox Also, I'm supposed to be studying right now... :P
But maybe I'll look into it after next Saturday.
16:52 molaf joined
ruoso PerlJam, I think I missed something 16:53
PerlJam ruoso: no, just me not paying attention to my tab completion quick enough 16:54
16:55 NiiHiiL joined 16:58 risou joined 16:59 tadzik joined 17:00 Su-Shee_ joined 17:01 clintongormley joined, tadzik joined
bbkr rakudo: say "M"~$_ x 3 ~ ~Mu ~"st be f" ~ $_ ~ " in the rich man world" # Rakudo sings Abba :P 17:03
p6eval rakudo ecb4b0: OUTPUT«MAny()Any()Any()Mu()st be fAny() in the rich man world␤»
bbkr rakudo: say ("M"~$_) x 3 ~ ~Mu ~"st be f" ~ $_ ~ " in the rich man world" # Rakudo sings Abba v2.0 17:04
p6eval rakudo ecb4b0: OUTPUT«MAny()MAny()MAny()Mu()st be fAny() in the rich man world␤»
17:06 _macdaddy joined
exodist ghyspran! I only just looked at your ident! how ya been? 17:09
oops, /msg fail 17:10
ghyspran haha
tadzik phenny: seen alexm 17:11
pnu S02: "type object responds to the function call interface, so [..] argument [..] is coerced", so "Num(1/2).isa(Num)" and "Num(1/2) == Num(0.5)" should be true, right? Not implemented in rakudo or am I missing something? 17:23
But (1/2).Num seems to work.. 17:24
rcfox rakudo: say Num(1/2) ~~ Num;
p6eval rakudo ecb4b0: OUTPUT«Could not find sub &Num␤ in main program body at line 22:/tmp/Bet0PGzb7z␤»
rcfox rakudo: say (1/2) ~~ Num;
p6eval rakudo ecb4b0: OUTPUT«0␤»
rcfox :O 17:25
rakudo: say 1/2 ~~ Num;
p6eval rakudo ecb4b0: OUTPUT«0␤»
pnu rakudo: say 1/2 ~~ Rat;
p6eval rakudo ecb4b0: OUTPUT«1␤»
rcfox rakudo: say Rat ~~ Num; 17:26
p6eval rakudo ecb4b0: OUTPUT«0␤»
rcfox rakudo: say Rat ~~ Any;
p6eval rakudo ecb4b0: OUTPUT«1␤»
rcfox Huh.
pnu yeah
[particle] rakudo: say 1/2.WHAT 17:27
p6eval rakudo ecb4b0: OUTPUT«Inf␤»
rcfox rakudo: say Num ~~ Rat;;
[particle] rakudo: say (1/2).WHAT
p6eval rakudo ecb4b0: OUTPUT«0␤»
rakudo ecb4b0: OUTPUT«Rat()␤»
rcfox rakudo: say (1/2) + 1; 17:28
[particle] you can find something's type by calling .WHAT
p6eval rakudo ecb4b0: OUTPUT«1.5␤»
pnu rakudo: (+ 1/2).WHAT
p6eval rakudo ecb4b0: ( no output )
pnu rakudo: say (+ 1/2).WHAT
p6eval rakudo ecb4b0: OUTPUT«Rat()␤»
[particle] rakudo: say Num(1/2)
p6eval rakudo ecb4b0: OUTPUT«Could not find sub &Num␤ in main program body at line 22:/tmp/vReOptLVv6␤»
[particle] rakudo: say (1/2).Num
p6eval rakudo ecb4b0: OUTPUT«0.5␤»
17:28 donaldh joined
pnu even the prefix + doesn't coerce to Num, but it's still Rat.. shouldn't it? 17:28
[particle] rakudo: say (1/2).Num == 0.5 17:29
p6eval rakudo ecb4b0: OUTPUT«1␤»
rcfox Num is a method.
[particle] rakudo: say 1/2 == (0.5).Rat
p6eval rakudo ecb4b0: OUTPUT«1␤»
rcfox rakudo: say 1.can('Num');
p6eval rakudo ecb4b0: OUTPUT«Num␤»
rcfox Er. I wasn't expecting that. 17:30
rakudo: say 1.can('bake_cookies');
p6eval rakudo ecb4b0: OUTPUT«␤»
rcfox rakudo: say 1.can('Num')();
p6eval rakudo ecb4b0: OUTPUT«Not enough positional parameters passed; got 0 but expected 1␤ in 'Int::Num' at line 3471:CORE.setting␤ in main program body at line 22:/tmp/laJG_G9gB_␤»
rcfox rakudo: say 1.can('Num')(3); 17:31
p6eval rakudo ecb4b0: OUTPUT«3␤»
rcfox rakudo: say 1.can('Num').WHAT;
p6eval rakudo ecb4b0: OUTPUT«Method()␤»
rcfox Wait, Method is a type too?
[particle] of course! 17:32
rcfox rakudo: say {}.WHAT;
p6eval rakudo ecb4b0: OUTPUT«Hash()␤»
rcfox rakudo: say {1}.WHAT;
p6eval rakudo ecb4b0: OUTPUT«Block()␤»
rcfox Why is there Block and Method?
[particle] because they are different types
rcfox rakudo: say sub {1}.WHAT; 17:33
[particle] rakudo: my $s = sub{...}; say $s.WHAT
Exodist one has an invocant for example.
p6eval rakudo ecb4b0: OUTPUT«===SORRY!===␤Confused at line 22, near "say sub {1"␤»
rakudo ecb4b0: OUTPUT«Sub()␤»
[particle] rakudo: my $s = method{...}; say $s.WHAT
p6eval rakudo ecb4b0: OUTPUT«Method()␤»
[particle] rakudo: my $s = rule {...}; say $s.WHAT
rcfox Hm.
p6eval rakudo ecb4b0: OUTPUT«Regex()␤»
rcfox Is there a hierarchy for these?
[particle] rakudo: my $s = module {...}; say $s.WHAT
p6eval rakudo ecb4b0: OUTPUT«error:imcc:syntax error, unexpected ')' (')')␤ in file 'EVAL_8' line 35241149␤===SORRY!===␤syntax error ... somewhere␤» 17:34
pnu and about Num/Rat/coercion.. should this work?
rakudo: sub foo (Num $bar) {}; foo(1/2);
p6eval rakudo ecb4b0: OUTPUT«Nominal type check failed for parameter '$bar'; expected Num but got Rat instead␤ in 'foo' at line 22:/tmp/MuvUkCdG2l␤ in main program body at line 22:/tmp/MuvUkCdG2l␤»
Exodist it would be awesome to see an inheritance hierarchy for /ALL/ built-in types including roles used, does such a map exist? 17:35
rcfox Uh.
rakudo: say (1/2).can('Num');
p6eval rakudo ecb4b0: ( no output )
rcfox rakudo: say 1.can('Num'); 17:36
p6eval rakudo ecb4b0: OUTPUT«Num␤»
rcfox rakudo: say 1/2.can('Num');
p6eval rakudo ecb4b0: OUTPUT«Method 'Num' not found for invocant of class 'Method'␤ in 'Cool::Numeric' at line 1746:CORE.setting␤ in 'Cool::Numeric' at line 1747:CORE.setting␤ in 'infix:</>' at line 6552:CORE.setting␤ in main program body at line 22:/tmp/qNgt4QS8h4␤»
rcfox Guh? 17:37
[Coke] rcfox: can is for methods
no?
rcfox rakudo: say 1.can('sdfd');
p6eval rakudo ecb4b0: OUTPUT«␤»
[particle] rcfox: see feather.perl6.nl/syn/S02.html#Built...Data_Types
rcfox [Coke]: Why does 1.can('sfsdf') return nothing, but 1/2.can('Num') crashes? 17:38
[particle] rakudo: say 1.isa('Num')
rcfox rakudo: say 1/2.can('fgdfg');
p6eval rakudo ecb4b0: OUTPUT«0␤»
rakudo ecb4b0: OUTPUT«Divide by zero␤ in 'infix:</>' at line 3785:CORE.setting␤ in 'infix:</>' at line 3423:CORE.setting␤ in 'infix:</>' at line 436:CORE.setting␤ in main program body at line 22:/tmp/HlR8iKLWLl␤»
[particle] rakudo: say 1.0.isa('Num')
p6eval rakudo ecb4b0: OUTPUT«0␤»
[particle] rakudo: say 1.0.does('Num')
PerlJam precedence
p6eval rakudo ecb4b0: OUTPUT«0␤»
[particle] ah, yeah.
rcfox rakudo: say (1/2).can('fgdfg');
p6eval rakudo ecb4b0: OUTPUT«␤»
rcfox rakudo: say (1/2).can('Num'); 17:39
p6eval rakudo ecb4b0: ( no output )
rcfox Something's weird there.
rakudo: say i.WHAT; 17:41
p6eval rakudo ecb4b0: OUTPUT«Could not find sub &i␤ in main program body at line 22:/tmp/PS8GGk57Ir␤»
rcfox rakudo: say <1+i>.WHAT;
p6eval rakudo ecb4b0: OUTPUT«Str()␤»
rcfox :\\ 17:42
tadzik :)
star: say (1 + i).WHAT
17:42 orafu joined
p6eval star 2010.07: OUTPUT«Could not find sub &i␤ in main program body at line 22:/tmp/gOS72zk2E9␤» 17:42
tadzik star: oh you
p6eval star 2010.07: OUTPUT«Could not find sub &you␤ in main program body at line 22:/tmp/QTtyP26nJB␤»
tadzik star: (2 + 5i).WHAT.say
p6eval star 2010.07: OUTPUT«Complex()␤»
tadzik I can haz a bug?
rcfox What is star?
tadzik star: (2 + i).WHAT.say 17:43
p6eval star 2010.07: OUTPUT«Could not find sub &i␤ in main program body at line 22:/tmp/li7TVaoSEe␤»
tadzik rcfox: Rakudo Star
rcfox What's difference between star and rakudo then?
tadzik a bug, isn't it?
17:43 wormwood_ joined
tadzik rcfox: rakudo is the latest rakudo from git, star is a… star :) 17:43
PerlJam tadzik: depends on your point of view :)
rcfox star: (2+1i).WHAT.say;
p6eval star 2010.07: OUTPUT«Complex()␤»
tadzik hmm
std: (1 + i).WHAT.say 17:44
p6eval std 31906: OUTPUT«ok 00:01 116m␤»
tadzik a bug :)
PerlJam std: (fred + george).WHAT.say
p6eval std 31906: OUTPUT«[31m===[0mSORRY![31m===[0m␤Undeclared routines:␤ 'fred' used at line 1␤ 'george' used at line 1␤Check failed␤FAILED 00:01 116m␤»
PerlJam okay
tadzik Do I have a blessing to report? 17:45
rcfox rakudo: say (1e2342/2).WHAT;
PerlJam you don't need a blessing from anyone.
p6eval rakudo ecb4b0: OUTPUT«Num()␤»
tadzik well, I'd rather be sure it's a bug, not a feature
rcfox rakudo: say (1e-2342).WHAT;
p6eval rakudo ecb4b0: OUTPUT«Num()␤» 17:46
[particle] star is a distribution of rakudo compiler with additional modules
PerlJam tadzik: err on the side of caution and report things you *think* are bugs just in case they are. :)
tadzik: though, you may want to check RT to see if it has already been reported.
rcfox rakudo: say (1e-23475675675684345564747483458458685672).WHAT;
p6eval rakudo ecb4b0: OUTPUT«Num()␤»
tadzik that's right
rcfox rakudo: Now.WHAT.say; 17:47
p6eval rakudo ecb4b0: OUTPUT«Could not find sub &Now␤ in main program body at line 22:/tmp/ZGoHFq488b␤»
rcfox rakudo: now.WHAT.say;
p6eval rakudo ecb4b0: OUTPUT«Could not find sub &now␤ in main program body at line 22:/tmp/7eYAxIgray␤»
rcfox Hm.
tadzik st
std: i
p6eval std 31906: OUTPUT«ok 00:01 114m␤»
tadzik :)
as masak tought… 17:48
tadzik files rakudobug
rcfox rakudo: my $me = Cool.new; say $me ~~ Cool; 17:50
p6eval rakudo ecb4b0: OUTPUT«1␤»
pnu rakudo: say (0.5).WHAT; say (0.5) ~~ Num; 17:51
p6eval rakudo ecb4b0: OUTPUT«Rat()␤0␤»
pnu That Rat()'s a feature, but coercion back doesn't work, right?
rcfox rakudo: say $*DISTRO;
p6eval rakudo ecb4b0: ( no output )
rcfox pnu: ~~ isn't coercion. 17:52
pnu yes, sorry, but this:
rakudo: sub foo (Num $bar) {}; foo(1/2);
p6eval rakudo ecb4b0: OUTPUT«Nominal type check failed for parameter '$bar'; expected Num but got Rat instead␤ in 'foo' at line 22:/tmp/fP_xPdrE3h␤ in main program body at line 22:/tmp/fP_xPdrE3h␤» 17:53
rcfox Right.
That's because Rat doesn't have the Num method.
pnu actually, even more disturbing: 17:54
rakudo: sub foo (Num $bar) {}; foo(0.5);
p6eval rakudo ecb4b0: OUTPUT«Nominal type check failed for parameter '$bar'; expected Num but got Rat instead␤ in 'foo' at line 22:/tmp/lLh391DciM␤ in main program body at line 22:/tmp/lLh391DciM␤»
rcfox rakudo: use MONKEY_TYPING; augment class Rat { method Num { return self+0; } }; sub foo (Num $bar) {}; foo(1/2);
p6eval rakudo ecb4b0: OUTPUT«===SORRY!===␤A method named 'Num' already exists in class 'Rat'. It may have been supplied by a role.␤»
rcfox Oh!
Well then...
pnu and, please note: 17:55
rakudo: say (+ 0.5).WHAT;
p6eval rakudo ecb4b0: OUTPUT«Rat()␤»
17:58 plol joined
rcfox rakudo: use MONKEY_TYPING; augment class Rat is Cool { }; sub foo (Num $bar) {}; foo(1/2); 17:58
p6eval rakudo ecb4b0: OUTPUT«Nominal type check failed for parameter '$bar'; expected Num but got Rat instead␤ in 'foo' at line 22:/tmp/iwTBI2kwTV␤ in main program body at line 22:/tmp/iwTBI2kwTV␤»
18:00 risou_ joined
rcfox rakudo: use MONKEY_TYPING; augment class Rat is Num { }; sub foo (Num $bar) {}; foo(1/2); 18:02
p6eval rakudo ecb4b0: OUTPUT«===SORRY!===␤Modifications to classes are not allowed after instantiation.␤»
rcfox Well, I'm out of ideas. :P 18:03
18:04 ashleydev joined
sorear good * #perl6 18:06
rcfox rakudo: say 1/2 ~~ Numeric;
p6eval rakudo ecb4b0: OUTPUT«1␤»
rcfox rakudo: say 1/2.pred; 18:07
p6eval rakudo ecb4b0: OUTPUT«1␤»
rcfox rakudo: say 1/2.pred.pred;
p6eval rakudo ecb4b0: OUTPUT«Inf␤»
lucs What's
Er, what's 'pred'?
rcfox "Returns the predecessor of $x. This method is used by prefix:<--> and postfix:<--> to decrement the value in a container." 18:08
rakudo: say --1/2;
lucs Ah, thanks ('predicate' came to mind)
p6eval rakudo ecb4b0: OUTPUT«Cannot modify readonly value␤ in '&infix:<=>' at line 1␤ in main program body at line 22:/tmp/dJM05ByWAC␤»
rcfox Whoops.
rakudo: my $x = 1/2; say --$x;
p6eval rakudo ecb4b0: OUTPUT«-0.5␤» 18:09
rcfox rakudo: my $x = 1/2; say $x.pred;
p6eval rakudo ecb4b0: OUTPUT«-0.5␤»
rcfox Oh, precidence got me again.
rakudo: say (1/2).pred;
p6eval rakudo ecb4b0: OUTPUT«-0.5␤»
rcfox Yeah.
rakudo: say Inf.pred; 18:10
p6eval rakudo ecb4b0: OUTPUT«Inf␤»
18:10 donaldh joined
rcfox rakudo: say (1/2).nude; 18:12
p6eval rakudo ecb4b0: OUTPUT«12␤»
rcfox Teehee, nude.
Oh, Num is finite-precision, while Rat is infinite-precision, theoretically. 18:14
rakudo: say (1/9).Num; 18:15
p6eval rakudo ecb4b0: OUTPUT«0.111111111111111␤»
rcfox rakudo: sub foo (Numeric $bar) {}; foo(1/2); 18:22
p6eval rakudo ecb4b0: ( no output )
rcfox pnu: This is how you should do it. ^
18:28 meppl joined, aya1 joined
aya1 Hi 18:28
can anyone give me 2 advices?
to perl6 packages
sorear sure 18:29
aya1 Is there a method to use v5 packages? Or some v6 packages like:
1) URI::Escape
2) XML::Simple
3) Digest::HMAC_SHA1
Just not found it in v6 libs
sorear rakudo star? 18:30
aya1 yup :)
sorear use URI::Escape:from<perl5>;
aya1 2010.07.
one sec i'm try
sorear say uri_escape("10% is enough\\n");
aya1 yup i'm know how use in v5 :) 18:31
sorear the perl5 interop layer is not very complete
it only well supports strings and subs
if you want to access other kinds of data you'll probably need to wrap it in a sub
aya1 this is what i'm get whan i'm use "use URI::Escape:from<perl5>;"
===SORRY!===
"load_language" couldn't find a compiler module for the language 'perl5'
sorear you might need to do a separate build step for it 18:32
aya1 in v5 URI Escape work fine
sorear blizkost is included in the R* package
but I have no idea if the build is automatic
aya1 Hmm can you please explain how do it? I'm seek in docs but no luck to use v5 libs :(
Or kick me in a doc where can found info to it :)
sorear what I gave you was correct. if you have blizkost installed, that line will work. 18:33
aya1 Oh :) 5 min i'm look for blizkost
rcfox make blizkost-install
sorear rcfox++ maybe I should learn star sometime
rcfox Well, it's in the README.
aya1 making it now :) maybe i'm miss this part in README 18:34
18:34 desertm4x joined
rcfox Yep, after building that, it works for me. 18:34
aya1 hmm 1 more question :) what is lperl ? 18:35
it required to blizkost
found it :)
installing :)
yup after it all fine :) thanks a lot for help 18:38
18:39 jonas1 joined
ash_ ping moritz_ 18:40
18:46 aya1 left 18:56 whiteknight joined 18:57 janosik joined
_sri is a little unhappy about the bad quality of the logo on the cover of UsingPerl6-draft.pdf and the lack of attribution 18:58
sorear oh wow 208 18:59
takadonet sorear: ? 19:01
PerlJam _sri: you have my apologies on behalf of everyone working on the book.
slavik is there a link?
PerlJam _sri: would a mention in the acknowledgements satiate you wrt attribution? 19:02
_sri PerlJam: anything would have been nice
19:03 flatwhatson joined
_sri PerlJam: why didn't you just poke me and ask for a cleaned up version? 19:03
PerlJam I have no idea who added the logo or why they didn't give you attribution.
[particle] git blame 19:05
19:05 cono joined
[particle] it is a draft, but it did get released. 19:05
19:08 kst joined 19:15 tylercurtis joined, Huesitos joined, Huesitos left 19:25 hercynium joined
ash_ try.rakudo.org/shell?input=say%201%20%2b%203; 19:28
hey, its working
tadzik damn 19:29
ash_ if anyone wants to give it a shot, if you go to just try.rakudo.org/ it's still the temp page
tadzik awesome
ash_ until someone decides that the sites ready
rcfox ash_: That's amazing!
ash_ but if you know about it, try it out
tadzik but I can't press enter when I type 'help'
ash_ ya, i am working on that...
tadzik and it died on 'chapter index' 19:30
ash_ right now, its really more of a repr
tadzik but some things work, it's awesome :)
ash_++
ash_ none of the special commands are working yet
but it is evaluating the perl6
and saves stuff between calls
tylercurtis "my $x = 5;
say $x;
→ 5" 19:31
ash_++
PerlJam weird
I just did the same thing.
(except I said $a instead of $x)
tadzik as for the speed, I see that many, many people are now using it :)
huf 5 is always the answer.
tadzik my $a = 5;
say $a + 7;
→ 12
I was different :) 19:32
ash_ try.rakudo.org/shell?input=my+%24a...ay+%24a%3B
PerlJam say 1, 4, 16 ... 100;
→ 141664
ash_ i should make a sortcut so it will copy your session into a single link
right now, its completely stateless 19:33
tylercurtis use Test; actually works. Although plan is weird.
PerlJam now what would be cool is if we each had our own persistent perl 6 environment based on our session. 19:34
ash_ tylercurtis: i am cheating a bit, i save up all the stuff your writing, and send it as a single command each time you press enter
rcfox What is ... supposed to do exactly?
ash_ the command history is saved in javascript
tylercurtis It looked like that might be the case.
tadzik series operator
PerlJam rcfox: watch
ash_ rakudo: say 1...5;
p6eval rakudo ecb4b0: OUTPUT«12345␤»
PerlJam star: say 1,3 .. 15;
p6eval star 2010.07: OUTPUT«13456789101112131415␤»
PerlJam star: say ~(1,3 .. 15);
p6eval star 2010.07: OUTPUT«1 3 4 5 6 7 8 9 10 11 12 13 14 15␤»
ash_ rakudo: say ~(1,3 ... 15); 19:35
PerlJam easier to read that way :)
p6eval rakudo ecb4b0: OUTPUT«1 3 5 7 9 11 13 15␤»
ash_ dang, PerlJam++ types faster
PerlJam ash_++
yeah, but you get the dots right
ash_ lol, ya, i guess i did
rcfox rakudo: say 1, 1, 2, 3, 5 ... 20;
p6eval rakudo ecb4b0: ( no output )
ash_ rakudo: say 1, 1, 2, 3, 5 ... 21;
p6eval rakudo ecb4b0: ( no output )
ash_ hmm 19:36
PerlJam rcfox: it's the "series" operator. It takes a list on either side and generates a series of items as specified
rcfox rakudo: say 1, 1, 1 ... 5, 5, 5;
p6eval rakudo ecb4b0:
..OUTPUT«111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111…
rcfox :o 19:37
tylercurtis rakudo: say (1, 1, *+* ... 50).join(' ')
p6eval rakudo ecb4b0: OUTPUT«1 1 2 3 5 8 13 21 34␤»
ash_ tylercurtis: the shell is very simple currently, each time you press enter, it resends everything its gotten so far, it saves it if it returns as valid, if its invalid, it (currently, i need to correct this) alerts you and doesn't save the last line you input
PerlJam rcfox: it uses the values in the first list to decide how to "increment" subsequent values to get to the values in the second list
rcfox rakudo: say 1, 4, 9 ... 100; 19:38
p6eval rakudo ecb4b0: ( no output )
rcfox :(
PerlJam rcfox: It doesn't do everything :)
rakudo: say ~(1, 2, 4 ... 100); 19:39
p6eval rakudo ecb4b0: OUTPUT«1 2 4 8 16 32 64␤»
PerlJam rakudo: say ~(1, 2, 4, 7 ... 100); 19:40
p6eval rakudo ecb4b0: OUTPUT«Unable to figure out pattern of series␤ in main program body at line 1␤»
rcfox So it does algebraic series?
PerlJam heh, I wasn't sure if it would figure that one out
rcfox rakudo: say ~(1, 3, 5 ... 22); 19:41
p6eval rakudo ecb4b0: OUTPUT«1 3 5 7 9 11 13 15 17 19 21␤»
rcfox rakudo: say ~(1, 3, 5 ... 22, 23, 24);
p6eval rakudo ecb4b0: OUTPUT«1 3 5 7 9 11 13 15 17 19 21 23 24␤»
rcfox :o
I broke it.
PerlJam no you didn't
rcfox rakudo: say ~(1, 3, 5 ... 22, 24, 26); 19:42
p6eval rakudo ecb4b0: OUTPUT«1 3 5 7 9 11 13 15 17 19 21 24 26␤»
rcfox rakudo: say ~(1, 3, 5 ... (22, 24, 26));
p6eval rakudo ecb4b0: OUTPUT«1 3 5 7 9 11 13 15 17 19 21 24 26␤»
19:43 Ross joined
rcfox rakudo: say ~('a', 'b', 'c' ... 'z'); 19:43
p6eval rakudo ecb4b0: OUTPUT«a b c d e f g h i j k l m n o p q r s t u v w x y z␤»
rcfox Nice.
tadzik out of curiosity, why actually CATCH is inside the try block in Perl 6, not aside like everywhere else?
ash_ rakudo: say ~(10 ... 1); #counts backwards too
p6eval rakudo ecb4b0: OUTPUT«10 9 8 7 6 5 4 3 2 1␤»
[Coke] rakudo: say ~('a', 'e', 'i', ... 'z'); 19:44
p6eval rakudo ecb4b0: OUTPUT«===SORRY!===␤Comma found before apparent series operator; please remove comma (or put parens␤ around the ... listop, or use 'fail' instead of ...) at line 22, near " ... 'z');"␤»
[Coke] rakudo: say ~('a', 'e', 'i' ... 'z');
p6eval rakudo ecb4b0: OUTPUT«a e i j k l m n o p q r s t u v w x y z␤»
[Coke] BROKEN!
PerlJam rcfox: start at perlcabal.org/syn/S03.html#List_infix_precedence and work your way down. there are lots of cool operators in there :)
[Coke] ;)
rcfox rakudo: say ~('a', 'e', 'i' ... 'u');
p6eval rakudo ecb4b0: OUTPUT«a e i j k l m n o p q r s t u␤»
PerlJam tadzik: so it can access the lexical environment of the block that's throwing the exception 19:45
tadzik I see
rcfox rakudo: say {rand}...*; 19:46
p6eval rakudo ecb4b0:
..OUTPUT«0.8070732751834560.7293311679187690.7451491922574360.6014154922568940.4528439415007450.3368658778693680.3919666554257550.2282488502009170.9818373139139570.4657848265649530.8317910081145570.6331214132087450.8537497262821180.3686461582115010.6741737009434630.6577108178469790.18307104…
ash_ rakudo: my $a = * + 3; say $a(2); 19:47
p6eval rakudo ecb4b0: OUTPUT«5␤»
ash_ i really like the whatever operator
rcfox Huh.
ash_ * = whatever, its a placeholder 19:48
rcfox rakudo: say * + 3;
19:48 justatheory joined
p6eval rakudo ecb4b0: OUTPUT«_block114␤» 19:48
ash_ so my $a = * + 3 is the same as $a = -> $x { return $x + 3; }
19:48 janosik left
ash_ rakudo: say (-> $x { return $x + 3; })(2) 19:49
p6eval rakudo ecb4b0: ( no output )
rcfox rakudo: my $a = * + 3; say $a.WHAT;
ash_ rakudo: say (-> $x { $x + 3; })(2)
p6eval rakudo ecb4b0: OUTPUT«WhateverCode()␤»
rakudo ecb4b0: OUTPUT«5␤»
ash_ rakudo: say *.WHAT
rcfox WhateverCode?
p6eval rakudo ecb4b0: OUTPUT«Whatever()␤»
ash_ its like a code block, but specifically made from a whatever 19:50
rakudo: say { }.WHAT
p6eval rakudo ecb4b0: OUTPUT«Hash()␤»
ash_ err
PerlJam heh
ash_ rakudo: say { 1 + 3; }.WHAT
p6eval rakudo ecb4b0: OUTPUT«Block()␤»
PerlJam say { ; }.WHAT
rakudo: say { ; }.WHAT 19:51
p6eval rakudo ecb4b0: OUTPUT«Block()␤»
ash_ rakudo: say ~{ ; }.^parents
dalek ok: ca3fd5a | (Nikolai Prokoschenko)++ | lib/book.sty:
* Move authors to the second page to un-litter the front page

license might be upcoming
p6eval rakudo ecb4b0: OUTPUT«Code() Cool() Any() Mu()␤»
tadzik Amelia?
ash_ all things executable inherit from Code
Code means you can .()
rcfox Parents? Huh. 19:52
19:52 Ross joined
rcfox raduko: say (1/2).^parents; 19:52
rakudo: say (1/2).^parents; 19:53
p6eval rakudo ecb4b0: OUTPUT«Cool()Any()Mu()␤»
rcfox Hm.
ash_ rakudo: say (1/2).WHAT
p6eval rakudo ecb4b0: OUTPUT«Rat()␤»
ash_ Rat 's inherit from Cool, Any, and Mu
19:53 rhr joined
ash_ rakudo: class A { }; class B is A { }; say B.^parents; say A.^parents; 19:54
rcfox Yeah, we were trying to figure out why a Rat couldn't be used as a Num earlier.
Casan humm I was just thinking about introspection and intelliperl(padre)/intellisense(visualstudio).. is there a .OPTIONS or something, where you can do a .OPTIONS on any object and get a list of the methods available in the related classes within a given scope?
p6eval rakudo ecb4b0: OUTPUT«A()Any()Mu()␤Any()Mu()␤»
ash_ .methods(:local)
rakudo: class A { method b { } }; say A.methods(:local); 19:55
p6eval rakudo ecb4b0: OUTPUT«Method 'methods' not found for invocant of class ''␤ in main program body at line 22:/tmp/1A7o31bEFe␤»
PerlJam Casan: "the related classes"?
ash_ rakudo: class A { method b { } }; say A.^methods(:local);
p6eval rakudo ecb4b0: OUTPUT«b␤»
rcfox rakudo: class A { method b { } }; say A.^methods(:global);
p6eval rakudo ecb4b0: OUTPUT«belemsendallStrpostcircumfix:<[ ]>postcircumfix:<{
..}>keysuniqclassifypairskvoneACCEPTSflatpickanySeqminmaxdoesrotatejoincanreducelistreverseat_keyisamapminat_posmaxsortfirstgrepnonevaluesNumericCaptureCREATEPARROTblessWHENCEWHEREnotdefBUILDALLnewBoolprintsayitemWALKdefinedBUILDclon…
rcfox Heh. 19:56
Casan PerlJam: ignore that part, but I "think I was thinking of" any classes that would have been pulled in, by any other classes inheriting methods and overrides etc. 19:57
ash_ :global doesn't exist as a named param, so its just being passed as a slurpy option, in other words, thats the same as just A.^methods; 19:58
just so you know
Casan rakudo: say "string".methods(:local);
p6eval rakudo ecb4b0: OUTPUT«Method 'methods' not found for invocant of class 'Str'␤ in main program body at line 22:/tmp/9IMIUk7CfV␤»
ash_ rakudo: say "string".^methods(:local);
p6eval rakudo ecb4b0: OUTPUT«encodesuccNumperlWHICHACCEPTSStrIntpredBool␤»
Casan rakudo: say "string".methods(:global);
p6eval rakudo ecb4b0: OUTPUT«Method 'methods' not found for invocant of class 'Str'␤ in main program body at line 22:/tmp/oj6fF4QJT3␤»
ash_ rakudo: say ~"string".^methods(:local);
p6eval rakudo ecb4b0: OUTPUT«Num ACCEPTS perl WHICH Str Int pred Bool encode succ␤»
ash_ rakudo: say ~"string".^methods;
p6eval rakudo ecb4b0: OUTPUT«ACCEPTS perl WHICH Str Int pred Bool encode succ Num comb floor atan asech acos eval round chop tanh split match exp acosh words cotan atan2 lcfirst uc sec cis log substr from-radians sprintf trans sin pred acosec subst sinh cosech acosech abs chomp index ceiling trim asec
..trim-lea…
Casan ash: super, the last one was what I was looking for,. 19:59
rcfox What other ^ methods are there?
ash_ ^ is meta, so it calls the meta model's method, its a shortcut for .HOW 20:00
rakudo: say ~"string".HOW.methods;
p6eval rakudo ecb4b0: OUTPUT«too few positional arguments: 1 passed, 2 (or more) expected␤ in main program body at line 22:/tmp/Lydu7lRl_t␤»
Casan why object.^methods; and not just object.methods?
ash_ rakudo: say ~"string".HOW.methods(Str);
p6eval rakudo ecb4b0: OUTPUT«Num WHICH ACCEPTS perl Str Int pred Bool encode succ cis samecase log capitalize sprintf trans sin flip lc p5chop subst to-radians abs acotan acosech chomp index ceiling cotanh comb unpolar trim-trailing atan ord acos eval chop tanh atanh cosec chars roots uc lines ucfirst
..substr t…
ash_ the method doesn't exist on the object itself, its on the meta object 20:01
rcfox rakudo: say ~HOW.methods(WhateverCode);
ash_ rakudo: say "Foo".HOW
Casan ok gotta say this.. p6 introspecition \\o/
p6eval rakudo ecb4b0: OUTPUT«Could not find sub &HOW␤ in main program body at line 22:/tmp/CjTw7x_iqq␤»
rakudo ecb4b0: ( no output )
rcfox Boo.
rakudo: say ~1.HOW.methods(WhateverCode);
ash_ rakudo: say "Foo".HOW.WHAT
p6eval rakudo ecb4b0: OUTPUT«acotanh ACCEPTS from-radians pred atanh cosec exp Bridge sinh to-radians WHICH acotan roots Complex isNaN ln sec asec cotanh cis log sech log10 rand truncate sqrt sin asin Int Bool cosh succ sign asinh acosech abs reals ceiling unpolar floor asech Rat round acosh acosec Num
..cotan c…
rakudo ecb4b0: OUTPUT«ClassHOW()␤»
ash_ the are 3 major HOW's currently, ClassHOW, RoleHOW and GrammarHOW 20:02
PerlJam It's not quite turtles all the way down yet.
ash_ GrammarHOW and RoleHOW are children of ClassHOW,
tylercurtis "In particular, the .^ forms will automatically supply the invocant as the first argument to methods of the metaclass, while the other forms require you to pass this explicitly." 20:03
ash_ the ClassHOW is useful for describing objects, you can list attributes, inheritance, roles, methods, etc 20:04
20:05 jaldhar joined
PerlJam rakudo: Str.HOW.WHAT 20:06
p6eval rakudo ecb4b0: ( no output )
PerlJam rakudo: Str.HOW
ash_ rakudo: Str.HOW.WHAT.say
p6eval rakudo ecb4b0: ( no output )
rakudo ecb4b0: OUTPUT«ClassHOW()␤»
20:06 kiffin joined
ash_ rakudo: Str.HOW.perl.say 20:06
p6eval rakudo ecb4b0: OUTPUT«Method 'attributes' not found for invocant of class ''␤ in 'Mu::attribs' at line 1198:CORE.setting␤ in 'Mu::perl' at line 1207:CORE.setting␤ in main program body at line 22:/tmp/PgPwHkjD08␤»
20:06 kiffin left
PerlJam ah, I keep forgeting the bot doesn't act like the REPL 20:07
ash_ lol that's probably not going to work, since the HOW's are still written in pir
(in regards to the .perl)
PerlJam right.
locally Str.HOW.WHAT says "ClassHOW()" but Str.HOW dies with "Method 'Str' not found for invocant of class 'ClassHOW'"
I find that ... weird
gfldex it knows the typename but the method is not visible to rakudo 20:08
tylercurtis PerlJam: The REPL is trying to print a ClassHOW, and it doesn't stringify. Whereas Str.HOW.WHAT is a proto-object that does stringify. 20:09
ash_ rakudo: my $a = class { has $.b }; say $a.new(:b(10)).perl # lol 20:10
p6eval rakudo ecb4b0: OUTPUT«.new(b => 10)␤»
20:10 BooK joined
ash_ .perl isn't always that smart it seems 20:10
PerlJam ash_: what would you have it do in that case? Regurgitate the anonymous class def? 20:12
20:12 pyrimidine left, pyrimidine joined
ash_ well, at least blocks will say _block123 (123 = some random number), but in that case it's just .new which seems weird, it seems like its missing something 20:13
rakudo: say { ; }.perl
p6eval rakudo ecb4b0: OUTPUT«{ ... }␤»
ash_ ah, nevermind, i am thinking of when you print block, not .perl
rakudo: say { ; } 20:14
p6eval rakudo ecb4b0: OUTPUT«_block113␤»
sjohnson rakudo: say 'mama' ~~ s/a/A/; 20:17
p6eval rakudo ecb4b0: OUTPUT«Cannot modify readonly value␤ in '&infix:<=>' at line 1␤ in main program body at line 22:/tmp/bmgzXdcks6␤»
sjohnson perl6 hates me 20:19
huf ;(
hugme: hug sjohnson
hugme hugs sjohnson
BooK it hates everyone in the same way, I think
PerlJam with hugs! 20:20
huf the new cool way to hate.
[particle] sheep go to heaven.
sjohnson :) 20:21
p6 == abusive husband
_sri how about a real book cover? kraih.com/usingperl6-sri.jpg 20:24
could have had that from the start...
Tene I like it.
sorear +1 20:26
Exodist book cover +1 20:27
_sri lower left corner is perfect for a publisher logo
[particle] _sri: the kerning looks funny, between Us and in, they seem wider than the other kerns 20:31
tylercurtis sjohnson: have you tried .subst? 20:34
PerlJam [particle]: it looked fine to me until you mentioned it ;)
[particle] :D
Casan rakudo: run('perl6 --version'); 20:35
p6eval rakudo ecb4b0: OUTPUT«Operation not permitted in safe mode␤ in 'Safe::forbidden' at line 2:/tmp/YDTxRzLv4E␤ in main program body at line 22:/tmp/YDTxRzLv4E␤» 20:36
20:36 jferrero joined
Casan nice. 20:36
tylercurtis rakudo: say $*PERL
p6eval rakudo ecb4b0: OUTPUT«name rakudo␤version 2010.07-69-gecb4b0a␤␤»
tylercurtis rakudo: say $*PERL.version
p6eval rakudo ecb4b0: OUTPUT«Method 'version' not found for invocant of class ''␤ in main program body at line 22:/tmp/Ovr5rYcwgT␤»
tylercurtis rakudo: say $*PERL<version> 20:37
p6eval rakudo ecb4b0: OUTPUT«2010.07-69-gecb4b0a␤»
Casan ash_: is try.rakudo.org also running in safe mode?
PerlJam star: say $*PERL<version>
p6eval star 2010.07: OUTPUT«2010.07-47-g9fd5eaa␤»
ash_ Casan: yea, its using safe mode 20:38
Tene star: say $*PERL.perl
p6eval star 2010.07: OUTPUT«{"name" => "rakudo", "version" => "2010.07-47-g9fd5eaa"}␤»
Casan star: say $*VM;
p6eval star 2010.07: OUTPUT«name parrot␤config cc_shared -fPIC␤has_socklen_t 1␤rpath -Wl,-rpath=␤msvcversion ␤cc_inc -I./include -I./include/pmc␤pmc default.pmc null.pmc env.pmc key.pmc unmanagedstruct.pmc managedstruct.pmc exception.pmc parrotlibrary.pmc parrotinterpreter.pmc
..parrotthread.pmc lexpad.pmc time…
ash_ anda a few other restrictions, like a timeout limit of 10 seconds
Tene star: say @*ARGS.perl;
p6eval star 2010.07: OUTPUT«[]␤»
PerlJam star: $*IN.lines.say 20:39
p6eval star 2010.07: OUTPUT«Land der Berge, Land am Strome,Land der Äcker, Land der Dome,Land der Hämmer, zukunftsreich!Heimat bist du großer Söhne,Volk, begnadet für das Schöne,vielgerühmtes Österreich,vielgerühmtes Österreich!Heiß umfehdet, wild umstrittenliegst dem Erdteil du inmitten,einem starken
..Herzen …
20:39 tommyd joined
Casan ash_: good. maybe you also want to restrict eg say $*VM or well.. dunno if it will reveal anything of importance. 20:39
20:40 orafu joined, mava_ joined, Guest86395 joined
Tene what are you thinking it might reveal?? 20:40
PerlJam try.rakudo.org needs a handy default text on $*IN too methinks
sjohnson nice book 20:41
ash_ it has one
mava_ Is the official perl 6 out yet?
ash_ the same as p6eval actually
20:41 vlad0 left
sjohnson it's still in development 20:42
PerlJam mava_: There is Rakudo Star. github.com/rakudo/star/downloads
sjohnson but a usuable download by rakudo is available
i guess you can say it's in beta still?
tadzik alredy in beta? :)
PerlJam mava_: Also, see the Rakudo Star announcement: rakudo.org/announce/rakudo-star/2010.07 20:43
Exodist shouldnt that be alpha or even pre-alpha?
sjohnson from the website: "Announce: Rakudo Star - a useful, usable, "early adopter" distribution of Perl 6"
mava_ @sjohnson: Thank you for the links. 20:44
sjohnson rakudo.org/
tylercurtis mava_: There is no official Perl 6 implementation. There's an official specification, an official test suite, and an official standard grammar, but there are a variety of implementations with varying levels of completeness.
mava_: Rakudo, as has been mentioned, and especially Rakudo *, is probably the most suitable for trying out right now. 20:45
Tene There is an "official Perl 6 specification", which is unfinished.
sjohnson dont thank me... thank PerlJam
hugme: thank PerlJam 20:46
... maybe he's too modest ! 20:47
mava_ @tylercurtis: Thanks. Got it. To think I was at the conference in 2004 where Larry announced the start of perl 6 development. I never thought it would take over half a decade.
20:47 nimiezko joined
gfldex we had the 10th perl6 birthday a few days back 20:47
mava_ 10th birthday? Didnt development start in '04? 20:48
gfldex mava_: use.perl.org/~masak/journal/40451?from=rss
sorear mava_: hehe, came from twitter?
mava_ Perl 6 sounds so different it makes me wonder if it's worth learning if I already can make do well enough with perl 5. 20:56
sorear as an update to perl 5? probably not 20:57
but learning entirely new languages is always great
gfldex mava_: I totally agree with you. That's why I stick with this nice macro assembler written by peter norton. 20:58
avuserow in my opinion, Perl 6 follows a lot of Perl 5 philosophies and has the same feel, so it's relatively easy to pick up
[particle] there is no "the official perl 6". 20:59
any perl 6 that passes the official test suite is "official perl 6"
[particle] back from scrollbackland, and sees tylercurtis++ beat him to it 21:00
x3nU likes perl 5 but loves perl 6 21:03
21:05 cotto_work joined
mava_ when you need to get work done, you fall back on what's going to get the job done, but ... 21:06
21:09 mava_ left, jt__ joined
Exodist git status 21:11
oops.
lol
avuserow fatal: Not a git repository (or any parent up to mount parent )
tadzik :)
Exodist does rakudo compile perl6 to parrot? or is it an interpreter running on parrot? 21:13
gfldex it compiles
PerlJam Exodist: could you elucidate the difference between those two items? 21:15
(as you see it)
Exodist Im actually trying to deduce that myself PerlJam
PerlJam ah, then carry on! :) 21:16
Exodist I think of a compiler as converting one language (perl 6) into something higher level like c/assebly/cpu code.
PerlJam rakudo compiles perl6 down to parrot op codes which are then executed by the parrot runtime 21:17
tadzik Exodist: did You mean: lower level?
Exodist Wheras I think of an interpeter as turning the code into datastructurpes and then following some as procedures, other as data.
PerlJam tadzik: perhaps his trees are upside down too
Exodist yes, lowor, sorry
*lower 21:18
tadzik you mean with roots at the bottom? :/
gfldex Exodist: technicly parrot got a JIT
[particle] parrot doesn't have a jit
Exodist so, which is rakudo more like?
JIT?
[particle] parrot is a virtual machine, like the java virtual machine. 21:19
PerlJam gfldex: parrot *had* a jit-like-thingy
[particle] parrot runs bytecode.
Exodist I know what parrot is
[particle] the rakudo compiler produces bytecode
Exodist ok, that answered my question
tylercurtis exodist: Rakudo is like the java compiler. It takes source-code and turns it into bytecode for its target VM.
sorear "bytecode" is a bit of a misnomer
Exodist yeah, close enough 21:20
sorear Parrot instructions are fullwords
PerlJam tylercurtis: just as slowly too! ;)
[particle] yes, i'm lying to get the point across
sorear (this is why your perl6.pbc is twice as big on a 64 bit machine)
PerlJam sorear: at least until lorito is born
[particle] rakudo is a compiler
no an interpreter
*not
Exodist lol
sorear PerlJam: the current plan for lorito is to not change the bytecode much
PerlJam: lorito insns are not memory safe, whereas .pbc files are supposed to be untrusted 21:21
21:28 meppl joined 21:32 IllvilJa joined, supernovus joined 21:35 briang joined 21:57 Guest23195 left 22:24 justatheory joined 22:26 buubot joined
cxreg "... the tickets are now Perl 6. I'm on a Parrot." 22:29
22:30 ascent_ joined
snarkyboojum just discovered a old page on rakudo.org rakudo.org/parrot/ 22:31
in fact, there are several more linking from that page 22:32
22:33 Italian_Plumber joined 22:39 Helios joined 22:44 aya1 joined
aya1 is there in perl6 other method for typecasting than "$obj.Str" ? 22:44
avuserow some types have prefixes: ~$obj, +$obj, etc 22:47
cognominal rakudo: ([ { :pos<5>, :val<toto> }, { :pos<4>, :val<tutu> } ].sort: *.<pos> ).perl
p6eval rakudo ecb4b0: OUTPUT«postcircumfix:<> not defined for type Whatever()␤ in <anon> at line 1␤ in 'List::sort' at line 2580:CORE.setting␤ in main program body at line 22:/tmp/GKOxP1o3cB␤» 22:48
aya1 Hmm one min i'm show you what i'm mean
"my $tst = uri_escape($string).Str;" 22:49
return me
Can't call method "Str" without a package or object reference.
So it why i'm seeking to diff method to convert to string :) uir_escape also not return .WHAT or .HOW, it with same error, cant call method 22:50
uri_escape from v5 22:52
avuserow my $tst = ~uri_escape($string); 22:53
try that?
aya1 one sec
[particle] what is uri_escape returning? 22:54
my $tst = uri_escape($string); say $tst.WHAT;
aya1 avuserow yup it looks like help
particle, $tst.WHAT return error 22:55
one sec
show
[particle] ok, i wasn't sure of that, or if uri_escape(...).WHAT returned the error
aya1 Can't call method "WHAT" without a package or object reference.
[particle] ok
i haven't used blizkost
aya1 but ~uri_eacape return fine 22:56
[particle] so i don't know what th ebugs are or the reasons for them
aya1 i'm use blizkost cos some libs not in v6 :)
it just looks like blizkost not always return correct type or object
[particle] aye 22:58
avuserow rakudo: say WHAT("foo")
p6eval rakudo ecb4b0: OUTPUT«Str()␤»
avuserow aya1: see if that form gives you something
aya1 one sec 22:59
say WHAT("foo") return Str() 23:00
avuserow well, try it on uri_escape 23:01
aya1 one sec 23:02
>say WHAT(uri_escape($string)); 23:03
Can't locate object method "HOW" via package "edd9b222a7f537eacdea38cff89954216696f8aa" (perhaps you forgot to load "edd9b222a7f537eacdea38cff89954216696f8aa"?)
diakopter heh
aya1 "edd9b222a7f537eacdea38cff89954216696f8aa" is a string
avuserow apparently WHAT() is implemented using .HOW 23:04
aya1 :)
also small other question, doesh "has" work like in examples ?
just consturction 23:05
>has $!method = 'GET';
in class return in print
>print $!method;
"Any()" but not "GET"
or i'm wrong define it? 23:08
avuserow not sure.
sorear aya1: Please stop assuming that uri_escape will return a Perl 6 Str. 23:10
aya1 hmm sorear what you mean? 23:11
sorear uri_escape($string) returns a Perl 5 string 23:12
not a Perl 6 one
aya1 yup i'm know
ingy greetings
sorear so you can't expect it to support operations like HOW
:(
or WHAT
hello igny
ingy
aya1 I'm just ask to advice how make it as string in v6
Becouse i'm found in documentation method as $obj.Str but it not work in this case, avuserow get me other solution to make it :) 23:13
ingy hi sorear 23:14
aya1 now i'm just trying to understand why ro values not defined, like in example 23:18
has $.name = "fido";
in class, but if you call $.name in some method it return only Any() but not value
but in case if ro attributes not defenid why it needs? :)
[particle] are there codepoints in unicode that may be either upper-case or lower-case, depending on your charset?
sorear please send a complete working example to nopaste.snit.ch or similar service 23:19
aya1 Yup it unicode utf-8, but no difference between uppercase or lower case, 5 min make short example and paste it 23:22
ash_ is it 'tell username' to send a message? i keep forgetting... 23:23
23:24 justatheory joined
[particle] msg username message 23:24
i think, on this channel. 23:25
ash_ msg moritz_ I have a sample of the try.rakudo.org setup at try.rakudo.org/shell if you want to test it out. The default index is still the temp page that was up before, but if you go there you can try the shell for now, until i get more of the bugs worked out. Its running perl6 and executing basic commands properly. The code in the github repo is up to date, so if you'd like to see my work and let me know of any security measur 23:27
would help, let me know. Its mostly all contained in the frontend/cgi/try.pl file.
sorear ooh, looks like we're about to see another Zombie Thread 23:28
aya1 sorear look on nopaste.snit.ch/22564 23:29
i'm make a test class with rw and ro attributes
information about ro attributest getted here: perlcabal.org/syn/S12.html#Attributes 23:30
>has $.name = "fido";
:)
sorear aya1: don't use BUILD and initializers in the same class
aya1 hmm but BUILD is a constructor method
in documenation be info about it, it why i'm use it 23:31
sorear BUILD is an initializer method
it replaces the initializers of all attributes
aya1 hmm strange, maybe wrong docs, than which ones is constructor method?
sorear new 23:32
aya1 as method? or as submethod?
sorear method
aya1 one sec
ash_ rakudo: class A { has $.b; method new($a) { self.bless(*, b => $a * 3); } }; say A.new(3).b 23:33
p6eval rakudo ecb4b0: OUTPUT«9␤»
sorear it doesn't make sense to use both BUILD and initializers in the same class, because they do the same thing
ash_ is an example of how to make your own new
snarkyboojum ash_: w00t, it works :) 23:37
ash_ snarkyboojum: i got perl6 built on the system with low memory after i copied the core.pir over
thanks
snarkyboojum ash_: ah - great :)
ash_: camelia hides long lines in the stdout div, but I guess you're aware of that 23:38
aya1 ash_ new method is abstract? not allow rw attributest defenition in this case? like a BUILD 23:44
23:46 risou joined
aya1 also btw why in your example of clas you can overwrite $.b if it ro attribute? 23:47
23:55 wayland76 joined 23:59 Psyche^ joined